scanner

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_scanner_scanner_proto protoreflect.FileDescriptor
View Source
var Scanner_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "scanner.Scanner",
	HandlerType: (*ScannerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Hexes",
			Handler:    _Scanner_Hexes_Handler,
		},
		{
			MethodName: "Translatable",
			Handler:    _Scanner_Translatable_Handler,
		},
		{
			MethodName: "Scanned",
			Handler:    _Scanner_Scanned_Handler,
		},
		{
			MethodName: "ChooseVariety",
			Handler:    _Scanner_ChooseVariety_Handler,
		},
		{
			MethodName: "ChooseCaesura",
			Handler:    _Scanner_ChooseCaesura_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "scanner/scanner.proto",
}

Scanner_ServiceDesc is the grpc.ServiceDesc for Scanner service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterScannerServer added in v0.0.7

func RegisterScannerServer(s grpc.ServiceRegistrar, srv ScannerServer)

Types

type ArrHexMsg added in v0.0.7

type ArrHexMsg struct {
	Hexes []*HexMsg `protobuf:"bytes,1,rep,name=hexes,proto3" json:"hexes,omitempty"`
	// contains filtered or unexported fields
}

func (*ArrHexMsg) Descriptor deprecated added in v0.0.7

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

Deprecated: Use ArrHexMsg.ProtoReflect.Descriptor instead.

func (*ArrHexMsg) GetHexes added in v0.0.7

func (x *ArrHexMsg) GetHexes() []*HexMsg

func (*ArrHexMsg) ProtoMessage added in v0.0.7

func (*ArrHexMsg) ProtoMessage()

func (*ArrHexMsg) ProtoReflect added in v0.0.29

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

func (*ArrHexMsg) Reset added in v0.0.7

func (x *ArrHexMsg) Reset()

func (*ArrHexMsg) String added in v0.0.7

func (x *ArrHexMsg) String() string

type ArrScannedMsg added in v0.0.7

type ArrScannedMsg struct {
	Hexes []*ScannedMsg `protobuf:"bytes,1,rep,name=hexes,proto3" json:"hexes,omitempty"`
	// contains filtered or unexported fields
}

func (*ArrScannedMsg) Descriptor deprecated added in v0.0.7

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

Deprecated: Use ArrScannedMsg.ProtoReflect.Descriptor instead.

func (*ArrScannedMsg) GetHexes added in v0.0.7

func (x *ArrScannedMsg) GetHexes() []*ScannedMsg

func (*ArrScannedMsg) ProtoMessage added in v0.0.7

func (*ArrScannedMsg) ProtoMessage()

func (*ArrScannedMsg) ProtoReflect added in v0.0.29

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

func (*ArrScannedMsg) Reset added in v0.0.7

func (x *ArrScannedMsg) Reset()

func (*ArrScannedMsg) String added in v0.0.7

func (x *ArrScannedMsg) String() string

type ArrTranslatableMsg added in v0.0.7

type ArrTranslatableMsg struct {
	Words    []*WordMsg    `protobuf:"bytes,1,rep,name=words,proto3" json:"words,omitempty"`
	Hexes    []*HexMsg     `protobuf:"bytes,2,rep,name=hexes,proto3" json:"hexes,omitempty"`
	HexWords []*HexWordMsg `protobuf:"bytes,3,rep,name=hexWords,proto3" json:"hexWords,omitempty"`
	// contains filtered or unexported fields
}

func (*ArrTranslatableMsg) Descriptor deprecated added in v0.0.7

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

Deprecated: Use ArrTranslatableMsg.ProtoReflect.Descriptor instead.

func (*ArrTranslatableMsg) GetHexWords added in v0.0.7

func (x *ArrTranslatableMsg) GetHexWords() []*HexWordMsg

func (*ArrTranslatableMsg) GetHexes added in v0.0.7

func (x *ArrTranslatableMsg) GetHexes() []*HexMsg

func (*ArrTranslatableMsg) GetWords added in v0.0.7

func (x *ArrTranslatableMsg) GetWords() []*WordMsg

func (*ArrTranslatableMsg) ProtoMessage added in v0.0.7

func (*ArrTranslatableMsg) ProtoMessage()

func (*ArrTranslatableMsg) ProtoReflect added in v0.0.29

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

func (*ArrTranslatableMsg) Reset added in v0.0.7

func (x *ArrTranslatableMsg) Reset()

func (*ArrTranslatableMsg) String added in v0.0.7

func (x *ArrTranslatableMsg) String() string

type HexIntMsg added in v0.0.24

type HexIntMsg struct {
	HexID int64 `protobuf:"varint,1,opt,name=hexID,proto3" json:"hexID,omitempty"`
	X     int64 `protobuf:"varint,2,opt,name=x,proto3" json:"x,omitempty"`
	// contains filtered or unexported fields
}

func (*HexIntMsg) Descriptor deprecated added in v0.0.24

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

Deprecated: Use HexIntMsg.ProtoReflect.Descriptor instead.

func (*HexIntMsg) GetHexID added in v0.0.24

func (x *HexIntMsg) GetHexID() int64

func (*HexIntMsg) GetX added in v0.0.24

func (x *HexIntMsg) GetX() int64

func (*HexIntMsg) ProtoMessage added in v0.0.24

func (*HexIntMsg) ProtoMessage()

func (*HexIntMsg) ProtoReflect added in v0.0.29

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

func (*HexIntMsg) Reset added in v0.0.24

func (x *HexIntMsg) Reset()

func (*HexIntMsg) String added in v0.0.24

func (x *HexIntMsg) String() string

type HexMsg

type HexMsg struct {
	HexID int64  `protobuf:"varint,1,opt,name=hexID,proto3" json:"hexID,omitempty"`
	Para  bool   `protobuf:"varint,2,opt,name=para,proto3" json:"para,omitempty"`
	Txt   string `protobuf:"bytes,3,opt,name=txt,proto3" json:"txt,omitempty"`
	// contains filtered or unexported fields
}

func (*HexMsg) Descriptor deprecated

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

Deprecated: Use HexMsg.ProtoReflect.Descriptor instead.

func (*HexMsg) GetHexID added in v0.0.7

func (x *HexMsg) GetHexID() int64

func (*HexMsg) GetPara added in v0.0.7

func (x *HexMsg) GetPara() bool

func (*HexMsg) GetTxt added in v0.0.7

func (x *HexMsg) GetTxt() string

func (*HexMsg) ProtoMessage

func (*HexMsg) ProtoMessage()

func (*HexMsg) ProtoReflect added in v0.0.29

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

func (*HexMsg) Reset

func (x *HexMsg) Reset()

func (*HexMsg) String

func (x *HexMsg) String() string

type HexWord added in v0.0.10

type HexWord struct {
	HexID  int64 `json:"hex_id"`
	Order  int64 `json:"order"`
	WordID int64 `json:"word_id"`
}

type HexWordMsg added in v0.0.7

type HexWordMsg struct {
	HexID  int64 `protobuf:"varint,1,opt,name=hexID,proto3" json:"hexID,omitempty"`
	Order  int64 `protobuf:"varint,2,opt,name=order,proto3" json:"order,omitempty"`
	WordID int64 `protobuf:"varint,3,opt,name=wordID,proto3" json:"wordID,omitempty"`
	// contains filtered or unexported fields
}

func (*HexWordMsg) Descriptor deprecated added in v0.0.7

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

Deprecated: Use HexWordMsg.ProtoReflect.Descriptor instead.

func (*HexWordMsg) GetHexID added in v0.0.7

func (x *HexWordMsg) GetHexID() int64

func (*HexWordMsg) GetOrder added in v0.0.7

func (x *HexWordMsg) GetOrder() int64

func (*HexWordMsg) GetWordID added in v0.0.7

func (x *HexWordMsg) GetWordID() int64

func (*HexWordMsg) ProtoMessage added in v0.0.7

func (*HexWordMsg) ProtoMessage()

func (*HexWordMsg) ProtoReflect added in v0.0.29

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

func (*HexWordMsg) Reset added in v0.0.7

func (x *HexWordMsg) Reset()

func (*HexWordMsg) String added in v0.0.7

func (x *HexWordMsg) String() string

type Hexameter added in v0.0.5

type Hexameter struct {
	HexID int64  `json:"hex_id"`
	Para  bool   `json:"para"`
	Txt   string `json:"txt"`
}

type RangeMsg

type RangeMsg struct {
	Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
	End   int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`
	// contains filtered or unexported fields
}

func (*RangeMsg) Descriptor deprecated

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

Deprecated: Use RangeMsg.ProtoReflect.Descriptor instead.

func (*RangeMsg) GetEnd

func (x *RangeMsg) GetEnd() int64

func (*RangeMsg) GetStart

func (x *RangeMsg) GetStart() int64

func (*RangeMsg) ProtoMessage

func (*RangeMsg) ProtoMessage()

func (*RangeMsg) ProtoReflect added in v0.0.29

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

func (*RangeMsg) Reset

func (x *RangeMsg) Reset()

func (*RangeMsg) String

func (x *RangeMsg) String() string

type ScannedHex added in v0.0.21

type ScannedHex struct {
	HexID           int64    `json:"hex_id"`
	Para            bool     `json:"para"`
	Txt             string   `json:"txt"`
	Scanned         string   `json:"scanned"`
	MusicalTemplate string   `json:"musical_template"`
	ChangeCount     int      `json:"change_count"`
	ScanningVariety int      `json:"scanning_variety"`
	Selected        bool     `json:"selected"`
	MainCaesura     int      `json:"main_caesura"`
	Caesurae        []int    `json:"caesurae"`
	Words           []string `json:"words"`
}

type ScannedMsg added in v0.0.7

type ScannedMsg struct {
	HexID           int64    `protobuf:"varint,1,opt,name=hexID,proto3" json:"hexID,omitempty"`
	Para            bool     `protobuf:"varint,2,opt,name=para,proto3" json:"para,omitempty"`
	Txt             string   `protobuf:"bytes,3,opt,name=txt,proto3" json:"txt,omitempty"`
	Scanned         string   `protobuf:"bytes,4,opt,name=scanned,proto3" json:"scanned,omitempty"`
	MusicalTemplate string   `protobuf:"bytes,5,opt,name=musicalTemplate,proto3" json:"musicalTemplate,omitempty"`
	ChangeCount     int64    `protobuf:"varint,6,opt,name=changeCount,proto3" json:"changeCount,omitempty"`
	ScanningVariety int64    `protobuf:"varint,7,opt,name=scanningVariety,proto3" json:"scanningVariety,omitempty"`
	Selected        bool     `protobuf:"varint,8,opt,name=selected,proto3" json:"selected,omitempty"`
	MainCaesura     int64    `protobuf:"varint,9,opt,name=mainCaesura,proto3" json:"mainCaesura,omitempty"`
	Caesurae        []int64  `protobuf:"varint,10,rep,packed,name=caesurae,proto3" json:"caesurae,omitempty"`
	Words           []string `protobuf:"bytes,11,rep,name=words,proto3" json:"words,omitempty"`
	// contains filtered or unexported fields
}

func (*ScannedMsg) Descriptor deprecated added in v0.0.7

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

Deprecated: Use ScannedMsg.ProtoReflect.Descriptor instead.

func (*ScannedMsg) GetCaesurae added in v0.0.20

func (x *ScannedMsg) GetCaesurae() []int64

func (*ScannedMsg) GetChangeCount added in v0.0.24

func (x *ScannedMsg) GetChangeCount() int64

func (*ScannedMsg) GetHexID added in v0.0.7

func (x *ScannedMsg) GetHexID() int64

func (*ScannedMsg) GetMainCaesura added in v0.0.20

func (x *ScannedMsg) GetMainCaesura() int64

func (*ScannedMsg) GetMusicalTemplate added in v0.0.19

func (x *ScannedMsg) GetMusicalTemplate() string

func (*ScannedMsg) GetPara added in v0.0.19

func (x *ScannedMsg) GetPara() bool

func (*ScannedMsg) GetScanned added in v0.0.7

func (x *ScannedMsg) GetScanned() string

func (*ScannedMsg) GetScanningVariety added in v0.0.19

func (x *ScannedMsg) GetScanningVariety() int64

func (*ScannedMsg) GetSelected added in v0.0.25

func (x *ScannedMsg) GetSelected() bool

func (*ScannedMsg) GetTxt added in v0.0.19

func (x *ScannedMsg) GetTxt() string

func (*ScannedMsg) GetWords added in v0.0.19

func (x *ScannedMsg) GetWords() []string

func (*ScannedMsg) ProtoMessage added in v0.0.7

func (*ScannedMsg) ProtoMessage()

func (*ScannedMsg) ProtoReflect added in v0.0.29

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

func (*ScannedMsg) Reset added in v0.0.7

func (x *ScannedMsg) Reset()

func (*ScannedMsg) String added in v0.0.7

func (x *ScannedMsg) String() string

type ScannerClient added in v0.0.7

type ScannerClient interface {
	Hexes(ctx context.Context, in *RangeMsg, opts ...grpc.CallOption) (*ArrHexMsg, error)
	Translatable(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ArrTranslatableMsg, error)
	Scanned(ctx context.Context, in *RangeMsg, opts ...grpc.CallOption) (*ArrScannedMsg, error)
	ChooseVariety(ctx context.Context, in *HexIntMsg, opts ...grpc.CallOption) (*empty.Empty, error)
	ChooseCaesura(ctx context.Context, in *HexIntMsg, opts ...grpc.CallOption) (*empty.Empty, error)
}

ScannerClient is the client API for Scanner service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewScannerClient added in v0.0.7

func NewScannerClient(cc grpc.ClientConnInterface) ScannerClient

type ScannerServer added in v0.0.7

type ScannerServer interface {
	Hexes(context.Context, *RangeMsg) (*ArrHexMsg, error)
	Translatable(context.Context, *empty.Empty) (*ArrTranslatableMsg, error)
	Scanned(context.Context, *RangeMsg) (*ArrScannedMsg, error)
	ChooseVariety(context.Context, *HexIntMsg) (*empty.Empty, error)
	ChooseCaesura(context.Context, *HexIntMsg) (*empty.Empty, error)
	// contains filtered or unexported methods
}

ScannerServer is the server API for Scanner service. All implementations must embed UnimplementedScannerServer for forward compatibility

type Translatable added in v0.0.5

type Translatable struct {
	Words    []Word      `json:"words"`
	Hexes    []Hexameter `json:"hexes"`
	HexWords []HexWord   `json:"hex_words"`
}

type UnimplementedScannerServer added in v0.0.7

type UnimplementedScannerServer struct {
}

UnimplementedScannerServer must be embedded to have forward compatible implementations.

func (UnimplementedScannerServer) ChooseCaesura added in v0.0.24

func (UnimplementedScannerServer) ChooseVariety added in v0.0.24

func (UnimplementedScannerServer) Hexes added in v0.0.7

func (UnimplementedScannerServer) Scanned added in v0.0.7

func (UnimplementedScannerServer) Translatable added in v0.0.7

type UnsafeScannerServer added in v0.0.29

type UnsafeScannerServer interface {
	// contains filtered or unexported methods
}

UnsafeScannerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ScannerServer will result in compilation errors.

type Word added in v0.0.10

type Word struct {
	ID  int64  `json:"id"`
	Txt string `json:"txt"`
}

type WordMsg added in v0.0.4

type WordMsg struct {
	Id  int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Txt string `protobuf:"bytes,2,opt,name=txt,proto3" json:"txt,omitempty"`
	// contains filtered or unexported fields
}

func (*WordMsg) Descriptor deprecated added in v0.0.4

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

Deprecated: Use WordMsg.ProtoReflect.Descriptor instead.

func (*WordMsg) GetId added in v0.0.4

func (x *WordMsg) GetId() int64

func (*WordMsg) GetTxt added in v0.0.4

func (x *WordMsg) GetTxt() string

func (*WordMsg) ProtoMessage added in v0.0.4

func (*WordMsg) ProtoMessage()

func (*WordMsg) ProtoReflect added in v0.0.29

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

func (*WordMsg) Reset added in v0.0.4

func (x *WordMsg) Reset()

func (*WordMsg) String added in v0.0.4

func (x *WordMsg) String() string

Jump to

Keyboard shortcuts

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