protobuf

package
v0.0.0-...-e03766a Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_src_infrastructure_grpc_proto_index_proto protoreflect.FileDescriptor
View Source
var UsersService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "protobuf.UsersService",
	HandlerType: (*UsersServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateUser",
			Handler:    _UsersService_CreateUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "src/infrastructure/grpc/proto/index.proto",
}

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

Functions

func RegisterUsersServiceServer

func RegisterUsersServiceServer(s grpc.ServiceRegistrar, srv UsersServiceServer)

Types

type CreateUserRequest

type CreateUserRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Email    string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUserRequest) Descriptor deprecated

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

Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.

func (*CreateUserRequest) GetEmail

func (x *CreateUserRequest) GetEmail() string

func (*CreateUserRequest) GetPassword

func (x *CreateUserRequest) GetPassword() string

func (*CreateUserRequest) GetUsername

func (x *CreateUserRequest) GetUsername() string

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 {
	Data  *User  `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUserResponse) Descriptor deprecated

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

Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead.

func (*CreateUserResponse) GetData

func (x *CreateUserResponse) GetData() *User

func (*CreateUserResponse) GetError

func (x *CreateUserResponse) GetError() *Error

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 Error

type Error struct {
	Type    string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Name    string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) GetName

func (x *Error) GetName() string

func (*Error) GetType

func (x *Error) GetType() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

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

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type UnimplementedUsersServiceServer

type UnimplementedUsersServiceServer struct {
}

UnimplementedUsersServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUsersServiceServer) CreateUser

type UnsafeUsersServiceServer

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

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

type User

type User struct {
	Id        string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Username  string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Email     string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	CreatedAt string `protobuf:"bytes,4,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
	UpdatedAt string `protobuf:"bytes,5,opt,name=updatedAt,proto3" json:"updatedAt,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() string

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetId

func (x *User) GetId() string

func (*User) GetUpdatedAt

func (x *User) GetUpdatedAt() 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 UsersServiceClient

type UsersServiceClient interface {
	CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error)
}

UsersServiceClient is the client API for UsersService 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 UsersServiceServer

type UsersServiceServer interface {
	CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
	// contains filtered or unexported methods
}

UsersServiceServer is the server API for UsersService service. All implementations must embed UnimplementedUsersServiceServer for forward compatibility

Jump to

Keyboard shortcuts

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