Documentation ¶
Index ¶
- Variables
- type EnumOptions
- type EnumValueOptions
- type FieldOptions
- func (*FieldOptions) Descriptor() ([]byte, []int)deprecated
- func (x *FieldOptions) GetAutoCreateTime() bool
- func (x *FieldOptions) GetAutoCreateTimeType() TimeType
- func (x *FieldOptions) GetAutoUpdateTime() bool
- func (x *FieldOptions) GetAutoUpdateTimeType() TimeType
- func (x *FieldOptions) GetColumn() string
- func (x *FieldOptions) GetComment() string
- func (x *FieldOptions) GetDefault() string
- func (x *FieldOptions) GetDeny() *FieldPermissionsDenyList
- func (x *FieldOptions) GetIgnore() bool
- func (x *FieldOptions) GetIndex() []*Index
- func (x *FieldOptions) GetNotNull() bool
- func (m *FieldOptions) GetPermissions() isFieldOptions_Permissions
- func (x *FieldOptions) GetPrimaryKey() bool
- func (x *FieldOptions) GetUnique() bool
- func (x *FieldOptions) GetUniqueIndex() []*Index
- func (*FieldOptions) ProtoMessage()
- func (x *FieldOptions) ProtoReflect() protoreflect.Message
- func (x *FieldOptions) Reset()
- func (x *FieldOptions) String() string
- type FieldOptions_Deny
- type FieldOptions_Ignore
- type FieldPermissionsDenyList
- func (*FieldPermissionsDenyList) Descriptor() ([]byte, []int)deprecated
- func (x *FieldPermissionsDenyList) GetCreate() bool
- func (x *FieldPermissionsDenyList) GetRead() bool
- func (x *FieldPermissionsDenyList) GetUpdate() bool
- func (*FieldPermissionsDenyList) ProtoMessage()
- func (x *FieldPermissionsDenyList) ProtoReflect() protoreflect.Message
- func (x *FieldPermissionsDenyList) Reset()
- func (x *FieldPermissionsDenyList) String() string
- type FileOptions
- func (*FileOptions) Descriptor() ([]byte, []int)deprecated
- func (x *FileOptions) GetCrud() bool
- func (x *FileOptions) GetHooks() bool
- func (x *FileOptions) GetModel() bool
- func (x *FileOptions) GetValidate() bool
- func (*FileOptions) ProtoMessage()
- func (x *FileOptions) ProtoReflect() protoreflect.Message
- func (x *FileOptions) Reset()
- func (x *FileOptions) String() string
- type Index
- type MessageOptions
- func (*MessageOptions) Descriptor() ([]byte, []int)deprecated
- func (x *MessageOptions) GetCrud() bool
- func (x *MessageOptions) GetHooks() bool
- func (x *MessageOptions) GetModel() bool
- func (x *MessageOptions) GetTable() string
- func (x *MessageOptions) GetValidate() bool
- func (*MessageOptions) ProtoMessage()
- func (x *MessageOptions) ProtoReflect() protoreflect.Message
- func (x *MessageOptions) Reset()
- func (x *MessageOptions) String() string
- type MethodOptions
- type OneofOptions
- type ServiceOptions
- type TimeType
Constants ¶
This section is empty.
Variables ¶
var ( TimeType_name = map[int32]string{ 0: "GO_TIME_TIME", 1: "SECONDS", 2: "MILLISECONDS", 3: "NANOSECONDS", } TimeType_value = map[string]int32{ "GO_TIME_TIME": 0, "SECONDS": 1, "MILLISECONDS": 2, "NANOSECONDS": 3, } )
Enum value maps for TimeType.
var (
// optional gorm.v2.EnumOptions enum = 50104;
E_Enum = &file_gorm_v2_options_proto_extTypes[4]
)
Extension fields to descriptorpb.EnumOptions.
var (
// optional gorm.v2.EnumValueOptions enum_value = 50105;
E_EnumValue = &file_gorm_v2_options_proto_extTypes[5]
)
Extension fields to descriptorpb.EnumValueOptions.
var (
// optional gorm.v2.FieldOptions field = 50102;
E_Field = &file_gorm_v2_options_proto_extTypes[2]
)
Extension fields to descriptorpb.FieldOptions.
var (
// optional gorm.v2.FileOptions file = 50100;
E_File = &file_gorm_v2_options_proto_extTypes[0]
)
Extension fields to descriptorpb.FileOptions.
var (
// optional gorm.v2.MessageOptions message = 50101;
E_Message = &file_gorm_v2_options_proto_extTypes[1]
)
Extension fields to descriptorpb.MessageOptions.
var (
// optional gorm.v2.MethodOptions method = 50107;
E_Method = &file_gorm_v2_options_proto_extTypes[7]
)
Extension fields to descriptorpb.MethodOptions.
var (
// optional gorm.v2.OneofOptions oneof = 50103;
E_Oneof = &file_gorm_v2_options_proto_extTypes[3]
)
Extension fields to descriptorpb.OneofOptions.
var (
// optional gorm.v2.ServiceOptions service = 50106;
E_Service = &file_gorm_v2_options_proto_extTypes[6]
)
Extension fields to descriptorpb.ServiceOptions.
var File_gorm_v2_options_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type EnumOptions ¶
type EnumOptions struct {
// contains filtered or unexported fields
}
func (*EnumOptions) Descriptor
deprecated
func (*EnumOptions) Descriptor() ([]byte, []int)
Deprecated: Use EnumOptions.ProtoReflect.Descriptor instead.
func (*EnumOptions) ProtoMessage ¶
func (*EnumOptions) ProtoMessage()
func (*EnumOptions) ProtoReflect ¶
func (x *EnumOptions) ProtoReflect() protoreflect.Message
func (*EnumOptions) Reset ¶
func (x *EnumOptions) Reset()
func (*EnumOptions) String ¶
func (x *EnumOptions) String() string
type EnumValueOptions ¶
type EnumValueOptions struct {
// contains filtered or unexported fields
}
func (*EnumValueOptions) Descriptor
deprecated
func (*EnumValueOptions) Descriptor() ([]byte, []int)
Deprecated: Use EnumValueOptions.ProtoReflect.Descriptor instead.
func (*EnumValueOptions) ProtoMessage ¶
func (*EnumValueOptions) ProtoMessage()
func (*EnumValueOptions) ProtoReflect ¶
func (x *EnumValueOptions) ProtoReflect() protoreflect.Message
func (*EnumValueOptions) Reset ¶
func (x *EnumValueOptions) Reset()
func (*EnumValueOptions) String ¶
func (x *EnumValueOptions) String() string
type FieldOptions ¶
type FieldOptions struct { // Name of the column in the database. Column string `protobuf:"bytes,1,opt,name=column,proto3" json:"column,omitempty"` // The field must not be null. NotNull bool `protobuf:"varint,6,opt,name=not_null,json=notNull,proto3" json:"not_null,omitempty"` // Use this default value for this column. // Note that zero values (0, "", false) are not supported by GORM. Default string `protobuf:"bytes,7,opt,name=default,proto3" json:"default,omitempty"` // Require the column's data to be unique among all the rows in the table. Unique bool `protobuf:"varint,8,opt,name=unique,proto3" json:"unique,omitempty"` // Mark the column as primary key. // Multiple primary keys create a composite primary key. // Implies auto_increment=true for integer columns. PrimaryKey bool `protobuf:"varint,9,opt,name=primary_key,json=primaryKey,proto3" json:"primary_key,omitempty"` Index []*Index `protobuf:"bytes,10,rep,name=index,proto3" json:"index,omitempty"` // Let the index enforce uniqueness of the column's value. UniqueIndex []*Index `protobuf:"bytes,11,rep,name=unique_index,json=uniqueIndex,proto3" json:"unique_index,omitempty"` // Let this field track the creation time as time.Time. AutoCreateTime bool `protobuf:"varint,14,opt,name=auto_create_time,json=autoCreateTime,proto3" json:"auto_create_time,omitempty"` AutoCreateTimeType TimeType `` /* 143-byte string literal not displayed */ // Let this field track the update time as time.Time. AutoUpdateTime bool `protobuf:"varint,16,opt,name=auto_update_time,json=autoUpdateTime,proto3" json:"auto_update_time,omitempty"` AutoUpdateTimeType TimeType `` /* 143-byte string literal not displayed */ // Types that are assignable to Permissions: // *FieldOptions_Ignore // *FieldOptions_Deny Permissions isFieldOptions_Permissions `protobuf_oneof:"permissions"` // Comment used in migrations. Comment string `protobuf:"bytes,24,opt,name=comment,proto3" json:"comment,omitempty"` // contains filtered or unexported fields }
func (*FieldOptions) Descriptor
deprecated
func (*FieldOptions) Descriptor() ([]byte, []int)
Deprecated: Use FieldOptions.ProtoReflect.Descriptor instead.
func (*FieldOptions) GetAutoCreateTime ¶
func (x *FieldOptions) GetAutoCreateTime() bool
func (*FieldOptions) GetAutoCreateTimeType ¶
func (x *FieldOptions) GetAutoCreateTimeType() TimeType
func (*FieldOptions) GetAutoUpdateTime ¶
func (x *FieldOptions) GetAutoUpdateTime() bool
func (*FieldOptions) GetAutoUpdateTimeType ¶
func (x *FieldOptions) GetAutoUpdateTimeType() TimeType
func (*FieldOptions) GetColumn ¶
func (x *FieldOptions) GetColumn() string
func (*FieldOptions) GetComment ¶
func (x *FieldOptions) GetComment() string
func (*FieldOptions) GetDefault ¶
func (x *FieldOptions) GetDefault() string
func (*FieldOptions) GetDeny ¶
func (x *FieldOptions) GetDeny() *FieldPermissionsDenyList
func (*FieldOptions) GetIgnore ¶
func (x *FieldOptions) GetIgnore() bool
func (*FieldOptions) GetIndex ¶
func (x *FieldOptions) GetIndex() []*Index
func (*FieldOptions) GetNotNull ¶
func (x *FieldOptions) GetNotNull() bool
func (*FieldOptions) GetPermissions ¶
func (m *FieldOptions) GetPermissions() isFieldOptions_Permissions
func (*FieldOptions) GetPrimaryKey ¶
func (x *FieldOptions) GetPrimaryKey() bool
func (*FieldOptions) GetUnique ¶
func (x *FieldOptions) GetUnique() bool
func (*FieldOptions) GetUniqueIndex ¶
func (x *FieldOptions) GetUniqueIndex() []*Index
func (*FieldOptions) ProtoMessage ¶
func (*FieldOptions) ProtoMessage()
func (*FieldOptions) ProtoReflect ¶
func (x *FieldOptions) ProtoReflect() protoreflect.Message
func (*FieldOptions) Reset ¶
func (x *FieldOptions) Reset()
func (*FieldOptions) String ¶
func (x *FieldOptions) String() string
type FieldOptions_Deny ¶
type FieldOptions_Deny struct {
Deny *FieldPermissionsDenyList `protobuf:"bytes,23,opt,name=deny,proto3,oneof"`
}
type FieldOptions_Ignore ¶
type FieldOptions_Ignore struct { // Equivalent to gorm:"-" Ignore bool `protobuf:"varint,22,opt,name=ignore,proto3,oneof"` }
type FieldPermissionsDenyList ¶
type FieldPermissionsDenyList struct { // Deny creation, allow updates. // Equivalent to gorm:"<-:update". Create bool `protobuf:"varint,2,opt,name=create,proto3" json:"create,omitempty"` // Deny updates, allow creation. // Equivalent to gorm:"<-:create". Update bool `protobuf:"varint,3,opt,name=update,proto3" json:"update,omitempty"` // Deny reads. // Equivalent to gorm:"->:false". Read bool `protobuf:"varint,4,opt,name=read,proto3" json:"read,omitempty"` // contains filtered or unexported fields }
func (*FieldPermissionsDenyList) Descriptor
deprecated
func (*FieldPermissionsDenyList) Descriptor() ([]byte, []int)
Deprecated: Use FieldPermissionsDenyList.ProtoReflect.Descriptor instead.
func (*FieldPermissionsDenyList) GetCreate ¶
func (x *FieldPermissionsDenyList) GetCreate() bool
func (*FieldPermissionsDenyList) GetRead ¶
func (x *FieldPermissionsDenyList) GetRead() bool
func (*FieldPermissionsDenyList) GetUpdate ¶
func (x *FieldPermissionsDenyList) GetUpdate() bool
func (*FieldPermissionsDenyList) ProtoMessage ¶
func (*FieldPermissionsDenyList) ProtoMessage()
func (*FieldPermissionsDenyList) ProtoReflect ¶
func (x *FieldPermissionsDenyList) ProtoReflect() protoreflect.Message
func (*FieldPermissionsDenyList) Reset ¶
func (x *FieldPermissionsDenyList) Reset()
func (*FieldPermissionsDenyList) String ¶
func (x *FieldPermissionsDenyList) String() string
type FileOptions ¶
type FileOptions struct { // Set model=true for all messages. Model bool `protobuf:"varint,1,opt,name=model,proto3" json:"model,omitempty"` // Set hooks=true for all messages. Hooks bool `protobuf:"varint,2,opt,name=hooks,proto3" json:"hooks,omitempty"` // Set validate=true for all messages. Validate bool `protobuf:"varint,3,opt,name=validate,proto3" json:"validate,omitempty"` // Set crud=true for all messages. Crud bool `protobuf:"varint,4,opt,name=crud,proto3" json:"crud,omitempty"` // contains filtered or unexported fields }
func (*FileOptions) Descriptor
deprecated
func (*FileOptions) Descriptor() ([]byte, []int)
Deprecated: Use FileOptions.ProtoReflect.Descriptor instead.
func (*FileOptions) GetCrud ¶
func (x *FileOptions) GetCrud() bool
func (*FileOptions) GetHooks ¶
func (x *FileOptions) GetHooks() bool
func (*FileOptions) GetModel ¶
func (x *FileOptions) GetModel() bool
func (*FileOptions) GetValidate ¶
func (x *FileOptions) GetValidate() bool
func (*FileOptions) ProtoMessage ¶
func (*FileOptions) ProtoMessage()
func (*FileOptions) ProtoReflect ¶
func (x *FileOptions) ProtoReflect() protoreflect.Message
func (*FileOptions) Reset ¶
func (x *FileOptions) Reset()
func (*FileOptions) String ¶
func (x *FileOptions) String() string
type Index ¶
type Index struct { // Generate the default index. // Equivalent to gorm:"index"`. Default bool `protobuf:"varint,1,opt,name=default,proto3" json:"default,omitempty"` // Set the index name. // Equivalent to gorm:"index:<name>"`. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*Index) Descriptor
deprecated
func (*Index) GetDefault ¶
func (*Index) ProtoMessage ¶
func (*Index) ProtoMessage()
func (*Index) ProtoReflect ¶
func (x *Index) ProtoReflect() protoreflect.Message
type MessageOptions ¶
type MessageOptions struct { // Generate a GORM model for this message. Model bool `protobuf:"varint,1,opt,name=model,proto3" json:"model,omitempty"` // Generate functions to defined hooks for this message; // Implies model=true. Hooks bool `protobuf:"varint,2,opt,name=hooks,proto3" json:"hooks,omitempty"` // Validate the model before saving. // Expects usage of https://github.com/envoyproxy/protoc-gen-validate. // Implies model=true. Validate bool `protobuf:"varint,3,opt,name=validate,proto3" json:"validate,omitempty"` // Generate functions to create, read, update, and delete (CRUD) objects. // Implies model=true. Crud bool `protobuf:"varint,4,opt,name=crud,proto3" json:"crud,omitempty"` // Override the table name. Table string `protobuf:"bytes,5,opt,name=table,proto3" json:"table,omitempty"` // contains filtered or unexported fields }
func (*MessageOptions) Descriptor
deprecated
func (*MessageOptions) Descriptor() ([]byte, []int)
Deprecated: Use MessageOptions.ProtoReflect.Descriptor instead.
func (*MessageOptions) GetCrud ¶
func (x *MessageOptions) GetCrud() bool
func (*MessageOptions) GetHooks ¶
func (x *MessageOptions) GetHooks() bool
func (*MessageOptions) GetModel ¶
func (x *MessageOptions) GetModel() bool
func (*MessageOptions) GetTable ¶
func (x *MessageOptions) GetTable() string
func (*MessageOptions) GetValidate ¶
func (x *MessageOptions) GetValidate() bool
func (*MessageOptions) ProtoMessage ¶
func (*MessageOptions) ProtoMessage()
func (*MessageOptions) ProtoReflect ¶
func (x *MessageOptions) ProtoReflect() protoreflect.Message
func (*MessageOptions) Reset ¶
func (x *MessageOptions) Reset()
func (*MessageOptions) String ¶
func (x *MessageOptions) String() string
type MethodOptions ¶
type MethodOptions struct {
// contains filtered or unexported fields
}
func (*MethodOptions) Descriptor
deprecated
func (*MethodOptions) Descriptor() ([]byte, []int)
Deprecated: Use MethodOptions.ProtoReflect.Descriptor instead.
func (*MethodOptions) ProtoMessage ¶
func (*MethodOptions) ProtoMessage()
func (*MethodOptions) ProtoReflect ¶
func (x *MethodOptions) ProtoReflect() protoreflect.Message
func (*MethodOptions) Reset ¶
func (x *MethodOptions) Reset()
func (*MethodOptions) String ¶
func (x *MethodOptions) String() string
type OneofOptions ¶
type OneofOptions struct {
// contains filtered or unexported fields
}
func (*OneofOptions) Descriptor
deprecated
func (*OneofOptions) Descriptor() ([]byte, []int)
Deprecated: Use OneofOptions.ProtoReflect.Descriptor instead.
func (*OneofOptions) ProtoMessage ¶
func (*OneofOptions) ProtoMessage()
func (*OneofOptions) ProtoReflect ¶
func (x *OneofOptions) ProtoReflect() protoreflect.Message
func (*OneofOptions) Reset ¶
func (x *OneofOptions) Reset()
func (*OneofOptions) String ¶
func (x *OneofOptions) String() string
type ServiceOptions ¶
type ServiceOptions struct {
// contains filtered or unexported fields
}
func (*ServiceOptions) Descriptor
deprecated
func (*ServiceOptions) Descriptor() ([]byte, []int)
Deprecated: Use ServiceOptions.ProtoReflect.Descriptor instead.
func (*ServiceOptions) ProtoMessage ¶
func (*ServiceOptions) ProtoMessage()
func (*ServiceOptions) ProtoReflect ¶
func (x *ServiceOptions) ProtoReflect() protoreflect.Message
func (*ServiceOptions) Reset ¶
func (x *ServiceOptions) Reset()
func (*ServiceOptions) String ¶
func (x *ServiceOptions) String() string
type TimeType ¶
type TimeType int32
func (TimeType) Descriptor ¶
func (TimeType) Descriptor() protoreflect.EnumDescriptor
func (TimeType) EnumDescriptor
deprecated
func (TimeType) Number ¶
func (x TimeType) Number() protoreflect.EnumNumber
func (TimeType) Type ¶
func (TimeType) Type() protoreflect.EnumType