v1

package
v0.0.0-...-f12ea2b Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: Unlicense Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MovieService_GetMovieDetail_FullMethodName = "/movie.service.v1.MovieService/GetMovieDetail"
)
View Source
const OperationMovieServiceGetMovieDetail = "/movie.service.v1.MovieService/GetMovieDetail"

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0: "MOVIE_NOT_FOUND",
	}
	ErrorReason_value = map[string]int32{
		"MOVIE_NOT_FOUND": 0,
	}
)

Enum value maps for ErrorReason.

View Source
var File_movie_service_v1_movie_error_proto protoreflect.FileDescriptor
View Source
var File_movie_service_v1_movie_proto protoreflect.FileDescriptor
View Source
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 ErrorMovieNotFound(format string, args ...interface{}) *errors.Error

func IsMovieNotFound

func IsMovieNotFound(err error) bool

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) 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

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

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

Cause function returns cause value.

func (GetMovieDetailRequestValidationError) Error

Error satisfies the builtin error interface

func (GetMovieDetailRequestValidationError) ErrorName

ErrorName returns error name.

func (GetMovieDetailRequestValidationError) Field

Field function returns field value.

func (GetMovieDetailRequestValidationError) Key

Key function returns key value.

func (GetMovieDetailRequestValidationError) Reason

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 (*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

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

Cause function returns cause value.

func (GetMovieDetailResponseValidationError) Error

Error satisfies the builtin error interface

func (GetMovieDetailResponseValidationError) ErrorName

ErrorName returns error name.

func (GetMovieDetailResponseValidationError) Field

Field function returns field value.

func (GetMovieDetailResponseValidationError) Key

Key function returns key value.

func (GetMovieDetailResponseValidationError) Reason

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 (*GetMovieDetailResponse_Metadata) GetTitle

func (*GetMovieDetailResponse_Metadata) ProtoMessage

func (*GetMovieDetailResponse_Metadata) ProtoMessage()

func (*GetMovieDetailResponse_Metadata) ProtoReflect

func (*GetMovieDetailResponse_Metadata) Reset

func (*GetMovieDetailResponse_Metadata) 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

AllErrors returns a list of validation violation errors.

func (GetMovieDetailResponse_MetadataMultiError) Error

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

Cause function returns cause value.

func (GetMovieDetailResponse_MetadataValidationError) Error

Error satisfies the builtin error interface

func (GetMovieDetailResponse_MetadataValidationError) ErrorName

ErrorName returns error name.

func (GetMovieDetailResponse_MetadataValidationError) Field

Field function returns field value.

func (GetMovieDetailResponse_MetadataValidationError) Key

Key function returns key value.

func (GetMovieDetailResponse_MetadataValidationError) Reason

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.

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

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

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.

Jump to

Keyboard shortcuts

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