v1

package
v0.0.0-...-24968f5 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2022 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_api_history_service_v1_history_proto protoreflect.FileDescriptor
View Source
var History_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.history.service.v1.History",
	HandlerType: (*HistoryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SaveHistory",
			Handler:    _History_SaveHistory_Handler,
		},
		{
			MethodName: "GetHistory",
			Handler:    _History_GetHistory_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/history/service/v1/history.proto",
}

History_ServiceDesc is the grpc.ServiceDesc for History service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterHistoryHTTPServer

func RegisterHistoryHTTPServer(s *http.Server, srv HistoryHTTPServer)

func RegisterHistoryServer

func RegisterHistoryServer(s grpc.ServiceRegistrar, srv HistoryServer)

Types

type GetHistoryReply

type GetHistoryReply struct {
	Results []*GetHistoryReply_History `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	// contains filtered or unexported fields
}

func (*GetHistoryReply) Descriptor deprecated

func (*GetHistoryReply) Descriptor() ([]byte, []int)

Deprecated: Use GetHistoryReply.ProtoReflect.Descriptor instead.

func (*GetHistoryReply) GetResults

func (x *GetHistoryReply) GetResults() []*GetHistoryReply_History

func (*GetHistoryReply) ProtoMessage

func (*GetHistoryReply) ProtoMessage()

func (*GetHistoryReply) ProtoReflect

func (x *GetHistoryReply) ProtoReflect() protoreflect.Message

func (*GetHistoryReply) Reset

func (x *GetHistoryReply) Reset()

func (*GetHistoryReply) String

func (x *GetHistoryReply) String() string

func (*GetHistoryReply) Validate

func (m *GetHistoryReply) Validate() error

Validate checks the field values on GetHistoryReply 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 (*GetHistoryReply) ValidateAll

func (m *GetHistoryReply) ValidateAll() error

ValidateAll checks the field values on GetHistoryReply 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 GetHistoryReplyMultiError, or nil if none found.

type GetHistoryReplyMultiError

type GetHistoryReplyMultiError []error

GetHistoryReplyMultiError is an error wrapping multiple validation errors returned by GetHistoryReply.ValidateAll() if the designated constraints aren't met.

func (GetHistoryReplyMultiError) AllErrors

func (m GetHistoryReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetHistoryReplyMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetHistoryReplyValidationError

type GetHistoryReplyValidationError struct {
	// contains filtered or unexported fields
}

GetHistoryReplyValidationError is the validation error returned by GetHistoryReply.Validate if the designated constraints aren't met.

func (GetHistoryReplyValidationError) Cause

Cause function returns cause value.

func (GetHistoryReplyValidationError) Error

Error satisfies the builtin error interface

func (GetHistoryReplyValidationError) ErrorName

func (e GetHistoryReplyValidationError) ErrorName() string

ErrorName returns error name.

func (GetHistoryReplyValidationError) Field

Field function returns field value.

func (GetHistoryReplyValidationError) Key

Key function returns key value.

func (GetHistoryReplyValidationError) Reason

Reason function returns reason value.

type GetHistoryReply_History

type GetHistoryReply_History struct {
	ObjId     int64                  `protobuf:"varint,1,opt,name=obj_id,json=objId,proto3" json:"obj_id,omitempty"`
	ObjType   string                 `protobuf:"bytes,2,opt,name=obj_type,json=objType,proto3" json:"obj_type,omitempty"`
	CreateAt  *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_at,json=createAt,proto3" json:"create_at,omitempty"`
	ObjDetail *structpb.Struct       `protobuf:"bytes,4,opt,name=obj_detail,json=objDetail,proto3" json:"obj_detail,omitempty"`
	Username  string                 `protobuf:"bytes,5,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

func (*GetHistoryReply_History) Descriptor deprecated

func (*GetHistoryReply_History) Descriptor() ([]byte, []int)

Deprecated: Use GetHistoryReply_History.ProtoReflect.Descriptor instead.

func (*GetHistoryReply_History) GetCreateAt

func (x *GetHistoryReply_History) GetCreateAt() *timestamppb.Timestamp

func (*GetHistoryReply_History) GetObjDetail

func (x *GetHistoryReply_History) GetObjDetail() *structpb.Struct

func (*GetHistoryReply_History) GetObjId

func (x *GetHistoryReply_History) GetObjId() int64

func (*GetHistoryReply_History) GetObjType

func (x *GetHistoryReply_History) GetObjType() string

func (*GetHistoryReply_History) GetUsername

func (x *GetHistoryReply_History) GetUsername() string

func (*GetHistoryReply_History) ProtoMessage

func (*GetHistoryReply_History) ProtoMessage()

func (*GetHistoryReply_History) ProtoReflect

func (x *GetHistoryReply_History) ProtoReflect() protoreflect.Message

func (*GetHistoryReply_History) Reset

func (x *GetHistoryReply_History) Reset()

func (*GetHistoryReply_History) String

func (x *GetHistoryReply_History) String() string

func (*GetHistoryReply_History) Validate

func (m *GetHistoryReply_History) Validate() error

Validate checks the field values on GetHistoryReply_History 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 (*GetHistoryReply_History) ValidateAll

func (m *GetHistoryReply_History) ValidateAll() error

ValidateAll checks the field values on GetHistoryReply_History 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 GetHistoryReply_HistoryMultiError, or nil if none found.

type GetHistoryReply_HistoryMultiError

type GetHistoryReply_HistoryMultiError []error

GetHistoryReply_HistoryMultiError is an error wrapping multiple validation errors returned by GetHistoryReply_History.ValidateAll() if the designated constraints aren't met.

func (GetHistoryReply_HistoryMultiError) AllErrors

func (m GetHistoryReply_HistoryMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetHistoryReply_HistoryMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetHistoryReply_HistoryValidationError

type GetHistoryReply_HistoryValidationError struct {
	// contains filtered or unexported fields
}

GetHistoryReply_HistoryValidationError is the validation error returned by GetHistoryReply_History.Validate if the designated constraints aren't met.

func (GetHistoryReply_HistoryValidationError) Cause

Cause function returns cause value.

func (GetHistoryReply_HistoryValidationError) Error

Error satisfies the builtin error interface

func (GetHistoryReply_HistoryValidationError) ErrorName

ErrorName returns error name.

func (GetHistoryReply_HistoryValidationError) Field

Field function returns field value.

func (GetHistoryReply_HistoryValidationError) Key

Key function returns key value.

func (GetHistoryReply_HistoryValidationError) Reason

Reason function returns reason value.

type GetHistoryRequest

type GetHistoryRequest struct {
	UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetHistoryRequest) Descriptor deprecated

func (*GetHistoryRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetHistoryRequest.ProtoReflect.Descriptor instead.

func (*GetHistoryRequest) GetUserId

func (x *GetHistoryRequest) GetUserId() int64

func (*GetHistoryRequest) ProtoMessage

func (*GetHistoryRequest) ProtoMessage()

func (*GetHistoryRequest) ProtoReflect

func (x *GetHistoryRequest) ProtoReflect() protoreflect.Message

func (*GetHistoryRequest) Reset

func (x *GetHistoryRequest) Reset()

func (*GetHistoryRequest) String

func (x *GetHistoryRequest) String() string

func (*GetHistoryRequest) Validate

func (m *GetHistoryRequest) Validate() error

Validate checks the field values on GetHistoryRequest 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 (*GetHistoryRequest) ValidateAll

func (m *GetHistoryRequest) ValidateAll() error

ValidateAll checks the field values on GetHistoryRequest 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 GetHistoryRequestMultiError, or nil if none found.

type GetHistoryRequestMultiError

type GetHistoryRequestMultiError []error

GetHistoryRequestMultiError is an error wrapping multiple validation errors returned by GetHistoryRequest.ValidateAll() if the designated constraints aren't met.

func (GetHistoryRequestMultiError) AllErrors

func (m GetHistoryRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetHistoryRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetHistoryRequestValidationError

type GetHistoryRequestValidationError struct {
	// contains filtered or unexported fields
}

GetHistoryRequestValidationError is the validation error returned by GetHistoryRequest.Validate if the designated constraints aren't met.

func (GetHistoryRequestValidationError) Cause

Cause function returns cause value.

func (GetHistoryRequestValidationError) Error

Error satisfies the builtin error interface

func (GetHistoryRequestValidationError) ErrorName

ErrorName returns error name.

func (GetHistoryRequestValidationError) Field

Field function returns field value.

func (GetHistoryRequestValidationError) Key

Key function returns key value.

func (GetHistoryRequestValidationError) Reason

Reason function returns reason value.

type HistoryClient

type HistoryClient interface {
	SaveHistory(ctx context.Context, in *SaveHistoryRequest, opts ...grpc.CallOption) (*SaveHistoryReply, error)
	GetHistory(ctx context.Context, in *GetHistoryRequest, opts ...grpc.CallOption) (*GetHistoryReply, error)
}

HistoryClient is the client API for History 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 NewHistoryClient

func NewHistoryClient(cc grpc.ClientConnInterface) HistoryClient

type HistoryHTTPClient

type HistoryHTTPClient interface {
	SaveHistory(ctx context.Context, req *SaveHistoryRequest, opts ...http.CallOption) (rsp *SaveHistoryReply, err error)
}

func NewHistoryHTTPClient

func NewHistoryHTTPClient(client *http.Client) HistoryHTTPClient

type HistoryHTTPClientImpl

type HistoryHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*HistoryHTTPClientImpl) SaveHistory

type HistoryHTTPServer

type HistoryHTTPServer interface {
	SaveHistory(context.Context, *SaveHistoryRequest) (*SaveHistoryReply, error)
}

type HistoryServer

type HistoryServer interface {
	SaveHistory(context.Context, *SaveHistoryRequest) (*SaveHistoryReply, error)
	GetHistory(context.Context, *GetHistoryRequest) (*GetHistoryReply, error)
	// contains filtered or unexported methods
}

HistoryServer is the server API for History service. All implementations must embed UnimplementedHistoryServer for forward compatibility

type SaveHistoryReply

type SaveHistoryReply struct {
	// contains filtered or unexported fields
}

func (*SaveHistoryReply) Descriptor deprecated

func (*SaveHistoryReply) Descriptor() ([]byte, []int)

Deprecated: Use SaveHistoryReply.ProtoReflect.Descriptor instead.

func (*SaveHistoryReply) ProtoMessage

func (*SaveHistoryReply) ProtoMessage()

func (*SaveHistoryReply) ProtoReflect

func (x *SaveHistoryReply) ProtoReflect() protoreflect.Message

func (*SaveHistoryReply) Reset

func (x *SaveHistoryReply) Reset()

func (*SaveHistoryReply) String

func (x *SaveHistoryReply) String() string

func (*SaveHistoryReply) Validate

func (m *SaveHistoryReply) Validate() error

Validate checks the field values on SaveHistoryReply 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 (*SaveHistoryReply) ValidateAll

func (m *SaveHistoryReply) ValidateAll() error

ValidateAll checks the field values on SaveHistoryReply 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 SaveHistoryReplyMultiError, or nil if none found.

type SaveHistoryReplyMultiError

type SaveHistoryReplyMultiError []error

SaveHistoryReplyMultiError is an error wrapping multiple validation errors returned by SaveHistoryReply.ValidateAll() if the designated constraints aren't met.

func (SaveHistoryReplyMultiError) AllErrors

func (m SaveHistoryReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SaveHistoryReplyMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type SaveHistoryReplyValidationError

type SaveHistoryReplyValidationError struct {
	// contains filtered or unexported fields
}

SaveHistoryReplyValidationError is the validation error returned by SaveHistoryReply.Validate if the designated constraints aren't met.

func (SaveHistoryReplyValidationError) Cause

Cause function returns cause value.

func (SaveHistoryReplyValidationError) Error

Error satisfies the builtin error interface

func (SaveHistoryReplyValidationError) ErrorName

ErrorName returns error name.

func (SaveHistoryReplyValidationError) Field

Field function returns field value.

func (SaveHistoryReplyValidationError) Key

Key function returns key value.

func (SaveHistoryReplyValidationError) Reason

Reason function returns reason value.

type SaveHistoryRequest

type SaveHistoryRequest struct {
	ObjId   int64  `protobuf:"varint,1,opt,name=obj_id,json=objId,proto3" json:"obj_id,omitempty"`
	ObjType string `protobuf:"bytes,2,opt,name=obj_type,json=objType,proto3" json:"obj_type,omitempty"`
	UserId  int64  `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*SaveHistoryRequest) Descriptor deprecated

func (*SaveHistoryRequest) Descriptor() ([]byte, []int)

Deprecated: Use SaveHistoryRequest.ProtoReflect.Descriptor instead.

func (*SaveHistoryRequest) GetObjId

func (x *SaveHistoryRequest) GetObjId() int64

func (*SaveHistoryRequest) GetObjType

func (x *SaveHistoryRequest) GetObjType() string

func (*SaveHistoryRequest) GetUserId

func (x *SaveHistoryRequest) GetUserId() int64

func (*SaveHistoryRequest) ProtoMessage

func (*SaveHistoryRequest) ProtoMessage()

func (*SaveHistoryRequest) ProtoReflect

func (x *SaveHistoryRequest) ProtoReflect() protoreflect.Message

func (*SaveHistoryRequest) Reset

func (x *SaveHistoryRequest) Reset()

func (*SaveHistoryRequest) String

func (x *SaveHistoryRequest) String() string

func (*SaveHistoryRequest) Validate

func (m *SaveHistoryRequest) Validate() error

Validate checks the field values on SaveHistoryRequest 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 (*SaveHistoryRequest) ValidateAll

func (m *SaveHistoryRequest) ValidateAll() error

ValidateAll checks the field values on SaveHistoryRequest 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 SaveHistoryRequestMultiError, or nil if none found.

type SaveHistoryRequestMultiError

type SaveHistoryRequestMultiError []error

SaveHistoryRequestMultiError is an error wrapping multiple validation errors returned by SaveHistoryRequest.ValidateAll() if the designated constraints aren't met.

func (SaveHistoryRequestMultiError) AllErrors

func (m SaveHistoryRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SaveHistoryRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type SaveHistoryRequestValidationError

type SaveHistoryRequestValidationError struct {
	// contains filtered or unexported fields
}

SaveHistoryRequestValidationError is the validation error returned by SaveHistoryRequest.Validate if the designated constraints aren't met.

func (SaveHistoryRequestValidationError) Cause

Cause function returns cause value.

func (SaveHistoryRequestValidationError) Error

Error satisfies the builtin error interface

func (SaveHistoryRequestValidationError) ErrorName

ErrorName returns error name.

func (SaveHistoryRequestValidationError) Field

Field function returns field value.

func (SaveHistoryRequestValidationError) Key

Key function returns key value.

func (SaveHistoryRequestValidationError) Reason

Reason function returns reason value.

type UnimplementedHistoryServer

type UnimplementedHistoryServer struct {
}

UnimplementedHistoryServer must be embedded to have forward compatible implementations.

func (UnimplementedHistoryServer) GetHistory

func (UnimplementedHistoryServer) SaveHistory

type UnsafeHistoryServer

type UnsafeHistoryServer interface {
	// contains filtered or unexported methods
}

UnsafeHistoryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HistoryServer will result in compilation errors.

Jump to

Keyboard shortcuts

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