Documentation
¶
Index ¶
- Variables
- func RegisterGroupServiceServer(s grpc.ServiceRegistrar, srv GroupServiceServer)
- type Empty
- type EmptyMultiError
- type EmptyValidationError
- type Group
- func (*Group) Descriptor() ([]byte, []int)deprecated
- func (x *Group) GetCreatedAt() int64
- func (x *Group) GetCreatedBy() string
- func (x *Group) GetDescription() string
- func (x *Group) GetId() int64
- func (x *Group) GetMembers() []string
- func (x *Group) GetName() string
- func (x *Group) GetStatus() GroupStatus
- func (x *Group) GetType() GroupType
- func (x *Group) GetUpdatedAt() int64
- func (*Group) ProtoMessage()
- func (x *Group) ProtoReflect() protoreflect.Message
- func (x *Group) Reset()
- func (x *Group) String() string
- func (m *Group) Validate() error
- func (m *Group) ValidateAll() error
- type GroupMultiError
- type GroupServiceClient
- type GroupServiceServer
- type GroupStatus
- func (GroupStatus) Descriptor() protoreflect.EnumDescriptor
- func (x GroupStatus) Enum() *GroupStatus
- func (GroupStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x GroupStatus) Number() protoreflect.EnumNumber
- func (x GroupStatus) String() string
- func (GroupStatus) Type() protoreflect.EnumType
- type GroupType
- type GroupValidationError
- type UnimplementedGroupServiceServer
- func (UnimplementedGroupServiceServer) AddGroupMember(context.Context, *Empty) (*Empty, error)
- func (UnimplementedGroupServiceServer) CreateGroup(context.Context, *Empty) (*Group, error)
- func (UnimplementedGroupServiceServer) DeleteGroup(context.Context, *Empty) (*Empty, error)
- func (UnimplementedGroupServiceServer) GetGroup(context.Context, *Empty) (*Group, error)
- func (UnimplementedGroupServiceServer) GetGroupMembers(context.Context, *Empty) (*v1.UserList, error)
- func (UnimplementedGroupServiceServer) RemoveGroupMember(context.Context, *Empty) (*Empty, error)
- func (UnimplementedGroupServiceServer) UpdateGroup(context.Context, *Empty) (*Group, error)
- type UnsafeGroupServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( GroupType_name = map[int32]string{ 0: "Normal", } GroupType_value = map[string]int32{ "Normal": 0, } )
Enum value maps for GroupType.
var ( GroupStatus_name = map[int32]string{ 0: "Active", 1: "Silent", } GroupStatus_value = map[string]int32{ "Active": 0, "Silent": 1, } )
Enum value maps for GroupStatus.
var File_user_group_v1_group_proto protoreflect.FileDescriptor
var GroupService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.user.group.v1.GroupService", HandlerType: (*GroupServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetGroup", Handler: _GroupService_GetGroup_Handler, }, { MethodName: "CreateGroup", Handler: _GroupService_CreateGroup_Handler, }, { MethodName: "UpdateGroup", Handler: _GroupService_UpdateGroup_Handler, }, { MethodName: "DeleteGroup", Handler: _GroupService_DeleteGroup_Handler, }, { MethodName: "GetGroupMembers", Handler: _GroupService_GetGroupMembers_Handler, }, { MethodName: "AddGroupMember", Handler: _GroupService_AddGroupMember_Handler, }, { MethodName: "RemoveGroupMember", Handler: _GroupService_RemoveGroupMember_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user/group/v1/group.proto", }
GroupService_ServiceDesc is the grpc.ServiceDesc for GroupService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGroupServiceServer ¶
func RegisterGroupServiceServer(s grpc.ServiceRegistrar, srv GroupServiceServer)
Types ¶
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
func (*Empty) Validate ¶
Validate checks the field values on Empty 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 (*Empty) ValidateAll ¶
ValidateAll checks the field values on Empty 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 EmptyMultiError, or nil if none found.
type EmptyMultiError ¶
type EmptyMultiError []error
EmptyMultiError is an error wrapping multiple validation errors returned by Empty.ValidateAll() if the designated constraints aren't met.
func (EmptyMultiError) AllErrors ¶
func (m EmptyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (EmptyMultiError) Error ¶
func (m EmptyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type EmptyValidationError ¶
type EmptyValidationError struct {
// contains filtered or unexported fields
}
EmptyValidationError is the validation error returned by Empty.Validate if the designated constraints aren't met.
func (EmptyValidationError) Cause ¶
func (e EmptyValidationError) Cause() error
Cause function returns cause value.
func (EmptyValidationError) Error ¶
func (e EmptyValidationError) Error() string
Error satisfies the builtin error interface
func (EmptyValidationError) ErrorName ¶
func (e EmptyValidationError) ErrorName() string
ErrorName returns error name.
func (EmptyValidationError) Field ¶
func (e EmptyValidationError) Field() string
Field function returns field value.
func (EmptyValidationError) Key ¶
func (e EmptyValidationError) Key() bool
Key function returns key value.
func (EmptyValidationError) Reason ¶
func (e EmptyValidationError) Reason() string
Reason function returns reason value.
type Group ¶
type Group struct {
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
Type GroupType `protobuf:"varint,4,opt,name=type,proto3,enum=api.user.group.v1.GroupType" json:"type,omitempty"`
Status GroupStatus `protobuf:"varint,5,opt,name=status,proto3,enum=api.user.group.v1.GroupStatus" json:"status,omitempty"`
CreatedBy string `protobuf:"bytes,6,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"`
Members []string `protobuf:"bytes,7,rep,name=members,proto3" json:"members,omitempty"`
CreatedAt int64 `protobuf:"varint,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
UpdatedAt int64 `protobuf:"varint,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
// contains filtered or unexported fields
}
func (*Group) Descriptor
deprecated
func (*Group) GetCreatedAt ¶
func (*Group) GetCreatedBy ¶
func (*Group) GetDescription ¶
func (*Group) GetMembers ¶
func (*Group) GetStatus ¶
func (x *Group) GetStatus() GroupStatus
func (*Group) GetUpdatedAt ¶
func (*Group) ProtoMessage ¶
func (*Group) ProtoMessage()
func (*Group) ProtoReflect ¶
func (x *Group) ProtoReflect() protoreflect.Message
func (*Group) Validate ¶
Validate checks the field values on Group 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 (*Group) ValidateAll ¶
ValidateAll checks the field values on Group 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 GroupMultiError, or nil if none found.
type GroupMultiError ¶
type GroupMultiError []error
GroupMultiError is an error wrapping multiple validation errors returned by Group.ValidateAll() if the designated constraints aren't met.
func (GroupMultiError) AllErrors ¶
func (m GroupMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GroupMultiError) Error ¶
func (m GroupMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GroupServiceClient ¶
type GroupServiceClient interface {
GetGroup(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Group, error)
CreateGroup(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Group, error)
UpdateGroup(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Group, error)
DeleteGroup(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
GetGroupMembers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*v1.UserList, error)
AddGroupMember(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
RemoveGroupMember(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
}
GroupServiceClient is the client API for GroupService 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 NewGroupServiceClient ¶
func NewGroupServiceClient(cc grpc.ClientConnInterface) GroupServiceClient
type GroupServiceServer ¶
type GroupServiceServer interface {
GetGroup(context.Context, *Empty) (*Group, error)
CreateGroup(context.Context, *Empty) (*Group, error)
UpdateGroup(context.Context, *Empty) (*Group, error)
DeleteGroup(context.Context, *Empty) (*Empty, error)
GetGroupMembers(context.Context, *Empty) (*v1.UserList, error)
AddGroupMember(context.Context, *Empty) (*Empty, error)
RemoveGroupMember(context.Context, *Empty) (*Empty, error)
// contains filtered or unexported methods
}
GroupServiceServer is the server API for GroupService service. All implementations must embed UnimplementedGroupServiceServer for forward compatibility
type GroupStatus ¶
type GroupStatus int32
const ( GroupStatus_Active GroupStatus = 0 GroupStatus_Silent GroupStatus = 1 // more statuses )
func (GroupStatus) Descriptor ¶
func (GroupStatus) Descriptor() protoreflect.EnumDescriptor
func (GroupStatus) Enum ¶
func (x GroupStatus) Enum() *GroupStatus
func (GroupStatus) EnumDescriptor
deprecated
func (GroupStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use GroupStatus.Descriptor instead.
func (GroupStatus) Number ¶
func (x GroupStatus) Number() protoreflect.EnumNumber
func (GroupStatus) String ¶
func (x GroupStatus) String() string
func (GroupStatus) Type ¶
func (GroupStatus) Type() protoreflect.EnumType
type GroupType ¶
type GroupType int32
const (
GroupType_Normal GroupType = 0 // more types
)
func (GroupType) Descriptor ¶
func (GroupType) Descriptor() protoreflect.EnumDescriptor
func (GroupType) EnumDescriptor
deprecated
func (GroupType) Number ¶
func (x GroupType) Number() protoreflect.EnumNumber
func (GroupType) Type ¶
func (GroupType) Type() protoreflect.EnumType
type GroupValidationError ¶
type GroupValidationError struct {
// contains filtered or unexported fields
}
GroupValidationError is the validation error returned by Group.Validate if the designated constraints aren't met.
func (GroupValidationError) Cause ¶
func (e GroupValidationError) Cause() error
Cause function returns cause value.
func (GroupValidationError) Error ¶
func (e GroupValidationError) Error() string
Error satisfies the builtin error interface
func (GroupValidationError) ErrorName ¶
func (e GroupValidationError) ErrorName() string
ErrorName returns error name.
func (GroupValidationError) Field ¶
func (e GroupValidationError) Field() string
Field function returns field value.
func (GroupValidationError) Key ¶
func (e GroupValidationError) Key() bool
Key function returns key value.
func (GroupValidationError) Reason ¶
func (e GroupValidationError) Reason() string
Reason function returns reason value.
type UnimplementedGroupServiceServer ¶
type UnimplementedGroupServiceServer struct {
}
UnimplementedGroupServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedGroupServiceServer) AddGroupMember ¶
func (UnimplementedGroupServiceServer) CreateGroup ¶
func (UnimplementedGroupServiceServer) DeleteGroup ¶
func (UnimplementedGroupServiceServer) GetGroupMembers ¶
func (UnimplementedGroupServiceServer) RemoveGroupMember ¶
func (UnimplementedGroupServiceServer) UpdateGroup ¶
type UnsafeGroupServiceServer ¶
type UnsafeGroupServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGroupServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GroupServiceServer will result in compilation errors.