vouchers

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2019 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Error the default vouchers errs class
	Error = errs.Class("vouchers error")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Expiration int `help:"number of days before a voucher expires" default:"30"`
}

Config contains voucher service configuration parameters

type Service

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

Service for issuing signed vouchers

func NewService

func NewService(log *zap.Logger, satellite signing.Signer, cache *overlay.Cache, expiration time.Duration) *Service

NewService creates a new service for issuing signed vouchers

func (*Service) Request

func (service *Service) Request(ctx context.Context, req *pb.VoucherRequest) (_ *pb.Voucher, err error)

Request receives a voucher request and returns a voucher and an error

Jump to

Keyboard shortcuts

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