pb

package
v0.0.0-...-94252c1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 11 Imported by: 6

Documentation

Index

Constants

View Source
const (
	UserService_Create_FullMethodName    = "/user.UserService/Create"
	UserService_Update_FullMethodName    = "/user.UserService/Update"
	UserService_Delete_FullMethodName    = "/user.UserService/Delete"
	UserService_Get_FullMethodName       = "/user.UserService/Get"
	UserService_GetSecret_FullMethodName = "/user.UserService/GetSecret"
	UserService_GetStream_FullMethodName = "/user.UserService/GetStream"
)

Variables

View Source
var File_user_service_proto protoreflect.FileDescriptor
View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "user.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _UserService_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _UserService_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _UserService_Delete_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _UserService_Get_Handler,
		},
		{
			MethodName: "GetSecret",
			Handler:    _UserService_GetSecret_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetStream",
			Handler:       _UserService_GetStream_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "user_service.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 CreateUserRequest

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

func (*CreateUserRequest) Descriptor deprecated

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

Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.

func (*CreateUserRequest) GetUser

func (x *CreateUserRequest) GetUser() *User

func (*CreateUserRequest) ProtoMessage

func (*CreateUserRequest) ProtoMessage()

func (*CreateUserRequest) ProtoReflect

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

func (*CreateUserRequest) Reset

func (x *CreateUserRequest) Reset()

func (*CreateUserRequest) String

func (x *CreateUserRequest) String() string

type CreateUserResponse

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

func (*CreateUserResponse) Descriptor deprecated

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

Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead.

func (*CreateUserResponse) GetId

func (x *CreateUserResponse) GetId() string

func (*CreateUserResponse) ProtoMessage

func (*CreateUserResponse) ProtoMessage()

func (*CreateUserResponse) ProtoReflect

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

func (*CreateUserResponse) Reset

func (x *CreateUserResponse) Reset()

func (*CreateUserResponse) String

func (x *CreateUserResponse) String() string

type DeleteUserRequest

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

func (*DeleteUserRequest) Descriptor deprecated

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

Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead.

func (*DeleteUserRequest) GetId

func (x *DeleteUserRequest) GetId() string

func (*DeleteUserRequest) ProtoMessage

func (*DeleteUserRequest) ProtoMessage()

func (*DeleteUserRequest) ProtoReflect

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

func (*DeleteUserRequest) Reset

func (x *DeleteUserRequest) Reset()

func (*DeleteUserRequest) String

func (x *DeleteUserRequest) String() string

type GetUserRequest

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

func (*GetUserRequest) Descriptor deprecated

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

Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.

func (*GetUserRequest) GetId

func (x *GetUserRequest) GetId() string

func (*GetUserRequest) ProtoMessage

func (*GetUserRequest) ProtoMessage()

func (*GetUserRequest) ProtoReflect

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

func (*GetUserRequest) Reset

func (x *GetUserRequest) Reset()

func (*GetUserRequest) String

func (x *GetUserRequest) String() string

type GetUserResponse

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

func (*GetUserResponse) Descriptor deprecated

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

Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.

func (*GetUserResponse) GetUser

func (x *GetUserResponse) GetUser() *User

func (*GetUserResponse) ProtoMessage

func (*GetUserResponse) ProtoMessage()

func (*GetUserResponse) ProtoReflect

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

func (*GetUserResponse) Reset

func (x *GetUserResponse) Reset()

func (*GetUserResponse) String

func (x *GetUserResponse) String() string

type GetUserSecretRequest

type GetUserSecretRequest struct {

	// Types that are assignable to Query:
	//
	//	*GetUserSecretRequest_Id
	//	*GetUserSecretRequest_Email
	Query isGetUserSecretRequest_Query `protobuf_oneof:"query"`
	// contains filtered or unexported fields
}

func (*GetUserSecretRequest) Descriptor deprecated

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

Deprecated: Use GetUserSecretRequest.ProtoReflect.Descriptor instead.

func (*GetUserSecretRequest) GetEmail

func (x *GetUserSecretRequest) GetEmail() string

func (*GetUserSecretRequest) GetId

func (x *GetUserSecretRequest) GetId() string

func (*GetUserSecretRequest) GetQuery

func (m *GetUserSecretRequest) GetQuery() isGetUserSecretRequest_Query

func (*GetUserSecretRequest) ProtoMessage

func (*GetUserSecretRequest) ProtoMessage()

func (*GetUserSecretRequest) ProtoReflect

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

func (*GetUserSecretRequest) Reset

func (x *GetUserSecretRequest) Reset()

func (*GetUserSecretRequest) String

func (x *GetUserSecretRequest) String() string

type GetUserSecretRequest_Email

type GetUserSecretRequest_Email struct {
	Email string `protobuf:"bytes,3,opt,name=email,proto3,oneof"`
}

type GetUserSecretRequest_Id

type GetUserSecretRequest_Id struct {
	Id string `protobuf:"bytes,2,opt,name=id,proto3,oneof"`
}

type GetUserSecretResponse

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

func (*GetUserSecretResponse) Descriptor deprecated

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

Deprecated: Use GetUserSecretResponse.ProtoReflect.Descriptor instead.

func (*GetUserSecretResponse) GetUser

func (x *GetUserSecretResponse) GetUser() *User

func (*GetUserSecretResponse) ProtoMessage

func (*GetUserSecretResponse) ProtoMessage()

func (*GetUserSecretResponse) ProtoReflect

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

func (*GetUserSecretResponse) Reset

func (x *GetUserSecretResponse) Reset()

func (*GetUserSecretResponse) String

func (x *GetUserSecretResponse) String() string

type GetUsersRequest

type GetUsersRequest struct {
	Offset string `protobuf:"bytes,1,opt,name=offset,proto3" json:"offset,omitempty"`
	Limit  string `protobuf:"bytes,2,opt,name=limit,proto3" json:"limit,omitempty"`
	Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUsersRequest) Descriptor deprecated

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

Deprecated: Use GetUsersRequest.ProtoReflect.Descriptor instead.

func (*GetUsersRequest) GetFilter

func (x *GetUsersRequest) GetFilter() string

func (*GetUsersRequest) GetLimit

func (x *GetUsersRequest) GetLimit() string

func (*GetUsersRequest) GetOffset

func (x *GetUsersRequest) GetOffset() string

func (*GetUsersRequest) ProtoMessage

func (*GetUsersRequest) ProtoMessage()

func (*GetUsersRequest) ProtoReflect

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

func (*GetUsersRequest) Reset

func (x *GetUsersRequest) Reset()

func (*GetUsersRequest) String

func (x *GetUsersRequest) String() string

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) Create

func (UnimplementedUserServiceServer) Delete

func (UnimplementedUserServiceServer) Get

func (UnimplementedUserServiceServer) GetSecret

func (UnimplementedUserServiceServer) GetStream

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 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        string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name      string                 `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Email     string                 `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"`
	Password  string                 `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetCreatedAt

func (x *User) GetCreatedAt() *timestamppb.Timestamp

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetId

func (x *User) GetId() string

func (*User) GetName

func (x *User) GetName() string

func (*User) GetPassword

func (x *User) GetPassword() string

func (*User) GetUpdatedAt

func (x *User) GetUpdatedAt() *timestamppb.Timestamp

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 {
	Create(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error)
	Update(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	Delete(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	Get(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
	// Requires mTLS client cert to be provided.
	// Returns all user info including hashed password.
	GetSecret(ctx context.Context, in *GetUserSecretRequest, opts ...grpc.CallOption) (*GetUserSecretResponse, error)
	GetStream(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (UserService_GetStreamClient, 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 {
	Create(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
	Update(context.Context, *UpdateUserRequest) (*emptypb.Empty, error)
	Delete(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
	Get(context.Context, *GetUserRequest) (*GetUserResponse, error)
	// Requires mTLS client cert to be provided.
	// Returns all user info including hashed password.
	GetSecret(context.Context, *GetUserSecretRequest) (*GetUserSecretResponse, error)
	GetStream(*GetUsersRequest, UserService_GetStreamServer) error
	// contains filtered or unexported methods
}

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

type UserService_GetStreamClient

type UserService_GetStreamClient interface {
	Recv() (*User, error)
	grpc.ClientStream
}

type UserService_GetStreamServer

type UserService_GetStreamServer interface {
	Send(*User) error
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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