Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccessTokenRow ¶ added in v0.4.0
type AccessTokenRow struct {
Token entity.PersonalAccessToken
OwnerName string
OwnerEmail string
}
AccessTokenRow is the view model for one Personal Access Token in the admin access-tokens table. OwnerName / OwnerEmail are joined from the user table so the row can show who owns the token without an N+1 lookup. PATs are general-purpose bearers — MCP is just one caller — so the surface lives at /admin/access-tokens.
type ConnectionRow ¶ added in v0.4.0
type ConnectionRow struct {
UserID string
OwnerName string
OwnerEmail string
ClientID string
ClientName string
GrantedAt time.Time
LastUsedAt *time.Time
TokenCount int
}
ConnectionRow is the view model for one (user, OAuth client) grant in the admin connections table. Owner fields come from the user table; Granted/LastUsed/TokenCount are aggregated across the active access + refresh tokens for that pair.
type ConnectorAccountAdminRow ¶ added in v1.2.9
type ConnectorAccountAdminRow struct {
Account entity.ConnectorAccount
OwnerLabel string
TagIDs []string
// Access is the reach badge for the ACCOUNT itself — an account's tags
// are a separate grant from its row's, which is exactly the distinction
// that is easy to get wrong when reading the page.
Access AccessSummary
TagNames []string
}
ConnectorAccountAdminRow is the view model for one connected OAuth account under its connector instance. OwnerLabel is the wick user who connected it ("" when the account predates ownership being recorded).
type ConnectorAdminRow ¶ added in v0.4.0
type ConnectorAdminRow struct {
Connector entity.Connector
ModuleName string
ModuleIcon string
ModuleMissing bool
// OwnerLabel is Connector.CreatedBy as a person. The raw column is a
// uuid, and the owner of an instance is the one non-admin who can
// configure it and see every account connected to it — a question the
// page can only answer with a name.
OwnerLabel string
TagIDs []string
// Accounts are the OAuth identities connected to this instance, listed
// underneath it. Each one is taggable in its own right: an account is
// private to whoever connected it unless the instance shares the whole
// pool, so a tag here is how an admin hands ONE account to a team.
Accounts []ConnectorAccountAdminRow
// Access is the reach badge; TagNames feeds the search blob.
Access AccessSummary
TagNames []string
}
ConnectorAdminRow is the view model for a single connector instance in the admin connectors table. ModuleName/Icon come from the in-memory registry; when the row's Key has no registered module (deleted from code after a deploy) ModuleMissing is true so the UI can mark it.
type JobRow ¶
type JobRow struct {
Job entity.Job
Disabled bool
IsSystem bool
TagIDs []string
ConfigCount int
// Access is the reach badge; TagNames feeds the search blob.
Access AccessSummary
TagNames []string
}
JobRow is the view model for a single job row in the admin jobs table.
IsSystem mirrors the entity.Tag.IsSystem flag for any tag attached to this job's path. When true the row is rendered read-only — no Hide button, tag picker locked, no Save — because a System job is owned by code (see internal/tags/defaults.go and connector-runs-purge for the canonical example). Server-side guards in handler.setJobDisabled and handler.setJobTags backstop the same rule.
type MergeTarget ¶ added in v1.0.0
MergeTarget is one selectable destination account.
type ResourceAdminRow ¶ added in v0.17.0
type ResourceAdminRow struct {
ID string
Name string
Icon string
CreatedBy string
// OwnerLabel is CreatedBy rendered as a person: the wick user's name and
// email. A raw uuid in the Owner column names nobody — an admin reading
// the page cannot tell whose project it is without looking the id up by
// hand, which is the one question the column exists to answer. Falls back
// to the id when it resolves to no user (a deleted account, or an id that
// was never a user at all), because showing the id beats showing nothing.
OwnerLabel string
TagIDs []string
Path string
// Access is who can reach this row — see AccessBadge. Zero value renders
// as a public badge, which is what an untagged row is.
Access AccessSummary
// TagNames feeds the search blob so a row is findable by the tag it
// carries, not only by name or id.
TagNames []string
// Locked, when set, is why this row can never be shared (the Captain, a
// remote set to "Only me"). The row is listed so an admin sees it exists,
// but it shows no access badge and no tag picker.
Locked string
}
ResourceAdminRow is a generic view model used by the Projects, Workflows, and Skills admin pages. Each row shows a name, optional icon, optional created-by audit field, and a tag picker addressed by Path.
type ToolRow ¶
type ToolRow struct {
Tool tool.Tool
Visibility entity.ToolVisibility
Disabled bool
TagIDs []string
ConfigCount int
// Access is the reach badge; TagNames feeds the search blob.
Access AccessSummary
TagNames []string
}
ToolRow is the view model for a single tool row in the admin table.
type UserCreateResult ¶ added in v0.16.0
UserCreateResult carries the one-time outcome of an admin "Add user" submit. Password is the freshly generated plaintext, surfaced once in a banner on the synchronous POST response and never stored or shown again. ErrMsg holds a creation error (e.g. duplicate email) to render instead. All fields are zero on a normal page load.
type UserOption ¶ added in v1.2.9
UserOption is one entry in a user picker — the "Run as" select on the schedules page, and the "Owner" select on projects and connectors. Label is the display name the admin reads; ID is what the form posts back.
type UserRow ¶
type UserRow struct {
User *entity.User
TagIDs []string
// NeedsMerge marks an account created by a channel that reports no email
// (Telegram), which wick therefore could not match to a person. Such a row
// is not meant to be approved on its own — approving it would leave that
// person with two accounts — so the UI offers a merge instead.
NeedsMerge bool
// MergeTargets lists the accounts this one may be folded into. Only
// approved non-channel accounts, since merging into a pending or synthetic
// account just moves the problem.
MergeTargets []MergeTarget
// Self marks the row belonging to the admin looking at the page. It is
// the one account "View as" is not offered for — switching into yourself
// does nothing except strand the return cookie.
Self bool
}
UserRow is the view model for a single user row in the admin table.