当前位置: 首页>>代码示例>>Golang>>正文


Golang domain.NewDomainError函数代码示例

本文整理汇总了Golang中go2o/src/core/infrastructure/domain.NewDomainError函数的典型用法代码示例。如果您正苦于以下问题:Golang NewDomainError函数的具体用法?Golang NewDomainError怎么用?Golang NewDomainError使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了NewDomainError函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1:

/**
 * Copyright 2014 @ S1N1 Team.
 * name :
 * author : jarryliu
 * date : 2013-12-12 16:53
 * description :
 * history :
 */

package partner

import (
	"go2o/src/core/infrastructure/domain"
)

var (
	ErrNoSuchPartner *domain.DomainError = domain.NewDomainError(
		"no_such_partner", "商家不存在")

	ErrNoSuchShop *domain.DomainError = domain.NewDomainError(
		"no_such_shop", "门店不存在")

	ErrPartnerNotMatch *domain.DomainError = domain.NewDomainError(
		"not_match", "商家不匹配")
)
开发者ID:henrylee2cn,项目名称:go2o,代码行数:25,代码来源:error.go

示例2:

/**
 * Copyright 2015 @ S1N1 Team.
 * name : error
 * author : jarryliu
 * date : 2015-07-27 09:22
 * description :
 * history :
 */
package mss

import "go2o/src/core/infrastructure/domain"

var (
	ErrNotSupportMessageType *domain.DomainError = domain.NewDomainError(
		"err_not_support_message_type", "不支持的消息类型")

	ErrNotEnabled *domain.DomainError = domain.NewDomainError(
		"err_template_not_enabled", "模板未启用")

	ErrTemplateUsed *domain.DomainError = domain.NewDomainError(
		"err_template_used", "模板被使用,无法删除")
)
开发者ID:henrylee2cn,项目名称:go2o,代码行数:22,代码来源:error.go

示例3:

/**
 * Copyright 2014 @ S1N1 Team.
 * name :
 * author : jarryliu
 * date : 2014-02-04 20:39
 * description :
 * history :
 */
package sale

import (
	"go2o/src/core/infrastructure/domain"
)

var (
	ErrNoSuchGoods *domain.DomainError = domain.NewDomainError(
		"no_such_goods", "商品不存在")

	ErrLatestSnapshot *domain.DomainError = domain.NewDomainError(
		"latest_snapshot", "已经是最新的快照")

	ErrNoSuchSnapshot *domain.DomainError = domain.NewDomainError(
		"no_such_snapshot", "商品快照不存在")

	ErrNotOnShelves *domain.DomainError = domain.NewDomainError(
		"not_on_shelves", "商品未上架")

	ErrOutOfSalePrice *domain.DomainError = domain.NewDomainError(
		"out_of_sale_price", "超出商品售价")

	ErrInternalDisallow *domain.DomainError = domain.NewDomainError(
		"err_internal_disallow", "不允许删除内置销售标签!")
开发者ID:kevinhuo88888,项目名称:go2o,代码行数:32,代码来源:error.go

示例4:

/**
 * Copyright 2014 @ z3q.net.
 * name :
 * author : jarryliu
 * date : 2014-02-04 20:39
 * description :
 * history :
 */
package sale

import (
	"go2o/src/core/infrastructure/domain"
)

var (
	ErrNoSuchGoods *domain.DomainError = domain.NewDomainError(
		"no_such_goods", "商品不存在")

	ErrLatestSnapshot *domain.DomainError = domain.NewDomainError(
		"latest_snapshot", "已经是最新的快照")

	ErrNoSuchSnapshot *domain.DomainError = domain.NewDomainError(
		"no_such_snapshot", "商品快照不存在")

	ErrNotOnShelves *domain.DomainError = domain.NewDomainError(
		"not_on_shelves", "商品未上架")

	ErrGoodsNum *domain.DomainError = domain.NewDomainError(
		"err_goods_num", "商品数量错误")

	ErrOutOfSalePrice *domain.DomainError = domain.NewDomainError(
		"out_of_sale_price", "超出商品售价")
开发者ID:zoe527,项目名称:go2o,代码行数:32,代码来源:error.go

示例5:

/**
 * Copyright 2014 @ S1N1 Team.
 * name :
 * author : jarryliu
 * date : 2013-12-12 16:53
 * description :
 * history :
 */

package ad

import (
	"go2o/src/core/infrastructure/domain"
)

var (
	ErrNameExists *domain.DomainError = domain.NewDomainError(
		"name_exists", "已经存在相同的名称的广告")

	ErrInternalDisallow *domain.DomainError = domain.NewDomainError(
		"err_internal_disallow", "不允许修改系统内置广告")
)
开发者ID:keenhanzheng,项目名称:go2o,代码行数:22,代码来源:error.go

示例6:

/**
 * Copyright 2014 @ S1N1 Team.
 * name :
 * author : jarryliu
 * date : 2014-02-05 20:12
 * description :
 * history :
 */
package member

import (
	"go2o/src/core/infrastructure/domain"
)

var (
	ErrSessionTimeout *domain.DomainError = domain.NewDomainError(
		"member_session_time_out", "会员会话超时")

	ErrInvalidSession *domain.DomainError = domain.NewDomainError(
		"member_invalid_session", "异常会话")

	ErrNoSuchDeliverAddress *domain.DomainError = domain.NewDomainError(
		"member_no_such_deliver_address", "配送地址错误")

	ErrNoSuchMember *domain.DomainError = domain.NewDomainError(
		"member_no_such_member", "会员不存在")

	ErrDeliverAddressLen *domain.DomainError = domain.NewDomainError(
		"err_deliver_address_len", "请填写详细的配送地址")

	ErrDeliverRealNameIsNull *domain.DomainError = domain.NewDomainError(
		"err_deliver_real_name_is_null", "收货人不能为空")
开发者ID:AlwaysOnline,项目名称:go2o,代码行数:32,代码来源:error.go

示例7:

/**
 * Copyright 2014 @ S1N1 Team.
 * name :
 * author : jarryliu
 * date : 2013-12-12 16:53
 * description :
 * history :
 */

package promotion

import (
	"go2o/src/core/infrastructure/domain"
)

var (
	ErrCanNotApplied *domain.DomainError = domain.NewDomainError(
		"name_exists", "无法应用此优惠")

	ErrExistsSamePromotionFlag *domain.DomainError = domain.NewDomainError(
		"exists_same_promotion_flag", "已存在相同的促销")
)
开发者ID:linux-mac,项目名称:go2o,代码行数:22,代码来源:error.go

示例8:

/**
 * Copyright 2014 @ S1N1 Team.
 * name :
 * author : jarryliu
 * date : 2014-02-05 20:12
 * description :
 * history :
 */
package member

import (
	"go2o/src/core/infrastructure/domain"
)

var (
	ErrSessionTimeout *domain.DomainError = domain.NewDomainError(
		"member_session_time_out", "会员会话超时")

	ErrInvalidSession *domain.DomainError = domain.NewDomainError(
		"member_invalid_session", "异常会话")

	ErrNoSuchDeliverAddress *domain.DomainError = domain.NewDomainError(
		"member_no_such_deliver_address", "配送地址错误")
)
开发者ID:xianmau,项目名称:go2o,代码行数:24,代码来源:error.go

示例9:

/**
 * Copyright 2014 @ S1N1 Team.
 * name :
 * author : jarryliu
 * date : 2014-02-04 20:39
 * description :
 * history :
 */
package sale

import (
	"go2o/src/core/infrastructure/domain"
)

var (
	ErrNoSuchGoods *domain.DomainError = domain.NewDomainError(
		"no_such_goods", "商品不存在")

	ErrLatestSnapshot *domain.DomainError = domain.NewDomainError(
		"latest_snapshot", "已经是最新的快照")

	ErrNoSuchSnapshot *domain.DomainError = domain.NewDomainError(
		"no_such_snapshot", "商品快照不存在")

	ErrNotOnShelves *domain.DomainError = domain.NewDomainError(
		"not_on_shelves", "商品未上架")

	ErrOutOfSalePrice *domain.DomainError = domain.NewDomainError(
		"out_of_sale_price", "超出商品售价")
)
开发者ID:sunxboy,项目名称:go2o,代码行数:30,代码来源:error.go


注:本文中的go2o/src/core/infrastructure/domain.NewDomainError函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。