proto

package
v0.0.0-...-a32e77c Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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.

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

Deprecated: Use Image.ProtoReflect.Descriptor instead.

func (*Image) GetOriginalUrl

func (x *Image) GetOriginalUrl() string

func (*Image) GetResizedUrl

func (x *Image) GetResizedUrl() string

func (*Image) ProtoMessage

func (*Image) ProtoMessage()

func (*Image) ProtoReflect

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

func (*Image) Reset

func (x *Image) Reset()

func (*Image) String

func (x *Image) String() string

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

Deprecated: Use Metrics.ProtoReflect.Descriptor instead.

func (*Metrics) GetHeight

func (x *Metrics) GetHeight() uint32

func (*Metrics) GetWeight

func (x *Metrics) GetWeight() uint32

func (*Metrics) ProtoMessage

func (*Metrics) ProtoMessage()

func (*Metrics) ProtoReflect

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

func (*Metrics) Reset

func (x *Metrics) Reset()

func (*Metrics) String

func (x *Metrics) String() string

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

type Role

type Role int32
const (
	Role_UNKNOWN Role = 0
	Role_REGULAR Role = 1
	Role_ADMIN   Role = 2
)

func (Role) Descriptor

func (Role) Descriptor() protoreflect.EnumDescriptor

func (Role) Enum

func (x Role) Enum() *Role

func (Role) EnumDescriptor deprecated

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

Deprecated: Use Role.Descriptor instead.

func (Role) Number

func (x Role) Number() protoreflect.EnumNumber

func (Role) String

func (x Role) String() string

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

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAvatar

func (x *User) GetAvatar() *Image

func (*User) GetDeactivated

func (x *User) GetDeactivated() bool

func (*User) GetDetails

func (x *User) GetDetails() []*anypb.Any

func (*User) GetExtraUser

func (x *User) GetExtraUser() *anypb.Any

func (*User) GetFemaleName

func (x *User) GetFemaleName() string

func (*User) GetFriends

func (x *User) GetFriends() []*User

func (*User) GetId

func (x *User) GetId() uint32

func (*User) GetImages

func (x *User) GetImages() []*Image

func (*User) GetMaleName

func (x *User) GetMaleName() string

func (*User) GetMeta

func (x *User) GetMeta() map[string]string

func (*User) GetName

func (m *User) GetName() isUser_Name

func (*User) GetPermissions

func (x *User) GetPermissions() []Permission

func (*User) GetRole

func (x *User) GetRole() Role

func (*User) GetTags

func (x *User) GetTags() []string

func (*User) GetUsername

func (x *User) GetUsername() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

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.

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"`
}

Jump to

Keyboard shortcuts

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