Documentation
¶
Index ¶
- Constants
- Variables
- func ErrorMovieNotFound(format string, args ...interface{}) *errors.Error
- func IsMovieNotFound(err error) bool
- func RegisterMovieServiceHTTPServer(s *http.Server, srv MovieServiceHTTPServer)
- func RegisterMovieServiceServer(s grpc.ServiceRegistrar, srv MovieServiceServer)
- type ErrorReason
- func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x ErrorReason) Enum() *ErrorReason
- func (ErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x ErrorReason) Number() protoreflect.EnumNumber
- func (x ErrorReason) String() string
- func (ErrorReason) Type() protoreflect.EnumType
- type GetMovieDetailRequest
- func (*GetMovieDetailRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetMovieDetailRequest) GetId() uint64
- func (*GetMovieDetailRequest) ProtoMessage()
- func (x *GetMovieDetailRequest) ProtoReflect() protoreflect.Message
- func (x *GetMovieDetailRequest) Reset()
- func (x *GetMovieDetailRequest) String() string
- func (m *GetMovieDetailRequest) Validate() error
- func (m *GetMovieDetailRequest) ValidateAll() error
- type GetMovieDetailRequestMultiError
- type GetMovieDetailRequestValidationError
- func (e GetMovieDetailRequestValidationError) Cause() error
- func (e GetMovieDetailRequestValidationError) Error() string
- func (e GetMovieDetailRequestValidationError) ErrorName() string
- func (e GetMovieDetailRequestValidationError) Field() string
- func (e GetMovieDetailRequestValidationError) Key() bool
- func (e GetMovieDetailRequestValidationError) Reason() string
- type GetMovieDetailResponse
- func (*GetMovieDetailResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetMovieDetailResponse) GetMetadata() *GetMovieDetailResponse_Metadata
- func (x *GetMovieDetailResponse) GetRating() float64
- func (*GetMovieDetailResponse) ProtoMessage()
- func (x *GetMovieDetailResponse) ProtoReflect() protoreflect.Message
- func (x *GetMovieDetailResponse) Reset()
- func (x *GetMovieDetailResponse) String() string
- func (m *GetMovieDetailResponse) Validate() error
- func (m *GetMovieDetailResponse) ValidateAll() error
- type GetMovieDetailResponseMultiError
- type GetMovieDetailResponseValidationError
- func (e GetMovieDetailResponseValidationError) Cause() error
- func (e GetMovieDetailResponseValidationError) Error() string
- func (e GetMovieDetailResponseValidationError) ErrorName() string
- func (e GetMovieDetailResponseValidationError) Field() string
- func (e GetMovieDetailResponseValidationError) Key() bool
- func (e GetMovieDetailResponseValidationError) Reason() string
- type GetMovieDetailResponse_Metadata
- func (*GetMovieDetailResponse_Metadata) Descriptor() ([]byte, []int)deprecated
- func (x *GetMovieDetailResponse_Metadata) GetDescription() string
- func (x *GetMovieDetailResponse_Metadata) GetDirector() string
- func (x *GetMovieDetailResponse_Metadata) GetId() uint64
- func (x *GetMovieDetailResponse_Metadata) GetTitle() string
- func (*GetMovieDetailResponse_Metadata) ProtoMessage()
- func (x *GetMovieDetailResponse_Metadata) ProtoReflect() protoreflect.Message
- func (x *GetMovieDetailResponse_Metadata) Reset()
- func (x *GetMovieDetailResponse_Metadata) String() string
- func (m *GetMovieDetailResponse_Metadata) Validate() error
- func (m *GetMovieDetailResponse_Metadata) ValidateAll() error
- type GetMovieDetailResponse_MetadataMultiError
- type GetMovieDetailResponse_MetadataValidationError
- func (e GetMovieDetailResponse_MetadataValidationError) Cause() error
- func (e GetMovieDetailResponse_MetadataValidationError) Error() string
- func (e GetMovieDetailResponse_MetadataValidationError) ErrorName() string
- func (e GetMovieDetailResponse_MetadataValidationError) Field() string
- func (e GetMovieDetailResponse_MetadataValidationError) Key() bool
- func (e GetMovieDetailResponse_MetadataValidationError) Reason() string
- type MovieServiceClient
- type MovieServiceHTTPClient
- type MovieServiceHTTPClientImpl
- type MovieServiceHTTPServer
- type MovieServiceServer
- type UnimplementedMovieServiceServer
- type UnsafeMovieServiceServer
Constants ¶
const (
MovieService_GetMovieDetail_FullMethodName = "/movie.service.v1.MovieService/GetMovieDetail"
)
const OperationMovieServiceGetMovieDetail = "/movie.service.v1.MovieService/GetMovieDetail"
Variables ¶
var ( ErrorReason_name = map[int32]string{ 0: "MOVIE_NOT_FOUND", } ErrorReason_value = map[string]int32{ "MOVIE_NOT_FOUND": 0, } )
Enum value maps for ErrorReason.
var File_movie_service_v1_movie_error_proto protoreflect.FileDescriptor
var File_movie_service_v1_movie_proto protoreflect.FileDescriptor
var MovieService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "movie.service.v1.MovieService", HandlerType: (*MovieServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetMovieDetail", Handler: _MovieService_GetMovieDetail_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "movie/service/v1/movie.proto", }
MovieService_ServiceDesc is the grpc.ServiceDesc for MovieService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func ErrorMovieNotFound ¶
func IsMovieNotFound ¶
func RegisterMovieServiceHTTPServer ¶
func RegisterMovieServiceHTTPServer(s *http.Server, srv MovieServiceHTTPServer)
func RegisterMovieServiceServer ¶
func RegisterMovieServiceServer(s grpc.ServiceRegistrar, srv MovieServiceServer)
Types ¶
type ErrorReason ¶
type ErrorReason int32
const (
ErrorReason_MOVIE_NOT_FOUND ErrorReason = 0
)
func (ErrorReason) Descriptor ¶
func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
func (ErrorReason) Enum ¶
func (x ErrorReason) Enum() *ErrorReason
func (ErrorReason) EnumDescriptor
deprecated
func (ErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use ErrorReason.Descriptor instead.
func (ErrorReason) Number ¶
func (x ErrorReason) Number() protoreflect.EnumNumber
func (ErrorReason) String ¶
func (x ErrorReason) String() string
func (ErrorReason) Type ¶
func (ErrorReason) Type() protoreflect.EnumType
type GetMovieDetailRequest ¶
type GetMovieDetailRequest struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetMovieDetailRequest) Descriptor
deprecated
func (*GetMovieDetailRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetMovieDetailRequest.ProtoReflect.Descriptor instead.
func (*GetMovieDetailRequest) GetId ¶
func (x *GetMovieDetailRequest) GetId() uint64
func (*GetMovieDetailRequest) ProtoMessage ¶
func (*GetMovieDetailRequest) ProtoMessage()
func (*GetMovieDetailRequest) ProtoReflect ¶
func (x *GetMovieDetailRequest) ProtoReflect() protoreflect.Message
func (*GetMovieDetailRequest) Reset ¶
func (x *GetMovieDetailRequest) Reset()
func (*GetMovieDetailRequest) String ¶
func (x *GetMovieDetailRequest) String() string
func (*GetMovieDetailRequest) Validate ¶
func (m *GetMovieDetailRequest) Validate() error
Validate checks the field values on GetMovieDetailRequest 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 (*GetMovieDetailRequest) ValidateAll ¶
func (m *GetMovieDetailRequest) ValidateAll() error
ValidateAll checks the field values on GetMovieDetailRequest 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 GetMovieDetailRequestMultiError, or nil if none found.
type GetMovieDetailRequestMultiError ¶
type GetMovieDetailRequestMultiError []error
GetMovieDetailRequestMultiError is an error wrapping multiple validation errors returned by GetMovieDetailRequest.ValidateAll() if the designated constraints aren't met.
func (GetMovieDetailRequestMultiError) AllErrors ¶
func (m GetMovieDetailRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetMovieDetailRequestMultiError) Error ¶
func (m GetMovieDetailRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetMovieDetailRequestValidationError ¶
type GetMovieDetailRequestValidationError struct {
// contains filtered or unexported fields
}
GetMovieDetailRequestValidationError is the validation error returned by GetMovieDetailRequest.Validate if the designated constraints aren't met.
func (GetMovieDetailRequestValidationError) Cause ¶
func (e GetMovieDetailRequestValidationError) Cause() error
Cause function returns cause value.
func (GetMovieDetailRequestValidationError) Error ¶
func (e GetMovieDetailRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetMovieDetailRequestValidationError) ErrorName ¶
func (e GetMovieDetailRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetMovieDetailRequestValidationError) Field ¶
func (e GetMovieDetailRequestValidationError) Field() string
Field function returns field value.
func (GetMovieDetailRequestValidationError) Key ¶
func (e GetMovieDetailRequestValidationError) Key() bool
Key function returns key value.
func (GetMovieDetailRequestValidationError) Reason ¶
func (e GetMovieDetailRequestValidationError) Reason() string
Reason function returns reason value.
type GetMovieDetailResponse ¶
type GetMovieDetailResponse struct { Rating float64 `protobuf:"fixed64,1,opt,name=rating,proto3" json:"rating,omitempty"` Metadata *GetMovieDetailResponse_Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` // contains filtered or unexported fields }
func (*GetMovieDetailResponse) Descriptor
deprecated
func (*GetMovieDetailResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetMovieDetailResponse.ProtoReflect.Descriptor instead.
func (*GetMovieDetailResponse) GetMetadata ¶
func (x *GetMovieDetailResponse) GetMetadata() *GetMovieDetailResponse_Metadata
func (*GetMovieDetailResponse) GetRating ¶
func (x *GetMovieDetailResponse) GetRating() float64
func (*GetMovieDetailResponse) ProtoMessage ¶
func (*GetMovieDetailResponse) ProtoMessage()
func (*GetMovieDetailResponse) ProtoReflect ¶
func (x *GetMovieDetailResponse) ProtoReflect() protoreflect.Message
func (*GetMovieDetailResponse) Reset ¶
func (x *GetMovieDetailResponse) Reset()
func (*GetMovieDetailResponse) String ¶
func (x *GetMovieDetailResponse) String() string
func (*GetMovieDetailResponse) Validate ¶
func (m *GetMovieDetailResponse) Validate() error
Validate checks the field values on GetMovieDetailResponse 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 (*GetMovieDetailResponse) ValidateAll ¶
func (m *GetMovieDetailResponse) ValidateAll() error
ValidateAll checks the field values on GetMovieDetailResponse 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 GetMovieDetailResponseMultiError, or nil if none found.
type GetMovieDetailResponseMultiError ¶
type GetMovieDetailResponseMultiError []error
GetMovieDetailResponseMultiError is an error wrapping multiple validation errors returned by GetMovieDetailResponse.ValidateAll() if the designated constraints aren't met.
func (GetMovieDetailResponseMultiError) AllErrors ¶
func (m GetMovieDetailResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetMovieDetailResponseMultiError) Error ¶
func (m GetMovieDetailResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetMovieDetailResponseValidationError ¶
type GetMovieDetailResponseValidationError struct {
// contains filtered or unexported fields
}
GetMovieDetailResponseValidationError is the validation error returned by GetMovieDetailResponse.Validate if the designated constraints aren't met.
func (GetMovieDetailResponseValidationError) Cause ¶
func (e GetMovieDetailResponseValidationError) Cause() error
Cause function returns cause value.
func (GetMovieDetailResponseValidationError) Error ¶
func (e GetMovieDetailResponseValidationError) Error() string
Error satisfies the builtin error interface
func (GetMovieDetailResponseValidationError) ErrorName ¶
func (e GetMovieDetailResponseValidationError) ErrorName() string
ErrorName returns error name.
func (GetMovieDetailResponseValidationError) Field ¶
func (e GetMovieDetailResponseValidationError) Field() string
Field function returns field value.
func (GetMovieDetailResponseValidationError) Key ¶
func (e GetMovieDetailResponseValidationError) Key() bool
Key function returns key value.
func (GetMovieDetailResponseValidationError) Reason ¶
func (e GetMovieDetailResponseValidationError) Reason() string
Reason function returns reason value.
type GetMovieDetailResponse_Metadata ¶
type GetMovieDetailResponse_Metadata struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` Director string `protobuf:"bytes,4,opt,name=director,proto3" json:"director,omitempty"` // contains filtered or unexported fields }
func (*GetMovieDetailResponse_Metadata) Descriptor
deprecated
func (*GetMovieDetailResponse_Metadata) Descriptor() ([]byte, []int)
Deprecated: Use GetMovieDetailResponse_Metadata.ProtoReflect.Descriptor instead.
func (*GetMovieDetailResponse_Metadata) GetDescription ¶
func (x *GetMovieDetailResponse_Metadata) GetDescription() string
func (*GetMovieDetailResponse_Metadata) GetDirector ¶
func (x *GetMovieDetailResponse_Metadata) GetDirector() string
func (*GetMovieDetailResponse_Metadata) GetId ¶
func (x *GetMovieDetailResponse_Metadata) GetId() uint64
func (*GetMovieDetailResponse_Metadata) GetTitle ¶
func (x *GetMovieDetailResponse_Metadata) GetTitle() string
func (*GetMovieDetailResponse_Metadata) ProtoMessage ¶
func (*GetMovieDetailResponse_Metadata) ProtoMessage()
func (*GetMovieDetailResponse_Metadata) ProtoReflect ¶
func (x *GetMovieDetailResponse_Metadata) ProtoReflect() protoreflect.Message
func (*GetMovieDetailResponse_Metadata) Reset ¶
func (x *GetMovieDetailResponse_Metadata) Reset()
func (*GetMovieDetailResponse_Metadata) String ¶
func (x *GetMovieDetailResponse_Metadata) String() string
func (*GetMovieDetailResponse_Metadata) Validate ¶
func (m *GetMovieDetailResponse_Metadata) Validate() error
Validate checks the field values on GetMovieDetailResponse_Metadata 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 (*GetMovieDetailResponse_Metadata) ValidateAll ¶
func (m *GetMovieDetailResponse_Metadata) ValidateAll() error
ValidateAll checks the field values on GetMovieDetailResponse_Metadata 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 GetMovieDetailResponse_MetadataMultiError, or nil if none found.
type GetMovieDetailResponse_MetadataMultiError ¶
type GetMovieDetailResponse_MetadataMultiError []error
GetMovieDetailResponse_MetadataMultiError is an error wrapping multiple validation errors returned by GetMovieDetailResponse_Metadata.ValidateAll() if the designated constraints aren't met.
func (GetMovieDetailResponse_MetadataMultiError) AllErrors ¶
func (m GetMovieDetailResponse_MetadataMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetMovieDetailResponse_MetadataMultiError) Error ¶
func (m GetMovieDetailResponse_MetadataMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetMovieDetailResponse_MetadataValidationError ¶
type GetMovieDetailResponse_MetadataValidationError struct {
// contains filtered or unexported fields
}
GetMovieDetailResponse_MetadataValidationError is the validation error returned by GetMovieDetailResponse_Metadata.Validate if the designated constraints aren't met.
func (GetMovieDetailResponse_MetadataValidationError) Cause ¶
func (e GetMovieDetailResponse_MetadataValidationError) Cause() error
Cause function returns cause value.
func (GetMovieDetailResponse_MetadataValidationError) Error ¶
func (e GetMovieDetailResponse_MetadataValidationError) Error() string
Error satisfies the builtin error interface
func (GetMovieDetailResponse_MetadataValidationError) ErrorName ¶
func (e GetMovieDetailResponse_MetadataValidationError) ErrorName() string
ErrorName returns error name.
func (GetMovieDetailResponse_MetadataValidationError) Field ¶
func (e GetMovieDetailResponse_MetadataValidationError) Field() string
Field function returns field value.
func (GetMovieDetailResponse_MetadataValidationError) Key ¶
func (e GetMovieDetailResponse_MetadataValidationError) Key() bool
Key function returns key value.
func (GetMovieDetailResponse_MetadataValidationError) Reason ¶
func (e GetMovieDetailResponse_MetadataValidationError) Reason() string
Reason function returns reason value.
type MovieServiceClient ¶
type MovieServiceClient interface {
GetMovieDetail(ctx context.Context, in *GetMovieDetailRequest, opts ...grpc.CallOption) (*GetMovieDetailResponse, error)
}
MovieServiceClient is the client API for MovieService 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 NewMovieServiceClient ¶
func NewMovieServiceClient(cc grpc.ClientConnInterface) MovieServiceClient
type MovieServiceHTTPClient ¶
type MovieServiceHTTPClient interface {
GetMovieDetail(ctx context.Context, req *GetMovieDetailRequest, opts ...http.CallOption) (rsp *GetMovieDetailResponse, err error)
}
func NewMovieServiceHTTPClient ¶
func NewMovieServiceHTTPClient(client *http.Client) MovieServiceHTTPClient
type MovieServiceHTTPClientImpl ¶
type MovieServiceHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*MovieServiceHTTPClientImpl) GetMovieDetail ¶
func (c *MovieServiceHTTPClientImpl) GetMovieDetail(ctx context.Context, in *GetMovieDetailRequest, opts ...http.CallOption) (*GetMovieDetailResponse, error)
type MovieServiceHTTPServer ¶
type MovieServiceHTTPServer interface {
GetMovieDetail(context.Context, *GetMovieDetailRequest) (*GetMovieDetailResponse, error)
}
type MovieServiceServer ¶
type MovieServiceServer interface { GetMovieDetail(context.Context, *GetMovieDetailRequest) (*GetMovieDetailResponse, error) // contains filtered or unexported methods }
MovieServiceServer is the server API for MovieService service. All implementations must embed UnimplementedMovieServiceServer for forward compatibility
type UnimplementedMovieServiceServer ¶
type UnimplementedMovieServiceServer struct { }
UnimplementedMovieServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedMovieServiceServer) GetMovieDetail ¶
func (UnimplementedMovieServiceServer) GetMovieDetail(context.Context, *GetMovieDetailRequest) (*GetMovieDetailResponse, error)
type UnsafeMovieServiceServer ¶
type UnsafeMovieServiceServer interface {
// contains filtered or unexported methods
}
UnsafeMovieServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MovieServiceServer will result in compilation errors.