Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) CreateUser(context.Context, *UserCreateRequest) (*emptypb.Empty, error)
- func (UnimplementedUserServiceServer) DeleteUser(context.Context, *UserDeleteRequest) (*emptypb.Empty, error)
- func (UnimplementedUserServiceServer) GetUser(context.Context, *UserGetRequest) (*User, error)
- func (UnimplementedUserServiceServer) ListUser(context.Context, *UserListRequest) (*UserListResponse, error)
- func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UserUpdateRequest) (*emptypb.Empty, error)
- type UnsafeUserServiceServer
- type User
- type UserCreateRequest
- type UserDeleteRequest
- type UserGetRequest
- type UserListRequest
- type UserListResponse
- type UserQuery
- func (*UserQuery) Descriptor() ([]byte, []int)deprecated
- func (x *UserQuery) GetName() *core.StringQuery
- func (x *UserQuery) GetRoles() *core.CollectionQuery
- func (q *UserQuery) Matches(user *marinav1.User) (bool, error)
- func (*UserQuery) ProtoMessage()
- func (x *UserQuery) ProtoReflect() protoreflect.Message
- func (x *UserQuery) Reset()
- func (x *UserQuery) String() string
- type UserServiceClient
- type UserServiceServer
- type UserUpdateRequest
Constants ¶
const ( UserService_CreateUser_FullMethodName = "/user.UserService/CreateUser" UserService_GetUser_FullMethodName = "/user.UserService/GetUser" UserService_UpdateUser_FullMethodName = "/user.UserService/UpdateUser" UserService_DeleteUser_FullMethodName = "/user.UserService/DeleteUser" UserService_ListUser_FullMethodName = "/user.UserService/ListUser" )
Variables ¶
var File_gateway_api_user_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "user.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateUser", Handler: _UserService_CreateUser_Handler, }, { MethodName: "GetUser", Handler: _UserService_GetUser_Handler, }, { MethodName: "UpdateUser", Handler: _UserService_UpdateUser_Handler, }, { MethodName: "DeleteUser", Handler: _UserService_DeleteUser_Handler, }, { MethodName: "ListUser", Handler: _UserService_ListUser_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "gateway/api/user/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 UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) CreateUser ¶
func (UnimplementedUserServiceServer) CreateUser(context.Context, *UserCreateRequest) (*emptypb.Empty, error)
func (UnimplementedUserServiceServer) DeleteUser ¶
func (UnimplementedUserServiceServer) DeleteUser(context.Context, *UserDeleteRequest) (*emptypb.Empty, error)
func (UnimplementedUserServiceServer) GetUser ¶
func (UnimplementedUserServiceServer) GetUser(context.Context, *UserGetRequest) (*User, error)
func (UnimplementedUserServiceServer) ListUser ¶
func (UnimplementedUserServiceServer) ListUser(context.Context, *UserListRequest) (*UserListResponse, error)
func (UnimplementedUserServiceServer) UpdateUser ¶
func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UserUpdateRequest) (*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 User ¶
type User struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Password []byte `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` Roles []string `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetPassword ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserCreateRequest ¶
type UserCreateRequest struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*UserCreateRequest) Descriptor
deprecated
func (*UserCreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserCreateRequest.ProtoReflect.Descriptor instead.
func (*UserCreateRequest) GetUser ¶
func (x *UserCreateRequest) GetUser() *User
func (*UserCreateRequest) ProtoMessage ¶
func (*UserCreateRequest) ProtoMessage()
func (*UserCreateRequest) ProtoReflect ¶
func (x *UserCreateRequest) ProtoReflect() protoreflect.Message
func (*UserCreateRequest) Reset ¶
func (x *UserCreateRequest) Reset()
func (*UserCreateRequest) String ¶
func (x *UserCreateRequest) String() string
type UserDeleteRequest ¶
type UserDeleteRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*UserDeleteRequest) Descriptor
deprecated
func (*UserDeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserDeleteRequest.ProtoReflect.Descriptor instead.
func (*UserDeleteRequest) GetName ¶
func (x *UserDeleteRequest) GetName() string
func (*UserDeleteRequest) ProtoMessage ¶
func (*UserDeleteRequest) ProtoMessage()
func (*UserDeleteRequest) ProtoReflect ¶
func (x *UserDeleteRequest) ProtoReflect() protoreflect.Message
func (*UserDeleteRequest) Reset ¶
func (x *UserDeleteRequest) Reset()
func (*UserDeleteRequest) String ¶
func (x *UserDeleteRequest) String() string
type UserGetRequest ¶
type UserGetRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*UserGetRequest) Descriptor
deprecated
func (*UserGetRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserGetRequest.ProtoReflect.Descriptor instead.
func (*UserGetRequest) GetName ¶
func (x *UserGetRequest) GetName() string
func (*UserGetRequest) ProtoMessage ¶
func (*UserGetRequest) ProtoMessage()
func (*UserGetRequest) ProtoReflect ¶
func (x *UserGetRequest) ProtoReflect() protoreflect.Message
func (*UserGetRequest) Reset ¶
func (x *UserGetRequest) Reset()
func (*UserGetRequest) String ¶
func (x *UserGetRequest) String() string
type UserListRequest ¶
type UserListRequest struct { Query *UserQuery `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` // contains filtered or unexported fields }
func (*UserListRequest) Descriptor
deprecated
func (*UserListRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserListRequest.ProtoReflect.Descriptor instead.
func (*UserListRequest) GetQuery ¶
func (x *UserListRequest) GetQuery() *UserQuery
func (*UserListRequest) ProtoMessage ¶
func (*UserListRequest) ProtoMessage()
func (*UserListRequest) ProtoReflect ¶
func (x *UserListRequest) ProtoReflect() protoreflect.Message
func (*UserListRequest) Reset ¶
func (x *UserListRequest) Reset()
func (*UserListRequest) String ¶
func (x *UserListRequest) String() string
type UserListResponse ¶
type UserListResponse struct { // users is the list of users with the passwords set to the empty strings Users []*User `protobuf:"bytes,2,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*UserListResponse) Descriptor
deprecated
func (*UserListResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserListResponse.ProtoReflect.Descriptor instead.
func (*UserListResponse) GetUsers ¶
func (x *UserListResponse) GetUsers() []*User
func (*UserListResponse) ProtoMessage ¶
func (*UserListResponse) ProtoMessage()
func (*UserListResponse) ProtoReflect ¶
func (x *UserListResponse) ProtoReflect() protoreflect.Message
func (*UserListResponse) Reset ¶
func (x *UserListResponse) Reset()
func (*UserListResponse) String ¶
func (x *UserListResponse) String() string
type UserQuery ¶
type UserQuery struct { Name *core.StringQuery `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Roles *core.CollectionQuery `protobuf:"bytes,2,opt,name=roles,proto3" json:"roles,omitempty"` // contains filtered or unexported fields }
func (*UserQuery) Descriptor
deprecated
func (*UserQuery) GetName ¶
func (x *UserQuery) GetName() *core.StringQuery
func (*UserQuery) GetRoles ¶
func (x *UserQuery) GetRoles() *core.CollectionQuery
func (*UserQuery) ProtoMessage ¶
func (*UserQuery) ProtoMessage()
func (*UserQuery) ProtoReflect ¶
func (x *UserQuery) ProtoReflect() protoreflect.Message
type UserServiceClient ¶
type UserServiceClient interface { CreateUser(ctx context.Context, in *UserCreateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) GetUser(ctx context.Context, in *UserGetRequest, opts ...grpc.CallOption) (*User, error) UpdateUser(ctx context.Context, in *UserUpdateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) DeleteUser(ctx context.Context, in *UserDeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) ListUser(ctx context.Context, in *UserListRequest, opts ...grpc.CallOption) (*UserListResponse, 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 { CreateUser(context.Context, *UserCreateRequest) (*emptypb.Empty, error) GetUser(context.Context, *UserGetRequest) (*User, error) UpdateUser(context.Context, *UserUpdateRequest) (*emptypb.Empty, error) DeleteUser(context.Context, *UserDeleteRequest) (*emptypb.Empty, error) ListUser(context.Context, *UserListRequest) (*UserListResponse, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility
type UserUpdateRequest ¶
type UserUpdateRequest struct { User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*UserUpdateRequest) Descriptor
deprecated
func (*UserUpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserUpdateRequest.ProtoReflect.Descriptor instead.
func (*UserUpdateRequest) GetUser ¶
func (x *UserUpdateRequest) GetUser() *User
func (*UserUpdateRequest) ProtoMessage ¶
func (*UserUpdateRequest) ProtoMessage()
func (*UserUpdateRequest) ProtoReflect ¶
func (x *UserUpdateRequest) ProtoReflect() protoreflect.Message
func (*UserUpdateRequest) Reset ¶
func (x *UserUpdateRequest) Reset()
func (*UserUpdateRequest) String ¶
func (x *UserUpdateRequest) String() string