Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanonicalJSON ¶
CanonicalJSON encodes the JSON data model deterministically.
Types ¶
type ClaimRecord ¶
type Repository ¶
type Repository interface {
Claim(ctx context.Context, record ClaimRecord) (bool, error)
Finish(ctx context.Context, claimKey string, state toolprotection.State, finishedAt time.Time) error
}
func NewDAORepository ¶
func NewDAORepository(dao *datly.Service) Repository
NewDAORepository retains the existing DAO without opening a connector or checking schema. Missing persistence fails only when a protected call claims.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func New ¶
func New(cfg execconfig.ToolExecutionProtectionDefaults, repository Repository) (*Service, error)
func (*Service) Finish ¶
func (s *Service) Finish(ctx context.Context, claim toolprotection.Claim, state toolprotection.State)
func (*Service) IsProtected ¶
Click to show internal directories.
Click to hide internal directories.