srv_frontend_api

package module
v0.0.0-...-8519efd Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package srv_frontend_api is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_kioku_srv_frontend_api_v1_srv_frontend_api_kanji_proto protoreflect.FileDescriptor
View Source
var File_kioku_srv_frontend_api_v1_srv_frontend_api_proto protoreflect.FileDescriptor
View Source
var File_kioku_srv_frontend_api_v1_srv_frontend_api_word_proto protoreflect.FileDescriptor
View Source
var SrvFrontendApiService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "kioku.server.srv_frontend_api.v1.SrvFrontendApiService",
	HandlerType: (*SrvFrontendApiServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetKanjiV1",
			Handler:    _SrvFrontendApiService_GetKanjiV1_Handler,
		},
		{
			MethodName: "ListKanjiV1",
			Handler:    _SrvFrontendApiService_ListKanjiV1_Handler,
		},
		{
			MethodName: "GetWordV1",
			Handler:    _SrvFrontendApiService_GetWordV1_Handler,
		},
		{
			MethodName: "ListWordsByLevelV1",
			Handler:    _SrvFrontendApiService_ListWordsByLevelV1_Handler,
		},
		{
			MethodName: "ListWordsByKanjiV1",
			Handler:    _SrvFrontendApiService_ListWordsByKanjiV1_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "kioku/srv-frontend-api/v1/srv-frontend-api.proto",
}

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

Functions

func RegisterSrvFrontendApiServiceHandler

func RegisterSrvFrontendApiServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterSrvFrontendApiServiceHandler registers the http handlers for service SrvFrontendApiService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterSrvFrontendApiServiceHandlerClient

func RegisterSrvFrontendApiServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SrvFrontendApiServiceClient) error

RegisterSrvFrontendApiServiceHandlerClient registers the http handlers for service SrvFrontendApiService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SrvFrontendApiServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SrvFrontendApiServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SrvFrontendApiServiceClient" to call the correct interceptors.

func RegisterSrvFrontendApiServiceHandlerFromEndpoint

func RegisterSrvFrontendApiServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterSrvFrontendApiServiceHandlerFromEndpoint is same as RegisterSrvFrontendApiServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterSrvFrontendApiServiceHandlerServer

func RegisterSrvFrontendApiServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SrvFrontendApiServiceServer) error

RegisterSrvFrontendApiServiceHandlerServer registers the http handlers for service SrvFrontendApiService to "mux". UnaryRPC :call SrvFrontendApiServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSrvFrontendApiServiceHandlerFromEndpoint instead.

func RegisterSrvFrontendApiServiceServer

func RegisterSrvFrontendApiServiceServer(s grpc.ServiceRegistrar, srv SrvFrontendApiServiceServer)

Types

type GetKanjiV1Request

type GetKanjiV1Request struct {
	KanjiId uint64 `protobuf:"varint,1,opt,name=kanji_id,json=kanjiId,proto3" json:"kanji_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetKanjiV1Request) Descriptor deprecated

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

Deprecated: Use GetKanjiV1Request.ProtoReflect.Descriptor instead.

func (*GetKanjiV1Request) GetKanjiId

func (x *GetKanjiV1Request) GetKanjiId() uint64

func (*GetKanjiV1Request) ProtoMessage

func (*GetKanjiV1Request) ProtoMessage()

func (*GetKanjiV1Request) ProtoReflect

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

func (*GetKanjiV1Request) Reset

func (x *GetKanjiV1Request) Reset()

func (*GetKanjiV1Request) String

func (x *GetKanjiV1Request) String() string

func (*GetKanjiV1Request) Validate

func (m *GetKanjiV1Request) Validate() error

Validate checks the field values on GetKanjiV1Request with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetKanjiV1Request) ValidateAll

func (m *GetKanjiV1Request) ValidateAll() error

ValidateAll checks the field values on GetKanjiV1Request with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetKanjiV1RequestMultiError, or nil if none found.

type GetKanjiV1RequestMultiError

type GetKanjiV1RequestMultiError []error

GetKanjiV1RequestMultiError is an error wrapping multiple validation errors returned by GetKanjiV1Request.ValidateAll() if the designated constraints aren't met.

func (GetKanjiV1RequestMultiError) AllErrors

func (m GetKanjiV1RequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetKanjiV1RequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetKanjiV1RequestValidationError

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

GetKanjiV1RequestValidationError is the validation error returned by GetKanjiV1Request.Validate if the designated constraints aren't met.

func (GetKanjiV1RequestValidationError) Cause

Cause function returns cause value.

func (GetKanjiV1RequestValidationError) Error

Error satisfies the builtin error interface

func (GetKanjiV1RequestValidationError) ErrorName

ErrorName returns error name.

func (GetKanjiV1RequestValidationError) Field

Field function returns field value.

func (GetKanjiV1RequestValidationError) Key

Key function returns key value.

func (GetKanjiV1RequestValidationError) Reason

Reason function returns reason value.

type GetKanjiV1Response

type GetKanjiV1Response struct {
	Kanji *Kanji `protobuf:"bytes,1,opt,name=kanji,proto3" json:"kanji,omitempty"`
	// contains filtered or unexported fields
}

func (*GetKanjiV1Response) Descriptor deprecated

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

Deprecated: Use GetKanjiV1Response.ProtoReflect.Descriptor instead.

func (*GetKanjiV1Response) GetKanji

func (x *GetKanjiV1Response) GetKanji() *Kanji

func (*GetKanjiV1Response) ProtoMessage

func (*GetKanjiV1Response) ProtoMessage()

func (*GetKanjiV1Response) ProtoReflect

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

func (*GetKanjiV1Response) Reset

func (x *GetKanjiV1Response) Reset()

func (*GetKanjiV1Response) String

func (x *GetKanjiV1Response) String() string

func (*GetKanjiV1Response) Validate

func (m *GetKanjiV1Response) Validate() error

Validate checks the field values on GetKanjiV1Response with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetKanjiV1Response) ValidateAll

func (m *GetKanjiV1Response) ValidateAll() error

ValidateAll checks the field values on GetKanjiV1Response with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetKanjiV1ResponseMultiError, or nil if none found.

type GetKanjiV1ResponseMultiError

type GetKanjiV1ResponseMultiError []error

GetKanjiV1ResponseMultiError is an error wrapping multiple validation errors returned by GetKanjiV1Response.ValidateAll() if the designated constraints aren't met.

func (GetKanjiV1ResponseMultiError) AllErrors

func (m GetKanjiV1ResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetKanjiV1ResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetKanjiV1ResponseValidationError

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

GetKanjiV1ResponseValidationError is the validation error returned by GetKanjiV1Response.Validate if the designated constraints aren't met.

func (GetKanjiV1ResponseValidationError) Cause

Cause function returns cause value.

func (GetKanjiV1ResponseValidationError) Error

Error satisfies the builtin error interface

func (GetKanjiV1ResponseValidationError) ErrorName

ErrorName returns error name.

func (GetKanjiV1ResponseValidationError) Field

Field function returns field value.

func (GetKanjiV1ResponseValidationError) Key

Key function returns key value.

func (GetKanjiV1ResponseValidationError) Reason

Reason function returns reason value.

type GetWordV1Request

type GetWordV1Request struct {
	WordId uint64 `protobuf:"varint,1,opt,name=word_id,json=wordId,proto3" json:"word_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetWordV1Request) Descriptor deprecated

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

Deprecated: Use GetWordV1Request.ProtoReflect.Descriptor instead.

func (*GetWordV1Request) GetWordId

func (x *GetWordV1Request) GetWordId() uint64

func (*GetWordV1Request) ProtoMessage

func (*GetWordV1Request) ProtoMessage()

func (*GetWordV1Request) ProtoReflect

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

func (*GetWordV1Request) Reset

func (x *GetWordV1Request) Reset()

func (*GetWordV1Request) String

func (x *GetWordV1Request) String() string

func (*GetWordV1Request) Validate

func (m *GetWordV1Request) Validate() error

Validate checks the field values on GetWordV1Request with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetWordV1Request) ValidateAll

func (m *GetWordV1Request) ValidateAll() error

ValidateAll checks the field values on GetWordV1Request with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetWordV1RequestMultiError, or nil if none found.

type GetWordV1RequestMultiError

type GetWordV1RequestMultiError []error

GetWordV1RequestMultiError is an error wrapping multiple validation errors returned by GetWordV1Request.ValidateAll() if the designated constraints aren't met.

func (GetWordV1RequestMultiError) AllErrors

func (m GetWordV1RequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetWordV1RequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetWordV1RequestValidationError

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

GetWordV1RequestValidationError is the validation error returned by GetWordV1Request.Validate if the designated constraints aren't met.

func (GetWordV1RequestValidationError) Cause

Cause function returns cause value.

func (GetWordV1RequestValidationError) Error

Error satisfies the builtin error interface

func (GetWordV1RequestValidationError) ErrorName

ErrorName returns error name.

func (GetWordV1RequestValidationError) Field

Field function returns field value.

func (GetWordV1RequestValidationError) Key

Key function returns key value.

func (GetWordV1RequestValidationError) Reason

Reason function returns reason value.

type GetWordV1Response

type GetWordV1Response struct {
	Word *Word `protobuf:"bytes,1,opt,name=word,proto3" json:"word,omitempty"`
	// contains filtered or unexported fields
}

func (*GetWordV1Response) Descriptor deprecated

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

Deprecated: Use GetWordV1Response.ProtoReflect.Descriptor instead.

func (*GetWordV1Response) GetWord

func (x *GetWordV1Response) GetWord() *Word

func (*GetWordV1Response) ProtoMessage

func (*GetWordV1Response) ProtoMessage()

func (*GetWordV1Response) ProtoReflect

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

func (*GetWordV1Response) Reset

func (x *GetWordV1Response) Reset()

func (*GetWordV1Response) String

func (x *GetWordV1Response) String() string

func (*GetWordV1Response) Validate

func (m *GetWordV1Response) Validate() error

Validate checks the field values on GetWordV1Response with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetWordV1Response) ValidateAll

func (m *GetWordV1Response) ValidateAll() error

ValidateAll checks the field values on GetWordV1Response with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetWordV1ResponseMultiError, or nil if none found.

type GetWordV1ResponseMultiError

type GetWordV1ResponseMultiError []error

GetWordV1ResponseMultiError is an error wrapping multiple validation errors returned by GetWordV1Response.ValidateAll() if the designated constraints aren't met.

func (GetWordV1ResponseMultiError) AllErrors

func (m GetWordV1ResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetWordV1ResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetWordV1ResponseValidationError

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

GetWordV1ResponseValidationError is the validation error returned by GetWordV1Response.Validate if the designated constraints aren't met.

func (GetWordV1ResponseValidationError) Cause

Cause function returns cause value.

func (GetWordV1ResponseValidationError) Error

Error satisfies the builtin error interface

func (GetWordV1ResponseValidationError) ErrorName

ErrorName returns error name.

func (GetWordV1ResponseValidationError) Field

Field function returns field value.

func (GetWordV1ResponseValidationError) Key

Key function returns key value.

func (GetWordV1ResponseValidationError) Reason

Reason function returns reason value.

type Kanji

type Kanji struct {
	Id           uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Kanji        string   `protobuf:"bytes,2,opt,name=kanji,proto3" json:"kanji,omitempty"`
	Primary      string   `protobuf:"bytes,3,opt,name=primary,proto3" json:"primary,omitempty"`
	Level        uint32   `protobuf:"varint,4,opt,name=level,proto3" json:"level,omitempty"`
	Alternatives []string `protobuf:"bytes,5,rep,name=alternatives,proto3" json:"alternatives,omitempty"`
	Onyomi       []string `protobuf:"bytes,6,rep,name=onyomi,proto3" json:"onyomi,omitempty"`
	Kunyomi      []string `protobuf:"bytes,7,rep,name=kunyomi,proto3" json:"kunyomi,omitempty"`
	// contains filtered or unexported fields
}

func (*Kanji) Descriptor deprecated

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

Deprecated: Use Kanji.ProtoReflect.Descriptor instead.

func (*Kanji) GetAlternatives

func (x *Kanji) GetAlternatives() []string

func (*Kanji) GetId

func (x *Kanji) GetId() uint64

func (*Kanji) GetKanji

func (x *Kanji) GetKanji() string

func (*Kanji) GetKunyomi

func (x *Kanji) GetKunyomi() []string

func (*Kanji) GetLevel

func (x *Kanji) GetLevel() uint32

func (*Kanji) GetOnyomi

func (x *Kanji) GetOnyomi() []string

func (*Kanji) GetPrimary

func (x *Kanji) GetPrimary() string

func (*Kanji) ProtoMessage

func (*Kanji) ProtoMessage()

func (*Kanji) ProtoReflect

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

func (*Kanji) Reset

func (x *Kanji) Reset()

func (*Kanji) String

func (x *Kanji) String() string

func (*Kanji) Validate

func (m *Kanji) Validate() error

Validate checks the field values on Kanji with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Kanji) ValidateAll

func (m *Kanji) ValidateAll() error

ValidateAll checks the field values on Kanji with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in KanjiMultiError, or nil if none found.

type KanjiMultiError

type KanjiMultiError []error

KanjiMultiError is an error wrapping multiple validation errors returned by Kanji.ValidateAll() if the designated constraints aren't met.

func (KanjiMultiError) AllErrors

func (m KanjiMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (KanjiMultiError) Error

func (m KanjiMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type KanjiValidationError

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

KanjiValidationError is the validation error returned by Kanji.Validate if the designated constraints aren't met.

func (KanjiValidationError) Cause

func (e KanjiValidationError) Cause() error

Cause function returns cause value.

func (KanjiValidationError) Error

func (e KanjiValidationError) Error() string

Error satisfies the builtin error interface

func (KanjiValidationError) ErrorName

func (e KanjiValidationError) ErrorName() string

ErrorName returns error name.

func (KanjiValidationError) Field

func (e KanjiValidationError) Field() string

Field function returns field value.

func (KanjiValidationError) Key

func (e KanjiValidationError) Key() bool

Key function returns key value.

func (KanjiValidationError) Reason

func (e KanjiValidationError) Reason() string

Reason function returns reason value.

type ListKanjiV1Request

type ListKanjiV1Request struct {
	Level uint32 `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"`
	// contains filtered or unexported fields
}

func (*ListKanjiV1Request) Descriptor deprecated

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

Deprecated: Use ListKanjiV1Request.ProtoReflect.Descriptor instead.

func (*ListKanjiV1Request) GetLevel

func (x *ListKanjiV1Request) GetLevel() uint32

func (*ListKanjiV1Request) ProtoMessage

func (*ListKanjiV1Request) ProtoMessage()

func (*ListKanjiV1Request) ProtoReflect

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

func (*ListKanjiV1Request) Reset

func (x *ListKanjiV1Request) Reset()

func (*ListKanjiV1Request) String

func (x *ListKanjiV1Request) String() string

func (*ListKanjiV1Request) Validate

func (m *ListKanjiV1Request) Validate() error

Validate checks the field values on ListKanjiV1Request with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ListKanjiV1Request) ValidateAll

func (m *ListKanjiV1Request) ValidateAll() error

ValidateAll checks the field values on ListKanjiV1Request with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListKanjiV1RequestMultiError, or nil if none found.

type ListKanjiV1RequestMultiError

type ListKanjiV1RequestMultiError []error

ListKanjiV1RequestMultiError is an error wrapping multiple validation errors returned by ListKanjiV1Request.ValidateAll() if the designated constraints aren't met.

func (ListKanjiV1RequestMultiError) AllErrors

func (m ListKanjiV1RequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ListKanjiV1RequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ListKanjiV1RequestValidationError

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

ListKanjiV1RequestValidationError is the validation error returned by ListKanjiV1Request.Validate if the designated constraints aren't met.

func (ListKanjiV1RequestValidationError) Cause

Cause function returns cause value.

func (ListKanjiV1RequestValidationError) Error

Error satisfies the builtin error interface

func (ListKanjiV1RequestValidationError) ErrorName

ErrorName returns error name.

func (ListKanjiV1RequestValidationError) Field

Field function returns field value.

func (ListKanjiV1RequestValidationError) Key

Key function returns key value.

func (ListKanjiV1RequestValidationError) Reason

Reason function returns reason value.

type ListKanjiV1Response

type ListKanjiV1Response struct {
	Kanji []*Kanji `protobuf:"bytes,1,rep,name=kanji,proto3" json:"kanji,omitempty"`
	// contains filtered or unexported fields
}

func (*ListKanjiV1Response) Descriptor deprecated

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

Deprecated: Use ListKanjiV1Response.ProtoReflect.Descriptor instead.

func (*ListKanjiV1Response) GetKanji

func (x *ListKanjiV1Response) GetKanji() []*Kanji

func (*ListKanjiV1Response) ProtoMessage

func (*ListKanjiV1Response) ProtoMessage()

func (*ListKanjiV1Response) ProtoReflect

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

func (*ListKanjiV1Response) Reset

func (x *ListKanjiV1Response) Reset()

func (*ListKanjiV1Response) String

func (x *ListKanjiV1Response) String() string

func (*ListKanjiV1Response) Validate

func (m *ListKanjiV1Response) Validate() error

Validate checks the field values on ListKanjiV1Response with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ListKanjiV1Response) ValidateAll

func (m *ListKanjiV1Response) ValidateAll() error

ValidateAll checks the field values on ListKanjiV1Response with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListKanjiV1ResponseMultiError, or nil if none found.

type ListKanjiV1ResponseMultiError

type ListKanjiV1ResponseMultiError []error

ListKanjiV1ResponseMultiError is an error wrapping multiple validation errors returned by ListKanjiV1Response.ValidateAll() if the designated constraints aren't met.

func (ListKanjiV1ResponseMultiError) AllErrors

func (m ListKanjiV1ResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ListKanjiV1ResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ListKanjiV1ResponseValidationError

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

ListKanjiV1ResponseValidationError is the validation error returned by ListKanjiV1Response.Validate if the designated constraints aren't met.

func (ListKanjiV1ResponseValidationError) Cause

Cause function returns cause value.

func (ListKanjiV1ResponseValidationError) Error

Error satisfies the builtin error interface

func (ListKanjiV1ResponseValidationError) ErrorName

ErrorName returns error name.

func (ListKanjiV1ResponseValidationError) Field

Field function returns field value.

func (ListKanjiV1ResponseValidationError) Key

Key function returns key value.

func (ListKanjiV1ResponseValidationError) Reason

Reason function returns reason value.

type ListWordsByKanjiV1Request

type ListWordsByKanjiV1Request struct {
	KanjiId uint64 `protobuf:"varint,1,opt,name=kanji_id,json=kanjiId,proto3" json:"kanji_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ListWordsByKanjiV1Request) Descriptor deprecated

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

Deprecated: Use ListWordsByKanjiV1Request.ProtoReflect.Descriptor instead.

func (*ListWordsByKanjiV1Request) GetKanjiId

func (x *ListWordsByKanjiV1Request) GetKanjiId() uint64

func (*ListWordsByKanjiV1Request) ProtoMessage

func (*ListWordsByKanjiV1Request) ProtoMessage()

func (*ListWordsByKanjiV1Request) ProtoReflect

func (*ListWordsByKanjiV1Request) Reset

func (x *ListWordsByKanjiV1Request) Reset()

func (*ListWordsByKanjiV1Request) String

func (x *ListWordsByKanjiV1Request) String() string

func (*ListWordsByKanjiV1Request) Validate

func (m *ListWordsByKanjiV1Request) Validate() error

Validate checks the field values on ListWordsByKanjiV1Request with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ListWordsByKanjiV1Request) ValidateAll

func (m *ListWordsByKanjiV1Request) ValidateAll() error

ValidateAll checks the field values on ListWordsByKanjiV1Request with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListWordsByKanjiV1RequestMultiError, or nil if none found.

type ListWordsByKanjiV1RequestMultiError

type ListWordsByKanjiV1RequestMultiError []error

ListWordsByKanjiV1RequestMultiError is an error wrapping multiple validation errors returned by ListWordsByKanjiV1Request.ValidateAll() if the designated constraints aren't met.

func (ListWordsByKanjiV1RequestMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (ListWordsByKanjiV1RequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ListWordsByKanjiV1RequestValidationError

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

ListWordsByKanjiV1RequestValidationError is the validation error returned by ListWordsByKanjiV1Request.Validate if the designated constraints aren't met.

func (ListWordsByKanjiV1RequestValidationError) Cause

Cause function returns cause value.

func (ListWordsByKanjiV1RequestValidationError) Error

Error satisfies the builtin error interface

func (ListWordsByKanjiV1RequestValidationError) ErrorName

ErrorName returns error name.

func (ListWordsByKanjiV1RequestValidationError) Field

Field function returns field value.

func (ListWordsByKanjiV1RequestValidationError) Key

Key function returns key value.

func (ListWordsByKanjiV1RequestValidationError) Reason

Reason function returns reason value.

type ListWordsByLevelV1Request

type ListWordsByLevelV1Request struct {
	Level uint32 `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"`
	// contains filtered or unexported fields
}

func (*ListWordsByLevelV1Request) Descriptor deprecated

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

Deprecated: Use ListWordsByLevelV1Request.ProtoReflect.Descriptor instead.

func (*ListWordsByLevelV1Request) GetLevel

func (x *ListWordsByLevelV1Request) GetLevel() uint32

func (*ListWordsByLevelV1Request) ProtoMessage

func (*ListWordsByLevelV1Request) ProtoMessage()

func (*ListWordsByLevelV1Request) ProtoReflect

func (*ListWordsByLevelV1Request) Reset

func (x *ListWordsByLevelV1Request) Reset()

func (*ListWordsByLevelV1Request) String

func (x *ListWordsByLevelV1Request) String() string

func (*ListWordsByLevelV1Request) Validate

func (m *ListWordsByLevelV1Request) Validate() error

Validate checks the field values on ListWordsByLevelV1Request with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ListWordsByLevelV1Request) ValidateAll

func (m *ListWordsByLevelV1Request) ValidateAll() error

ValidateAll checks the field values on ListWordsByLevelV1Request with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListWordsByLevelV1RequestMultiError, or nil if none found.

type ListWordsByLevelV1RequestMultiError

type ListWordsByLevelV1RequestMultiError []error

ListWordsByLevelV1RequestMultiError is an error wrapping multiple validation errors returned by ListWordsByLevelV1Request.ValidateAll() if the designated constraints aren't met.

func (ListWordsByLevelV1RequestMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (ListWordsByLevelV1RequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ListWordsByLevelV1RequestValidationError

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

ListWordsByLevelV1RequestValidationError is the validation error returned by ListWordsByLevelV1Request.Validate if the designated constraints aren't met.

func (ListWordsByLevelV1RequestValidationError) Cause

Cause function returns cause value.

func (ListWordsByLevelV1RequestValidationError) Error

Error satisfies the builtin error interface

func (ListWordsByLevelV1RequestValidationError) ErrorName

ErrorName returns error name.

func (ListWordsByLevelV1RequestValidationError) Field

Field function returns field value.

func (ListWordsByLevelV1RequestValidationError) Key

Key function returns key value.

func (ListWordsByLevelV1RequestValidationError) Reason

Reason function returns reason value.

type ListWordsV1Response

type ListWordsV1Response struct {
	Words []*Word `protobuf:"bytes,1,rep,name=words,proto3" json:"words,omitempty"`
	// contains filtered or unexported fields
}

func (*ListWordsV1Response) Descriptor deprecated

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

Deprecated: Use ListWordsV1Response.ProtoReflect.Descriptor instead.

func (*ListWordsV1Response) GetWords

func (x *ListWordsV1Response) GetWords() []*Word

func (*ListWordsV1Response) ProtoMessage

func (*ListWordsV1Response) ProtoMessage()

func (*ListWordsV1Response) ProtoReflect

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

func (*ListWordsV1Response) Reset

func (x *ListWordsV1Response) Reset()

func (*ListWordsV1Response) String

func (x *ListWordsV1Response) String() string

func (*ListWordsV1Response) Validate

func (m *ListWordsV1Response) Validate() error

Validate checks the field values on ListWordsV1Response with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ListWordsV1Response) ValidateAll

func (m *ListWordsV1Response) ValidateAll() error

ValidateAll checks the field values on ListWordsV1Response with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListWordsV1ResponseMultiError, or nil if none found.

type ListWordsV1ResponseMultiError

type ListWordsV1ResponseMultiError []error

ListWordsV1ResponseMultiError is an error wrapping multiple validation errors returned by ListWordsV1Response.ValidateAll() if the designated constraints aren't met.

func (ListWordsV1ResponseMultiError) AllErrors

func (m ListWordsV1ResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ListWordsV1ResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ListWordsV1ResponseValidationError

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

ListWordsV1ResponseValidationError is the validation error returned by ListWordsV1Response.Validate if the designated constraints aren't met.

func (ListWordsV1ResponseValidationError) Cause

Cause function returns cause value.

func (ListWordsV1ResponseValidationError) Error

Error satisfies the builtin error interface

func (ListWordsV1ResponseValidationError) ErrorName

ErrorName returns error name.

func (ListWordsV1ResponseValidationError) Field

Field function returns field value.

func (ListWordsV1ResponseValidationError) Key

Key function returns key value.

func (ListWordsV1ResponseValidationError) Reason

Reason function returns reason value.

type Sentence

type Sentence struct {
	Id           uint64                 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Origin       string                 `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"`
	Translations []*SentenceTranslation `protobuf:"bytes,3,rep,name=translations,proto3" json:"translations,omitempty"`
	// contains filtered or unexported fields
}

func (*Sentence) Descriptor deprecated

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

Deprecated: Use Sentence.ProtoReflect.Descriptor instead.

func (*Sentence) GetId

func (x *Sentence) GetId() uint64

func (*Sentence) GetOrigin

func (x *Sentence) GetOrigin() string

func (*Sentence) GetTranslations

func (x *Sentence) GetTranslations() []*SentenceTranslation

func (*Sentence) ProtoMessage

func (*Sentence) ProtoMessage()

func (*Sentence) ProtoReflect

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

func (*Sentence) Reset

func (x *Sentence) Reset()

func (*Sentence) String

func (x *Sentence) String() string

func (*Sentence) Validate

func (m *Sentence) Validate() error

Validate checks the field values on Sentence with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Sentence) ValidateAll

func (m *Sentence) ValidateAll() error

ValidateAll checks the field values on Sentence with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SentenceMultiError, or nil if none found.

type SentenceMultiError

type SentenceMultiError []error

SentenceMultiError is an error wrapping multiple validation errors returned by Sentence.ValidateAll() if the designated constraints aren't met.

func (SentenceMultiError) AllErrors

func (m SentenceMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SentenceMultiError) Error

func (m SentenceMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type SentenceTranslation

type SentenceTranslation struct {
	Id          uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Language    uint32 `protobuf:"varint,2,opt,name=language,proto3" json:"language,omitempty"`
	Translation string `protobuf:"bytes,3,opt,name=translation,proto3" json:"translation,omitempty"`
	// contains filtered or unexported fields
}

func (*SentenceTranslation) Descriptor deprecated

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

Deprecated: Use SentenceTranslation.ProtoReflect.Descriptor instead.

func (*SentenceTranslation) GetId

func (x *SentenceTranslation) GetId() uint64

func (*SentenceTranslation) GetLanguage

func (x *SentenceTranslation) GetLanguage() uint32

func (*SentenceTranslation) GetTranslation

func (x *SentenceTranslation) GetTranslation() string

func (*SentenceTranslation) ProtoMessage

func (*SentenceTranslation) ProtoMessage()

func (*SentenceTranslation) ProtoReflect

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

func (*SentenceTranslation) Reset

func (x *SentenceTranslation) Reset()

func (*SentenceTranslation) String

func (x *SentenceTranslation) String() string

func (*SentenceTranslation) Validate

func (m *SentenceTranslation) Validate() error

Validate checks the field values on SentenceTranslation with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*SentenceTranslation) ValidateAll

func (m *SentenceTranslation) ValidateAll() error

ValidateAll checks the field values on SentenceTranslation with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SentenceTranslationMultiError, or nil if none found.

type SentenceTranslationMultiError

type SentenceTranslationMultiError []error

SentenceTranslationMultiError is an error wrapping multiple validation errors returned by SentenceTranslation.ValidateAll() if the designated constraints aren't met.

func (SentenceTranslationMultiError) AllErrors

func (m SentenceTranslationMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SentenceTranslationMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type SentenceTranslationValidationError

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

SentenceTranslationValidationError is the validation error returned by SentenceTranslation.Validate if the designated constraints aren't met.

func (SentenceTranslationValidationError) Cause

Cause function returns cause value.

func (SentenceTranslationValidationError) Error

Error satisfies the builtin error interface

func (SentenceTranslationValidationError) ErrorName

ErrorName returns error name.

func (SentenceTranslationValidationError) Field

Field function returns field value.

func (SentenceTranslationValidationError) Key

Key function returns key value.

func (SentenceTranslationValidationError) Reason

Reason function returns reason value.

type SentenceValidationError

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

SentenceValidationError is the validation error returned by Sentence.Validate if the designated constraints aren't met.

func (SentenceValidationError) Cause

func (e SentenceValidationError) Cause() error

Cause function returns cause value.

func (SentenceValidationError) Error

func (e SentenceValidationError) Error() string

Error satisfies the builtin error interface

func (SentenceValidationError) ErrorName

func (e SentenceValidationError) ErrorName() string

ErrorName returns error name.

func (SentenceValidationError) Field

func (e SentenceValidationError) Field() string

Field function returns field value.

func (SentenceValidationError) Key

func (e SentenceValidationError) Key() bool

Key function returns key value.

func (SentenceValidationError) Reason

func (e SentenceValidationError) Reason() string

Reason function returns reason value.

type SrvFrontendApiServiceClient

type SrvFrontendApiServiceClient interface {
	//Kanji part
	GetKanjiV1(ctx context.Context, in *GetKanjiV1Request, opts ...grpc.CallOption) (*GetKanjiV1Response, error)
	ListKanjiV1(ctx context.Context, in *ListKanjiV1Request, opts ...grpc.CallOption) (*ListKanjiV1Response, error)
	//Words part
	GetWordV1(ctx context.Context, in *GetWordV1Request, opts ...grpc.CallOption) (*GetWordV1Response, error)
	ListWordsByLevelV1(ctx context.Context, in *ListWordsByLevelV1Request, opts ...grpc.CallOption) (*ListWordsV1Response, error)
	ListWordsByKanjiV1(ctx context.Context, in *ListWordsByKanjiV1Request, opts ...grpc.CallOption) (*ListWordsV1Response, error)
}

SrvFrontendApiServiceClient is the client API for SrvFrontendApiService 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.

type SrvFrontendApiServiceServer

type SrvFrontendApiServiceServer interface {
	//Kanji part
	GetKanjiV1(context.Context, *GetKanjiV1Request) (*GetKanjiV1Response, error)
	ListKanjiV1(context.Context, *ListKanjiV1Request) (*ListKanjiV1Response, error)
	//Words part
	GetWordV1(context.Context, *GetWordV1Request) (*GetWordV1Response, error)
	ListWordsByLevelV1(context.Context, *ListWordsByLevelV1Request) (*ListWordsV1Response, error)
	ListWordsByKanjiV1(context.Context, *ListWordsByKanjiV1Request) (*ListWordsV1Response, error)
	// contains filtered or unexported methods
}

SrvFrontendApiServiceServer is the server API for SrvFrontendApiService service. All implementations must embed UnimplementedSrvFrontendApiServiceServer for forward compatibility

type UnimplementedSrvFrontendApiServiceServer

type UnimplementedSrvFrontendApiServiceServer struct {
}

UnimplementedSrvFrontendApiServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedSrvFrontendApiServiceServer) GetKanjiV1

func (UnimplementedSrvFrontendApiServiceServer) GetWordV1

func (UnimplementedSrvFrontendApiServiceServer) ListKanjiV1

func (UnimplementedSrvFrontendApiServiceServer) ListWordsByKanjiV1

func (UnimplementedSrvFrontendApiServiceServer) ListWordsByLevelV1

type UnsafeSrvFrontendApiServiceServer

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

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

type Word

type Word struct {
	Id           uint64      `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Word         string      `protobuf:"bytes,2,opt,name=word,proto3" json:"word,omitempty"`
	Primary      string      `protobuf:"bytes,3,opt,name=primary,proto3" json:"primary,omitempty"`
	Level        uint32      `protobuf:"varint,4,opt,name=level,proto3" json:"level,omitempty"`
	Composition  []*Kanji    `protobuf:"bytes,5,rep,name=composition,proto3" json:"composition,omitempty"`
	Alternatives []string    `protobuf:"bytes,6,rep,name=alternatives,proto3" json:"alternatives,omitempty"`
	Readings     []string    `protobuf:"bytes,7,rep,name=readings,proto3" json:"readings,omitempty"`
	Types        []string    `protobuf:"bytes,8,rep,name=types,proto3" json:"types,omitempty"`
	Sentences    []*Sentence `protobuf:"bytes,9,rep,name=sentences,proto3" json:"sentences,omitempty"`
	// contains filtered or unexported fields
}

func (*Word) Descriptor deprecated

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

Deprecated: Use Word.ProtoReflect.Descriptor instead.

func (*Word) GetAlternatives

func (x *Word) GetAlternatives() []string

func (*Word) GetComposition

func (x *Word) GetComposition() []*Kanji

func (*Word) GetId

func (x *Word) GetId() uint64

func (*Word) GetLevel

func (x *Word) GetLevel() uint32

func (*Word) GetPrimary

func (x *Word) GetPrimary() string

func (*Word) GetReadings

func (x *Word) GetReadings() []string

func (*Word) GetSentences

func (x *Word) GetSentences() []*Sentence

func (*Word) GetTypes

func (x *Word) GetTypes() []string

func (*Word) GetWord

func (x *Word) GetWord() string

func (*Word) ProtoMessage

func (*Word) ProtoMessage()

func (*Word) ProtoReflect

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

func (*Word) Reset

func (x *Word) Reset()

func (*Word) String

func (x *Word) String() string

func (*Word) Validate

func (m *Word) Validate() error

Validate checks the field values on Word with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Word) ValidateAll

func (m *Word) ValidateAll() error

ValidateAll checks the field values on Word with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in WordMultiError, or nil if none found.

type WordMultiError

type WordMultiError []error

WordMultiError is an error wrapping multiple validation errors returned by Word.ValidateAll() if the designated constraints aren't met.

func (WordMultiError) AllErrors

func (m WordMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (WordMultiError) Error

func (m WordMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type WordValidationError

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

WordValidationError is the validation error returned by Word.Validate if the designated constraints aren't met.

func (WordValidationError) Cause

func (e WordValidationError) Cause() error

Cause function returns cause value.

func (WordValidationError) Error

func (e WordValidationError) Error() string

Error satisfies the builtin error interface

func (WordValidationError) ErrorName

func (e WordValidationError) ErrorName() string

ErrorName returns error name.

func (WordValidationError) Field

func (e WordValidationError) Field() string

Field function returns field value.

func (WordValidationError) Key

func (e WordValidationError) Key() bool

Key function returns key value.

func (WordValidationError) Reason

func (e WordValidationError) Reason() string

Reason function returns reason value.

Directories

Path Synopsis
google.golang.org
protobuf/types/known/timestamppb
Package timestamppb contains generated types for google/protobuf/timestamp.proto.
Package timestamppb contains generated types for google/protobuf/timestamp.proto.

Jump to

Keyboard shortcuts

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