user

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

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

Constants

This section is empty.

Variables

View Source
var (
	UserAccountIDField         = "AccountID"
	UserBillingAddressField    = "BillingAddress"
	UserBillingAddressIdField  = "BillingAddressId"
	UserBirthdayField          = "Birthday"
	UserCreatedAtField         = "CreatedAt"
	UserCreditCardField        = "CreditCard"
	UserEmailsField            = "Emails"
	UserExternalUuidField      = "ExternalUuid"
	UserFriendsField           = "Friends"
	UserIdField                = "Id"
	UserLanguagesField         = "Languages"
	UserNumField               = "Num"
	UserShippingAddressField   = "ShippingAddress"
	UserShippingAddressIdField = "ShippingAddressId"
	UserTasksField             = "Tasks"
	UserUpdatedAtField         = "UpdatedAt"
)
View Source
var (
	EmailAccountIDField       = "AccountID"
	EmailEmailField           = "Email"
	EmailExternalNotNullField = "ExternalNotNull"
	EmailIdField              = "Id"
	EmailSubscribedField      = "Subscribed"
	EmailUserIdField          = "UserId"
)
View Source
var (
	AddressAccountIDField  = "AccountID"
	AddressAddress_1Field  = "Address_1"
	AddressAddress_2Field  = "Address_2"
	AddressExternalField   = "External"
	AddressIdField         = "Id"
	AddressImplicitFkField = "ImplicitFk"
	AddressPostField       = "Post"
)
View Source
var (
	LanguageAccountIDField   = "AccountID"
	LanguageCodeField        = "Code"
	LanguageExternalIntField = "ExternalInt"
	LanguageIdField          = "Id"
	LanguageNameField        = "Name"
)
View Source
var (
	CreditCardAccountIDField = "AccountID"
	CreditCardCreatedAtField = "CreatedAt"
	CreditCardIdField        = "Id"
	CreditCardNumberField    = "Number"
	CreditCardUpdatedAtField = "UpdatedAt"
	CreditCardUserIdField    = "UserId"
)
View Source
var (
	TaskAccountIDField   = "AccountID"
	TaskDescriptionField = "Description"
	TaskNameField        = "Name"
	TaskPriorityField    = "Priority"
	TaskUserIdField      = "UserId"
)

Functions

func DefaultDeleteAddress

func DefaultDeleteAddress(ctx context.Context, in *Address, db *gorm1.DB) error

func DefaultDeleteAddressSet added in v0.15.0

func DefaultDeleteAddressSet(ctx context.Context, in []*Address, db *gorm1.DB) error

func DefaultDeleteCreditCard

func DefaultDeleteCreditCard(ctx context.Context, in *CreditCard, db *gorm1.DB) error

func DefaultDeleteCreditCardSet added in v0.15.0

func DefaultDeleteCreditCardSet(ctx context.Context, in []*CreditCard, db *gorm1.DB) error

func DefaultDeleteEmail

func DefaultDeleteEmail(ctx context.Context, in *Email, db *gorm1.DB) error

func DefaultDeleteEmailSet added in v0.15.0

func DefaultDeleteEmailSet(ctx context.Context, in []*Email, db *gorm1.DB) error

func DefaultDeleteLanguage

func DefaultDeleteLanguage(ctx context.Context, in *Language, db *gorm1.DB) error

func DefaultDeleteLanguageSet added in v0.15.0

func DefaultDeleteLanguageSet(ctx context.Context, in []*Language, db *gorm1.DB) error

func DefaultDeleteUser

func DefaultDeleteUser(ctx context.Context, in *User, db *gorm1.DB) error

func DefaultDeleteUserSet added in v0.15.0

func DefaultDeleteUserSet(ctx context.Context, in []*User, db *gorm1.DB) error

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" 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"`
	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, 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

func DefaultCreateAddress(ctx context.Context, in *Address, db *gorm1.DB) (*Address, error)

DefaultCreateAddress executes a basic gorm create call

func DefaultListAddress

func DefaultListAddress(ctx context.Context, db *gorm1.DB) ([]*Address, error)

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

func DefaultReadAddress(ctx context.Context, in *Address, db *gorm1.DB) (*Address, error)

DefaultReadAddress executes a basic gorm read call

func DefaultStrictUpdateAddress

func DefaultStrictUpdateAddress(ctx context.Context, in *Address, db *gorm1.DB) (*Address, error)

DefaultStrictUpdateAddress clears first level 1:many children and then executes a gorm update call

func (*Address) Descriptor

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

func (*Address) GetAddress_1

func (m *Address) GetAddress_1() string

func (*Address) GetAddress_2

func (m *Address) GetAddress_2() string

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) GetPost

func (m *Address) GetPost() string

func (*Address) ProtoMessage

func (*Address) ProtoMessage()

func (*Address) Reset

func (m *Address) Reset()

func (*Address) String

func (m *Address) String() string

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 (m *Address) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Address) XXX_Merge added in v0.6.0

func (m *Address) XXX_Merge(src proto.Message)

func (*Address) XXX_Size added in v0.6.0

func (m *Address) XXX_Size() int

func (*Address) XXX_Unmarshal added in v0.6.0

func (m *Address) XXX_Unmarshal(b []byte) error

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

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

type AddressORMWithAfterCreate_ added in v0.16.0

type AddressORMWithAfterCreate_ interface {
	AfterCreate_(context.Context, *gorm1.DB) error
}

type AddressORMWithAfterDeleteSet added in v0.15.0

type AddressORMWithAfterDeleteSet interface {
	AfterDeleteSet(context.Context, []*Address, *gorm1.DB) error
}

type AddressORMWithAfterDelete_ added in v0.16.0

type AddressORMWithAfterDelete_ interface {
	AfterDelete_(context.Context, *gorm1.DB) error
}

type AddressORMWithAfterListFind added in v0.12.0

type AddressORMWithAfterListFind interface {
	AfterListFind(context.Context, *gorm1.DB, *[]AddressORM) error
}

type AddressORMWithAfterReadFind added in v0.12.0

type AddressORMWithAfterReadFind interface {
	AfterReadFind(context.Context, *gorm1.DB) error
}

type AddressORMWithAfterStrictUpdateSave added in v0.12.0

type AddressORMWithAfterStrictUpdateSave interface {
	AfterStrictUpdateSave(context.Context, *gorm1.DB) error
}

type AddressORMWithBeforeCreate_ added in v0.16.0

type AddressORMWithBeforeCreate_ interface {
	BeforeCreate_(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type AddressORMWithBeforeDeleteSet added in v0.15.0

type AddressORMWithBeforeDeleteSet interface {
	BeforeDeleteSet(context.Context, []*Address, *gorm1.DB) (*gorm1.DB, error)
}

type AddressORMWithBeforeDelete_ added in v0.16.0

type AddressORMWithBeforeDelete_ interface {
	BeforeDelete_(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type AddressORMWithBeforeListApplyQuery added in v0.12.0

type AddressORMWithBeforeListApplyQuery interface {
	BeforeListApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type AddressORMWithBeforeListFind added in v0.12.0

type AddressORMWithBeforeListFind interface {
	BeforeListFind(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type AddressORMWithBeforeReadApplyQuery added in v0.12.0

type AddressORMWithBeforeReadApplyQuery interface {
	BeforeReadApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type AddressORMWithBeforeReadFind added in v0.12.0

type AddressORMWithBeforeReadFind interface {
	BeforeReadFind(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type AddressORMWithBeforeStrictUpdateCleanup added in v0.12.0

type AddressORMWithBeforeStrictUpdateCleanup interface {
	BeforeStrictUpdateCleanup(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type AddressORMWithBeforeStrictUpdateSave added in v0.12.0

type AddressORMWithBeforeStrictUpdateSave interface {
	BeforeStrictUpdateSave(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type AddressRepository added in v0.19.0

type AddressRepository interface {
	// CreateAddress executes a basic gorm create call
	CreateAddress(ctx context.Context, in *Address) (*Address, error)
	// ListAddress executes a gorm list call
	ListAddress(ctx context.Context) ([]*Address, error)
	// ReadAddress executes a basic gorm read call
	ReadAddress(ctx context.Context, in *Address) (*Address, error)
	// DeleteAddress executes a basic gorm delete call
	DeleteAddress(ctx context.Context, in *Address) error
	// DeleteAddressSet executes a basic gorm delete set call
	DeleteAddressSet(ctx context.Context, in []*Address) error
	// StrictUpdateAddress clears first level 1:many children and then executes a gorm update call
	StrictUpdateAddress(ctx context.Context, in *Address) (*Address, error)
	// PatchAddress executes a basic gorm update call with patch behavior
	PatchAddress(ctx context.Context, in *Address, updateMask *field_mask1.FieldMask) (*Address, error)
}

AddressRepository is a default repository

func NewAddressRepository added in v0.19.0

func NewAddressRepository(db *gorm1.DB) (AddressRepository, error)

type AddressWithAfterPatchSave added in v0.12.0

type AddressWithAfterPatchSave interface {
	AfterPatchSave(context.Context, *Address, *field_mask1.FieldMask, *gorm1.DB) error
}

type AddressWithAfterToORM

type AddressWithAfterToORM interface {
	AfterToORM(context.Context, *AddressORM) error
}

AddressAfterToORM called after default ToORM code

type AddressWithAfterToPB

type AddressWithAfterToPB interface {
	AfterToPB(context.Context, *Address) error
}

AddressAfterToPB called after default ToPB code

type AddressWithBeforePatchApplyFieldMask added in v0.12.0

type AddressWithBeforePatchApplyFieldMask interface {
	BeforePatchApplyFieldMask(context.Context, *Address, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type AddressWithBeforePatchRead added in v0.12.0

type AddressWithBeforePatchRead interface {
	BeforePatchRead(context.Context, *Address, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type AddressWithBeforePatchSave added in v0.9.1

type AddressWithBeforePatchSave interface {
	BeforePatchSave(context.Context, *Address, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type AddressWithBeforeToORM

type AddressWithBeforeToORM interface {
	BeforeToORM(context.Context, *AddressORM) error
}

AddressBeforeToORM called before default ToORM code

type AddressWithBeforeToPB

type AddressWithBeforeToPB interface {
	BeforeToPB(context.Context, *Address) error
}

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            *timestamp.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt            *timestamp.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"`
	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, 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) ([]*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 (*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 (m *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 CreditCardORMWithAfterCreate_ added in v0.16.0

type CreditCardORMWithAfterCreate_ interface {
	AfterCreate_(context.Context, *gorm1.DB) error
}

type CreditCardORMWithAfterDeleteSet added in v0.15.0

type CreditCardORMWithAfterDeleteSet interface {
	AfterDeleteSet(context.Context, []*CreditCard, *gorm1.DB) error
}

type CreditCardORMWithAfterDelete_ added in v0.16.0

type CreditCardORMWithAfterDelete_ interface {
	AfterDelete_(context.Context, *gorm1.DB) error
}

type CreditCardORMWithAfterListFind added in v0.12.0

type CreditCardORMWithAfterListFind interface {
	AfterListFind(context.Context, *gorm1.DB, *[]CreditCardORM) error
}

type CreditCardORMWithAfterReadFind added in v0.12.0

type CreditCardORMWithAfterReadFind interface {
	AfterReadFind(context.Context, *gorm1.DB) error
}

type CreditCardORMWithAfterStrictUpdateSave added in v0.12.0

type CreditCardORMWithAfterStrictUpdateSave interface {
	AfterStrictUpdateSave(context.Context, *gorm1.DB) error
}

type CreditCardORMWithBeforeCreate_ added in v0.16.0

type CreditCardORMWithBeforeCreate_ interface {
	BeforeCreate_(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type CreditCardORMWithBeforeDeleteSet added in v0.15.0

type CreditCardORMWithBeforeDeleteSet interface {
	BeforeDeleteSet(context.Context, []*CreditCard, *gorm1.DB) (*gorm1.DB, error)
}

type CreditCardORMWithBeforeDelete_ added in v0.16.0

type CreditCardORMWithBeforeDelete_ interface {
	BeforeDelete_(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type CreditCardORMWithBeforeListApplyQuery added in v0.12.0

type CreditCardORMWithBeforeListApplyQuery interface {
	BeforeListApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type CreditCardORMWithBeforeListFind added in v0.12.0

type CreditCardORMWithBeforeListFind interface {
	BeforeListFind(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type CreditCardORMWithBeforeReadApplyQuery added in v0.12.0

type CreditCardORMWithBeforeReadApplyQuery interface {
	BeforeReadApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type CreditCardORMWithBeforeReadFind added in v0.12.0

type CreditCardORMWithBeforeReadFind interface {
	BeforeReadFind(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type CreditCardORMWithBeforeStrictUpdateCleanup added in v0.12.0

type CreditCardORMWithBeforeStrictUpdateCleanup interface {
	BeforeStrictUpdateCleanup(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type CreditCardORMWithBeforeStrictUpdateSave added in v0.12.0

type CreditCardORMWithBeforeStrictUpdateSave interface {
	BeforeStrictUpdateSave(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type CreditCardRepository added in v0.19.0

type CreditCardRepository interface {
	// CreateCreditCard executes a basic gorm create call
	CreateCreditCard(ctx context.Context, in *CreditCard) (*CreditCard, error)
	// ListCreditCard executes a gorm list call
	ListCreditCard(ctx context.Context) ([]*CreditCard, error)
	// ReadCreditCard executes a basic gorm read call
	ReadCreditCard(ctx context.Context, in *CreditCard) (*CreditCard, error)
	// DeleteCreditCard executes a basic gorm delete call
	DeleteCreditCard(ctx context.Context, in *CreditCard) error
	// DeleteCreditCardSet executes a basic gorm delete set call
	DeleteCreditCardSet(ctx context.Context, in []*CreditCard) error
	// StrictUpdateCreditCard clears first level 1:many children and then executes a gorm update call
	StrictUpdateCreditCard(ctx context.Context, in *CreditCard) (*CreditCard, error)
	// PatchCreditCard executes a basic gorm update call with patch behavior
	PatchCreditCard(ctx context.Context, in *CreditCard, updateMask *field_mask1.FieldMask) (*CreditCard, error)
}

CreditCardRepository is a default repository

func NewCreditCardRepository added in v0.19.0

func NewCreditCardRepository(db *gorm1.DB) (CreditCardRepository, error)

type CreditCardWithAfterPatchSave added in v0.12.0

type CreditCardWithAfterPatchSave interface {
	AfterPatchSave(context.Context, *CreditCard, *field_mask1.FieldMask, *gorm1.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 added in v0.12.0

type CreditCardWithBeforePatchApplyFieldMask interface {
	BeforePatchApplyFieldMask(context.Context, *CreditCard, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type CreditCardWithBeforePatchRead added in v0.12.0

type CreditCardWithBeforePatchRead interface {
	BeforePatchRead(context.Context, *CreditCard, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type CreditCardWithBeforePatchSave added in v0.9.1

type CreditCardWithBeforePatchSave interface {
	BeforePatchSave(context.Context, *CreditCard, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.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 DefaultAddressRepository added in v0.19.0

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

DefaultAddressRepository implements AddressRepository

func (*DefaultAddressRepository) CreateAddress added in v0.19.0

func (r *DefaultAddressRepository) CreateAddress(ctx context.Context, in *Address) (*Address, error)

func (*DefaultAddressRepository) DeleteAddress added in v0.19.0

func (r *DefaultAddressRepository) DeleteAddress(ctx context.Context, in *Address) error

func (*DefaultAddressRepository) DeleteAddressSet added in v0.19.0

func (r *DefaultAddressRepository) DeleteAddressSet(ctx context.Context, in []*Address) error

func (*DefaultAddressRepository) ListAddress added in v0.19.0

func (r *DefaultAddressRepository) ListAddress(ctx context.Context) ([]*Address, error)

func (*DefaultAddressRepository) PatchAddress added in v0.19.0

func (r *DefaultAddressRepository) PatchAddress(ctx context.Context, in *Address, updateMask *field_mask1.FieldMask) (*Address, error)

func (*DefaultAddressRepository) ReadAddress added in v0.19.0

func (r *DefaultAddressRepository) ReadAddress(ctx context.Context, in *Address) (*Address, error)

func (*DefaultAddressRepository) StrictUpdateAddress added in v0.19.0

func (r *DefaultAddressRepository) StrictUpdateAddress(ctx context.Context, in *Address) (*Address, error)

type DefaultCreditCardRepository added in v0.19.0

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

DefaultCreditCardRepository implements CreditCardRepository

func (*DefaultCreditCardRepository) CreateCreditCard added in v0.19.0

func (r *DefaultCreditCardRepository) CreateCreditCard(ctx context.Context, in *CreditCard) (*CreditCard, error)

func (*DefaultCreditCardRepository) DeleteCreditCard added in v0.19.0

func (r *DefaultCreditCardRepository) DeleteCreditCard(ctx context.Context, in *CreditCard) error

func (*DefaultCreditCardRepository) DeleteCreditCardSet added in v0.19.0

func (r *DefaultCreditCardRepository) DeleteCreditCardSet(ctx context.Context, in []*CreditCard) error

func (*DefaultCreditCardRepository) ListCreditCard added in v0.19.0

func (r *DefaultCreditCardRepository) ListCreditCard(ctx context.Context) ([]*CreditCard, error)

func (*DefaultCreditCardRepository) PatchCreditCard added in v0.19.0

func (r *DefaultCreditCardRepository) PatchCreditCard(ctx context.Context, in *CreditCard, updateMask *field_mask1.FieldMask) (*CreditCard, error)

func (*DefaultCreditCardRepository) ReadCreditCard added in v0.19.0

func (r *DefaultCreditCardRepository) ReadCreditCard(ctx context.Context, in *CreditCard) (*CreditCard, error)

func (*DefaultCreditCardRepository) StrictUpdateCreditCard added in v0.19.0

func (r *DefaultCreditCardRepository) StrictUpdateCreditCard(ctx context.Context, in *CreditCard) (*CreditCard, error)

type DefaultEmailRepository added in v0.19.0

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

DefaultEmailRepository implements EmailRepository

func (*DefaultEmailRepository) CreateEmail added in v0.19.0

func (r *DefaultEmailRepository) CreateEmail(ctx context.Context, in *Email) (*Email, error)

func (*DefaultEmailRepository) DeleteEmail added in v0.19.0

func (r *DefaultEmailRepository) DeleteEmail(ctx context.Context, in *Email) error

func (*DefaultEmailRepository) DeleteEmailSet added in v0.19.0

func (r *DefaultEmailRepository) DeleteEmailSet(ctx context.Context, in []*Email) error

func (*DefaultEmailRepository) ListEmail added in v0.19.0

func (r *DefaultEmailRepository) ListEmail(ctx context.Context) ([]*Email, error)

func (*DefaultEmailRepository) PatchEmail added in v0.19.0

func (r *DefaultEmailRepository) PatchEmail(ctx context.Context, in *Email, updateMask *field_mask1.FieldMask) (*Email, error)

func (*DefaultEmailRepository) ReadEmail added in v0.19.0

func (r *DefaultEmailRepository) ReadEmail(ctx context.Context, in *Email) (*Email, error)

func (*DefaultEmailRepository) StrictUpdateEmail added in v0.19.0

func (r *DefaultEmailRepository) StrictUpdateEmail(ctx context.Context, in *Email) (*Email, error)

type DefaultLanguageRepository added in v0.19.0

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

DefaultLanguageRepository implements LanguageRepository

func (*DefaultLanguageRepository) CreateLanguage added in v0.19.0

func (r *DefaultLanguageRepository) CreateLanguage(ctx context.Context, in *Language) (*Language, error)

func (*DefaultLanguageRepository) DeleteLanguage added in v0.19.0

func (r *DefaultLanguageRepository) DeleteLanguage(ctx context.Context, in *Language) error

func (*DefaultLanguageRepository) DeleteLanguageSet added in v0.19.0

func (r *DefaultLanguageRepository) DeleteLanguageSet(ctx context.Context, in []*Language) error

func (*DefaultLanguageRepository) ListLanguage added in v0.19.0

func (r *DefaultLanguageRepository) ListLanguage(ctx context.Context) ([]*Language, error)

func (*DefaultLanguageRepository) PatchLanguage added in v0.19.0

func (r *DefaultLanguageRepository) PatchLanguage(ctx context.Context, in *Language, updateMask *field_mask1.FieldMask) (*Language, error)

func (*DefaultLanguageRepository) ReadLanguage added in v0.19.0

func (r *DefaultLanguageRepository) ReadLanguage(ctx context.Context, in *Language) (*Language, error)

func (*DefaultLanguageRepository) StrictUpdateLanguage added in v0.19.0

func (r *DefaultLanguageRepository) StrictUpdateLanguage(ctx context.Context, in *Language) (*Language, error)

type DefaultTaskRepository added in v0.19.0

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

DefaultTaskRepository implements TaskRepository

func (*DefaultTaskRepository) CreateTask added in v0.19.0

func (r *DefaultTaskRepository) CreateTask(ctx context.Context, in *Task) (*Task, error)

func (*DefaultTaskRepository) ListTask added in v0.19.0

func (r *DefaultTaskRepository) ListTask(ctx context.Context) ([]*Task, error)

type DefaultUserRepository added in v0.19.0

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

DefaultUserRepository implements UserRepository

func (*DefaultUserRepository) CreateUser added in v0.19.0

func (r *DefaultUserRepository) CreateUser(ctx context.Context, in *User) (*User, error)

func (*DefaultUserRepository) DeleteUser added in v0.19.0

func (r *DefaultUserRepository) DeleteUser(ctx context.Context, in *User) error

func (*DefaultUserRepository) DeleteUserSet added in v0.19.0

func (r *DefaultUserRepository) DeleteUserSet(ctx context.Context, in []*User) error

func (*DefaultUserRepository) ListUser added in v0.19.0

func (r *DefaultUserRepository) ListUser(ctx context.Context) ([]*User, error)

func (*DefaultUserRepository) PatchUser added in v0.19.0

func (r *DefaultUserRepository) PatchUser(ctx context.Context, in *User, updateMask *field_mask1.FieldMask) (*User, error)

func (*DefaultUserRepository) ReadUser added in v0.19.0

func (r *DefaultUserRepository) ReadUser(ctx context.Context, in *User) (*User, error)

func (*DefaultUserRepository) StrictUpdateUser added in v0.19.0

func (r *DefaultUserRepository) StrictUpdateUser(ctx context.Context, in *User) (*User, error)

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"`
	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, 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

func DefaultCreateEmail(ctx context.Context, in *Email, db *gorm1.DB) (*Email, error)

DefaultCreateEmail executes a basic gorm create call

func DefaultListEmail

func DefaultListEmail(ctx context.Context, db *gorm1.DB) ([]*Email, error)

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

func DefaultReadEmail(ctx context.Context, in *Email, db *gorm1.DB) (*Email, error)

DefaultReadEmail executes a basic gorm read call

func DefaultStrictUpdateEmail

func DefaultStrictUpdateEmail(ctx context.Context, in *Email, db *gorm1.DB) (*Email, error)

DefaultStrictUpdateEmail clears first level 1:many children and then executes a gorm update call

func (*Email) Descriptor

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

func (*Email) GetEmail

func (m *Email) GetEmail() string

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 (m *Email) GetSubscribed() bool

func (*Email) GetUserId added in v0.6.0

func (m *Email) GetUserId() *resource.Identifier

func (*Email) ProtoMessage

func (*Email) ProtoMessage()

func (*Email) Reset

func (m *Email) Reset()

func (*Email) String

func (m *Email) String() string

func (*Email) ToORM

func (m *Email) ToORM(ctx context.Context) (EmailORM, 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 (*Email) XXX_DiscardUnknown added in v0.6.0

func (m *Email) XXX_DiscardUnknown()

func (*Email) XXX_Marshal added in v0.6.0

func (m *Email) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Email) XXX_Merge added in v0.6.0

func (m *Email) XXX_Merge(src proto.Message)

func (*Email) XXX_Size added in v0.6.0

func (m *Email) XXX_Size() int

func (*Email) XXX_Unmarshal added in v0.6.0

func (m *Email) XXX_Unmarshal(b []byte) error

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
}

func (EmailORM) TableName

func (EmailORM) TableName() string

TableName overrides the default tablename generated by GORM

func (*EmailORM) ToPB

func (m *EmailORM) ToPB(ctx context.Context) (Email, 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 EmailORMWithAfterCreate_ added in v0.16.0

type EmailORMWithAfterCreate_ interface {
	AfterCreate_(context.Context, *gorm1.DB) error
}

type EmailORMWithAfterDeleteSet added in v0.15.0

type EmailORMWithAfterDeleteSet interface {
	AfterDeleteSet(context.Context, []*Email, *gorm1.DB) error
}

type EmailORMWithAfterDelete_ added in v0.16.0

type EmailORMWithAfterDelete_ interface {
	AfterDelete_(context.Context, *gorm1.DB) error
}

type EmailORMWithAfterListFind added in v0.12.0

type EmailORMWithAfterListFind interface {
	AfterListFind(context.Context, *gorm1.DB, *[]EmailORM) error
}

type EmailORMWithAfterReadFind added in v0.12.0

type EmailORMWithAfterReadFind interface {
	AfterReadFind(context.Context, *gorm1.DB) error
}

type EmailORMWithAfterStrictUpdateSave added in v0.12.0

type EmailORMWithAfterStrictUpdateSave interface {
	AfterStrictUpdateSave(context.Context, *gorm1.DB) error
}

type EmailORMWithBeforeCreate_ added in v0.16.0

type EmailORMWithBeforeCreate_ interface {
	BeforeCreate_(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type EmailORMWithBeforeDeleteSet added in v0.15.0

type EmailORMWithBeforeDeleteSet interface {
	BeforeDeleteSet(context.Context, []*Email, *gorm1.DB) (*gorm1.DB, error)
}

type EmailORMWithBeforeDelete_ added in v0.16.0

type EmailORMWithBeforeDelete_ interface {
	BeforeDelete_(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type EmailORMWithBeforeListApplyQuery added in v0.12.0

type EmailORMWithBeforeListApplyQuery interface {
	BeforeListApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type EmailORMWithBeforeListFind added in v0.12.0

type EmailORMWithBeforeListFind interface {
	BeforeListFind(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type EmailORMWithBeforeReadApplyQuery added in v0.12.0

type EmailORMWithBeforeReadApplyQuery interface {
	BeforeReadApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type EmailORMWithBeforeReadFind added in v0.12.0

type EmailORMWithBeforeReadFind interface {
	BeforeReadFind(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type EmailORMWithBeforeStrictUpdateCleanup added in v0.12.0

type EmailORMWithBeforeStrictUpdateCleanup interface {
	BeforeStrictUpdateCleanup(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type EmailORMWithBeforeStrictUpdateSave added in v0.12.0

type EmailORMWithBeforeStrictUpdateSave interface {
	BeforeStrictUpdateSave(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type EmailRepository added in v0.19.0

type EmailRepository interface {
	// CreateEmail executes a basic gorm create call
	CreateEmail(ctx context.Context, in *Email) (*Email, error)
	// ListEmail executes a gorm list call
	ListEmail(ctx context.Context) ([]*Email, error)
	// ReadEmail executes a basic gorm read call
	ReadEmail(ctx context.Context, in *Email) (*Email, error)
	// DeleteEmail executes a basic gorm delete call
	DeleteEmail(ctx context.Context, in *Email) error
	// DeleteEmailSet executes a basic gorm delete set call
	DeleteEmailSet(ctx context.Context, in []*Email) error
	// StrictUpdateEmail clears first level 1:many children and then executes a gorm update call
	StrictUpdateEmail(ctx context.Context, in *Email) (*Email, error)
	// PatchEmail executes a basic gorm update call with patch behavior
	PatchEmail(ctx context.Context, in *Email, updateMask *field_mask1.FieldMask) (*Email, error)
}

EmailRepository is a default repository

func NewEmailRepository added in v0.19.0

func NewEmailRepository(db *gorm1.DB) (EmailRepository, error)

type EmailWithAfterPatchSave added in v0.12.0

type EmailWithAfterPatchSave interface {
	AfterPatchSave(context.Context, *Email, *field_mask1.FieldMask, *gorm1.DB) error
}

type EmailWithAfterToORM

type EmailWithAfterToORM interface {
	AfterToORM(context.Context, *EmailORM) error
}

EmailAfterToORM called after default ToORM code

type EmailWithAfterToPB

type EmailWithAfterToPB interface {
	AfterToPB(context.Context, *Email) error
}

EmailAfterToPB called after default ToPB code

type EmailWithBeforePatchApplyFieldMask added in v0.12.0

type EmailWithBeforePatchApplyFieldMask interface {
	BeforePatchApplyFieldMask(context.Context, *Email, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type EmailWithBeforePatchRead added in v0.12.0

type EmailWithBeforePatchRead interface {
	BeforePatchRead(context.Context, *Email, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type EmailWithBeforePatchSave added in v0.9.1

type EmailWithBeforePatchSave interface {
	BeforePatchSave(context.Context, *Email, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type EmailWithBeforeToORM

type EmailWithBeforeToORM interface {
	BeforeToORM(context.Context, *EmailORM) error
}

EmailBeforeToORM called before default ToORM code

type EmailWithBeforeToPB

type EmailWithBeforeToPB interface {
	BeforeToPB(context.Context, *Email) error
}

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"`
	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, 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

func DefaultCreateLanguage(ctx context.Context, in *Language, db *gorm1.DB) (*Language, error)

DefaultCreateLanguage executes a basic gorm create call

func DefaultListLanguage

func DefaultListLanguage(ctx context.Context, db *gorm1.DB) ([]*Language, error)

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

func DefaultReadLanguage(ctx context.Context, in *Language, db *gorm1.DB) (*Language, error)

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 (*Language) Descriptor

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

func (*Language) GetCode

func (m *Language) GetCode() string

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) GetName

func (m *Language) GetName() string

func (*Language) ProtoMessage

func (*Language) ProtoMessage()

func (*Language) Reset

func (m *Language) Reset()

func (*Language) String

func (m *Language) String() string

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 (m *Language) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Language) XXX_Merge added in v0.6.0

func (m *Language) XXX_Merge(src proto.Message)

func (*Language) XXX_Size added in v0.6.0

func (m *Language) XXX_Size() int

func (*Language) XXX_Unmarshal added in v0.6.0

func (m *Language) XXX_Unmarshal(b []byte) error

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

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

type LanguageORMWithAfterCreate_ added in v0.16.0

type LanguageORMWithAfterCreate_ interface {
	AfterCreate_(context.Context, *gorm1.DB) error
}

type LanguageORMWithAfterDeleteSet added in v0.15.0

type LanguageORMWithAfterDeleteSet interface {
	AfterDeleteSet(context.Context, []*Language, *gorm1.DB) error
}

type LanguageORMWithAfterDelete_ added in v0.16.0

type LanguageORMWithAfterDelete_ interface {
	AfterDelete_(context.Context, *gorm1.DB) error
}

type LanguageORMWithAfterListFind added in v0.12.0

type LanguageORMWithAfterListFind interface {
	AfterListFind(context.Context, *gorm1.DB, *[]LanguageORM) error
}

type LanguageORMWithAfterReadFind added in v0.12.0

type LanguageORMWithAfterReadFind interface {
	AfterReadFind(context.Context, *gorm1.DB) error
}

type LanguageORMWithAfterStrictUpdateSave added in v0.12.0

type LanguageORMWithAfterStrictUpdateSave interface {
	AfterStrictUpdateSave(context.Context, *gorm1.DB) error
}

type LanguageORMWithBeforeCreate_ added in v0.16.0

type LanguageORMWithBeforeCreate_ interface {
	BeforeCreate_(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageORMWithBeforeDeleteSet added in v0.15.0

type LanguageORMWithBeforeDeleteSet interface {
	BeforeDeleteSet(context.Context, []*Language, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageORMWithBeforeDelete_ added in v0.16.0

type LanguageORMWithBeforeDelete_ interface {
	BeforeDelete_(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageORMWithBeforeListApplyQuery added in v0.12.0

type LanguageORMWithBeforeListApplyQuery interface {
	BeforeListApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageORMWithBeforeListFind added in v0.12.0

type LanguageORMWithBeforeListFind interface {
	BeforeListFind(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageORMWithBeforeReadApplyQuery added in v0.12.0

type LanguageORMWithBeforeReadApplyQuery interface {
	BeforeReadApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageORMWithBeforeReadFind added in v0.12.0

type LanguageORMWithBeforeReadFind interface {
	BeforeReadFind(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageORMWithBeforeStrictUpdateCleanup added in v0.12.0

type LanguageORMWithBeforeStrictUpdateCleanup interface {
	BeforeStrictUpdateCleanup(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageORMWithBeforeStrictUpdateSave added in v0.12.0

type LanguageORMWithBeforeStrictUpdateSave interface {
	BeforeStrictUpdateSave(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageRepository added in v0.19.0

type LanguageRepository interface {
	// CreateLanguage executes a basic gorm create call
	CreateLanguage(ctx context.Context, in *Language) (*Language, error)
	// ListLanguage executes a gorm list call
	ListLanguage(ctx context.Context) ([]*Language, error)
	// ReadLanguage executes a basic gorm read call
	ReadLanguage(ctx context.Context, in *Language) (*Language, error)
	// DeleteLanguage executes a basic gorm delete call
	DeleteLanguage(ctx context.Context, in *Language) error
	// DeleteLanguageSet executes a basic gorm delete set call
	DeleteLanguageSet(ctx context.Context, in []*Language) error
	// StrictUpdateLanguage clears first level 1:many children and then executes a gorm update call
	StrictUpdateLanguage(ctx context.Context, in *Language) (*Language, error)
	// PatchLanguage executes a basic gorm update call with patch behavior
	PatchLanguage(ctx context.Context, in *Language, updateMask *field_mask1.FieldMask) (*Language, error)
}

LanguageRepository is a default repository

func NewLanguageRepository added in v0.19.0

func NewLanguageRepository(db *gorm1.DB) (LanguageRepository, error)

type LanguageWithAfterPatchSave added in v0.12.0

type LanguageWithAfterPatchSave interface {
	AfterPatchSave(context.Context, *Language, *field_mask1.FieldMask, *gorm1.DB) error
}

type LanguageWithAfterToORM

type LanguageWithAfterToORM interface {
	AfterToORM(context.Context, *LanguageORM) error
}

LanguageAfterToORM called after default ToORM code

type LanguageWithAfterToPB

type LanguageWithAfterToPB interface {
	AfterToPB(context.Context, *Language) error
}

LanguageAfterToPB called after default ToPB code

type LanguageWithBeforePatchApplyFieldMask added in v0.12.0

type LanguageWithBeforePatchApplyFieldMask interface {
	BeforePatchApplyFieldMask(context.Context, *Language, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageWithBeforePatchRead added in v0.12.0

type LanguageWithBeforePatchRead interface {
	BeforePatchRead(context.Context, *Language, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageWithBeforePatchSave added in v0.9.1

type LanguageWithBeforePatchSave interface {
	BeforePatchSave(context.Context, *Language, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type LanguageWithBeforeToORM

type LanguageWithBeforeToORM interface {
	BeforeToORM(context.Context, *LanguageORM) error
}

LanguageBeforeToORM called before default ToORM code

type LanguageWithBeforeToPB

type LanguageWithBeforeToPB interface {
	BeforeToPB(context.Context, *Language) error
}

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"`
	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, 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

func DefaultCreateTask(ctx context.Context, in *Task, db *gorm1.DB) (*Task, error)

DefaultCreateTask executes a basic gorm create call

func DefaultListTask

func DefaultListTask(ctx context.Context, db *gorm1.DB) ([]*Task, error)

DefaultListTask executes a gorm list call

func (*Task) Descriptor

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

func (*Task) GetDescription

func (m *Task) GetDescription() string

func (*Task) GetName

func (m *Task) GetName() string

func (*Task) GetPriority added in v0.6.0

func (m *Task) GetPriority() int64

func (*Task) ProtoMessage

func (*Task) ProtoMessage()

func (*Task) Reset

func (m *Task) Reset()

func (*Task) String

func (m *Task) String() string

func (*Task) ToORM

func (m *Task) ToORM(ctx context.Context) (TaskORM, 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 (*Task) XXX_DiscardUnknown added in v0.6.0

func (m *Task) XXX_DiscardUnknown()

func (*Task) XXX_Marshal added in v0.6.0

func (m *Task) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Task) XXX_Merge added in v0.6.0

func (m *Task) XXX_Merge(src proto.Message)

func (*Task) XXX_Size added in v0.6.0

func (m *Task) XXX_Size() int

func (*Task) XXX_Unmarshal added in v0.6.0

func (m *Task) XXX_Unmarshal(b []byte) error

type TaskORM

type TaskORM struct {
	AccountID   string
	Description string
	Name        string
	Priority    int64
	UserId      string `gorm:"not null"`
}

func (TaskORM) TableName

func (TaskORM) TableName() string

TableName overrides the default tablename generated by GORM

func (*TaskORM) ToPB

func (m *TaskORM) ToPB(ctx context.Context) (Task, 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 TaskORMWithAfterCreate_ added in v0.16.0

type TaskORMWithAfterCreate_ interface {
	AfterCreate_(context.Context, *gorm1.DB) error
}

type TaskORMWithAfterListFind added in v0.12.0

type TaskORMWithAfterListFind interface {
	AfterListFind(context.Context, *gorm1.DB, *[]TaskORM) error
}

type TaskORMWithBeforeCreate_ added in v0.16.0

type TaskORMWithBeforeCreate_ interface {
	BeforeCreate_(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type TaskORMWithBeforeListApplyQuery added in v0.12.0

type TaskORMWithBeforeListApplyQuery interface {
	BeforeListApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type TaskORMWithBeforeListFind added in v0.12.0

type TaskORMWithBeforeListFind interface {
	BeforeListFind(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type TaskRepository added in v0.19.0

type TaskRepository interface {
	// CreateTask executes a basic gorm create call
	CreateTask(ctx context.Context, in *Task) (*Task, error)
	// ListTask executes a gorm list call
	ListTask(ctx context.Context) ([]*Task, error)
}

TaskRepository is a default repository

func NewTaskRepository added in v0.19.0

func NewTaskRepository(db *gorm1.DB) (TaskRepository, error)

type TaskWithAfterToORM

type TaskWithAfterToORM interface {
	AfterToORM(context.Context, *TaskORM) error
}

TaskAfterToORM called after default ToORM code

type TaskWithAfterToPB

type TaskWithAfterToPB interface {
	AfterToPB(context.Context, *Task) error
}

TaskAfterToPB called after default ToPB code

type TaskWithBeforeToORM

type TaskWithBeforeToORM interface {
	BeforeToORM(context.Context, *TaskORM) error
}

TaskBeforeToORM called before default ToORM code

type TaskWithBeforeToPB

type TaskWithBeforeToPB interface {
	BeforeToPB(context.Context, *Task) error
}

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            *timestamp.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt            *timestamp.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	Birthday             *timestamp.Timestamp `protobuf:"bytes,4,opt,name=birthday,proto3" json:"birthday,omitempty"`
	Age                  uint32               `protobuf:"varint,5,opt,name=age,proto3" json:"age,omitempty"`
	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"`
	Emails               []*Email             `protobuf:"bytes,8,rep,name=emails,proto3" json:"emails,omitempty"`
	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"`
	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, 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

func DefaultCreateUser(ctx context.Context, in *User, db *gorm1.DB) (*User, error)

DefaultCreateUser executes a basic gorm create call

func DefaultListUser

func DefaultListUser(ctx context.Context, db *gorm1.DB) ([]*User, error)

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

func DefaultReadUser(ctx context.Context, in *User, db *gorm1.DB) (*User, error)

DefaultReadUser executes a basic gorm read call

func DefaultStrictUpdateUser

func DefaultStrictUpdateUser(ctx context.Context, in *User, db *gorm1.DB) (*User, error)

DefaultStrictUpdateUser clears first level 1:many children and then executes a gorm update call

func (*User) Descriptor

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

func (*User) GetAge

func (m *User) GetAge() uint32

func (*User) GetBillingAddress

func (m *User) GetBillingAddress() *Address

func (*User) GetBirthday

func (m *User) GetBirthday() *timestamp.Timestamp

func (*User) GetCreatedAt

func (m *User) GetCreatedAt() *timestamp.Timestamp

func (*User) GetCreditCard

func (m *User) GetCreditCard() *CreditCard

func (*User) GetEmails

func (m *User) GetEmails() []*Email

func (*User) GetExternalUuid added in v0.7.0

func (m *User) GetExternalUuid() *resource.Identifier

func (*User) GetFriends

func (m *User) GetFriends() []*User

func (*User) GetId

func (m *User) GetId() *resource.Identifier

func (*User) GetLanguages

func (m *User) GetLanguages() []*Language

func (*User) GetNum

func (m *User) GetNum() uint32

func (*User) GetShippingAddress

func (m *User) GetShippingAddress() *Address

func (*User) GetShippingAddressId added in v0.6.0

func (m *User) GetShippingAddressId() *resource.Identifier

func (*User) GetTasks

func (m *User) GetTasks() []*Task

func (*User) GetUpdatedAt

func (m *User) GetUpdatedAt() *timestamp.Timestamp

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) String

func (m *User) String() string

func (*User) ToORM

func (m *User) ToORM(ctx context.Context) (UserORM, 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 (*User) XXX_DiscardUnknown added in v0.6.0

func (m *User) XXX_DiscardUnknown()

func (*User) XXX_Marshal added in v0.6.0

func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*User) XXX_Merge added in v0.6.0

func (m *User) XXX_Merge(src proto.Message)

func (*User) XXX_Size added in v0.6.0

func (m *User) XXX_Size() int

func (*User) XXX_Unmarshal added in v0.6.0

func (m *User) XXX_Unmarshal(b []byte) error

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" atlas:"position:Priority"`
	UpdatedAt         time.Time
}

func (*UserORM) AfterToPB

func (m *UserORM) AfterToPB(ctx context.Context, user *User) error

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) TableName

func (UserORM) TableName() string

TableName overrides the default tablename generated by GORM

func (*UserORM) ToPB

func (m *UserORM) ToPB(ctx context.Context) (User, 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 UserORMWithAfterCreate_ added in v0.16.0

type UserORMWithAfterCreate_ interface {
	AfterCreate_(context.Context, *gorm1.DB) error
}

type UserORMWithAfterDeleteSet added in v0.15.0

type UserORMWithAfterDeleteSet interface {
	AfterDeleteSet(context.Context, []*User, *gorm1.DB) error
}

type UserORMWithAfterDelete_ added in v0.16.0

type UserORMWithAfterDelete_ interface {
	AfterDelete_(context.Context, *gorm1.DB) error
}

type UserORMWithAfterListFind added in v0.12.0

type UserORMWithAfterListFind interface {
	AfterListFind(context.Context, *gorm1.DB, *[]UserORM) error
}

type UserORMWithAfterReadFind added in v0.12.0

type UserORMWithAfterReadFind interface {
	AfterReadFind(context.Context, *gorm1.DB) error
}

type UserORMWithAfterStrictUpdateSave added in v0.12.0

type UserORMWithAfterStrictUpdateSave interface {
	AfterStrictUpdateSave(context.Context, *gorm1.DB) error
}

type UserORMWithBeforeCreate_ added in v0.16.0

type UserORMWithBeforeCreate_ interface {
	BeforeCreate_(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type UserORMWithBeforeDeleteSet added in v0.15.0

type UserORMWithBeforeDeleteSet interface {
	BeforeDeleteSet(context.Context, []*User, *gorm1.DB) (*gorm1.DB, error)
}

type UserORMWithBeforeDelete_ added in v0.16.0

type UserORMWithBeforeDelete_ interface {
	BeforeDelete_(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type UserORMWithBeforeListApplyQuery added in v0.12.0

type UserORMWithBeforeListApplyQuery interface {
	BeforeListApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type UserORMWithBeforeListFind added in v0.12.0

type UserORMWithBeforeListFind interface {
	BeforeListFind(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type UserORMWithBeforeReadApplyQuery added in v0.12.0

type UserORMWithBeforeReadApplyQuery interface {
	BeforeReadApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type UserORMWithBeforeReadFind added in v0.12.0

type UserORMWithBeforeReadFind interface {
	BeforeReadFind(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type UserORMWithBeforeStrictUpdateCleanup added in v0.12.0

type UserORMWithBeforeStrictUpdateCleanup interface {
	BeforeStrictUpdateCleanup(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type UserORMWithBeforeStrictUpdateSave added in v0.12.0

type UserORMWithBeforeStrictUpdateSave interface {
	BeforeStrictUpdateSave(context.Context, *gorm1.DB) (*gorm1.DB, error)
}

type UserRepository added in v0.19.0

type UserRepository interface {
	// CreateUser executes a basic gorm create call
	CreateUser(ctx context.Context, in *User) (*User, error)
	// ListUser executes a gorm list call
	ListUser(ctx context.Context) ([]*User, error)
	// ReadUser executes a basic gorm read call
	ReadUser(ctx context.Context, in *User) (*User, error)
	// DeleteUser executes a basic gorm delete call
	DeleteUser(ctx context.Context, in *User) error
	// DeleteUserSet executes a basic gorm delete set call
	DeleteUserSet(ctx context.Context, in []*User) error
	// StrictUpdateUser clears first level 1:many children and then executes a gorm update call
	StrictUpdateUser(ctx context.Context, in *User) (*User, error)
	// PatchUser executes a basic gorm update call with patch behavior
	PatchUser(ctx context.Context, in *User, updateMask *field_mask1.FieldMask) (*User, error)
}

UserRepository is a default repository

func NewUserRepository added in v0.19.0

func NewUserRepository(db *gorm1.DB) (UserRepository, error)

type UserWithAfterPatchSave added in v0.12.0

type UserWithAfterPatchSave interface {
	AfterPatchSave(context.Context, *User, *field_mask1.FieldMask, *gorm1.DB) error
}

type UserWithAfterToORM

type UserWithAfterToORM interface {
	AfterToORM(context.Context, *UserORM) error
}

UserAfterToORM called after default ToORM code

type UserWithAfterToPB

type UserWithAfterToPB interface {
	AfterToPB(context.Context, *User) error
}

UserAfterToPB called after default ToPB code

type UserWithBeforePatchApplyFieldMask added in v0.12.0

type UserWithBeforePatchApplyFieldMask interface {
	BeforePatchApplyFieldMask(context.Context, *User, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type UserWithBeforePatchRead added in v0.12.0

type UserWithBeforePatchRead interface {
	BeforePatchRead(context.Context, *User, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type UserWithBeforePatchSave added in v0.9.1

type UserWithBeforePatchSave interface {
	BeforePatchSave(context.Context, *User, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error)
}

type UserWithBeforeToORM

type UserWithBeforeToORM interface {
	BeforeToORM(context.Context, *UserORM) error
}

UserBeforeToORM called before default ToORM code

type UserWithBeforeToPB

type UserWithBeforeToPB interface {
	BeforeToPB(context.Context, *User) error
}

UserBeforeToPB called before default ToPB code

Jump to

Keyboard shortcuts

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