Documentation ¶
Index ¶
- type DiscountRequest
- type DiscountResponse
- type EventRequest
- type Product
- type ProductCreate
- type ProductCreateRequestV1
- type ProductCreateResponseV1
- type ProductCreatedUpdatedEventRequest
- func NewProductCreatedEventRequest(ctx context.Context, productId, title, description string, priceInCents int64) ProductCreatedUpdatedEventRequest
- func NewProductDeletedEventRequest(ctx context.Context, productId, title, description string, priceInCents int64) ProductCreatedUpdatedEventRequest
- func NewProductUpdatedEventRequest(ctx context.Context, productId, title, description string, priceInCents int64) ProductCreatedUpdatedEventRequest
- type ProductDiscount
- type ProductFilter
- type ProductGetResponseV1
- type ProductListResponseV1
- type ProductProjection
- type ProductSearch
- type ProductUpdate
- type ProductUpdateRequestV1
- type ProductUpdateResponseV1
- type Span
- type SpanConfig
- type TypeEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscountRequest ¶
type DiscountResponse ¶
type EventRequest ¶
type Product ¶
type Product struct { Id *string `projection:"id"` PriceInCents *int64 `projection:"price_in_cents"` Title *string `projection:"title" ` Description *string `projection:"description"` CreatedAt time.Time `projection:"created_at"` UpdatedAt time.Time `projection:"updated_at"` DeletedAt *time.Time `projection:"deleted_at"` Discount *ProductDiscount }
type ProductCreate ¶
type ProductCreateRequestV1 ¶
type ProductCreateRequestV1 struct { PriceInCents int64 `json:"price_in_cents" validate:"required"` Title string `json:"title" validate:"required,min=1"` Description string `json:"description" validate:"required,min=1"` }
func (*ProductCreateRequestV1) ProductCreate ¶
func (c *ProductCreateRequestV1) ProductCreate() ProductCreate
type ProductCreateResponseV1 ¶
type ProductCreatedUpdatedEventRequest ¶
type ProductCreatedUpdatedEventRequest struct { ProductId string `json:"product_id" validate:"required"` Title string `json:"title" validate:"required"` Description string `json:"description" validate:"required"` PriceInCents int64 `json:"price_in_cents" validate:"required"` // contains filtered or unexported fields }
func NewProductCreatedEventRequest ¶
func NewProductCreatedEventRequest(ctx context.Context, productId, title, description string, priceInCents int64) ProductCreatedUpdatedEventRequest
func NewProductDeletedEventRequest ¶
func NewProductDeletedEventRequest(ctx context.Context, productId, title, description string, priceInCents int64) ProductCreatedUpdatedEventRequest
func NewProductUpdatedEventRequest ¶
func NewProductUpdatedEventRequest(ctx context.Context, productId, title, description string, priceInCents int64) ProductCreatedUpdatedEventRequest
func (ProductCreatedUpdatedEventRequest) EventId ¶
func (p ProductCreatedUpdatedEventRequest) EventId() string
func (ProductCreatedUpdatedEventRequest) EventType ¶
func (p ProductCreatedUpdatedEventRequest) EventType() string
func (ProductCreatedUpdatedEventRequest) Operation ¶
func (p ProductCreatedUpdatedEventRequest) Operation() string
type ProductDiscount ¶
type ProductFilter ¶
type ProductGetResponseV1 ¶
type ProductGetResponseV1 struct { Id string `json:"id"` PriceInCents int64 `json:"price_in_cents"` Title string `json:"title"` Description *string `json:"description"` Discount *ProductDiscount `json:"discount"` }
type ProductListResponseV1 ¶
type ProductListResponseV1 struct {
Products []ProductGetResponseV1 `json:"products"`
}
type ProductProjection ¶
type ProductProjection struct { Id bool `projection:"id"` PriceInCents bool `projection:"price_in_cents"` Title bool `projection:"title"` Description bool `projection:"description"` CreatedAt bool `projection:"created_at"` UpdatedAt bool `projection:"updated_at"` DeletedAt bool `projection:"deleted_at"` }
type ProductSearch ¶
type ProductSearch struct { Filter ProductFilter Projection ProductProjection }
type ProductUpdate ¶
type ProductUpdateRequestV1 ¶
type ProductUpdateRequestV1 struct { PriceInCents *int64 `json:"price_in_cents"` Title *string `json:"title" validate:"omitempty,min=1"` Description *string `json:"description" validate:"omitempty,min=1"` }
func (*ProductUpdateRequestV1) ProductUpdate ¶
func (c *ProductUpdateRequestV1) ProductUpdate(productId string) ProductUpdate
type ProductUpdateResponseV1 ¶
type Span ¶
type Span struct { Name string `validate:"required"` Cid string `validate:"required"` Resource string `validate:"required"` Version string `validate:"required"` OrgId string `validate:"required"` Line int `validate:"required"` FuncName string `validate:"required"` FileName string `validate:"required"` Custom map[string]interface{} `validate:"required"` InternalSpan zipkin.Span }
type SpanConfig ¶
func WithCustom ¶
func WithCustom(k string, v interface{}) SpanConfig
func WithName ¶
func WithName(v string) SpanConfig
func WithOrgId ¶
func WithOrgId(v string) SpanConfig
Click to show internal directories.
Click to hide internal directories.