exchequer

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: BSD-3-Clause Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingHMACSignature = errors.New("HMAC id or signature is missing")
	ErrInvalidHMACSignature = errors.New("invalid HMAC signature")
	ErrInvalidHMACSecret    = errors.New("HMAC secret must be a hex encoded string")
)

Functions

func CreateAdyenClient added in v0.2.0

func CreateAdyenClient(conf config.AdyenConfig) *adyen.APIClient

func VerifyAdyenHMAC added in v0.2.0

func VerifyAdyenHMAC(payload *webhook.NotificationRequestItem, secret string) (err error)

Types

type Render

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

func NewRender

func NewRender(fsys fs.FS, pattern string, includes ...string) (render *Render, err error)

func (*Render) AddPattern

func (r *Render) AddPattern(fsys fs.FS, pattern string, includes ...string) (err error)

func (*Render) Instance

func (r *Render) Instance(name string, data any) render.Render

type Server

type Server struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func Debug

func Debug(conf config.Config, srv *http.Server) (s *Server, err error)

Debug returns a server that uses the specified http server instead of creating one. This function is primarily used to create test servers easily.

func New

func New(conf config.Config) (svc *Server, err error)

func (*Server) AdyenPaymentsWebhook added in v0.2.0

func (s *Server) AdyenPaymentsWebhook(c *gin.Context)

func (*Server) AdyenWebhookAuth added in v0.2.0

func (s *Server) AdyenWebhookAuth() gin.HandlerFunc

func (*Server) Checkout added in v0.2.0

func (s *Server) Checkout(c *gin.Context)

func (*Server) Healthz

func (s *Server) Healthz(c *gin.Context)

Healthz is used to alert k8s to the health/liveness status of the server.

func (*Server) Index

func (s *Server) Index(c *gin.Context)

func (*Server) Maintenance

func (s *Server) Maintenance() gin.HandlerFunc

If the server is in maintenance mode, aborts the current request and renders the maintenance mode page instead. Returns nil if not in maintenance mode.

func (*Server) NotAllowed

func (s *Server) NotAllowed(c *gin.Context)

func (*Server) NotFound

func (s *Server) NotFound(c *gin.Context)

func (*Server) Readyz

func (s *Server) Readyz(c *gin.Context)

Readyz is used to alert k8s to the readiness status of the server.

func (*Server) Serve

func (s *Server) Serve() (err error)

Serve the compliance and administrative user interfaces in its own go routine.

func (*Server) SetStatus

func (s *Server) SetStatus(health, ready bool)

SetStatus sets the health and ready status on the server, modifying the behavior of the kubernetes probe responses.

func (*Server) Shutdown

func (s *Server) Shutdown() (err error)

Shutdown the web server gracefully.

func (*Server) Status

func (s *Server) Status(c *gin.Context)

Status reports the version and uptime of the server

func (*Server) URL

func (s *Server) URL() string

URL returns the endpoint of the server as determined by the configuration and the socket address and port (if specified).

Jump to

Keyboard shortcuts

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