Documentation ¶
Index ¶
- func GetPublicKey(addr string, ca string, insecure bool) ([]byte, error)
- func RegisterAuthServer(s *grpc.Server, srv AuthServer)
- type AuthClient
- type AuthServer
- 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 Login
- func (*Login) Descriptor() ([]byte, []int)
- func (m *Login) GetPassword() string
- func (m *Login) GetUsername() string
- func (*Login) ProtoMessage()
- func (m *Login) Reset()
- func (m *Login) String() string
- func (m *Login) XXX_DiscardUnknown()
- func (m *Login) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Login) XXX_Merge(src proto.Message)
- func (m *Login) XXX_Size() int
- func (m *Login) XXX_Unmarshal(b []byte) error
- type PublicKey
- func (*PublicKey) Descriptor() ([]byte, []int)
- func (m *PublicKey) GetPem() []byte
- func (*PublicKey) ProtoMessage()
- func (m *PublicKey) Reset()
- func (m *PublicKey) String() string
- func (m *PublicKey) XXX_DiscardUnknown()
- func (m *PublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PublicKey) XXX_Merge(src proto.Message)
- func (m *PublicKey) XXX_Size() int
- func (m *PublicKey) XXX_Unmarshal(b []byte) error
- type SignedToken
- func (*SignedToken) Descriptor() ([]byte, []int)
- func (m *SignedToken) GetToken() string
- func (*SignedToken) ProtoMessage()
- func (m *SignedToken) Reset()
- func (m *SignedToken) String() string
- func (m *SignedToken) XXX_DiscardUnknown()
- func (m *SignedToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SignedToken) XXX_Merge(src proto.Message)
- func (m *SignedToken) XXX_Size() int
- func (m *SignedToken) XXX_Unmarshal(b []byte) error
- type Token
- func (*Token) Descriptor() ([]byte, []int)
- func (t *Token) FmtStringColor() string
- func (m *Token) GetExpiresAt() *timestamp.Timestamp
- func (m *Token) GetIssuedAt() *timestamp.Timestamp
- func (m *Token) GetMail() string
- func (m *Token) GetName() string
- func (m *Token) GetRenewed() uint32
- func (m *Token) GetRoles() []string
- func (m *Token) GetUsername() string
- func (m *Token) GetUuid() string
- func (*Token) ProtoMessage()
- func (m *Token) Reset()
- func (m *Token) String() string
- func (m *Token) XXX_DiscardUnknown()
- func (m *Token) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Token) XXX_Merge(src proto.Message)
- func (m *Token) XXX_Size() int
- func (m *Token) XXX_Unmarshal(b []byte) error
- type UnimplementedAuthServer
- func (*UnimplementedAuthServer) GetPublicKey(ctx context.Context, req *Empty) (*PublicKey, error)
- func (*UnimplementedAuthServer) LoginUser(ctx context.Context, req *Login) (*SignedToken, error)
- func (*UnimplementedAuthServer) RenewToken(ctx context.Context, req *SignedToken) (*SignedToken, error)
- func (*UnimplementedAuthServer) VerifyToken(ctx context.Context, req *SignedToken) (*Token, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAuthServer ¶
func RegisterAuthServer(s *grpc.Server, srv AuthServer)
Types ¶
type AuthClient ¶
type AuthClient interface { GetPublicKey(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PublicKey, error) LoginUser(ctx context.Context, in *Login, opts ...grpc.CallOption) (*SignedToken, error) VerifyToken(ctx context.Context, in *SignedToken, opts ...grpc.CallOption) (*Token, error) RenewToken(ctx context.Context, in *SignedToken, opts ...grpc.CallOption) (*SignedToken, error) }
AuthClient is the client API for Auth service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAuthClient ¶
func NewAuthClient(cc *grpc.ClientConn) AuthClient
type AuthServer ¶
type AuthServer interface { GetPublicKey(context.Context, *Empty) (*PublicKey, error) LoginUser(context.Context, *Login) (*SignedToken, error) VerifyToken(context.Context, *SignedToken) (*Token, error) RenewToken(context.Context, *SignedToken) (*SignedToken, error) }
AuthServer is the server API for Auth service.
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 Login ¶
type Login struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Login) Descriptor ¶
func (*Login) GetPassword ¶
func (*Login) GetUsername ¶
func (*Login) ProtoMessage ¶
func (*Login) ProtoMessage()
func (*Login) XXX_DiscardUnknown ¶
func (m *Login) XXX_DiscardUnknown()
func (*Login) XXX_Marshal ¶
func (*Login) XXX_Unmarshal ¶
type PublicKey ¶
type PublicKey struct { Pem []byte `protobuf:"bytes,1,opt,name=pem,proto3" json:"pem,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PublicKey) Descriptor ¶
func (*PublicKey) ProtoMessage ¶
func (*PublicKey) ProtoMessage()
func (*PublicKey) XXX_DiscardUnknown ¶
func (m *PublicKey) XXX_DiscardUnknown()
func (*PublicKey) XXX_Marshal ¶
func (*PublicKey) XXX_Unmarshal ¶
type SignedToken ¶
type SignedToken struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SignedToken) Descriptor ¶
func (*SignedToken) Descriptor() ([]byte, []int)
func (*SignedToken) GetToken ¶
func (m *SignedToken) GetToken() string
func (*SignedToken) ProtoMessage ¶
func (*SignedToken) ProtoMessage()
func (*SignedToken) Reset ¶
func (m *SignedToken) Reset()
func (*SignedToken) String ¶
func (m *SignedToken) String() string
func (*SignedToken) XXX_DiscardUnknown ¶
func (m *SignedToken) XXX_DiscardUnknown()
func (*SignedToken) XXX_Marshal ¶
func (m *SignedToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SignedToken) XXX_Merge ¶
func (m *SignedToken) XXX_Merge(src proto.Message)
func (*SignedToken) XXX_Size ¶
func (m *SignedToken) XXX_Size() int
func (*SignedToken) XXX_Unmarshal ¶
func (m *SignedToken) XXX_Unmarshal(b []byte) error
type Token ¶
type Token struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` IssuedAt *timestamp.Timestamp `protobuf:"bytes,2,opt,name=issuedAt,proto3" json:"issuedAt,omitempty"` ExpiresAt *timestamp.Timestamp `protobuf:"bytes,3,opt,name=expiresAt,proto3" json:"expiresAt,omitempty"` Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"` Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` Mail string `protobuf:"bytes,6,opt,name=mail,proto3" json:"mail,omitempty"` Roles []string `protobuf:"bytes,7,rep,name=roles,proto3" json:"roles,omitempty"` Renewed uint32 `protobuf:"varint,8,opt,name=renewed,proto3" json:"renewed,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Token) Descriptor ¶
func (*Token) FmtStringColor ¶
func (*Token) GetExpiresAt ¶
func (*Token) GetIssuedAt ¶
func (*Token) GetRenewed ¶
func (*Token) GetUsername ¶
func (*Token) ProtoMessage ¶
func (*Token) ProtoMessage()
func (*Token) XXX_DiscardUnknown ¶
func (m *Token) XXX_DiscardUnknown()
func (*Token) XXX_Marshal ¶
func (*Token) XXX_Unmarshal ¶
type UnimplementedAuthServer ¶
type UnimplementedAuthServer struct { }
UnimplementedAuthServer can be embedded to have forward compatible implementations.
func (*UnimplementedAuthServer) GetPublicKey ¶
func (*UnimplementedAuthServer) LoginUser ¶
func (*UnimplementedAuthServer) LoginUser(ctx context.Context, req *Login) (*SignedToken, error)
func (*UnimplementedAuthServer) RenewToken ¶
func (*UnimplementedAuthServer) RenewToken(ctx context.Context, req *SignedToken) (*SignedToken, error)
func (*UnimplementedAuthServer) VerifyToken ¶
func (*UnimplementedAuthServer) VerifyToken(ctx context.Context, req *SignedToken) (*Token, error)
Click to show internal directories.
Click to hide internal directories.