proto

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LabelType_name = map[int32]string{
		0: "FOLDER",
		1: "LABEL",
	}
	LabelType_value = map[string]int32{
		"FOLDER": 0,
		"LABEL":  1,
	}
)

Enum value maps for LabelType.

View Source
var File_server_proto protoreflect.FileDescriptor
View Source
var Server_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Server",
	HandlerType: (*ServerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetInfo",
			Handler:    _Server_GetInfo_Handler,
		},
		{
			MethodName: "CreateUser",
			Handler:    _Server_CreateUser_Handler,
		},
		{
			MethodName: "RevokeUser",
			Handler:    _Server_RevokeUser_Handler,
		},
		{
			MethodName: "CreateAddress",
			Handler:    _Server_CreateAddress_Handler,
		},
		{
			MethodName: "RemoveAddress",
			Handler:    _Server_RemoveAddress_Handler,
		},
		{
			MethodName: "CreateLabel",
			Handler:    _Server_CreateLabel_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "server.proto",
}

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

Functions

func RegisterServerServer

func RegisterServerServer(s grpc.ServiceRegistrar, srv ServerServer)

Types

type CreateAddressRequest

type CreateAddressRequest struct {
	UserID   string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
	Email    string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	Password []byte `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateAddressRequest) Descriptor deprecated

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

Deprecated: Use CreateAddressRequest.ProtoReflect.Descriptor instead.

func (*CreateAddressRequest) GetEmail

func (x *CreateAddressRequest) GetEmail() string

func (*CreateAddressRequest) GetPassword

func (x *CreateAddressRequest) GetPassword() []byte

func (*CreateAddressRequest) GetUserID

func (x *CreateAddressRequest) GetUserID() string

func (*CreateAddressRequest) ProtoMessage

func (*CreateAddressRequest) ProtoMessage()

func (*CreateAddressRequest) ProtoReflect

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

func (*CreateAddressRequest) Reset

func (x *CreateAddressRequest) Reset()

func (*CreateAddressRequest) String

func (x *CreateAddressRequest) String() string

type CreateAddressResponse

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

func (*CreateAddressResponse) Descriptor deprecated

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

Deprecated: Use CreateAddressResponse.ProtoReflect.Descriptor instead.

func (*CreateAddressResponse) GetAddrID

func (x *CreateAddressResponse) GetAddrID() string

func (*CreateAddressResponse) ProtoMessage

func (*CreateAddressResponse) ProtoMessage()

func (*CreateAddressResponse) ProtoReflect

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

func (*CreateAddressResponse) Reset

func (x *CreateAddressResponse) Reset()

func (*CreateAddressResponse) String

func (x *CreateAddressResponse) String() string

type CreateLabelRequest

type CreateLabelRequest struct {
	UserID   string    `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
	Name     string    `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	ParentID string    `protobuf:"bytes,3,opt,name=parentID,proto3" json:"parentID,omitempty"`
	Type     LabelType `protobuf:"varint,4,opt,name=type,proto3,enum=proto.LabelType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateLabelRequest) Descriptor deprecated

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

Deprecated: Use CreateLabelRequest.ProtoReflect.Descriptor instead.

func (*CreateLabelRequest) GetName

func (x *CreateLabelRequest) GetName() string

func (*CreateLabelRequest) GetParentID

func (x *CreateLabelRequest) GetParentID() string

func (*CreateLabelRequest) GetType

func (x *CreateLabelRequest) GetType() LabelType

func (*CreateLabelRequest) GetUserID

func (x *CreateLabelRequest) GetUserID() string

func (*CreateLabelRequest) ProtoMessage

func (*CreateLabelRequest) ProtoMessage()

func (*CreateLabelRequest) ProtoReflect

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

func (*CreateLabelRequest) Reset

func (x *CreateLabelRequest) Reset()

func (*CreateLabelRequest) String

func (x *CreateLabelRequest) String() string

type CreateLabelResponse

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

func (*CreateLabelResponse) Descriptor deprecated

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

Deprecated: Use CreateLabelResponse.ProtoReflect.Descriptor instead.

func (*CreateLabelResponse) GetLabelID

func (x *CreateLabelResponse) GetLabelID() string

func (*CreateLabelResponse) ProtoMessage

func (*CreateLabelResponse) ProtoMessage()

func (*CreateLabelResponse) ProtoReflect

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

func (*CreateLabelResponse) Reset

func (x *CreateLabelResponse) Reset()

func (*CreateLabelResponse) String

func (x *CreateLabelResponse) String() string

type CreateUserRequest

type CreateUserRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password []byte `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) GetPassword

func (x *CreateUserRequest) GetPassword() []byte

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 {
	UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
	AddrID string `protobuf:"bytes,2,opt,name=addrID,proto3" json:"addrID,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUserResponse) Descriptor deprecated

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

Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead.

func (*CreateUserResponse) GetAddrID

func (x *CreateUserResponse) GetAddrID() string

func (*CreateUserResponse) GetUserID

func (x *CreateUserResponse) GetUserID() 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 GetInfoRequest

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

func (*GetInfoRequest) Descriptor deprecated

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

Deprecated: Use GetInfoRequest.ProtoReflect.Descriptor instead.

func (*GetInfoRequest) ProtoMessage

func (*GetInfoRequest) ProtoMessage()

func (*GetInfoRequest) ProtoReflect

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

func (*GetInfoRequest) Reset

func (x *GetInfoRequest) Reset()

func (*GetInfoRequest) String

func (x *GetInfoRequest) String() string

type GetInfoResponse

type GetInfoResponse struct {
	HostURL  string `protobuf:"bytes,1,opt,name=hostURL,proto3" json:"hostURL,omitempty"`
	ProxyURL string `protobuf:"bytes,2,opt,name=proxyURL,proto3" json:"proxyURL,omitempty"`
	// contains filtered or unexported fields
}

func (*GetInfoResponse) Descriptor deprecated

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

Deprecated: Use GetInfoResponse.ProtoReflect.Descriptor instead.

func (*GetInfoResponse) GetHostURL

func (x *GetInfoResponse) GetHostURL() string

func (*GetInfoResponse) GetProxyURL

func (x *GetInfoResponse) GetProxyURL() string

func (*GetInfoResponse) ProtoMessage

func (*GetInfoResponse) ProtoMessage()

func (*GetInfoResponse) ProtoReflect

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

func (*GetInfoResponse) Reset

func (x *GetInfoResponse) Reset()

func (*GetInfoResponse) String

func (x *GetInfoResponse) String() string

type LabelType

type LabelType int32
const (
	LabelType_FOLDER LabelType = 0
	LabelType_LABEL  LabelType = 1
)

func (LabelType) Descriptor

func (LabelType) Descriptor() protoreflect.EnumDescriptor

func (LabelType) Enum

func (x LabelType) Enum() *LabelType

func (LabelType) EnumDescriptor deprecated

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

Deprecated: Use LabelType.Descriptor instead.

func (LabelType) Number

func (x LabelType) Number() protoreflect.EnumNumber

func (LabelType) String

func (x LabelType) String() string

func (LabelType) Type

type RemoveAddressRequest

type RemoveAddressRequest struct {
	UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
	AddrID string `protobuf:"bytes,2,opt,name=addrID,proto3" json:"addrID,omitempty"`
	// contains filtered or unexported fields
}

func (*RemoveAddressRequest) Descriptor deprecated

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

Deprecated: Use RemoveAddressRequest.ProtoReflect.Descriptor instead.

func (*RemoveAddressRequest) GetAddrID

func (x *RemoveAddressRequest) GetAddrID() string

func (*RemoveAddressRequest) GetUserID

func (x *RemoveAddressRequest) GetUserID() string

func (*RemoveAddressRequest) ProtoMessage

func (*RemoveAddressRequest) ProtoMessage()

func (*RemoveAddressRequest) ProtoReflect

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

func (*RemoveAddressRequest) Reset

func (x *RemoveAddressRequest) Reset()

func (*RemoveAddressRequest) String

func (x *RemoveAddressRequest) String() string

type RemoveAddressResponse

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

func (*RemoveAddressResponse) Descriptor deprecated

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

Deprecated: Use RemoveAddressResponse.ProtoReflect.Descriptor instead.

func (*RemoveAddressResponse) ProtoMessage

func (*RemoveAddressResponse) ProtoMessage()

func (*RemoveAddressResponse) ProtoReflect

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

func (*RemoveAddressResponse) Reset

func (x *RemoveAddressResponse) Reset()

func (*RemoveAddressResponse) String

func (x *RemoveAddressResponse) String() string

type RevokeUserRequest

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

func (*RevokeUserRequest) Descriptor deprecated

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

Deprecated: Use RevokeUserRequest.ProtoReflect.Descriptor instead.

func (*RevokeUserRequest) GetUserID

func (x *RevokeUserRequest) GetUserID() string

func (*RevokeUserRequest) ProtoMessage

func (*RevokeUserRequest) ProtoMessage()

func (*RevokeUserRequest) ProtoReflect

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

func (*RevokeUserRequest) Reset

func (x *RevokeUserRequest) Reset()

func (*RevokeUserRequest) String

func (x *RevokeUserRequest) String() string

type RevokeUserResponse

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

func (*RevokeUserResponse) Descriptor deprecated

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

Deprecated: Use RevokeUserResponse.ProtoReflect.Descriptor instead.

func (*RevokeUserResponse) ProtoMessage

func (*RevokeUserResponse) ProtoMessage()

func (*RevokeUserResponse) ProtoReflect

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

func (*RevokeUserResponse) Reset

func (x *RevokeUserResponse) Reset()

func (*RevokeUserResponse) String

func (x *RevokeUserResponse) String() string

type ServerClient

type ServerClient interface {
	GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error)
	CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error)
	RevokeUser(ctx context.Context, in *RevokeUserRequest, opts ...grpc.CallOption) (*RevokeUserResponse, error)
	CreateAddress(ctx context.Context, in *CreateAddressRequest, opts ...grpc.CallOption) (*CreateAddressResponse, error)
	RemoveAddress(ctx context.Context, in *RemoveAddressRequest, opts ...grpc.CallOption) (*RemoveAddressResponse, error)
	CreateLabel(ctx context.Context, in *CreateLabelRequest, opts ...grpc.CallOption) (*CreateLabelResponse, error)
}

ServerClient is the client API for Server 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 NewServerClient

func NewServerClient(cc grpc.ClientConnInterface) ServerClient

type ServerServer

ServerServer is the server API for Server service. All implementations must embed UnimplementedServerServer for forward compatibility

type UnimplementedServerServer

type UnimplementedServerServer struct {
}

UnimplementedServerServer must be embedded to have forward compatible implementations.

func (UnimplementedServerServer) CreateAddress

func (UnimplementedServerServer) CreateLabel

func (UnimplementedServerServer) CreateUser

func (UnimplementedServerServer) GetInfo

func (UnimplementedServerServer) RemoveAddress

func (UnimplementedServerServer) RevokeUser

type UnsafeServerServer

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

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

Jump to

Keyboard shortcuts

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