Documentation ¶
Index ¶
- Variables
- func DefaultDeleteAddress(ctx context.Context, in *Address, db *gorm.DB) error
- func DefaultDeleteAddressSet(ctx context.Context, in []*Address, db *gorm.DB) error
- func DefaultDeleteCreditCard(ctx context.Context, in *CreditCard, db *gorm.DB) error
- func DefaultDeleteCreditCardSet(ctx context.Context, in []*CreditCard, db *gorm.DB) error
- func DefaultDeleteDepartment(ctx context.Context, in *Department, db *gorm.DB) error
- func DefaultDeleteEmail(ctx context.Context, in *Email, db *gorm.DB) error
- func DefaultDeleteEmailSet(ctx context.Context, in []*Email, db *gorm.DB) error
- func DefaultDeleteLanguage(ctx context.Context, in *Language, db *gorm.DB) error
- func DefaultDeleteLanguageSet(ctx context.Context, in []*Language, db *gorm.DB) error
- func DefaultDeleteTask(ctx context.Context, in *Task, db *gorm.DB) error
- func DefaultDeleteTaskSet(ctx context.Context, in []*Task, db *gorm.DB) error
- func DefaultDeleteUser(ctx context.Context, in *User, db *gorm.DB) error
- func DefaultDeleteUserSet(ctx context.Context, in []*User, db *gorm.DB) error
- type Address
- func DefaultApplyFieldMaskAddress(ctx context.Context, patchee *Address, patcher *Address, ...) (*Address, error)
- func DefaultCreateAddress(ctx context.Context, in *Address, db *gorm.DB) (*Address, error)
- func DefaultListAddress(ctx context.Context, db *gorm.DB) ([]*Address, error)
- func DefaultPatchAddress(ctx context.Context, in *Address, updateMask *field_mask.FieldMask, ...) (*Address, error)
- func DefaultPatchSetAddress(ctx context.Context, objects []*Address, updateMasks []*field_mask.FieldMask, ...) ([]*Address, error)
- func DefaultReadAddress(ctx context.Context, in *Address, db *gorm.DB) (*Address, error)
- func DefaultStrictUpdateAddress(ctx context.Context, in *Address, db *gorm.DB) (*Address, error)
- func (*Address) Descriptor() ([]byte, []int)deprecated
- func (x *Address) GetAddress_1() string
- func (x *Address) GetAddress_2() string
- func (x *Address) GetExternal() *resource.Identifier
- func (x *Address) GetId() *resource.Identifier
- func (x *Address) GetImplicitFk() *resource.Identifier
- func (x *Address) GetPost() string
- func (*Address) ProtoMessage()
- func (x *Address) ProtoReflect() protoreflect.Message
- func (x *Address) Reset()
- func (x *Address) String() string
- func (m *Address) ToORM(ctx context.Context) (AddressORM, error)
- type AddressORM
- type AddressORMWithAfterCreate_
- type AddressORMWithAfterDeleteSet
- type AddressORMWithAfterDelete_
- type AddressORMWithAfterListFind
- type AddressORMWithAfterReadFind
- type AddressORMWithAfterStrictUpdateSave
- type AddressORMWithBeforeCreate_
- type AddressORMWithBeforeDeleteSet
- type AddressORMWithBeforeDelete_
- type AddressORMWithBeforeListApplyQuery
- type AddressORMWithBeforeListFind
- type AddressORMWithBeforeReadApplyQuery
- type AddressORMWithBeforeReadFind
- type AddressORMWithBeforeStrictUpdateCleanup
- type AddressORMWithBeforeStrictUpdateSave
- type AddressWithAfterPatchSave
- type AddressWithAfterToORM
- type AddressWithAfterToPB
- type AddressWithBeforePatchApplyFieldMask
- type AddressWithBeforePatchRead
- type AddressWithBeforePatchSave
- type AddressWithBeforeToORM
- type AddressWithBeforeToPB
- type CreditCard
- func DefaultApplyFieldMaskCreditCard(ctx context.Context, patchee *CreditCard, patcher *CreditCard, ...) (*CreditCard, error)
- func DefaultCreateCreditCard(ctx context.Context, in *CreditCard, db *gorm.DB) (*CreditCard, error)
- func DefaultListCreditCard(ctx context.Context, db *gorm.DB) ([]*CreditCard, error)
- func DefaultPatchCreditCard(ctx context.Context, in *CreditCard, updateMask *field_mask.FieldMask, ...) (*CreditCard, error)
- func DefaultPatchSetCreditCard(ctx context.Context, objects []*CreditCard, ...) ([]*CreditCard, error)
- func DefaultReadCreditCard(ctx context.Context, in *CreditCard, db *gorm.DB) (*CreditCard, error)
- func DefaultStrictUpdateCreditCard(ctx context.Context, in *CreditCard, db *gorm.DB) (*CreditCard, error)
- func (*CreditCard) Descriptor() ([]byte, []int)deprecated
- func (x *CreditCard) GetCreatedAt() *timestamppb.Timestamp
- func (x *CreditCard) GetId() *resource.Identifier
- func (x *CreditCard) GetNumber() string
- func (x *CreditCard) GetUpdatedAt() *timestamppb.Timestamp
- func (x *CreditCard) GetUserId() *resource.Identifier
- func (*CreditCard) ProtoMessage()
- func (x *CreditCard) ProtoReflect() protoreflect.Message
- func (x *CreditCard) Reset()
- func (x *CreditCard) String() string
- func (m *CreditCard) ToORM(ctx context.Context) (CreditCardORM, error)
- type CreditCardORM
- type CreditCardORMWithAfterCreate_
- type CreditCardORMWithAfterDeleteSet
- type CreditCardORMWithAfterDelete_
- type CreditCardORMWithAfterListFind
- type CreditCardORMWithAfterReadFind
- type CreditCardORMWithAfterStrictUpdateSave
- type CreditCardORMWithBeforeCreate_
- type CreditCardORMWithBeforeDeleteSet
- type CreditCardORMWithBeforeDelete_
- type CreditCardORMWithBeforeListApplyQuery
- type CreditCardORMWithBeforeListFind
- type CreditCardORMWithBeforeReadApplyQuery
- type CreditCardORMWithBeforeReadFind
- type CreditCardORMWithBeforeStrictUpdateCleanup
- type CreditCardORMWithBeforeStrictUpdateSave
- type CreditCardWithAfterPatchSave
- type CreditCardWithAfterToORM
- type CreditCardWithAfterToPB
- type CreditCardWithBeforePatchApplyFieldMask
- type CreditCardWithBeforePatchRead
- type CreditCardWithBeforePatchSave
- type CreditCardWithBeforeToORM
- type CreditCardWithBeforeToPB
- type Department
- func DefaultApplyFieldMaskDepartment(ctx context.Context, patchee *Department, patcher *Department, ...) (*Department, error)
- func DefaultCreateDepartment(ctx context.Context, in *Department, db *gorm.DB) (*Department, error)
- func DefaultListDepartment(ctx context.Context, db *gorm.DB) ([]*Department, error)
- func DefaultReadDepartment(ctx context.Context, in *Department, db *gorm.DB) (*Department, error)
- func (*Department) Descriptor() ([]byte, []int)deprecated
- func (x *Department) GetId() int64
- func (x *Department) GetName() string
- func (*Department) ProtoMessage()
- func (x *Department) ProtoReflect() protoreflect.Message
- func (x *Department) Reset()
- func (x *Department) String() string
- func (m *Department) ToORM(ctx context.Context) (DepartmentORM, error)
- type DepartmentORM
- type DepartmentORMWithAfterCreate_
- type DepartmentORMWithAfterDelete_
- type DepartmentORMWithAfterListFind
- type DepartmentORMWithAfterReadFind
- type DepartmentORMWithBeforeCreate_
- type DepartmentORMWithBeforeDelete_
- type DepartmentORMWithBeforeListApplyQuery
- type DepartmentORMWithBeforeListFind
- type DepartmentORMWithBeforeReadApplyQuery
- type DepartmentORMWithBeforeReadFind
- type DepartmentWithAfterToORM
- type DepartmentWithAfterToPB
- type DepartmentWithBeforeToORM
- type DepartmentWithBeforeToPB
- type Email
- func DefaultApplyFieldMaskEmail(ctx context.Context, patchee *Email, patcher *Email, ...) (*Email, error)
- func DefaultCreateEmail(ctx context.Context, in *Email, db *gorm.DB) (*Email, error)
- func DefaultListEmail(ctx context.Context, db *gorm.DB) ([]*Email, error)
- func DefaultPatchEmail(ctx context.Context, in *Email, updateMask *field_mask.FieldMask, db *gorm.DB) (*Email, error)
- func DefaultPatchSetEmail(ctx context.Context, objects []*Email, updateMasks []*field_mask.FieldMask, ...) ([]*Email, error)
- func DefaultReadEmail(ctx context.Context, in *Email, db *gorm.DB) (*Email, error)
- func DefaultStrictUpdateEmail(ctx context.Context, in *Email, db *gorm.DB) (*Email, error)
- func (*Email) Descriptor() ([]byte, []int)deprecated
- func (x *Email) GetEmail() string
- func (x *Email) GetExternalNotNull() *resource.Identifier
- func (x *Email) GetId() *resource.Identifier
- func (x *Email) GetSubscribed() bool
- func (x *Email) GetUserId() *resource.Identifier
- func (*Email) ProtoMessage()
- func (x *Email) ProtoReflect() protoreflect.Message
- func (x *Email) Reset()
- func (x *Email) String() string
- func (m *Email) ToORM(ctx context.Context) (EmailORM, error)
- type EmailORM
- type EmailORMWithAfterCreate_
- type EmailORMWithAfterDeleteSet
- type EmailORMWithAfterDelete_
- type EmailORMWithAfterListFind
- type EmailORMWithAfterReadFind
- type EmailORMWithAfterStrictUpdateSave
- type EmailORMWithBeforeCreate_
- type EmailORMWithBeforeDeleteSet
- type EmailORMWithBeforeDelete_
- type EmailORMWithBeforeListApplyQuery
- type EmailORMWithBeforeListFind
- type EmailORMWithBeforeReadApplyQuery
- type EmailORMWithBeforeReadFind
- type EmailORMWithBeforeStrictUpdateCleanup
- type EmailORMWithBeforeStrictUpdateSave
- type EmailWithAfterPatchSave
- type EmailWithAfterToORM
- type EmailWithAfterToPB
- type EmailWithBeforePatchApplyFieldMask
- type EmailWithBeforePatchRead
- type EmailWithBeforePatchSave
- type EmailWithBeforeToORM
- type EmailWithBeforeToPB
- type Language
- func DefaultApplyFieldMaskLanguage(ctx context.Context, patchee *Language, patcher *Language, ...) (*Language, error)
- func DefaultCreateLanguage(ctx context.Context, in *Language, db *gorm.DB) (*Language, error)
- func DefaultListLanguage(ctx context.Context, db *gorm.DB) ([]*Language, error)
- func DefaultPatchLanguage(ctx context.Context, in *Language, updateMask *field_mask.FieldMask, ...) (*Language, error)
- func DefaultPatchSetLanguage(ctx context.Context, objects []*Language, updateMasks []*field_mask.FieldMask, ...) ([]*Language, error)
- func DefaultReadLanguage(ctx context.Context, in *Language, db *gorm.DB) (*Language, error)
- func DefaultStrictUpdateLanguage(ctx context.Context, in *Language, db *gorm.DB) (*Language, error)
- func (*Language) Descriptor() ([]byte, []int)deprecated
- func (x *Language) GetCode() string
- func (x *Language) GetExternalInt() *resource.Identifier
- func (x *Language) GetId() *resource.Identifier
- func (x *Language) GetName() string
- func (*Language) ProtoMessage()
- func (x *Language) ProtoReflect() protoreflect.Message
- func (x *Language) Reset()
- func (x *Language) String() string
- func (m *Language) ToORM(ctx context.Context) (LanguageORM, error)
- type LanguageORM
- type LanguageORMWithAfterCreate_
- type LanguageORMWithAfterDeleteSet
- type LanguageORMWithAfterDelete_
- type LanguageORMWithAfterListFind
- type LanguageORMWithAfterReadFind
- type LanguageORMWithAfterStrictUpdateSave
- type LanguageORMWithBeforeCreate_
- type LanguageORMWithBeforeDeleteSet
- type LanguageORMWithBeforeDelete_
- type LanguageORMWithBeforeListApplyQuery
- type LanguageORMWithBeforeListFind
- type LanguageORMWithBeforeReadApplyQuery
- type LanguageORMWithBeforeReadFind
- type LanguageORMWithBeforeStrictUpdateCleanup
- type LanguageORMWithBeforeStrictUpdateSave
- type LanguageWithAfterPatchSave
- type LanguageWithAfterToORM
- type LanguageWithAfterToPB
- type LanguageWithBeforePatchApplyFieldMask
- type LanguageWithBeforePatchRead
- type LanguageWithBeforePatchSave
- type LanguageWithBeforeToORM
- type LanguageWithBeforeToPB
- type Task
- func DefaultApplyFieldMaskTask(ctx context.Context, patchee *Task, patcher *Task, ...) (*Task, error)
- func DefaultCreateTask(ctx context.Context, in *Task, db *gorm.DB) (*Task, error)
- func DefaultListTask(ctx context.Context, db *gorm.DB) ([]*Task, error)
- func DefaultPatchSetTask(ctx context.Context, objects []*Task, updateMasks []*field_mask.FieldMask, ...) ([]*Task, error)
- func DefaultPatchTask(ctx context.Context, in *Task, updateMask *field_mask.FieldMask, db *gorm.DB) (*Task, error)
- func DefaultReadTask(ctx context.Context, in *Task, db *gorm.DB) (*Task, error)
- func DefaultStrictUpdateTask(ctx context.Context, in *Task, db *gorm.DB) (*Task, error)
- func (*Task) Descriptor() ([]byte, []int)deprecated
- func (x *Task) GetDescription() string
- func (x *Task) GetId() string
- func (x *Task) GetName() string
- func (x *Task) GetPriority() int64
- func (*Task) ProtoMessage()
- func (x *Task) ProtoReflect() protoreflect.Message
- func (x *Task) Reset()
- func (x *Task) String() string
- func (m *Task) ToORM(ctx context.Context) (TaskORM, error)
- type TaskORM
- type TaskORMWithAfterCreate_
- type TaskORMWithAfterDeleteSet
- type TaskORMWithAfterDelete_
- type TaskORMWithAfterListFind
- type TaskORMWithAfterReadFind
- type TaskORMWithAfterStrictUpdateSave
- type TaskORMWithBeforeCreate_
- type TaskORMWithBeforeDeleteSet
- type TaskORMWithBeforeDelete_
- type TaskORMWithBeforeListApplyQuery
- type TaskORMWithBeforeListFind
- type TaskORMWithBeforeReadApplyQuery
- type TaskORMWithBeforeReadFind
- type TaskORMWithBeforeStrictUpdateCleanup
- type TaskORMWithBeforeStrictUpdateSave
- type TaskWithAfterPatchSave
- type TaskWithAfterToORM
- type TaskWithAfterToPB
- type TaskWithBeforePatchApplyFieldMask
- type TaskWithBeforePatchRead
- type TaskWithBeforePatchSave
- type TaskWithBeforeToORM
- type TaskWithBeforeToPB
- type User
- func DefaultApplyFieldMaskUser(ctx context.Context, patchee *User, patcher *User, ...) (*User, error)
- func DefaultCreateUser(ctx context.Context, in *User, db *gorm.DB) (*User, error)
- func DefaultListUser(ctx context.Context, db *gorm.DB) ([]*User, error)
- func DefaultPatchSetUser(ctx context.Context, objects []*User, updateMasks []*field_mask.FieldMask, ...) ([]*User, error)
- func DefaultPatchUser(ctx context.Context, in *User, updateMask *field_mask.FieldMask, db *gorm.DB) (*User, error)
- func DefaultReadUser(ctx context.Context, in *User, db *gorm.DB) (*User, error)
- func DefaultStrictUpdateUser(ctx context.Context, in *User, db *gorm.DB) (*User, error)
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAge() uint32
- func (x *User) GetBillingAddress() *Address
- func (x *User) GetBirthday() *timestamppb.Timestamp
- func (x *User) GetCreatedAt() *timestamppb.Timestamp
- func (x *User) GetCreditCard() *CreditCard
- func (x *User) GetDepartment() *Department
- func (x *User) GetEmails() []*Email
- func (x *User) GetExternalUuid() *resource.Identifier
- func (x *User) GetFriends() []*User
- func (x *User) GetId() *resource.Identifier
- func (x *User) GetLanguages() []*Language
- func (x *User) GetNum() uint32
- func (x *User) GetShippingAddress() *Address
- func (x *User) GetShippingAddressId() *resource.Identifier
- func (x *User) GetTasks() []*Task
- func (x *User) GetUpdatedAt() *timestamppb.Timestamp
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- func (m *User) ToORM(ctx context.Context) (UserORM, error)
- type UserORM
- type UserORMWithAfterCreate_
- type UserORMWithAfterDeleteSet
- type UserORMWithAfterDelete_
- type UserORMWithAfterListFind
- type UserORMWithAfterReadFind
- type UserORMWithAfterStrictUpdateSave
- type UserORMWithBeforeCreate_
- type UserORMWithBeforeDeleteSet
- type UserORMWithBeforeDelete_
- type UserORMWithBeforeListApplyQuery
- type UserORMWithBeforeListFind
- type UserORMWithBeforeReadApplyQuery
- type UserORMWithBeforeReadFind
- type UserORMWithBeforeStrictUpdateCleanup
- type UserORMWithBeforeStrictUpdateSave
- type UserWithAfterPatchSave
- type UserWithAfterToORM
- type UserWithAfterToPB
- type UserWithBeforePatchApplyFieldMask
- type UserWithBeforePatchRead
- type UserWithBeforePatchSave
- type UserWithBeforeToORM
- type UserWithBeforeToPB
Constants ¶
This section is empty.
Variables ¶
var File_user_user_proto protoreflect.FileDescriptor
Functions ¶
func DefaultDeleteAddress ¶
func DefaultDeleteAddressSet ¶
func DefaultDeleteCreditCard ¶
func DefaultDeleteDepartment ¶ added in v1.2.0
func DefaultDeleteEmail ¶
func DefaultDeleteEmailSet ¶
func DefaultDeleteLanguage ¶
func DefaultDeleteTask ¶ added in v1.2.0
func DefaultDeleteTaskSet ¶ added in v1.2.0
Types ¶
type Address ¶
type Address struct { Id *resource.Identifier `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Address_1 string `protobuf:"bytes,2,opt,name=address_1,json=address1,proto3" json:"address_1,omitempty"` Address_2 *string `protobuf:"bytes,3,opt,name=address_2,json=address2,proto3,oneof" json:"address_2,omitempty"` Post string `protobuf:"bytes,4,opt,name=post,proto3" json:"post,omitempty"` External *resource.Identifier `protobuf:"bytes,5,opt,name=external,proto3" json:"external,omitempty"` ImplicitFk *resource.Identifier `protobuf:"bytes,6,opt,name=implicit_fk,json=implicitFk,proto3" json:"implicit_fk,omitempty"` // contains filtered or unexported fields }
func DefaultApplyFieldMaskAddress ¶
func DefaultApplyFieldMaskAddress(ctx context.Context, patchee *Address, patcher *Address, updateMask *field_mask.FieldMask, prefix string, db *gorm.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 ¶
func DefaultPatchAddress(ctx context.Context, in *Address, updateMask *field_mask.FieldMask, db *gorm.DB) (*Address, error)
DefaultPatchAddress executes a basic gorm update call with patch behavior
func DefaultPatchSetAddress ¶
func DefaultPatchSetAddress(ctx context.Context, objects []*Address, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Address, error)
DefaultPatchSetAddress executes a bulk gorm update call with patch behavior
func DefaultReadAddress ¶
func DefaultStrictUpdateAddress ¶
DefaultStrictUpdateAddress clears / replaces / appends first level 1:many children and then executes a gorm update call
func (*Address) Descriptor
deprecated
func (*Address) GetAddress_1 ¶
func (*Address) GetAddress_2 ¶
func (*Address) GetExternal ¶
func (x *Address) GetExternal() *resource.Identifier
func (*Address) GetId ¶
func (x *Address) GetId() *resource.Identifier
func (*Address) GetImplicitFk ¶
func (x *Address) GetImplicitFk() *resource.Identifier
func (*Address) ProtoMessage ¶
func (*Address) ProtoMessage()
func (*Address) ProtoReflect ¶
func (x *Address) ProtoReflect() protoreflect.Message
type AddressORM ¶
type AddressORM struct { AccountID string Address_1 string Address_2 *string External []byte `gorm:"type:jsonb"` Id int64 `gorm:"type:integer;primaryKey"` ImplicitFk *string `gorm:"type:text"` Post string }
func (AddressORM) TableName ¶
func (AddressORM) TableName() string
TableName overrides the default tablename generated by GORM
func (*AddressORM) ToPB ¶
func (m *AddressORM) ToPB(ctx context.Context) (Address, 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
func (*AddressORM) ToPBWrapper ¶ added in v1.2.0
func (m *AddressORM) ToPBWrapper(ctx context.Context) (protoreflect.ProtoMessage, error)
ToPBWrapper wraps ToPB function and uses proto.Message return value for further interface usage down the stream
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 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,proto3" json:"id,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` Number string `protobuf:"bytes,4,opt,name=number,proto3" json:"number,omitempty"` UserId *resource.Identifier `protobuf:"bytes,5,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func DefaultApplyFieldMaskCreditCard ¶
func DefaultApplyFieldMaskCreditCard(ctx context.Context, patchee *CreditCard, patcher *CreditCard, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*CreditCard, error)
DefaultApplyFieldMaskCreditCard patches an pbObject with patcher according to a field mask.
func DefaultCreateCreditCard ¶
func DefaultCreateCreditCard(ctx context.Context, in *CreditCard, db *gorm.DB) (*CreditCard, error)
DefaultCreateCreditCard executes a basic gorm create call
func DefaultListCreditCard ¶
DefaultListCreditCard executes a gorm list call
func DefaultPatchCreditCard ¶
func DefaultPatchCreditCard(ctx context.Context, in *CreditCard, updateMask *field_mask.FieldMask, db *gorm.DB) (*CreditCard, error)
DefaultPatchCreditCard executes a basic gorm update call with patch behavior
func DefaultPatchSetCreditCard ¶
func DefaultPatchSetCreditCard(ctx context.Context, objects []*CreditCard, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*CreditCard, error)
DefaultPatchSetCreditCard executes a bulk gorm update call with patch behavior
func DefaultReadCreditCard ¶
func DefaultReadCreditCard(ctx context.Context, in *CreditCard, db *gorm.DB) (*CreditCard, error)
func DefaultStrictUpdateCreditCard ¶
func DefaultStrictUpdateCreditCard(ctx context.Context, in *CreditCard, db *gorm.DB) (*CreditCard, error)
DefaultStrictUpdateCreditCard clears / replaces / appends first level 1:many children and then executes a gorm update call
func (*CreditCard) Descriptor
deprecated
func (*CreditCard) Descriptor() ([]byte, []int)
Deprecated: Use CreditCard.ProtoReflect.Descriptor instead.
func (*CreditCard) GetCreatedAt ¶
func (x *CreditCard) GetCreatedAt() *timestamppb.Timestamp
func (*CreditCard) GetId ¶
func (x *CreditCard) GetId() *resource.Identifier
func (*CreditCard) GetNumber ¶
func (x *CreditCard) GetNumber() string
func (*CreditCard) GetUpdatedAt ¶
func (x *CreditCard) GetUpdatedAt() *timestamppb.Timestamp
func (*CreditCard) GetUserId ¶
func (x *CreditCard) GetUserId() *resource.Identifier
func (*CreditCard) ProtoMessage ¶
func (*CreditCard) ProtoMessage()
func (*CreditCard) ProtoReflect ¶
func (x *CreditCard) ProtoReflect() protoreflect.Message
func (*CreditCard) Reset ¶
func (x *CreditCard) Reset()
func (*CreditCard) String ¶
func (x *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
type CreditCardORM ¶
type CreditCardORM struct { AccountID string CreatedAt *time.Time Id int64 `gorm:"type:integer;primaryKey"` 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
func (*CreditCardORM) ToPBWrapper ¶ added in v1.2.0
func (m *CreditCardORM) ToPBWrapper(ctx context.Context) (protoreflect.ProtoMessage, error)
ToPBWrapper wraps ToPB function and uses proto.Message return value for further interface usage down the stream
type CreditCardWithAfterPatchSave ¶
type CreditCardWithAfterPatchSave interface {
AfterPatchSave(context.Context, *CreditCard, *field_mask.FieldMask, *gorm.DB) error
}
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 CreditCardWithBeforePatchApplyFieldMask ¶
type CreditCardWithBeforePatchApplyFieldMask interface {
BeforePatchApplyFieldMask(context.Context, *CreditCard, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}
type CreditCardWithBeforePatchRead ¶
type CreditCardWithBeforePatchRead interface {
BeforePatchRead(context.Context, *CreditCard, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}
type CreditCardWithBeforePatchSave ¶
type CreditCardWithBeforePatchSave interface {
BeforePatchSave(context.Context, *CreditCard, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}
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 Department ¶ added in v1.2.0
type Department struct { // department name and id are composite primary keys Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
Department added example for composite primary keys
func DefaultApplyFieldMaskDepartment ¶ added in v1.2.0
func DefaultApplyFieldMaskDepartment(ctx context.Context, patchee *Department, patcher *Department, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*Department, error)
DefaultApplyFieldMaskDepartment patches an pbObject with patcher according to a field mask.
func DefaultCreateDepartment ¶ added in v1.2.0
func DefaultCreateDepartment(ctx context.Context, in *Department, db *gorm.DB) (*Department, error)
DefaultCreateDepartment executes a basic gorm create call
func DefaultListDepartment ¶ added in v1.2.0
DefaultListDepartment executes a gorm list call
func DefaultReadDepartment ¶ added in v1.2.0
func DefaultReadDepartment(ctx context.Context, in *Department, db *gorm.DB) (*Department, error)
func (*Department) Descriptor
deprecated
added in
v1.2.0
func (*Department) Descriptor() ([]byte, []int)
Deprecated: Use Department.ProtoReflect.Descriptor instead.
func (*Department) GetId ¶ added in v1.2.0
func (x *Department) GetId() int64
func (*Department) GetName ¶ added in v1.2.0
func (x *Department) GetName() string
func (*Department) ProtoMessage ¶ added in v1.2.0
func (*Department) ProtoMessage()
func (*Department) ProtoReflect ¶ added in v1.2.0
func (x *Department) ProtoReflect() protoreflect.Message
func (*Department) Reset ¶ added in v1.2.0
func (x *Department) Reset()
func (*Department) String ¶ added in v1.2.0
func (x *Department) String() string
func (*Department) ToORM ¶ added in v1.2.0
func (m *Department) ToORM(ctx context.Context) (DepartmentORM, 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
type DepartmentORM ¶ added in v1.2.0
type DepartmentORM struct { Id int64 `gorm:"primaryKey"` Name string `gorm:"primaryKey"` UserId *string }
func (DepartmentORM) TableName ¶ added in v1.2.0
func (DepartmentORM) TableName() string
TableName overrides the default tablename generated by GORM
func (*DepartmentORM) ToPB ¶ added in v1.2.0
func (m *DepartmentORM) ToPB(ctx context.Context) (Department, 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
func (*DepartmentORM) ToPBWrapper ¶ added in v1.2.0
func (m *DepartmentORM) ToPBWrapper(ctx context.Context) (protoreflect.ProtoMessage, error)
ToPBWrapper wraps ToPB function and uses proto.Message return value for further interface usage down the stream
type DepartmentORMWithAfterCreate_ ¶ added in v1.2.0
type DepartmentORMWithAfterDelete_ ¶ added in v1.2.0
type DepartmentORMWithAfterListFind ¶ added in v1.2.0
type DepartmentORMWithAfterReadFind ¶ added in v1.2.0
type DepartmentORMWithBeforeCreate_ ¶ added in v1.2.0
type DepartmentORMWithBeforeDelete_ ¶ added in v1.2.0
type DepartmentORMWithBeforeListApplyQuery ¶ added in v1.2.0
type DepartmentORMWithBeforeListFind ¶ added in v1.2.0
type DepartmentORMWithBeforeReadApplyQuery ¶ added in v1.2.0
type DepartmentORMWithBeforeReadFind ¶ added in v1.2.0
type DepartmentWithAfterToORM ¶ added in v1.2.0
type DepartmentWithAfterToORM interface {
AfterToORM(context.Context, *DepartmentORM) error
}
DepartmentAfterToORM called after default ToORM code
type DepartmentWithAfterToPB ¶ added in v1.2.0
type DepartmentWithAfterToPB interface {
AfterToPB(context.Context, *Department) error
}
DepartmentAfterToPB called after default ToPB code
type DepartmentWithBeforeToORM ¶ added in v1.2.0
type DepartmentWithBeforeToORM interface {
BeforeToORM(context.Context, *DepartmentORM) error
}
DepartmentBeforeToORM called before default ToORM code
type DepartmentWithBeforeToPB ¶ added in v1.2.0
type DepartmentWithBeforeToPB interface {
BeforeToPB(context.Context, *Department) error
}
DepartmentBeforeToPB called before default ToPB code
type Email ¶
type Email struct { Id *resource.Identifier `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Subscribed bool `protobuf:"varint,3,opt,name=subscribed,proto3" json:"subscribed,omitempty"` UserId *resource.Identifier `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` ExternalNotNull *resource.Identifier `protobuf:"bytes,5,opt,name=external_not_null,json=externalNotNull,proto3" json:"external_not_null,omitempty"` // contains filtered or unexported fields }
func DefaultApplyFieldMaskEmail ¶
func DefaultApplyFieldMaskEmail(ctx context.Context, patchee *Email, patcher *Email, updateMask *field_mask.FieldMask, prefix string, db *gorm.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 ¶
func DefaultPatchEmail(ctx context.Context, in *Email, updateMask *field_mask.FieldMask, db *gorm.DB) (*Email, error)
DefaultPatchEmail executes a basic gorm update call with patch behavior
func DefaultPatchSetEmail ¶
func DefaultPatchSetEmail(ctx context.Context, objects []*Email, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Email, error)
DefaultPatchSetEmail executes a bulk gorm update call with patch behavior
func DefaultReadEmail ¶
func DefaultStrictUpdateEmail ¶
DefaultStrictUpdateEmail clears / replaces / appends first level 1:many children and then executes a gorm update call
func (*Email) Descriptor
deprecated
func (*Email) GetExternalNotNull ¶
func (x *Email) GetExternalNotNull() *resource.Identifier
func (*Email) GetId ¶
func (x *Email) GetId() *resource.Identifier
func (*Email) GetSubscribed ¶
func (*Email) GetUserId ¶
func (x *Email) GetUserId() *resource.Identifier
func (*Email) ProtoMessage ¶
func (*Email) ProtoMessage()
func (*Email) ProtoReflect ¶
func (x *Email) ProtoReflect() protoreflect.Message
type EmailORM ¶
type EmailORM struct { AccountID string Email string ExternalNotNull string `gorm:"type:uuid;not null"` Id string `gorm:"type:uuid;primaryKey"` Subscribed bool UserId *string }
func (*EmailORM) ToPB ¶
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
func (*EmailORM) ToPBWrapper ¶ added in v1.2.0
func (m *EmailORM) ToPBWrapper(ctx context.Context) (protoreflect.ProtoMessage, error)
ToPBWrapper wraps ToPB function and uses proto.Message return value for further interface usage down the stream
type EmailWithAfterPatchSave ¶
type EmailWithAfterToORM ¶
EmailAfterToORM called after default ToORM code
type EmailWithAfterToPB ¶
EmailAfterToPB called after default ToPB code
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,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` ExternalInt *resource.Identifier `protobuf:"bytes,4,opt,name=external_int,json=externalInt,proto3" json:"external_int,omitempty"` // contains filtered or unexported fields }
func DefaultApplyFieldMaskLanguage ¶
func DefaultApplyFieldMaskLanguage(ctx context.Context, patchee *Language, patcher *Language, updateMask *field_mask.FieldMask, prefix string, db *gorm.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 ¶
func DefaultPatchLanguage(ctx context.Context, in *Language, updateMask *field_mask.FieldMask, db *gorm.DB) (*Language, error)
DefaultPatchLanguage executes a basic gorm update call with patch behavior
func DefaultPatchSetLanguage ¶
func DefaultPatchSetLanguage(ctx context.Context, objects []*Language, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Language, error)
DefaultPatchSetLanguage executes a bulk gorm update call with patch behavior
func DefaultReadLanguage ¶
func DefaultStrictUpdateLanguage ¶
DefaultStrictUpdateLanguage clears / replaces / appends first level 1:many children and then executes a gorm update call
func (*Language) Descriptor
deprecated
func (*Language) GetExternalInt ¶
func (x *Language) GetExternalInt() *resource.Identifier
func (*Language) GetId ¶
func (x *Language) GetId() *resource.Identifier
func (*Language) ProtoMessage ¶
func (*Language) ProtoMessage()
func (*Language) ProtoReflect ¶
func (x *Language) ProtoReflect() protoreflect.Message
type LanguageORM ¶
type LanguageORM struct { AccountID string Code string ExternalInt *int64 `gorm:"type:integer"` Id int64 `gorm:"type:integer;primaryKey"` Name string }
func (LanguageORM) TableName ¶
func (LanguageORM) TableName() string
TableName overrides the default tablename generated by GORM
func (*LanguageORM) ToPB ¶
func (m *LanguageORM) ToPB(ctx context.Context) (Language, 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
func (*LanguageORM) ToPBWrapper ¶ added in v1.2.0
func (m *LanguageORM) ToPBWrapper(ctx context.Context) (protoreflect.ProtoMessage, error)
ToPBWrapper wraps ToPB function and uses proto.Message return value for further interface usage down the stream
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 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,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` Priority int64 `protobuf:"varint,3,opt,name=priority,proto3" json:"priority,omitempty"` Id *string `protobuf:"bytes,4,opt,name=id,proto3,oneof" json:"id,omitempty"` // contains filtered or unexported fields }
func DefaultApplyFieldMaskTask ¶
func DefaultApplyFieldMaskTask(ctx context.Context, patchee *Task, patcher *Task, updateMask *field_mask.FieldMask, prefix string, db *gorm.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 DefaultPatchSetTask ¶ added in v1.2.0
func DefaultPatchSetTask(ctx context.Context, objects []*Task, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Task, error)
DefaultPatchSetTask executes a bulk gorm update call with patch behavior
func DefaultPatchTask ¶ added in v1.2.0
func DefaultPatchTask(ctx context.Context, in *Task, updateMask *field_mask.FieldMask, db *gorm.DB) (*Task, error)
DefaultPatchTask executes a basic gorm update call with patch behavior
func DefaultReadTask ¶ added in v1.2.0
func DefaultStrictUpdateTask ¶ added in v1.2.0
DefaultStrictUpdateTask clears / replaces / appends first level 1:many children and then executes a gorm update call
func (*Task) Descriptor
deprecated
func (*Task) GetDescription ¶
func (*Task) GetPriority ¶
func (*Task) ProtoMessage ¶
func (*Task) ProtoMessage()
func (*Task) ProtoReflect ¶
func (x *Task) ProtoReflect() protoreflect.Message
type TaskORM ¶
type TaskORM struct { AccountID string Description string Id *string Name string Priority int64 UserId string `gorm:"not null"` }
func (*TaskORM) ToPB ¶
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
func (*TaskORM) ToPBWrapper ¶ added in v1.2.0
func (m *TaskORM) ToPBWrapper(ctx context.Context) (protoreflect.ProtoMessage, error)
ToPBWrapper wraps ToPB function and uses proto.Message return value for further interface usage down the stream
type TaskORMWithAfterCreate_ ¶
type TaskORMWithAfterDeleteSet ¶ added in v1.2.0
type TaskORMWithAfterDelete_ ¶ added in v1.2.0
type TaskORMWithAfterReadFind ¶ added in v1.2.0
type TaskORMWithAfterStrictUpdateSave ¶ added in v1.2.0
type TaskORMWithBeforeDeleteSet ¶ added in v1.2.0
type TaskORMWithBeforeDelete_ ¶ added in v1.2.0
type TaskORMWithBeforeReadApplyQuery ¶ added in v1.2.0
type TaskORMWithBeforeReadFind ¶ added in v1.2.0
type TaskORMWithBeforeStrictUpdateCleanup ¶ added in v1.2.0
type TaskORMWithBeforeStrictUpdateSave ¶ added in v1.2.0
type TaskWithAfterPatchSave ¶ added in v1.2.0
type TaskWithAfterToORM ¶
TaskAfterToORM called after default ToORM code
type TaskWithAfterToPB ¶
TaskAfterToPB called after default ToPB code
type TaskWithBeforePatchApplyFieldMask ¶ added in v1.2.0
type TaskWithBeforePatchRead ¶ added in v1.2.0
type TaskWithBeforePatchSave ¶ added in v1.2.0
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,proto3" json:"id,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` Birthday *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=birthday,proto3" json:"birthday,omitempty"` Age uint32 `protobuf:"varint,5,opt,name=age,proto3" json:"age,omitempty"` // synthetic field Num uint32 `protobuf:"varint,6,opt,name=num,proto3" json:"num,omitempty"` CreditCard *CreditCard `protobuf:"bytes,7,opt,name=credit_card,json=creditCard,proto3" json:"credit_card,omitempty"` // has one Emails []*Email `protobuf:"bytes,8,rep,name=emails,proto3" json:"emails,omitempty"` // has many Tasks []*Task `protobuf:"bytes,9,rep,name=tasks,proto3" json:"tasks,omitempty"` BillingAddress *Address `protobuf:"bytes,10,opt,name=billing_address,json=billingAddress,proto3" json:"billing_address,omitempty"` ShippingAddress *Address `protobuf:"bytes,11,opt,name=shipping_address,json=shippingAddress,proto3" json:"shipping_address,omitempty"` Languages []*Language `protobuf:"bytes,12,rep,name=languages,proto3" json:"languages,omitempty"` Friends []*User `protobuf:"bytes,13,rep,name=friends,proto3" json:"friends,omitempty"` ShippingAddressId *resource.Identifier `protobuf:"bytes,14,opt,name=shipping_address_id,json=shippingAddressId,proto3" json:"shipping_address_id,omitempty"` ExternalUuid *resource.Identifier `protobuf:"bytes,15,opt,name=external_uuid,json=externalUuid,proto3" json:"external_uuid,omitempty"` Department *Department `protobuf:"bytes,16,opt,name=department,proto3" json:"department,omitempty"` // contains filtered or unexported fields }
func DefaultApplyFieldMaskUser ¶
func DefaultApplyFieldMaskUser(ctx context.Context, patchee *User, patcher *User, updateMask *field_mask.FieldMask, prefix string, db *gorm.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 DefaultPatchSetUser ¶
func DefaultPatchSetUser(ctx context.Context, objects []*User, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*User, error)
DefaultPatchSetUser executes a bulk gorm update call with patch behavior
func DefaultPatchUser ¶
func DefaultPatchUser(ctx context.Context, in *User, updateMask *field_mask.FieldMask, db *gorm.DB) (*User, error)
DefaultPatchUser executes a basic gorm update call with patch behavior
func DefaultReadUser ¶
func DefaultStrictUpdateUser ¶
DefaultStrictUpdateUser clears / replaces / appends first level 1:many children and then executes a gorm update call
func (*User) Descriptor
deprecated
func (*User) GetBillingAddress ¶
func (*User) GetBirthday ¶
func (x *User) GetBirthday() *timestamppb.Timestamp
func (*User) GetCreatedAt ¶
func (x *User) GetCreatedAt() *timestamppb.Timestamp
func (*User) GetCreditCard ¶
func (x *User) GetCreditCard() *CreditCard
func (*User) GetDepartment ¶ added in v1.2.0
func (x *User) GetDepartment() *Department
func (*User) GetExternalUuid ¶
func (x *User) GetExternalUuid() *resource.Identifier
func (*User) GetFriends ¶
func (*User) GetId ¶
func (x *User) GetId() *resource.Identifier
func (*User) GetLanguages ¶
func (*User) GetShippingAddress ¶
func (*User) GetShippingAddressId ¶
func (x *User) GetShippingAddressId() *resource.Identifier
func (*User) GetUpdatedAt ¶
func (x *User) GetUpdatedAt() *timestamppb.Timestamp
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserORM ¶
type UserORM struct { AccountID string BillingAddress *AddressORM `gorm:"foreignKey:BillingAddressId;references:Id"` BillingAddressId *int64 Birthday *time.Time CreatedAt *time.Time CreditCard *CreditCardORM `gorm:"foreignKey:UserId;references:Id"` Department *DepartmentORM `gorm:"foreignKey:UserId;references:Id"` Emails []*EmailORM `gorm:"foreignKey:UserId;references:Id"` ExternalUuid *string `gorm:"type:uuid"` Friends []*UserORM `gorm:"foreignKey:Id;references:Id;many2many:user_friends;joinForeignKey:UserId;joinReferences:FriendId"` Id string `gorm:"type:uuid;primaryKey"` Languages []*LanguageORM `gorm:"foreignKey:Id;references:Id;many2many:user_languages;joinForeignKey:UserId;joinReferences:LanguageId"` Num uint32 ShippingAddress *AddressORM `gorm:"foreignKey:ShippingAddressId;references:Id"` ShippingAddressId *int64 Tasks []*TaskORM `gorm:"foreignKey:UserId;references:Id" atlas:"position:Priority"` 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
func (*UserORM) ToPB ¶
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
func (*UserORM) ToPBWrapper ¶ added in v1.2.0
func (m *UserORM) ToPBWrapper(ctx context.Context) (protoreflect.ProtoMessage, error)
ToPBWrapper wraps ToPB function and uses proto.Message return value for further interface usage down the stream
type UserORMWithAfterCreate_ ¶
type UserORMWithAfterDelete_ ¶
type UserWithAfterPatchSave ¶
type UserWithAfterToORM ¶
UserAfterToORM called after default ToORM code
type UserWithAfterToPB ¶
UserAfterToPB called after default ToPB code
type UserWithBeforePatchRead ¶
type UserWithBeforePatchSave ¶
type UserWithBeforeToORM ¶
UserBeforeToORM called before default ToORM code