Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
- func RegisterSecretsServer(s grpc.ServiceRegistrar, srv SecretsServer)
- func RegisterUsersServer(s grpc.ServiceRegistrar, srv UsersServer)
- type AuthClient
- type AuthClientMock
- type AuthServer
- type Binary
- type Card
- func (*Card) Descriptor() ([]byte, []int)deprecated
- func (x *Card) GetCvv() int32
- func (x *Card) GetExpiration() string
- func (x *Card) GetHolder() string
- func (x *Card) GetNumber() string
- func (*Card) ProtoMessage()
- func (x *Card) ProtoReflect() protoreflect.Message
- func (x *Card) Reset()
- func (x *Card) String() string
- type CreateSecretRequest
- func (*CreateSecretRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateSecretRequest) GetData() []byte
- func (x *CreateSecretRequest) GetKind() DataKind
- func (x *CreateSecretRequest) GetMetadata() []byte
- func (x *CreateSecretRequest) GetName() string
- func (*CreateSecretRequest) ProtoMessage()
- func (x *CreateSecretRequest) ProtoReflect() protoreflect.Message
- func (x *CreateSecretRequest) Reset()
- func (x *CreateSecretRequest) String() string
- type CreateSecretResponse
- func (*CreateSecretResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateSecretResponse) GetId() string
- func (*CreateSecretResponse) ProtoMessage()
- func (x *CreateSecretResponse) ProtoReflect() protoreflect.Message
- func (x *CreateSecretResponse) Reset()
- func (x *CreateSecretResponse) String() string
- type Credentials
- func (*Credentials) Descriptor() ([]byte, []int)deprecated
- func (x *Credentials) GetLogin() string
- func (x *Credentials) GetPassword() string
- func (*Credentials) ProtoMessage()
- func (x *Credentials) ProtoReflect() protoreflect.Message
- func (x *Credentials) Reset()
- func (x *Credentials) String() string
- type DataKind
- type DeleteSecretRequest
- func (*DeleteSecretRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteSecretRequest) GetId() string
- func (*DeleteSecretRequest) ProtoMessage()
- func (x *DeleteSecretRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteSecretRequest) Reset()
- func (x *DeleteSecretRequest) String() string
- type DeleteSecretResponse
- type GetSecretRequest
- type GetSecretResponse
- func (*GetSecretResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetSecretResponse) GetData() []byte
- func (x *GetSecretResponse) GetSecret() *Secret
- func (*GetSecretResponse) ProtoMessage()
- func (x *GetSecretResponse) ProtoReflect() protoreflect.Message
- func (x *GetSecretResponse) Reset()
- func (x *GetSecretResponse) String() string
- type ListSecretsRequest
- type ListSecretsResponse
- func (*ListSecretsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListSecretsResponse) GetSecrets() []*Secret
- func (*ListSecretsResponse) ProtoMessage()
- func (x *ListSecretsResponse) ProtoReflect() protoreflect.Message
- func (x *ListSecretsResponse) Reset()
- func (x *ListSecretsResponse) String() string
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginRequest) GetSecurityKey() string
- func (x *LoginRequest) GetUsername() string
- func (*LoginRequest) ProtoMessage()
- func (x *LoginRequest) ProtoReflect() protoreflect.Message
- func (x *LoginRequest) Reset()
- func (x *LoginRequest) String() string
- type LoginResponse
- type RegisterUserRequest
- func (*RegisterUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterUserRequest) GetSecurityKey() string
- func (x *RegisterUserRequest) GetUsername() string
- func (*RegisterUserRequest) ProtoMessage()
- func (x *RegisterUserRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterUserRequest) Reset()
- func (x *RegisterUserRequest) String() string
- type RegisterUserResponse
- func (*RegisterUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterUserResponse) GetAccessToken() string
- func (*RegisterUserResponse) ProtoMessage()
- func (x *RegisterUserResponse) ProtoReflect() protoreflect.Message
- func (x *RegisterUserResponse) Reset()
- func (x *RegisterUserResponse) String() string
- type Secret
- func (*Secret) Descriptor() ([]byte, []int)deprecated
- func (x *Secret) GetId() string
- func (x *Secret) GetKind() DataKind
- func (x *Secret) GetMetadata() []byte
- func (x *Secret) GetName() string
- func (*Secret) ProtoMessage()
- func (x *Secret) ProtoReflect() protoreflect.Message
- func (x *Secret) Reset()
- func (x *Secret) String() string
- type SecretsClient
- type SecretsClientMock
- func (m *SecretsClientMock) Create(ctx context.Context, in *CreateSecretRequest, opts ...grpc.CallOption) (*CreateSecretResponse, error)
- func (m *SecretsClientMock) Delete(ctx context.Context, in *DeleteSecretRequest, opts ...grpc.CallOption) (*DeleteSecretResponse, error)
- func (m *SecretsClientMock) Get(ctx context.Context, in *GetSecretRequest, opts ...grpc.CallOption) (*GetSecretResponse, error)
- func (m *SecretsClientMock) List(ctx context.Context, in *ListSecretsRequest, opts ...grpc.CallOption) (*ListSecretsResponse, error)
- func (m *SecretsClientMock) Update(ctx context.Context, in *UpdateSecretRequest, opts ...grpc.CallOption) (*UpdateSecretResponse, error)
- type SecretsServer
- type Text
- type UnimplementedAuthServer
- type UnimplementedSecretsServer
- func (UnimplementedSecretsServer) Create(context.Context, *CreateSecretRequest) (*CreateSecretResponse, error)
- func (UnimplementedSecretsServer) Delete(context.Context, *DeleteSecretRequest) (*DeleteSecretResponse, error)
- func (UnimplementedSecretsServer) Get(context.Context, *GetSecretRequest) (*GetSecretResponse, error)
- func (UnimplementedSecretsServer) List(context.Context, *ListSecretsRequest) (*ListSecretsResponse, error)
- func (UnimplementedSecretsServer) Update(context.Context, *UpdateSecretRequest) (*UpdateSecretResponse, error)
- type UnimplementedUsersServer
- type UnsafeAuthServer
- type UnsafeSecretsServer
- type UnsafeUsersServer
- type UpdateSecretRequest
- func (*UpdateSecretRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateSecretRequest) GetData() []byte
- func (x *UpdateSecretRequest) GetId() string
- func (x *UpdateSecretRequest) GetMetadata() []byte
- func (x *UpdateSecretRequest) GetName() string
- func (x *UpdateSecretRequest) GetUpdateMask() *fieldmaskpb.FieldMask
- func (*UpdateSecretRequest) ProtoMessage()
- func (x *UpdateSecretRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateSecretRequest) Reset()
- func (x *UpdateSecretRequest) String() string
- type UpdateSecretResponse
- type UsersClient
- type UsersClientMock
- type UsersServer
Constants ¶
const ( Secrets_Create_FullMethodName = "/goph.keeper.v1.Secrets/Create" Secrets_List_FullMethodName = "/goph.keeper.v1.Secrets/List" Secrets_Get_FullMethodName = "/goph.keeper.v1.Secrets/Get" Secrets_Update_FullMethodName = "/goph.keeper.v1.Secrets/Update" Secrets_Delete_FullMethodName = "/goph.keeper.v1.Secrets/Delete" )
const (
Auth_Login_FullMethodName = "/goph.keeper.v1.Auth/Login"
)
const (
Users_Register_FullMethodName = "/goph.keeper.v1.Users/Register"
)
Variables ¶
var ( DataKind_name = map[int32]string{ 0: "BINARY", 1: "TEXT", 2: "CREDENTIALS", 3: "CARD", } DataKind_value = map[string]int32{ "BINARY": 0, "TEXT": 1, "CREDENTIALS": 2, "CARD": 3, } )
Enum value maps for DataKind.
var Auth_ServiceDesc = grpc.ServiceDesc{ ServiceName: "goph.keeper.v1.Auth", HandlerType: (*AuthServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Login", Handler: _Auth_Login_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "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)
var File_auth_proto protoreflect.FileDescriptor
var File_data_proto protoreflect.FileDescriptor
var File_secrets_proto protoreflect.FileDescriptor
var File_users_proto protoreflect.FileDescriptor
var Secrets_ServiceDesc = grpc.ServiceDesc{ ServiceName: "goph.keeper.v1.Secrets", HandlerType: (*SecretsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _Secrets_Create_Handler, }, { MethodName: "List", Handler: _Secrets_List_Handler, }, { MethodName: "Get", Handler: _Secrets_Get_Handler, }, { MethodName: "Update", Handler: _Secrets_Update_Handler, }, { MethodName: "Delete", Handler: _Secrets_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "secrets.proto", }
Secrets_ServiceDesc is the grpc.ServiceDesc for Secrets service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Users_ServiceDesc = grpc.ServiceDesc{ ServiceName: "goph.keeper.v1.Users", HandlerType: (*UsersServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _Users_Register_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "users.proto", }
Users_ServiceDesc is the grpc.ServiceDesc for Users 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 RegisterSecretsServer ¶
func RegisterSecretsServer(s grpc.ServiceRegistrar, srv SecretsServer)
func RegisterUsersServer ¶
func RegisterUsersServer(s grpc.ServiceRegistrar, srv UsersServer)
Types ¶
type AuthClient ¶
type AuthClient interface { // Authenticate a user. Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, 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 AuthClientMock ¶
func (*AuthClientMock) Login ¶
func (m *AuthClientMock) Login( ctx context.Context, in *LoginRequest, opts ...grpc.CallOption, ) (*LoginResponse, error)
type AuthServer ¶
type AuthServer interface { // Authenticate a user. Login(context.Context, *LoginRequest) (*LoginResponse, error) // contains filtered or unexported methods }
AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility
type Binary ¶
type Binary struct { // Binary data, limited to 4Kb. Binary []byte `protobuf:"bytes,1,opt,name=binary,proto3" json:"binary,omitempty"` // contains filtered or unexported fields }
Arbitrary binary data.
func (*Binary) Descriptor
deprecated
func (*Binary) ProtoMessage ¶
func (*Binary) ProtoMessage()
func (*Binary) ProtoReflect ¶
func (x *Binary) ProtoReflect() protoreflect.Message
type Card ¶
type Card struct { // Card number. Number string `protobuf:"bytes,1,opt,name=number,proto3" json:"number,omitempty"` // Expiration date. Expiration string `protobuf:"bytes,2,opt,name=expiration,proto3" json:"expiration,omitempty"` // Card holder name. Holder string `protobuf:"bytes,3,opt,name=holder,proto3" json:"holder,omitempty"` // Card verification value. Cvv int32 `protobuf:"varint,4,opt,name=cvv,proto3" json:"cvv,omitempty"` // contains filtered or unexported fields }
Bank card info.
func (*Card) Descriptor
deprecated
func (*Card) GetExpiration ¶
func (*Card) ProtoMessage ¶
func (*Card) ProtoMessage()
func (*Card) ProtoReflect ¶
func (x *Card) ProtoReflect() protoreflect.Message
type CreateSecretRequest ¶
type CreateSecretRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Name of a secret. Metadata []byte `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` // Arbitrary description data encrypted by client. Kind DataKind `protobuf:"varint,3,opt,name=kind,proto3,enum=goph.keeper.v1.DataKind" json:"kind,omitempty"` // Type of stored data. Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` // Actual secret data encrypted by client, see data.proto. // contains filtered or unexported fields }
func (*CreateSecretRequest) Descriptor
deprecated
func (*CreateSecretRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateSecretRequest.ProtoReflect.Descriptor instead.
func (*CreateSecretRequest) GetData ¶
func (x *CreateSecretRequest) GetData() []byte
func (*CreateSecretRequest) GetKind ¶
func (x *CreateSecretRequest) GetKind() DataKind
func (*CreateSecretRequest) GetMetadata ¶
func (x *CreateSecretRequest) GetMetadata() []byte
func (*CreateSecretRequest) GetName ¶
func (x *CreateSecretRequest) GetName() string
func (*CreateSecretRequest) ProtoMessage ¶
func (*CreateSecretRequest) ProtoMessage()
func (*CreateSecretRequest) ProtoReflect ¶
func (x *CreateSecretRequest) ProtoReflect() protoreflect.Message
func (*CreateSecretRequest) Reset ¶
func (x *CreateSecretRequest) Reset()
func (*CreateSecretRequest) String ¶
func (x *CreateSecretRequest) String() string
type CreateSecretResponse ¶
type CreateSecretResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // ID of a secret in UUIDv4 form. // contains filtered or unexported fields }
func (*CreateSecretResponse) Descriptor
deprecated
func (*CreateSecretResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateSecretResponse.ProtoReflect.Descriptor instead.
func (*CreateSecretResponse) GetId ¶
func (x *CreateSecretResponse) GetId() string
func (*CreateSecretResponse) ProtoMessage ¶
func (*CreateSecretResponse) ProtoMessage()
func (*CreateSecretResponse) ProtoReflect ¶
func (x *CreateSecretResponse) ProtoReflect() protoreflect.Message
func (*CreateSecretResponse) Reset ¶
func (x *CreateSecretResponse) Reset()
func (*CreateSecretResponse) String ¶
func (x *CreateSecretResponse) String() string
type Credentials ¶
type Credentials struct { // Login value. Login string `protobuf:"bytes,1,opt,name=login,proto3" json:"login,omitempty"` // Password value. Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
Authentication credentials.
func (*Credentials) Descriptor
deprecated
func (*Credentials) Descriptor() ([]byte, []int)
Deprecated: Use Credentials.ProtoReflect.Descriptor instead.
func (*Credentials) GetLogin ¶
func (x *Credentials) GetLogin() string
func (*Credentials) GetPassword ¶
func (x *Credentials) GetPassword() string
func (*Credentials) ProtoMessage ¶
func (*Credentials) ProtoMessage()
func (*Credentials) ProtoReflect ¶
func (x *Credentials) ProtoReflect() protoreflect.Message
func (*Credentials) Reset ¶
func (x *Credentials) Reset()
func (*Credentials) String ¶
func (x *Credentials) String() string
type DataKind ¶
type DataKind int32
Type of stored data.
func (DataKind) Descriptor ¶
func (DataKind) Descriptor() protoreflect.EnumDescriptor
func (DataKind) EnumDescriptor
deprecated
func (DataKind) Number ¶
func (x DataKind) Number() protoreflect.EnumNumber
func (DataKind) Type ¶
func (DataKind) Type() protoreflect.EnumType
type DeleteSecretRequest ¶
type DeleteSecretRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // ID of a secret in UUIDv4 form. // contains filtered or unexported fields }
func (*DeleteSecretRequest) Descriptor
deprecated
func (*DeleteSecretRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteSecretRequest.ProtoReflect.Descriptor instead.
func (*DeleteSecretRequest) GetId ¶
func (x *DeleteSecretRequest) GetId() string
func (*DeleteSecretRequest) ProtoMessage ¶
func (*DeleteSecretRequest) ProtoMessage()
func (*DeleteSecretRequest) ProtoReflect ¶
func (x *DeleteSecretRequest) ProtoReflect() protoreflect.Message
func (*DeleteSecretRequest) Reset ¶
func (x *DeleteSecretRequest) Reset()
func (*DeleteSecretRequest) String ¶
func (x *DeleteSecretRequest) String() string
type DeleteSecretResponse ¶
type DeleteSecretResponse struct {
// contains filtered or unexported fields
}
func (*DeleteSecretResponse) Descriptor
deprecated
func (*DeleteSecretResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteSecretResponse.ProtoReflect.Descriptor instead.
func (*DeleteSecretResponse) ProtoMessage ¶
func (*DeleteSecretResponse) ProtoMessage()
func (*DeleteSecretResponse) ProtoReflect ¶
func (x *DeleteSecretResponse) ProtoReflect() protoreflect.Message
func (*DeleteSecretResponse) Reset ¶
func (x *DeleteSecretResponse) Reset()
func (*DeleteSecretResponse) String ¶
func (x *DeleteSecretResponse) String() string
type GetSecretRequest ¶
type GetSecretRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // ID of a secret in UUIDv4 form. // contains filtered or unexported fields }
func (*GetSecretRequest) Descriptor
deprecated
func (*GetSecretRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetSecretRequest.ProtoReflect.Descriptor instead.
func (*GetSecretRequest) GetId ¶
func (x *GetSecretRequest) GetId() string
func (*GetSecretRequest) ProtoMessage ¶
func (*GetSecretRequest) ProtoMessage()
func (*GetSecretRequest) ProtoReflect ¶
func (x *GetSecretRequest) ProtoReflect() protoreflect.Message
func (*GetSecretRequest) Reset ¶
func (x *GetSecretRequest) Reset()
func (*GetSecretRequest) String ¶
func (x *GetSecretRequest) String() string
type GetSecretResponse ¶
type GetSecretResponse struct { Secret *Secret `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"` // Secret info. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // Actual encrypted secret data, see data.proto. // contains filtered or unexported fields }
func (*GetSecretResponse) Descriptor
deprecated
func (*GetSecretResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetSecretResponse.ProtoReflect.Descriptor instead.
func (*GetSecretResponse) GetData ¶
func (x *GetSecretResponse) GetData() []byte
func (*GetSecretResponse) GetSecret ¶
func (x *GetSecretResponse) GetSecret() *Secret
func (*GetSecretResponse) ProtoMessage ¶
func (*GetSecretResponse) ProtoMessage()
func (*GetSecretResponse) ProtoReflect ¶
func (x *GetSecretResponse) ProtoReflect() protoreflect.Message
func (*GetSecretResponse) Reset ¶
func (x *GetSecretResponse) Reset()
func (*GetSecretResponse) String ¶
func (x *GetSecretResponse) String() string
type ListSecretsRequest ¶
type ListSecretsRequest struct {
// contains filtered or unexported fields
}
func (*ListSecretsRequest) Descriptor
deprecated
func (*ListSecretsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListSecretsRequest.ProtoReflect.Descriptor instead.
func (*ListSecretsRequest) ProtoMessage ¶
func (*ListSecretsRequest) ProtoMessage()
func (*ListSecretsRequest) ProtoReflect ¶
func (x *ListSecretsRequest) ProtoReflect() protoreflect.Message
func (*ListSecretsRequest) Reset ¶
func (x *ListSecretsRequest) Reset()
func (*ListSecretsRequest) String ¶
func (x *ListSecretsRequest) String() string
type ListSecretsResponse ¶
type ListSecretsResponse struct { Secrets []*Secret `protobuf:"bytes,1,rep,name=secrets,proto3" json:"secrets,omitempty"` // List of secrets created by current user. // contains filtered or unexported fields }
func (*ListSecretsResponse) Descriptor
deprecated
func (*ListSecretsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListSecretsResponse.ProtoReflect.Descriptor instead.
func (*ListSecretsResponse) GetSecrets ¶
func (x *ListSecretsResponse) GetSecrets() []*Secret
func (*ListSecretsResponse) ProtoMessage ¶
func (*ListSecretsResponse) ProtoMessage()
func (*ListSecretsResponse) ProtoReflect ¶
func (x *ListSecretsResponse) ProtoReflect() protoreflect.Message
func (*ListSecretsResponse) Reset ¶
func (x *ListSecretsResponse) Reset()
func (*ListSecretsResponse) String ¶
func (x *ListSecretsResponse) String() string
type LoginRequest ¶
type LoginRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // Name of a user. SecurityKey string `protobuf:"bytes,2,opt,name=security_key,json=securityKey,proto3" json:"security_key,omitempty"` // Hashed encryption key generated by client. // contains filtered or unexported fields }
func (*LoginRequest) Descriptor
deprecated
func (*LoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
func (*LoginRequest) GetSecurityKey ¶
func (x *LoginRequest) GetSecurityKey() string
func (*LoginRequest) GetUsername ¶
func (x *LoginRequest) GetUsername() string
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 { AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` // JWT access token. // contains filtered or unexported fields }
func (*LoginResponse) Descriptor
deprecated
func (*LoginResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.
func (*LoginResponse) GetAccessToken ¶
func (x *LoginResponse) GetAccessToken() string
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 RegisterUserRequest ¶
type RegisterUserRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // Name of a user. SecurityKey string `protobuf:"bytes,2,opt,name=security_key,json=securityKey,proto3" json:"security_key,omitempty"` // Hashed encryption key generated by client. // contains filtered or unexported fields }
func (*RegisterUserRequest) Descriptor
deprecated
func (*RegisterUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterUserRequest.ProtoReflect.Descriptor instead.
func (*RegisterUserRequest) GetSecurityKey ¶
func (x *RegisterUserRequest) GetSecurityKey() string
func (*RegisterUserRequest) GetUsername ¶
func (x *RegisterUserRequest) GetUsername() string
func (*RegisterUserRequest) ProtoMessage ¶
func (*RegisterUserRequest) ProtoMessage()
func (*RegisterUserRequest) ProtoReflect ¶
func (x *RegisterUserRequest) ProtoReflect() protoreflect.Message
func (*RegisterUserRequest) Reset ¶
func (x *RegisterUserRequest) Reset()
func (*RegisterUserRequest) String ¶
func (x *RegisterUserRequest) String() string
type RegisterUserResponse ¶
type RegisterUserResponse struct { AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` // JWT access token. // contains filtered or unexported fields }
func (*RegisterUserResponse) Descriptor
deprecated
func (*RegisterUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterUserResponse.ProtoReflect.Descriptor instead.
func (*RegisterUserResponse) GetAccessToken ¶
func (x *RegisterUserResponse) GetAccessToken() string
func (*RegisterUserResponse) ProtoMessage ¶
func (*RegisterUserResponse) ProtoMessage()
func (*RegisterUserResponse) ProtoReflect ¶
func (x *RegisterUserResponse) ProtoReflect() protoreflect.Message
func (*RegisterUserResponse) Reset ¶
func (x *RegisterUserResponse) Reset()
func (*RegisterUserResponse) String ¶
func (x *RegisterUserResponse) String() string
type Secret ¶
type Secret struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // ID of a secret in UUIDv4 form. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Name of a secret. Kind DataKind `protobuf:"varint,3,opt,name=kind,proto3,enum=goph.keeper.v1.DataKind" json:"kind,omitempty"` // Type of stored data. Metadata []byte `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` // Arbitrary encrypted description (activation codes, bank names etc). // contains filtered or unexported fields }
func (*Secret) Descriptor
deprecated
func (*Secret) GetMetadata ¶
func (*Secret) ProtoMessage ¶
func (*Secret) ProtoMessage()
func (*Secret) ProtoReflect ¶
func (x *Secret) ProtoReflect() protoreflect.Message
type SecretsClient ¶
type SecretsClient interface { // Store new secret. Create(ctx context.Context, in *CreateSecretRequest, opts ...grpc.CallOption) (*CreateSecretResponse, error) // List brief secrets without data for the current user. List(ctx context.Context, in *ListSecretsRequest, opts ...grpc.CallOption) (*ListSecretsResponse, error) // Get a secret with data. Get(ctx context.Context, in *GetSecretRequest, opts ...grpc.CallOption) (*GetSecretResponse, error) // Change a secret and/or stored data. Update(ctx context.Context, in *UpdateSecretRequest, opts ...grpc.CallOption) (*UpdateSecretResponse, error) // Remove a secret. Delete(ctx context.Context, in *DeleteSecretRequest, opts ...grpc.CallOption) (*DeleteSecretResponse, error) }
SecretsClient is the client API for Secrets 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 NewSecretsClient ¶
func NewSecretsClient(cc grpc.ClientConnInterface) SecretsClient
type SecretsClientMock ¶
func (*SecretsClientMock) Create ¶
func (m *SecretsClientMock) Create( ctx context.Context, in *CreateSecretRequest, opts ...grpc.CallOption, ) (*CreateSecretResponse, error)
func (*SecretsClientMock) Delete ¶
func (m *SecretsClientMock) Delete( ctx context.Context, in *DeleteSecretRequest, opts ...grpc.CallOption, ) (*DeleteSecretResponse, error)
func (*SecretsClientMock) Get ¶
func (m *SecretsClientMock) Get( ctx context.Context, in *GetSecretRequest, opts ...grpc.CallOption, ) (*GetSecretResponse, error)
func (*SecretsClientMock) List ¶
func (m *SecretsClientMock) List( ctx context.Context, in *ListSecretsRequest, opts ...grpc.CallOption, ) (*ListSecretsResponse, error)
func (*SecretsClientMock) Update ¶
func (m *SecretsClientMock) Update( ctx context.Context, in *UpdateSecretRequest, opts ...grpc.CallOption, ) (*UpdateSecretResponse, error)
type SecretsServer ¶
type SecretsServer interface { // Store new secret. Create(context.Context, *CreateSecretRequest) (*CreateSecretResponse, error) // List brief secrets without data for the current user. List(context.Context, *ListSecretsRequest) (*ListSecretsResponse, error) // Get a secret with data. Get(context.Context, *GetSecretRequest) (*GetSecretResponse, error) // Change a secret and/or stored data. Update(context.Context, *UpdateSecretRequest) (*UpdateSecretResponse, error) // Remove a secret. Delete(context.Context, *DeleteSecretRequest) (*DeleteSecretResponse, error) // contains filtered or unexported methods }
SecretsServer is the server API for Secrets service. All implementations must embed UnimplementedSecretsServer for forward compatibility
type Text ¶
type Text struct { // Text data, limited to 4Kb. Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // contains filtered or unexported fields }
Arbitrary text data.
func (*Text) Descriptor
deprecated
func (*Text) ProtoMessage ¶
func (*Text) ProtoMessage()
func (*Text) ProtoReflect ¶
func (x *Text) ProtoReflect() protoreflect.Message
type UnimplementedAuthServer ¶
type UnimplementedAuthServer struct { }
UnimplementedAuthServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthServer) Login ¶
func (UnimplementedAuthServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
type UnimplementedSecretsServer ¶
type UnimplementedSecretsServer struct { }
UnimplementedSecretsServer must be embedded to have forward compatible implementations.
func (UnimplementedSecretsServer) Create ¶
func (UnimplementedSecretsServer) Create(context.Context, *CreateSecretRequest) (*CreateSecretResponse, error)
func (UnimplementedSecretsServer) Delete ¶
func (UnimplementedSecretsServer) Delete(context.Context, *DeleteSecretRequest) (*DeleteSecretResponse, error)
func (UnimplementedSecretsServer) Get ¶
func (UnimplementedSecretsServer) Get(context.Context, *GetSecretRequest) (*GetSecretResponse, error)
func (UnimplementedSecretsServer) List ¶
func (UnimplementedSecretsServer) List(context.Context, *ListSecretsRequest) (*ListSecretsResponse, error)
func (UnimplementedSecretsServer) Update ¶
func (UnimplementedSecretsServer) Update(context.Context, *UpdateSecretRequest) (*UpdateSecretResponse, error)
type UnimplementedUsersServer ¶
type UnimplementedUsersServer struct { }
UnimplementedUsersServer must be embedded to have forward compatible implementations.
func (UnimplementedUsersServer) Register ¶
func (UnimplementedUsersServer) Register(context.Context, *RegisterUserRequest) (*RegisterUserResponse, error)
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 UnsafeSecretsServer ¶
type UnsafeSecretsServer interface {
// contains filtered or unexported methods
}
UnsafeSecretsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SecretsServer will result in compilation errors.
type UnsafeUsersServer ¶
type UnsafeUsersServer interface {
// contains filtered or unexported methods
}
UnsafeUsersServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UsersServer will result in compilation errors.
type UpdateSecretRequest ¶
type UpdateSecretRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // ID of a secret in UUIDv4 form. UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` // Specifies what values should be changed. Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // Name of a secret. Metadata []byte `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` // Arbitrary description data encrypted by client. Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` // Actual secret data encrypted by client, see data.proto. // contains filtered or unexported fields }
func (*UpdateSecretRequest) Descriptor
deprecated
func (*UpdateSecretRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateSecretRequest.ProtoReflect.Descriptor instead.
func (*UpdateSecretRequest) GetData ¶
func (x *UpdateSecretRequest) GetData() []byte
func (*UpdateSecretRequest) GetId ¶
func (x *UpdateSecretRequest) GetId() string
func (*UpdateSecretRequest) GetMetadata ¶
func (x *UpdateSecretRequest) GetMetadata() []byte
func (*UpdateSecretRequest) GetName ¶
func (x *UpdateSecretRequest) GetName() string
func (*UpdateSecretRequest) GetUpdateMask ¶
func (x *UpdateSecretRequest) GetUpdateMask() *fieldmaskpb.FieldMask
func (*UpdateSecretRequest) ProtoMessage ¶
func (*UpdateSecretRequest) ProtoMessage()
func (*UpdateSecretRequest) ProtoReflect ¶
func (x *UpdateSecretRequest) ProtoReflect() protoreflect.Message
func (*UpdateSecretRequest) Reset ¶
func (x *UpdateSecretRequest) Reset()
func (*UpdateSecretRequest) String ¶
func (x *UpdateSecretRequest) String() string
type UpdateSecretResponse ¶
type UpdateSecretResponse struct {
// contains filtered or unexported fields
}
func (*UpdateSecretResponse) Descriptor
deprecated
func (*UpdateSecretResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateSecretResponse.ProtoReflect.Descriptor instead.
func (*UpdateSecretResponse) ProtoMessage ¶
func (*UpdateSecretResponse) ProtoMessage()
func (*UpdateSecretResponse) ProtoReflect ¶
func (x *UpdateSecretResponse) ProtoReflect() protoreflect.Message
func (*UpdateSecretResponse) Reset ¶
func (x *UpdateSecretResponse) Reset()
func (*UpdateSecretResponse) String ¶
func (x *UpdateSecretResponse) String() string
type UsersClient ¶
type UsersClient interface { // Register new user. Register(ctx context.Context, in *RegisterUserRequest, opts ...grpc.CallOption) (*RegisterUserResponse, error) }
UsersClient is the client API for Users 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 NewUsersClient ¶
func NewUsersClient(cc grpc.ClientConnInterface) UsersClient
type UsersClientMock ¶
func (*UsersClientMock) Register ¶
func (m *UsersClientMock) Register( ctx context.Context, in *RegisterUserRequest, opts ...grpc.CallOption, ) (*RegisterUserResponse, error)
type UsersServer ¶
type UsersServer interface { // Register new user. Register(context.Context, *RegisterUserRequest) (*RegisterUserResponse, error) // contains filtered or unexported methods }
UsersServer is the server API for Users service. All implementations must embed UnimplementedUsersServer for forward compatibility