models

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogLineFromDB

func LogLineFromDB(s dmodel.LogLine) boxspec.LogsLine

Types

type AddBoxToMachineRequest added in v0.6.0

type AddBoxToMachineRequest struct {
	BoxId string `json:"boxId"`
}

type AttachVolumeRequest

type AttachVolumeRequest struct {
	VolumeId string `json:"volumeId"`

	RootUid  *int64  `json:"rootUid,omitempty"`
	RootGid  *int64  `json:"rootGid,omitempty"`
	RootMode *string `json:"rootMode,omitempty"`
}

type AuthInfo

type AuthInfo struct {
	OidcIssuerUrl string `json:"oidcIssuerUrl"`
	OidcClientId  string `json:"oidcClientId"`
}

type AwsInstanceType added in v0.12.0

type AwsInstanceType struct {
	InstanceType     string `json:"instanceType"`
	FreeTierEligible bool   `json:"freeTierEligible"`
	Hypervisor       string `json:"hypervisor"`
	MemoryInMB       int64  `json:"memoryInMB"`
	VCPUCount        int32  `json:"vCpuCount"`
}

type AwsRegion added in v0.12.0

type AwsRegion struct {
	OptInStatus string `json:"OptInStatus"`
	RegionName  string `json:"RegionName"`
	Endpoint    string `json:"Endpoint"`
}

type Box

type Box struct {
	ID        string    `json:"id"`
	Workspace string    `json:"workspace"`
	CreatedAt time.Time `json:"createdAt"`

	Status        string `json:"status"`
	StatusDetails string `json:"statusDetails"`

	Name    string         `json:"name"`
	BoxType dmodel.BoxType `json:"boxType"`

	Machine *string `json:"machine"`

	Network     *string             `json:"network"`
	NetworkType *dmodel.NetworkType `json:"networkType"`

	Enabled bool `json:"enabled"`

	Sandbox *BoxSandbox `json:"sandbox,omitempty"`
}

func BoxFromDB

func BoxFromDB(s dmodel.Box, sandbox *dmodel.BoxSandbox) *Box

type BoxComposeProject

type BoxComposeProject struct {
	Name           string `json:"name"`
	ComposeProject string `json:"composeProject"`
}

func BoxComposeProjectFromDB

func BoxComposeProjectFromDB(s dmodel.BoxComposeProject) *BoxComposeProject

type BoxPortForward added in v0.4.0

type BoxPortForward struct {
	ID          string    `json:"id"`
	CreatedAt   time.Time `json:"createdAt"`
	BoxID       string    `json:"boxId"`
	Description *string   `json:"description,omitempty"`

	Protocol      string `json:"protocol"`
	HostPortFirst int    `json:"hostPortFirst"`
	HostPortLast  int    `json:"hostPortLast"`
	SandboxPort   int    `json:"sandboxPort"`
}

func BoxPortForwardFromDB added in v0.4.0

func BoxPortForwardFromDB(pf dmodel.BoxPortForward) *BoxPortForward

type BoxSandbox added in v0.11.0

type BoxSandbox struct {
	ID string `json:"id"`

	BoxId string `json:"boxId"`

	MachineID string `json:"machineId"`
	Hostname  string `json:"hostname"`

	StatusTime *time.Time `json:"statusTime,omitempty"`
	RunStatus  *string    `json:"runStatus,omitempty"`
	StartTime  *time.Time `json:"startTime,omitempty"`
	StopTime   *time.Time `json:"stopTime,omitempty"`

	// compressed json
	DockerPs []byte `json:"dockerPs,omitempty"`

	NetworkIp4 *string `json:"networkIp4,omitempty"`
}

func BoxSandboxFromDB added in v0.11.0

func BoxSandboxFromDB(s dmodel.BoxSandbox) *BoxSandbox

type CreateBox

type CreateBox struct {
	Name string `json:"name"`

	Network *string `json:"network,omitempty"`

	VolumeAttachments []AttachVolumeRequest     `json:"volumeAttachments,omitempty"`
	ComposeProjects   []CreateBoxComposeProject `json:"composeProjects,omitempty"`
}

type CreateBoxComposeProject

type CreateBoxComposeProject struct {
	Name           string `json:"name"`
	ComposeProject string `json:"composeProject"`
}

type CreateBoxPortForward added in v0.4.0

type CreateBoxPortForward struct {
	Description *string `json:"description,omitempty"`

	Protocol      string `json:"protocol"`
	HostPortFirst int    `json:"hostPortFirst"`
	HostPortLast  int    `json:"hostPortLast"`
	SandboxPort   int    `json:"sandboxPort"`
}

type CreateBoxSandbox added in v0.11.0

type CreateBoxSandbox struct {
	// This is the ID found in /etc/machine-id, not the dboxed machine id
	MachineId string `json:"machineId"`
	Hostname  string `json:"hostname"`
}

type CreateDboxedSpec added in v0.10.0

type CreateDboxedSpec struct {
	GitUrl   string        `json:"gitUrl"`
	GitRef   *types.GitRef `json:"gitRef,omitempty"`
	Subdir   string        `json:"subdir"`
	SpecFile string        `json:"specFile"`
}

type CreateGitCredentials added in v0.8.0

type CreateGitCredentials struct {
	Host     string `json:"host"`
	PathGlob string `json:"pathGlob"`

	CredentialsType dmodel.GitCredentialsType `json:"credentialsType"`

	Username *string `json:"username,omitempty"`
	Password *string `json:"password,omitempty"`
	SshKey   *string `json:"sshKey,omitempty"`
}

type CreateLoadBalancer added in v0.5.0

type CreateLoadBalancer struct {
	Name             string                  `json:"name"`
	LoadBalancerType dmodel.LoadBalancerType `json:"loadBalancerType"`
	Network          string                  `json:"network"`
	HttpPort         int                     `json:"httpPort"`
	HttpsPort        int                     `json:"httpsPort"`
	Replicas         int                     `json:"replicas,omitempty"`
}

type CreateLoadBalancerService added in v0.5.0

type CreateLoadBalancerService struct {
	LoadBalancerID string  `json:"loadBalancerId"`
	Description    *string `json:"description,omitempty"`
	Hostname       string  `json:"hostname"`
	PathPrefix     string  `json:"pathPrefix"`
	Port           int     `json:"port"`
}

type CreateMachine

type CreateMachine struct {
	Name string `json:"name"`

	MachineProvider *string `json:"machineProvider,omitempty"`

	Hetzner *CreateMachineHetzner `json:"hetzner,omitempty"`
	Aws     *CreateMachineAws     `json:"aws,omitempty"`
}

type CreateMachineAws

type CreateMachineAws struct {
	InstanceType   string `json:"instanceType"`
	SubnetId       string `json:"subnetId"`
	RootVolumeSize *int64 `json:"rootVolumeSize,omitempty"`
}

type CreateMachineHetzner

type CreateMachineHetzner struct {
	ServerType     string `json:"serverType"`
	ServerLocation string `json:"serverLocation"`
}

type CreateMachineProvider

type CreateMachineProvider struct {
	Type dmodel.MachineProviderType `json:"type"`
	Name string                     `json:"name"`

	SshKeyPublic *string `json:"sshKeyPublic,omitempty"`

	Aws     *CreateMachineProviderAws     `json:"aws,omitempty"`
	Hetzner *CreateMachineProviderHetzner `json:"hetzner,omitempty"`
}

type CreateMachineProviderAws

type CreateMachineProviderAws struct {
	Region string `json:"region"`
	VpcId  string `json:"vpcId"`

	AwsAccessKeyId     string `json:"awsAccessKeyId"`
	AwsSecretAccessKey string `json:"awsSecretAccessKey"`
}

type CreateMachineProviderHetzner

type CreateMachineProviderHetzner struct {
	CloudToken    string  `json:"cloudToken"`
	RobotUsername *string `json:"robotUsername,omitempty"`
	RobotPassword *string `json:"robotPassword,omitempty"`

	HetznerNetworkName string `json:"hetznerNetworkName"`
}

type CreateNetwork

type CreateNetwork struct {
	Type dmodel.NetworkType `json:"type"`
	Name string             `json:"name"`

	Netbird *CreateNetworkNetbird `json:"netbird,omitempty"`
}

type CreateNetworkNetbird

type CreateNetworkNetbird struct {
	NetbirdVersion string  `json:"netbirdVersion"`
	ApiUrl         *string `json:"apiUrl,omitempty"`
	ApiAccessToken string  `json:"apiAccessToken"`
}

type CreateS3Bucket

type CreateS3Bucket struct {
	Endpoint        string `json:"endpoint"`
	Bucket          string `json:"bucket"`
	AccessKeyId     string `json:"accessKeyId"`
	SecretAccessKey string `json:"secretAccessKey"`
}

type CreateToken

type CreateToken struct {
	Name       string           `json:"name"`
	Type       dmodel.TokenType `json:"type"`
	ValidUntil *time.Time       `json:"validUntil,omitempty"`

	MachineID      *string `json:"machineId,omitempty"`
	BoxID          *string `json:"boxId,omitempty"`
	LoadBalancerId *string `json:"loadBalancerId,omitempty"`
}

type CreateVolume

type CreateVolume struct {
	Name string `json:"name"`

	VolumeProvider string `json:"volumeProvider"`

	Restic *CreateVolumeRestic `json:"restic,omitempty"`
}

type CreateVolumeProvider

type CreateVolumeProvider struct {
	Type dmodel.VolumeProviderType `json:"type"`
	Name string                    `json:"name"`

	Restic *CreateVolumeProviderRestic `json:"restic"`
}

type CreateVolumeProviderRestic added in v0.9.0

type CreateVolumeProviderRestic struct {
	Password string `json:"password"`

	StorageType dmodel.VolumeProviderStorageType `json:"storageType"`
	S3BucketId  *string                          `json:"s3BucketId"`

	StoragePrefix string `json:"storagePrefix"`
}

type CreateVolumeRestic added in v0.9.0

type CreateVolumeRestic struct {
	FsSize int64  `json:"fsSize"`
	FsType string `json:"fsType"`
}

type CreateVolumeSnapshot

type CreateVolumeSnapshot struct {
	MountId string `json:"mountId"`

	Restic *VolumeSnapshotRestic `json:"restic,omitempty"`
}

type CreateWorkspace

type CreateWorkspace struct {
	Name string `json:"name"`
}

type DboxedSpec added in v0.10.0

type DboxedSpec struct {
	ID        string    `json:"id"`
	CreatedAt time.Time `json:"createdAt"`
	Workspace string    `json:"workspace"`

	Status        string `json:"status"`
	StatusDetails string `json:"statusDetails"`

	GitUrl   string        `json:"gitUrl"`
	GitRef   *types.GitRef `json:"gitRef,omitempty"`
	Subdir   string        `json:"subdir"`
	SpecFile string        `json:"specFile"`
}

func DboxedSpecFromDB added in v0.10.0

func DboxedSpecFromDB(v dmodel.DboxedSpec) DboxedSpec

type GitCredentials added in v0.8.0

type GitCredentials struct {
	ID        string    `json:"id"`
	CreatedAt time.Time `json:"createdAt"`
	Workspace string    `json:"workspace"`

	Host            string                    `json:"host"`
	PathGlob        string                    `json:"pathGlob"`
	CredentialsType dmodel.GitCredentialsType `json:"credentialsType"`
}

func GitCredentialsFromDB added in v0.8.0

func GitCredentialsFromDB(v dmodel.GitCredentials) GitCredentials

type Healthz

type Healthz struct {
	Ok bool
}

type HetznerDeprecation added in v0.12.0

type HetznerDeprecation struct {
	Announced        time.Time `json:"announced"`
	UnavailableAfter time.Time `json:"unavailableAfter"`
}

type HetznerLocation added in v0.12.0

type HetznerLocation struct {
	City        string  `json:"city"`
	Country     string  `json:"country"`
	Description string  `json:"description"`
	Id          int64   `json:"id"`
	Latitude    float64 `json:"latitude"`
	Longitude   float64 `json:"longitude"`
	Name        string  `json:"name"`
	NetworkZone string  `json:"network_zone"`
}

type HetznerPrice added in v0.12.0

type HetznerPrice struct {
	Net   string `json:"net"`
	Gross string `json:"gross"`
}

type HetznerServerType added in v0.12.0

type HetznerServerType struct {
	ID           int64   `json:"id"`
	Name         string  `json:"name"`
	Description  string  `json:"description"`
	Category     string  `json:"category"`
	Cores        int     `json:"cores"`
	Memory       float32 `json:"memory"`
	Disk         int     `json:"disk"`
	StorageType  string  `json:"storageType"`
	CPUType      string  `json:"cpuType"`
	Architecture string  `json:"architecture"`

	Pricings  []HetznerServerTypeLocationPricing `json:"pricings"`
	Locations []HetznerServerTypeLocation        `json:"locations"`
}

type HetznerServerTypeLocation added in v0.12.0

type HetznerServerTypeLocation struct {
	Location    string              `json:"location"`
	Deprecation *HetznerDeprecation `json:"deprecation,omitempty"`
}

type HetznerServerTypeLocationPricing added in v0.12.0

type HetznerServerTypeLocationPricing struct {
	Location string       `json:"location"`
	Hourly   HetznerPrice `json:"hourly"`
	Monthly  HetznerPrice `json:"monthly"`

	// IncludedTraffic is the free traffic per month in bytes
	IncludedTraffic uint64       `json:"includedTraffic"`
	PerTBTraffic    HetznerPrice `json:"perTBTraffic"`
}

type LoadBalancer added in v0.5.0

type LoadBalancer struct {
	ID        string    `json:"id"`
	Workspace string    `json:"workspace"`
	CreatedAt time.Time `json:"createdAt"`

	Status        string `json:"status"`
	StatusDetails string `json:"statusDetails"`

	Name             string                  `json:"name"`
	LoadBalancerType dmodel.LoadBalancerType `json:"loadBalancerType"`
	Network          string                  `json:"network"`
	HttpPort         int                     `json:"httpPort"`
	HttpsPort        int                     `json:"httpsPort"`
	Replicas         int                     `json:"replicas"`
}

func LoadBalancerFromDB added in v0.5.0

func LoadBalancerFromDB(p dmodel.LoadBalancer) *LoadBalancer

type LoadBalancerService added in v0.5.0

type LoadBalancerService struct {
	ID        string    `json:"id"`
	CreatedAt time.Time `json:"createdAt"`

	LoadBalancerID string `json:"loadBalancerId"`
	BoxID          string `json:"boxId"`

	Description *string `json:"description,omitempty"`

	Hostname   string `json:"hostname"`
	PathPrefix string `json:"pathPrefix"`
	Port       int    `json:"port"`
}

func LoadBalancerServiceFromDB added in v0.5.0

func LoadBalancerServiceFromDB(bi dmodel.LoadBalancerService) *LoadBalancerService

type LogMetadataModel

type LogMetadataModel struct {
	ID        string    `json:"id"`
	Workspace string    `json:"workspace"`
	CreatedAt time.Time `json:"createdAt"`

	LastLogTime *time.Time `json:"lastLogTime"`

	boxspec.LogMetadata
}

func LogMetadataFromDB

func LogMetadataFromDB(s dmodel.LogMetadata) (*LogMetadataModel, error)

type LogsError

type LogsError struct {
	Message string `json:"message"`
}

type Machine

type Machine struct {
	ID        string    `json:"id"`
	Workspace string    `json:"workspace"`
	CreatedAt time.Time `json:"createdAt"`

	Status        string `json:"status"`
	StatusDetails string `json:"statusDetails"`

	MachineProviderStatus        string `json:"machineProviderStatus"`
	MachineProviderStatusDetails string `json:"machineProviderStatusDetails"`

	Name string `json:"name"`

	DboxedVersion string `json:"dboxedVersion"`

	MachineProvider     *string                     `json:"machineProvider,omitempty"`
	MachineProviderType *dmodel.MachineProviderType `json:"machineProviderType,omitempty"`

	Aws     *MachineAws     `json:"aws,omitempty"`
	Hetzner *MachineHetzner `json:"hetzner,omitempty"`

	RunStatus *MachineRunStatus `json:"runStatus,omitempty"`
}

func MachineFromDB

func MachineFromDB(s dmodel.Machine, runStatus *dmodel.MachineRunStatus) (*Machine, error)

type MachineAws added in v0.9.0

type MachineAws struct {
	InstanceType   string `json:"instanceType"`
	SubnetID       string `json:"subnetID"`
	RootVolumeSize int64  `json:"rootVolumeSize"`

	Status *MachineStatusAws `json:"status,omitempty"`
}

type MachineHetzner added in v0.9.0

type MachineHetzner struct {
	ServerType     string `json:"serverType"`
	ServerLocation string `json:"serverLocation"`

	Status *MachineStatusHetzner `json:"status,omitempty"`
}

type MachineProvider

type MachineProvider struct {
	ID        string    `json:"id"`
	CreatedAt time.Time `json:"createdAt"`
	Workspace string    `json:"workspace"`

	Status        string `json:"status"`
	StatusDetails string `json:"statusDetails"`

	Type dmodel.MachineProviderType `json:"type"`
	Name string                     `json:"name"`

	SshKeyFingerprint *string `json:"sshKeyFingerprint"`

	Aws     *MachineProviderAws     `json:"aws,omitempty"`
	Hetzner *MachineProviderHetzner `json:"hetzner,omitempty"`
}

func MachineProviderFromDB

func MachineProviderFromDB(v dmodel.MachineProvider) *MachineProvider

type MachineProviderAws

type MachineProviderAws struct {
	Region          string  `json:"region"`
	VpcID           *string `json:"vpcId"`
	VpcName         *string `json:"vpcName"`
	VpcCidr         *string `json:"vpcCidr"`
	SecurityGroupID *string `json:"securityGroupId"`

	Subnets []MachineProviderAwsSubnet `json:"subnets"`
}

type MachineProviderAwsSubnet

type MachineProviderAwsSubnet struct {
	MachineProvider  string  `json:"machineProvider"`
	SubnetID         string  `json:"subnetId"`
	SubnetName       *string `json:"subnetName"`
	AvailabilityZone string  `json:"availabilityZone"`
	Cidr             string  `json:"cidr"`
}

type MachineProviderHetzner

type MachineProviderHetzner struct {
	HetznerNetworkName string  `json:"hetznerNetworkName"`
	HetznerNetworkID   *int64  `json:"hetznerNetworkId"`
	HetznerNetworkZone *string `json:"hetznerNetworkZone"`
	HetznerNetworkCidr *string `json:"hetznerNetworkCidr"`
	CloudSubnetCidr    *string `json:"cloudSubnetCidr"`
	RobotSubnetCidr    *string `json:"robotSubnetCidr"`
	RobotVswitchID     *int64  `json:"robotVswitchId"`
}

type MachineRunStatus added in v0.6.0

type MachineRunStatus struct {
	StatusTime          *time.Time `json:"statusTime,omitempty"`
	RunStatus           *string    `json:"runStatus,omitempty"`
	LastReconcileResult *string    `json:"lastReconcileResult,omitempty"`
	StartTime           *time.Time `json:"startTime,omitempty"`
	StopTime            *time.Time `json:"stopTime,omitempty"`
}

func MachineRunStatusFromDB added in v0.6.0

func MachineRunStatusFromDB(s *dmodel.MachineRunStatus) *MachineRunStatus

type MachineStatusAws added in v0.9.0

type MachineStatusAws struct {
	InstanceId *string `json:"instanceId,omitempty"`
	PublicIp4  *string `json:"publicIp4,omitempty"`
}

type MachineStatusHetzner added in v0.9.0

type MachineStatusHetzner struct {
	ServerId  *int64  `json:"serverId,omitempty"`
	PublicIp4 *string `json:"publicIp4,omitempty"`
}

type NetbirdPeerStatus added in v0.4.0

type NetbirdPeerStatus struct {
	NetbirdIp                   string `json:"netbirdIp"`
	PublicKey                   string `json:"publicKey"`
	UsesKernelInterface         bool   `json:"usesKernelInterface"`
	Fqdn                        string `json:"fqdn"`
	QuantumResistance           bool   `json:"quantumResistance"`
	QuantumResistancePermissive bool   `json:"quantumResistancePermissive"`
	ForwardingRules             int    `json:"forwardingRules"`
}

type Network

type Network struct {
	ID        string    `json:"id"`
	CreatedAt time.Time `json:"createdAt"`
	Workspace string    `json:"workspace"`

	Status        string `json:"status"`
	StatusDetails string `json:"statusDetails"`

	Type dmodel.NetworkType `json:"type"`
	Name string             `json:"name"`

	Netbird *NetworkNetbird `json:"netbird"`
}

func NetworkFromDB

func NetworkFromDB(v dmodel.Network) *Network

type NetworkNetbird

type NetworkNetbird struct {
	NetbirdVersion string `json:"netbirdVersion"`
	ApiUrl         string `json:"apiUrl"`
}

func NetworkNetbirdFromDB

func NetworkNetbirdFromDB(v dmodel.NetworkNetbird) *NetworkNetbird

type PostLogs

type PostLogs struct {
	Metadata boxspec.LogMetadata `json:"metadata"`
	Lines    []boxspec.LogsLine  `json:"lines"`
}

type S3Bucket

type S3Bucket struct {
	ID        string    `json:"id"`
	CreatedAt time.Time `json:"createdAt"`
	Workspace string    `json:"workspace"`

	Status        string `json:"status"`
	StatusDetails string `json:"statusDetails"`

	Endpoint string `json:"endpoint"`
	Bucket   string `json:"bucket"`

	DeterminedRegion *string `json:"determinedRegion"`
}

func S3BucketFromDB

func S3BucketFromDB(v dmodel.S3Bucket) S3Bucket

type S3ObjectInfo

type S3ObjectInfo struct {
	Key          string     `json:"key"`
	Size         int64      `json:"size"`
	LastModified *time.Time `json:"lastModified,omitempty"`
	Etag         string     `json:"etag,omitempty"`

	PresignedGetUrl        string    `json:"presignedGetUrl"`
	PresignedGetUrlExpires time.Time `json:"PresignedGetUrlExpires"`
}

type S3ProxyDeleteObjectRequest

type S3ProxyDeleteObjectRequest struct {
	Key string `json:"key"`
}

type S3ProxyDeleteObjectResult

type S3ProxyDeleteObjectResult struct {
}

type S3ProxyListObjectsRequest

type S3ProxyListObjectsRequest struct {
	Prefix    string `json:"prefix"`
	Recursive bool   `json:"recursive"`
}

type S3ProxyListObjectsResult

type S3ProxyListObjectsResult struct {
	Objects []S3ObjectInfo `json:"objects"`
}

type S3ProxyPresignPutRequest

type S3ProxyPresignPutRequest struct {
	Key string `json:"key"`
}

type S3ProxyPresignPutResult

type S3ProxyPresignPutResult struct {
	PresignedUrl string    `json:"presignedUrl"`
	Expires      time.Time `json:"expires"`
}

type S3ProxyRenameObjectRequest

type S3ProxyRenameObjectRequest struct {
	OldKey string `json:"oldKey"`
	NewKey string `json:"newKey"`
}

type S3ProxyRenameObjectResult

type S3ProxyRenameObjectResult struct {
}

type Token

type Token struct {
	ID        string    `json:"id"`
	Workspace string    `json:"workspace"`
	CreatedAt time.Time `json:"createdAt"`

	Name       string           `json:"name"`
	Type       dmodel.TokenType `json:"type"`
	ValidUntil *time.Time       `json:"validUntil"`

	Token *string `json:"token,omitempty"`

	MachineID      *string `json:"machineId,omitempty"`
	BoxID          *string `json:"boxId,omitempty"`
	LoadBalancerId *string `json:"loadBalancerId,omitempty"`
}

func TokenFromDB

func TokenFromDB(v dmodel.Token, withSecret bool) Token

type UpdateBoxComposeProject

type UpdateBoxComposeProject struct {
	ComposeProject string `json:"composeProject"`
}

type UpdateBoxPortForward added in v0.4.0

type UpdateBoxPortForward struct {
	Description *string `json:"description,omitempty"`

	Protocol      *string `json:"protocol,omitempty"`
	HostPortFirst *int    `json:"hostPortFirst,omitempty"`
	HostPortLast  *int    `json:"hostPortLast,omitempty"`
	SandboxPort   *int    `json:"sandboxPort,omitempty"`
}

type UpdateBoxSandboxStatus

type UpdateBoxSandboxStatus struct {
	SandboxStatus *UpdateBoxSandboxStatus2 `json:"sandboxStatus,omitempty"`

	// compressed json
	DockerPs []byte `json:"dockerPs,omitempty"`
}

type UpdateBoxSandboxStatus2

type UpdateBoxSandboxStatus2 struct {
	RunStatus *string    `json:"runStatus,omitempty"`
	StartTime *time.Time `json:"startTime,omitempty"`
	StopTime  *time.Time `json:"stopTime,omitempty"`

	NetworkIp4 *string `json:"networkIp4,omitempty"`
}

type UpdateDboxedSpec added in v0.10.0

type UpdateDboxedSpec struct {
	GitUrl   *string       `json:"gitUrl,omitempty"`
	GitRef   *types.GitRef `json:"gitRef,omitempty"`
	Subdir   *string       `json:"subdir,omitempty"`
	SpecFile *string       `json:"specFile,omitempty"`
}

type UpdateGitCredentials added in v0.8.0

type UpdateGitCredentials struct {
	Username *string `json:"username,omitempty"`
	Password *string `json:"password,omitempty"`
	SshKey   *string `json:"sshKey,omitempty"`
}

type UpdateLoadBalancer added in v0.5.0

type UpdateLoadBalancer struct {
	HttpPort  *int `json:"httpPort,omitempty"`
	HttpsPort *int `json:"httpsPort,omitempty"`
	Replicas  *int `json:"replicas,omitempty"`
}

type UpdateLoadBalancerService added in v0.5.0

type UpdateLoadBalancerService struct {
	Description *string `json:"description,omitempty"`
	Hostname    *string `json:"hostname,omitempty"`
	PathPrefix  *string `json:"pathPrefix,omitempty"`
	Port        *int    `json:"port,omitempty"`
}

type UpdateMachine

type UpdateMachine struct {
}

type UpdateMachineProvider

type UpdateMachineProvider struct {
	SshKeyPublic *string `json:"sshKeyPublic,omitempty"`

	Aws     *UpdateMachineProviderAws     `json:"aws,omitempty"`
	Hetzner *UpdateMachineProviderHetzner `json:"hetzner,omitempty"`
}

type UpdateMachineProviderAws

type UpdateMachineProviderAws struct {
	AwsAccessKeyId     *string `json:"awsAccessKeyId,omitempty"`
	AwsSecretAccessKey *string `json:"awsSecretAccessKey,omitempty"`
}

type UpdateMachineProviderHetzner

type UpdateMachineProviderHetzner struct {
	CloudToken    *string `json:"cloudToken,omitempty"`
	RobotUsername *string `json:"robotUsername,omitempty"`
	RobotPassword *string `json:"robotPassword,omitempty"`
}

type UpdateMachineRunStatus added in v0.6.0

type UpdateMachineRunStatus struct {
	RunStatus           *string    `json:"runStatus,omitempty"`
	LastReconcileResult *string    `json:"lastReconcileResult,omitempty"`
	StartTime           *time.Time `json:"startTime,omitempty"`
	StopTime            *time.Time `json:"stopTime,omitempty"`
}

type UpdateNetwork

type UpdateNetwork struct {
	Netbird *UpdateNetworkNetbird `json:"netbird,omitempty"`
}

type UpdateNetworkNetbird

type UpdateNetworkNetbird struct {
	NetbirdVersion *string `json:"netbirdVersion,omitempty"`
	ApiAccessToken *string `json:"apiAccessToken,omitempty"`
}

type UpdateRepositoryStorageS3

type UpdateRepositoryStorageS3 struct {
	S3BucketId    *string `json:"s3BucketId"`
	StoragePrefix *string `json:"storagePrefix"`
}

type UpdateS3Bucket

type UpdateS3Bucket struct {
	Endpoint        *string `json:"endpoint,omitempty"`
	Bucket          *string `json:"bucket,omitempty"`
	AccessKeyId     *string `json:"accessKeyId,omitempty"`
	SecretAccessKey *string `json:"secretAccessKey,omitempty"`
}

type UpdateVolume

type UpdateVolume struct {
}

type UpdateVolumeAttachmentRequest

type UpdateVolumeAttachmentRequest struct {
	RootUid  *int64  `json:"rootUid,omitempty"`
	RootGid  *int64  `json:"rootGid,omitempty"`
	RootMode *string `json:"rootMode,omitempty"`
}

type UpdateVolumeProvider

type UpdateVolumeProvider struct {
	Restic *UpdateVolumeProviderRestic `json:"restic,omitempty"`
}

type UpdateVolumeProviderRestic added in v0.9.0

type UpdateVolumeProviderRestic struct {
	Password *string `json:"password,omitempty"`

	StorageS3 *UpdateRepositoryStorageS3 `json:"storageS3,omitempty"`
}

type User

type User struct {
	ID       string  `json:"id"`
	Username string  `json:"username"`
	EMail    *string `json:"email"`
	FullName *string `json:"fullName"`
	Avatar   *string `json:"avatar"`

	IsAdmin bool `json:"isAdmin,omitempty"`
}

func UserFromDB

func UserFromDB(v dmodel.User) User

type Volume

type Volume struct {
	ID        string    `json:"id"`
	Workspace string    `json:"workspace"`
	CreatedAt time.Time `json:"createdAt"`

	Status        string `json:"status"`
	StatusDetails string `json:"statusDetails"`

	Name string `json:"name"`

	VolumeProviderId   string                    `json:"volumeProviderId"`
	VolumeProviderType dmodel.VolumeProviderType `json:"volumeProviderType"`
	VolumeProvider     *VolumeProvider           `json:"volumeProvider"`

	MountId     *string            `json:"mountId,omitempty"`
	MountStatus *VolumeMountStatus `json:"mountStatus,omitempty"`

	LatestSnapshotId *string `json:"latestSnapshotId,omitempty"`

	Attachment *VolumeAttachment `json:"attachment,omitempty"`

	Restic *VolumeRestic `json:"restic,omitempty"`
}

func VolumeFromDB

func VolumeFromDB(s dmodel.Volume, attachment *dmodel.BoxVolumeAttachment, volumeProvider *dmodel.VolumeProvider, volumeMountStatus *dmodel.VolumeMountStatus) Volume

type VolumeAttachment

type VolumeAttachment struct {
	BoxID    string `json:"boxId"`
	VolumeID string `json:"volumeId"`

	RootUid  int64  `json:"rootUid"`
	RootGid  int64  `json:"rootGid"`
	RootMode string `json:"rootMode"`

	Volume *Volume `json:"volume,omitempty"`
}

func VolumeAttachmentFromDB

func VolumeAttachmentFromDB(attachment dmodel.BoxVolumeAttachment, volume *dmodel.Volume, volumeProvider *dmodel.VolumeProvider, volumeMountStatus *dmodel.VolumeMountStatus) VolumeAttachment

type VolumeMountRequest added in v0.3.0

type VolumeMountRequest struct {
	BoxId *string `json:"boxId,omitempty"`
}

type VolumeMountStatus added in v0.3.0

type VolumeMountStatus struct {
	VolumeId string  `json:"volumeId"`
	MountId  string  `json:"mountId"`
	BoxId    *string `json:"boxId,omitempty"`

	MountTime     time.Time  `json:"mountTime"`
	ReleaseTime   *time.Time `json:"releaseTime,omitempty"`
	ForceReleased bool       `json:"forceReleased"`

	StatusTime time.Time `json:"statusTime"`

	VolumeTotalSize *int64 `json:"volumeTotalSize,omitempty"`
	VolumeFreeSize  *int64 `json:"volumeFreeSize,omitempty"`

	LastFinishedSnapshotId *string `json:"lastFinishedSnapshotId,omitempty"`

	SnapshotStartTime *time.Time `json:"snapshotStartTime,omitempty"`
	SnapshotEndTime   *time.Time `json:"snapshotEndTime,omitempty"`
}

func VolumeMountStatusFromDB added in v0.3.0

func VolumeMountStatusFromDB(s dmodel.VolumeMountStatus) VolumeMountStatus

type VolumeProvider

type VolumeProvider struct {
	ID        string    `json:"id"`
	CreatedAt time.Time `json:"createdAt"`
	Workspace string    `json:"workspace"`

	Status        string `json:"status"`
	StatusDetails string `json:"statusDetails"`

	Type dmodel.VolumeProviderType `json:"type"`
	Name string                    `json:"name"`

	Restic *VolumeProviderRestic `json:"restic,omitempty"`
}

func VolumeProviderFromDB

func VolumeProviderFromDB(v dmodel.VolumeProvider) VolumeProvider

type VolumeProviderRestic added in v0.9.0

type VolumeProviderRestic struct {
	StorageType dmodel.VolumeProviderStorageType `json:"storageType"`
	S3BucketId  *string                          `json:"s3BucketId"`

	StoragePrefix string `json:"storagePrefix"`
}

type VolumeRefreshMountRequest added in v0.3.0

type VolumeRefreshMountRequest struct {
	MountId string `json:"mountId"`

	VolumeTotalSize *int64 `json:"volumeTotalSize,omitempty"`
	VolumeFreeSize  *int64 `json:"volumeFreeSize,omitempty"`

	LastFinishedSnapshotId *string `json:"lastFinishedSnapshotId,omitempty"`

	SnapshotStartTime *time.Time `json:"snapshotStartTime,omitempty"`
	SnapshotEndTime   *time.Time `json:"snapshotEndTime,omitempty"`
}

type VolumeReleaseRequest

type VolumeReleaseRequest struct {
	MountId string `json:"mountId"`
}

type VolumeRestic added in v0.9.0

type VolumeRestic struct {
	Password string `json:"password"`

	FsSize int64  `json:"fsSize"`
	FsType string `json:"fsType"`
}

type VolumeSnapshot

type VolumeSnapshot struct {
	ID        string    `json:"id"`
	Workspace string    `json:"workspace"`
	CreatedAt time.Time `json:"createdAt"`

	VolumeID string `json:"volumeId"`
	MountId  string `json:"mountId"`

	Restic *VolumeSnapshotRestic `json:"restic,omitempty"`
}

func VolumeSnapshotFromDB

func VolumeSnapshotFromDB(v dmodel.VolumeSnapshot) VolumeSnapshot

type VolumeSnapshotRestic added in v0.9.0

type VolumeSnapshotRestic struct {
	SnapshotId       string    `json:"snapshotId"`
	SnapshotTime     time.Time `json:"snapshotTime"`
	ParentSnapshotId *string   `json:"parentSnapshotId,omitempty"`

	Hostname string `json:"hostname"`

	BackupStart time.Time `json:"backupStart"`
	BackupEnd   time.Time `json:"backupEnd"`

	// statistics from the backup json output
	FilesNew            int   `json:"filesNew"`
	FilesChanged        int   `json:"filesChanged"`
	FilesUnmodified     int   `json:"filesUnmodified"`
	DirsNew             int   `json:"dirsNew"`
	DirsChanged         int   `json:"dirsChanged"`
	DirsUnmodified      int   `json:"dirsUnmodified"`
	DataBlobs           int   `json:"dataBlobs"`
	TreeBlobs           int   `json:"treeBlobs"`
	DataAdded           int64 `json:"dataAdded"`
	DataAddedPacked     int64 `json:"dataAddedPacked"`
	TotalFilesProcessed int   `json:"totalFilesProcessed"`
	TotalBytesProcessed int64 `json:"totalBytesProcessed"`
}

type Workspace

type Workspace struct {
	ID        string    `json:"id"`
	CreatedAt time.Time `json:"createdAt"`

	Status        string `json:"status"`
	StatusDetails string `json:"statusDetails"`

	Name string `json:"name"`

	Access []WorkspaceAccess `json:"access"`
}

func WorkspaceFromDB

func WorkspaceFromDB(v dmodel.Workspace) Workspace

type WorkspaceAccess

type WorkspaceAccess struct {
	User User `json:"user"`
}

type WorkspaceIdByPath

type WorkspaceIdByPath struct {
	WorkspaceId string `path:"workspaceId"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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