Documentation ¶
Overview ¶
Package changelog is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterChangelogHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterChangelogHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ChangelogClient) error
- func RegisterChangelogHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterChangelogHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ChangelogServer) error
- func RegisterChangelogServer(s grpc.ServiceRegistrar, srv ChangelogServer)
- type ChangelogClient
- type ChangelogServer
- type ShowRequest
- func (*ShowRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ShowRequest) GetOnlyChanged() bool
- func (x *ShowRequest) GetProjectId() int64
- func (*ShowRequest) ProtoMessage()
- func (x *ShowRequest) ProtoReflect() protoreflect.Message
- func (x *ShowRequest) Reset()
- func (x *ShowRequest) String() string
- func (m *ShowRequest) Validate() error
- func (m *ShowRequest) ValidateAll() error
- type ShowRequestMultiError
- type ShowRequestValidationError
- func (e ShowRequestValidationError) Cause() error
- func (e ShowRequestValidationError) Error() string
- func (e ShowRequestValidationError) ErrorName() string
- func (e ShowRequestValidationError) Field() string
- func (e ShowRequestValidationError) Key() bool
- func (e ShowRequestValidationError) Reason() string
- type ShowResponse
- func (*ShowResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ShowResponse) GetItems() []*types.ChangelogModel
- func (*ShowResponse) ProtoMessage()
- func (x *ShowResponse) ProtoReflect() protoreflect.Message
- func (x *ShowResponse) Reset()
- func (x *ShowResponse) String() string
- func (m *ShowResponse) Validate() error
- func (m *ShowResponse) ValidateAll() error
- type ShowResponseMultiError
- type ShowResponseValidationError
- func (e ShowResponseValidationError) Cause() error
- func (e ShowResponseValidationError) Error() string
- func (e ShowResponseValidationError) ErrorName() string
- func (e ShowResponseValidationError) Field() string
- func (e ShowResponseValidationError) Key() bool
- func (e ShowResponseValidationError) Reason() string
- type UnimplementedChangelogServer
- type UnsafeChangelogServer
Constants ¶
const (
Changelog_Show_FullMethodName = "/changelog.Changelog/Show"
)
Variables ¶
var Changelog_ServiceDesc = grpc.ServiceDesc{ ServiceName: "changelog.Changelog", HandlerType: (*ChangelogServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Show", Handler: _Changelog_Show_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "changelog/changelog.proto", }
Changelog_ServiceDesc is the grpc.ServiceDesc for Changelog service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_changelog_changelog_proto protoreflect.FileDescriptor
Functions ¶
func RegisterChangelogHandler ¶
func RegisterChangelogHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterChangelogHandler registers the http handlers for service Changelog to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterChangelogHandlerClient ¶
func RegisterChangelogHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ChangelogClient) error
RegisterChangelogHandlerClient registers the http handlers for service Changelog to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ChangelogClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ChangelogClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ChangelogClient" to call the correct interceptors.
func RegisterChangelogHandlerFromEndpoint ¶
func RegisterChangelogHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterChangelogHandlerFromEndpoint is same as RegisterChangelogHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterChangelogHandlerServer ¶
func RegisterChangelogHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ChangelogServer) error
RegisterChangelogHandlerServer registers the http handlers for service Changelog to "mux". UnaryRPC :call ChangelogServer 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 RegisterChangelogHandlerFromEndpoint instead.
func RegisterChangelogServer ¶
func RegisterChangelogServer(s grpc.ServiceRegistrar, srv ChangelogServer)
Types ¶
type ChangelogClient ¶
type ChangelogClient interface { // Show 查看项目修改的版本差异 Show(ctx context.Context, in *ShowRequest, opts ...grpc.CallOption) (*ShowResponse, error) }
ChangelogClient is the client API for Changelog 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 NewChangelogClient ¶
func NewChangelogClient(cc grpc.ClientConnInterface) ChangelogClient
type ChangelogServer ¶
type ChangelogServer interface { // Show 查看项目修改的版本差异 Show(context.Context, *ShowRequest) (*ShowResponse, error) // contains filtered or unexported methods }
ChangelogServer is the server API for Changelog service. All implementations must embed UnimplementedChangelogServer for forward compatibility
type ShowRequest ¶
type ShowRequest struct { ProjectId int64 `protobuf:"varint,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` OnlyChanged bool `protobuf:"varint,2,opt,name=only_changed,json=onlyChanged,proto3" json:"only_changed,omitempty"` // contains filtered or unexported fields }
func (*ShowRequest) Descriptor
deprecated
func (*ShowRequest) Descriptor() ([]byte, []int)
Deprecated: Use ShowRequest.ProtoReflect.Descriptor instead.
func (*ShowRequest) GetOnlyChanged ¶
func (x *ShowRequest) GetOnlyChanged() bool
func (*ShowRequest) GetProjectId ¶
func (x *ShowRequest) GetProjectId() int64
func (*ShowRequest) ProtoMessage ¶
func (*ShowRequest) ProtoMessage()
func (*ShowRequest) ProtoReflect ¶
func (x *ShowRequest) ProtoReflect() protoreflect.Message
func (*ShowRequest) Reset ¶
func (x *ShowRequest) Reset()
func (*ShowRequest) String ¶
func (x *ShowRequest) String() string
func (*ShowRequest) Validate ¶
func (m *ShowRequest) Validate() error
Validate checks the field values on ShowRequest 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 (*ShowRequest) ValidateAll ¶
func (m *ShowRequest) ValidateAll() error
ValidateAll checks the field values on ShowRequest 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 ShowRequestMultiError, or nil if none found.
type ShowRequestMultiError ¶
type ShowRequestMultiError []error
ShowRequestMultiError is an error wrapping multiple validation errors returned by ShowRequest.ValidateAll() if the designated constraints aren't met.
func (ShowRequestMultiError) AllErrors ¶
func (m ShowRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ShowRequestMultiError) Error ¶
func (m ShowRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ShowRequestValidationError ¶
type ShowRequestValidationError struct {
// contains filtered or unexported fields
}
ShowRequestValidationError is the validation error returned by ShowRequest.Validate if the designated constraints aren't met.
func (ShowRequestValidationError) Cause ¶
func (e ShowRequestValidationError) Cause() error
Cause function returns cause value.
func (ShowRequestValidationError) Error ¶
func (e ShowRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ShowRequestValidationError) ErrorName ¶
func (e ShowRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ShowRequestValidationError) Field ¶
func (e ShowRequestValidationError) Field() string
Field function returns field value.
func (ShowRequestValidationError) Key ¶
func (e ShowRequestValidationError) Key() bool
Key function returns key value.
func (ShowRequestValidationError) Reason ¶
func (e ShowRequestValidationError) Reason() string
Reason function returns reason value.
type ShowResponse ¶
type ShowResponse struct { Items []*types.ChangelogModel `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*ShowResponse) Descriptor
deprecated
func (*ShowResponse) Descriptor() ([]byte, []int)
Deprecated: Use ShowResponse.ProtoReflect.Descriptor instead.
func (*ShowResponse) GetItems ¶
func (x *ShowResponse) GetItems() []*types.ChangelogModel
func (*ShowResponse) ProtoMessage ¶
func (*ShowResponse) ProtoMessage()
func (*ShowResponse) ProtoReflect ¶
func (x *ShowResponse) ProtoReflect() protoreflect.Message
func (*ShowResponse) Reset ¶
func (x *ShowResponse) Reset()
func (*ShowResponse) String ¶
func (x *ShowResponse) String() string
func (*ShowResponse) Validate ¶
func (m *ShowResponse) Validate() error
Validate checks the field values on ShowResponse 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 (*ShowResponse) ValidateAll ¶
func (m *ShowResponse) ValidateAll() error
ValidateAll checks the field values on ShowResponse 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 ShowResponseMultiError, or nil if none found.
type ShowResponseMultiError ¶
type ShowResponseMultiError []error
ShowResponseMultiError is an error wrapping multiple validation errors returned by ShowResponse.ValidateAll() if the designated constraints aren't met.
func (ShowResponseMultiError) AllErrors ¶
func (m ShowResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ShowResponseMultiError) Error ¶
func (m ShowResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ShowResponseValidationError ¶
type ShowResponseValidationError struct {
// contains filtered or unexported fields
}
ShowResponseValidationError is the validation error returned by ShowResponse.Validate if the designated constraints aren't met.
func (ShowResponseValidationError) Cause ¶
func (e ShowResponseValidationError) Cause() error
Cause function returns cause value.
func (ShowResponseValidationError) Error ¶
func (e ShowResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ShowResponseValidationError) ErrorName ¶
func (e ShowResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ShowResponseValidationError) Field ¶
func (e ShowResponseValidationError) Field() string
Field function returns field value.
func (ShowResponseValidationError) Key ¶
func (e ShowResponseValidationError) Key() bool
Key function returns key value.
func (ShowResponseValidationError) Reason ¶
func (e ShowResponseValidationError) Reason() string
Reason function returns reason value.
type UnimplementedChangelogServer ¶
type UnimplementedChangelogServer struct { }
UnimplementedChangelogServer must be embedded to have forward compatible implementations.
func (UnimplementedChangelogServer) Show ¶
func (UnimplementedChangelogServer) Show(context.Context, *ShowRequest) (*ShowResponse, error)
type UnsafeChangelogServer ¶
type UnsafeChangelogServer interface {
// contains filtered or unexported methods
}
UnsafeChangelogServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ChangelogServer will result in compilation errors.