Documentation ¶
Index ¶
- func NewKeysServer(service Service, log *zap.Logger) api.KeysServer
- func NewPBFromAuthRequest(msg *AuthRequest) *pb.AuthRequest
- func NewPBFromAuthResponse(msg *AuthResponse) *pb.AuthResponse
- func NewPBFromDelKeysRequest(msg *DelKeysRequest) *pb.DelKeysRequest
- func NewPBFromDelKeysResponse(msg *DelKeysResponse) *pb.DelKeysResponse
- func NewPBFromListKeysRequest(msg *ListKeysRequest) *pb.ListKeysRequest
- func NewPBFromListKeysResponse(msg *ListKeysResponse) *pb.ListKeysResponse
- func NewPBFromPublicKeysRequest(msg *PublicKeysRequest) *pb.PublicKeysRequest
- func NewPBFromPublicKeysResponse(msg *PublicKeysResponse) *pb.PublicKeysResponse
- func NewPBFromRegisterRequest(msg *RegisterRequest) *pb.RegisterRequest
- func NewPBFromRegisterResponse(msg *RegisterResponse) *pb.RegisterResponse
- func NewPBFromUpdateKeysRequest(msg *UpdateKeysRequest) *pb.UpdateKeysRequest
- func NewPBFromUpdateKeysResponse(msg *UpdateKeysResponse) *pb.UpdateKeysResponse
- func Register() *services.ServiceInfo
- type AuthRequest
- type AuthResponse
- type DelKeysRequest
- type DelKeysResponse
- type ListKeysRequest
- type ListKeysResponse
- type PublicKeysRequest
- type PublicKeysResponse
- type RegisterRequest
- type RegisterResponse
- type Service
- type UpdateKeysRequest
- type UpdateKeysResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewKeysServer ¶
func NewKeysServer(service Service, log *zap.Logger) api.KeysServer
NewKeysServer creates new KeysServer instance
func NewPBFromAuthRequest ¶
func NewPBFromAuthRequest(msg *AuthRequest) *pb.AuthRequest
NewPBFromAuthRequest transformer *AuthRequest to *pb.AuthRequest
func NewPBFromAuthResponse ¶
func NewPBFromAuthResponse(msg *AuthResponse) *pb.AuthResponse
NewPBFromAuthResponse transformer *AuthResponse to *pb.AuthResponse
func NewPBFromDelKeysRequest ¶
func NewPBFromDelKeysRequest(msg *DelKeysRequest) *pb.DelKeysRequest
NewPBFromDelKeysRequest transformer *DelKeysRequest to *pb.DelKeysRequest
func NewPBFromDelKeysResponse ¶
func NewPBFromDelKeysResponse(msg *DelKeysResponse) *pb.DelKeysResponse
NewPBFromDelKeysResponse transformer *DelKeysResponse to *pb.DelKeysResponse
func NewPBFromListKeysRequest ¶
func NewPBFromListKeysRequest(msg *ListKeysRequest) *pb.ListKeysRequest
NewPBFromListKeysRequest transformer *ListKeysRequest to *pb.ListKeysRequest
func NewPBFromListKeysResponse ¶
func NewPBFromListKeysResponse(msg *ListKeysResponse) *pb.ListKeysResponse
NewPBFromListKeysResponse transformer *ListKeysResponse to *pb.ListKeysResponse
func NewPBFromPublicKeysRequest ¶
func NewPBFromPublicKeysRequest(msg *PublicKeysRequest) *pb.PublicKeysRequest
NewPBFromPublicKeysRequest transformer *PublicKeysRequest to *pb.PublicKeysRequest
func NewPBFromPublicKeysResponse ¶
func NewPBFromPublicKeysResponse(msg *PublicKeysResponse) *pb.PublicKeysResponse
NewPBFromPublicKeysResponse transformer *PublicKeysResponse to *pb.PublicKeysResponse
func NewPBFromRegisterRequest ¶
func NewPBFromRegisterRequest(msg *RegisterRequest) *pb.RegisterRequest
NewPBFromRegisterRequest transformer *RegisterRequest to *pb.RegisterRequest
func NewPBFromRegisterResponse ¶
func NewPBFromRegisterResponse(msg *RegisterResponse) *pb.RegisterResponse
NewPBFromRegisterResponse transformer *RegisterResponse to *pb.RegisterResponse
func NewPBFromUpdateKeysRequest ¶
func NewPBFromUpdateKeysRequest(msg *UpdateKeysRequest) *pb.UpdateKeysRequest
NewPBFromUpdateKeysRequest transformer *UpdateKeysRequest to *pb.UpdateKeysRequest
func NewPBFromUpdateKeysResponse ¶
func NewPBFromUpdateKeysResponse(msg *UpdateKeysResponse) *pb.UpdateKeysResponse
NewPBFromUpdateKeysResponse transformer *UpdateKeysResponse to *pb.UpdateKeysResponse
Types ¶
type AuthRequest ¶
type AuthRequest struct {
KID string `json:"kid"`
}
AuthRequest message type
func NewAuthRequestFromPB ¶
func NewAuthRequestFromPB(msg *pb.AuthRequest) *AuthRequest
NewAuthRequestFromPB transformer *pb.AuthRequest to *AuthRequest
type AuthResponse ¶
type AuthResponse struct {
AuthJWT string `json:"authJWT"`
}
AuthResponse message type
func NewAuthResponseFromPB ¶
func NewAuthResponseFromPB(msg *pb.AuthResponse) *AuthResponse
NewAuthResponseFromPB transformer *pb.AuthResponse to *AuthResponse
type DelKeysRequest ¶
type DelKeysRequest struct {
KID string `json:"kid"`
}
DelKeysRequest message type
func NewDelKeysRequestFromPB ¶
func NewDelKeysRequestFromPB(msg *pb.DelKeysRequest) *DelKeysRequest
NewDelKeysRequestFromPB transformer *pb.DelKeysRequest to *DelKeysRequest
type DelKeysResponse ¶
type DelKeysResponse struct { }
DelKeysResponse message type
func NewDelKeysResponseFromPB ¶
func NewDelKeysResponseFromPB(msg *pb.DelKeysResponse) *DelKeysResponse
NewDelKeysResponseFromPB transformer *pb.DelKeysResponse to *DelKeysResponse
type ListKeysRequest ¶
type ListKeysRequest struct {
Query string `json:"query"`
}
ListKeysRequest message type
func NewListKeysRequestFromPB ¶
func NewListKeysRequestFromPB(msg *pb.ListKeysRequest) *ListKeysRequest
NewListKeysRequestFromPB transformer *pb.ListKeysRequest to *ListKeysRequest
type ListKeysResponse ¶
ListKeysResponse message type
func NewListKeysResponseFromPB ¶
func NewListKeysResponseFromPB(msg *pb.ListKeysResponse) *ListKeysResponse
NewListKeysResponseFromPB transformer *pb.ListKeysResponse to *ListKeysResponse
type PublicKeysRequest ¶
type PublicKeysRequest struct {
KID string `json:"kid"`
}
PublicKeysRequest message type
func NewPublicKeysRequestFromPB ¶
func NewPublicKeysRequestFromPB(msg *pb.PublicKeysRequest) *PublicKeysRequest
NewPublicKeysRequestFromPB transformer *pb.PublicKeysRequest to *PublicKeysRequest
type PublicKeysResponse ¶
type PublicKeysResponse struct { KID string `json:"kid"` Keys *keys.SigEncKeys `json:"keys"` }
PublicKeysResponse message type
func NewPublicKeysResponseFromPB ¶
func NewPublicKeysResponseFromPB(msg *pb.PublicKeysResponse) *PublicKeysResponse
NewPublicKeysResponseFromPB transformer *pb.PublicKeysResponse to *PublicKeysResponse
type RegisterRequest ¶
type RegisterRequest struct { KID string `json:"kid"` SigAlg string `json:"sigAlg"` EncAlg string `json:"encAlg"` SigBits int `json:"sigBits"` EncBits int `json:"encBits"` Expiry time.Duration `json:"expiry"` AuthTTL time.Duration `json:"authTTL"` RefreshTTL time.Duration `json:"refreshTTL"` RefreshStrategy string `json:"refreshStrategy"` }
RegisterRequest message type
func NewRegisterRequestFromPB ¶
func NewRegisterRequestFromPB(msg *pb.RegisterRequest) *RegisterRequest
NewRegisterRequestFromPB transformer *pb.RegisterRequest to *RegisterRequest
type RegisterResponse ¶
type RegisterResponse struct { KID string `json:"kid"` AuthJWT string `json:"authJWT"` Keys *keys.SigEncKeys `json:"keys"` }
RegisterResponse message type
func NewRegisterResponseFromPB ¶
func NewRegisterResponseFromPB(msg *pb.RegisterResponse) *RegisterResponse
NewRegisterResponseFromPB transformer *pb.RegisterResponse to *RegisterResponse
type Service ¶
type Service interface { Auth(ctx context.Context, req *AuthRequest) (*AuthResponse, error) Register(ctx context.Context, req *RegisterRequest) (*RegisterResponse, error) UpdateKeys(ctx context.Context, req *UpdateKeysRequest) (*UpdateKeysResponse, error) ListKeys(ctx context.Context, req *ListKeysRequest) ([]*ListKeysResponse, error) DelKeys(ctx context.Context, req *DelKeysRequest) (*DelKeysResponse, error) PublicKeys(ctx context.Context, req *PublicKeysRequest) (*PublicKeysResponse, error) }
Service interface declares keys service type
type UpdateKeysRequest ¶
type UpdateKeysRequest struct { KID string `json:"kid"` SigAlg string `json:"sigAlg"` EncAlg string `json:"encAlg"` SigBits int `json:"sigBits"` EncBits int `json:"encBits"` ContEnc string `json:"contEnc"` Expiry time.Duration `json:"expiry"` AuthTTL time.Duration `json:"authTTL"` RefreshTTL time.Duration `json:"refreshTTL"` RefreshStrategy string `json:"refreshStrategy"` }
UpdateKeysRequest message type
func NewUpdateKeysRequestFromPB ¶
func NewUpdateKeysRequestFromPB(msg *pb.UpdateKeysRequest) *UpdateKeysRequest
NewUpdateKeysRequestFromPB transformer *pb.UpdateKeysRequest to *UpdateKeysRequest
type UpdateKeysResponse ¶
type UpdateKeysResponse struct { KID string `json:"kid"` AuthJWT string `json:"authJWT"` Keys *keys.SigEncKeys `json:"keys"` }
UpdateKeysResponse message type
func NewUpdateKeysResponseFromPB ¶
func NewUpdateKeysResponseFromPB(msg *pb.UpdateKeysResponse) *UpdateKeysResponse
NewUpdateKeysResponseFromPB transformer *pb.UpdateKeysResponse to *UpdateKeysResponse