proto

package
v0.0.0-...-864a334 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Auth_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gok.Auth",
	HandlerType: (*AuthServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SignIn",
			Handler:    _Auth_SignIn_Handler,
		},
		{
			MethodName: "Login",
			Handler:    _Auth_Login_Handler,
		},
		{
			MethodName: "GetUser",
			Handler:    _Auth_GetUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/auth.proto",
}

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

View Source
var File_proto_auth_proto protoreflect.FileDescriptor
View Source
var File_proto_storage_proto protoreflect.FileDescriptor
View Source
var Storage_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gok.Storage",
	HandlerType: (*StorageServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "InitBranch",
			Handler:    _Storage_InitBranch_Handler,
		},
		{
			MethodName: "Push",
			Handler:    _Storage_Push_Handler,
		},
		{
			MethodName: "Pull",
			Handler:    _Storage_Pull_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/storage.proto",
}

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

Functions

func RegisterAuthServer

func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)

func RegisterStorageServer

func RegisterStorageServer(s grpc.ServiceRegistrar, srv StorageServer)

Types

type AuthClient

type AuthClient interface {
	SignIn(ctx context.Context, in *SignInRequest, opts ...grpc.CallOption) (*SignInResponse, error)
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
	// Internal methods for cross-service communication.
	GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
}

AuthClient is the client API for Auth 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 NewAuthClient

func NewAuthClient(cc grpc.ClientConnInterface) AuthClient

type AuthServer

type AuthServer interface {
	SignIn(context.Context, *SignInRequest) (*SignInResponse, error)
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
	// Internal methods for cross-service communication.
	GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
	// contains filtered or unexported methods
}

AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility

type Branch

type Branch struct {
	Id   uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Head uint64 `protobuf:"varint,3,opt,name=head,proto3" json:"head,omitempty"`
	// contains filtered or unexported fields
}

func (*Branch) Descriptor deprecated

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

Deprecated: Use Branch.ProtoReflect.Descriptor instead.

func (*Branch) GetHead

func (x *Branch) GetHead() uint64

func (*Branch) GetId

func (x *Branch) GetId() uint64

func (*Branch) GetName

func (x *Branch) GetName() string

func (*Branch) ProtoMessage

func (*Branch) ProtoMessage()

func (*Branch) ProtoReflect

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

func (*Branch) Reset

func (x *Branch) Reset()

func (*Branch) String

func (x *Branch) String() string

type Card

type Card struct {
	Number  uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
	Code    uint64 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
	Expired string `protobuf:"bytes,3,opt,name=expired,proto3" json:"expired,omitempty"`
	Owner   string `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"`
	// contains filtered or unexported fields
}

func (*Card) Descriptor deprecated

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

Deprecated: Use Card.ProtoReflect.Descriptor instead.

func (*Card) GetCode

func (x *Card) GetCode() uint64

func (*Card) GetExpired

func (x *Card) GetExpired() string

func (*Card) GetNumber

func (x *Card) GetNumber() uint64

func (*Card) GetOwner

func (x *Card) GetOwner() string

func (*Card) ProtoMessage

func (*Card) ProtoMessage()

func (*Card) ProtoReflect

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

func (*Card) Reset

func (x *Card) Reset()

func (*Card) String

func (x *Card) String() string

type File

type File struct {
	File []byte `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"`
	// contains filtered or unexported fields
}

func (*File) Descriptor deprecated

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

Deprecated: Use File.ProtoReflect.Descriptor instead.

func (*File) GetFile

func (x *File) GetFile() []byte

func (*File) ProtoMessage

func (*File) ProtoMessage()

func (*File) ProtoReflect

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

func (*File) Reset

func (x *File) Reset()

func (*File) String

func (x *File) String() string

type GetUserRequest

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

func (*GetUserRequest) Descriptor deprecated

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

Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.

func (*GetUserRequest) GetToken

func (x *GetUserRequest) GetToken() 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 InitBranchResponse

type InitBranchResponse struct {
	Branch *Branch `protobuf:"bytes,1,opt,name=branch,proto3" json:"branch,omitempty"`
	Error  string  `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*InitBranchResponse) Descriptor deprecated

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

Deprecated: Use InitBranchResponse.ProtoReflect.Descriptor instead.

func (*InitBranchResponse) GetBranch

func (x *InitBranchResponse) GetBranch() *Branch

func (*InitBranchResponse) GetError

func (x *InitBranchResponse) GetError() string

func (*InitBranchResponse) ProtoMessage

func (*InitBranchResponse) ProtoMessage()

func (*InitBranchResponse) ProtoReflect

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

func (*InitBranchResponse) Reset

func (x *InitBranchResponse) Reset()

func (*InitBranchResponse) String

func (x *InitBranchResponse) String() string

type LoginRequest

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

func (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetUser

func (x *LoginRequest) GetUser() *UserForAdd

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

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

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

type LoginResponse

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

func (*LoginResponse) Descriptor deprecated

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

Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.

func (*LoginResponse) GetUser

func (x *LoginResponse) GetUser() *SignedUser

func (*LoginResponse) ProtoMessage

func (*LoginResponse) ProtoMessage()

func (*LoginResponse) ProtoReflect

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

func (*LoginResponse) Reset

func (x *LoginResponse) Reset()

func (*LoginResponse) String

func (x *LoginResponse) String() string

type Pass

type Pass struct {
	Login    string `protobuf:"bytes,1,opt,name=login,proto3" json:"login,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*Pass) Descriptor deprecated

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

Deprecated: Use Pass.ProtoReflect.Descriptor instead.

func (*Pass) GetLogin

func (x *Pass) GetLogin() string

func (*Pass) GetPassword

func (x *Pass) GetPassword() string

func (*Pass) ProtoMessage

func (*Pass) ProtoMessage()

func (*Pass) ProtoReflect

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

func (*Pass) Reset

func (x *Pass) Reset()

func (*Pass) String

func (x *Pass) String() string

type PullRequest

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

func (*PullRequest) Descriptor deprecated

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

Deprecated: Use PullRequest.ProtoReflect.Descriptor instead.

func (*PullRequest) GetBranch

func (x *PullRequest) GetBranch() *Branch

func (*PullRequest) ProtoMessage

func (*PullRequest) ProtoMessage()

func (*PullRequest) ProtoReflect

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

func (*PullRequest) Reset

func (x *PullRequest) Reset()

func (*PullRequest) String

func (x *PullRequest) String() string

type PullResponse

type PullResponse struct {
	Branch  *Branch   `protobuf:"bytes,1,opt,name=branch,proto3" json:"branch,omitempty"`
	Records []*Record `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"`
	// contains filtered or unexported fields
}

func (*PullResponse) Descriptor deprecated

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

Deprecated: Use PullResponse.ProtoReflect.Descriptor instead.

func (*PullResponse) GetBranch

func (x *PullResponse) GetBranch() *Branch

func (*PullResponse) GetRecords

func (x *PullResponse) GetRecords() []*Record

func (*PullResponse) ProtoMessage

func (*PullResponse) ProtoMessage()

func (*PullResponse) ProtoReflect

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

func (*PullResponse) Reset

func (x *PullResponse) Reset()

func (*PullResponse) String

func (x *PullResponse) String() string

type PushRequest

type PushRequest struct {
	Branch  *Branch   `protobuf:"bytes,1,opt,name=branch,proto3" json:"branch,omitempty"`
	Records []*Record `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"`
	// contains filtered or unexported fields
}

func (*PushRequest) Descriptor deprecated

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

Deprecated: Use PushRequest.ProtoReflect.Descriptor instead.

func (*PushRequest) GetBranch

func (x *PushRequest) GetBranch() *Branch

func (*PushRequest) GetRecords

func (x *PushRequest) GetRecords() []*Record

func (*PushRequest) ProtoMessage

func (*PushRequest) ProtoMessage()

func (*PushRequest) ProtoReflect

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

func (*PushRequest) Reset

func (x *PushRequest) Reset()

func (*PushRequest) String

func (x *PushRequest) String() string

type PushResponse

type PushResponse struct {
	Branch *Branch `protobuf:"bytes,1,opt,name=branch,proto3" json:"branch,omitempty"`
	Error  string  `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*PushResponse) Descriptor deprecated

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

Deprecated: Use PushResponse.ProtoReflect.Descriptor instead.

func (*PushResponse) GetBranch

func (x *PushResponse) GetBranch() *Branch

func (*PushResponse) GetError

func (x *PushResponse) GetError() string

func (*PushResponse) ProtoMessage

func (*PushResponse) ProtoMessage()

func (*PushResponse) ProtoReflect

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

func (*PushResponse) Reset

func (x *PushResponse) Reset()

func (*PushResponse) String

func (x *PushResponse) String() string

type Record

type Record struct {
	Id          string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Head        uint64                 `protobuf:"varint,2,opt,name=head,proto3" json:"head,omitempty"`
	BranchID    uint64                 `protobuf:"varint,3,opt,name=branchID,proto3" json:"branchID,omitempty"`
	Description string                 `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	UpdatedAt   *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
	Type        string                 `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"`
	Text        *Text                  `protobuf:"bytes,7,opt,name=text,proto3" json:"text,omitempty"`
	Pass        *Pass                  `protobuf:"bytes,8,opt,name=pass,proto3" json:"pass,omitempty"`
	Card        *Card                  `protobuf:"bytes,9,opt,name=card,proto3" json:"card,omitempty"`
	File        *File                  `protobuf:"bytes,10,opt,name=file,proto3" json:"file,omitempty"`
	// contains filtered or unexported fields
}

func (*Record) Descriptor deprecated

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

Deprecated: Use Record.ProtoReflect.Descriptor instead.

func (*Record) GetBranchID

func (x *Record) GetBranchID() uint64

func (*Record) GetCard

func (x *Record) GetCard() *Card

func (*Record) GetDescription

func (x *Record) GetDescription() string

func (*Record) GetFile

func (x *Record) GetFile() *File

func (*Record) GetHead

func (x *Record) GetHead() uint64

func (*Record) GetId

func (x *Record) GetId() string

func (*Record) GetPass

func (x *Record) GetPass() *Pass

func (*Record) GetText

func (x *Record) GetText() *Text

func (*Record) GetType

func (x *Record) GetType() string

func (*Record) GetUpdatedAt

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

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) ProtoReflect

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

func (*Record) Reset

func (x *Record) Reset()

func (*Record) String

func (x *Record) String() string

type SignInRequest

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

func (*SignInRequest) Descriptor deprecated

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

Deprecated: Use SignInRequest.ProtoReflect.Descriptor instead.

func (*SignInRequest) GetUser

func (x *SignInRequest) GetUser() *UserForAdd

func (*SignInRequest) ProtoMessage

func (*SignInRequest) ProtoMessage()

func (*SignInRequest) ProtoReflect

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

func (*SignInRequest) Reset

func (x *SignInRequest) Reset()

func (*SignInRequest) String

func (x *SignInRequest) String() string

type SignInResponse

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

func (*SignInResponse) Descriptor deprecated

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

Deprecated: Use SignInResponse.ProtoReflect.Descriptor instead.

func (*SignInResponse) GetUser

func (x *SignInResponse) GetUser() *SignedUser

func (*SignInResponse) ProtoMessage

func (*SignInResponse) ProtoMessage()

func (*SignInResponse) ProtoReflect

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

func (*SignInResponse) Reset

func (x *SignInResponse) Reset()

func (*SignInResponse) String

func (x *SignInResponse) String() string

type SignedUser

type SignedUser struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	Key   string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*SignedUser) Descriptor deprecated

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

Deprecated: Use SignedUser.ProtoReflect.Descriptor instead.

func (*SignedUser) GetKey

func (x *SignedUser) GetKey() string

func (*SignedUser) GetToken

func (x *SignedUser) GetToken() string

func (*SignedUser) ProtoMessage

func (*SignedUser) ProtoMessage()

func (*SignedUser) ProtoReflect

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

func (*SignedUser) Reset

func (x *SignedUser) Reset()

func (*SignedUser) String

func (x *SignedUser) String() string

type StorageClient

type StorageClient interface {
	InitBranch(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*InitBranchResponse, error)
	Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*PushResponse, error)
	Pull(ctx context.Context, in *PullRequest, opts ...grpc.CallOption) (*PullResponse, error)
}

StorageClient is the client API for Storage 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 NewStorageClient

func NewStorageClient(cc grpc.ClientConnInterface) StorageClient

type StorageServer

type StorageServer interface {
	InitBranch(context.Context, *emptypb.Empty) (*InitBranchResponse, error)
	Push(context.Context, *PushRequest) (*PushResponse, error)
	Pull(context.Context, *PullRequest) (*PullResponse, error)
	// contains filtered or unexported methods
}

StorageServer is the server API for Storage service. All implementations must embed UnimplementedStorageServer for forward compatibility

type Text

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

func (*Text) Descriptor deprecated

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

Deprecated: Use Text.ProtoReflect.Descriptor instead.

func (*Text) GetText

func (x *Text) GetText() string

func (*Text) ProtoMessage

func (*Text) ProtoMessage()

func (*Text) ProtoReflect

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

func (*Text) Reset

func (x *Text) Reset()

func (*Text) String

func (x *Text) String() string

type UnimplementedAuthServer

type UnimplementedAuthServer struct {
}

UnimplementedAuthServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthServer) GetUser

func (UnimplementedAuthServer) Login

func (UnimplementedAuthServer) SignIn

type UnimplementedStorageServer

type UnimplementedStorageServer struct {
}

UnimplementedStorageServer must be embedded to have forward compatible implementations.

func (UnimplementedStorageServer) InitBranch

func (UnimplementedStorageServer) Pull

func (UnimplementedStorageServer) Push

type UnsafeAuthServer

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

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

type UnsafeStorageServer

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

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

type User

type User struct {
	ID    int32  `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Login string `protobuf:"bytes,2,opt,name=login,proto3" json:"login,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetID

func (x *User) GetID() int32

func (*User) GetLogin

func (x *User) GetLogin() 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 UserForAdd

type UserForAdd struct {
	Login string `protobuf:"bytes,2,opt,name=login,proto3" json:"login,omitempty"`
	// contains filtered or unexported fields
}

func (*UserForAdd) Descriptor deprecated

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

Deprecated: Use UserForAdd.ProtoReflect.Descriptor instead.

func (*UserForAdd) GetLogin

func (x *UserForAdd) GetLogin() string

func (*UserForAdd) ProtoMessage

func (*UserForAdd) ProtoMessage()

func (*UserForAdd) ProtoReflect

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

func (*UserForAdd) Reset

func (x *UserForAdd) Reset()

func (*UserForAdd) String

func (x *UserForAdd) String() string

Jump to

Keyboard shortcuts

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