pi

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: ISC Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableLog

func DisableLog()

DisableLog disables all library log output. Logging output is disabled by default until either UseLogger or SetLogWriter are called.

func UseLogger

func UseLogger(logger slog.Logger)

UseLogger uses a specified Logger to output package logging info. This should be used in preference to SetLogWriter if the caller is also using slog.

Types

type Pi

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

Pi is the context for the pi API.

func New

func New(cfg *config.Config, pdc *pdclient.Client, udb user.Database, m mail.Mailer, s *sessions.Sessions, e *events.Manager, plugins []pdv2.Plugin) (*Pi, error)

New returns a new Pi context.

func (*Pi) HandleBillingStatusChanges

func (p *Pi) HandleBillingStatusChanges(w http.ResponseWriter, r *http.Request)

HandleBillingStatusChanges is the request handler for the pi v1 BillingStatusChanges route.

func (*Pi) HandlePolicy

func (p *Pi) HandlePolicy(w http.ResponseWriter, r *http.Request)

HandlePolicy is the request handler for the pi v1 Policy route.

func (*Pi) HandleSetBillingStatus

func (p *Pi) HandleSetBillingStatus(w http.ResponseWriter, r *http.Request)

HandleSetBillingStatus is the request handler for the pi v1 BillingStatus route.

func (*Pi) HandleSummaries

func (p *Pi) HandleSummaries(w http.ResponseWriter, r *http.Request)

HandleSummaries is the request handler for the pi v1 Summaries route.

Jump to

Keyboard shortcuts

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