Documentation ¶
Overview ¶
Package services is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterNoticeServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterNoticeServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NoticeServiceClient) error
- func RegisterNoticeServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterNoticeServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NoticeServiceServer) error
- func RegisterNoticeServiceServer(s grpc.ServiceRegistrar, srv NoticeServiceServer)
- type CreateNoticeRequest
- func (*CreateNoticeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateNoticeRequest) GetContent() string
- func (x *CreateNoticeRequest) GetTitle() string
- func (*CreateNoticeRequest) ProtoMessage()
- func (x *CreateNoticeRequest) ProtoReflect() protoreflect.Message
- func (x *CreateNoticeRequest) Reset()
- func (x *CreateNoticeRequest) String() string
- func (m *CreateNoticeRequest) Validate() error
- type CreateNoticeRequestValidationError
- func (e CreateNoticeRequestValidationError) Cause() error
- func (e CreateNoticeRequestValidationError) Error() string
- func (e CreateNoticeRequestValidationError) ErrorName() string
- func (e CreateNoticeRequestValidationError) Field() string
- func (e CreateNoticeRequestValidationError) Key() bool
- func (e CreateNoticeRequestValidationError) Reason() string
- type GetNoticeRequest
- func (*GetNoticeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetNoticeRequest) GetId() string
- func (*GetNoticeRequest) ProtoMessage()
- func (x *GetNoticeRequest) ProtoReflect() protoreflect.Message
- func (x *GetNoticeRequest) Reset()
- func (x *GetNoticeRequest) String() string
- func (m *GetNoticeRequest) Validate() error
- type GetNoticeRequestValidationError
- func (e GetNoticeRequestValidationError) Cause() error
- func (e GetNoticeRequestValidationError) Error() string
- func (e GetNoticeRequestValidationError) ErrorName() string
- func (e GetNoticeRequestValidationError) Field() string
- func (e GetNoticeRequestValidationError) Key() bool
- func (e GetNoticeRequestValidationError) Reason() string
- type GetNoticeResponse
- func (*GetNoticeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetNoticeResponse) GetLinks() *resources.SelfLinks
- func (x *GetNoticeResponse) GetNotice() *resources.Notice
- func (*GetNoticeResponse) ProtoMessage()
- func (x *GetNoticeResponse) ProtoReflect() protoreflect.Message
- func (x *GetNoticeResponse) Reset()
- func (x *GetNoticeResponse) String() string
- func (m *GetNoticeResponse) Validate() error
- type GetNoticeResponseValidationError
- func (e GetNoticeResponseValidationError) Cause() error
- func (e GetNoticeResponseValidationError) Error() string
- func (e GetNoticeResponseValidationError) ErrorName() string
- func (e GetNoticeResponseValidationError) Field() string
- func (e GetNoticeResponseValidationError) Key() bool
- func (e GetNoticeResponseValidationError) Reason() string
- type NoticeServiceClient
- type NoticeServiceServer
- type UnimplementedNoticeServiceServer
- type UnsafeNoticeServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_fanclub_v1_services_notice_service_proto protoreflect.FileDescriptor
var NoticeService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "fanclub.v1.services.NoticeService", HandlerType: (*NoticeServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateNotice", Handler: _NoticeService_CreateNotice_Handler, }, { MethodName: "GetNotice", Handler: _NoticeService_GetNotice_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "fanclub/v1/services/notice_service.proto", }
NoticeService_ServiceDesc is the grpc.ServiceDesc for NoticeService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterNoticeServiceHandler ¶
func RegisterNoticeServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterNoticeServiceHandler registers the http handlers for service NoticeService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterNoticeServiceHandlerClient ¶
func RegisterNoticeServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NoticeServiceClient) error
RegisterNoticeServiceHandlerClient registers the http handlers for service NoticeService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NoticeServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NoticeServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "NoticeServiceClient" to call the correct interceptors.
func RegisterNoticeServiceHandlerFromEndpoint ¶
func RegisterNoticeServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterNoticeServiceHandlerFromEndpoint is same as RegisterNoticeServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterNoticeServiceHandlerServer ¶
func RegisterNoticeServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NoticeServiceServer) error
RegisterNoticeServiceHandlerServer registers the http handlers for service NoticeService to "mux". UnaryRPC :call NoticeServiceServer 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 RegisterNoticeServiceHandlerFromEndpoint instead.
func RegisterNoticeServiceServer ¶
func RegisterNoticeServiceServer(s grpc.ServiceRegistrar, srv NoticeServiceServer)
Types ¶
type CreateNoticeRequest ¶
type CreateNoticeRequest struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
func (*CreateNoticeRequest) Descriptor
deprecated
func (*CreateNoticeRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateNoticeRequest.ProtoReflect.Descriptor instead.
func (*CreateNoticeRequest) GetContent ¶
func (x *CreateNoticeRequest) GetContent() string
func (*CreateNoticeRequest) GetTitle ¶
func (x *CreateNoticeRequest) GetTitle() string
func (*CreateNoticeRequest) ProtoMessage ¶
func (*CreateNoticeRequest) ProtoMessage()
func (*CreateNoticeRequest) ProtoReflect ¶
func (x *CreateNoticeRequest) ProtoReflect() protoreflect.Message
func (*CreateNoticeRequest) Reset ¶
func (x *CreateNoticeRequest) Reset()
func (*CreateNoticeRequest) String ¶
func (x *CreateNoticeRequest) String() string
func (*CreateNoticeRequest) Validate ¶
func (m *CreateNoticeRequest) Validate() error
Validate checks the field values on CreateNoticeRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type CreateNoticeRequestValidationError ¶
type CreateNoticeRequestValidationError struct {
// contains filtered or unexported fields
}
CreateNoticeRequestValidationError is the validation error returned by CreateNoticeRequest.Validate if the designated constraints aren't met.
func (CreateNoticeRequestValidationError) Cause ¶
func (e CreateNoticeRequestValidationError) Cause() error
Cause function returns cause value.
func (CreateNoticeRequestValidationError) Error ¶
func (e CreateNoticeRequestValidationError) Error() string
Error satisfies the builtin error interface
func (CreateNoticeRequestValidationError) ErrorName ¶
func (e CreateNoticeRequestValidationError) ErrorName() string
ErrorName returns error name.
func (CreateNoticeRequestValidationError) Field ¶
func (e CreateNoticeRequestValidationError) Field() string
Field function returns field value.
func (CreateNoticeRequestValidationError) Key ¶
func (e CreateNoticeRequestValidationError) Key() bool
Key function returns key value.
func (CreateNoticeRequestValidationError) Reason ¶
func (e CreateNoticeRequestValidationError) Reason() string
Reason function returns reason value.
type GetNoticeRequest ¶
type GetNoticeRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetNoticeRequest) Descriptor
deprecated
func (*GetNoticeRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetNoticeRequest.ProtoReflect.Descriptor instead.
func (*GetNoticeRequest) GetId ¶
func (x *GetNoticeRequest) GetId() string
func (*GetNoticeRequest) ProtoMessage ¶
func (*GetNoticeRequest) ProtoMessage()
func (*GetNoticeRequest) ProtoReflect ¶
func (x *GetNoticeRequest) ProtoReflect() protoreflect.Message
func (*GetNoticeRequest) Reset ¶
func (x *GetNoticeRequest) Reset()
func (*GetNoticeRequest) String ¶
func (x *GetNoticeRequest) String() string
func (*GetNoticeRequest) Validate ¶
func (m *GetNoticeRequest) Validate() error
Validate checks the field values on GetNoticeRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type GetNoticeRequestValidationError ¶
type GetNoticeRequestValidationError struct {
// contains filtered or unexported fields
}
GetNoticeRequestValidationError is the validation error returned by GetNoticeRequest.Validate if the designated constraints aren't met.
func (GetNoticeRequestValidationError) Cause ¶
func (e GetNoticeRequestValidationError) Cause() error
Cause function returns cause value.
func (GetNoticeRequestValidationError) Error ¶
func (e GetNoticeRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetNoticeRequestValidationError) ErrorName ¶
func (e GetNoticeRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetNoticeRequestValidationError) Field ¶
func (e GetNoticeRequestValidationError) Field() string
Field function returns field value.
func (GetNoticeRequestValidationError) Key ¶
func (e GetNoticeRequestValidationError) Key() bool
Key function returns key value.
func (GetNoticeRequestValidationError) Reason ¶
func (e GetNoticeRequestValidationError) Reason() string
Reason function returns reason value.
type GetNoticeResponse ¶
type GetNoticeResponse struct { Notice *resources.Notice `protobuf:"bytes,1,opt,name=notice,proto3" json:"notice,omitempty"` Links *resources.SelfLinks `protobuf:"bytes,2,opt,name=links,proto3" json:"links,omitempty"` // contains filtered or unexported fields }
func (*GetNoticeResponse) Descriptor
deprecated
func (*GetNoticeResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetNoticeResponse.ProtoReflect.Descriptor instead.
func (*GetNoticeResponse) GetLinks ¶
func (x *GetNoticeResponse) GetLinks() *resources.SelfLinks
func (*GetNoticeResponse) GetNotice ¶
func (x *GetNoticeResponse) GetNotice() *resources.Notice
func (*GetNoticeResponse) ProtoMessage ¶
func (*GetNoticeResponse) ProtoMessage()
func (*GetNoticeResponse) ProtoReflect ¶
func (x *GetNoticeResponse) ProtoReflect() protoreflect.Message
func (*GetNoticeResponse) Reset ¶
func (x *GetNoticeResponse) Reset()
func (*GetNoticeResponse) String ¶
func (x *GetNoticeResponse) String() string
func (*GetNoticeResponse) Validate ¶
func (m *GetNoticeResponse) Validate() error
Validate checks the field values on GetNoticeResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type GetNoticeResponseValidationError ¶
type GetNoticeResponseValidationError struct {
// contains filtered or unexported fields
}
GetNoticeResponseValidationError is the validation error returned by GetNoticeResponse.Validate if the designated constraints aren't met.
func (GetNoticeResponseValidationError) Cause ¶
func (e GetNoticeResponseValidationError) Cause() error
Cause function returns cause value.
func (GetNoticeResponseValidationError) Error ¶
func (e GetNoticeResponseValidationError) Error() string
Error satisfies the builtin error interface
func (GetNoticeResponseValidationError) ErrorName ¶
func (e GetNoticeResponseValidationError) ErrorName() string
ErrorName returns error name.
func (GetNoticeResponseValidationError) Field ¶
func (e GetNoticeResponseValidationError) Field() string
Field function returns field value.
func (GetNoticeResponseValidationError) Key ¶
func (e GetNoticeResponseValidationError) Key() bool
Key function returns key value.
func (GetNoticeResponseValidationError) Reason ¶
func (e GetNoticeResponseValidationError) Reason() string
Reason function returns reason value.
type NoticeServiceClient ¶
type NoticeServiceClient interface { CreateNotice(ctx context.Context, in *CreateNoticeRequest, opts ...grpc.CallOption) (*resources.SelfLinks, error) GetNotice(ctx context.Context, in *GetNoticeRequest, opts ...grpc.CallOption) (*GetNoticeResponse, error) }
NoticeServiceClient is the client API for NoticeService 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 NewNoticeServiceClient ¶
func NewNoticeServiceClient(cc grpc.ClientConnInterface) NoticeServiceClient
type NoticeServiceServer ¶
type NoticeServiceServer interface { CreateNotice(context.Context, *CreateNoticeRequest) (*resources.SelfLinks, error) GetNotice(context.Context, *GetNoticeRequest) (*GetNoticeResponse, error) }
NoticeServiceServer is the server API for NoticeService service. All implementations should embed UnimplementedNoticeServiceServer for forward compatibility
type UnimplementedNoticeServiceServer ¶
type UnimplementedNoticeServiceServer struct { }
UnimplementedNoticeServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedNoticeServiceServer) CreateNotice ¶
func (UnimplementedNoticeServiceServer) CreateNotice(context.Context, *CreateNoticeRequest) (*resources.SelfLinks, error)
func (UnimplementedNoticeServiceServer) GetNotice ¶
func (UnimplementedNoticeServiceServer) GetNotice(context.Context, *GetNoticeRequest) (*GetNoticeResponse, error)
type UnsafeNoticeServiceServer ¶
type UnsafeNoticeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeNoticeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NoticeServiceServer will result in compilation errors.