ui

package
v0.5.18 Latest Latest
Warning

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

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

Documentation

Overview

templ: version: v0.3.1001

templ: version: v0.3.1001

templ: version: v0.3.1001

templ: version: v0.3.1001

templ: version: v0.3.1001

templ: version: v0.3.1001

templ: version: v0.3.1001

templ: version: v0.3.1001

templ: version: v0.3.1001

templ: version: v0.3.1001

templ: version: v0.3.1001

templ: version: v0.3.1001

templ: version: v0.3.1001

templ: version: v0.3.1001

templ: version: v0.3.1001

templ: version: v0.3.1001

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
	Hostnames                    HostnameClient
	Sessions                     sessionService
	Authorizer                   authz.Interface
	AuthenticatorService         loginService
	VariablesService             *variable.Service
	GithubHostname               *internal.WebURL
	SSHKeys                      *sshkey.Service
	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,
	Sessions sessionService,
	Authorizer *authz.Authorizer,
	AuthenticatorService *authenticator.Service,
	VariablesService *variable.Service,
	GithubHostname *internal.WebURL,
	SSHKeys *sshkey.Service,
	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 HostnameClient added in v0.5.18

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

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 OrganizationService added in v0.5.8

type OrganizationService interface {
	CreateOrganization(ctx context.Context, opts organization.CreateOptions) (*organization.Organization, error)
	UpdateOrganization(ctx context.Context, name organization.Name, opts organization.UpdateOptions) (*organization.Organization, error)
	GetOrganization(ctx context.Context, name organization.Name) (*organization.Organization, error)
	ListOrganizations(ctx context.Context, opts organization.ListOptions) (*resource.Page[*organization.Organization], error)
	DeleteOrganization(ctx context.Context, name organization.Name) error

	CreateOrganizationToken(ctx context.Context, opts organization.CreateOrganizationTokenOptions) (*organization.OrganizationToken, []byte, error)
	ListOrganizationTokens(ctx context.Context, org organization.Name) ([]*organization.OrganizationToken, error)
	DeleteOrganizationToken(ctx context.Context, org organization.Name) 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 {
	CreateRun(context.Context, resource.TfeID, run.CreateOptions) (*run.Run, error)
	ListRuns(_ context.Context, opts run.ListOptions) (*resource.Page[*run.Run], error)
	GetRun(ctx context.Context, id resource.TfeID) (*run.Run, error)
	GetChunk(ctx context.Context, opts run.GetChunkOptions) (run.Chunk, error)
	CancelRun(ctx context.Context, id resource.TfeID) error
	ForceCancelRun(ctx context.Context, id resource.TfeID) error
	DiscardRun(ctx context.Context, id resource.TfeID) error
	TailRun(context.Context, run.TailOptions) (<-chan run.Chunk, error)
	DeleteRun(context.Context, resource.TfeID) error
	ApplyRun(context.Context, resource.TfeID) error
	WatchRuns(ctx context.Context) (<-chan pubsub.Event[*run.Event], func())
}

type TeamClient added in v0.5.8

type TeamClient interface {
	CreateTeam(ctx context.Context, organization organization.Name, opts team.CreateTeamOptions) (*team.Team, error)
	GetTeam(ctx context.Context, organization organization.Name, teamName string) (*team.Team, error)
	GetTeamByID(ctx context.Context, teamID resource.TfeID) (*team.Team, error)
	ListTeams(ctx context.Context, organization organization.Name) ([]*team.Team, error)
	UpdateTeam(ctx context.Context, teamID resource.TfeID, opts team.UpdateTeamOptions) (*team.Team, error)
	DeleteTeam(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 {
	GetWorkspace(context.Context, resource.TfeID) (*workspace.Workspace, error)
	WatchWorkspaces(ctx context.Context) (<-chan pubsub.Event[*workspace.Event], func())
	ListWorkspaces(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)
	CreateWorkspace(ctx context.Context, opts workspace.CreateOptions) (*workspace.Workspace, error)
	GetWorkspaceByName(ctx context.Context, organization organization.Name, workspace string) (*workspace.Workspace, error)
	GetWorkspacePolicy(ctx context.Context, workspaceID resource.TfeID) (workspace.Policy, error)
	UpdateWorkspace(ctx context.Context, workspaceID resource.TfeID, opts workspace.UpdateOptions) (*workspace.Workspace, error)
	DeleteWorkspace(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)
	SetWorkspacePermission(ctx context.Context, workspaceID, teamID resource.TfeID, role authz.Role) error
	UnsetWorkspacePermission(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.1001
templ: version: v0.3.1001
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.
Package session handles user sessions.
Package session handles user sessions.
Package static contains static assets and code relating to serving of static assets.
Package static contains static assets and code relating to serving of static assets.

Jump to

Keyboard shortcuts

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