package
0.0.0-20230628214157-3bfe64699e82
Repository: https://github.com/gravitational/gravity.git
Documentation: pkg.go.dev

# Packages

package allocator manages allocation of resources.
No description provided by the author
Package keyval implements Etcd and BoltDB powered storage.
package suite contains a storage acceptance test suite that is backend implementation independent each storage will use the suite to test itself.

# Functions

CanonicalKind translates the specified kind to canonical form.
CheckUserToken returns nil if the value is correct, error otherwise.
ClusterAdminAgent generates the name of the admin agent user for the specified cluster.
ClusterAgent generates the name of the agent user for the specified cluster.
DeepComparePhases compares the actual phase to the expected phase omitting some insignificant fields like description or UI step number.
DefaultAuthGateway returns auth gateway resource with default parameters.
DefaultNDMConfig returns a default NDM config.
No description provided by the author
DefaultPersistentStorage returns a new default persistent storage resource.
DisableAccess disables access for the remote Teleport cluster (Ops Center or installer wizard) with the specified name.
Encode YAML-encodes the specified list of resources into w.
GetAlertSchema returns alert schema for version V2.
GetAlertTargetSchema returns alert target schema for version V2.
GetAllowedLogins returns a list of unix logins that are set by default for admin users, this feature is going to be deprecated once we will be able to set roles via UI.
GetAuthGatewaySchema returns the full auth gateway resource schema.
GetClusterAgentCreds returns credentials for cluster agent - for regular nodes, this is unprivileged cluster agent that can pull updates - for master nodes, this is privileged agent, that can also do some cluster administration.
GetClusterLoginEntry returns login entry for the local cluster.
GetClusterSchema returns cluster schema for V2 resource.
GetDNSConfig returns the DNS configuration from the backend using fallback if no configuration is available.
GetEndpointsSchema returns the endpoints resource schema.
GetEnvironmentSpecSchema returns the formatted JSON schema for the cluster runtime environment variables resource.
GetLastOperation returns the last operation for the local cluster.
GetLastOperationForCluster returns the last operation for the specified cluster.
GetLocalPackage returns the local cluster application package.
GetLocalServers returns local cluster state servers.
GetLogForwarderMarshaler returns log forwarder marshaler.
GetLogForwarderSchema returns log forwarder JSON schema.
GetOperationByID returns the operation with the given ID for the local cluster.
GetOperations returns all operations for the local cluster sorted by time in descending order (with most recent operation first).
GetOperationSchema returns a cluster operation schema.
GetOperationsForCluster returns all operations for the specified cluster sorted by time in descending order (with most recent operation first).
GetPersistentStorageSchema returns the full persistent storage resource schema.
GetReleaseSchema returns the full release resource schema.
GetRepositorySchema returns V2 schema of the repository.
GetSMTPConfigSchema returns SMTP configuration schema for version V2.
GetSystemInfoSchema returns system information schema for version V2.
GetTLSKeyPairSchema returns TLS keypair schema for V2 resource.
GetTokenMarshaler returns token marshaler.
GetTokenSchema returns token schema for V2 resource.
GetTrustedCluster returns a trusted cluster representing the Ops Center the cluster is connected to, currently only 1 is supported.
GetWizardTrustedCluster returns a trusted cluster representing the wizard Ops Center the specified site is connected to.
Hostnames returns a list of hostnames for the provided servers.
IsValidOperationPhaseState returns true if the provided phase state is valid.
MarshalAlert marshals an alert into JSON.
MarshalAlertTarget marshals an alert target into JSON.
MarshalAuthGateway marshals provided auth gateway resource to JSON.
MarshalCluster marshals cluster into JSON.
MarshalEndpoints marshals the endpoints resource to JSON.
MarshalEnvironment marshals this resource as JSON.
MarshalOperation marshals operation resource as json.
MarshalPersistentStorage marshals persistent storage resource into a json.
MarshalRelease marshals provided release resource to JSON.
MarshalRepository marshalls repository into JSON.
MarshalSMTPConfig marshals SMTP config into JSON.
MarshalSystemInfo marshals the specified system info object to JSON.
MarshalTLSKeyPair marshals TLS keypair into JSON.
MarshalTrustedCluster marshals the provided trusted cluster into JSON.
MarshalUser marshals user to some representation.
NDMConfigFromConfigMap creates NDM config from the provided config map.
NewApp creates a new app from the provided locator.
NewAuthGateway creates a new auth gateway resource for the provided spec.
NewCluster returns instance of the new cluster.
NewClusterFromSite returns new cluster from stored site.
NewEndpoints creates a new endpoints resource from the provided spec.
NewEnvironment creates a new instance of the resource.
NewGithubConnector returns a new Github connector with specified name and spec.
NewLogForwarder creates a new log forwarder.
NewLogForwarderFromV1 creates a new log forwarder from legacy format.
NewOIDCConnector returns a new OIDC connector with specified name and spec.
NewPersistentStorage creates a new persistent storage resource from the provided spec.
NewRelease creates a new release resource from the provided Helm release.
NewRepository returns new repository object from repo name.
NewSAMLConnector returns a new SAML connector with specified name and spec.
NewSystemInfo creates a new instance of system information from the provided spec.
NewTLSKeyPair creates new TLS key pair from cert and private key.
NewToken returns instance of the new token.
NewTokenFromV1 creates token from API key.
NewTrustedCluster returns a new trusted cluster from the provided name and spec.
NewTrustedClusterFromLinks creates a trusted cluster from the legacy remote support and update links.
NewUser returns new user object based on the spec data, this is a helpful shortcut.
PersistentStorageFromNDMConfig creates a new persistent storage resource from the provided Node Device Manager configuration.
UnmarshalAlert unmarshals an alert from JSON.
UnmarshalAlertTarget unmarshals an alert target from JSON.
UnmarshalAuthGateway unmarshals auth gateway resource from the provided JSON data.
UnmarshalCluster unmarshals cluster from JSON.
UnmarshalEndpoints unmarshals the endpoints resource from JSON.
UnmarshalEnvironmentVariables unmarshals the resource from YAML/JSON given with data.
UnmarshalOperation unmarshals operation resource from json.
UnmarshalPersistentStorage unmarshals provided data into persistent storage resource.
UnmarshalRelease unmarshals release resource from the provided data.
UnmarshalRepository unmarshals repository from JSON.
UnmarshalSMTPConfig unmarshals SMTP configuration from JSON.
UnmarshalSystemInfo unmarshals system info from JSON specified with data.
UnmarshalTLSKeyPair unmarshals TLS keypair from JSON.
UnmarshalTrustedCluster unmarshals the trusted cluster resource from bytes.
UnmarshalUser unmarshals user from default representation.
UpsertCluster creates or updates cluster in the provided backend.
UpsertOperation creates or updates operation in the provided backend.

# Constants

AdminUser defines a user type with maximum permissions.
AgentUser defines a restricted user type used during OpsCenter operations.
AlertSpecV2Schema is JSON schema for a monitoring alert.
AlertTargetSpecV2Schema is JSON schema for a monitoring alert target.
AppRuntime defines a type for runtime apps Runtime apps serve as a backbone for user apps, they are the lowest-level base for any application (e.g.
AppService defines a type for service apps Service apps are "building blocks" that cannot be installed separately from a user app but provide essential services to user apps that take dependency on them (e.g.
AppUser defines a type for user apps User apps are the ones that a user builds, publishes into OpsCenters and installs (e.g.
ClusterSpecV2Schema is JSON schema for server.
DeviceDisk defines a block device.
DevicePartition defines a partition on a device.
EndpointsSpecV2Schema is the endpoints resource JSON schema.
EnvironmentSpecSchema is JSON schema for the cluster runtime environment variables resource.
Forever indicates to store value forever.
KindAccount represents account resource.
KindAlert defines the monitoring alert resource type.
KindAlertTarget defines the monitoring alert target resource type.
KindApp represents applications and packages.
KindAuthGateway defines the auth gateway resource type.
KindCluster is a resource kind for gravity clusters.
KindClusterConfiguration defines the resource that manages cluster configuration.
KindEndpoints defines the Ops Center endpoints resource type.
KindInvite defines the user invite token.
KindLicense represents Gravity software license.
KindLogForwarder is log forwarder resource kind.
KindObject represents binary object BLOB.
KindOperation is the cluster operation resource type.
KindPersistentStorage is the resource for managing persistent storage in the cluster.
KindRelease defines the application release resource type.
KindRepository represents repositories.
KindRuntimeEnvironment defines the resource that manages cluster environment variables.
KindSMTPConfig defines the monitoring SMTP configuration resource type.
KindSystemInfo defines the system information resource.
KindTLSKeyPair is a TLS key pair.
KindToken is security token (e.g.
LogForwarderV2Schema is the log forwarder JSON schema.
MaxLimit sets maximum pagination limit.
MetadataSchema is a copy of teleport/lib/services.MetadataSchema but with optional 'name' property because some Gravity resources do not require it.
NodeTypeAuth is a type of teleport node - SSH Auth server.
NodeTypeNode is a type of teleport node - SSH Node.
NodeTypeProxy is a type of teleport node - SSH Proxy server.
OperationPhaseStateCompleted means that the phase or all of its subphases have been completed.
OperationPhaseStateFailed means that the phase or all of its subphases have failed.
OperationPhaseStateInProgress means that the phase or any of its subphases haven't reached any of the final states yet.
OperationPhaseStateRolledBack means that the phase or all of its subphases have been rolled back.
OperationPhaseStateUnstarted means that the phase or all of its subphases haven't started executing yet.
OpsCenterRemoteAccessLink is a link used to provide remote access via Teleport.
OpsCenterUpdateLink is a link to fetch periodic updates.
ProvisioningTokenTypeExpand is used to validate joining nodes.
ProvisioningTokenTypeInstall is cluster agent token.
ProvisioningTokenTypeTeleport is used by Teleport nodes to authenticate with auth server.
ReasonClusterDegraded means one or more of cluster nodes are degraded.
ReasonLicenseInvalid means that the license installed on the site is not valid.
ReasonStatusCheckFailed means that the site's status check failed.
RegularUser user is standard interactive user.
RepositorySpecV2Schema is JSON schema for repository spec.
ServerUpdateFailed signifies an update operation failure state.
ServerUpdateInProgress signifies an ongoing operation.
ServerUpdateRollbackInProgress signifies the ongoing rollback operation.
ServerUpdateRollbackSuccess signifies a successfully rolled back operation.
ServerUpdateStart is the value of the operation state at start.
ServerUpdateSuccess signifies successfully completed operation.
SMTPConfigSpecV2Schema is JSON schema for SMTP configuration.
SystemSpecV2Schema is JSON schema for host system information.
TLSKeyPairSpecV2Schema is JSON schema for TLS keypair.
TokenSpecV2Schema is JSON schema for servernolint:gosec // not a credential.
No description provided by the author
UserSpecV2Extension is our extension to Teleport's user.
UserTokenTypeInvite adds new user to existing account.
UserTokenTypeReset resets user credentials.
VerbConnect is used to allow users to connect to clusters.
VerbReadSecrets is used to allow reading secrets.
VerbRegister is used to allow registering new clusters within an Ops Center.

# Variables

AuthGatewaySpecV1Schema defines the auth gateway spec schema.
DefaultDNSConfig defines the default cluster local DNS configuration.
DefaultSubnets defines a default Subnets descriptor to use for onprem installations.
LegacyDNSConfig defines the local DNS configuration on older clusters.
OperationNodeSchema is a single operation node json schema.
OperationPhaseStates is a list of all supported phase states.
OperationSpecV2Schema is the operation json schema.
PersistentStorageSpecV1Schema is the persistent storage resource spec schema.
ReleaseV1Schema defines the release resource schema.
ResourceNameExpr is identifier that specifies resource name.
SupportedGravityResources is a list of resources supported by "gravity resource create/get" subcommands.
SupportedGravityResourcesToRemove is a list of resources supported by "gravity resource rm" subcommand.
SupportedUserTypes lists all supported user types.

# Structs

Account represents some organization or company that can have multiple sites.
No description provided by the author
AlertSpecV2 defines a monitoring alert.
AlertTargetSpecV2 defines a monitoring alert target.
AlertTargetV2 defines a monitoring alert target.
AlertV2 defines a monitoring alert.
APIKey is a token that agent users use to access the API.
Application describes an application for the package cleaner.
AppOperation represents operations on applications e.g.
AppProgressEntry is a structured entry indicating operation progress.
AppSpecV2 represents an app resource spec.
AppV2 represents an app resource format.
AssignKubernetesGroupsExpr constructs function expression used in rules specifications that assigns kubernetes groups to the current user.
AuthGatewaySpecV1 defines the auth gateway resource specification.
AuthGatewayV1 defines the auth gateway resource.
AWSVariables is a set of operation variables specific to AWS provider.
CloudConfig represents additional cloud provider-specific configuration.
ClusterAWSProviderSpecV2 is AWS provider specification.
ClusterConfigData describes the configuration specific to cluster configuration update operation.
ClusterNodeSpecV2 is a spec of cluster node provisioned via AWS.
ClusterSpecV2 is cluster V2 specification.
ClusterState defines the state of the cluster.
ClusterV2 represents cluster resource specification.
ConnectionLimits defines connection limits setting on auth gateway resource.
ContainsExpr constructs function expression used in rules specifications that checks if one value contains the other, e.g.
Device defines a device on a host: block device or a partition.
DNSConfig describes a DNS server.
DNSOverrides defines a cluster's DNS host/zone overrides.
Docker defines the configuration specific to docker.
DockerConfig overrides Docker configuration for the cluster.
ElectionChange describes changes to make to cluster elections.
EndpointsSpecV2 is the endpoints resource spec.
EndpointsV2 represents the endpoints resource.
EnvironmentSpec defines the environment variable resource.
EnvironmentV1 describes the cluster runtime environment variables resource.
EqualsExpr constructs function expression used in rules specifications that checks if one value is equal to another e.g.
Filesystem describes a mounted file system.
FilesystemUsage describes usage for a mounted file system.
GarbageCollectOperationData describes configuration for the garbage collect operation.
InstallExpandOperationState defines the state of an install or expand operation.
InstallOperationData describes configuration for the install operation.
InstallToken defines a one-time installation token.
LogForwarderSpecV2 is the log forwarder spec.
LogForwarderV1 is the legacy log forwarder spec.
LogForwarderV2 represents log forwarder resource.
LoginEntry represents local agent login with remote portal, used to pull and push packages.
Memory describes RAM parameters on a system.
Mount describes a mount on a server.
NDMConfig represents the OpenEBS Node Device Manager configuration.
NDMFilter represents a single NDM filter.
NDMProbe represents a single NDM probe configuration.
NetworkInterface represents a network interface.
OnPremVariables is a set of operation variables specific to onprem provider.
OpenEBS represents OpenEBS configuration.
OpenEBSFilter represents a single filter type.
OpenEBSFilters is a list of filters OpenEBS will use when discovering devices.
OperationExpand contains expand specific parameters.
OperationInstall contains install specific parameters.
OperationNode describes an operation node.
OperationPhase represents a single operation plan phase.
OperationPhaseData represents data attached to an operation phase.
OperationPlan represents a plan of an operation as a collection of phases.
OperationReconfigure contains reconfiguration specific parameters.
OperationShrink contains shrink specific parameters.
OperationSpecV2 is the operation resource spec.
OperationUpdateConfig contains configuration update specific parameters.
OperationUpdateEnviron contains environment update specific parameters.
OperationUpgrade contains upgrade specific parameters.
OperationV2 is the operation resource definition.
OperationVariables is operation-specific set of variables.
OpsCenterLink is a link between remote OpsCenter and a local site.
OSInfo describes an operating system using several attributes like operating system ID and a version number.
OSUser describes a user on host.
Package is any named and versioned blob with an optional manifest.
PackageChangeset is a set of package updates from one version to another.
PackageUpdate represents package change from one version to another.
Peer is a peer node of the package management service.
Permission represent action that user can perform on objects in certain collections e.g.
PersistentStorageSpecV1 is persistent storage resource spec.
PersistentStorageV1 represents a persistent storage resource.
PlanChange represents a single operation plan state change.
Process represents a running process.
ProgressEntry is a structured entry indicating operation progress.
ProvisioningToken is used to add new servers to the cluster.
PullData contains applications and packages to pull.
ReconfigureOperationState defines the reconfiguration operation state.
ReleaseSpecV1 defines release resource spec.
ReleaseStatusV1 provides runtime information about release.
ReleaseV1 defines the release resource.
RemoteAccessUser groups the attributes to identify or create a user to use to connect a cluster to a remote OpsCenter.
RepositoryV1 is a collection of packages.
RepositoryV2 represents repository resource specification.
ResolvConf describes the system resolv.conf configuration.
RoleSpecV2 is role specification for RoleV2.
RoleV2 represents role resource specification.
RuntimePackage describes the state of the runtime package during update.
RuntimeUpdate describes an update to the runtime package.
Server is used during site install process and is configured by users during manual install or by automatic provisioner when creating environment from scratch.
ServerProfile describes server that was provisioned during install/expand.
ServerProfileRequest contains information about how many nodes of a certain type were requested for install/expand.
ServerUpdate represents server that is being updated.
ShrinkOperationState contains information about shrink operation.
Site is a group of servers that belongs to some account and having some application installed.
SiteOperation represents any modification of the site, e.g.
SMTPConfigSpecV2 defines SMTP configuration for the cluster.
SMTPConfigV2 defines SMTP configuration.
Subnets describes selected overlay/service network subnets for an operation.
Swap describes swapping configuration.
SystemPackage describes a package on a Linux system.
SystemSpecV2 represents a set of facts about a system.
SystemState defines the system configuration for gravity - location of state directory, etc.
SystemV2 describes a system.
SystemVariables represents a set of operation variables common for each provider.
TeleportPackage describes the state of the teleport package during update.
TeleportUpdate describes an update to the teleport package.
TLSKeyPairSpecV2 is TLS keypair V2 specification.
TLSKeyPairV2 represents TLS key pair specification.
TokenSpecV2 is token V2 specification.
TokenV2 represents token resource specification.
TrustedClusterSpecV2 represents the trusted cluster spec.
TrustedClusterV2 represents a trusted cluster resource.
UninstallOperationState defines the state of the uninstall operation.
UnknownResource represents an unparsed resource with an interpreted ResourceHeader.
UpdateConfigOperationState describes the state of the operation to update cluster configuration.
UpdateEnvarsOperationState describes the state of the operation to update cluster environment variables.
UpdateOperationData describes configuration for update operations.
UpdateOperationState describes the state of the update operation.
UpdateServer describes an intent to update runtime/teleport configuration packages on a specific cluster node.
UpdateUserReq instructs update method to update certain fields of the user struct, if they are set as not nil.
UserInvite represents a promise to add user to account.
UserSpecV2 is a specification for V2 user.
UserToken is a temporary token used to create and reset a user.
UserV1 is a struct representing a user in the system, user or bot performing operations,.
UserV2 is version 2 resource spec of the user.

# Interfaces

Accounts collection modifies and updates account entries, where each account is related to some organization.
Alert describes a monitoring alert.
AlertTarget describes a monitoring alert target.
APIKeys provides operations with api keys.
App defines an app resource.
Applications defines operations on the site applications.
AppOperations defines the interface to handle operations on applications.
AppProgressEntries collection stores progress entries for the application operations.
AuthGateway defines a resource that controls embedded Teleport configuration.
Backend is a combination of all collections and a couple of common methods like Closer.
Charts defines methods related to Helm chart repository functionality.
Cluster contains a set of permissions or settings.
ClusterConfiguration stores the cluster configuration in the DB.
ClusterImport defines the interface to manage status of cluster state import.
Connectors manages OIDC connectors (OpenID connect configurations).
Endpoints represents a resource that allows to customize advertise addresses used for user and cluster communication.
EnvironmentVariables defines the cluster runtime environment variables resource.
Expr is an expression.
Leader describes a leader election campaign.
LegacyRoles is used in testing.
Links is a legacy an interface for remote Ops Center links which have been superseded by trusted clusters, kept only for migration purposes.
LocalBackend represents the node-local backend.
Locks is the locking service.
LogForwarder describes a log forwarder resource.
LogForwarderMarshaler defines methods to marshal/unmarshal log forwarders.
LoginEntries store local agent logins with remote portals.
Migrations defines an interface to schema migration management.
Objects stores binary objects metadata.
Operation represents a single cluster operation.
PackageChangesets tracks server local package changes - updates and downgrades.
No description provided by the author
Permissions collection manages repository access rules - read, create, delete.
PersistentStorage represents persistent storage configuration resource.
ProgressEntries collection stores progress entries for the operations.
Release represents a single instance of a running application.
Repositories interface provides operations on repositories and packages.
Repository is a repository resource.
SiteOperations colection represents a list of operations performed on the site, e.g.
Sites collection works with sites - a group of servers.
SMTPConfig describes cluster SMTP configuration.
System describes a system.
SystemMetadata stores system-relevant data on the host.
TLSKeyPair describes a TLS key pair resource that can be checked for validity and queried.
Token contains a set of permissions or settings.
TokenMarshaler is interface for marshaling token.
Tokens interface defines a token management layer.
TrustedCluster extends Teleport's trusted cluster interface with Gravity specific methods.
U2F collection operates on U2F signups, logins, and password resets.
User a human or bot user in the system.
UserInvites manages user invites.
Users collection provides operations on users - both humans and bots.
UserTokens collection operates on one-time tokens used for creating new accounts and adding users to existing accounts, as well as recovering passwords.
WebSessions take care of the user web sessions and help implement teleport's Identity backend.

# Type aliases

AppType defines an application type.
DeviceName identifies a device by name.
Devices defines a list of devices.
DeviceType defines a device type.
FilesystemStats maps a directory name to usage information.
IdentifierExpr is identifier expression.
PlanChangelog is a list of plan state changes.
ProvisioningTokenType specifies token type.
Reason details the reason a site is in a particular state.
Servers is a list of servers.
StringExpr is a string expression.
StringsExpr is a slice of strings.