input

package
v0.0.0-...-ab4fb46 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FieldType_Bool   = "bool"
	FieldType_Int32  = "int32"
	FieldType_Int64  = "int64"
	FieldType_String = "string"
)

Variables

Functions

This section is empty.

Types

type Field

type Field struct {
	SnakeName string
	Comment   string
	// TypeKind_Enumの場合はEnum名が入る
	Type     FieldType
	TypeKind TypeKind
	IsList   bool
	Number   int32
	Option   *FieldOption
}

type FieldAccessorSet

type FieldAccessorSet struct {
	*i32set.Set
}

func NewFieldAccessorSet

func NewFieldAccessorSet(accessorTypes ...FieldAccessorType) *FieldAccessorSet

func (FieldAccessorSet) Contains

func (a FieldAccessorSet) Contains(accessorType FieldAccessorType) bool

type FieldAccessorType

type FieldAccessorType int32
const (
	// FieldAccessorType_All デフォルト値がALL
	FieldAccessorType_All FieldAccessorType = iota
	FieldAccessorType_OnlyServer
	FieldAccessorType_OnlyClient
)

type FieldOption

type FieldOption struct {
	AccessorType FieldAccessorType
	DDL          *FieldOptionDDL
}

type FieldOptionDDL

type FieldOptionDDL struct {
	PK bool
	// nilチェックが必要
	MasterRef *MasterRef
}

type FieldType

type FieldType = string

type Index

type Index struct {
	Keys         []*IndexKey
	Unique       bool
	SnakeStoring []string
}

type IndexKey

type IndexKey struct {
	SnakeName string
	Desc      bool
}

type Interleave

type Interleave struct {
	TableSnakeName string
}

type InterleaveAnnotationType

type InterleaveAnnotationType int32

type MasterRef

type MasterRef struct {
	TableSnakeName  string
	ColumnSnakeName string
}

type Message

type Message struct {
	Messages  []*Message
	SnakeName string
	Comment   string
	Fields    []*Field
	Option    *MessageOption
}

func ConvertMessageFromProto

func ConvertMessageFromProto(file *protogen.File) (*Message, error)

type MessageAccessorSet

type MessageAccessorSet struct {
	*i32set.Set
}

func NewMessageAccessorSet

func NewMessageAccessorSet(accessorTypes ...MessageAccessorType) *MessageAccessorSet

func (MessageAccessorSet) Contains

func (a MessageAccessorSet) Contains(accessorType MessageAccessorType) bool

type MessageAccessorType

type MessageAccessorType int32
const (
	MessageAccessorType_OnlyServer MessageAccessorType = iota
	MessageAccessorType_OnlyClient
	MessageAccessorType_OnlyClientWithCommonResponse
	MessageAccessorType_ServerAndClient
	MessageAccessorType_ServerAndClientWithCommonResponse
)

type MessageOption

type MessageOption struct {
	AccessorType MessageAccessorType
	DDL          *MessageOptionDDL
}

type MessageOptionDDL

type MessageOptionDDL struct {
	Indexes []*Index
	// nilチェックが必要
	Interleave *Interleave
}

type TypeKind

type TypeKind int32
const (
	TypeKind_Bool TypeKind = iota + 1
	TypeKind_Int32
	TypeKind_Int64
	TypeKind_String
	TypeKind_Enum
	// TypeKind_Message クライアント向けのレスポンスにしか使われない
	TypeKind_Message
)

Jump to

Keyboard shortcuts

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