adminops

package
v0.19.1303 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: AGPL-3.0 Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	AllowedHostsStatusUnrestricted = "unrestricted"
	AllowedHostsStatusAllowed      = "allowed"
	AllowedHostsStatusViolation    = "violation"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AllowedHostsScanOptions added in v0.19.1302

type AllowedHostsScanOptions struct {
	AllConfigs bool
}

type AllowedHostsScanResult added in v0.19.1302

type AllowedHostsScanResult struct {
	Mode       string                `json:"mode"`
	AllConfigs bool                  `json:"all_configs"`
	Total      int                   `json:"total"`
	Violations int                   `json:"violations"`
	Rows       []AllowedHostsScanRow `json:"rows"`
}

type AllowedHostsScanRow added in v0.19.1302

type AllowedHostsScanRow struct {
	OrgID    string   `json:"org_id"`
	Category string   `json:"category"`
	Value    string   `json:"value"`
	Status   string   `json:"status"`
	Reason   string   `json:"reason,omitempty"`
	Fields   []string `json:"fields"`
	AppIDs   []string `json:"app_ids"`
}

type MigrationsSummary added in v0.19.1293

type MigrationsSummary struct {
	Total      int `json:"total"`
	Applied    int `json:"applied"`
	InProgress int `json:"in_progress"`
	Errored    int `json:"errored"`
}

func SummarizeMigrations added in v0.19.1293

func SummarizeMigrations(rows []migrations.MigrationModel) *MigrationsSummary

type Ops

type Ops struct {
	// contains filtered or unexported fields
}

func New

func New(params Params) *Ops

func (*Ops) ListMigrations added in v0.19.1293

func (o *Ops) ListMigrations(ctx context.Context) ([]migrations.MigrationModel, error)

func (*Ops) Promote

func (o *Ops) Promote(ctx context.Context, tag string) (*PromoteResult, error)

func (*Ops) PromoteOnce

func (o *Ops) PromoteOnce(ctx context.Context, tag string) (*PromoteResult, error)

func (*Ops) ScanAllowedHosts added in v0.19.1302

func (o *Ops) ScanAllowedHosts(ctx context.Context, policy *urlpolicy.Policy, opts AllowedHostsScanOptions) (*AllowedHostsScanResult, error)

func (*Ops) UpdateInstallRunners

func (o *Ops) UpdateInstallRunners(ctx context.Context, tag string, opts UpdateRunnersOptions) (*UpdateRunnersResult, error)

func (*Ops) WithActor

func (o *Ops) WithActor(ctx context.Context) (context.Context, error)

type Params

type Params struct {
	fx.In

	DB             *gorm.DB `name:"psql"`
	AcctClient     *account.Client
	QueueClient    *queueclient.Client
	GeneralHelpers *generalhelpers.Helpers
	Enqueuer       *enqueuer.Enqueuer
}

type PromoteResult

type PromoteResult struct {
	Tag           string `json:"tag"`
	QueueSignalID string `json:"queue_signal_id"`
	Deduplicated  bool   `json:"deduplicated"`
}

type RunnerUpdateFailure

type RunnerUpdateFailure struct {
	RunnerID string `json:"runner_id"`
	Error    string `json:"error"`
}

type UpdateRunnersOptions

type UpdateRunnersOptions struct {
	DryRun   bool
	Shutdown bool
}

type UpdateRunnersResult

type UpdateRunnersResult struct {
	Tag             string                `json:"tag"`
	DryRun          bool                  `json:"dry_run"`
	Shutdown        bool                  `json:"shutdown"`
	Total           int                   `json:"total"`
	Updated         int                   `json:"updated"`
	Skipped         int                   `json:"skipped"`
	Failed          int                   `json:"failed"`
	ShutdownSkipped int                   `json:"shutdown_skipped,omitempty"`
	RunnerIDs       []string              `json:"runner_ids,omitempty"`
	Failures        []RunnerUpdateFailure `json:"failures,omitempty"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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