Documentation ¶
Index ¶
- Variables
- func LookupCrudModelColumn(field string) string
- func LookupCrudModelColumns(paths []string) (cols []string)
- type Crud
- func (x *Crud) AsModel() (*CrudModel, error)
- func (*Crud) Descriptor() ([]byte, []int)deprecated
- func (x *Crud) GetBoolField() bool
- func (x *Crud) GetInt32Field() int32
- func (x *Crud) GetStringField() string
- func (x *Crud) GetUuid() string
- func (*Crud) ProtoMessage()
- func (x *Crud) ProtoReflect() protoreflect.Message
- func (x *Crud) Reset()
- func (x *Crud) String() string
- func (x *Crud) WithDB(db *gorm.DB) CrudWithDB
- type CrudGetOption
- type CrudListOption
- type CrudModel
- type CrudWithDB
- func (c CrudWithDB) Create(ctx context.Context) (*Crud, error)
- func (c CrudWithDB) Delete(ctx context.Context) error
- func (c CrudWithDB) Get(ctx context.Context, opts ...CrudGetOption) (*Crud, error)
- func (c CrudWithDB) List(ctx context.Context, opts ...CrudListOption) ([]*Crud, error)
- func (c CrudWithDB) Patch(ctx context.Context, mask *fieldmaskpb.FieldMask) error
- func (c CrudWithDB) Update(ctx context.Context) (*Crud, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var File_crud_crud_proto protoreflect.FileDescriptor
Functions ¶
func LookupCrudModelColumn ¶
func LookupCrudModelColumns ¶
Types ¶
type Crud ¶
type Crud struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` StringField string `protobuf:"bytes,2,opt,name=string_field,json=stringField,proto3" json:"string_field,omitempty"` Int32Field int32 `protobuf:"varint,3,opt,name=int32_field,json=int32Field,proto3" json:"int32_field,omitempty"` BoolField bool `protobuf:"varint,4,opt,name=bool_field,json=boolField,proto3" json:"bool_field,omitempty"` // contains filtered or unexported fields }
func (*Crud) Descriptor
deprecated
func (*Crud) GetBoolField ¶
func (*Crud) GetInt32Field ¶
func (*Crud) GetStringField ¶
func (*Crud) ProtoMessage ¶
func (*Crud) ProtoMessage()
func (*Crud) ProtoReflect ¶
func (x *Crud) ProtoReflect() protoreflect.Message
type CrudGetOption ¶
func WithCrudGetFieldMask ¶
func WithCrudGetFieldMask(mask *fieldmaskpb.FieldMask) CrudGetOption
type CrudListOption ¶
func WithCrudListFieldMask ¶
func WithCrudListFieldMask(mask *fieldmaskpb.FieldMask) CrudListOption
func WithCrudListFilter ¶
func WithCrudListFilter(filter string) CrudListOption
func WithCrudListLimit ¶
func WithCrudListLimit(n int) CrudListOption
func WithCrudListOffset ¶
func WithCrudListOffset(n int) CrudListOption
func WithCrudListOrder ¶
func WithCrudListOrder(order string) CrudListOption
type CrudModel ¶
type CrudModel struct { Uuid string `gorm:"primaryKey"` StringField string Int32Field int32 BoolField bool `gorm:"column:enabled"` }
CrudModel is the GORM model for crud.Crud.
type CrudWithDB ¶
type CrudWithDB struct {
// contains filtered or unexported fields
}
func (CrudWithDB) Get ¶
func (c CrudWithDB) Get(ctx context.Context, opts ...CrudGetOption) (*Crud, error)
func (CrudWithDB) List ¶
func (c CrudWithDB) List(ctx context.Context, opts ...CrudListOption) ([]*Crud, error)
func (CrudWithDB) Patch ¶
func (c CrudWithDB) Patch(ctx context.Context, mask *fieldmaskpb.FieldMask) error
Click to show internal directories.
Click to hide internal directories.