gorm

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FieldWritePermission_name = map[int32]string{
		1: "FieldWritePermissionUpdateOnly",
		2: "FieldWritePermissionCreateOnly",
		3: "FieldWritePermissionNo",
		4: "FieldWritePermissionCreateUpdate",
	}
	FieldWritePermission_value = map[string]int32{
		"FieldWritePermissionUpdateOnly":   1,
		"FieldWritePermissionCreateOnly":   2,
		"FieldWritePermissionNo":           3,
		"FieldWritePermissionCreateUpdate": 4,
	}
)

Enum value maps for FieldWritePermission.

View Source
var (
	// optional gorm.GormFieldOptions field = 52119;
	E_Field = &file_options_gorm_proto_extTypes[2]
)

Extension fields to descriptor.FieldOptions.

View Source
var (
	// optional gorm.GormFileOptions file_opts = 52119;
	E_FileOpts = &file_options_gorm_proto_extTypes[0]
)

Extension fields to descriptor.FileOptions.

View Source
var (
	// ormable will cause orm code to be generated for this message/object
	//
	// optional gorm.GormMessageOptions opts = 52119;
	E_Opts = &file_options_gorm_proto_extTypes[1]
)

Extension fields to descriptor.MessageOptions.

View Source
var File_options_gorm_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BelongsToOptions added in v0.5.0

type BelongsToOptions struct {
	ForeignKey    *string  `protobuf:"bytes,1,opt,name=foreign_key,json=foreignKey" json:"foreign_key,omitempty"`
	ForeignKeyTag *GormTag `protobuf:"bytes,2,opt,name=foreign_key_tag,json=foreignKeyTag" json:"foreign_key_tag,omitempty"`
	References    *string  `protobuf:"bytes,3,opt,name=references" json:"references,omitempty"`
	// contains filtered or unexported fields
}

func (*BelongsToOptions) Descriptor deprecated added in v0.5.0

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

Deprecated: Use BelongsToOptions.ProtoReflect.Descriptor instead.

func (*BelongsToOptions) GetForeignKey added in v0.21.0

func (x *BelongsToOptions) GetForeignKey() string

func (*BelongsToOptions) GetForeignKeyTag added in v0.21.0

func (x *BelongsToOptions) GetForeignKeyTag() *GormTag

func (*BelongsToOptions) GetReferences added in v0.21.0

func (x *BelongsToOptions) GetReferences() string

func (*BelongsToOptions) ProtoMessage added in v0.5.0

func (*BelongsToOptions) ProtoMessage()

func (*BelongsToOptions) ProtoReflect added in v0.21.0

func (x *BelongsToOptions) ProtoReflect() protoreflect.Message

func (*BelongsToOptions) Reset added in v0.5.0

func (x *BelongsToOptions) Reset()

func (*BelongsToOptions) String added in v0.5.0

func (x *BelongsToOptions) String() string

type ExtraField

type ExtraField struct {
	Type    *string  `protobuf:"bytes,1,req,name=type" json:"type,omitempty"`
	Name    *string  `protobuf:"bytes,2,req,name=name" json:"name,omitempty"`
	Tag     *GormTag `protobuf:"bytes,3,opt,name=tag" json:"tag,omitempty"`
	Package *string  `protobuf:"bytes,4,opt,name=package" json:"package,omitempty"`
	// contains filtered or unexported fields
}

func (*ExtraField) Descriptor deprecated

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

Deprecated: Use ExtraField.ProtoReflect.Descriptor instead.

func (*ExtraField) GetName

func (x *ExtraField) GetName() string

func (*ExtraField) GetPackage added in v0.6.0

func (x *ExtraField) GetPackage() string

func (*ExtraField) GetTag added in v0.5.0

func (x *ExtraField) GetTag() *GormTag

func (*ExtraField) GetType

func (x *ExtraField) GetType() string

func (*ExtraField) ProtoMessage

func (*ExtraField) ProtoMessage()

func (*ExtraField) ProtoReflect added in v0.21.0

func (x *ExtraField) ProtoReflect() protoreflect.Message

func (*ExtraField) Reset

func (x *ExtraField) Reset()

func (*ExtraField) String

func (x *ExtraField) String() string

type FieldWritePermission added in v0.21.0

type FieldWritePermission int32
const (
	FieldWritePermission_FieldWritePermissionUpdateOnly   FieldWritePermission = 1
	FieldWritePermission_FieldWritePermissionCreateOnly   FieldWritePermission = 2
	FieldWritePermission_FieldWritePermissionNo           FieldWritePermission = 3
	FieldWritePermission_FieldWritePermissionCreateUpdate FieldWritePermission = 4
)

func (FieldWritePermission) Descriptor added in v0.21.0

func (FieldWritePermission) Enum added in v0.21.0

func (FieldWritePermission) EnumDescriptor deprecated added in v0.21.0

func (FieldWritePermission) EnumDescriptor() ([]byte, []int)

Deprecated: Use FieldWritePermission.Descriptor instead.

func (FieldWritePermission) Number added in v0.21.0

func (FieldWritePermission) String added in v0.21.0

func (x FieldWritePermission) String() string

func (FieldWritePermission) Type added in v0.21.0

func (*FieldWritePermission) UnmarshalJSON deprecated added in v0.21.0

func (x *FieldWritePermission) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type GormFieldOptions

type GormFieldOptions struct {
	Tag  *GormTag `protobuf:"bytes,1,opt,name=tag" json:"tag,omitempty"`
	Drop *bool    `protobuf:"varint,2,opt,name=drop" json:"drop,omitempty"`
	// Types that are assignable to Association:
	//	*GormFieldOptions_HasOne
	//	*GormFieldOptions_BelongsTo
	//	*GormFieldOptions_HasMany
	//	*GormFieldOptions_ManyToMany
	Association isGormFieldOptions_Association `protobuf_oneof:"association"`
	ReferenceOf *string                        `protobuf:"bytes,7,opt,name=reference_of,json=referenceOf" json:"reference_of,omitempty"`
	// contains filtered or unexported fields
}

func (*GormFieldOptions) Descriptor deprecated

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

Deprecated: Use GormFieldOptions.ProtoReflect.Descriptor instead.

func (*GormFieldOptions) GetAssociation added in v0.5.0

func (m *GormFieldOptions) GetAssociation() isGormFieldOptions_Association

func (*GormFieldOptions) GetBelongsTo added in v0.5.0

func (x *GormFieldOptions) GetBelongsTo() *BelongsToOptions

func (*GormFieldOptions) GetDrop

func (x *GormFieldOptions) GetDrop() bool

func (*GormFieldOptions) GetHasMany added in v0.5.0

func (x *GormFieldOptions) GetHasMany() *HasManyOptions

func (*GormFieldOptions) GetHasOne added in v0.5.0

func (x *GormFieldOptions) GetHasOne() *HasOneOptions

func (*GormFieldOptions) GetManyToMany added in v0.5.0

func (x *GormFieldOptions) GetManyToMany() *ManyToManyOptions

func (*GormFieldOptions) GetReferenceOf added in v0.8.0

func (x *GormFieldOptions) GetReferenceOf() string

func (*GormFieldOptions) GetTag added in v0.5.0

func (x *GormFieldOptions) GetTag() *GormTag

func (*GormFieldOptions) ProtoMessage

func (*GormFieldOptions) ProtoMessage()

func (*GormFieldOptions) ProtoReflect added in v0.21.0

func (x *GormFieldOptions) ProtoReflect() protoreflect.Message

func (*GormFieldOptions) Reset

func (x *GormFieldOptions) Reset()

func (*GormFieldOptions) String

func (x *GormFieldOptions) String() string

type GormFieldOptions_BelongsTo added in v0.5.0

type GormFieldOptions_BelongsTo struct {
	BelongsTo *BelongsToOptions `protobuf:"bytes,4,opt,name=belongs_to,json=belongsTo,oneof"`
}

type GormFieldOptions_HasMany added in v0.5.0

type GormFieldOptions_HasMany struct {
	HasMany *HasManyOptions `protobuf:"bytes,5,opt,name=has_many,json=hasMany,oneof"`
}

type GormFieldOptions_HasOne added in v0.5.0

type GormFieldOptions_HasOne struct {
	HasOne *HasOneOptions `protobuf:"bytes,3,opt,name=has_one,json=hasOne,oneof"`
}

type GormFieldOptions_ManyToMany added in v0.5.0

type GormFieldOptions_ManyToMany struct {
	ManyToMany *ManyToManyOptions `protobuf:"bytes,6,opt,name=many_to_many,json=manyToMany,oneof"`
}

type GormFileOptions

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

func (*GormFileOptions) Descriptor deprecated

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

Deprecated: Use GormFileOptions.ProtoReflect.Descriptor instead.

func (*GormFileOptions) ProtoMessage

func (*GormFileOptions) ProtoMessage()

func (*GormFileOptions) ProtoReflect added in v0.21.0

func (x *GormFileOptions) ProtoReflect() protoreflect.Message

func (*GormFileOptions) Reset

func (x *GormFileOptions) Reset()

func (*GormFileOptions) String

func (x *GormFileOptions) String() string

type GormMessageOptions

type GormMessageOptions struct {
	Ormable *bool         `protobuf:"varint,1,req,name=ormable" json:"ormable,omitempty"`
	Include []*ExtraField `protobuf:"bytes,2,rep,name=include" json:"include,omitempty"`
	Table   *string       `protobuf:"bytes,3,opt,name=table" json:"table,omitempty"`
	// contains filtered or unexported fields
}

func (*GormMessageOptions) Descriptor deprecated

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

Deprecated: Use GormMessageOptions.ProtoReflect.Descriptor instead.

func (*GormMessageOptions) GetInclude

func (x *GormMessageOptions) GetInclude() []*ExtraField

func (*GormMessageOptions) GetOrmable

func (x *GormMessageOptions) GetOrmable() bool

func (*GormMessageOptions) GetTable

func (x *GormMessageOptions) GetTable() string

func (*GormMessageOptions) ProtoMessage

func (*GormMessageOptions) ProtoMessage()

func (*GormMessageOptions) ProtoReflect added in v0.21.0

func (x *GormMessageOptions) ProtoReflect() protoreflect.Message

func (*GormMessageOptions) Reset

func (x *GormMessageOptions) Reset()

func (*GormMessageOptions) String

func (x *GormMessageOptions) String() string

type GormTag added in v0.5.0

type GormTag struct {
	Column          *string               `protobuf:"bytes,1,opt,name=column" json:"column,omitempty"`
	Type            *string               `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"`
	Size            *int32                `protobuf:"varint,3,opt,name=size" json:"size,omitempty"`
	Precision       *int32                `protobuf:"varint,4,opt,name=precision" json:"precision,omitempty"`
	PrimaryKey      *bool                 `protobuf:"varint,5,opt,name=primary_key,json=primaryKey" json:"primary_key,omitempty"`
	Unique          *bool                 `protobuf:"varint,6,opt,name=unique" json:"unique,omitempty"`
	Default         *string               `protobuf:"bytes,7,opt,name=default" json:"default,omitempty"`
	NotNull         *bool                 `protobuf:"varint,8,opt,name=not_null,json=notNull" json:"not_null,omitempty"`
	AutoIncrement   *bool                 `protobuf:"varint,9,opt,name=auto_increment,json=autoIncrement" json:"auto_increment,omitempty"`
	Index           *string               `protobuf:"bytes,10,opt,name=index" json:"index,omitempty"`
	UniqueIndex     *string               `protobuf:"bytes,11,opt,name=unique_index,json=uniqueIndex" json:"unique_index,omitempty"`
	Embedded        *bool                 `protobuf:"varint,12,opt,name=embedded" json:"embedded,omitempty"`
	EmbeddedPrefix  *string               `protobuf:"bytes,13,opt,name=embedded_prefix,json=embeddedPrefix" json:"embedded_prefix,omitempty"`
	Ignore          *bool                 `protobuf:"varint,14,opt,name=ignore" json:"ignore,omitempty"`
	ForeignKey      *string               `protobuf:"bytes,15,opt,name=foreign_key,json=foreignKey" json:"foreign_key,omitempty"`
	References      *string               `protobuf:"bytes,16,opt,name=references" json:"references,omitempty"`
	ManyToMany      *string               `protobuf:"bytes,17,opt,name=many_to_many,json=manyToMany" json:"many_to_many,omitempty"`
	JoinForeignKey  *string               `protobuf:"bytes,18,opt,name=join_foreign_key,json=joinForeignKey" json:"join_foreign_key,omitempty"`
	JoinReferences  *string               `protobuf:"bytes,19,opt,name=join_references,json=joinReferences" json:"join_references,omitempty"`
	Check           *string               `protobuf:"bytes,20,opt,name=check" json:"check,omitempty"`
	CanRead         *bool                 `protobuf:"varint,21,opt,name=canRead" json:"canRead,omitempty"`
	WritePermission *FieldWritePermission `protobuf:"varint,22,opt,name=writePermission,enum=gorm.FieldWritePermission" json:"writePermission,omitempty"`
	Constraint      *string               `protobuf:"bytes,23,opt,name=constraint" json:"constraint,omitempty"`
	// contains filtered or unexported fields
}

func (*GormTag) Descriptor deprecated added in v0.5.0

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

Deprecated: Use GormTag.ProtoReflect.Descriptor instead.

func (*GormTag) GetAutoIncrement added in v0.5.0

func (x *GormTag) GetAutoIncrement() bool

func (*GormTag) GetCanRead added in v0.21.0

func (x *GormTag) GetCanRead() bool

func (*GormTag) GetCheck added in v0.21.0

func (x *GormTag) GetCheck() string

func (*GormTag) GetColumn added in v0.5.0

func (x *GormTag) GetColumn() string

func (*GormTag) GetConstraint added in v0.21.0

func (x *GormTag) GetConstraint() string

func (*GormTag) GetDefault added in v0.5.0

func (x *GormTag) GetDefault() string

func (*GormTag) GetEmbedded added in v0.5.0

func (x *GormTag) GetEmbedded() bool

func (*GormTag) GetEmbeddedPrefix added in v0.5.0

func (x *GormTag) GetEmbeddedPrefix() string

func (*GormTag) GetForeignKey added in v0.7.0

func (x *GormTag) GetForeignKey() string

func (*GormTag) GetIgnore added in v0.5.0

func (x *GormTag) GetIgnore() bool

func (*GormTag) GetIndex added in v0.5.0

func (x *GormTag) GetIndex() string

func (*GormTag) GetJoinForeignKey added in v0.21.0

func (x *GormTag) GetJoinForeignKey() string

func (*GormTag) GetJoinReferences added in v0.21.0

func (x *GormTag) GetJoinReferences() string

func (*GormTag) GetManyToMany added in v0.7.0

func (x *GormTag) GetManyToMany() string

func (*GormTag) GetNotNull added in v0.5.0

func (x *GormTag) GetNotNull() bool

func (*GormTag) GetPrecision added in v0.5.0

func (x *GormTag) GetPrecision() int32

func (*GormTag) GetPrimaryKey added in v0.5.0

func (x *GormTag) GetPrimaryKey() bool

func (*GormTag) GetReferences added in v0.21.0

func (x *GormTag) GetReferences() string

func (*GormTag) GetSize added in v0.21.0

func (x *GormTag) GetSize() int32

func (*GormTag) GetType added in v0.5.0

func (x *GormTag) GetType() string

func (*GormTag) GetUnique added in v0.5.0

func (x *GormTag) GetUnique() bool

func (*GormTag) GetUniqueIndex added in v0.5.0

func (x *GormTag) GetUniqueIndex() string

func (*GormTag) GetWritePermission added in v0.21.0

func (x *GormTag) GetWritePermission() FieldWritePermission

func (*GormTag) ProtoMessage added in v0.5.0

func (*GormTag) ProtoMessage()

func (*GormTag) ProtoReflect added in v0.21.0

func (x *GormTag) ProtoReflect() protoreflect.Message

func (*GormTag) Reset added in v0.5.0

func (x *GormTag) Reset()

func (*GormTag) String added in v0.5.0

func (x *GormTag) String() string

type HasManyOptions added in v0.5.0

type HasManyOptions struct {
	ForeignKey    *string  `protobuf:"bytes,1,opt,name=foreign_key,json=foreignKey" json:"foreign_key,omitempty"`
	ForeignKeyTag *GormTag `protobuf:"bytes,2,opt,name=foreign_key_tag,json=foreignKeyTag" json:"foreign_key_tag,omitempty"`
	References    *string  `protobuf:"bytes,3,opt,name=references" json:"references,omitempty"`
	// contains filtered or unexported fields
}

func (*HasManyOptions) Descriptor deprecated added in v0.5.0

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

Deprecated: Use HasManyOptions.ProtoReflect.Descriptor instead.

func (*HasManyOptions) GetForeignKey added in v0.21.0

func (x *HasManyOptions) GetForeignKey() string

func (*HasManyOptions) GetForeignKeyTag added in v0.21.0

func (x *HasManyOptions) GetForeignKeyTag() *GormTag

func (*HasManyOptions) GetReferences added in v0.21.0

func (x *HasManyOptions) GetReferences() string

func (*HasManyOptions) ProtoMessage added in v0.5.0

func (*HasManyOptions) ProtoMessage()

func (*HasManyOptions) ProtoReflect added in v0.21.0

func (x *HasManyOptions) ProtoReflect() protoreflect.Message

func (*HasManyOptions) Reset added in v0.5.0

func (x *HasManyOptions) Reset()

func (*HasManyOptions) String added in v0.5.0

func (x *HasManyOptions) String() string

type HasOneOptions added in v0.5.0

type HasOneOptions struct {
	ForeignKey    *string  `protobuf:"bytes,1,opt,name=foreign_key,json=foreignKey" json:"foreign_key,omitempty"`
	ForeignKeyTag *GormTag `protobuf:"bytes,2,opt,name=foreign_key_tag,json=foreignKeyTag" json:"foreign_key_tag,omitempty"`
	References    *string  `protobuf:"bytes,3,opt,name=references" json:"references,omitempty"`
	// contains filtered or unexported fields
}

func (*HasOneOptions) Descriptor deprecated added in v0.5.0

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

Deprecated: Use HasOneOptions.ProtoReflect.Descriptor instead.

func (*HasOneOptions) GetForeignKey added in v0.21.0

func (x *HasOneOptions) GetForeignKey() string

func (*HasOneOptions) GetForeignKeyTag added in v0.21.0

func (x *HasOneOptions) GetForeignKeyTag() *GormTag

func (*HasOneOptions) GetReferences added in v0.21.0

func (x *HasOneOptions) GetReferences() string

func (*HasOneOptions) ProtoMessage added in v0.5.0

func (*HasOneOptions) ProtoMessage()

func (*HasOneOptions) ProtoReflect added in v0.21.0

func (x *HasOneOptions) ProtoReflect() protoreflect.Message

func (*HasOneOptions) Reset added in v0.5.0

func (x *HasOneOptions) Reset()

func (*HasOneOptions) String added in v0.5.0

func (x *HasOneOptions) String() string

type ManyToManyOptions added in v0.5.0

type ManyToManyOptions struct {
	Jointable      *string `protobuf:"bytes,1,opt,name=jointable" json:"jointable,omitempty"`
	ForeignKey     *string `protobuf:"bytes,2,opt,name=foreign_key,json=foreignKey" json:"foreign_key,omitempty"`
	JoinForeignKey *string `protobuf:"bytes,3,opt,name=join_foreign_key,json=joinForeignKey" json:"join_foreign_key,omitempty"`
	References     *string `protobuf:"bytes,4,opt,name=references" json:"references,omitempty"`
	JoinReferences *string `protobuf:"bytes,5,opt,name=join_references,json=joinReferences" json:"join_references,omitempty"`
	// contains filtered or unexported fields
}

func (*ManyToManyOptions) Descriptor deprecated added in v0.5.0

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

Deprecated: Use ManyToManyOptions.ProtoReflect.Descriptor instead.

func (*ManyToManyOptions) GetForeignKey added in v0.21.0

func (x *ManyToManyOptions) GetForeignKey() string

func (*ManyToManyOptions) GetJoinForeignKey added in v0.21.0

func (x *ManyToManyOptions) GetJoinForeignKey() string

func (*ManyToManyOptions) GetJoinReferences added in v0.21.0

func (x *ManyToManyOptions) GetJoinReferences() string

func (*ManyToManyOptions) GetJointable added in v0.5.0

func (x *ManyToManyOptions) GetJointable() string

func (*ManyToManyOptions) GetReferences added in v0.21.0

func (x *ManyToManyOptions) GetReferences() string

func (*ManyToManyOptions) ProtoMessage added in v0.5.0

func (*ManyToManyOptions) ProtoMessage()

func (*ManyToManyOptions) ProtoReflect added in v0.21.0

func (x *ManyToManyOptions) ProtoReflect() protoreflect.Message

func (*ManyToManyOptions) Reset added in v0.5.0

func (x *ManyToManyOptions) Reset()

func (*ManyToManyOptions) String added in v0.5.0

func (x *ManyToManyOptions) String() string

Jump to

Keyboard shortcuts

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