release

package
v0.0.0-...-7b7c10a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	StoreProvider  storage.Provider
	PolicyService  policyService
	ProtectService protectService
}

Config defines dependencies for a service.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is a service for releasing protected resources.

func NewService

func NewService(config *Config) (*Service, error)

NewService returns a new instance of Service.

func (*Service) Authorize

func (s *Service) Authorize(ctx context.Context, ticketID, approver string) error

Authorize authorizes ticket by approver.

func (*Service) Get

func (s *Service) Get(_ context.Context, ticketID string) (*ticket.Ticket, error)

Get retrieves ticket from the underlying storage by ID.

func (*Service) Release

func (s *Service) Release(_ context.Context, did string) (*ticket.Ticket, error)

Release creates release transaction (ticket) on the protected resource (DID).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL