api

package
v0.0.0-...-4122671 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ApiKeyHeader = "X-Api-Key"

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

func New

func New(db *sql.DB, flagService fflag.Service, authService auth.Service) API

func (*API) DeleteFlag

func (api *API) DeleteFlag(r *http.Request) chix.Response

func (*API) DeleteKey

func (api *API) DeleteKey(r *http.Request) chix.Response

func (*API) GetFlag

func (api *API) GetFlag(r *http.Request) chix.Response

func (*API) GetFlags

func (api *API) GetFlags(r *http.Request) chix.Response

func (*API) Healthcheck

func (api *API) Healthcheck(r *http.Request) chix.Response

func (*API) NewRouter

func (api *API) NewRouter() *chi.Mux

func (*API) PostFlag

func (api *API) PostFlag(r *http.Request) chix.Response

func (*API) PostKey

func (api *API) PostKey(r *http.Request) chix.Response

func (*API) PutFlag

func (api *API) PutFlag(r *http.Request) chix.Response

func (*API) RotateKey

func (api *API) RotateKey(r *http.Request) chix.Response

type PutFlagBody

type PutFlagBody struct {
	Type         fflag.FlagType         `json:"type"`
	IsPublic     bool                   `json:"isPublic"`
	BooleanValue *bool                  `json:"booleanValue"`
	StringValue  *string                `json:"stringValue"`
	JSONValue    map[string]interface{} `json:"jsonValue"`
}

Jump to

Keyboard shortcuts

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