v1

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: MIT Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GroupType_name = map[int32]string{
		0: "Normal",
	}
	GroupType_value = map[string]int32{
		"Normal": 0,
	}
)

Enum value maps for GroupType.

View Source
var (
	GroupStatus_name = map[int32]string{
		0: "Active",
		1: "Silent",
	}
	GroupStatus_value = map[string]int32{
		"Active": 0,
		"Silent": 1,
	}
)

Enum value maps for GroupStatus.

View Source
var File_user_group_v1_group_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

func (*Empty) Validate

func (m *Empty) Validate() error

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

func (m *Empty) ValidateAll() error

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) Descriptor() ([]byte, []int)

Deprecated: Use Group.ProtoReflect.Descriptor instead.

func (*Group) GetCreatedAt

func (x *Group) GetCreatedAt() int64

func (*Group) GetCreatedBy

func (x *Group) GetCreatedBy() string

func (*Group) GetDescription

func (x *Group) GetDescription() string

func (*Group) GetId

func (x *Group) GetId() int64

func (*Group) GetMembers

func (x *Group) GetMembers() []string

func (*Group) GetName

func (x *Group) GetName() string

func (*Group) GetStatus

func (x *Group) GetStatus() GroupStatus

func (*Group) GetType

func (x *Group) GetType() GroupType

func (*Group) GetUpdatedAt

func (x *Group) GetUpdatedAt() int64

func (*Group) ProtoMessage

func (*Group) ProtoMessage()

func (*Group) ProtoReflect

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

func (*Group) Reset

func (x *Group) Reset()

func (*Group) String

func (x *Group) String() string

func (*Group) Validate

func (m *Group) Validate() error

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

func (m *Group) ValidateAll() error

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.

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

type GroupType

type GroupType int32
const (
	GroupType_Normal GroupType = 0 // more types
)

func (GroupType) Descriptor

func (GroupType) Descriptor() protoreflect.EnumDescriptor

func (GroupType) Enum

func (x GroupType) Enum() *GroupType

func (GroupType) EnumDescriptor deprecated

func (GroupType) EnumDescriptor() ([]byte, []int)

Deprecated: Use GroupType.Descriptor instead.

func (GroupType) Number

func (x GroupType) Number() protoreflect.EnumNumber

func (GroupType) String

func (x GroupType) String() string

func (GroupType) Type

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

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.

Jump to

Keyboard shortcuts

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