Documentation ¶
Overview ¶
Package user is a generated protocol buffer package.
It is generated from these files:
example/user/user.proto
It has these top-level messages:
User Email Address Language CreditCard Task
Index ¶
- func DefaultDeleteAddress(ctx context.Context, in *Address, db *gorm1.DB) error
- func DefaultDeleteCreditCard(ctx context.Context, in *CreditCard, db *gorm1.DB) error
- func DefaultDeleteEmail(ctx context.Context, in *Email, db *gorm1.DB) error
- func DefaultDeleteLanguage(ctx context.Context, in *Language, db *gorm1.DB) error
- func DefaultDeleteUser(ctx context.Context, in *User, db *gorm1.DB) error
- type Address
- func DefaultApplyFieldMaskAddress(ctx context.Context, patchee *Address, ormObj *AddressORM, patcher *Address, ...) (*Address, error)
- func DefaultCreateAddress(ctx context.Context, in *Address, db *gorm1.DB) (*Address, error)
- func DefaultListAddress(ctx context.Context, db *gorm1.DB, req interface{}) ([]*Address, error)
- func DefaultPatchAddress(ctx context.Context, in *Address, updateMask *field_mask1.FieldMask, ...) (*Address, error)
- func DefaultReadAddress(ctx context.Context, in *Address, db *gorm1.DB) (*Address, error)
- func DefaultStrictUpdateAddress(ctx context.Context, in *Address, db *gorm1.DB) (*Address, error)
- func DefaultUpdateAddress(ctx context.Context, in *Address, db *gorm1.DB) (*Address, error)
- func (*Address) Descriptor() ([]byte, []int)
- func (m *Address) GetAddress_1() string
- func (m *Address) GetAddress_2() string
- func (m *Address) GetExternal() *resource.Identifier
- func (m *Address) GetId() *resource.Identifier
- func (m *Address) GetImplicitFk() *resource.Identifier
- func (m *Address) GetPost() string
- func (*Address) ProtoMessage()
- func (m *Address) Reset()
- func (m *Address) String() string
- func (m *Address) ToORM(ctx context.Context) (AddressORM, error)
- func (m *Address) XXX_DiscardUnknown()
- func (m *Address) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Address) XXX_Merge(src proto.Message)
- func (m *Address) XXX_Size() int
- func (m *Address) XXX_Unmarshal(b []byte) error
- type AddressORM
- type AddressWithAfterToORM
- type AddressWithAfterToPB
- type AddressWithBeforePatchSave
- type AddressWithBeforeToORM
- type AddressWithBeforeToPB
- type CreditCard
- func DefaultApplyFieldMaskCreditCard(ctx context.Context, patchee *CreditCard, ormObj *CreditCardORM, ...) (*CreditCard, error)
- func DefaultCreateCreditCard(ctx context.Context, in *CreditCard, db *gorm1.DB) (*CreditCard, error)
- func DefaultListCreditCard(ctx context.Context, db *gorm1.DB, req interface{}) ([]*CreditCard, error)
- func DefaultPatchCreditCard(ctx context.Context, in *CreditCard, updateMask *field_mask1.FieldMask, ...) (*CreditCard, error)
- func DefaultReadCreditCard(ctx context.Context, in *CreditCard, db *gorm1.DB) (*CreditCard, error)
- func DefaultStrictUpdateCreditCard(ctx context.Context, in *CreditCard, db *gorm1.DB) (*CreditCard, error)
- func DefaultUpdateCreditCard(ctx context.Context, in *CreditCard, db *gorm1.DB) (*CreditCard, error)
- func (*CreditCard) Descriptor() ([]byte, []int)
- func (m *CreditCard) GetCreatedAt() *timestamp.Timestamp
- func (m *CreditCard) GetId() *resource.Identifier
- func (m *CreditCard) GetNumber() string
- func (m *CreditCard) GetUpdatedAt() *timestamp.Timestamp
- func (m *CreditCard) GetUserId() *resource.Identifier
- func (*CreditCard) ProtoMessage()
- func (m *CreditCard) Reset()
- func (m *CreditCard) String() string
- func (m *CreditCard) ToORM(ctx context.Context) (CreditCardORM, error)
- func (m *CreditCard) XXX_DiscardUnknown()
- func (m *CreditCard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *CreditCard) XXX_Merge(src proto.Message)
- func (m *CreditCard) XXX_Size() int
- func (m *CreditCard) XXX_Unmarshal(b []byte) error
- type CreditCardORM
- type CreditCardWithAfterToORM
- type CreditCardWithAfterToPB
- type CreditCardWithBeforePatchSave
- type CreditCardWithBeforeToORM
- type CreditCardWithBeforeToPB
- type Email
- func DefaultApplyFieldMaskEmail(ctx context.Context, patchee *Email, ormObj *EmailORM, patcher *Email, ...) (*Email, error)
- func DefaultCreateEmail(ctx context.Context, in *Email, db *gorm1.DB) (*Email, error)
- func DefaultListEmail(ctx context.Context, db *gorm1.DB, req interface{}) ([]*Email, error)
- func DefaultPatchEmail(ctx context.Context, in *Email, updateMask *field_mask1.FieldMask, ...) (*Email, error)
- func DefaultReadEmail(ctx context.Context, in *Email, db *gorm1.DB) (*Email, error)
- func DefaultStrictUpdateEmail(ctx context.Context, in *Email, db *gorm1.DB) (*Email, error)
- func DefaultUpdateEmail(ctx context.Context, in *Email, db *gorm1.DB) (*Email, error)
- func (*Email) Descriptor() ([]byte, []int)
- func (m *Email) GetEmail() string
- func (m *Email) GetExternalNotNull() *resource.Identifier
- func (m *Email) GetId() *resource.Identifier
- func (m *Email) GetSubscribed() bool
- func (m *Email) GetUserId() *resource.Identifier
- func (*Email) ProtoMessage()
- func (m *Email) Reset()
- func (m *Email) String() string
- func (m *Email) ToORM(ctx context.Context) (EmailORM, error)
- func (m *Email) XXX_DiscardUnknown()
- func (m *Email) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Email) XXX_Merge(src proto.Message)
- func (m *Email) XXX_Size() int
- func (m *Email) XXX_Unmarshal(b []byte) error
- type EmailORM
- type EmailWithAfterToORM
- type EmailWithAfterToPB
- type EmailWithBeforePatchSave
- type EmailWithBeforeToORM
- type EmailWithBeforeToPB
- type Language
- func DefaultApplyFieldMaskLanguage(ctx context.Context, patchee *Language, ormObj *LanguageORM, patcher *Language, ...) (*Language, error)
- func DefaultCreateLanguage(ctx context.Context, in *Language, db *gorm1.DB) (*Language, error)
- func DefaultListLanguage(ctx context.Context, db *gorm1.DB, req interface{}) ([]*Language, error)
- func DefaultPatchLanguage(ctx context.Context, in *Language, updateMask *field_mask1.FieldMask, ...) (*Language, error)
- func DefaultReadLanguage(ctx context.Context, in *Language, db *gorm1.DB) (*Language, error)
- func DefaultStrictUpdateLanguage(ctx context.Context, in *Language, db *gorm1.DB) (*Language, error)
- func DefaultUpdateLanguage(ctx context.Context, in *Language, db *gorm1.DB) (*Language, error)
- func (*Language) Descriptor() ([]byte, []int)
- func (m *Language) GetCode() string
- func (m *Language) GetExternalInt() *resource.Identifier
- func (m *Language) GetId() *resource.Identifier
- func (m *Language) GetName() string
- func (*Language) ProtoMessage()
- func (m *Language) Reset()
- func (m *Language) String() string
- func (m *Language) ToORM(ctx context.Context) (LanguageORM, error)
- func (m *Language) XXX_DiscardUnknown()
- func (m *Language) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Language) XXX_Merge(src proto.Message)
- func (m *Language) XXX_Size() int
- func (m *Language) XXX_Unmarshal(b []byte) error
- type LanguageORM
- type LanguageWithAfterToORM
- type LanguageWithAfterToPB
- type LanguageWithBeforePatchSave
- type LanguageWithBeforeToORM
- type LanguageWithBeforeToPB
- type Task
- func (*Task) Descriptor() ([]byte, []int)
- func (m *Task) GetDescription() string
- func (m *Task) GetName() string
- func (m *Task) GetPriority() int64
- func (*Task) ProtoMessage()
- func (m *Task) Reset()
- func (m *Task) String() string
- func (m *Task) ToORM(ctx context.Context) (TaskORM, error)
- func (m *Task) XXX_DiscardUnknown()
- func (m *Task) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Task) XXX_Merge(src proto.Message)
- func (m *Task) XXX_Size() int
- func (m *Task) XXX_Unmarshal(b []byte) error
- type TaskORM
- type TaskWithAfterToORM
- type TaskWithAfterToPB
- type TaskWithBeforeToORM
- type TaskWithBeforeToPB
- type User
- func DefaultApplyFieldMaskUser(ctx context.Context, patchee *User, ormObj *UserORM, patcher *User, ...) (*User, error)
- func DefaultCreateUser(ctx context.Context, in *User, db *gorm1.DB) (*User, error)
- func DefaultListUser(ctx context.Context, db *gorm1.DB, req interface{}) ([]*User, error)
- func DefaultPatchUser(ctx context.Context, in *User, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*User, error)
- func DefaultReadUser(ctx context.Context, in *User, db *gorm1.DB) (*User, error)
- func DefaultStrictUpdateUser(ctx context.Context, in *User, db *gorm1.DB) (*User, error)
- func DefaultUpdateUser(ctx context.Context, in *User, db *gorm1.DB) (*User, error)
- func (*User) Descriptor() ([]byte, []int)
- func (m *User) GetAge() uint32
- func (m *User) GetBillingAddress() *Address
- func (m *User) GetBirthday() *timestamp.Timestamp
- func (m *User) GetCreatedAt() *timestamp.Timestamp
- func (m *User) GetCreditCard() *CreditCard
- func (m *User) GetEmails() []*Email
- func (m *User) GetExternalUuid() *resource.Identifier
- func (m *User) GetFriends() []*User
- func (m *User) GetId() *resource.Identifier
- func (m *User) GetLanguages() []*Language
- func (m *User) GetNum() uint32
- func (m *User) GetShippingAddress() *Address
- func (m *User) GetShippingAddressId() *resource.Identifier
- func (m *User) GetTasks() []*Task
- func (m *User) GetUpdatedAt() *timestamp.Timestamp
- func (*User) ProtoMessage()
- func (m *User) Reset()
- func (m *User) String() string
- func (m *User) ToORM(ctx context.Context) (UserORM, error)
- func (m *User) XXX_DiscardUnknown()
- func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *User) XXX_Merge(src proto.Message)
- func (m *User) XXX_Size() int
- func (m *User) XXX_Unmarshal(b []byte) error
- type UserORM
- type UserWithAfterToORM
- type UserWithAfterToPB
- type UserWithBeforePatchSave
- type UserWithBeforeToORM
- type UserWithBeforeToPB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDeleteAddress ¶
func DefaultDeleteCreditCard ¶
func DefaultDeleteEmail ¶
func DefaultDeleteLanguage ¶
Types ¶
type Address ¶
type Address struct { Id *resource.Identifier `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Address_1 string `protobuf:"bytes,2,opt,name=address_1,json=address1" json:"address_1,omitempty"` Address_2 string `protobuf:"bytes,3,opt,name=address_2,json=address2" json:"address_2,omitempty"` Post string `protobuf:"bytes,4,opt,name=post" json:"post,omitempty"` External *resource.Identifier `protobuf:"bytes,5,opt,name=external" json:"external,omitempty"` ImplicitFk *resource.Identifier `protobuf:"bytes,6,opt,name=implicit_fk,json=implicitFk" json:"implicit_fk,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func DefaultApplyFieldMaskAddress ¶ added in v0.9.0
func DefaultApplyFieldMaskAddress(ctx context.Context, patchee *Address, ormObj *AddressORM, patcher *Address, updateMask *field_mask1.FieldMask, prefix string, db *gorm1.DB) (*Address, error)
DefaultApplyFieldMaskAddress patches an pbObject with patcher according to a field mask.
func DefaultCreateAddress ¶
DefaultCreateAddress executes a basic gorm create call
func DefaultListAddress ¶
DefaultListAddress executes a gorm list call
func DefaultPatchAddress ¶ added in v0.9.0
func DefaultPatchAddress(ctx context.Context, in *Address, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*Address, error)
DefaultPatchAddress executes a basic gorm update call with patch behavior
func DefaultReadAddress ¶
DefaultReadAddress executes a basic gorm read call
func DefaultStrictUpdateAddress ¶
DefaultStrictUpdateAddress clears first level 1:many children and then executes a gorm update call
func DefaultUpdateAddress ¶
DefaultUpdateAddress executes a basic gorm update call
func (*Address) Descriptor ¶
func (*Address) GetAddress_1 ¶
func (*Address) GetAddress_2 ¶
func (*Address) GetExternal ¶ added in v0.6.0
func (m *Address) GetExternal() *resource.Identifier
func (*Address) GetId ¶
func (m *Address) GetId() *resource.Identifier
func (*Address) GetImplicitFk ¶ added in v0.8.0
func (m *Address) GetImplicitFk() *resource.Identifier
func (*Address) ProtoMessage ¶
func (*Address) ProtoMessage()
func (*Address) ToORM ¶
func (m *Address) ToORM(ctx context.Context) (AddressORM, error)
ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object
func (*Address) XXX_DiscardUnknown ¶ added in v0.6.0
func (m *Address) XXX_DiscardUnknown()
func (*Address) XXX_Marshal ¶ added in v0.6.0
func (*Address) XXX_Unmarshal ¶ added in v0.6.0
type AddressORM ¶
type AddressORM struct { AccountID string Address_1 string Address_2 string External []byte `gorm:"type:jsonb"` Id int64 `gorm:"type:integer;primary_key"` ImplicitFk *string `gorm:"type:text"` Post string }
func (AddressORM) TableName ¶
func (AddressORM) TableName() string
TableName overrides the default tablename generated by GORM
type AddressWithAfterToORM ¶
type AddressWithAfterToORM interface {
AfterToORM(context.Context, *AddressORM) error
}
AddressAfterToORM called after default ToORM code
type AddressWithAfterToPB ¶
AddressAfterToPB called after default ToPB code
type AddressWithBeforePatchSave ¶ added in v0.9.1
type AddressWithBeforeToORM ¶
type AddressWithBeforeToORM interface {
BeforeToORM(context.Context, *AddressORM) error
}
AddressBeforeToORM called before default ToORM code
type AddressWithBeforeToPB ¶
AddressBeforeToPB called before default ToPB code
type CreditCard ¶
type CreditCard struct { Id *resource.Identifier `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` CreatedAt *timestamp.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt" json:"created_at,omitempty"` UpdatedAt *timestamp.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt" json:"updated_at,omitempty"` Number string `protobuf:"bytes,4,opt,name=number" json:"number,omitempty"` UserId *resource.Identifier `protobuf:"bytes,5,opt,name=user_id,json=userId" json:"user_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func DefaultApplyFieldMaskCreditCard ¶ added in v0.9.0
func DefaultApplyFieldMaskCreditCard(ctx context.Context, patchee *CreditCard, ormObj *CreditCardORM, patcher *CreditCard, updateMask *field_mask1.FieldMask, prefix string, db *gorm1.DB) (*CreditCard, error)
DefaultApplyFieldMaskCreditCard patches an pbObject with patcher according to a field mask.
func DefaultCreateCreditCard ¶
func DefaultCreateCreditCard(ctx context.Context, in *CreditCard, db *gorm1.DB) (*CreditCard, error)
DefaultCreateCreditCard executes a basic gorm create call
func DefaultListCreditCard ¶
func DefaultListCreditCard(ctx context.Context, db *gorm1.DB, req interface{}) ([]*CreditCard, error)
DefaultListCreditCard executes a gorm list call
func DefaultPatchCreditCard ¶ added in v0.9.0
func DefaultPatchCreditCard(ctx context.Context, in *CreditCard, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*CreditCard, error)
DefaultPatchCreditCard executes a basic gorm update call with patch behavior
func DefaultReadCreditCard ¶
func DefaultReadCreditCard(ctx context.Context, in *CreditCard, db *gorm1.DB) (*CreditCard, error)
DefaultReadCreditCard executes a basic gorm read call
func DefaultStrictUpdateCreditCard ¶
func DefaultStrictUpdateCreditCard(ctx context.Context, in *CreditCard, db *gorm1.DB) (*CreditCard, error)
DefaultStrictUpdateCreditCard clears first level 1:many children and then executes a gorm update call
func DefaultUpdateCreditCard ¶
func DefaultUpdateCreditCard(ctx context.Context, in *CreditCard, db *gorm1.DB) (*CreditCard, error)
DefaultUpdateCreditCard executes a basic gorm update call
func (*CreditCard) Descriptor ¶
func (*CreditCard) Descriptor() ([]byte, []int)
func (*CreditCard) GetCreatedAt ¶
func (m *CreditCard) GetCreatedAt() *timestamp.Timestamp
func (*CreditCard) GetId ¶
func (m *CreditCard) GetId() *resource.Identifier
func (*CreditCard) GetNumber ¶
func (m *CreditCard) GetNumber() string
func (*CreditCard) GetUpdatedAt ¶
func (m *CreditCard) GetUpdatedAt() *timestamp.Timestamp
func (*CreditCard) GetUserId ¶ added in v0.6.0
func (m *CreditCard) GetUserId() *resource.Identifier
func (*CreditCard) ProtoMessage ¶
func (*CreditCard) ProtoMessage()
func (*CreditCard) Reset ¶
func (m *CreditCard) Reset()
func (*CreditCard) String ¶
func (m *CreditCard) String() string
func (*CreditCard) ToORM ¶
func (m *CreditCard) ToORM(ctx context.Context) (CreditCardORM, error)
ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object
func (*CreditCard) XXX_DiscardUnknown ¶ added in v0.6.0
func (m *CreditCard) XXX_DiscardUnknown()
func (*CreditCard) XXX_Marshal ¶ added in v0.6.0
func (m *CreditCard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreditCard) XXX_Merge ¶ added in v0.6.0
func (dst *CreditCard) XXX_Merge(src proto.Message)
func (*CreditCard) XXX_Size ¶ added in v0.6.0
func (m *CreditCard) XXX_Size() int
func (*CreditCard) XXX_Unmarshal ¶ added in v0.6.0
func (m *CreditCard) XXX_Unmarshal(b []byte) error
type CreditCardORM ¶
type CreditCardORM struct { AccountID string CreatedAt time.Time Id int64 `gorm:"type:integer;primary_key"` Number string UpdatedAt time.Time UserId *string }
func (CreditCardORM) TableName ¶
func (CreditCardORM) TableName() string
TableName overrides the default tablename generated by GORM
func (*CreditCardORM) ToPB ¶
func (m *CreditCardORM) ToPB(ctx context.Context) (CreditCard, error)
ToPB runs the BeforeToPB hook if present, converts the fields of this object to PB format, runs the AfterToPB hook, then returns the PB object
type CreditCardWithAfterToORM ¶
type CreditCardWithAfterToORM interface {
AfterToORM(context.Context, *CreditCardORM) error
}
CreditCardAfterToORM called after default ToORM code
type CreditCardWithAfterToPB ¶
type CreditCardWithAfterToPB interface {
AfterToPB(context.Context, *CreditCard) error
}
CreditCardAfterToPB called after default ToPB code
type CreditCardWithBeforePatchSave ¶ added in v0.9.1
type CreditCardWithBeforeToORM ¶
type CreditCardWithBeforeToORM interface {
BeforeToORM(context.Context, *CreditCardORM) error
}
CreditCardBeforeToORM called before default ToORM code
type CreditCardWithBeforeToPB ¶
type CreditCardWithBeforeToPB interface {
BeforeToPB(context.Context, *CreditCard) error
}
CreditCardBeforeToPB called before default ToPB code
type Email ¶
type Email struct { Id *resource.Identifier `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Email string `protobuf:"bytes,2,opt,name=email" json:"email,omitempty"` Subscribed bool `protobuf:"varint,3,opt,name=subscribed" json:"subscribed,omitempty"` UserId *resource.Identifier `protobuf:"bytes,4,opt,name=user_id,json=userId" json:"user_id,omitempty"` ExternalNotNull *resource.Identifier `protobuf:"bytes,5,opt,name=external_not_null,json=externalNotNull" json:"external_not_null,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func DefaultApplyFieldMaskEmail ¶ added in v0.9.0
func DefaultApplyFieldMaskEmail(ctx context.Context, patchee *Email, ormObj *EmailORM, patcher *Email, updateMask *field_mask1.FieldMask, prefix string, db *gorm1.DB) (*Email, error)
DefaultApplyFieldMaskEmail patches an pbObject with patcher according to a field mask.
func DefaultCreateEmail ¶
DefaultCreateEmail executes a basic gorm create call
func DefaultListEmail ¶
DefaultListEmail executes a gorm list call
func DefaultPatchEmail ¶ added in v0.9.0
func DefaultPatchEmail(ctx context.Context, in *Email, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*Email, error)
DefaultPatchEmail executes a basic gorm update call with patch behavior
func DefaultReadEmail ¶
DefaultReadEmail executes a basic gorm read call
func DefaultStrictUpdateEmail ¶
DefaultStrictUpdateEmail clears first level 1:many children and then executes a gorm update call
func DefaultUpdateEmail ¶
DefaultUpdateEmail executes a basic gorm update call
func (*Email) Descriptor ¶
func (*Email) GetExternalNotNull ¶ added in v0.7.0
func (m *Email) GetExternalNotNull() *resource.Identifier
func (*Email) GetId ¶
func (m *Email) GetId() *resource.Identifier
func (*Email) GetSubscribed ¶
func (*Email) GetUserId ¶ added in v0.6.0
func (m *Email) GetUserId() *resource.Identifier
func (*Email) ProtoMessage ¶
func (*Email) ProtoMessage()
func (*Email) ToORM ¶
ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object
func (*Email) XXX_DiscardUnknown ¶ added in v0.6.0
func (m *Email) XXX_DiscardUnknown()
func (*Email) XXX_Marshal ¶ added in v0.6.0
func (*Email) XXX_Unmarshal ¶ added in v0.6.0
type EmailORM ¶
type EmailORM struct { AccountID string Email string ExternalNotNull string `gorm:"type:uuid;not null"` Id string `gorm:"type:uuid;primary_key"` Subscribed bool UserId *string }
type EmailWithAfterToORM ¶
EmailAfterToORM called after default ToORM code
type EmailWithAfterToPB ¶
EmailAfterToPB called after default ToPB code
type EmailWithBeforePatchSave ¶ added in v0.9.1
type EmailWithBeforeToORM ¶
EmailBeforeToORM called before default ToORM code
type EmailWithBeforeToPB ¶
EmailBeforeToPB called before default ToPB code
type Language ¶
type Language struct { Id *resource.Identifier `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` Code string `protobuf:"bytes,3,opt,name=code" json:"code,omitempty"` ExternalInt *resource.Identifier `protobuf:"bytes,4,opt,name=external_int,json=externalInt" json:"external_int,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func DefaultApplyFieldMaskLanguage ¶ added in v0.9.0
func DefaultApplyFieldMaskLanguage(ctx context.Context, patchee *Language, ormObj *LanguageORM, patcher *Language, updateMask *field_mask1.FieldMask, prefix string, db *gorm1.DB) (*Language, error)
DefaultApplyFieldMaskLanguage patches an pbObject with patcher according to a field mask.
func DefaultCreateLanguage ¶
DefaultCreateLanguage executes a basic gorm create call
func DefaultListLanguage ¶
DefaultListLanguage executes a gorm list call
func DefaultPatchLanguage ¶ added in v0.9.0
func DefaultPatchLanguage(ctx context.Context, in *Language, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*Language, error)
DefaultPatchLanguage executes a basic gorm update call with patch behavior
func DefaultReadLanguage ¶
DefaultReadLanguage executes a basic gorm read call
func DefaultStrictUpdateLanguage ¶
func DefaultStrictUpdateLanguage(ctx context.Context, in *Language, db *gorm1.DB) (*Language, error)
DefaultStrictUpdateLanguage clears first level 1:many children and then executes a gorm update call
func DefaultUpdateLanguage ¶
DefaultUpdateLanguage executes a basic gorm update call
func (*Language) Descriptor ¶
func (*Language) GetExternalInt ¶ added in v0.7.0
func (m *Language) GetExternalInt() *resource.Identifier
func (*Language) GetId ¶
func (m *Language) GetId() *resource.Identifier
func (*Language) ProtoMessage ¶
func (*Language) ProtoMessage()
func (*Language) ToORM ¶
func (m *Language) ToORM(ctx context.Context) (LanguageORM, error)
ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object
func (*Language) XXX_DiscardUnknown ¶ added in v0.6.0
func (m *Language) XXX_DiscardUnknown()
func (*Language) XXX_Marshal ¶ added in v0.6.0
func (*Language) XXX_Unmarshal ¶ added in v0.6.0
type LanguageORM ¶
type LanguageORM struct { AccountID string Code string ExternalInt *int64 `gorm:"type:integer"` Id int64 `gorm:"type:integer;primary_key"` Name string }
func (LanguageORM) TableName ¶
func (LanguageORM) TableName() string
TableName overrides the default tablename generated by GORM
type LanguageWithAfterToORM ¶
type LanguageWithAfterToORM interface {
AfterToORM(context.Context, *LanguageORM) error
}
LanguageAfterToORM called after default ToORM code
type LanguageWithAfterToPB ¶
LanguageAfterToPB called after default ToPB code
type LanguageWithBeforePatchSave ¶ added in v0.9.1
type LanguageWithBeforeToORM ¶
type LanguageWithBeforeToORM interface {
BeforeToORM(context.Context, *LanguageORM) error
}
LanguageBeforeToORM called before default ToORM code
type LanguageWithBeforeToPB ¶
LanguageBeforeToPB called before default ToPB code
type Task ¶
type Task struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` Priority int64 `protobuf:"varint,3,opt,name=priority" json:"priority,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func DefaultApplyFieldMaskTask ¶ added in v0.10.0
func DefaultApplyFieldMaskTask(ctx context.Context, patchee *Task, ormObj *TaskORM, patcher *Task, updateMask *field_mask1.FieldMask, prefix string, db *gorm1.DB) (*Task, error)
DefaultApplyFieldMaskTask patches an pbObject with patcher according to a field mask.
func DefaultCreateTask ¶
DefaultCreateTask executes a basic gorm create call
func DefaultListTask ¶
DefaultListTask executes a gorm list call
func (*Task) Descriptor ¶
func (*Task) GetDescription ¶
func (*Task) GetPriority ¶ added in v0.6.0
func (*Task) ProtoMessage ¶
func (*Task) ProtoMessage()
func (*Task) ToORM ¶
ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object
func (*Task) XXX_DiscardUnknown ¶ added in v0.6.0
func (m *Task) XXX_DiscardUnknown()
func (*Task) XXX_Marshal ¶ added in v0.6.0
func (*Task) XXX_Unmarshal ¶ added in v0.6.0
type TaskORM ¶
type TaskORM struct { AccountID string Description string Name string Priority int64 UserId string `gorm:"not null"` }
type TaskWithAfterToORM ¶
TaskAfterToORM called after default ToORM code
type TaskWithAfterToPB ¶
TaskAfterToPB called after default ToPB code
type TaskWithBeforeToORM ¶
TaskBeforeToORM called before default ToORM code
type TaskWithBeforeToPB ¶
TaskBeforeToPB called before default ToPB code
type User ¶
type User struct { Id *resource.Identifier `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` CreatedAt *timestamp.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt" json:"created_at,omitempty"` UpdatedAt *timestamp.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt" json:"updated_at,omitempty"` Birthday *timestamp.Timestamp `protobuf:"bytes,4,opt,name=birthday" json:"birthday,omitempty"` Age uint32 `protobuf:"varint,5,opt,name=age" json:"age,omitempty"` Num uint32 `protobuf:"varint,6,opt,name=num" json:"num,omitempty"` CreditCard *CreditCard `protobuf:"bytes,7,opt,name=credit_card,json=creditCard" json:"credit_card,omitempty"` Emails []*Email `protobuf:"bytes,8,rep,name=emails" json:"emails,omitempty"` Tasks []*Task `protobuf:"bytes,9,rep,name=tasks" json:"tasks,omitempty"` BillingAddress *Address `protobuf:"bytes,10,opt,name=billing_address,json=billingAddress" json:"billing_address,omitempty"` ShippingAddress *Address `protobuf:"bytes,11,opt,name=shipping_address,json=shippingAddress" json:"shipping_address,omitempty"` Languages []*Language `protobuf:"bytes,12,rep,name=languages" json:"languages,omitempty"` Friends []*User `protobuf:"bytes,13,rep,name=friends" json:"friends,omitempty"` ShippingAddressId *resource.Identifier `protobuf:"bytes,14,opt,name=shipping_address_id,json=shippingAddressId" json:"shipping_address_id,omitempty"` ExternalUuid *resource.Identifier `protobuf:"bytes,15,opt,name=external_uuid,json=externalUuid" json:"external_uuid,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func DefaultApplyFieldMaskUser ¶ added in v0.9.0
func DefaultApplyFieldMaskUser(ctx context.Context, patchee *User, ormObj *UserORM, patcher *User, updateMask *field_mask1.FieldMask, prefix string, db *gorm1.DB) (*User, error)
DefaultApplyFieldMaskUser patches an pbObject with patcher according to a field mask.
func DefaultCreateUser ¶
DefaultCreateUser executes a basic gorm create call
func DefaultListUser ¶
DefaultListUser executes a gorm list call
func DefaultPatchUser ¶ added in v0.9.0
func DefaultPatchUser(ctx context.Context, in *User, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*User, error)
DefaultPatchUser executes a basic gorm update call with patch behavior
func DefaultReadUser ¶
DefaultReadUser executes a basic gorm read call
func DefaultStrictUpdateUser ¶
DefaultStrictUpdateUser clears first level 1:many children and then executes a gorm update call
func DefaultUpdateUser ¶
DefaultUpdateUser executes a basic gorm update call
func (*User) Descriptor ¶
func (*User) GetBillingAddress ¶
func (*User) GetBirthday ¶
func (*User) GetCreatedAt ¶
func (*User) GetCreditCard ¶
func (m *User) GetCreditCard() *CreditCard
func (*User) GetExternalUuid ¶ added in v0.7.0
func (m *User) GetExternalUuid() *resource.Identifier
func (*User) GetFriends ¶
func (*User) GetId ¶
func (m *User) GetId() *resource.Identifier
func (*User) GetLanguages ¶
func (*User) GetShippingAddress ¶
func (*User) GetShippingAddressId ¶ added in v0.6.0
func (m *User) GetShippingAddressId() *resource.Identifier
func (*User) GetUpdatedAt ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ToORM ¶
ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object
func (*User) XXX_DiscardUnknown ¶ added in v0.6.0
func (m *User) XXX_DiscardUnknown()
func (*User) XXX_Marshal ¶ added in v0.6.0
func (*User) XXX_Unmarshal ¶ added in v0.6.0
type UserORM ¶
type UserORM struct { AccountID string BillingAddress *AddressORM `gorm:"foreignkey:BillingAddressId;association_foreignkey:Id"` BillingAddressId *int64 Birthday time.Time CreatedAt time.Time CreditCard *CreditCardORM `gorm:"foreignkey:UserId;association_foreignkey:Id"` Emails []*EmailORM `gorm:"foreignkey:UserId;association_foreignkey:Id"` ExternalUuid *string `gorm:"type:uuid"` Friends []*UserORM `` /* 141-byte string literal not displayed */ Id string `gorm:"type:uuid;primary_key"` Languages []*LanguageORM `` /* 145-byte string literal not displayed */ Num uint32 ShippingAddress *AddressORM `gorm:"foreignkey:ShippingAddressId;association_foreignkey:Id"` ShippingAddressId *int64 Tasks []*TaskORM `gorm:"foreignkey:UserId;association_foreignkey:Id"` UpdatedAt time.Time }
func (*UserORM) AfterToPB ¶
AfterToPB implements the posthook interface for the User type. This allows us to customize conversion behavior. In this example, we set the User's Age based on the Birthday, instead of storing it separately in the DB
type UserWithAfterToORM ¶
UserAfterToORM called after default ToORM code
type UserWithAfterToPB ¶
UserAfterToPB called after default ToPB code
type UserWithBeforePatchSave ¶ added in v0.9.1
type UserWithBeforeToORM ¶
UserBeforeToORM called before default ToORM code