api

package
v0.0.0-...-1bf5030 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package api implements the core API functionality for the template plugin. It provides the main API structure and configuration for HTTP routing.

Package api implements the REST API handlers for the template plugin

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API represents the main API structure for the template plugin. It holds references to core services and configuration needed for operation.

func NewAPI

func NewAPI() (*API, []core.ContextBuilderOption, error)

NewAPI creates a new instance of the template plugin API. It returns the API instance and context builder options needed for initialization.

func (*API) AuthTokenName

func (a *API) AuthTokenName() string

AuthTokenName returns the name of the authentication token used by the plugin

func (*API) Config

func (a *API) Config() config.APIConfig

Config returns the plugin's configuration structure

func (*API) Configure

func (a *API) Configure(router *mux.Router, accessSvc core.AccessService) error

Configure sets up all routes and middleware for the API. It handles both API endpoints and static file serving for the webapp.

func (*API) Name

func (a *API) Name() string

Name returns the plugin's name identifier

func (*API) Subdomain

func (a *API) Subdomain() string

Subdomain returns the plugin name as the subdomain

Directories

Path Synopsis
Package messages defines the request and response structures for the template plugin API
Package messages defines the request and response structures for the template plugin API

Jump to

Keyboard shortcuts

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