Documentation
¶
Index ¶
- func ProofMessage(request *antiflockv1.EnrollNodeRequest) ([]byte, error)
- type Service
- func (service *Service) Approve(ctx context.Context, actorID string, ...) (model.Node, error)
- func (service *Service) CreateScopedToken(ctx context.Context, actorID, operationID string, scope TokenScope) (Token, error)
- func (service *Service) CreateToken(ctx context.Context, actorID string) (Token, error)
- func (service *Service) Deny(ctx context.Context, actorID string, ...) (*antiflockv1.EnrollmentRequest, error)
- func (service *Service) Enroll(ctx context.Context, request *antiflockv1.EnrollNodeRequest) (*antiflockv1.EnrollmentRequest, error)
- func (service *Service) SetStatus(ctx context.Context, actorID, nodeID string, status model.NodeStatus) error
- func (service *Service) SetStatusWithReason(ctx context.Context, actorID, nodeID string, status model.NodeStatus, ...) error
- func (service *Service) UpdateMetadata(ctx context.Context, actorID, nodeID, name string, tags []string) error
- func (service *Service) UpdateMetadataWithOperation(ctx context.Context, actorID, nodeID, name string, tags []string, ...) error
- type Token
- type TokenScope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProofMessage ¶
func ProofMessage(request *antiflockv1.EnrollNodeRequest) ([]byte, error)
ProofMessage returns the exact digest signed by the enrolling endpoint. It uses only fields present in the canonical EnrollNodeRequest.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) Approve ¶
func (service *Service) Approve(ctx context.Context, actorID string, request *antiflockv1.ApproveEnrollmentRequest) (model.Node, error)
func (*Service) CreateScopedToken ¶
func (*Service) CreateToken ¶
func (*Service) Deny ¶
func (service *Service) Deny(ctx context.Context, actorID string, request *antiflockv1.DenyEnrollmentRequest) (*antiflockv1.EnrollmentRequest, error)
func (*Service) Enroll ¶
func (service *Service) Enroll(ctx context.Context, request *antiflockv1.EnrollNodeRequest) (*antiflockv1.EnrollmentRequest, error)
func (*Service) SetStatusWithReason ¶
func (*Service) UpdateMetadata ¶
type Token ¶
type Token struct {
ID string `json:"id"`
TokenValue string `json:"tokenValue"`
Scope TokenScope `json:"scope"`
ExpiresAt time.Time `json:"expiresAt"`
}
type TokenScope ¶
type TokenScope struct {
AllowedNodeType antiflockv1.NodeType `json:"allowedNodeType"`
ApprovedTags []string `json:"approvedTags"`
}
func (TokenScope) Validate ¶
func (scope TokenScope) Validate() error
Click to show internal directories.
Click to hide internal directories.