product

package
v2.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pkg_proto_product_types_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Product

type Product struct {

	// @inject_tag: faker:"uuid_hyphenated"
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// @inject_tag: faker:"name"
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// @inject_tag: faker:"word"
	Sku string `protobuf:"bytes,3,opt,name=sku,proto3" json:"sku,omitempty"`
	// @inject_tag: faker:"url"
	Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"`
	// @inject_tag: faker:"paragraph"
	Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
	// @inject_tag: faker:"oneof: 4.95, 9.99, 31997.97"
	Price string `protobuf:"bytes,6,opt,name=price,proto3" json:"price,omitempty"`
	// @inject_tag: faker:"oneof: 17, 18"
	Stock string `protobuf:"bytes,7,opt,name=stock,proto3" json:"stock,omitempty"`
	// @inject_tag: faker:"uuid_hyphenated"
	CategoryId string `protobuf:"bytes,8,opt,name=category_id,json=categoryId,proto3" json:"category_id,omitempty"`
	// @inject_tag: faker:"-"
	Attributes  map[string]string      `` /* 161-byte string literal not displayed */
	DeliveredAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=delivered_at,json=deliveredAt,proto3" json:"delivered_at,omitempty"`
	CreatedAt   *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt   *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

Product

func (*Product) Descriptor deprecated

func (*Product) Descriptor() ([]byte, []int)

Deprecated: Use Product.ProtoReflect.Descriptor instead.

func (*Product) GetAttributes

func (x *Product) GetAttributes() map[string]string

func (*Product) GetCategoryId

func (x *Product) GetCategoryId() string

func (*Product) GetCreatedAt

func (x *Product) GetCreatedAt() *timestamppb.Timestamp

func (*Product) GetDeliveredAt

func (x *Product) GetDeliveredAt() *timestamppb.Timestamp

func (*Product) GetDescription

func (x *Product) GetDescription() string

func (*Product) GetId

func (x *Product) GetId() string

func (*Product) GetName

func (x *Product) GetName() string

func (*Product) GetPrice

func (x *Product) GetPrice() string

func (*Product) GetSku

func (x *Product) GetSku() string

func (*Product) GetStock

func (x *Product) GetStock() string

func (*Product) GetUpdatedAt

func (x *Product) GetUpdatedAt() *timestamppb.Timestamp

func (*Product) GetUrl

func (x *Product) GetUrl() string

func (*Product) ProtoMessage

func (*Product) ProtoMessage()

func (*Product) ProtoReflect

func (x *Product) ProtoReflect() protoreflect.Message

func (*Product) Reset

func (x *Product) Reset()

func (*Product) String

func (x *Product) String() string

func (*Product) Validate

func (m *Product) Validate() error

Validate checks the field values on Product with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type ProductValidationError

type ProductValidationError struct {
	// contains filtered or unexported fields
}

ProductValidationError is the validation error returned by Product.Validate if the designated constraints aren't met.

func (ProductValidationError) Cause

func (e ProductValidationError) Cause() error

Cause function returns cause value.

func (ProductValidationError) Error

func (e ProductValidationError) Error() string

Error satisfies the builtin error interface

func (ProductValidationError) ErrorName

func (e ProductValidationError) ErrorName() string

ErrorName returns error name.

func (ProductValidationError) Field

func (e ProductValidationError) Field() string

Field function returns field value.

func (ProductValidationError) Key

func (e ProductValidationError) Key() bool

Key function returns key value.

func (ProductValidationError) Reason

func (e ProductValidationError) Reason() string

Reason function returns reason value.

type Products

type Products struct {
	List       []*Product               `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
	Pagination *common.PaginationResult `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
	// contains filtered or unexported fields
}

func (*Products) Descriptor deprecated

func (*Products) Descriptor() ([]byte, []int)

Deprecated: Use Products.ProtoReflect.Descriptor instead.

func (*Products) GetList

func (x *Products) GetList() []*Product

func (*Products) GetPagination

func (x *Products) GetPagination() *common.PaginationResult

func (*Products) ProtoMessage

func (*Products) ProtoMessage()

func (*Products) ProtoReflect

func (x *Products) ProtoReflect() protoreflect.Message

func (*Products) Reset

func (x *Products) Reset()

func (*Products) String

func (x *Products) String() string

func (*Products) Validate

func (m *Products) Validate() error

Validate checks the field values on Products with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type ProductsValidationError

type ProductsValidationError struct {
	// contains filtered or unexported fields
}

ProductsValidationError is the validation error returned by Products.Validate if the designated constraints aren't met.

func (ProductsValidationError) Cause

func (e ProductsValidationError) Cause() error

Cause function returns cause value.

func (ProductsValidationError) Error

func (e ProductsValidationError) Error() string

Error satisfies the builtin error interface

func (ProductsValidationError) ErrorName

func (e ProductsValidationError) ErrorName() string

ErrorName returns error name.

func (ProductsValidationError) Field

func (e ProductsValidationError) Field() string

Field function returns field value.

func (ProductsValidationError) Key

func (e ProductsValidationError) Key() bool

Key function returns key value.

func (ProductsValidationError) Reason

func (e ProductsValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL