ui

package
v0.5.14 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: MPL-2.0 Imports: 45 Imported by: 0

Documentation

Overview

templ: version: v0.3.977

templ: version: v0.3.977

templ: version: v0.3.977

templ: version: v0.3.977

templ: version: v0.3.977

templ: version: v0.3.977

templ: version: v0.3.977

templ: version: v0.3.977

templ: version: v0.3.977

templ: version: v0.3.977

templ: version: v0.3.977

templ: version: v0.3.977

templ: version: v0.3.977

templ: version: v0.3.977

templ: version: v0.3.977

Index

Constants

View Source
const (
	EventLogChunk    sseEvent = "log_update"
	EventLogFinished sseEvent = "log_finished"
)
View Source
const (

	//
	// VCS trigger strategies to present to the user.
	//
	// every vcs event trigger runs
	VCSTriggerAlways string = "always"
	// only vcs events with changed files matching a set of glob patterns
	// triggers run
	VCSTriggerPatterns string = "patterns"
	// only push tag vcs events trigger runs
	VCSTriggerTags string = "tags"
)

Variables

This section is empty.

Functions

func ConnectionSteps

func ConnectionSteps(current ConnectionStep) templ.Component

func Icon

func Icon() templ.Component

func RepoURL

func RepoURL(provider *vcs.Provider, repo vcs.Repo) templ.SafeURL

Types

type ConfigVersionService added in v0.5.8

type ConfigVersionService interface {
	GetSourceIcon(source source.Source) templ.Component
}

type ConnectionStep

type ConnectionStep int
const (
	ConnectStep ConnectionStep = iota
	SelectRepoStep
)

steps for connecting a workspace/module to repo

type GithubAppService added in v0.5.8

type GithubAppService interface {
	CreateApp(context.Context, github.CreateAppOptions) (*github.App, error)
	GetApp(context.Context) (*github.App, error)
	DeleteApp(context.Context) error
	ListInstallations(context.Context) ([]vcs.Installation, error)
	DeleteInstallation(context.Context, int64) error
}

type Handlers

type Handlers struct {
	Logger                       logr.Logger
	Runs                         RunService
	Workspaces                   WorkspaceService
	Users                        UserService
	Teams                        TeamClient
	Organizations                OrganizationService
	Modules                      ModuleService
	VCSProviders                 *vcs.Service
	State                        *state.Service
	Runners                      runnerClient
	GithubApp                    GithubAppService
	EngineService                *engine.Service
	Configs                      ConfigVersionService
	HostnameService              HostnameService
	Tokens                       sessionService
	Authorizer                   authz.Interface
	AuthenticatorService         loginService
	VariablesService             *variable.Service
	GithubHostname               *internal.WebURL
	SkipTLSVerification          bool
	SiteToken                    string
	RestrictOrganizationCreation bool
	// contains filtered or unexported fields
}

Handlers registers all UI handlers

func NewHandlers added in v0.5.8

func NewHandlers(
	Logger logr.Logger,
	Runs *run.Service,
	Workspaces *workspace.Service,
	Users *user.Service,
	Teams *team.Service,
	Organizations *organization.Service,
	Modules *module.Service,
	VCSProviders *vcs.Service,
	State *state.Service,
	Runners *runner.Service,
	GithubApp *github.Service,
	EngineService *engine.Service,
	Configs *configversion.Service,
	HostnameService *internal.HostnameService,
	Tokens *tokens.Service,
	Authorizer *authz.Authorizer,
	AuthenticatorService *authenticator.Service,
	VariablesService *variable.Service,
	GithubHostname *internal.WebURL,
	SkipTLSVerification bool,
	SiteToken string,
	RestrictOrganizationCreation bool,
) *Handlers

func (*Handlers) AddHandlers

func (h *Handlers) AddHandlers(r *mux.Router)

AddHandlers registers all UI handlers with the router

type HostnameService added in v0.5.8

type HostnameService interface {
	Hostname() string
	URL(path string) string
	WebhookURL(path string) string
}

type ModuleService added in v0.5.8

type ModuleService interface {
	GetModuleByID(context.Context, resource.TfeID) (*module.Module, error)
	ListModules(context.Context, module.ListOptions) ([]*module.Module, error)
	ListProviders(context.Context, organization.Name) ([]string, error)
	GetModuleInfo(context.Context, resource.TfeID) (*module.TerraformModule, error)
	PublishModule(context.Context, module.PublishOptions) (*module.Module, error)
	DeleteModule(context.Context, resource.TfeID) (*module.Module, error)
}

type ReposTable

type ReposTable struct {
	Actions func(repo vcs.Repo) templ.Component
}

func (ReposTable) Header

func (t ReposTable) Header() templ.Component

func (ReposTable) Row

func (t ReposTable) Row(repo vcs.Repo) templ.Component

type RunService added in v0.5.8

type RunService interface {
	Create(context.Context, resource.TfeID, run.CreateOptions) (*run.Run, error)
	List(_ context.Context, opts run.ListOptions) (*resource.Page[*run.Run], error)
	Get(ctx context.Context, id resource.TfeID) (*run.Run, error)
	GetChunk(ctx context.Context, opts run.GetChunkOptions) (run.Chunk, error)
	Cancel(ctx context.Context, id resource.TfeID) error
	ForceCancel(ctx context.Context, id resource.TfeID) error
	Discard(ctx context.Context, id resource.TfeID) error
	Tail(context.Context, run.TailOptions) (<-chan run.Chunk, error)
	Delete(context.Context, resource.TfeID) error
	Apply(context.Context, resource.TfeID) error
	Watch(ctx context.Context) (<-chan pubsub.Event[*run.Event], func())
}

type TeamClient added in v0.5.8

type TeamClient interface {
	Create(ctx context.Context, organization organization.Name, opts team.CreateTeamOptions) (*team.Team, error)
	Get(ctx context.Context, organization organization.Name, teamName string) (*team.Team, error)
	GetByID(ctx context.Context, teamID resource.TfeID) (*team.Team, error)
	List(ctx context.Context, organization organization.Name) ([]*team.Team, error)
	Update(ctx context.Context, teamID resource.TfeID, opts team.UpdateTeamOptions) (*team.Team, error)
	Delete(ctx context.Context, teamID resource.TfeID) error
}

type UserService added in v0.5.8

type UserService interface {
	Create(ctx context.Context, username string, opts ...user.NewUserOption) (*user.User, error)
	List(ctx context.Context) ([]*user.User, error)
	ListOrganizationUsers(ctx context.Context, organization organization.Name) ([]*user.User, error)
	ListTeamUsers(ctx context.Context, teamID resource.TfeID) ([]*user.User, error)
	GetUser(ctx context.Context, spec user.UserSpec) (*user.User, error)
	Delete(ctx context.Context, username user.Username) error
	AddTeamMembership(ctx context.Context, teamID resource.TfeID, usernames []user.Username) error
	RemoveTeamMembership(ctx context.Context, teamID resource.TfeID, usernames []user.Username) error

	CreateToken(ctx context.Context, opts user.CreateUserTokenOptions) (*user.UserToken, []byte, error)
	ListTokens(ctx context.Context) ([]*user.UserToken, error)
	DeleteToken(ctx context.Context, tokenID resource.TfeID) error
}

type WorkspaceService added in v0.5.8

type WorkspaceService interface {
	Get(context.Context, resource.TfeID) (*workspace.Workspace, error)
	Watch(ctx context.Context) (<-chan pubsub.Event[*workspace.Event], func())
	List(ctx context.Context, opts workspace.ListOptions) (*resource.Page[*workspace.Workspace], error)
	ListTags(ctx context.Context, organization organization.Name, opts workspace.ListTagsOptions) (*resource.Page[*workspace.Tag], error)
	Create(ctx context.Context, opts workspace.CreateOptions) (*workspace.Workspace, error)
	GetByName(ctx context.Context, organization organization.Name, workspace string) (*workspace.Workspace, error)
	GetWorkspacePolicy(ctx context.Context, workspaceID resource.TfeID) (workspace.Policy, error)
	Update(ctx context.Context, workspaceID resource.TfeID, opts workspace.UpdateOptions) (*workspace.Workspace, error)
	Delete(ctx context.Context, workspaceID resource.TfeID) (*workspace.Workspace, error)
	Lock(ctx context.Context, workspaceID resource.TfeID, runID *resource.TfeID) (*workspace.Workspace, error)
	Unlock(ctx context.Context, workspaceID resource.TfeID, runID *resource.TfeID, force bool) (*workspace.Workspace, error)
	SetPermission(ctx context.Context, workspaceID, teamID resource.TfeID, role authz.Role) error
	UnsetPermission(ctx context.Context, workspaceID, teamID resource.TfeID) error
	DeleteTags(ctx context.Context, organization organization.Name, tagIDs []resource.TfeID) error
	AddTags(ctx context.Context, workspaceID resource.TfeID, tags []workspace.TagSpec) error
	RemoveTags(ctx context.Context, workspaceID resource.TfeID, tags []workspace.TagSpec) error
}

Directories

Path Synopsis
templ: version: v0.3.977
templ: version: v0.3.977
Package paths provides rails-style path helpers for use with the web app.
Package paths provides rails-style path helpers for use with the web app.

Jump to

Keyboard shortcuts

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