Documentation ¶
Index ¶
- Variables
- func StringPointerify(s string) *string
- type BadRequest
- type Build
- type BuildAuthor
- type BuildCmds
- type BuildEnvironment
- type BuildMetadata
- type BuildMethod
- type BuildState
- type BuildValidationFailure
- type Channel
- type ChannelPartial
- type ChannelToken
- type ChannelType
- type Container
- type ContainerBuildSettings
- type ContainerLog
- type ContainerMetadata
- type ContainerMetrics
- type ContainerState
- type ContainerStrategy
- type ContainerUptime
- type DefaultQuotas
- type DeliveryProtocol
- type Deployment
- type DeploymentConfig
- type DeploymentConfigPartial
- type DeploymentMetadata
- type DeploymentRollout
- type DeploymentStorageInfo
- type DeploymentStorageSize
- type DockerAuth
- type Domain
- type DomainRedirect
- type DomainState
- type GPUType
- type Gateway
- type GatewayCreationOptions
- type GatewayProtocol
- type GatewayType
- type HLSConfig
- type HealthCheck
- type HealthCheckCreateOpts
- type HealthCheckProtocol
- type HealthCheckState
- type HealthCheckStatus
- type HealthCheckType
- type HealthCheckUpdateOpts
- type IgniteDeploymentPatchOptsdeprecated
- type IgniteDeploymentUpdateOpts
- type IgniteGatewayUpdateOpts
- type Image
- type ImageDigest
- type ImageGHInfo
- type ImageManifest
- type IngestProtocol
- type InvalidToken
- type LeapAuthorizationError
- type LeapAvailableEvent
- type LeapChannelEvent
- type LeapChannelStateUpdateEvent
- type LeapConnectionState
- type LeapDispatchEventDetails
- type LeapInitEvent
- type LeapMessageEvent
- type LeapPipeRoomAvailableEvent
- type LeapPipeRoomUpdateEvent
- type LeapScope
- type LeapStateInfo
- type LeapUnavailableEvent
- type LoggingLevel
- type Milliseconds
- type NotAuthorized
- type NotFound
- type PipeConnection
- type PipeConnectionMap
- type PresetForm
- type PresetFormField
- type PresetFormInput
- type PresetFormInputAutogen
- type PresetFormInputRange
- type PresetFormInputString
- type PresetFormMapTo
- type PresetFormMappingType
- type Project
- type ProjectMember
- type ProjectPermission
- type ProjectRole
- type ProjectSecret
- type ProjectTier
- type ProjectToken
- type ProjectType
- type QuotaUsage
- type Region
- type Resources
- type RestartPolicy
- type RolloutState
- type Room
- type RoomCreationOptions
- type RoomState
- type RuntimeType
- type Seconds
- type SelfUser
- type ServerError
- type Size
- type Stats
- type Timestamp
- type UnknownServerError
- type User
- type UserMeInfo
- type UserPat
- type VGPU
- type ValidationError
- type VolumeDefinition
- type VolumeFormat
Constants ¶
This section is empty.
Variables ¶
var ExpectedHello = errors.New("expected hello packet after connection")
ExpectedHello is thrown if the first packet after connection is not a hello.
var StopIteration = errors.New("stop iteration")
StopIteration is thrown when we should stop iterating through a list. It is a reference since nothing more needs to be added to the error.
Functions ¶
func StringPointerify ¶
StringPointerify is used to turn the normal Go string behaviour into a string pointer. If the string is blank, a nil pointer will be returned. If not, a pointer to the string will be instead.
Types ¶
type BadRequest ¶
BadRequest is sent in the event of a 400. It is a special case since it encompasses all user request errors.
type Build ¶ added in v1.4.0
type Build struct { // ID is the ID of the build. ID string `json:"id"` // DeploymentID is the ID of the deployment that this build is for. DeploymentID string `json:"deployment_id"` // Metadata is the metadata for the build. This can be nil. Metadata *BuildMetadata `json:"metadata"` // Method is the method used to build the container. Method BuildMethod `json:"method"` // StartedAt is the time that the build was started at. Is nil for no value. StartedAt *Timestamp `json:"started_at"` // FinishedAt is the time that the build finished at. Is nil for no value. FinishedAt *Timestamp `json:"finished_at"` // State is the state of the build. State BuildState `json:"state"` // Digest is the digest for the image. Can be blank for no value. Digest string `json:"digest"` // Environment is information about the build environment. Environment BuildEnvironment `json:"environment"` // ValidationFailure is set when the build state is failed. ValidationFailure *BuildValidationFailure `json:"validation_failure"` }
Build is used to define the active build of a deployment.
type BuildAuthor ¶ added in v1.4.0
type BuildAuthor struct { // AvatarURL is the URL of the avatar of the author. This can be blank. AvatarURL string `json:"avatar_url"` // Username is the username of the author. Username string `json:"username"` }
BuildAuthor is used to define the author of a build.
type BuildCmds ¶ added in v1.11.0
type BuildCmds struct { // Build is the command used for builds. Can be nil. Build *string `json:"build"` // Start is the command used for starting the container. Can be nil. Start *string `json:"start"` // Install is the command used for installing the container. Can be nil. Install *string `json:"install"` }
BuildCmds is used to define the commands for the build.
type BuildEnvironment ¶ added in v1.11.0
type BuildEnvironment struct { // Language is the language this was built with. Can be nil. Language *string `json:"language"` // Cmds are the commands that were invoked during the build. Cmds BuildCmds `json:"cmds"` }
BuildEnvironment contains information about the build environment.
type BuildMetadata ¶ added in v1.4.0
type BuildMetadata struct { // AccountType is the type of account that triggered the build. This can be blank. AccountType string `json:"account_type"` // Author is the author of the build. This can be nil. Author *BuildAuthor `json:"author"` // RepoID is the ID of the repository that the build was triggered from. RepoID int `json:"repo_id"` // RepoName is the name of the repository that the build was triggered from. RepoName string `json:"repo_name"` // Branch is the branch that the build was triggered from. Branch string `json:"branch"` // CommitSHA is the SHA of the commit that the build was triggered from. CommitSHA string `json:"commit_sha"` // CommitMessage is the message of the commit that the build was triggered from. CommitMessage string `json:"commit_msg"` // CommitURL is the URL of the commit that the build was triggered from. This can be blank. CommitURL string `json:"commit_url"` }
BuildMetadata is the metadata for a build.
func (BuildMetadata) String ¶ added in v1.4.0
func (x BuildMetadata) String() string
String returns the string representation of this value. This function is auto-generated.
type BuildMethod ¶ added in v1.4.0
type BuildMethod string
BuildMethod is the method used to build a container.
const ( // BuildMethodGitHub is used to define a build method that was triggered by GitHub. BuildMethodGitHub BuildMethod = "github" // BuildMethodCLI is used to define a build method that was triggered by the CLI. BuildMethodCLI BuildMethod = "cli" )
func (BuildMethod) String ¶ added in v1.4.0
func (x BuildMethod) String() string
String returns the string representation of this value. This function is auto-generated.
type BuildState ¶ added in v1.4.0
type BuildState string
BuildState is the state of a build.
const ( // BuildStateValidating is used to define a build that is validating. BuildStateValidating BuildState = "validating" // BuildStatePending is used to define a build that is pending. BuildStatePending BuildState = "pending" // BuildStateFailed is used to define a build that has failed. BuildStateFailed BuildState = "failed" // BuildStateSucceeded is used to define a build that has succeeded. BuildStateSucceeded BuildState = "succeeded" // BuildStateCancelled is used to define a build that has been canceled. BuildStateCancelled BuildState = "cancelled" // BuildStateValidationFailed is used to define a build where the validation failed. BuildStateValidationFailed BuildState = "validation_failed" )
func (BuildState) String ¶ added in v1.4.0
func (x BuildState) String() string
String returns the string representation of this value. This function is auto-generated.
type BuildValidationFailure ¶ added in v1.11.0
type BuildValidationFailure struct { // Reason is the reason that the validation failed. Reason string `json:"reason"` // HelpLink is used to define a help link if present. Can be nil. HelpLink *string `json:"help_link"` }
BuildValidationFailure is used to define a build validation failure.
type Channel ¶
type Channel struct { ChannelPartial `json:",inline"` // Project is the project it is associated with. Project *Project `json:"project"` // Capabilities is the capabilities of this channel. Capabilities int `json:"capabilities"` // CreatedAt is when this channel was created. CreatedAt Timestamp `json:"created_at"` }
Channel is used to define the main structure of a channel.
type ChannelPartial ¶
type ChannelPartial struct { // ID is the ID of the channel. ID string `json:"id"` // State is any state metadata associated with the channel. State map[string]any `json:"state"` // Type is the type of this channel. Type ChannelType `json:"type"` }
ChannelPartial is used to define a partial channel. Whilst currently not used by the hop-go library, this may be desirable for things importing the types package such as a leap client.
type ChannelToken ¶
type ChannelToken struct { // ID is the ID of the token. ID string `json:"id"` // State is any state metadata associated with the token. State map[string]any `json:"state"` // ProjectID is the project ID associated with the token. ProjectID string `json:"project_id"` // IsOnline is whether the token is online (e.g.: active heartbeat and connected to leap). IsOnline bool `json:"is_online"` }
ChannelToken is used to define the token for a channel.
type ChannelType ¶
type ChannelType string
ChannelType is used to define the type of the Hop channel.
const ( // ChannelTypePrivate is used to define a private Hop channel. ChannelTypePrivate ChannelType = "private" // ChannelTypePublic is used to define a public Hop channel. ChannelTypePublic ChannelType = "public" // ChannelTypeUnprotected is used to define an unprotected Hop channel. ChannelTypeUnprotected ChannelType = "unprotected" )
type Container ¶
type Container struct { // ID is the ID of the container. ID string `json:"id"` // CreatedAt defines when this container was created. CreatedAt Timestamp `json:"created_at"` // Region is the region that this container is running in. Region Region `json:"region"` // Uptime is used to define uptime/downtime information for this container. Uptime ContainerUptime `json:"uptime"` // Type is the runtime type of this container. Type RuntimeType `json:"type"` // InternalIP is the internal IP address of this container. InternalIP string `json:"internal_ip"` // DeploymentID is the ID of the deployment that this container is a part of. DeploymentID string `json:"deployment_id"` // State is the state of this container. State ContainerState `json:"state"` // Metadata is the metadata for this container. Metadata ContainerMetadata `json:"metadata"` // Volume is the volume definition for this container. This can be nil. Volume *VolumeDefinition `json:"volume"` // Metrics is used to define the container metrics. This can be nil. Metrics *ContainerMetrics `json:"metrics"` // Overrides is used to define overrides that were provided manually to the container. // Items in Resources can be empty if they are unset, or overrides can be nil. Overrides *Resources `json:"overrides"` }
Container is used to define a container in Ignite.
type ContainerBuildSettings ¶ added in v1.11.0
type ContainerBuildSettings struct { // RootDirectory is used to define the root directory for the container build. Can be blank. RootDirectory string `json:"root_directory"` }
ContainerBuildSettings is used to define the build settings for a container.
type ContainerLog ¶
type ContainerLog struct { // Timestamp is the timestamp of the log message. Timestamp Timestamp `json:"timestamp"` // Message is the log message. Message string `json:"message"` // Nonce is the ID of the document in Elasticsearch. This can be safely used to map state. Nonce string `json:"nonce"` // Level is the logging level. Level LoggingLevel `json:"level"` }
ContainerLog is used to define a container log message.
type ContainerMetadata ¶
type ContainerMetadata struct { // LastExitCode is used to define the last exit code of the container. It is nil if the container has never exited. LastExitCode *int `json:"last_exit_code"` }
ContainerMetadata is used to define the metadata for a container.
func (ContainerMetadata) String ¶
func (x ContainerMetadata) String() string
String returns the string representation of this value. This function is auto-generated.
type ContainerMetrics ¶ added in v1.8.0
type ContainerMetrics struct { // CPUUsagePercent is used to define the % usage of the CPU. CPUUsagePercent float64 `json:"cpu_usage_percent"` // MemoryUsagePercent is used to define the % usage of the RAM. MemoryUsagePercent float64 `json:"memory_usage_percent"` // MemoryUsageBytes is the number of bytes of memory currently being used. MemoryUsageBytes uint32 `json:"memory_usage_bytes"` }
ContainerMetrics is used to define the metrics of a container.
type ContainerState ¶
type ContainerState string
ContainerState is used to define the current status of a container.
const ( // ContainerStatePending is used to define a container that is pending. ContainerStatePending ContainerState = "pending" // ContainerStateRunning is used to define a container that is running. ContainerStateRunning ContainerState = "running" // ContainerStateStopped is used to define a container that is stopped. ContainerStateStopped ContainerState = "stopped" // ContainerStateFailed is used to define a container that has failed (e.g. exited with a non-zero exit code). ContainerStateFailed ContainerState = "failed" // ContainerStateTerminating is used to define a container that is terminating. ContainerStateTerminating ContainerState = "terminating" // ContainerStateExited is used to define a container that has exited. ContainerStateExited ContainerState = "exited" )
type ContainerStrategy ¶
type ContainerStrategy string
ContainerStrategy is the strategy used to scale a container.
const ( // ContainerStrategyManual is used to define a container that is manually scaled. ContainerStrategyManual ContainerStrategy = "manual" )
type ContainerUptime ¶
type ContainerUptime struct { // LastStart is the last time the container was started. LastStart Timestamp `json:"last_start"` }
ContainerUptime is the structure that contains information about a containers uptime.
type DefaultQuotas ¶
DefaultQuotas is used to define the default quotas for a hardware resource.
type DeliveryProtocol ¶
type DeliveryProtocol string
DeliveryProtocol is the type used for supported Pipe delivery protocols.
const ( // DeliveryProtocolHLS is used to define the HLS delivery protocol. DeliveryProtocolHLS DeliveryProtocol = "hls" // DeliveryProtocolWebRTC is used to define the WebRTC delivery protocol. DeliveryProtocolWebRTC DeliveryProtocol = "webrtc" )
type Deployment ¶
type Deployment struct { // ID is the ID of the deployment. ID string `json:"id"` // Name is the name of the deployment. Name string `json:"name"` // TargetContainerCount is the number of expected containers. TargetContainerCount int `json:"target_container_count"` // ContainerCount is the number of containers that are currently running. ContainerCount int `json:"container_count"` // CreatedAt defines when this deployment was created. CreatedAt Timestamp `json:"created_at"` // Config is the configuration for this deployment. Config DeploymentConfigPartial `json:"config"` // ActiveRollout is the rollout for this deployment. Can be nil if not defined. // // Deprecated: Use LatestRollout instead. ActiveRollout *DeploymentRollout `json:"active_rollout"` // LatestRollout is the rollout for this deployment. Can be nil if not defined. LatestRollout *DeploymentRollout `json:"latest_rollout"` // ActiveBuild is the build for this deployment. Can be nil if not defined. ActiveBuild *Build `json:"active_build"` // Metadata is used to define any deployment metadata. Can be nil if not defined. Metadata *DeploymentMetadata `json:"metadata"` // RunningContainerCount is the amount of containers in the running state. RunningContainerCount int `json:"running_container_count"` // BuildCacheEnabled is used to define if the build cache is enabled. BuildCacheEnabled bool `json:"build_cache_enabled"` // BuildSettings is used to define the build settings for a container. BuildSettings *ContainerBuildSettings `json:"build_settings"` }
Deployment is used to define a deployment in Ignite.
func (Deployment) String ¶ added in v1.8.0
func (x Deployment) String() string
String returns the string representation of this value. This function is auto-generated.
type DeploymentConfig ¶
type DeploymentConfig struct { // DeploymentConfigPartial is the partial configuration of a deployment that this is based on. DeploymentConfigPartial `json:",inline"` // Name is the name of the deployment. Name string `json:"name"` // Volume is the volume that this deployment is using. This can only be used when Type is RuntimeTypeStateful. Volume *VolumeDefinition `json:"volume,omitempty"` }
DeploymentConfig is used to define the configuration for a deployment.
func (DeploymentConfig) MarshalJSON ¶
func (x DeploymentConfig) MarshalJSON() ([]byte, error)
MarshalJSON is used to marshal the deployment config into JSON.
func (DeploymentConfig) String ¶
func (x DeploymentConfig) String() string
String returns the string representation of this value. This function is auto-generated.
type DeploymentConfigPartial ¶
type DeploymentConfigPartial struct { // ContainerStrategy is the strategy used to scale a container. ContainerStrategy ContainerStrategy `json:"container_strategy"` // Type is used to define the type of this deployment. Type RuntimeType `json:"type"` // Version is the version of the deployment. Version string `json:"version"` // Image is the Docker image config for this deployment. Image Image `json:"image"` // Env is the environment variables for this deployment. Env map[string]string `json:"env"` // Resources is the resources for this deployment. Resources Resources `json:"resources"` // RestartPolicy is the restart policy for this deployment. RestartPolicy RestartPolicy `json:"restart_policy"` // Entrypoint is used to define the entrypoint for the application. Can be nil. Entrypoint []string `json:"entrypoint"` // Cmd is used to define the cmd for the application. Can be nil. Cmd []string `json:"cmd"` }
DeploymentConfigPartial is the partial configuration of a deployment.
func (DeploymentConfigPartial) MarshalJSON ¶
func (x DeploymentConfigPartial) MarshalJSON() ([]byte, error)
MarshalJSON is used to marshal the deployment config into JSON.
func (DeploymentConfigPartial) String ¶
func (x DeploymentConfigPartial) String() string
String returns the string representation of this value. This function is auto-generated.
type DeploymentMetadata ¶ added in v1.8.0
type DeploymentMetadata struct { // ContainerPortMappings is used to map the containers to ports. ContainerPortMappings map[string][]string `json:"container_port_mappings"` }
DeploymentMetadata is the deployments metadata.
func (DeploymentMetadata) String ¶ added in v1.8.0
func (x DeploymentMetadata) String() string
String returns the string representation of this value. This function is auto-generated.
type DeploymentRollout ¶ added in v1.4.0
type DeploymentRollout struct { // Count is the number of containers which are being recreated. Count int `json:"count"` // CreatedAt is the time that the rollout was created at. CreatedAt Timestamp `json:"created_at"` // DeploymentID is the ID of the deployment that this rollout is for. DeploymentID string `json:"deployment_id"` // ID is the ID of the rollout. ID string `json:"id"` // State is the state of the rollout. State RolloutState `json:"status"` // Build is the build that this rollout is for. This can be nil. Build *Build `json:"build"` // Acknowledged is used to define if the rollout has been acknowledged by the user. Acknowledged bool `json:"acknowledged"` // InitContainerID is the container ID this rollout is portioning to. This can be blank. InitContainerID string `json:"init_container_id"` // HealthCheckFailed is used to define if the health check failed. HealthCheckFailed bool `json:"health_check_failed"` // LastUpdatedAt is the time that the rollout was last updated at. LastUpdatedAt Timestamp `json:"last_updated_at"` }
DeploymentRollout is used to define the rollout of a deployment.
func (DeploymentRollout) String ¶ added in v1.4.0
func (x DeploymentRollout) String() string
String returns the string representation of this value. This function is auto-generated.
type DeploymentStorageInfo ¶ added in v1.8.0
type DeploymentStorageInfo struct { // Volume is used to define the storage information. Can be nil. Volume *DeploymentStorageSize `json:"volume"` // BuildCache is used to define the build cache storage information. Can be nil. BuildCache *DeploymentStorageSize `json:"build_cache"` }
DeploymentStorageInfo is used to define deployment information about storage.
func (DeploymentStorageInfo) String ¶ added in v1.8.0
func (x DeploymentStorageInfo) String() string
String returns the string representation of this value. This function is auto-generated.
type DeploymentStorageSize ¶ added in v1.8.0
type DeploymentStorageSize struct { // ProvisionedSize is the amount of storage in MB that is provisioned. ProvisionedSize int `json:"provisioned_size"` // UsedSize is the amount of storage in MB that is used for the build cache. UsedSize int `json:"used_size"` }
DeploymentStorageSize is used to define the information about the build cache.
func (DeploymentStorageSize) String ¶ added in v1.8.0
func (x DeploymentStorageSize) String() string
String returns the string representation of this value. This function is auto-generated.
type DockerAuth ¶
DockerAuth is used to define the authentication information for a Docker registry.
type Domain ¶
type Domain struct { // ID is the ID of the domain. ID string `json:"id"` // Domain is the full name of the domain. Domain string `json:"domain"` // State is the state of the domain. State DomainState `json:"state"` // CreatedAt defines when this domain was created. CreatedAt Timestamp `json:"created_at"` // Redirect is where the domain can redirect. Can be nil if no redirect is configured. Redirect *DomainRedirect `json:"redirect"` }
Domain is used to define a domain in Ignite.
type DomainRedirect ¶ added in v1.10.0
type DomainRedirect struct { // URL is the URL to redirect to. URL string `json:"url"` // StatusCode is the status code to use for the redirect. StatusCode int `json:"status_code"` }
DomainRedirect is used to define a domain redirect.
func (DomainRedirect) String ¶ added in v1.12.0
func (x DomainRedirect) String() string
String returns the string representation of this value. This function is auto-generated.
type DomainState ¶
type DomainState string
DomainState is the state of the domain.
const ( // DomainStatePending is used to define a domain that is pending. DomainStatePending DomainState = "pending" // DomainNameValidCname is used to define a domain that is valid and has a CNAME record. DomainNameValidCname DomainState = "valid_cname" // DomainNameSSLActive is used to define a domain that has a valid SSL certificate. DomainNameSSLActive DomainState = "ssl_active" )
type GPUType ¶
type GPUType string
GPUType is the type of GPU.
const ( // GPUTypeA400 is used to define an A400 GPU. GPUTypeA400 GPUType = "a400" )
type Gateway ¶
type Gateway struct { // ID is used to define the ID of a gateway. ID string `json:"id"` // Type is the type of the gateway. Type GatewayType `json:"type"` // Name is the name of the gateway. Name string `json:"name"` // Protocol is the protocol of the gateway. This is only used on external gateways. This will be blank on internal gateways. Protocol GatewayProtocol `json:"protocol"` // DeploymentID is the ID of the deployment that this gateway is attached to. DeploymentID string `json:"deployment_id"` // CreatedAt defines when this gateway was created. CreatedAt Timestamp `json:"created_at"` // HopshDomain is the hop.sh domain that this gateway is automatically assigned. This will be blank if none is assigned. HopshDomain string `json:"hopsh_domain"` // HopshDomainEnabled determines if the hop.sh domain is currently active. HopshDomainEnabled bool `json:"hopsh_domain_enabled"` // InternalDomain is the internal domain that this gateway is automatically assigned. This will be blank if none is assigned. InternalDomain string `json:"internal_domain"` // TargetPort is the port that this gateway is targeting. This will be nil if none is assigned. TargetPort *int `json:"target_port"` // Domains is the list of domains that this gateway is assigned to. Domains []*Domain `json:"domains"` }
Gateway is used to define a gateway used in Ignite.
type GatewayCreationOptions ¶
type GatewayCreationOptions struct { // DeploymentID is the ID of the deployment that this gateway is for. DeploymentID string `json:"-"` // Name is the name of the gateway. Name string `json:"name"` // Type is the type of gateway to create, either internal or external. Type GatewayType `json:"type"` // Protocol is the protocol to use for the gateway. Protocol GatewayProtocol `json:"protocol"` // TargetPort is the port to listen on. TargetPort int `json:"target_port"` // InternalDomain is used when the gateway type is internal. InternalDomain string `json:"internal_domain,omitempty"` // ProjectID is the ID of the project that this gateway is for. Can be blank if using a project token. // // Deprecated: Set the project ID with client options instead. ProjectID string `json:"-"` }
GatewayCreationOptions is used to define the options for creating a gateway.
type GatewayProtocol ¶
type GatewayProtocol string
GatewayProtocol is the protocol of the gateway.
const ( // GatewayProtocolHTTP is used to define a gateway that uses the HTTP protocol. GatewayProtocolHTTP GatewayProtocol = "http" )
type GatewayType ¶
type GatewayType string
GatewayType is the type of the gateway.
const ( // GatewayTypeInternal is used to define a gateway that can only be accessed from within a projects network. GatewayTypeInternal GatewayType = "internal" // GatewayTypeExternal is used to define a gateway that can be accessed from the internet. GatewayTypeExternal GatewayType = "external" )
type HLSConfig ¶
type HLSConfig struct { WCLDelay int `json:"wcl_delay"` ArtificialDelay int `json:"artificial_delay"` MaxPlayoutBitratePreset string `json:"max_playout_bitrate_preset"` }
HLSConfig is used to define the HLS configuration for a room.
type HealthCheck ¶ added in v1.8.0
type HealthCheck struct { // Inlines the options since they are also used here. HealthCheckCreateOpts `json:",inline"` // ID defines the ID of the health check. ID string `json:"id"` // CreatedAt defines when the health check was created. CreatedAt Timestamp `json:"created_at"` // Type defines the type of the health check. Type HealthCheckType `json:"type"` }
HealthCheck is used to define the created health check.
func (HealthCheck) String ¶ added in v1.8.0
func (x HealthCheck) String() string
String returns the string representation of this value. This function is auto-generated.
type HealthCheckCreateOpts ¶ added in v1.8.0
type HealthCheckCreateOpts struct { // DeploymentID is used to define the ID of the deployment. This must be set. DeploymentID string `json:"deployment_id,omitempty"` // Protocol is the protocol that this health check will work on. If blank, will default to "http". Protocol HealthCheckProtocol `json:"protocol"` // Path is the path which should be hit for the health check. If blank, will default to "/". Path string `json:"path"` // Port is the port that should be hit for the health check. If blank, will default to 8080. Port int `json:"port"` // InitialDelay is the initial delay in health checking. If blank, will default to 5 seconds. InitialDelay Seconds `json:"initial_delay"` // Interval is the interval between health checks in seconds. If blank, will default to 1 minute. Interval Seconds `json:"interval"` // Timeout is used to define the timeout in milliseconds. If blank, will default to 50ms. Timeout Milliseconds `json:"timeout"` // MaxRetries is the maximum number of allowed retries before it is declared unhealthy. If blank, will default to 3. MaxRetries int `json:"max_retries"` }
HealthCheckCreateOpts is used to define options during health check creation.
func (HealthCheckCreateOpts) String ¶ added in v1.8.0
func (x HealthCheckCreateOpts) String() string
String returns the string representation of this value. This function is auto-generated.
type HealthCheckProtocol ¶ added in v1.8.0
type HealthCheckProtocol string
HealthCheckProtocol is the type for a health check.
const ( // HealthCheckProtocolHTTP is used to define a health check running on HTTP. HealthCheckProtocolHTTP HealthCheckProtocol = "http" )
type HealthCheckState ¶ added in v1.8.0
type HealthCheckState struct { // DeploymentID defines the deployment ID this relates to. DeploymentID string `json:"deployment_id"` // ContainerID defines the container ID this relates to. ContainerID string `json:"container_id"` // HealthCheckID is used to define the ID of the health check this relates to. HealthCheckID string `json:"health_check_id"` // State is used to define the health check status. State HealthCheckStatus `json:"state"` // NextCheck defines the timestamp of the next check. NextCheck Timestamp `json:"next_check"` // CreatedAt defines when this health check was created. CreatedAt Timestamp `json:"created_at"` }
HealthCheckState is used to define the state of a health check.
func (HealthCheckState) String ¶ added in v1.8.0
func (x HealthCheckState) String() string
String returns the string representation of this value. This function is auto-generated.
type HealthCheckStatus ¶ added in v1.8.0
type HealthCheckStatus string
HealthCheckStatus is the type of the health check status.
const ( // HealthCheckStatusSucceeded is used to define a health check that succeeded. HealthCheckStatusSucceeded HealthCheckStatus = "succeeded" // HealthCheckStatusFailed is used to define a health check that failed. HealthCheckStatusFailed HealthCheckStatus = "failed" // HealthCheckStatusPending is used to define a health check that is pending. HealthCheckStatusPending HealthCheckStatus = "pending" )
type HealthCheckType ¶ added in v1.8.0
type HealthCheckType string
HealthCheckType defines the type of the health check.
const ( // HealthCheckTypeReadiness defines a readiness type. HealthCheckTypeReadiness HealthCheckType = "readiness" // HealthCheckTypeLiveness defines a liveness type. HealthCheckTypeLiveness HealthCheckType = "liveness" )
type HealthCheckUpdateOpts ¶ added in v1.8.0
type HealthCheckUpdateOpts struct { // DeploymentID is used to define the ID of the deployment. This must be set. DeploymentID string `json:"-"` // HealthCheckID is used to define the ID of the health check. This must be set. HealthCheckID string `json:"-"` // Protocol is the protocol that this health check will work on. Protocol HealthCheckProtocol `json:"protocol,omitempty"` // Path is the path which should be hit for the health check. Path string `json:"path,omitempty"` // Port is the port that should be hit for the health check. Port int `json:"port,omitempty"` // InitialDelay is the initial delay in health checking. InitialDelay Seconds `json:"initial_delay,omitempty"` // Interval is the interval between health checks in seconds. Interval Seconds `json:"interval,omitempty"` // Timeout is used to define the timeout in milliseconds. Timeout Milliseconds `json:"timeout,omitempty"` // MaxRetries is the maximum number of allowed retries before it is declared unhealthy. MaxRetries int `json:"max_retries,omitempty"` }
HealthCheckUpdateOpts is used to define update options for health check creation. All values except DeploymentID and HealthCheckID are optional.
type IgniteDeploymentPatchOpts
deprecated
type IgniteDeploymentPatchOpts = IgniteDeploymentUpdateOpts
IgniteDeploymentPatchOpts is the old name for IgniteDeploymentUpdateOpts.
Deprecated: Use IgniteDeploymentUpdateOpts instead.
func (IgniteDeploymentPatchOpts) String ¶
func (x IgniteDeploymentPatchOpts) String() string
String returns the string representation of this value. This function is auto-generated.
type IgniteDeploymentUpdateOpts ¶ added in v1.4.0
type IgniteDeploymentUpdateOpts struct { // Name is the name of the deployment. If this is not blank, it will be updated. Name string `json:"name,omitempty"` // Image is the image to use for the deployment. If this is not nil, it will be updated. Image *Image `json:"image,omitempty"` // RestartPolicy is the restart policy for the deployment. If this is not blank, it will be updated. RestartPolicy RestartPolicy `json:"restart_policy,omitempty"` // ContainerStrategy is the container strategy for the deployment. If this is not blank, it will be updated. ContainerStrategy ContainerStrategy `json:"container_strategy,omitempty"` // Type is the runtime type for the deployment. If this is not blank, it will be updated. Type RuntimeType `json:"type,omitempty"` // Resources is the resources for the deployment. If this is not nil, it will be updated. Resources *Resources `json:"resources,omitempty"` }
IgniteDeploymentUpdateOpts is used to define the options for updating a deployment.
type IgniteGatewayUpdateOpts ¶ added in v1.7.0
type IgniteGatewayUpdateOpts struct { // Name is the name of the gateway. If this is not blank, it will be updated. Name string `json:"name,omitempty"` // TargetPort is the port to listen on. If this is not 0, it will be updated. TargetPort int `json:"target_port,omitempty"` // Protocol is the protocol to use for the gateway. If this is not blank, it will be updated. Protocol GatewayProtocol `json:"protocol,omitempty"` }
IgniteGatewayUpdateOpts is used to define the options for updating a gateway.
func (IgniteGatewayUpdateOpts) String ¶ added in v1.7.0
func (x IgniteGatewayUpdateOpts) String() string
String returns the string representation of this value. This function is auto-generated.
type Image ¶
type Image struct { // Name is the name of the image. Will be blank if there's no image name. Name string `json:"name"` // Auth is the authentication information for the image. Will be nil if there's no authentication information. Auth *DockerAuth `json:"auth"` // GithubRepo is the GitHub repository that this image is from. Will be nil if there's no GitHub repository. GithubRepo *ImageGHInfo `json:"github_repo"` }
Image is used to define an image in Ignite.
type ImageDigest ¶
type ImageDigest struct { Digest string `json:"digest"` Size int `json:"size"` Uploaded string `json:"uploaded"` }
ImageDigest is used to define the digest of an image.
type ImageGHInfo ¶
type ImageGHInfo struct { RepoID int `json:"repo_id"` FullName string `json:"full_name"` Branch string `json:"branch"` }
ImageGHInfo is used to define the information about a GitHub image.
type ImageManifest ¶
type ImageManifest struct { // Digest is the digest of the image. Digest ImageDigest `json:"digest"` // Tag is used to define an image tag. Tag *string `json:"tag"` }
ImageManifest is used to define the manifest for an image.
type IngestProtocol ¶
type IngestProtocol string
IngestProtocol is the type used for supported Pipe ingest protocols.
const ( // IngestProtocolRTMP is used to define the RTMP ingest protocol. IngestProtocolRTMP IngestProtocol = "rtmp" )
type InvalidToken ¶
type InvalidToken string
InvalidToken is thrown when the authentication token is invalid for the action you are attempting.
func (InvalidToken) Error ¶
func (i InvalidToken) Error() string
Error implements the error interface.
type LeapAuthorizationError ¶
type LeapAuthorizationError struct {
Data string
}
LeapAuthorizationError is thrown if the authorization fails.
func (LeapAuthorizationError) Error ¶
func (e LeapAuthorizationError) Error() string
Error returns the error message.
type LeapAvailableEvent ¶
type LeapAvailableEvent struct { LeapDispatchEventDetails `json:",inline"` // Channel is the channel that is available. Channel *ChannelPartial `json:"channel"` }
LeapAvailableEvent is used to define the event when a channel is available.
func (LeapAvailableEvent) String ¶
func (x LeapAvailableEvent) String() string
String returns the string representation of this value. This function is auto-generated.
type LeapChannelEvent ¶
type LeapChannelEvent any
LeapChannelEvent is an any type that can be one of LeapUnavailableEvent, LeapAvailableEvent, LeapChannelStateUpdateEvent, LeapPipeRoomAvailableEvent, and LeapPipeRoomUpdateEvent.
type LeapChannelStateUpdateEvent ¶
type LeapChannelStateUpdateEvent struct { LeapDispatchEventDetails `json:",inline"` // State is the state of the channel. State map[string]any `json:"state"` }
LeapChannelStateUpdateEvent is used to define the channel state update event.
func (LeapChannelStateUpdateEvent) String ¶
func (x LeapChannelStateUpdateEvent) String() string
String returns the string representation of this value. This function is auto-generated.
type LeapConnectionState ¶
type LeapConnectionState string
LeapConnectionState is used to define the state of the Leap connection.
const ( // LeapConnectionStateIdle is the state when the connection is idle. LeapConnectionStateIdle LeapConnectionState = "idle" // LeapConnectionStateConnecting is the state when the connection is connecting. LeapConnectionStateConnecting LeapConnectionState = "connecting" // LeapConnectionStateAuthenticating is the state when the connection is authenticating. LeapConnectionStateAuthenticating LeapConnectionState = "authenticating" // LeapConnectionStateConnected is the state when the connection is connected. LeapConnectionStateConnected LeapConnectionState = "connected" // LeapConnectionStateErrored is the state when the connection is errored. LeapConnectionStateErrored LeapConnectionState = "errored" )
type LeapDispatchEventDetails ¶
type LeapDispatchEventDetails struct { // ChannelID is the ID of the channel. ChannelID string `json:"c"` // Unicast is if the dispatch event was dispatched via unicast. Unicast bool `json:"u"` }
LeapDispatchEventDetails is used to easily pass through some of the data from the dispatch event.
type LeapInitEvent ¶
type LeapInitEvent struct { LeapDispatchEventDetails `json:",inline"` // ConnectionID is the ID of the connection. ConnectionID string `json:"cid"` // Metadata is the metadata of the connection if applicable. Metadata map[string]any `json:"metadata"` // Scope is the scope of the connection. Scope LeapScope `json:"scope"` // Channels is the channels the connection is subscribed to. Channels []*ChannelPartial `json:"channels"` }
LeapInitEvent is used to define the Leap init event.
type LeapMessageEvent ¶
type LeapMessageEvent struct { LeapDispatchEventDetails `json:",inline"` // Data is the user provided event data for the message. Data map[string]any `json:"d"` // EventName is the name of the event. EventName string `json:"e"` }
LeapMessageEvent is used to define the Leap message event. When this is sent, if this is a direct message, ChannelID will be blank.
func (LeapMessageEvent) IsDirectMessage ¶
func (e LeapMessageEvent) IsDirectMessage() bool
IsDirectMessage returns if this is a direct message.
type LeapPipeRoomAvailableEvent ¶
type LeapPipeRoomAvailableEvent struct { LeapDispatchEventDetails `json:",inline"` // PipeRoom is the pipe room that is available. PipeRoom Room `json:"pipe_room"` // Connection is a map that contains the connection information. Everything inside will be nil if the room is offline. Connection PipeConnectionMap `json:"connection"` }
LeapPipeRoomAvailableEvent is used to define the event when a pipe room is available.
func (LeapPipeRoomAvailableEvent) String ¶
func (x LeapPipeRoomAvailableEvent) String() string
String returns the string representation of this value. This function is auto-generated.
type LeapPipeRoomUpdateEvent ¶
type LeapPipeRoomUpdateEvent LeapPipeRoomAvailableEvent
LeapPipeRoomUpdateEvent contains the same data as LeapPipeRoomAvailableEvent.
func (LeapPipeRoomUpdateEvent) String ¶
func (x LeapPipeRoomUpdateEvent) String() string
String returns the string representation of this value. This function is auto-generated.
type LeapStateInfo ¶
type LeapStateInfo struct { // ConnectionState is the string representation of the connection state. ConnectionState LeapConnectionState // Err is set if the connection state is errored to define the error that triggered this. Err error // WillReconnect is set if the connection state is errored to define if a reconnection will be attempted. WillReconnect bool }
LeapStateInfo is the information about the state of the connection.
type LeapUnavailableEvent ¶
type LeapUnavailableEvent struct { bool `json:"graceful"` ErrorCode string `json:"error_code"` }Graceful
LeapUnavailableEvent is used to define the event when a channel is unavailable.
func (LeapUnavailableEvent) Error ¶
func (x LeapUnavailableEvent) Error() string
Error returns the error message.
func (LeapUnavailableEvent) String ¶
func (x LeapUnavailableEvent) String() string
String returns the string representation of this value. This function is auto-generated.
type LoggingLevel ¶
type LoggingLevel string
LoggingLevel is used to define the logging level.
const ( // LoggingLevelInfo is used to define the level of logging as informative. Stdout becomes info. LoggingLevelInfo LoggingLevel = "info" // LoggingLevelError is used to define the level of logging as an error. LoggingLevelError LoggingLevel = "error" )
type Milliseconds ¶ added in v1.8.0
Milliseconds is a type that handles JSON encoding/decoding a time.Duration by the number of time.Millisecond's within it rounded down. This structure is auto-generated.
func MillisecondsFromInt ¶ added in v1.8.0
func MillisecondsFromInt(i int) Milliseconds
MillisecondsFromInt is used to turn a int into the Milliseconds type.
func (Milliseconds) MarshalJSON ¶ added in v1.8.0
func (x Milliseconds) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface.
func (Milliseconds) String ¶ added in v1.8.0
func (x Milliseconds) String() string
String uses the durafmt package to neatly format the timestamp.
func (*Milliseconds) UnmarshalJSON ¶ added in v1.8.0
func (x *Milliseconds) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the json.Unmarshaler interface.
type NotAuthorized ¶
type NotAuthorized string
NotAuthorized is sent when the user is not authorized. THe string is the error message from the API.
func (NotAuthorized) Error ¶
func (n NotAuthorized) Error() string
Error implements the error interface.
type NotFound ¶
type NotFound struct { // Code gives you the error code, allowing you to differentiate errors. Code string `json:"code"` // Message is the message from the Hop SDK. Message string `json:"message"` }
NotFound is sent when the object is not found. THe string is the error message from the API.
type PipeConnection ¶
type PipeConnection struct { EdgeEndpoint string `json:"edge_endpoint"` Type DeliveryProtocol `json:"type"` ServingPOP string `json:"serving_pop"` }
PipeConnection is used to define a Pipe connection.
type PipeConnectionMap ¶
type PipeConnectionMap struct { WebRTC *PipeConnection `json:"webrtc"` LLHLS *PipeConnection `json:"llhls"` }
PipeConnectionMap is used to define a map of Pipe connections.
type PresetForm ¶ added in v1.11.0
type PresetForm struct { // Version is used to define the version of the form. Version uint `json:"v"` // Fields is used to define the form fields. Fields []PresetFormField `json:"fields"` }
PresetForm is form preset information.
func (*PresetForm) MarshalJSON ¶ added in v1.11.0
func (p *PresetForm) MarshalJSON() ([]byte, error)
MarshalJSON is used to marshal the content into bytes.
func (*PresetForm) UnmarshalJSON ¶ added in v1.11.0
func (p *PresetForm) UnmarshalJSON(b []byte) error
UnmarshalJSON is used to unmarshal JSON into the structure specified.
type PresetFormField ¶ added in v1.11.0
type PresetFormField struct { // Input is used to define the input information. Cannot be nil. // When unmarshalled, will be a pointer to a input type that // implements this interface. Input PresetFormInput `json:"input"` // Title is used to define the title of the form field. Title string `json:"title"` // Required is used to define if the form field is required. Required bool `json:"required"` // MapTo is used to define a map of mappings. Cannot be nil. MapTo []PresetFormMapTo `json:"map_to"` }
PresetFormField is used to define a field in a preset form.
func (*PresetFormField) MarshalJSON ¶ added in v1.11.0
func (f *PresetFormField) MarshalJSON() ([]byte, error)
MarshalJSON is used to marshal this into a JSON object.
func (*PresetFormField) UnmarshalJSON ¶ added in v1.11.0
func (f *PresetFormField) UnmarshalJSON(b []byte) error
UnmarshalJSON is used to unmarshal the field from a JSON object.
type PresetFormInput ¶ added in v1.11.0
type PresetFormInput interface {
// contains filtered or unexported methods
}
PresetFormInput is used to define the form input information.
type PresetFormInputAutogen ¶ added in v1.11.0
type PresetFormInputAutogen string
PresetFormInputAutogen is the auto-generation type for this field.
const ( // PresetFormInputAutogenProjectNamespace is used to define a project namespace string. PresetFormInputAutogenProjectNamespace PresetFormInputAutogen = "PROJECT_NAMESPACE" // PresetFormInputAutogenSecureToken is used to define a secure token string. PresetFormInputAutogenSecureToken PresetFormInputAutogen = "SECURE_TOKEN" )
type PresetFormInputRange ¶ added in v1.11.0
type PresetFormInputRange struct { // Default is used to define the default content. Can be blank. Default *int `json:"default,omitempty"` // Min is the minimum number in the range. Min int `json:"min"` // Max is the maximum number in the range. Max int `json:"max"` // Increment is the number to increment by. Increment *int `json:"increment,omitempty"` // Unit is the unit to use. Unit *string `json:"unit"` }
PresetFormInputRange implements PresetFormInput and is returned when the type is "range".
type PresetFormInputString ¶ added in v1.11.0
type PresetFormInputString struct { // Default is used to define the default content. Can be blank. Default string `json:"default,omitempty"` // Autogen defines the auto-generated value for this input. // Can be blank if unset. Autogen PresetFormInputAutogen `json:"autogen,omitempty"` // MaxLength is the maximum length of the string. MaxLength *uint `json:"max_length,omitempty"` // Validator is used to define the validator. Validator string `json:"validator,omitempty"` }
PresetFormInputString implements PresetFormInput and is returned when the type is "string".
type PresetFormMapTo ¶ added in v1.11.0
type PresetFormMapTo struct { // Type is used to define the mapping type. Must be env. Type PresetFormMappingType `json:"type"` // Key is used to define the key this maps to. This should be blank when // the type is volume size. Key string `json:"key,omitempty"` }
PresetFormMapTo is used to map a external source to this field.
func (PresetFormMapTo) MarshalJSON ¶ added in v1.11.0
func (p PresetFormMapTo) MarshalJSON() ([]byte, error)
MarshalJSON is used to handle JSON marshalling.
type PresetFormMappingType ¶ added in v1.11.0
type PresetFormMappingType string
PresetFormMappingType is used to define the type of the mapping.
const ( // PresetFormMappingTypeEnv is used to define a env mapping. PresetFormMappingTypeEnv PresetFormMappingType = "env" // PresetFormMappingVolumeSize is used to define a volume size mapping. PresetFormMappingVolumeSize PresetFormMappingType = "volume_size" )
type Project ¶
type Project struct { // ID is used to define the ID of a project. ID string `json:"id"` // Name is the name of a project. Name string `json:"name"` // Tier is the tier of this project. Tier ProjectTier `json:"tier"` // CreatedAt defines when this project was created. CreatedAt Timestamp `json:"created_at"` // Icon is used to define the icon for this project. Icon *string `json:"icon"` // Namespace is the registry namespace for this project. Namespace string `json:"namespace"` // Type is the type of the project. Type ProjectType `json:"type"` // DefaultQuotas is used to define the default quotas for this project. DefaultQuotas DefaultQuotas `json:"default_quotas"` // QuotaOverrides is used to define any overrides to quotas. QuotaOverrides map[string]int `json:"quota_overrides"` // QuotaUsage is the quota usage for this project. QuotaUsage QuotaUsage `json:"quota_usage"` }
Project defines the structure of a project.
type ProjectMember ¶
type ProjectMember struct { // ID is the ID of the member. ID string `json:"id"` // Name is the name of the member. Name string `json:"name"` // Username is the username of the member. Username string `json:"username"` // Role is the role of the member. Role ProjectRole `json:"role"` // JoinedAt is when the member joined the project. JoinedAt Timestamp `json:"joined_at"` }
ProjectMember is used to define a member of a project.
type ProjectPermission ¶
type ProjectPermission string
ProjectPermission is used to define a permission for a project token.
const ( // ProjectPermissionManageRegistry is used to define the permission to manage the registry. ProjectPermissionManageRegistry ProjectPermission = "MANAGE_REGISTRY" // ProjectPermissionManageMembers is used to define the permission to manage members. ProjectPermissionManageMembers ProjectPermission = "MANAGE_MEMBERS" // ProjectPermissionManagePipe is used to define the permission to manage the pipe. ProjectPermissionManagePipe ProjectPermission = "MANAGE_PIPE" // ProjectPermissionManageChannels is used to define the permission to manage channels. ProjectPermissionManageChannels ProjectPermission = "MANAGE_CHANNELS" // ProjectPermissionManageDeployments is used to define the permission to manage deployments. ProjectPermissionManageDeployments ProjectPermission = "MANAGE_DEPLOYMENTS" )
type ProjectRole ¶
type ProjectRole struct { // ID is the ID of the role. ID string `json:"id"` // Name is the name of the role. Name string `json:"name"` // Flags is the flags for this role. Flags string `json:"flags"` }
ProjectRole is used to define a role of a member in a project.
type ProjectSecret ¶
type ProjectSecret struct { // ID is the ID of the secret. ID string `json:"id"` // Name is the name of the secret. Name string `json:"name"` // Digest is the string hash of the secret. Digest string `json:"digest"` // CreatedAt is when the secret was created. CreatedAt Timestamp `json:"created_at"` }
ProjectSecret is used to define a secret for a project.
type ProjectTier ¶
type ProjectTier string
ProjectTier is the type for a tier of a project.
const ( // ProjectTierPaid is used to define a project which is in the paid tier. ProjectTierPaid ProjectTier = "paid" // ProjectTierFree is used to define a project which is in the free tier. ProjectTierFree ProjectTier = "free" )
type ProjectToken ¶
type ProjectToken struct { // ID is the ID of the project token. ID string `json:"id"` // Token is part of the key value. This will likely have half of the key obfuscated. Token string `json:"token"` // CreatedAt is when this project token was created. CreatedAt Timestamp `json:"created_at"` }
ProjectToken is used to define the structure of a project token.
type ProjectType ¶
type ProjectType string
ProjectType is the type of the project.
const ( // ProjectTypeRegular is used to define a regular project. ProjectTypeRegular ProjectType = "regular" // ProjectTypePersonal is a personal project that is created when you register an account. ProjectTypePersonal ProjectType = "personal" )
type QuotaUsage ¶
QuotaUsage is used to define the usage for a specified quota.
type Region ¶
type Region string
Region is used to define a Hop datacenter region.
const ( // RegionUSEast1 is used to define the US East 1 region. RegionUSEast1 Region = "us-east-1" )
type Resources ¶
type Resources struct { VCPU float64 `json:"vcpu"` RAM Size `json:"ram"` VGPU []VGPU `json:"vgpu"` }
Resources is used to define the resources used by a deployment.
func (Resources) MarshalJSON ¶
MarshalJSON is used to marshal the resources into JSON.
type RestartPolicy ¶
type RestartPolicy string
RestartPolicy is used to define the restart policy of a deployment.
const ( // RestartPolicyNever is used to define a deployment that never restarts. RestartPolicyNever RestartPolicy = "never" // RestartPolicyAlways is used to define a deployment that always restarts. RestartPolicyAlways RestartPolicy = "always" // RestartPolicyOnFailure is used to define a deployment that restarts on failure. RestartPolicyOnFailure RestartPolicy = "on-failure" )
type RolloutState ¶ added in v1.4.0
type RolloutState string
RolloutState is used to define the state of a rollout.
const ( // RolloutStatePending is used to define a rollout that is pending. RolloutStatePending RolloutState = "pending" // RolloutStateFinished is used to define a rollout that has finished. RolloutStateFinished RolloutState = "finished" // RolloutStateFailed is used to define a rollout that has failed. RolloutStateFailed RolloutState = "failed" )
func (RolloutState) String ¶ added in v1.4.0
func (x RolloutState) String() string
String returns the string representation of this value. This function is auto-generated.
type Room ¶
type Room struct { // ID is the ID of the room. ID string `json:"id"` // Name is the name of the room. Name string `json:"name"` // CreatedAt is when this room was created. CreatedAt Timestamp `json:"created_at"` // IngestProtocol is the protocol you can stream with. IngestProtocol IngestProtocol `json:"ingest_protocol"` // DeliveryProtocols are the protocols that are supported by this room to the client. DeliveryProtocols []DeliveryProtocol `json:"delivery_protocols"` // JoinToken is the token to subscribe to this room. JoinToken string `json:"join_token"` // IngestRegion is the region that the stream URL is located in. IngestRegion Region `json:"ingest_region"` // State is the current state of the room. State RoomState `json:"state"` }
Room is used to define the main structure of a Pipe room.
type RoomCreationOptions ¶
type RoomCreationOptions struct { // Name is the name of the room. Name string `json:"name"` // DeliveryProtocols are the protocols that are supported by this room to the client. DeliveryProtocols []DeliveryProtocol `json:"delivery_protocols"` // Ephemeral defines whether the room is ephemeral or not. Ephemeral bool `json:"ephemeral"` // Region is used to define the room region. Region Region `json:"region"` // IngestProtocol is the protocol you can stream with. IngestProtocol IngestProtocol `json:"ingest_protocol"` // HLSConfig is the configuration for HLS delivery. This can be nil. HLSConfig HLSConfig `json:"llhls_config"` }
RoomCreationOptions is used to define the options for creating a room.
type RuntimeType ¶
type RuntimeType string
RuntimeType is used to define the type of runtime.
const ( // RuntimeTypeEphemeral are sort of fire and forget. Containers won't restart if they exit, // but they can still be terminated programmatically. RuntimeTypeEphemeral RuntimeType = "ephemeral" // RuntimeTypePersistent will restart if they exit. They can also be started and stopped programmatically. RuntimeTypePersistent RuntimeType = "persistent" // RuntimeTypeStateful is for deployments/containers can only run one container at a time, and will have a persistent volume attached. RuntimeTypeStateful RuntimeType = "stateful" )
type Seconds ¶ added in v1.8.0
Seconds is a type that handles JSON encoding/decoding a time.Duration by the number of time.Second's within it rounded down. This structure is auto-generated.
func SecondsFromInt ¶ added in v1.8.0
SecondsFromInt is used to turn a int into the Seconds type.
func (Seconds) MarshalJSON ¶ added in v1.8.0
MarshalJSON implements the json.Marshaler interface.
func (Seconds) String ¶ added in v1.8.0
String uses the durafmt package to neatly format the timestamp.
func (*Seconds) UnmarshalJSON ¶ added in v1.8.0
UnmarshalJSON implements the json.Unmarshaler interface.
type SelfUser ¶ added in v1.12.0
type SelfUser struct { User `json:",inline"` // EmailVerified is set to true if the user has verified their email. EmailVerified bool `json:"email_verified"` // TOTPEnabled is set to true if the user has enabled TOTP authentication. TOTPEnabled bool `json:"totp_enabled"` // WebauthnEnabled is set to true if the user hss enabled webauthn authentication. WebauthnEnabled bool `json:"webauthn_enabled"` // MFAEnabled is set to true if the user has enabled MFA. MFAEnabled bool `json:"mfa_enabled"` // Admin defines if the user is an admin. Admin bool `json:"admin"` }
SelfUser is used to define the self user.
type ServerError ¶
type ServerError string
ServerError is sent when Hop encounters a internal server error that happens to fit the error schema.
func (ServerError) Error ¶
func (s ServerError) Error() string
Error implements the error interface.
type Size ¶
type Size string
Size is used to define a memory/storage size and allow for easy parsing of it.
type Stats ¶
type Stats struct {
OnlineCount int `json:"online_count"`
}
Stats is used to define the stats for a channel.
type Timestamp ¶
type Timestamp string
Timestamp is used to define a timestamp within the Hop API. Hop uses the ISO 8601 standard.
func TimestampFromTime ¶
TimestampFromTime takes a time.Time and turns it into a Hop compatible timestamp.
type UnknownServerError ¶
type UnknownServerError struct { StatusCode int `json:"status_code"` Message string `json:"message"` Code string `json:"code"` }
UnknownServerError refers to a server error where the cause is unknown.
func (UnknownServerError) Error ¶
func (u UnknownServerError) Error() string
Error implements the error interface.
type User ¶
type User struct { // ID is the ID of the user. ID string `json:"id"` // Name is the name of the user. Name string `json:"name"` // Username is the username of the user. Username string `json:"username"` // Email is the email of the user. Email string `json:"email"` }
User is used to define a user.
type UserMeInfo ¶
type UserMeInfo struct { // Projects is the list of projects the user is a member of. Projects []*Project `json:"projects"` // User is the user. User SelfUser `json:"user"` // ProjectMemberRoleMap is a map of project ID to project member role. ProjectMemberRoleMap map[string]*ProjectRole `json:"project_member_role_map"` // LeapToken is the users Leap token. Can be blank. LeapToken string `json:"leap_token"` }
UserMeInfo is the payload returned fcr all information about the current user.
type UserPat ¶
type UserPat struct { // ID is the ID of the personal access token. ID string `json:"id"` // Name is the name of the personal access token. Name string `json:"name"` // PAT is a partially censored personal access token (unless this is from a creation). PAT string `json:"pat"` // CreatedAt is when the personal access token was created. CreatedAt Timestamp `json:"created_at"` }
UserPat is used to define a personal access token.
type VGPU ¶
type VGPU struct { // Type is the type of the virtual GPU. Type GPUType `json:"type"` // Count is the number of GPU's to allocate of this type. Count int `json:"count"` }
VGPU is used to define a virtual GPU.
type ValidationError ¶ added in v1.11.0
type ValidationError struct {
Errors []gojsonschema.ResultError `json:"errors"`
}
ValidationError is used when a JSON schema is invalidated.
func (ValidationError) Error ¶ added in v1.11.0
func (e ValidationError) Error() string
Error is used to concatenate the content of all the errors.
type VolumeDefinition ¶
type VolumeDefinition struct { // FS is the filesystem of the volume. FS VolumeFormat `json:"fs"` // Size is the size of the volume. Size Size `json:"size"` // MountPath is the mount path of the volume. MountPath string `json:"mountpath"` }
VolumeDefinition is used to define a volume definition.
func (VolumeDefinition) String ¶
func (x VolumeDefinition) String() string
String returns the string representation of this value. This function is auto-generated.
type VolumeFormat ¶
type VolumeFormat string
VolumeFormat is used to define the format of a volume.
const ( // VolumeFormatExt4 defines a volume format of ext4. VolumeFormatExt4 VolumeFormat = "ext4" // VolumeFormatXFS defines a volume format of xfs. VolumeFormatXFS VolumeFormat = "xfs" )
func (VolumeFormat) String ¶
func (x VolumeFormat) String() string
String returns the string representation of this value. This function is auto-generated.