catalog

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cashout

type Cashout struct {
	Method       string  `json:"method" yaml:"method"`
	DashboardURL string  `json:"dashboardUrl" yaml:"dashboard_url"`
	MinAmount    float64 `json:"minAmount" yaml:"min_amount"`
	Currency     string  `json:"currency" yaml:"currency"`
	Notes        string  `json:"notes" yaml:"notes"`
}

type Catalog

type Catalog struct {
	// contains filtered or unexported fields
}

func Load

func Load() (*Catalog, error)

func LoadEmbedded

func LoadEmbedded(fsys fs.FS) (*Catalog, error)

func (*Catalog) Get

func (c *Catalog) Get(slug string) (Service, bool)

func (*Catalog) List

func (c *Catalog) List() []Service

func (*Catalog) ListVisible

func (c *Catalog) ListVisible() []Service

type CollectorMetadata

type CollectorMetadata struct {
	Type  string `json:"type" yaml:"type"`
	Notes string `json:"notes" yaml:"notes"`
}

type DockerConfig

type DockerConfig struct {
	Image       string         `json:"image" yaml:"image"`
	Platforms   []string       `json:"platforms" yaml:"platforms"`
	Env         []EnvVar       `json:"env" yaml:"env"`
	Ports       []string       `json:"ports" yaml:"ports"`
	Volumes     []string       `json:"volumes" yaml:"volumes"`
	Command     string         `json:"command" yaml:"command"`
	NetworkMode string         `json:"networkMode" yaml:"network_mode"`
	CapAdd      []string       `json:"capAdd" yaml:"cap_add"`
	Privileged  bool           `json:"privileged" yaml:"privileged"`
	StopTimeout int            `json:"stopTimeout" yaml:"stop_timeout"`
	Resources   ResourceLimits `json:"resources" yaml:"resources"`
	Setup       string         `json:"setup" yaml:"setup"`
	Notes       string         `json:"notes" yaml:"notes"`
}

type EarningsEstimate

type EarningsEstimate struct {
	MonthlyLow  float64 `json:"monthlyLow" yaml:"monthly_low"`
	MonthlyHigh float64 `json:"monthlyHigh" yaml:"monthly_high"`
	Currency    string  `json:"currency" yaml:"currency"`
	Per         string  `json:"per" yaml:"per"`
	Notes       string  `json:"notes" yaml:"notes"`
}

type EnvVar

type EnvVar struct {
	Key         string `json:"key" yaml:"key"`
	Label       string `json:"label" yaml:"label"`
	Required    bool   `json:"required" yaml:"required"`
	Secret      bool   `json:"secret" yaml:"secret"`
	Description string `json:"description" yaml:"description"`
	Default     string `json:"default" yaml:"default"`
}

type Payment

type Payment struct {
	Methods       []string `json:"methods" yaml:"methods"`
	MinimumPayout string   `json:"minimumPayout" yaml:"minimum_payout"`
	Currency      string   `json:"currency" yaml:"currency"`
	Frequency     string   `json:"frequency" yaml:"frequency"`
}

type Referral

type Referral struct {
	SignupURL string `json:"signupUrl" yaml:"signup_url"`
}

type Requirements

type Requirements struct {
	ResidentialIP     bool   `json:"residentialIp" yaml:"residential_ip"`
	VPSIP             bool   `json:"vpsIp" yaml:"vps_ip"`
	DevicesPerAccount int    `json:"devicesPerAccount" yaml:"devices_per_account"`
	DevicesPerIP      int    `json:"devicesPerIp" yaml:"devices_per_ip"`
	MinBandwidth      string `json:"minBandwidth" yaml:"min_bandwidth"`
	GPU               bool   `json:"gpu" yaml:"gpu"`
	MinStorage        string `json:"minStorage" yaml:"min_storage"`
	Note              string `json:"note" yaml:"note"`
}

type ResourceLimits added in v0.8.0

type ResourceLimits struct {
	MemLimit       string `json:"memLimit" yaml:"mem_limit"`
	MemReservation string `json:"memReservation" yaml:"mem_reservation"`
	OomScoreAdj    *int   `json:"oomScoreAdj" yaml:"oom_score_adj"`
}

ResourceLimits is the optional docker.resources block from a service YAML. Its fields map to Docker HostConfig knobs applied at container creation (see internal/runtime.applyResourceLimits) so a service's memory ceiling and OOM priority survive restarts instead of being set out-of-band. MemLimit and MemReservation are Docker-style size strings ("768m", "2g"); an empty string leaves that limit unset. OomScoreAdj is a pointer so an absent value is distinguishable from an explicit 0 and is applied only when present.

type Service

type Service struct {
	Name             string            `json:"name" yaml:"name"`
	Slug             string            `json:"slug" yaml:"slug"`
	Category         string            `json:"category" yaml:"category"`
	Status           string            `json:"status" yaml:"status"`
	Website          string            `json:"website" yaml:"website"`
	Description      string            `json:"description" yaml:"description"`
	ShortDescription string            `json:"shortDescription" yaml:"short_description"`
	Referral         Referral          `json:"referral" yaml:"referral"`
	Docker           DockerConfig      `json:"docker" yaml:"docker"`
	Requirements     Requirements      `json:"requirements" yaml:"requirements"`
	Payment          Payment           `json:"payment" yaml:"payment"`
	Earnings         EarningsEstimate  `json:"earnings" yaml:"earnings"`
	Cashout          Cashout           `json:"cashout" yaml:"cashout"`
	Platforms        []string          `json:"platforms" yaml:"platforms"`
	Collector        CollectorMetadata `json:"collector" yaml:"collector"`
	SourcePath       string            `json:"sourcePath" yaml:"-"`
	ManualOnly       bool              `json:"manualOnly" yaml:"-"`
}

Jump to

Keyboard shortcuts

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