profile

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StatusType_name = map[int32]string{
		0: "SUCCESS",
		1: "FAILED",
	}
	StatusType_value = map[string]int32{
		"SUCCESS": 0,
		"FAILED":  1,
	}
)

Enum value maps for StatusType.

View Source
var File_profile_profile_proto protoreflect.FileDescriptor
View Source
var Profile_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "profile.Profile",
	HandlerType: (*ProfileServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _Profile_Create_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _Profile_Get_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _Profile_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Profile_Delete_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "profile/profile.proto",
}

Profile_ServiceDesc is the grpc.ServiceDesc for Profile service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterProfileServer

func RegisterProfileServer(s grpc.ServiceRegistrar, srv ProfileServer)

Types

type DeleteRequest

type DeleteRequest struct {
	Id string `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 added in v0.2.0

func (x *DeleteRequest) GetId() string

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 {
	Status StatusType `protobuf:"varint,1,opt,name=status,proto3,enum=profile.StatusType" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) GetStatus

func (x *DeleteResponse) GetStatus() StatusType

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 GetRequest

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

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetId added in v0.2.0

func (x *GetRequest) GetId() string

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

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

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

type ProfileClient

type ProfileClient interface {
	Create(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*ProfileItem, error)
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*ProfileItem, error)
	Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*ProfileItem, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
}

ProfileClient is the client API for Profile 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 NewProfileClient

func NewProfileClient(cc grpc.ClientConnInterface) ProfileClient

type ProfileItem

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

func (*ProfileItem) Descriptor deprecated

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

Deprecated: Use ProfileItem.ProtoReflect.Descriptor instead.

func (*ProfileItem) GetEmail added in v0.0.2

func (x *ProfileItem) GetEmail() string

func (*ProfileItem) GetId added in v0.2.0

func (x *ProfileItem) GetId() string

func (*ProfileItem) ProtoMessage

func (*ProfileItem) ProtoMessage()

func (*ProfileItem) ProtoReflect

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

func (*ProfileItem) Reset

func (x *ProfileItem) Reset()

func (*ProfileItem) String

func (x *ProfileItem) String() string

type ProfileServer

type ProfileServer interface {
	Create(context.Context, *RegisterRequest) (*ProfileItem, error)
	Get(context.Context, *GetRequest) (*ProfileItem, error)
	Update(context.Context, *UpdateRequest) (*ProfileItem, error)
	Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
	// contains filtered or unexported methods
}

ProfileServer is the server API for Profile service. All implementations must embed UnimplementedProfileServer for forward compatibility

type RegisterRequest

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

func (*RegisterRequest) Descriptor deprecated

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

Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.

func (*RegisterRequest) GetEmail added in v0.0.2

func (x *RegisterRequest) GetEmail() string

func (*RegisterRequest) ProtoMessage

func (*RegisterRequest) ProtoMessage()

func (*RegisterRequest) ProtoReflect

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

func (*RegisterRequest) Reset

func (x *RegisterRequest) Reset()

func (*RegisterRequest) String

func (x *RegisterRequest) String() string

type StatusType

type StatusType int32
const (
	StatusType_SUCCESS StatusType = 0
	StatusType_FAILED  StatusType = 1
)

func (StatusType) Descriptor

func (StatusType) Descriptor() protoreflect.EnumDescriptor

func (StatusType) Enum

func (x StatusType) Enum() *StatusType

func (StatusType) EnumDescriptor deprecated

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

Deprecated: Use StatusType.Descriptor instead.

func (StatusType) Number

func (x StatusType) Number() protoreflect.EnumNumber

func (StatusType) String

func (x StatusType) String() string

func (StatusType) Type

type UnimplementedProfileServer

type UnimplementedProfileServer struct {
}

UnimplementedProfileServer must be embedded to have forward compatible implementations.

func (UnimplementedProfileServer) Create

func (UnimplementedProfileServer) Delete

func (UnimplementedProfileServer) Get

func (UnimplementedProfileServer) Update

type UnsafeProfileServer

type UnsafeProfileServer interface {
	// contains filtered or unexported methods
}

UnsafeProfileServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProfileServer will result in compilation errors.

type UpdateRequest

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

func (*UpdateRequest) Descriptor deprecated

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

Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.

func (*UpdateRequest) GetId added in v0.2.0

func (x *UpdateRequest) GetId() string

func (*UpdateRequest) GetNewEmail added in v0.0.2

func (x *UpdateRequest) GetNewEmail() string

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

Jump to

Keyboard shortcuts

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