xo

package
v0.0.0-...-ac4bb89 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FieldOverride_IndexType_name = map[int32]string{
		0: "NONE",
		1: "INDEX",
		2: "UNIQUE",
	}
	FieldOverride_IndexType_value = map[string]int32{
		"NONE":   0,
		"INDEX":  1,
		"UNIQUE": 2,
	}
)

Enum value maps for FieldOverride_IndexType.

View Source
var (
	// optional xo.options.FieldOverride field_overrides = 1147;
	E_FieldOverrides = &file_xo_proto_extTypes[1]
)

Extension fields to descriptorpb.FieldOptions.

View Source
var (
	// optional xo.options.FileOverride file_overrides = 1147;
	E_FileOverrides = &file_xo_proto_extTypes[2]
)

Extension fields to descriptorpb.FileOptions.

View Source
var (
	// optional xo.options.MessageOverride msg_overrides = 1147;
	E_MsgOverrides = &file_xo_proto_extTypes[0]
)

Extension fields to descriptorpb.MessageOptions.

Functions

This section is empty.

Types

type FieldOverride

type FieldOverride struct {

	// Marks the index type for the field.
	Index FieldOverride_IndexType `protobuf:"varint,1,opt,name=index,proto3,enum=xo.options.FieldOverride_IndexType" json:"index,omitempty"`
	// Ignore the annotated field and not create a column and/or associated
	// tables for it.
	Ignore bool `protobuf:"varint,2,opt,name=ignore,proto3" json:"ignore,omitempty"`
	// Embeds the field as a JSON instead of creating a new table.
	EmbedAsJson bool `protobuf:"varint,3,opt,name=embed_as_json,json=embedAsJson,proto3" json:"embed_as_json,omitempty"`
	// SQL Expression for the default value for the annotated field.
	DefaultValue string `protobuf:"bytes,4,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
	// The field referenced by the overridden field.
	Ref *Ref `protobuf:"bytes,5,opt,name=ref,proto3" json:"ref,omitempty"`
	// Mark the annotated field as nullable.
	Nullable bool `protobuf:"varint,6,opt,name=nullable,proto3" json:"nullable,omitempty"`
	// contains filtered or unexported fields
}

FieldOverride is an override of default marshalling behaviour of protoc-gen-xo.

func (*FieldOverride) Descriptor deprecated

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

Deprecated: Use FieldOverride.ProtoReflect.Descriptor instead.

func (*FieldOverride) GetDefaultValue

func (x *FieldOverride) GetDefaultValue() string

func (*FieldOverride) GetEmbedAsJson

func (x *FieldOverride) GetEmbedAsJson() bool

func (*FieldOverride) GetIgnore

func (x *FieldOverride) GetIgnore() bool

func (*FieldOverride) GetIndex

func (x *FieldOverride) GetIndex() FieldOverride_IndexType

func (*FieldOverride) GetNullable

func (x *FieldOverride) GetNullable() bool

func (*FieldOverride) GetRef

func (x *FieldOverride) GetRef() *Ref

func (*FieldOverride) ProtoMessage

func (*FieldOverride) ProtoMessage()

func (*FieldOverride) ProtoReflect

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

func (*FieldOverride) Reset

func (x *FieldOverride) Reset()

func (*FieldOverride) String

func (x *FieldOverride) String() string

type FieldOverride_IndexType

type FieldOverride_IndexType int32
const (
	FieldOverride_NONE   FieldOverride_IndexType = 0
	FieldOverride_INDEX  FieldOverride_IndexType = 1
	FieldOverride_UNIQUE FieldOverride_IndexType = 2
)

func (FieldOverride_IndexType) Descriptor

func (FieldOverride_IndexType) Enum

func (FieldOverride_IndexType) EnumDescriptor deprecated

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

Deprecated: Use FieldOverride_IndexType.Descriptor instead.

func (FieldOverride_IndexType) Number

func (FieldOverride_IndexType) String

func (x FieldOverride_IndexType) String() string

func (FieldOverride_IndexType) Type

type FileOverride

type FileOverride struct {

	// Skip the package prefix for all messages within the file.
	SkipPrefix bool `protobuf:"varint,1,opt,name=skip_prefix,json=skipPrefix,proto3" json:"skip_prefix,omitempty"`
	// contains filtered or unexported fields
}

FileOverride is an override of default marshalling behaviour of protoc-gen-xo.

func (*FileOverride) Descriptor deprecated

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

Deprecated: Use FileOverride.ProtoReflect.Descriptor instead.

func (*FileOverride) GetSkipPrefix

func (x *FileOverride) GetSkipPrefix() bool

func (*FileOverride) ProtoMessage

func (*FileOverride) ProtoMessage()

func (*FileOverride) ProtoReflect

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

func (*FileOverride) Reset

func (x *FileOverride) Reset()

func (*FileOverride) String

func (x *FileOverride) String() string

type MessageOverride

type MessageOverride struct {

	// Create the table without a default primary key.
	Manual bool `protobuf:"varint,1,opt,name=manual,proto3" json:"manual,omitempty"`
	// Ignore the annotated message and not create a table for it.
	Ignore bool `protobuf:"varint,2,opt,name=ignore,proto3" json:"ignore,omitempty"`
	// Embeds the message as a JSON instead of creating a new table, whenever
	// referenced.
	EmbedAsJson bool `protobuf:"varint,3,opt,name=embed_as_json,json=embedAsJson,proto3" json:"embed_as_json,omitempty"`
	// A list of one-to-many fields to create tables for.
	HasMany []*OneToMany `protobuf:"bytes,4,rep,name=has_many,json=hasMany,proto3" json:"has_many,omitempty"`
	// contains filtered or unexported fields
}

MessageOverride is an override of default marshalling behaviour of protoc-gen-xo.

func (*MessageOverride) Descriptor deprecated

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

Deprecated: Use MessageOverride.ProtoReflect.Descriptor instead.

func (*MessageOverride) GetEmbedAsJson

func (x *MessageOverride) GetEmbedAsJson() bool

func (*MessageOverride) GetHasMany

func (x *MessageOverride) GetHasMany() []*OneToMany

func (*MessageOverride) GetIgnore

func (x *MessageOverride) GetIgnore() bool

func (*MessageOverride) GetManual

func (x *MessageOverride) GetManual() bool

func (*MessageOverride) ProtoMessage

func (*MessageOverride) ProtoMessage()

func (*MessageOverride) ProtoReflect

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

func (*MessageOverride) Reset

func (x *MessageOverride) Reset()

func (*MessageOverride) String

func (x *MessageOverride) String() string

type OneToMany

type OneToMany struct {

	// A unique name identifying the one-to-many field.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// A unique suffix identifying the type of the one-to-many field. The
	// specified field must have an associated table.
	TypeSuffix string `protobuf:"bytes,2,opt,name=type_suffix,json=typeSuffix,proto3" json:"type_suffix,omitempty"`
	// contains filtered or unexported fields
}

OneToMany is an entry to create a one-to-many table for.

func (*OneToMany) Descriptor deprecated

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

Deprecated: Use OneToMany.ProtoReflect.Descriptor instead.

func (*OneToMany) GetName

func (x *OneToMany) GetName() string

func (*OneToMany) GetTypeSuffix

func (x *OneToMany) GetTypeSuffix() string

func (*OneToMany) ProtoMessage

func (*OneToMany) ProtoMessage()

func (*OneToMany) ProtoReflect

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

func (*OneToMany) Reset

func (x *OneToMany) Reset()

func (*OneToMany) String

func (x *OneToMany) String() string

type Ref

type Ref struct {

	// A unique suffix identifying the type of the referenced table.
	TypeSuffix string `protobuf:"bytes,1,opt,name=type_suffix,json=typeSuffix,proto3" json:"type_suffix,omitempty"`
	// Name of the field that the current field references.
	FieldName string `protobuf:"bytes,2,opt,name=field_name,json=fieldName,proto3" json:"field_name,omitempty"`
	// contains filtered or unexported fields
}

Ref is a reference of a field in another type.

func (*Ref) Descriptor deprecated

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

Deprecated: Use Ref.ProtoReflect.Descriptor instead.

func (*Ref) GetFieldName

func (x *Ref) GetFieldName() string

func (*Ref) GetTypeSuffix

func (x *Ref) GetTypeSuffix() string

func (*Ref) ProtoMessage

func (*Ref) ProtoMessage()

func (*Ref) ProtoReflect

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

func (*Ref) Reset

func (x *Ref) Reset()

func (*Ref) String

func (x *Ref) String() string

Jump to

Keyboard shortcuts

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