models

package
v1.9.0-test4 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: LGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RolesMap = map[Role]struct{}{
	RoleOwner:  {},
	RoleAdmin:  {},
	RoleMember: {},
	RoleNone:   {},
}

RolesMap is used for checking if a role is valid.

Functions

This section is empty.

Types

type BuildCardinalFlags

type BuildCardinalFlags struct {
	Config    string
	LogLevel  string
	Debug     bool
	Telemetry bool
	Push      string
	Auth      string
	User      string
	Pass      string
	RegToken  string
}

type ChangeUserRoleInOrganizationFlags

type ChangeUserRoleInOrganizationFlags struct {
	Email string
	Role  string
}

type CommandState

type CommandState struct {
	LoggedIn      bool
	CurrRepoKnown bool
	User          *User
	Organization  *Organization
	Project       *Project
}

type CreateOrganizationFlags

type CreateOrganizationFlags struct {
	Name string
	Slug string
}

type CreateProjectFlags

type CreateProjectFlags struct {
	Name string
	Slug string
}

type Credential

type Credential struct {
	Token          string    `json:"token"`
	TokenExpiresAt time.Time `json:"token_expires_at,omitempty"`
	ID             string    `json:"id"`
	Name           string    `json:"name"`
	Email          string    `json:"email"`
}

type DeploymentHealthCheckResult

type DeploymentHealthCheckResult struct {
	OK      bool `json:"ok"`
	Offline bool `json:"offline"`
}

Parse the response into a map of environment names to their status.

type DeploymentPreview

type DeploymentPreview struct {
	OrgName        string   `json:"org_name"`
	OrgSlug        string   `json:"org_slug"`
	ProjectName    string   `json:"project_name"`
	ProjectSlug    string   `json:"project_slug"`
	ExecutorName   string   `json:"executor_name"`
	DeploymentType string   `json:"deployment_type"`
	TickRate       int      `json:"tick_rate"`
	Regions        []string `json:"regions"`
}

type DevCardinalFlags

type DevCardinalFlags struct {
	Config    string
	Editor    bool
	PrettyLog bool
}

type InviteUserToOrganizationFlags

type InviteUserToOrganizationFlags struct {
	Email string
	Role  string
}

type LoginRequirement

type LoginRequirement int

LoginRequirement defines what level of login is needed.

const (
	IgnoreLogin LoginRequirement = iota // don't care if we are logged in or not
	NeedLogin
)

type LoginToken

type LoginToken struct {
	Status string `json:"status"`
	JWT    string `json:"jwt"`
}

LoginToken struct for argusID.

type MembersListFlags

type MembersListFlags struct {
	IncludeRemoved bool
}

type Organization

type Organization struct {
	ID               string `json:"id"`
	Name             string `json:"name"`
	Slug             string `json:"slug"`
	CreatedTime      string `json:"created_time"`
	UpdatedTime      string `json:"updated_time"`
	OwnerID          string `json:"owner_id"`
	Deleted          bool   `json:"deleted"`
	DeletedTime      string `json:"deleted_time"`
	BaseShardAddress string `json:"base_shard_address"`
}

type OrganizationMember

type OrganizationMember struct {
	Role Role `json:"role"`
	User User `json:"user"`
}

type Project

type Project struct {
	ID           string        `json:"id"`
	OrgID        string        `json:"org_id"`
	OwnerID      string        `json:"owner_id"`
	Name         string        `json:"name"`
	Slug         string        `json:"slug"`
	CreatedTime  string        `json:"created_time"`
	UpdatedTime  string        `json:"updated_time"`
	Deleted      bool          `json:"deleted"`
	DeletedTime  string        `json:"deleted_time"`
	RepoURL      string        `json:"repo_url"`
	RepoToken    string        `json:"repo_token"`
	RepoPath     string        `json:"repo_path"`
	DeploySecret string        `json:"deploy_secret,omitempty"`
	Config       ProjectConfig `json:"config"`

	Update bool `json:"-"`
}

type ProjectConfig

type ProjectConfig struct {
	Region  []string             `json:"region"`
	Discord ProjectConfigDiscord `json:"discord"`
	Slack   ProjectConfigSlack   `json:"slack"`
}

type ProjectConfigDiscord

type ProjectConfigDiscord struct {
	Enabled bool   `json:"enabled"`
	Token   string `json:"token"`
	Channel string `json:"channel"`
}

type ProjectConfigSlack

type ProjectConfigSlack struct {
	Enabled bool   `json:"enabled"`
	Token   string `json:"token"`
	Channel string `json:"channel"`
}

type PurgeCardinalFlags

type PurgeCardinalFlags struct {
	Config string
}

type RestartCardinalFlags

type RestartCardinalFlags struct {
	Config string
	Detach bool
	Debug  bool
}

type Role

type Role string
const (
	RoleMember Role = "member"
	RoleAdmin  Role = "admin"
	RoleOwner  Role = "owner"
	RoleNone   Role = "none"
)

type SetupRequest

type SetupRequest struct {
	LoginRequired        LoginRequirement
	OrganizationRequired SetupRequirement
	ProjectRequired      SetupRequirement
}

SetupRequest defines what a command needs to be properly initialized.

type SetupRequirement

type SetupRequirement int

SetupRequirement defines what level of setup is needed for each component.

const (
	Ignore             SetupRequirement = iota
	NeedRepoLookup                      // we need to lookup the project from the git repo
	NeedIDOnly                          // we only need the id
	NeedExistingIDOnly                  // need id but can't create new one
	NeedData                            // we need all the data, can create new one
	NeedExistingData                    // we must have all the data but we can't create a new one
	MustNotExist                        // we must not have this
)

type StartCardinalFlags

type StartCardinalFlags struct {
	Config     string
	Detach     bool
	LogLevel   string
	Debug      bool
	Telemetry  bool
	Editor     bool
	EditorPort string
}

type StartEVMFlags

type StartEVMFlags struct {
	Config      string
	DAAuthToken string
	UseDevDA    bool
}

type StopCardinalFlags

type StopCardinalFlags struct {
	Config string
}

type StopEVMFlags

type StopEVMFlags struct {
	Config string
}

type SwitchOrganizationFlags

type SwitchOrganizationFlags struct {
	Slug string
}

type SwitchProjectFlags

type SwitchProjectFlags struct {
	Slug string
}

type TemporaryCredential

type TemporaryCredential struct {
	AccessKeyID     string `json:"access_key_id"`
	SecretAccessKey string `json:"secret_access_key"`
	SessionToken    string `json:"session_token"`
	Region          string `json:"region"`
	RepoURI         string `json:"repo_uri"`
}

type UpdateProjectFlags

type UpdateProjectFlags struct {
	Name string
	Slug string
}

type UpdateUserFlags

type UpdateUserFlags struct {
	Name string
}

type User

type User struct {
	ID    string `json:"id,omitempty"`
	Name  string `json:"name"`
	Email string `json:"email"`
}

Jump to

Keyboard shortcuts

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