Documentation
¶
Index ¶
- func RegisterTyphonServer(s *grpc.Server, srv TyphonServer)
- type Empty
- func (*Empty) Descriptor() ([]byte, []int)
- func (*Empty) ProtoMessage()
- func (m *Empty) Reset()
- func (m *Empty) String() string
- func (m *Empty) XXX_DiscardUnknown()
- func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Empty) XXX_Merge(src proto.Message)
- func (m *Empty) XXX_Size() int
- func (m *Empty) XXX_Unmarshal(b []byte) error
- type ModMsg
- func (*ModMsg) Descriptor() ([]byte, []int)
- func (m *ModMsg) GetNewSecret() *Secret
- func (m *ModMsg) GetOldSecret() *Secret
- func (*ModMsg) ProtoMessage()
- func (m *ModMsg) Reset()
- func (m *ModMsg) String() string
- func (m *ModMsg) Validate() (err error)
- func (m *ModMsg) XXX_DiscardUnknown()
- func (m *ModMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ModMsg) XXX_Merge(src proto.Message)
- func (m *ModMsg) XXX_Size() int
- func (m *ModMsg) XXX_Unmarshal(b []byte) error
- type PubKey
- func (*PubKey) Descriptor() ([]byte, []int)
- func (m *PubKey) GetPubKey() string
- func (m *PubKey) GetToken() string
- func (*PubKey) ProtoMessage()
- func (m *PubKey) Reset()
- func (m *PubKey) String() string
- func (m *PubKey) XXX_DiscardUnknown()
- func (m *PubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PubKey) XXX_Merge(src proto.Message)
- func (m *PubKey) XXX_Size() int
- func (m *PubKey) XXX_Unmarshal(b []byte) error
- type Secret
- func (*Secret) Descriptor() ([]byte, []int)
- func (m *Secret) GetData() []byte
- func (m *Secret) GetDateCreated() int64
- func (m *Secret) GetDateToDie() int64
- func (m *Secret) GetID() uint32
- func (m *Secret) GetName() string
- func (m *Secret) GetTTL() uint32
- func (*Secret) ProtoMessage()
- func (m *Secret) Reset()
- func (m *Secret) String() string
- func (m *Secret) Validate() (err error)
- func (m *Secret) XXX_DiscardUnknown()
- func (m *Secret) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Secret) XXX_Merge(src proto.Message)
- func (m *Secret) XXX_Size() int
- func (m *Secret) XXX_Unmarshal(b []byte) error
- type State
- func (*State) Descriptor() ([]byte, []int)
- func (m *State) GetState() bool
- func (*State) ProtoMessage()
- func (m *State) Reset()
- func (m *State) String() string
- func (m *State) XXX_DiscardUnknown()
- func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *State) XXX_Merge(src proto.Message)
- func (m *State) XXX_Size() int
- func (m *State) XXX_Unmarshal(b []byte) error
- type TyphonClient
- type TyphonServer
- type Typhon_ListSecretsClient
- type Typhon_ListSecretsServer
- type Typhon_ListUsersClient
- type Typhon_ListUsersServer
- type UnimplementedTyphonServer
- func (*UnimplementedTyphonServer) AddSecret(ctx context.Context, req *Secret) (*Secret, error)
- func (*UnimplementedTyphonServer) AddUser(ctx context.Context, req *User) (*User, error)
- func (*UnimplementedTyphonServer) BlockUser(ctx context.Context, req *User) (*User, error)
- func (*UnimplementedTyphonServer) GetSecret(ctx context.Context, req *Secret) (*Secret, error)
- func (*UnimplementedTyphonServer) InfoSecret(ctx context.Context, req *Secret) (*Secret, error)
- func (*UnimplementedTyphonServer) Init(ctx context.Context, req *PubKey) (*Empty, error)
- func (*UnimplementedTyphonServer) ListSecrets(req *Empty, srv Typhon_ListSecretsServer) error
- func (*UnimplementedTyphonServer) ListUsers(req *Empty, srv Typhon_ListUsersServer) error
- func (*UnimplementedTyphonServer) ModifySecretName(ctx context.Context, req *ModMsg) (*Empty, error)
- func (*UnimplementedTyphonServer) ModifySecretTTL(ctx context.Context, req *ModMsg) (*Empty, error)
- func (*UnimplementedTyphonServer) RemoveSecret(ctx context.Context, req *Secret) (*Secret, error)
- func (*UnimplementedTyphonServer) RemoveUser(ctx context.Context, req *User) (*User, error)
- func (*UnimplementedTyphonServer) SetLock(ctx context.Context, req *State) (*State, error)
- func (*UnimplementedTyphonServer) UnBlockUser(ctx context.Context, req *User) (*User, error)
- type User
- func (*User) Descriptor() ([]byte, []int)
- func (m *User) GetBlocked() bool
- func (m *User) GetID() uint32
- func (m *User) GetName() string
- func (m *User) GetPassword() string
- func (m *User) GetToken() string
- func (*User) ProtoMessage()
- func (m *User) Reset()
- func (m *User) String() string
- func (m *User) Validate() (err error)
- func (m *User) XXX_DiscardUnknown()
- func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *User) XXX_Merge(src proto.Message)
- func (m *User) XXX_Size() int
- func (m *User) XXX_Unmarshal(b []byte) error
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterTyphonServer ¶
func RegisterTyphonServer(s *grpc.Server, srv TyphonServer)
Types ¶
type Empty ¶
type Empty struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) XXX_DiscardUnknown ¶
func (m *Empty) XXX_DiscardUnknown()
func (*Empty) XXX_Marshal ¶
func (*Empty) XXX_Unmarshal ¶
type ModMsg ¶
type ModMsg struct { OldSecret *Secret `protobuf:"bytes,1,opt,name=oldSecret,proto3" json:"oldSecret,omitempty"` NewSecret *Secret `protobuf:"bytes,2,opt,name=newSecret,proto3" json:"newSecret,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ModMsg) Descriptor ¶
func (*ModMsg) GetNewSecret ¶
func (*ModMsg) GetOldSecret ¶
func (*ModMsg) ProtoMessage ¶
func (*ModMsg) ProtoMessage()
func (*ModMsg) XXX_DiscardUnknown ¶
func (m *ModMsg) XXX_DiscardUnknown()
func (*ModMsg) XXX_Marshal ¶
func (*ModMsg) XXX_Unmarshal ¶
type PubKey ¶
type PubKey struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` PubKey string `protobuf:"bytes,2,opt,name=pubKey,proto3" json:"pubKey,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PubKey) Descriptor ¶
func (*PubKey) ProtoMessage ¶
func (*PubKey) ProtoMessage()
func (*PubKey) XXX_DiscardUnknown ¶
func (m *PubKey) XXX_DiscardUnknown()
func (*PubKey) XXX_Marshal ¶
func (*PubKey) XXX_Unmarshal ¶
type Secret ¶
type Secret struct { ID uint32 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` TTL uint32 `protobuf:"varint,3,opt,name=TTL,proto3" json:"TTL,omitempty"` Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` DateCreated int64 `protobuf:"varint,5,opt,name=dateCreated,proto3" json:"dateCreated,omitempty"` DateToDie int64 `protobuf:"varint,6,opt,name=dateToDie,proto3" json:"dateToDie,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Secret) Descriptor ¶
func (*Secret) GetDateCreated ¶
func (*Secret) GetDateToDie ¶
func (*Secret) ProtoMessage ¶
func (*Secret) ProtoMessage()
func (*Secret) XXX_DiscardUnknown ¶
func (m *Secret) XXX_DiscardUnknown()
func (*Secret) XXX_Marshal ¶
func (*Secret) XXX_Unmarshal ¶
type State ¶
type State struct { State bool `protobuf:"varint,1,opt,name=state,proto3" json:"state,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*State) Descriptor ¶
func (*State) ProtoMessage ¶
func (*State) ProtoMessage()
func (*State) XXX_DiscardUnknown ¶
func (m *State) XXX_DiscardUnknown()
func (*State) XXX_Marshal ¶
func (*State) XXX_Unmarshal ¶
type TyphonClient ¶
type TyphonClient interface { GetSecret(ctx context.Context, in *Secret, opts ...grpc.CallOption) (*Secret, error) AddSecret(ctx context.Context, in *Secret, opts ...grpc.CallOption) (*Secret, error) ModifySecretName(ctx context.Context, in *ModMsg, opts ...grpc.CallOption) (*Empty, error) ModifySecretTTL(ctx context.Context, in *ModMsg, opts ...grpc.CallOption) (*Empty, error) ListSecrets(ctx context.Context, in *Empty, opts ...grpc.CallOption) (Typhon_ListSecretsClient, error) InfoSecret(ctx context.Context, in *Secret, opts ...grpc.CallOption) (*Secret, error) RemoveSecret(ctx context.Context, in *Secret, opts ...grpc.CallOption) (*Secret, error) Init(ctx context.Context, in *PubKey, opts ...grpc.CallOption) (*Empty, error) AddUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*User, error) BlockUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*User, error) UnBlockUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*User, error) RemoveUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*User, error) ListUsers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (Typhon_ListUsersClient, error) SetLock(ctx context.Context, in *State, opts ...grpc.CallOption) (*State, error) }
TyphonClient is the client API for Typhon service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTyphonClient ¶
func NewTyphonClient(cc *grpc.ClientConn) TyphonClient
type TyphonServer ¶
type TyphonServer interface { GetSecret(context.Context, *Secret) (*Secret, error) AddSecret(context.Context, *Secret) (*Secret, error) ModifySecretName(context.Context, *ModMsg) (*Empty, error) ModifySecretTTL(context.Context, *ModMsg) (*Empty, error) ListSecrets(*Empty, Typhon_ListSecretsServer) error InfoSecret(context.Context, *Secret) (*Secret, error) RemoveSecret(context.Context, *Secret) (*Secret, error) Init(context.Context, *PubKey) (*Empty, error) AddUser(context.Context, *User) (*User, error) BlockUser(context.Context, *User) (*User, error) UnBlockUser(context.Context, *User) (*User, error) RemoveUser(context.Context, *User) (*User, error) ListUsers(*Empty, Typhon_ListUsersServer) error SetLock(context.Context, *State) (*State, error) }
TyphonServer is the server API for Typhon service.
type Typhon_ListSecretsClient ¶
type Typhon_ListSecretsClient interface { Recv() (*Secret, error) grpc.ClientStream }
type Typhon_ListSecretsServer ¶
type Typhon_ListSecretsServer interface { Send(*Secret) error grpc.ServerStream }
type Typhon_ListUsersClient ¶
type Typhon_ListUsersClient interface { Recv() (*User, error) grpc.ClientStream }
type Typhon_ListUsersServer ¶
type Typhon_ListUsersServer interface { Send(*User) error grpc.ServerStream }
type UnimplementedTyphonServer ¶
type UnimplementedTyphonServer struct { }
UnimplementedTyphonServer can be embedded to have forward compatible implementations.
func (*UnimplementedTyphonServer) InfoSecret ¶
func (*UnimplementedTyphonServer) ListSecrets ¶
func (*UnimplementedTyphonServer) ListSecrets(req *Empty, srv Typhon_ListSecretsServer) error
func (*UnimplementedTyphonServer) ListUsers ¶
func (*UnimplementedTyphonServer) ListUsers(req *Empty, srv Typhon_ListUsersServer) error
func (*UnimplementedTyphonServer) ModifySecretName ¶
func (*UnimplementedTyphonServer) ModifySecretTTL ¶
func (*UnimplementedTyphonServer) RemoveSecret ¶
func (*UnimplementedTyphonServer) RemoveUser ¶
func (*UnimplementedTyphonServer) UnBlockUser ¶
type User ¶
type User struct { ID uint32 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` Blocked bool `protobuf:"varint,5,opt,name=blocked,proto3" json:"blocked,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*User) Descriptor ¶
func (*User) GetBlocked ¶
func (*User) GetPassword ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) XXX_DiscardUnknown ¶
func (m *User) XXX_DiscardUnknown()
func (*User) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.