httpapi

package
v0.1.73 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Operations = []string{"connections", "repos", "refs", "commits", "files", "pipelines", "pipeline-executions", "cache", "cache-owners"}
	Actions    = []string{"cache-prune", "cache-evict", "cache-rebind"}
)

Operations are the read-only GET operations; Actions the POST operations that change the git cache.

Functions

func AddOpenAPI

func AddOpenAPI(spec *rpc.OpenAPISpec, prefix string)

func ErrorStatus

func ErrorStatus(err error) int

Types

type API

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

func New

func New(options Options) (*API, error)

func (*API) Handler

func (a *API) Handler(operation string) http.HandlerFunc

type Options

type Options struct {
	Authorize        func(context.Context) error
	AuthorizeActions func(context.Context) error
	Service          func(context.Context) (*browse.Service, error)
}

Options configures New: Authorize admits Operations, AuthorizeActions admits Actions.

Jump to

Keyboard shortcuts

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