v1

package
v0.3.0-alpha5 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Role_name = map[int32]string{
		0: "ROLE_UNSPECIFIED",
		1: "ROLE_BLUE",
		2: "ROLE_RED",
		3: "ROLE_BLACK",
	}
	Role_value = map[string]int32{
		"ROLE_UNSPECIFIED": 0,
		"ROLE_BLUE":        1,
		"ROLE_RED":         2,
		"ROLE_BLACK":       3,
	}
)

Enum value maps for Role.

View Source
var File_pkg_proto_user_v1_user_proto protoreflect.FileDescriptor
View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pkg.proto.user.v1.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAll",
			Handler:    _UserService_GetAll_Handler,
		},
		{
			MethodName: "GetByID",
			Handler:    _UserService_GetByID_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _UserService_Delete_Handler,
		},
		{
			MethodName: "Store",
			Handler:    _UserService_Store_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _UserService_Update_Handler,
		},
		{
			MethodName: "GetByUsername",
			Handler:    _UserService_GetByUsername_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pkg/proto/user/v1/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 DeleteRequest

type DeleteRequest struct {
	Id *v1.UUID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetId

func (x *DeleteRequest) GetId() *v1.UUID

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

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

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type DeleteResponse

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

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

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

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type GetAllRequest

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

func (*GetAllRequest) Descriptor deprecated

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

Deprecated: Use GetAllRequest.ProtoReflect.Descriptor instead.

func (*GetAllRequest) ProtoMessage

func (*GetAllRequest) ProtoMessage()

func (*GetAllRequest) ProtoReflect

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

func (*GetAllRequest) Reset

func (x *GetAllRequest) Reset()

func (*GetAllRequest) String

func (x *GetAllRequest) String() string

type GetAllResponse

type GetAllResponse struct {
	Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAllResponse) Descriptor deprecated

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

Deprecated: Use GetAllResponse.ProtoReflect.Descriptor instead.

func (*GetAllResponse) GetUsers

func (x *GetAllResponse) GetUsers() []*User

func (*GetAllResponse) ProtoMessage

func (*GetAllResponse) ProtoMessage()

func (*GetAllResponse) ProtoReflect

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

func (*GetAllResponse) Reset

func (x *GetAllResponse) Reset()

func (*GetAllResponse) String

func (x *GetAllResponse) String() string

type GetByIDRequest

type GetByIDRequest struct {
	Id *v1.UUID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetByIDRequest) Descriptor deprecated

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

Deprecated: Use GetByIDRequest.ProtoReflect.Descriptor instead.

func (*GetByIDRequest) GetId

func (x *GetByIDRequest) GetId() *v1.UUID

func (*GetByIDRequest) ProtoMessage

func (*GetByIDRequest) ProtoMessage()

func (*GetByIDRequest) ProtoReflect

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

func (*GetByIDRequest) Reset

func (x *GetByIDRequest) Reset()

func (*GetByIDRequest) String

func (x *GetByIDRequest) String() string

type GetByIDResponse

type GetByIDResponse struct {
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*GetByIDResponse) Descriptor deprecated

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

Deprecated: Use GetByIDResponse.ProtoReflect.Descriptor instead.

func (*GetByIDResponse) GetUser

func (x *GetByIDResponse) GetUser() *User

func (*GetByIDResponse) ProtoMessage

func (*GetByIDResponse) ProtoMessage()

func (*GetByIDResponse) ProtoReflect

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

func (*GetByIDResponse) Reset

func (x *GetByIDResponse) Reset()

func (*GetByIDResponse) String

func (x *GetByIDResponse) String() string

type GetByUsernameRequest

type GetByUsernameRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

func (*GetByUsernameRequest) Descriptor deprecated

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

Deprecated: Use GetByUsernameRequest.ProtoReflect.Descriptor instead.

func (*GetByUsernameRequest) GetUsername

func (x *GetByUsernameRequest) GetUsername() string

func (*GetByUsernameRequest) ProtoMessage

func (*GetByUsernameRequest) ProtoMessage()

func (*GetByUsernameRequest) ProtoReflect

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

func (*GetByUsernameRequest) Reset

func (x *GetByUsernameRequest) Reset()

func (*GetByUsernameRequest) String

func (x *GetByUsernameRequest) String() string

type GetByUsernameResponse

type GetByUsernameResponse struct {
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*GetByUsernameResponse) Descriptor deprecated

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

Deprecated: Use GetByUsernameResponse.ProtoReflect.Descriptor instead.

func (*GetByUsernameResponse) GetUser

func (x *GetByUsernameResponse) GetUser() *User

func (*GetByUsernameResponse) ProtoMessage

func (*GetByUsernameResponse) ProtoMessage()

func (*GetByUsernameResponse) ProtoReflect

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

func (*GetByUsernameResponse) Reset

func (x *GetByUsernameResponse) Reset()

func (*GetByUsernameResponse) String

func (x *GetByUsernameResponse) String() string

type Role

type Role int32
const (
	Role_ROLE_UNSPECIFIED Role = 0
	Role_ROLE_BLUE        Role = 1
	Role_ROLE_RED         Role = 2
	Role_ROLE_BLACK       Role = 3
)

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 StoreRequest

type StoreRequest struct {
	Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*StoreRequest) Descriptor deprecated

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

Deprecated: Use StoreRequest.ProtoReflect.Descriptor instead.

func (*StoreRequest) GetUsers

func (x *StoreRequest) GetUsers() []*User

func (*StoreRequest) ProtoMessage

func (*StoreRequest) ProtoMessage()

func (*StoreRequest) ProtoReflect

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

func (*StoreRequest) Reset

func (x *StoreRequest) Reset()

func (*StoreRequest) String

func (x *StoreRequest) String() string

type StoreResponse

type StoreResponse struct {
	Ids []*v1.UUID `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
	// contains filtered or unexported fields
}

func (*StoreResponse) Descriptor deprecated

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

Deprecated: Use StoreResponse.ProtoReflect.Descriptor instead.

func (*StoreResponse) GetIds

func (x *StoreResponse) GetIds() []*v1.UUID

func (*StoreResponse) ProtoMessage

func (*StoreResponse) ProtoMessage()

func (*StoreResponse) ProtoReflect

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

func (*StoreResponse) Reset

func (x *StoreResponse) Reset()

func (*StoreResponse) String

func (x *StoreResponse) String() string

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) Delete

func (UnimplementedUserServiceServer) GetAll

func (UnimplementedUserServiceServer) GetByID

func (UnimplementedUserServiceServer) GetByUsername

func (UnimplementedUserServiceServer) Store

func (UnimplementedUserServiceServer) Update

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 UpdateRequest

type UpdateRequest struct {
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateRequest) Descriptor deprecated

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

Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.

func (*UpdateRequest) GetUser

func (x *UpdateRequest) GetUser() *User

func (*UpdateRequest) ProtoMessage

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) ProtoReflect

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

func (*UpdateRequest) Reset

func (x *UpdateRequest) Reset()

func (*UpdateRequest) String

func (x *UpdateRequest) String() string

type UpdateResponse

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

func (*UpdateResponse) Descriptor deprecated

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

Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.

func (*UpdateResponse) ProtoMessage

func (*UpdateResponse) ProtoMessage()

func (*UpdateResponse) ProtoReflect

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

func (*UpdateResponse) Reset

func (x *UpdateResponse) Reset()

func (*UpdateResponse) String

func (x *UpdateResponse) String() string

type User

type User struct {
	Id           *v1.UUID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Username     string   `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	TeamId       *v1.UUID `protobuf:"bytes,4,opt,name=team_id,json=teamId,proto3" json:"team_id,omitempty"`
	Password     string   `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"`
	Role         Role     `protobuf:"varint,6,opt,name=role,proto3,enum=pkg.proto.user.v1.Role" json:"role,omitempty"`
	PasswordHash string   `protobuf:"bytes,7,opt,name=password_hash,json=passwordHash,proto3" json:"password_hash,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetId

func (x *User) GetId() *v1.UUID

func (*User) GetPassword

func (x *User) GetPassword() string

func (*User) GetPasswordHash

func (x *User) GetPasswordHash() string

func (*User) GetRole

func (x *User) GetRole() Role

func (*User) GetTeamId

func (x *User) GetTeamId() *v1.UUID

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 {
	GetAll(ctx context.Context, in *GetAllRequest, opts ...grpc.CallOption) (*GetAllResponse, error)
	GetByID(ctx context.Context, in *GetByIDRequest, opts ...grpc.CallOption) (*GetByIDResponse, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
	Store(ctx context.Context, in *StoreRequest, opts ...grpc.CallOption) (*StoreResponse, error)
	Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error)
	GetByUsername(ctx context.Context, in *GetByUsernameRequest, opts ...grpc.CallOption) (*GetByUsernameResponse, 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 {
	GetAll(context.Context, *GetAllRequest) (*GetAllResponse, error)
	GetByID(context.Context, *GetByIDRequest) (*GetByIDResponse, error)
	Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
	Store(context.Context, *StoreRequest) (*StoreResponse, error)
	Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
	GetByUsername(context.Context, *GetByUsernameRequest) (*GetByUsernameResponse, error)
	// contains filtered or unexported methods
}

UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility

Jump to

Keyboard shortcuts

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