Documentation ¶
Index ¶
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type Image
- type Metrics
- type Permission
- type Role
- type UnimplementedUserServiceServer
- type UnsafeUserServiceServer
- type UpdateUserRequest
- func (*UpdateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserRequest) GetFieldMask() *fieldmaskpb.FieldMask
- func (x *UpdateUserRequest) GetUser() *User
- func (*UpdateUserRequest) ProtoMessage()
- func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateUserRequest) Reset()
- func (x *UpdateUserRequest) String() string
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAvatar() *Image
- func (x *User) GetDeactivated() bool
- func (x *User) GetDetails() []*anypb.Any
- func (x *User) GetExtraUser() *anypb.Any
- func (x *User) GetFemaleName() string
- func (x *User) GetFriends() []*User
- func (x *User) GetId() uint32
- func (x *User) GetImages() []*Image
- func (x *User) GetMaleName() string
- func (x *User) GetMeta() map[string]string
- func (m *User) GetName() isUser_Name
- func (x *User) GetPermissions() []Permission
- func (x *User) GetRole() Role
- func (x *User) GetTags() []string
- func (x *User) GetUsername() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserServiceClient
- type UserServiceServer
- type User_FemaleName
- type User_MaleName
Constants ¶
This section is empty.
Variables ¶
var ( Role_name = map[int32]string{ 0: "UNKNOWN", 1: "REGULAR", 2: "ADMIN", } Role_value = map[string]int32{ "UNKNOWN": 0, "REGULAR": 1, "ADMIN": 2, } )
Enum value maps for Role.
var ( Permission_name = map[int32]string{ 0: "READ", 1: "WRITE", 2: "EXECUTE", } Permission_value = map[string]int32{ "READ": 0, "WRITE": 1, "EXECUTE": 2, } )
Enum value maps for Permission.
var File__17_fieldmask_proto_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "update_user", Handler: _UserService_UpdateUser_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "17_fieldmask/proto/user.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type Image ¶
type Image struct { OriginalUrl string `protobuf:"bytes,1,opt,name=original_url,json=originalUrl,proto3" json:"original_url,omitempty"` ResizedUrl string `protobuf:"bytes,2,opt,name=resized_url,json=resizedUrl,proto3" json:"resized_url,omitempty"` // contains filtered or unexported fields }
func (*Image) Descriptor
deprecated
func (*Image) GetOriginalUrl ¶
func (*Image) GetResizedUrl ¶
func (*Image) ProtoMessage ¶
func (*Image) ProtoMessage()
func (*Image) ProtoReflect ¶
func (x *Image) ProtoReflect() protoreflect.Message
type Metrics ¶
type Metrics struct { Height uint32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` Weight uint32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` // contains filtered or unexported fields }
func (*Metrics) Descriptor
deprecated
func (*Metrics) ProtoMessage ¶
func (*Metrics) ProtoMessage()
func (*Metrics) ProtoReflect ¶
func (x *Metrics) ProtoReflect() protoreflect.Message
type Permission ¶
type Permission int32
const ( Permission_READ Permission = 0 Permission_WRITE Permission = 1 Permission_EXECUTE Permission = 2 )
func (Permission) Descriptor ¶
func (Permission) Descriptor() protoreflect.EnumDescriptor
func (Permission) Enum ¶
func (x Permission) Enum() *Permission
func (Permission) EnumDescriptor
deprecated
func (Permission) EnumDescriptor() ([]byte, []int)
Deprecated: Use Permission.Descriptor instead.
func (Permission) Number ¶
func (x Permission) Number() protoreflect.EnumNumber
func (Permission) String ¶
func (x Permission) String() string
func (Permission) Type ¶
func (Permission) Type() protoreflect.EnumType
type Role ¶
type Role int32
func (Role) Descriptor ¶
func (Role) Descriptor() protoreflect.EnumDescriptor
func (Role) EnumDescriptor
deprecated
func (Role) Number ¶
func (x Role) Number() protoreflect.EnumNumber
func (Role) Type ¶
func (Role) Type() protoreflect.EnumType
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) UpdateUser ¶
func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*emptypb.Empty, error)
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type UpdateUserRequest ¶
type UpdateUserRequest struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` // contains filtered or unexported fields }
func (*UpdateUserRequest) Descriptor
deprecated
func (*UpdateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.
func (*UpdateUserRequest) GetFieldMask ¶
func (x *UpdateUserRequest) GetFieldMask() *fieldmaskpb.FieldMask
func (*UpdateUserRequest) GetUser ¶
func (x *UpdateUserRequest) GetUser() *User
func (*UpdateUserRequest) ProtoMessage ¶
func (*UpdateUserRequest) ProtoMessage()
func (*UpdateUserRequest) ProtoReflect ¶
func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
func (*UpdateUserRequest) Reset ¶
func (x *UpdateUserRequest) Reset()
func (*UpdateUserRequest) String ¶
func (x *UpdateUserRequest) String() string
type User ¶
type User struct { Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Role Role `protobuf:"varint,3,opt,name=role,proto3,enum=Role" json:"role,omitempty"` Meta map[string]string `` /* 149-byte string literal not displayed */ Deactivated bool `protobuf:"varint,5,opt,name=deactivated,proto3" json:"deactivated,omitempty"` Permissions []Permission `protobuf:"varint,6,rep,packed,name=permissions,proto3,enum=Permission" json:"permissions,omitempty"` // Types that are assignable to Name: // *User_MaleName // *User_FemaleName Name isUser_Name `protobuf_oneof:"name"` Details []*anypb.Any `protobuf:"bytes,9,rep,name=details,proto3" json:"details,omitempty"` Images []*Image `protobuf:"bytes,10,rep,name=images,proto3" json:"images,omitempty"` Avatar *Image `protobuf:"bytes,11,opt,name=avatar,proto3" json:"avatar,omitempty"` Tags []string `protobuf:"bytes,12,rep,name=tags,proto3" json:"tags,omitempty"` Friends []*User `protobuf:"bytes,13,rep,name=friends,proto3" json:"friends,omitempty"` ExtraUser *anypb.Any `protobuf:"bytes,14,opt,name=extra_user,json=extraUser,proto3" json:"extra_user,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetDeactivated ¶
func (*User) GetDetails ¶
func (*User) GetExtraUser ¶
func (*User) GetFemaleName ¶
func (*User) GetFriends ¶
func (*User) GetMaleName ¶
func (*User) GetPermissions ¶
func (x *User) GetPermissions() []Permission
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserServiceClient ¶
type UserServiceClient interface { // Sends a greeting UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
UserServiceClient is the client API for UserService 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 NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { // Sends a greeting UpdateUser(context.Context, *UpdateUserRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility
type User_FemaleName ¶
type User_FemaleName struct {
FemaleName string `protobuf:"bytes,8,opt,name=female_name,json=femaleName,proto3,oneof"`
}
type User_MaleName ¶
type User_MaleName struct {
MaleName string `protobuf:"bytes,7,opt,name=male_name,json=maleName,proto3,oneof"`
}