html

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: MPL-2.0 Imports: 32 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 {
	// OAuth identity provider config
	*otf.CloudConfig
	otf.Application
}

Authenticator logs people onto the system using an OAuth handshake with an Identity provider before synchronising their user account and various organization and team memberships from the provider.

func (*Authenticator) RequestPath

func (a *Authenticator) RequestPath() string

func (*Authenticator) String added in v0.0.18

func (a *Authenticator) String() string

String provides a human readable name for the authenticator, reflecting the name of the cloud providing authentication.

type Config

type Config struct {
	DevMode      bool
	CloudConfigs cloudDB
}

Config is the web app configuration.

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