api

package
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 25 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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, 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