Documentation
¶
Index ¶
- Variables
- type Foreign
- type MethodOptions
- type Relation
- func (*Relation) Descriptor() ([]byte, []int)deprecated
- func (x *Relation) GetField() string
- func (x *Relation) GetForeign() *Foreign
- func (x *Relation) GetReference() string
- func (*Relation) ProtoMessage()
- func (x *Relation) ProtoReflect() protoreflect.Message
- func (x *Relation) Reset()
- func (x *Relation) String() string
- type StructifyDBOptions
- func (*StructifyDBOptions) Descriptor() ([]byte, []int)deprecated
- func (x *StructifyDBOptions) GetProvider() string
- func (x *StructifyDBOptions) GetUrl() string
- func (x *StructifyDBOptions) GetUrlEnv() string
- func (*StructifyDBOptions) ProtoMessage()
- func (x *StructifyDBOptions) ProtoReflect() protoreflect.Message
- func (x *StructifyDBOptions) Reset()
- func (x *StructifyDBOptions) String() string
- type StructifyFieldOptions
- func (*StructifyFieldOptions) Descriptor() ([]byte, []int)deprecated
- func (x *StructifyFieldOptions) GetAutoIncrement() bool
- func (x *StructifyFieldOptions) GetDefault() string
- func (x *StructifyFieldOptions) GetInFilter() bool
- func (x *StructifyFieldOptions) GetIndex() bool
- func (x *StructifyFieldOptions) GetJson() bool
- func (x *StructifyFieldOptions) GetNullable() bool
- func (x *StructifyFieldOptions) GetPrimaryKey() bool
- func (x *StructifyFieldOptions) GetRelation() *Relation
- func (x *StructifyFieldOptions) GetSkip() bool
- func (x *StructifyFieldOptions) GetUnique() bool
- func (x *StructifyFieldOptions) GetUuid() bool
- func (*StructifyFieldOptions) ProtoMessage()
- func (x *StructifyFieldOptions) ProtoReflect() protoreflect.Message
- func (x *StructifyFieldOptions) Reset()
- func (x *StructifyFieldOptions) String() string
- type StructifyMessageOptions
- func (*StructifyMessageOptions) Descriptor() ([]byte, []int)deprecated
- func (x *StructifyMessageOptions) GetComment() string
- func (x *StructifyMessageOptions) GetIndex() []string
- func (x *StructifyMessageOptions) GetTable() string
- func (x *StructifyMessageOptions) GetUniqueIndex() []*UniqueIndex
- func (*StructifyMessageOptions) ProtoMessage()
- func (x *StructifyMessageOptions) ProtoReflect() protoreflect.Message
- func (x *StructifyMessageOptions) Reset()
- func (x *StructifyMessageOptions) String() string
- type UniqueIndex
Constants ¶
This section is empty.
Variables ¶
var (
// optional structify.StructifyDBOptions db = 50002;
E_Db = &file_plugin_options_structify_proto_extTypes[0]
)
Extension fields to descriptorpb.FileOptions.
var (
// optional structify.StructifyFieldOptions field = 99432;
E_Field = &file_plugin_options_structify_proto_extTypes[2]
)
Extension fields to descriptorpb.FieldOptions.
var (
// optional structify.MethodOptions method = 99432;
E_Method = &file_plugin_options_structify_proto_extTypes[3]
)
Extension fields to descriptorpb.MethodOptions.
var (
// optional structify.StructifyMessageOptions opts = 99432;
E_Opts = &file_plugin_options_structify_proto_extTypes[1]
)
Extension fields to descriptorpb.MessageOptions.
var File_plugin_options_structify_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Foreign ¶ added in v1.0.3
type Foreign struct { Cascade bool `protobuf:"varint,3,opt,name=cascade,proto3" json:"cascade,omitempty"` // contains filtered or unexported fields }
func (*Foreign) Descriptor
deprecated
added in
v1.0.3
func (*Foreign) GetCascade ¶ added in v1.0.3
func (*Foreign) ProtoMessage ¶ added in v1.0.3
func (*Foreign) ProtoMessage()
func (*Foreign) ProtoReflect ¶ added in v1.0.3
func (x *Foreign) ProtoReflect() protoreflect.Message
type MethodOptions ¶
type MethodOptions struct { ObjectType string `protobuf:"bytes,1,opt,name=object_type,json=objectType,proto3" json:"object_type,omitempty"` // contains filtered or unexported fields }
MethodOptions defines the method options
func (*MethodOptions) Descriptor
deprecated
func (*MethodOptions) Descriptor() ([]byte, []int)
Deprecated: Use MethodOptions.ProtoReflect.Descriptor instead.
func (*MethodOptions) GetObjectType ¶
func (x *MethodOptions) GetObjectType() string
func (*MethodOptions) ProtoMessage ¶
func (*MethodOptions) ProtoMessage()
func (*MethodOptions) ProtoReflect ¶ added in v1.0.3
func (x *MethodOptions) ProtoReflect() protoreflect.Message
func (*MethodOptions) Reset ¶
func (x *MethodOptions) Reset()
func (*MethodOptions) String ¶
func (x *MethodOptions) String() string
type Relation ¶
type Relation struct { // field defines the field name Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` // reference defines the reference table Reference string `protobuf:"bytes,2,opt,name=reference,proto3" json:"reference,omitempty"` // cascade defines the cascade delete Foreign *Foreign `protobuf:"bytes,3,opt,name=foreign,proto3" json:"foreign,omitempty"` // contains filtered or unexported fields }
Relation defines the relation between two tables
func (*Relation) Descriptor
deprecated
func (*Relation) GetForeign ¶ added in v1.0.3
func (*Relation) GetReference ¶
func (*Relation) ProtoMessage ¶
func (*Relation) ProtoMessage()
func (*Relation) ProtoReflect ¶ added in v1.0.3
func (x *Relation) ProtoReflect() protoreflect.Message
type StructifyDBOptions ¶
type StructifyDBOptions struct { Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` UrlEnv string `protobuf:"bytes,3,opt,name=url_env,json=urlEnv,proto3" json:"url_env,omitempty"` // contains filtered or unexported fields }
StructifyDBOptions defines the options for the database connection
func (*StructifyDBOptions) Descriptor
deprecated
func (*StructifyDBOptions) Descriptor() ([]byte, []int)
Deprecated: Use StructifyDBOptions.ProtoReflect.Descriptor instead.
func (*StructifyDBOptions) GetProvider ¶
func (x *StructifyDBOptions) GetProvider() string
func (*StructifyDBOptions) GetUrl ¶
func (x *StructifyDBOptions) GetUrl() string
func (*StructifyDBOptions) GetUrlEnv ¶
func (x *StructifyDBOptions) GetUrlEnv() string
func (*StructifyDBOptions) ProtoMessage ¶
func (*StructifyDBOptions) ProtoMessage()
func (*StructifyDBOptions) ProtoReflect ¶ added in v1.0.3
func (x *StructifyDBOptions) ProtoReflect() protoreflect.Message
func (*StructifyDBOptions) Reset ¶
func (x *StructifyDBOptions) Reset()
func (*StructifyDBOptions) String ¶
func (x *StructifyDBOptions) String() string
type StructifyFieldOptions ¶
type StructifyFieldOptions struct { // primary_key defines the field as the primary key PrimaryKey bool `protobuf:"varint,1,opt,name=primary_key,json=primaryKey,proto3" json:"primary_key,omitempty"` // auto_increment defines the field as auto increment AutoIncrement bool `protobuf:"varint,2,opt,name=auto_increment,json=autoIncrement,proto3" json:"auto_increment,omitempty"` // unique defines the field as unique Unique bool `protobuf:"varint,3,opt,name=unique,proto3" json:"unique,omitempty"` // uuid defines the field as uuid Uuid bool `protobuf:"varint,4,opt,name=uuid,proto3" json:"uuid,omitempty"` // index defines the field as index Index bool `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"` // skip defines the field as skip Skip bool `protobuf:"varint,6,opt,name=skip,proto3" json:"skip,omitempty"` // nullable defines the field as nullable Nullable bool `protobuf:"varint,7,opt,name=nullable,proto3" json:"nullable,omitempty"` // default defines the field as default Default string `protobuf:"bytes,8,opt,name=default,proto3" json:"default,omitempty"` // relation defines the field as relation // 1:1, 1:n, n:1, n:n Relation *Relation `protobuf:"bytes,9,opt,name=relation,proto3" json:"relation,omitempty"` // json defines the field as json Json bool `protobuf:"varint,10,opt,name=json,proto3" json:"json,omitempty"` InFilter bool `protobuf:"varint,11,opt,name=in_filter,json=inFilter,proto3" json:"in_filter,omitempty"` // contains filtered or unexported fields }
StructifyFieldOptions defines database field options
func (*StructifyFieldOptions) Descriptor
deprecated
func (*StructifyFieldOptions) Descriptor() ([]byte, []int)
Deprecated: Use StructifyFieldOptions.ProtoReflect.Descriptor instead.
func (*StructifyFieldOptions) GetAutoIncrement ¶
func (x *StructifyFieldOptions) GetAutoIncrement() bool
func (*StructifyFieldOptions) GetDefault ¶
func (x *StructifyFieldOptions) GetDefault() string
func (*StructifyFieldOptions) GetInFilter ¶ added in v1.0.9
func (x *StructifyFieldOptions) GetInFilter() bool
func (*StructifyFieldOptions) GetIndex ¶
func (x *StructifyFieldOptions) GetIndex() bool
func (*StructifyFieldOptions) GetJson ¶
func (x *StructifyFieldOptions) GetJson() bool
func (*StructifyFieldOptions) GetNullable ¶
func (x *StructifyFieldOptions) GetNullable() bool
func (*StructifyFieldOptions) GetPrimaryKey ¶
func (x *StructifyFieldOptions) GetPrimaryKey() bool
func (*StructifyFieldOptions) GetRelation ¶
func (x *StructifyFieldOptions) GetRelation() *Relation
func (*StructifyFieldOptions) GetSkip ¶
func (x *StructifyFieldOptions) GetSkip() bool
func (*StructifyFieldOptions) GetUnique ¶
func (x *StructifyFieldOptions) GetUnique() bool
func (*StructifyFieldOptions) GetUuid ¶
func (x *StructifyFieldOptions) GetUuid() bool
func (*StructifyFieldOptions) ProtoMessage ¶
func (*StructifyFieldOptions) ProtoMessage()
func (*StructifyFieldOptions) ProtoReflect ¶ added in v1.0.3
func (x *StructifyFieldOptions) ProtoReflect() protoreflect.Message
func (*StructifyFieldOptions) Reset ¶
func (x *StructifyFieldOptions) Reset()
func (*StructifyFieldOptions) String ¶
func (x *StructifyFieldOptions) String() string
type StructifyMessageOptions ¶
type StructifyMessageOptions struct { Table string `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"` Comment string `protobuf:"bytes,2,opt,name=comment,proto3" json:"comment,omitempty"` UniqueIndex []*UniqueIndex `protobuf:"bytes,3,rep,name=unique_index,json=uniqueIndex,proto3" json:"unique_index,omitempty"` Index []string `protobuf:"bytes,4,rep,name=index,proto3" json:"index,omitempty"` // contains filtered or unexported fields }
StructifyMessageOptions defines database table and comment
func (*StructifyMessageOptions) Descriptor
deprecated
func (*StructifyMessageOptions) Descriptor() ([]byte, []int)
Deprecated: Use StructifyMessageOptions.ProtoReflect.Descriptor instead.
func (*StructifyMessageOptions) GetComment ¶
func (x *StructifyMessageOptions) GetComment() string
func (*StructifyMessageOptions) GetIndex ¶ added in v1.0.5
func (x *StructifyMessageOptions) GetIndex() []string
func (*StructifyMessageOptions) GetTable ¶
func (x *StructifyMessageOptions) GetTable() string
func (*StructifyMessageOptions) GetUniqueIndex ¶ added in v1.0.5
func (x *StructifyMessageOptions) GetUniqueIndex() []*UniqueIndex
func (*StructifyMessageOptions) ProtoMessage ¶
func (*StructifyMessageOptions) ProtoMessage()
func (*StructifyMessageOptions) ProtoReflect ¶ added in v1.0.3
func (x *StructifyMessageOptions) ProtoReflect() protoreflect.Message
func (*StructifyMessageOptions) Reset ¶
func (x *StructifyMessageOptions) Reset()
func (*StructifyMessageOptions) String ¶
func (x *StructifyMessageOptions) String() string
type UniqueIndex ¶ added in v1.0.5
type UniqueIndex struct { Fields []string `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"` // contains filtered or unexported fields }
func (*UniqueIndex) Descriptor
deprecated
added in
v1.0.5
func (*UniqueIndex) Descriptor() ([]byte, []int)
Deprecated: Use UniqueIndex.ProtoReflect.Descriptor instead.
func (*UniqueIndex) GetFields ¶ added in v1.0.5
func (x *UniqueIndex) GetFields() []string
func (*UniqueIndex) ProtoMessage ¶ added in v1.0.5
func (*UniqueIndex) ProtoMessage()
func (*UniqueIndex) ProtoReflect ¶ added in v1.0.5
func (x *UniqueIndex) ProtoReflect() protoreflect.Message
func (*UniqueIndex) Reset ¶ added in v1.0.5
func (x *UniqueIndex) Reset()
func (*UniqueIndex) String ¶ added in v1.0.5
func (x *UniqueIndex) String() string