Documentation
¶
Index ¶
- type Service
- func (s *Service) AddStatus(ctx context.Context, status uint8) (int64, int64, error)
- func (s *Service) Close(ctx context.Context) error
- func (s *Service) CreateNewSectionIfNeeded(ctx context.Context) (int64, error)
- func (s *Service) GenerateStatusListTokenCWT(ctx context.Context, cfg TokenConfig) ([]byte, error)
- func (s *Service) GenerateStatusListTokenJWT(ctx context.Context, cfg TokenConfig) (string, error)
- func (s *Service) GetAllSections(ctx context.Context) ([]int64, error)
- func (s *Service) GetCachedCWT(ctx context.Context, section int64) []byte
- func (s *Service) GetCachedJWT(ctx context.Context, section int64) string
- func (s *Service) GetStatusListForSection(ctx context.Context, section int64) ([]uint8, error)
- func (s *Service) UpdateStatus(ctx context.Context, section int64, index int64, status uint8) error
- type TokenConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the token status list issuer service
func New ¶
func New(ctx context.Context, cfg *model.Cfg, cacheService *cache.Service, dbService *db.Service, log *logger.Log) (*Service, error)
New creates a new token status list issuer service
func (*Service) AddStatus ¶
AddStatus adds a new status to the status list and returns the section and index of the new status record.
func (*Service) CreateNewSectionIfNeeded ¶
CreateNewSectionIfNeeded checks if the current section has enough decoys and creates a new section if needed.
func (*Service) GenerateStatusListTokenCWT ¶
GenerateStatusListTokenCWT creates a signed Status List Token CWT per Section 6.1 using the tokenstatuslist package for core Token Status List operations.
func (*Service) GenerateStatusListTokenJWT ¶
GenerateStatusListTokenJWT creates a signed Status List Token JWT per Section 5.1 using the tokenstatuslist package for core Token Status List operations.
func (*Service) GetAllSections ¶
GetAllSections returns all section IDs for Status List Aggregation (Section 9.3).
func (*Service) GetCachedCWT ¶
GetCachedCWT returns a cached CWT for the given section, or nil if not cached
func (*Service) GetCachedJWT ¶
GetCachedJWT returns a cached JWT for the given section, or empty string if not cached
func (*Service) GetStatusListForSection ¶
GetStatusListForSection retrieves all statuses for a given section from the database. Returns a slice of status values suitable for encoding into a Status List Token.
type TokenConfig ¶
type TokenConfig struct {
tokenstatuslist.TokenConfig
// SigningMethod is the JWT signing method (e.g., jwt.SigningMethodES256)
SigningMethod jwt.SigningMethod
}
TokenConfig embeds tokenstatuslist.TokenConfig and adds signing method configuration.