html

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: MPL-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package html provides the otf web app, serving up HTML formatted pages and associated assets (CSS, JS, etc).

Index

Constants

View Source
const (
	FlashSuccess flashType = "success"
	FlashError   flashType = "error"
)
View Source
const DefaultPathPrefix = "/"

Variables

This section is empty.

Functions

func AddRoutes

func AddRoutes(logger logr.Logger, config *Config, srvConfig *otfhttp.ServerConfig, services otf.Application, router *otfhttp.Router) error

AddRoutes adds routes for the html web app.

Types

type Application

type Application struct {

	// otf service accessors
	otf.Application

	// logger for logging messages
	logr.Logger
	// server-side-events server
	*sse.Server
	// contains filtered or unexported fields
}

Application is the otf web app.

type ApplicationOption

type ApplicationOption func(*Application)

func WithSiteToken

func WithSiteToken(token string) ApplicationOption

type Authenticator

type Authenticator struct {
	otf.Cloud
	otf.Application
}

Authenticator logs people onto the system, synchronising their user account and various organization and team memberships from an external directory.

func (*Authenticator) RequestPath

func (a *Authenticator) RequestPath() string

type Config

type Config struct {
	DevMode bool
	// contains filtered or unexported fields
}

Config is the web app configuration.

func NewConfigFromFlags

func NewConfigFromFlags(flags *pflag.FlagSet) *Config

NewConfigFromFlags binds flags to the config. The flagset must be parsed in order for the config to be populated.

type UserList

type UserList struct {
	Items []*otf.User
	// contains filtered or unexported fields
}

func (UserList) OrganizationName

func (l UserList) OrganizationName() string

func (UserList) TeamName

func (l UserList) TeamName() string

Jump to

Keyboard shortcuts

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