fprotobuf

package
v0.0.0-...-9b23b2b Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_format_fprotobuf_schema_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type CartItem

type CartItem struct {
	Item     *Item `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
	Quantity int32 `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"`
	// contains filtered or unexported fields
}

func (*CartItem) Descriptor deprecated

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

Deprecated: Use CartItem.ProtoReflect.Descriptor instead.

func (*CartItem) GetItem

func (x *CartItem) GetItem() *Item

func (*CartItem) GetQuantity

func (x *CartItem) GetQuantity() int32

func (*CartItem) ProtoMessage

func (*CartItem) ProtoMessage()

func (*CartItem) ProtoReflect

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

func (*CartItem) Reset

func (x *CartItem) Reset()

func (*CartItem) String

func (x *CartItem) String() string

type Item

type Item struct {
	Id          string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	CreatedAt   *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	Visible     bool                   `protobuf:"varint,3,opt,name=visible,proto3" json:"visible,omitempty"`
	OwnerId     int32                  `protobuf:"varint,4,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"`
	Name        string                 `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
	Description *string                `protobuf:"bytes,6,opt,name=description,proto3,oneof" json:"description,omitempty"`
	Keywords    []string               `protobuf:"bytes,7,rep,name=keywords,proto3" json:"keywords,omitempty"`
	Price       float64                `protobuf:"fixed64,8,opt,name=price,proto3" json:"price,omitempty"`
	Weight      float32                `protobuf:"fixed32,9,opt,name=weight,proto3" json:"weight,omitempty"`
	// contains filtered or unexported fields
}

func (*Item) Descriptor deprecated

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

Deprecated: Use Item.ProtoReflect.Descriptor instead.

func (*Item) GetCreatedAt

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

func (*Item) GetDescription

func (x *Item) GetDescription() string

func (*Item) GetId

func (x *Item) GetId() string

func (*Item) GetKeywords

func (x *Item) GetKeywords() []string

func (*Item) GetName

func (x *Item) GetName() string

func (*Item) GetOwnerId

func (x *Item) GetOwnerId() int32

func (*Item) GetPrice

func (x *Item) GetPrice() float64

func (*Item) GetVisible

func (x *Item) GetVisible() bool

func (*Item) GetWeight

func (x *Item) GetWeight() float32

func (*Item) ProtoMessage

func (*Item) ProtoMessage()

func (*Item) ProtoReflect

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

func (*Item) Reset

func (x *Item) Reset()

func (*Item) String

func (x *Item) String() string

type Serializer

type Serializer struct{}

func NewSerializer

func NewSerializer() *Serializer

func (*Serializer) Marshal

func (s *Serializer) Marshal(input interface{}) ([]byte, error)

func (*Serializer) Unmarshal

func (s *Serializer) Unmarshal(data []byte, output interface{}) error

type User

type User struct {
	Name         string                 `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Phone        string                 `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"`
	Balance      float64                `protobuf:"fixed64,3,opt,name=balance,proto3" json:"balance,omitempty"`
	Birthday     *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=birthday,proto3,oneof" json:"birthday,omitempty"`
	RegisteredAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=registered_at,json=registeredAt,proto3" json:"registered_at,omitempty"`
	ShoppingCart map[string]*CartItem   `` /* 185-byte string literal not displayed */
	Blocked      bool                   `protobuf:"varint,7,opt,name=blocked,proto3" json:"blocked,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetBalance

func (x *User) GetBalance() float64

func (*User) GetBirthday

func (x *User) GetBirthday() *timestamppb.Timestamp

func (*User) GetBlocked

func (x *User) GetBlocked() bool

func (*User) GetName

func (x *User) GetName() string

func (*User) GetPhone

func (x *User) GetPhone() string

func (*User) GetRegisteredAt

func (x *User) GetRegisteredAt() *timestamppb.Timestamp

func (*User) GetShoppingCart

func (x *User) GetShoppingCart() map[string]*CartItem

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

Jump to

Keyboard shortcuts

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