cms

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitRoutes

func InitRoutes(e *echo.Echo, data *Data)

InitRoutes http routes for CMS integration

Types

type Data

type Data struct {
	ProjectValidator PrValidator
	Integrator       Integrator
}

Data is main handler's data keeper

type Integrator

type Integrator interface {
	Create(*api.CreateInput) (*api.Key, bool, error)
	GetKey(keyID string) (*api.Key, error)
	AddCredits(string, *api.CreditsInput) (*api.Key, error)
	GetKeyID(string) (*api.KeyID, error)
	Usage(string, *time.Time, *time.Time, bool) (*api.Usage, error)
	Update(string, map[string]interface{}) (*api.Key, error)
	Change(string) (*api.Key, error)
	Changes(*time.Time, []string) (*api.Changes, error)
}

Integrator wraps integratoin functionality

type PrValidator

type PrValidator interface {
	Check(string) bool
	Projects() []string
}

PrValidator validates if project is available

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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