model

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HasFileVolumeIDHeader defines the HEADER used to send the ID of the Volume back
	HasFileVolumeIDHeader = "X-Rebost-VolumeID"
)

Variables

This section is empty.

Functions

func ToConfig added in v0.2.0

func ToConfig(c Config) *config.Config

ToConfig converts a model.Config to a config.Config

Types

type Config

type Config struct {
	Port    int      `json:"port"`
	Volumes []string `json:"volumes"`
	Remote  string   `json:"remote"`
	Replica int      `json:"replica"`

	Name string `json:"name"`

	Memberlist ConfigMemberlist `json:"memberlist"`

	Dashboard ConfigDashboard `json:"dashboard"`

	Tags map[string]string `json:"tags"`
}

Config is the transport representation of the config.Config

func ConfigToModel added in v0.2.0

func ConfigToModel(c *config.Config) Config

ConfigToModel converts a config.Config to a model.Config

type ConfigDashboard added in v0.2.0

type ConfigDashboard struct {
	Port    int  `json:"port"`
	Enabled bool `json:"enabled"`
}

ConfigDashboard is the configuration required for the dashboard

type ConfigMemberlist added in v0.2.0

type ConfigMemberlist struct {
	Port int `json:"port"`
}

ConfigMemberlist is the set of configuration required for the memberlist,

type CreateReplica

type CreateReplica struct {
	VolumeID string `json:"volume_id,omitempty"`
}

CreateReplica it's the response after creating a replica

type ReplicaInfo added in v0.5.0

type ReplicaInfo struct {
	VolumeIDs []string `json:"volume_ids"`
	Replica   int      `json:"replica"`
}

ReplicaInfo carries the volume IDs and replica count for a file, returned by the GET /replicas/{key} endpoint.

type UpdateFileReplica

type UpdateFileReplica struct {
	VolumeIDs []string `json:"volume_ids"`
	Replica   int      `json:"replica"`
}

UpdateFileReplica it's the body of the UpdateFileReplica

Jump to

Keyboard shortcuts

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