proto

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InputMedia_MediaType_name = map[int32]string{
		0: "UNKNOWN",
		1: "EXTEND",
		2: "UTF8",
		3: "FILE",
	}
	InputMedia_MediaType_value = map[string]int32{
		"UNKNOWN": 0,
		"EXTEND":  1,
		"UTF8":    2,
		"FILE":    3,
	}
)

Enum value maps for InputMedia_MediaType.

View Source
var (
	OutputMedia_MediaType_name = map[int32]string{
		0: "UNKNOWN",
		1: "EXTEND",
		2: "UTF8",
		3: "FILE",
		4: "FILE_URL",
	}
	OutputMedia_MediaType_value = map[string]int32{
		"UNKNOWN":  0,
		"EXTEND":   1,
		"UTF8":     2,
		"FILE":     3,
		"FILE_URL": 4,
	}
)

Enum value maps for OutputMedia_MediaType.

View Source
var File_cmdin_proto protoreflect.FileDescriptor
View Source
var File_proto_cmdout_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BotMsg

type BotMsg struct {
	Medias           []*OutputMedia `protobuf:"bytes,1,rep,name=medias,proto3" json:"medias,omitempty"`
	EmbedRecommended bool           `protobuf:"varint,2,opt,name=embed_recommended,json=embedRecommended,proto3" json:"embed_recommended,omitempty"`
	//カラーコード、最上位のバイトは無視
	Color uint32 `protobuf:"varint,3,opt,name=color,proto3" json:"color,omitempty"`
	// contains filtered or unexported fields
}

発言ひとつ分

func (*BotMsg) Descriptor deprecated

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

Deprecated: Use BotMsg.ProtoReflect.Descriptor instead.

func (*BotMsg) GetColor

func (x *BotMsg) GetColor() uint32

func (*BotMsg) GetEmbedRecommended

func (x *BotMsg) GetEmbedRecommended() bool

func (*BotMsg) GetMedias

func (x *BotMsg) GetMedias() []*OutputMedia

func (*BotMsg) ProtoMessage

func (*BotMsg) ProtoMessage()

func (*BotMsg) ProtoReflect

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

func (*BotMsg) Reset

func (x *BotMsg) Reset()

func (*BotMsg) String

func (x *BotMsg) String() string

type Help

type Help struct {

	//引数の説明
	Usage string `protobuf:"bytes,1,opt,name=usage,proto3" json:"usage,omitempty"`
	//短い説明
	ShortDescription string `protobuf:"bytes,2,opt,name=short_description,json=shortDescription,proto3" json:"short_description,omitempty"`
	//長い説明
	LongDescription string `protobuf:"bytes,3,opt,name=long_description,json=longDescription,proto3" json:"long_description,omitempty"`
	// contains filtered or unexported fields
}

func (*Help) Descriptor deprecated

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

Deprecated: Use Help.ProtoReflect.Descriptor instead.

func (*Help) GetLongDescription

func (x *Help) GetLongDescription() string

func (*Help) GetShortDescription

func (x *Help) GetShortDescription() string

func (*Help) GetUsage

func (x *Help) GetUsage() string

func (*Help) ProtoMessage

func (*Help) ProtoMessage()

func (*Help) ProtoReflect

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

func (*Help) Reset

func (x *Help) Reset()

func (*Help) String

func (x *Help) String() string

type Input

type Input struct {
	Media []*InputMedia `protobuf:"bytes,1,rep,name=media,proto3" json:"media,omitempty"`
	//prefixの文字列, help用
	Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"`
	// contains filtered or unexported fields
}

func (*Input) Descriptor deprecated

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

Deprecated: Use Input.ProtoReflect.Descriptor instead.

func (*Input) GetMedia

func (x *Input) GetMedia() []*InputMedia

func (*Input) GetPrefix added in v0.0.2

func (x *Input) GetPrefix() string

func (*Input) ProtoMessage

func (*Input) ProtoMessage()

func (*Input) ProtoReflect

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

func (*Input) Reset

func (x *Input) Reset()

func (*Input) String

func (x *Input) String() string

type InputMedia

type InputMedia struct {
	Type InputMedia_MediaType `protobuf:"varint,1,opt,name=type,proto3,enum=proto.InputMedia_MediaType" json:"type,omitempty"`
	//データ本体
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	//ファイル名(拡張子あり), ファイルタイプは拡張子で判断
	Filename string `protobuf:"bytes,3,opt,name=filename,proto3" json:"filename,omitempty"`
	// contains filtered or unexported fields
}

func (*InputMedia) Descriptor deprecated

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

Deprecated: Use InputMedia.ProtoReflect.Descriptor instead.

func (*InputMedia) GetData

func (x *InputMedia) GetData() []byte

func (*InputMedia) GetFilename

func (x *InputMedia) GetFilename() string

func (*InputMedia) GetType

func (x *InputMedia) GetType() InputMedia_MediaType

func (*InputMedia) ProtoMessage

func (*InputMedia) ProtoMessage()

func (*InputMedia) ProtoReflect

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

func (*InputMedia) Reset

func (x *InputMedia) Reset()

func (*InputMedia) String

func (x *InputMedia) String() string

type InputMedia_MediaType

type InputMedia_MediaType int32

データタイプ

const (
	InputMedia_UNKNOWN InputMedia_MediaType = 0
	InputMedia_EXTEND  InputMedia_MediaType = 1 //データタイプの決定を先伸ばし, 直後のデータと連結する
	InputMedia_UTF8    InputMedia_MediaType = 2 //文字列
	InputMedia_FILE    InputMedia_MediaType = 3 //ファイル
)

func (InputMedia_MediaType) Descriptor

func (InputMedia_MediaType) Enum

func (InputMedia_MediaType) EnumDescriptor deprecated

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

Deprecated: Use InputMedia_MediaType.Descriptor instead.

func (InputMedia_MediaType) Number

func (InputMedia_MediaType) String

func (x InputMedia_MediaType) String() string

func (InputMedia_MediaType) Type

type Output

type Output struct {
	Msgs []*BotMsg `protobuf:"bytes,1,rep,name=msgs,proto3" json:"msgs,omitempty"`
	// contains filtered or unexported fields
}

実際にコマンドから出力されるオブジェクトの型

func (*Output) Descriptor deprecated

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

Deprecated: Use Output.ProtoReflect.Descriptor instead.

func (*Output) GetMsgs

func (x *Output) GetMsgs() []*BotMsg

func (*Output) ProtoMessage

func (*Output) ProtoMessage()

func (*Output) ProtoReflect

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

func (*Output) Reset

func (x *Output) Reset()

func (*Output) String

func (x *Output) String() string

type OutputMedia

type OutputMedia struct {
	Type OutputMedia_MediaType `protobuf:"varint,1,opt,name=type,proto3,enum=proto.OutputMedia_MediaType" json:"type,omitempty"`
	//データ本体
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	//ファイル名(拡張子あり), ファイルタイプは拡張子で判断
	Filename string `protobuf:"bytes,3,opt,name=filename,proto3" json:"filename,omitempty"`
	//直後のデータに同フィールドが続くかどうか
	ExtendField bool `protobuf:"varint,4,opt,name=extend_field,json=extendField,proto3" json:"extend_field,omitempty"`
	//見出しレベル
	//0は通常, 1最も強調, 2,3,...と準じる
	Level int32 `protobuf:"varint,5,opt,name=level,proto3" json:"level,omitempty"`
	//エラーコード, 0ならエラーなし
	Error uint32 `protobuf:"varint,6,opt,name=error,proto3" json:"error,omitempty"`
	//隠せるなら隠すかどうか
	Spoiled bool `protobuf:"varint,7,opt,name=spoiled,proto3" json:"spoiled,omitempty"`
	//短いコードブロックにできるならするかどうか
	ShortCode bool `protobuf:"varint,8,opt,name=short_code,json=shortCode,proto3" json:"short_code,omitempty"`
	//長いコードブロックにできるならするかどうか
	LongCode bool `protobuf:"varint,9,opt,name=long_code,json=longCode,proto3" json:"long_code,omitempty"`
	// contains filtered or unexported fields
}

データ

func (*OutputMedia) Descriptor deprecated

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

Deprecated: Use OutputMedia.ProtoReflect.Descriptor instead.

func (*OutputMedia) GetData

func (x *OutputMedia) GetData() []byte

func (*OutputMedia) GetError

func (x *OutputMedia) GetError() uint32

func (*OutputMedia) GetExtendField

func (x *OutputMedia) GetExtendField() bool

func (*OutputMedia) GetFilename

func (x *OutputMedia) GetFilename() string

func (*OutputMedia) GetLevel

func (x *OutputMedia) GetLevel() int32

func (*OutputMedia) GetLongCode added in v0.0.2

func (x *OutputMedia) GetLongCode() bool

func (*OutputMedia) GetShortCode added in v0.0.2

func (x *OutputMedia) GetShortCode() bool

func (*OutputMedia) GetSpoiled

func (x *OutputMedia) GetSpoiled() bool

func (*OutputMedia) GetType

func (x *OutputMedia) GetType() OutputMedia_MediaType

func (*OutputMedia) ProtoMessage

func (*OutputMedia) ProtoMessage()

func (*OutputMedia) ProtoReflect

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

func (*OutputMedia) Reset

func (x *OutputMedia) Reset()

func (*OutputMedia) String

func (x *OutputMedia) String() string

type OutputMedia_MediaType

type OutputMedia_MediaType int32

データタイプ

const (
	OutputMedia_UNKNOWN  OutputMedia_MediaType = 0
	OutputMedia_EXTEND   OutputMedia_MediaType = 1 //データタイプの決定を先伸ばし, 直後のデータと連結する
	OutputMedia_UTF8     OutputMedia_MediaType = 2 //文字列
	OutputMedia_FILE     OutputMedia_MediaType = 3 //ファイル
	OutputMedia_FILE_URL OutputMedia_MediaType = 4 //ファイルのURL
)

func (OutputMedia_MediaType) Descriptor

func (OutputMedia_MediaType) Enum

func (OutputMedia_MediaType) EnumDescriptor deprecated

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

Deprecated: Use OutputMedia_MediaType.Descriptor instead.

func (OutputMedia_MediaType) Number

func (OutputMedia_MediaType) String

func (x OutputMedia_MediaType) String() string

func (OutputMedia_MediaType) Type

Jump to

Keyboard shortcuts

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