api

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Route variable names
	RouteVariableBundleID  = "bundle-id"
	RouteVariableContentID = "content-id"

	// Route names
	RouteNameGetBundle      = "getBundle"
	RouteNamePostBundle     = "createBundle"
	RouteNamePutBundle      = "putBundle"
	RouteNamePutBundleState = "putBundleState"
	RouteNameDeleteBundle   = "deleteBundle"

	RouteNameGetBundleContents  = "getBundleContents"
	RouteNamePostBundleContents = "postBundleContents"
	RouteNameDeleteContentItem  = "deleteContentItem"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleAPI added in v1.2.0

type BundleAPI struct {
	Router *mux.Router
	Store  *store.Datastore
	// contains filtered or unexported fields
}

API provides a struct to wrap the api around

func Setup

func Setup(ctx context.Context, cfg *config.Config, router *mux.Router, dataStore *store.Datastore, stateMachineBundleAPI *application.StateMachineBundleAPI, authMiddleware auth.Middleware, cli dphttp.Clienter) *BundleAPI

Setup function sets up the api and returns an api

func (BundleAPI) CreateAndValidateBundleUpdate added in v1.4.0

func (api BundleAPI) CreateAndValidateBundleUpdate(r *http.Request, bundleID string, currentBundle *models.Bundle, email string) (*models.Bundle, []*models.Error, error)

Helper function to create and validate bundle update

func (*BundleAPI) GetAuthEntityData added in v1.4.0

func (api *BundleAPI) GetAuthEntityData(r *http.Request) (*models.AuthEntityData, error)

Jump to

Keyboard shortcuts

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