types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type CatResponse

type CatResponse struct {
	Kind        string `json:"kind"`
	Content     []byte `json:"content"`
	ContentType string `json:"content_type"`
	IsText      bool   `json:"is_text"`
}

type CopyRequest

type CopyRequest struct {
	From string `json:"from_ref"`
	To   string `json:"to_label"`
}

type CopyResponse

type CopyResponse struct {
	URL string `json:"url"`
}

type DeleteResponse

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

type DeployURLsDeleteResponse

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

type DeployURLsResponse

type DeployURLsResponse struct {
	Tokens []DeployURLsResponseItem `json:"tokens"`
}

type DeployURLsResponseItem

type DeployURLsResponseItem struct {
	ID        int64  `json:"id"`
	Ref       string `json:"ref"`
	PublicURL string `json:"public_url"`
	DeployURL string `json:"deploy_url"`
	ExpiresAt string `json:"expires_at,omitempty"`
	CreatedAt string `json:"created_at"`
}

type DeploymentsResponse

type DeploymentsResponse struct {
	Deployments []DeploymentsResponseItem `json:"deployments"`
}

type DeploymentsResponseItem

type DeploymentsResponseItem struct {
	ID        int64  `json:"id"`
	Ref       string `json:"ref"`
	Change    string `json:"change"`
	Deployer  string `json:"deployer"`
	IPAddress string `json:"ip_address"`
	UserAgent string `json:"user_agent"`
	CreatedAt string `json:"created_at"`
	Deleted   bool   `json:"deleted"`
}

type ExposeRequest

type ExposeRequest struct {
	Ref           string `json:"ref"`
	ExpirySeconds int64  `json:"expiry_seconds,omitempty"`
}

type ExposeResponse

type ExposeResponse struct {
	PublicURL string `json:"public_url"`
	DeployURL string `json:"deploy_url"`
	ExpiresAt string `json:"expires_at,omitempty"`
	Warning   string `json:"warning,omitempty"`
}

type FailureResponse

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

type GCResponse

type GCResponse struct {
	DeletedHashes []string `json:"deleted"`
}

type Key

type Key = string
var (
	KeyContentType Key = "ContentType"
	KeyKind        Key = "Kind"
)

func ParseKey

func ParseKey(contentType bool, kind bool) Key

type Kind

type Kind = string
var (
	KindFile  Kind = "file"
	KindPaste Kind = "paste"
	KindRedir Kind = "redir"
)

type ListResponse

type ListResponse struct {
	Items []ListResponseItem `json:"items"`
}

type ListResponseItem

type ListResponseItem struct {
	Ref         string              `json:"ref"`
	URL         string              `json:"url"`
	Kind        string              `json:"kind"`
	ContentType string              `json:"mime"`
	IsText      bool                `json:"is_text"`
	Hits        int64               `json:"hits"`
	Hash        string              `json:"hash"`
	Meta        string              `json:"meta"`
	LastHitAt   sql.Null[time.Time] `json:"last_hit_at"`
}

type MoveRequest

type MoveRequest struct {
	FromRef string `json:"from_ref"`
	ToLabel string `json:"to_label"`
}

type MoveResponse

type MoveResponse struct {
	URL string `json:"url"`
}

type SetRequest

type SetRequest struct {
	Ref   string `json:"ref"`
	Key   string `json:"key"`
	Value string `json:"value"`
}

type SetResponse

type SetResponse struct {
	Modified bool `json:"modified"`
}

type TailResponse

type TailResponse struct {
	Logs []TailResponseItem `json:"logs"`
}

type TailResponseItem

type TailResponseItem struct {
	ID        int64     `json:"id"`
	CreatedAt time.Time `json:"created_at"`
	Method    string    `json:"method"`
	Request   string    `json:"request"`
	IPAddress string    `json:"ip_address"`
	UserAgent string    `json:"user_agent"`
	BaseURL   string    `json:"base_url"`
	Renamed   bool      `json:"renamed"`
	Exists    bool      `json:"exists"`
	Ref       string    `json:"ref"`
}

type UploadRequest

type UploadRequest struct {
	Label       string `json:"label"`
	Kind        string `json:"kind"`
	Content     string `json:"content"`
	ContentHash string `json:"content_hash"`
	ContentType string `json:"content_type"`
	Force       bool   `json:"force"`
}

type UploadResponse

type UploadResponse struct {
	URL string `json:"url"`
}

Jump to

Keyboard shortcuts

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