routes

package
v0.0.0-...-ffaaf6d Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FeatureStore

type FeatureStore interface {
	GetAll(ctx context.Context) ([]sqlc.Feature, error)
	Upsert(ctx context.Context, feature sqlc.Feature) error
	Delete(ctx context.Context, featureID string) error
}

type GetFeatureResponse

type GetFeatureResponse struct {
	FeatureID   string `json:"featureId"`
	Description string `json:"description"`
	Enabled     bool   `json:"enabled"`
}

type Notifier

type Notifier interface {
	Notify(sqlc.Feature) error
}

type PostFeatureRequest

type PostFeatureRequest struct {
	FeatureID   string `json:"featureId"`
	Description string `json:"description"`
	Enabled     bool   `json:"enabled"`
}

type Routes

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

func New

func New(store FeatureStore, notifier Notifier) *Routes

func (*Routes) ServeHTTP

func (routes *Routes) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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