shared

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analytics

type Analytics struct {
	Fields []AnalyticsField   `json:"fields,required"`
	Values [][]AnalyticsValue `json:"values,required" format:"date-time"`
	JSON   analyticsJSON      `json:"-"`
}

Project analytics data

func (*Analytics) UnmarshalJSON

func (r *Analytics) UnmarshalJSON(data []byte) (err error)

type AnalyticsField

type AnalyticsField struct {
	Name string `json:"name,required"`
	// A data type that analytic data can be represented in.
	//
	// Inspired by Grafana's data types defined at:
	// https://github.com/grafana/grafana/blob/e3288834b37b9aac10c1f43f0e621b35874c1f8a/packages/grafana-data/src/types/dataFrame.ts#L11-L23
	Type AnalyticsFieldsType `json:"type,required"`
	JSON analyticsFieldJSON  `json:"-"`
}

func (*AnalyticsField) UnmarshalJSON

func (r *AnalyticsField) UnmarshalJSON(data []byte) (err error)

type AnalyticsFieldsType

type AnalyticsFieldsType string

A data type that analytic data can be represented in.

Inspired by Grafana's data types defined at: https://github.com/grafana/grafana/blob/e3288834b37b9aac10c1f43f0e621b35874c1f8a/packages/grafana-data/src/types/dataFrame.ts#L11-L23

const (
	AnalyticsFieldsTypeTime    AnalyticsFieldsType = "time"
	AnalyticsFieldsTypeNumber  AnalyticsFieldsType = "number"
	AnalyticsFieldsTypeString  AnalyticsFieldsType = "string"
	AnalyticsFieldsTypeBoolean AnalyticsFieldsType = "boolean"
	AnalyticsFieldsTypeOther   AnalyticsFieldsType = "other"
)

type AnalyticsValue

type AnalyticsValue interface {
	ImplementsSharedAnalyticsValue()
}

Union satisfied by shared.UnionTime, shared.UnionFloat, shared.UnionString, shared.UnionBool or shared.AnalyticsValuesUnknown.

type Deployment

type Deployment struct {
	// A deployment ID
	//
	// Note that this is not UUID v4, as opposed to organization ID and project ID.
	ID        string    `json:"id,required"`
	CreatedAt time.Time `json:"createdAt,required" format:"date-time"`
	// The KV databases that this deployment has access to. Currently, only `"default"`
	// database is supported.
	Databases map[string]string `json:"databases,required" format:"uuid"`
	ProjectID string            `json:"projectId,required" format:"uuid"`
	// The status of a deployment.
	Status    DeploymentStatus `json:"status,required"`
	UpdatedAt time.Time        `json:"updatedAt,required" format:"date-time"`
	// The description of this deployment. This is present only when the `status` is
	// `success`.
	Description string         `json:"description,nullable"`
	Domains     []string       `json:"domains,nullable"`
	JSON        deploymentJSON `json:"-"`
}

func (*Deployment) UnmarshalJSON

func (r *Deployment) UnmarshalJSON(data []byte) (err error)

type DeploymentStatus

type DeploymentStatus string

The status of a deployment.

const (
	DeploymentStatusFailed  DeploymentStatus = "failed"
	DeploymentStatusPending DeploymentStatus = "pending"
	DeploymentStatusSuccess DeploymentStatus = "success"
)

type Domain

type Domain struct {
	// The ID of the domain.
	ID    string `json:"id,required" format:"uuid"`
	Token string `json:"token,required"`
	// TLS certificates for the domain.
	Certificates []DomainCertificate `json:"certificates,required"`
	CreatedAt    time.Time           `json:"createdAt,required" format:"date-time"`
	// These records are used to verify the ownership of the domain.
	DNSRecords []DomainDNSRecord `json:"dnsRecords,required"`
	// The domain value.
	Domain string `json:"domain,required"`
	// Whether the domain's ownership is validated or not.
	IsValidated bool `json:"isValidated,required"`
	// The ID of the organization that the domain is associated with.
	OrganizationID     string                   `json:"organizationId,required" format:"uuid"`
	ProvisioningStatus DomainProvisioningStatus `json:"provisioningStatus,required"`
	UpdatedAt          time.Time                `json:"updatedAt,required" format:"date-time"`
	// A deployment ID
	//
	// Note that this is not UUID v4, as opposed to organization ID and project ID.
	DeploymentID string `json:"deploymentId"`
	// The ID of the project that the domain is associated with.
	//
	// If the domain is not associated with any project, this field is omitted.
	ProjectID string     `json:"projectId,nullable" format:"uuid"`
	JSON      domainJSON `json:"-"`
}

func (*Domain) UnmarshalJSON

func (r *Domain) UnmarshalJSON(data []byte) (err error)

type DomainCertificate

type DomainCertificate struct {
	Cipher    DomainCertificatesCipher `json:"cipher,required"`
	CreatedAt time.Time                `json:"createdAt,required" format:"date-time"`
	ExpiresAt time.Time                `json:"expiresAt,required" format:"date-time"`
	UpdatedAt time.Time                `json:"updatedAt,required" format:"date-time"`
	JSON      domainCertificateJSON    `json:"-"`
}

func (*DomainCertificate) UnmarshalJSON

func (r *DomainCertificate) UnmarshalJSON(data []byte) (err error)

type DomainCertificatesCipher

type DomainCertificatesCipher string
const (
	DomainCertificatesCipherRsa DomainCertificatesCipher = "rsa"
	DomainCertificatesCipherEc  DomainCertificatesCipher = "ec"
)

type DomainDNSRecord

type DomainDNSRecord struct {
	Content string              `json:"content,required"`
	Name    string              `json:"name,required"`
	Type    string              `json:"type,required"`
	JSON    domainDNSRecordJSON `json:"-"`
}

func (*DomainDNSRecord) UnmarshalJSON

func (r *DomainDNSRecord) UnmarshalJSON(data []byte) (err error)

type DomainProvisioningStatus

type DomainProvisioningStatus interface {
	// contains filtered or unexported methods
}

Union satisfied by shared.DomainProvisioningStatusSuccess, shared.DomainProvisioningStatusFailed, shared.DomainProvisioningStatusPending or shared.DomainProvisioningStatusManual.

type DomainProvisioningStatusFailed

type DomainProvisioningStatusFailed struct {
	Code    DomainProvisioningStatusFailedCode `json:"code,required"`
	Message string                             `json:"message,required"`
	JSON    domainProvisioningStatusFailedJSON `json:"-"`
}

func (*DomainProvisioningStatusFailed) UnmarshalJSON

func (r *DomainProvisioningStatusFailed) UnmarshalJSON(data []byte) (err error)

type DomainProvisioningStatusFailedCode

type DomainProvisioningStatusFailedCode string
const (
	DomainProvisioningStatusFailedCodeFailed DomainProvisioningStatusFailedCode = "failed"
)

type DomainProvisioningStatusManual

type DomainProvisioningStatusManual struct {
	Code DomainProvisioningStatusManualCode `json:"code,required"`
	JSON domainProvisioningStatusManualJSON `json:"-"`
}

func (*DomainProvisioningStatusManual) UnmarshalJSON

func (r *DomainProvisioningStatusManual) UnmarshalJSON(data []byte) (err error)

type DomainProvisioningStatusManualCode

type DomainProvisioningStatusManualCode string
const (
	DomainProvisioningStatusManualCodeManual DomainProvisioningStatusManualCode = "manual"
)

type DomainProvisioningStatusPending

type DomainProvisioningStatusPending struct {
	Code DomainProvisioningStatusPendingCode `json:"code,required"`
	JSON domainProvisioningStatusPendingJSON `json:"-"`
}

func (*DomainProvisioningStatusPending) UnmarshalJSON

func (r *DomainProvisioningStatusPending) UnmarshalJSON(data []byte) (err error)

type DomainProvisioningStatusPendingCode

type DomainProvisioningStatusPendingCode string
const (
	DomainProvisioningStatusPendingCodePending DomainProvisioningStatusPendingCode = "pending"
)

type DomainProvisioningStatusSuccess

type DomainProvisioningStatusSuccess struct {
	Code DomainProvisioningStatusSuccessCode `json:"code,required"`
	JSON domainProvisioningStatusSuccessJSON `json:"-"`
}

func (*DomainProvisioningStatusSuccess) UnmarshalJSON

func (r *DomainProvisioningStatusSuccess) UnmarshalJSON(data []byte) (err error)

type DomainProvisioningStatusSuccessCode

type DomainProvisioningStatusSuccessCode string
const (
	DomainProvisioningStatusSuccessCodeSuccess DomainProvisioningStatusSuccessCode = "success"
)

type KvDatabase

type KvDatabase struct {
	// A KV database ID
	ID        string    `json:"id,required" format:"uuid"`
	CreatedAt time.Time `json:"createdAt,required" format:"date-time"`
	// A description of this KV database
	Description string `json:"description,required"`
	// An organization ID that this KV database belongs to
	OrganizationID string         `json:"organizationId,required" format:"uuid"`
	UpdatedAt      time.Time      `json:"updatedAt,required" format:"date-time"`
	JSON           kvDatabaseJSON `json:"-"`
}

func (*KvDatabase) UnmarshalJSON

func (r *KvDatabase) UnmarshalJSON(data []byte) (err error)

type Project

type Project struct {
	ID          string      `json:"id,required" format:"uuid"`
	CreatedAt   time.Time   `json:"createdAt,required" format:"date-time"`
	Description string      `json:"description,required"`
	Name        string      `json:"name,required"`
	UpdatedAt   time.Time   `json:"updatedAt,required" format:"date-time"`
	JSON        projectJSON `json:"-"`
}

func (*Project) UnmarshalJSON

func (r *Project) UnmarshalJSON(data []byte) (err error)

type UnionBool

type UnionBool bool

func (UnionBool) ImplementsSharedAnalyticsValue

func (UnionBool) ImplementsSharedAnalyticsValue()

type UnionFloat

type UnionFloat float64

func (UnionFloat) ImplementsSharedAnalyticsValue

func (UnionFloat) ImplementsSharedAnalyticsValue()

type UnionString

type UnionString string

func (UnionString) ImplementsSharedAnalyticsValue

func (UnionString) ImplementsSharedAnalyticsValue()

type UnionTime

type UnionTime time.Time

func (UnionTime) ImplementsSharedAnalyticsValue

func (UnionTime) ImplementsSharedAnalyticsValue()

Jump to

Keyboard shortcuts

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