Documentation ¶
Overview ¶
Package srv_session_api is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterSrvSessionApiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterSrvSessionApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SrvSessionApiClient) error
- func RegisterSrvSessionApiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterSrvSessionApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SrvSessionApiServer) error
- func RegisterSrvSessionApiServer(s grpc.ServiceRegistrar, srv SrvSessionApiServer)
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetProgressId() uint64
- func (x *Event) GetProgressLevel() uint32
- func (x *Event) GetSrsLevel() uint32
- func (x *Event) GetSuccess() bool
- func (x *Event) GetUserId() uint64
- func (x *Event) GetUserLevel() uint32
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- func (m *Event) Validate() error
- func (m *Event) ValidateAll() error
- type EventMultiError
- type EventV1Reposnse
- func (*EventV1Reposnse) Descriptor() ([]byte, []int)deprecated
- func (x *EventV1Reposnse) GetSuccess() bool
- func (*EventV1Reposnse) ProtoMessage()
- func (x *EventV1Reposnse) ProtoReflect() protoreflect.Message
- func (x *EventV1Reposnse) Reset()
- func (x *EventV1Reposnse) String() string
- func (m *EventV1Reposnse) Validate() error
- func (m *EventV1Reposnse) ValidateAll() error
- type EventV1ReposnseMultiError
- type EventV1ReposnseValidationError
- func (e EventV1ReposnseValidationError) Cause() error
- func (e EventV1ReposnseValidationError) Error() string
- func (e EventV1ReposnseValidationError) ErrorName() string
- func (e EventV1ReposnseValidationError) Field() string
- func (e EventV1ReposnseValidationError) Key() bool
- func (e EventV1ReposnseValidationError) Reason() string
- type EventValidationError
- type KanjiEventV1Request
- func (*KanjiEventV1Request) Descriptor() ([]byte, []int)deprecated
- func (x *KanjiEventV1Request) GetEvent() *Event
- func (*KanjiEventV1Request) ProtoMessage()
- func (x *KanjiEventV1Request) ProtoReflect() protoreflect.Message
- func (x *KanjiEventV1Request) Reset()
- func (x *KanjiEventV1Request) String() string
- func (m *KanjiEventV1Request) Validate() error
- func (m *KanjiEventV1Request) ValidateAll() error
- type KanjiEventV1RequestMultiError
- type KanjiEventV1RequestValidationError
- func (e KanjiEventV1RequestValidationError) Cause() error
- func (e KanjiEventV1RequestValidationError) Error() string
- func (e KanjiEventV1RequestValidationError) ErrorName() string
- func (e KanjiEventV1RequestValidationError) Field() string
- func (e KanjiEventV1RequestValidationError) Key() bool
- func (e KanjiEventV1RequestValidationError) Reason() string
- type SrvSessionApiClient
- type SrvSessionApiServer
- type UnimplementedSrvSessionApiServer
- type UnsafeSrvSessionApiServer
- type WordEventV1Request
- func (*WordEventV1Request) Descriptor() ([]byte, []int)deprecated
- func (x *WordEventV1Request) GetEvent() *Event
- func (*WordEventV1Request) ProtoMessage()
- func (x *WordEventV1Request) ProtoReflect() protoreflect.Message
- func (x *WordEventV1Request) Reset()
- func (x *WordEventV1Request) String() string
- func (m *WordEventV1Request) Validate() error
- func (m *WordEventV1Request) ValidateAll() error
- type WordEventV1RequestMultiError
- type WordEventV1RequestValidationError
- func (e WordEventV1RequestValidationError) Cause() error
- func (e WordEventV1RequestValidationError) Error() string
- func (e WordEventV1RequestValidationError) ErrorName() string
- func (e WordEventV1RequestValidationError) Field() string
- func (e WordEventV1RequestValidationError) Key() bool
- func (e WordEventV1RequestValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
var File_kioku_srv_session_api_v1_srv_session_api_proto protoreflect.FileDescriptor
var SrvSessionApi_ServiceDesc = grpc.ServiceDesc{ ServiceName: "kioku.server.srv_session_api.v1.SrvSessionApi", HandlerType: (*SrvSessionApiServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "KanjiEventV1", Handler: _SrvSessionApi_KanjiEventV1_Handler, }, { MethodName: "WordEventV1", Handler: _SrvSessionApi_WordEventV1_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "kioku/srv-session-api/v1/srv-session-api.proto", }
SrvSessionApi_ServiceDesc is the grpc.ServiceDesc for SrvSessionApi service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSrvSessionApiHandler ¶
func RegisterSrvSessionApiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterSrvSessionApiHandler registers the http handlers for service SrvSessionApi to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterSrvSessionApiHandlerClient ¶
func RegisterSrvSessionApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SrvSessionApiClient) error
RegisterSrvSessionApiHandlerClient registers the http handlers for service SrvSessionApi to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SrvSessionApiClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SrvSessionApiClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SrvSessionApiClient" to call the correct interceptors.
func RegisterSrvSessionApiHandlerFromEndpoint ¶
func RegisterSrvSessionApiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterSrvSessionApiHandlerFromEndpoint is same as RegisterSrvSessionApiHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterSrvSessionApiHandlerServer ¶
func RegisterSrvSessionApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SrvSessionApiServer) error
RegisterSrvSessionApiHandlerServer registers the http handlers for service SrvSessionApi to "mux". UnaryRPC :call SrvSessionApiServer 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 RegisterSrvSessionApiHandlerFromEndpoint instead.
func RegisterSrvSessionApiServer ¶
func RegisterSrvSessionApiServer(s grpc.ServiceRegistrar, srv SrvSessionApiServer)
Types ¶
type Event ¶
type Event struct { UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` UserLevel uint32 `protobuf:"varint,2,opt,name=user_level,json=userLevel,proto3" json:"user_level,omitempty"` ProgressId uint64 `protobuf:"varint,3,opt,name=progress_id,json=progressId,proto3" json:"progress_id,omitempty"` ProgressLevel uint32 `protobuf:"varint,4,opt,name=progress_level,json=progressLevel,proto3" json:"progress_level,omitempty"` SrsLevel uint32 `protobuf:"varint,5,opt,name=srs_level,json=srsLevel,proto3" json:"srs_level,omitempty"` Success bool `protobuf:"varint,6,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*Event) Descriptor
deprecated
func (*Event) GetProgressId ¶
func (*Event) GetProgressLevel ¶
func (*Event) GetSrsLevel ¶
func (*Event) GetSuccess ¶
func (*Event) GetUserLevel ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
func (*Event) Validate ¶
Validate checks the field values on Event 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 (*Event) ValidateAll ¶
ValidateAll checks the field values on Event 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 EventMultiError, or nil if none found.
type EventMultiError ¶
type EventMultiError []error
EventMultiError is an error wrapping multiple validation errors returned by Event.ValidateAll() if the designated constraints aren't met.
func (EventMultiError) AllErrors ¶
func (m EventMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (EventMultiError) Error ¶
func (m EventMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type EventV1Reposnse ¶
type EventV1Reposnse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*EventV1Reposnse) Descriptor
deprecated
func (*EventV1Reposnse) Descriptor() ([]byte, []int)
Deprecated: Use EventV1Reposnse.ProtoReflect.Descriptor instead.
func (*EventV1Reposnse) GetSuccess ¶
func (x *EventV1Reposnse) GetSuccess() bool
func (*EventV1Reposnse) ProtoMessage ¶
func (*EventV1Reposnse) ProtoMessage()
func (*EventV1Reposnse) ProtoReflect ¶
func (x *EventV1Reposnse) ProtoReflect() protoreflect.Message
func (*EventV1Reposnse) Reset ¶
func (x *EventV1Reposnse) Reset()
func (*EventV1Reposnse) String ¶
func (x *EventV1Reposnse) String() string
func (*EventV1Reposnse) Validate ¶
func (m *EventV1Reposnse) Validate() error
Validate checks the field values on EventV1Reposnse 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 (*EventV1Reposnse) ValidateAll ¶
func (m *EventV1Reposnse) ValidateAll() error
ValidateAll checks the field values on EventV1Reposnse 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 EventV1ReposnseMultiError, or nil if none found.
type EventV1ReposnseMultiError ¶
type EventV1ReposnseMultiError []error
EventV1ReposnseMultiError is an error wrapping multiple validation errors returned by EventV1Reposnse.ValidateAll() if the designated constraints aren't met.
func (EventV1ReposnseMultiError) AllErrors ¶
func (m EventV1ReposnseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (EventV1ReposnseMultiError) Error ¶
func (m EventV1ReposnseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type EventV1ReposnseValidationError ¶
type EventV1ReposnseValidationError struct {
// contains filtered or unexported fields
}
EventV1ReposnseValidationError is the validation error returned by EventV1Reposnse.Validate if the designated constraints aren't met.
func (EventV1ReposnseValidationError) Cause ¶
func (e EventV1ReposnseValidationError) Cause() error
Cause function returns cause value.
func (EventV1ReposnseValidationError) Error ¶
func (e EventV1ReposnseValidationError) Error() string
Error satisfies the builtin error interface
func (EventV1ReposnseValidationError) ErrorName ¶
func (e EventV1ReposnseValidationError) ErrorName() string
ErrorName returns error name.
func (EventV1ReposnseValidationError) Field ¶
func (e EventV1ReposnseValidationError) Field() string
Field function returns field value.
func (EventV1ReposnseValidationError) Key ¶
func (e EventV1ReposnseValidationError) Key() bool
Key function returns key value.
func (EventV1ReposnseValidationError) Reason ¶
func (e EventV1ReposnseValidationError) Reason() string
Reason function returns reason value.
type EventValidationError ¶
type EventValidationError struct {
// contains filtered or unexported fields
}
EventValidationError is the validation error returned by Event.Validate if the designated constraints aren't met.
func (EventValidationError) Cause ¶
func (e EventValidationError) Cause() error
Cause function returns cause value.
func (EventValidationError) Error ¶
func (e EventValidationError) Error() string
Error satisfies the builtin error interface
func (EventValidationError) ErrorName ¶
func (e EventValidationError) ErrorName() string
ErrorName returns error name.
func (EventValidationError) Field ¶
func (e EventValidationError) Field() string
Field function returns field value.
func (EventValidationError) Key ¶
func (e EventValidationError) Key() bool
Key function returns key value.
func (EventValidationError) Reason ¶
func (e EventValidationError) Reason() string
Reason function returns reason value.
type KanjiEventV1Request ¶
type KanjiEventV1Request struct { Event *Event `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` // contains filtered or unexported fields }
func (*KanjiEventV1Request) Descriptor
deprecated
func (*KanjiEventV1Request) Descriptor() ([]byte, []int)
Deprecated: Use KanjiEventV1Request.ProtoReflect.Descriptor instead.
func (*KanjiEventV1Request) GetEvent ¶
func (x *KanjiEventV1Request) GetEvent() *Event
func (*KanjiEventV1Request) ProtoMessage ¶
func (*KanjiEventV1Request) ProtoMessage()
func (*KanjiEventV1Request) ProtoReflect ¶
func (x *KanjiEventV1Request) ProtoReflect() protoreflect.Message
func (*KanjiEventV1Request) Reset ¶
func (x *KanjiEventV1Request) Reset()
func (*KanjiEventV1Request) String ¶
func (x *KanjiEventV1Request) String() string
func (*KanjiEventV1Request) Validate ¶
func (m *KanjiEventV1Request) Validate() error
Validate checks the field values on KanjiEventV1Request 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 (*KanjiEventV1Request) ValidateAll ¶
func (m *KanjiEventV1Request) ValidateAll() error
ValidateAll checks the field values on KanjiEventV1Request 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 KanjiEventV1RequestMultiError, or nil if none found.
type KanjiEventV1RequestMultiError ¶
type KanjiEventV1RequestMultiError []error
KanjiEventV1RequestMultiError is an error wrapping multiple validation errors returned by KanjiEventV1Request.ValidateAll() if the designated constraints aren't met.
func (KanjiEventV1RequestMultiError) AllErrors ¶
func (m KanjiEventV1RequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (KanjiEventV1RequestMultiError) Error ¶
func (m KanjiEventV1RequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type KanjiEventV1RequestValidationError ¶
type KanjiEventV1RequestValidationError struct {
// contains filtered or unexported fields
}
KanjiEventV1RequestValidationError is the validation error returned by KanjiEventV1Request.Validate if the designated constraints aren't met.
func (KanjiEventV1RequestValidationError) Cause ¶
func (e KanjiEventV1RequestValidationError) Cause() error
Cause function returns cause value.
func (KanjiEventV1RequestValidationError) Error ¶
func (e KanjiEventV1RequestValidationError) Error() string
Error satisfies the builtin error interface
func (KanjiEventV1RequestValidationError) ErrorName ¶
func (e KanjiEventV1RequestValidationError) ErrorName() string
ErrorName returns error name.
func (KanjiEventV1RequestValidationError) Field ¶
func (e KanjiEventV1RequestValidationError) Field() string
Field function returns field value.
func (KanjiEventV1RequestValidationError) Key ¶
func (e KanjiEventV1RequestValidationError) Key() bool
Key function returns key value.
func (KanjiEventV1RequestValidationError) Reason ¶
func (e KanjiEventV1RequestValidationError) Reason() string
Reason function returns reason value.
type SrvSessionApiClient ¶
type SrvSessionApiClient interface { KanjiEventV1(ctx context.Context, in *KanjiEventV1Request, opts ...grpc.CallOption) (*EventV1Reposnse, error) WordEventV1(ctx context.Context, in *WordEventV1Request, opts ...grpc.CallOption) (*EventV1Reposnse, error) }
SrvSessionApiClient is the client API for SrvSessionApi 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 NewSrvSessionApiClient ¶
func NewSrvSessionApiClient(cc grpc.ClientConnInterface) SrvSessionApiClient
type SrvSessionApiServer ¶
type SrvSessionApiServer interface { KanjiEventV1(context.Context, *KanjiEventV1Request) (*EventV1Reposnse, error) WordEventV1(context.Context, *WordEventV1Request) (*EventV1Reposnse, error) // contains filtered or unexported methods }
SrvSessionApiServer is the server API for SrvSessionApi service. All implementations must embed UnimplementedSrvSessionApiServer for forward compatibility
type UnimplementedSrvSessionApiServer ¶
type UnimplementedSrvSessionApiServer struct { }
UnimplementedSrvSessionApiServer must be embedded to have forward compatible implementations.
func (UnimplementedSrvSessionApiServer) KanjiEventV1 ¶
func (UnimplementedSrvSessionApiServer) KanjiEventV1(context.Context, *KanjiEventV1Request) (*EventV1Reposnse, error)
func (UnimplementedSrvSessionApiServer) WordEventV1 ¶
func (UnimplementedSrvSessionApiServer) WordEventV1(context.Context, *WordEventV1Request) (*EventV1Reposnse, error)
type UnsafeSrvSessionApiServer ¶
type UnsafeSrvSessionApiServer interface {
// contains filtered or unexported methods
}
UnsafeSrvSessionApiServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SrvSessionApiServer will result in compilation errors.
type WordEventV1Request ¶
type WordEventV1Request struct { Event *Event `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` // contains filtered or unexported fields }
func (*WordEventV1Request) Descriptor
deprecated
func (*WordEventV1Request) Descriptor() ([]byte, []int)
Deprecated: Use WordEventV1Request.ProtoReflect.Descriptor instead.
func (*WordEventV1Request) GetEvent ¶
func (x *WordEventV1Request) GetEvent() *Event
func (*WordEventV1Request) ProtoMessage ¶
func (*WordEventV1Request) ProtoMessage()
func (*WordEventV1Request) ProtoReflect ¶
func (x *WordEventV1Request) ProtoReflect() protoreflect.Message
func (*WordEventV1Request) Reset ¶
func (x *WordEventV1Request) Reset()
func (*WordEventV1Request) String ¶
func (x *WordEventV1Request) String() string
func (*WordEventV1Request) Validate ¶
func (m *WordEventV1Request) Validate() error
Validate checks the field values on WordEventV1Request 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 (*WordEventV1Request) ValidateAll ¶
func (m *WordEventV1Request) ValidateAll() error
ValidateAll checks the field values on WordEventV1Request 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 WordEventV1RequestMultiError, or nil if none found.
type WordEventV1RequestMultiError ¶
type WordEventV1RequestMultiError []error
WordEventV1RequestMultiError is an error wrapping multiple validation errors returned by WordEventV1Request.ValidateAll() if the designated constraints aren't met.
func (WordEventV1RequestMultiError) AllErrors ¶
func (m WordEventV1RequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (WordEventV1RequestMultiError) Error ¶
func (m WordEventV1RequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type WordEventV1RequestValidationError ¶
type WordEventV1RequestValidationError struct {
// contains filtered or unexported fields
}
WordEventV1RequestValidationError is the validation error returned by WordEventV1Request.Validate if the designated constraints aren't met.
func (WordEventV1RequestValidationError) Cause ¶
func (e WordEventV1RequestValidationError) Cause() error
Cause function returns cause value.
func (WordEventV1RequestValidationError) Error ¶
func (e WordEventV1RequestValidationError) Error() string
Error satisfies the builtin error interface
func (WordEventV1RequestValidationError) ErrorName ¶
func (e WordEventV1RequestValidationError) ErrorName() string
ErrorName returns error name.
func (WordEventV1RequestValidationError) Field ¶
func (e WordEventV1RequestValidationError) Field() string
Field function returns field value.
func (WordEventV1RequestValidationError) Key ¶
func (e WordEventV1RequestValidationError) Key() bool
Key function returns key value.
func (WordEventV1RequestValidationError) Reason ¶
func (e WordEventV1RequestValidationError) Reason() string
Reason function returns reason value.
Source Files ¶
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. |