client

package
v0.0.0-...-bd1a880 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIBasePath         = "/api/v1"
	APIPathHealth       = "/health"
	APIPathAuth         = "/auth"
	APIPathAuthLogin    = "/auth/login"
	APIPathAuthRegister = "/auth/register"
	APIPathAuthRefresh  = "/auth/refresh"
	APIPathAuthLogout   = "/auth/logout"
	APIPathUser         = "/user"
	APIPathUserMe       = "/user/me"
	APIPathContainers   = "/containers"
	APIPathImages       = "/images"
	APIPathVolumes      = "/volumes"
	APIPathNetworks     = "/networks"
	APIPathCompose      = "/compose"
	APIPathSystem       = "/system"
	APIPathSystemInfo   = "/system/info"
	APIPathSystemPing   = "/system/ping"
	APIPathSystemEvents = "/system/events"
)

API paths

Variables

View Source
var (
	ErrNotFound         = fmt.Errorf("resource not found")
	ErrUnauthorized     = fmt.Errorf("unauthorized")
	ErrForbidden        = fmt.Errorf("forbidden")
	ErrBadRequest       = fmt.Errorf("bad request")
	ErrServerError      = fmt.Errorf("server error")
	ErrTimeout          = fmt.Errorf("request timeout")
	ErrConnectionFailed = fmt.Errorf("connection failed")
	ErrAlreadyExists    = fmt.Errorf("resource already exists")
	ErrConflict         = fmt.Errorf("conflict")
	ErrNotImplemented   = fmt.Errorf("not implemented")
)

Common errors

Functions

This section is empty.

Types

type APIClient

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

APIClient implements the Client interface

func NewClient

func NewClient(opts ...ClientOption) (*APIClient, error)

NewClient creates a new API client

func (*APIClient) BuildImage

func (c *APIClient) BuildImage(ctx context.Context, options *models.ImageBuildRequest) (string, error)

BuildImage builds an image from a context

func (*APIClient) ChangePassword

func (c *APIClient) ChangePassword(ctx context.Context, oldPassword, newPassword string) error

ChangePassword changes the current user's password

func (*APIClient) CloneVolume

func (c *APIClient) CloneVolume(ctx context.Context, sourceName, targetName string, labels map[string]string) (*models.Volume, error)

CloneVolume creates a new volume by cloning an existing one

func (*APIClient) ComposeDown

func (c *APIClient) ComposeDown(ctx context.Context, id string, options *models.ComposeDownOptions) error

ComposeDown shuts down a Compose deployment

func (*APIClient) ComposeUp

func (c *APIClient) ComposeUp(ctx context.Context, files []io.Reader, options *models.ComposeUpOptions) (string, error)

ComposeUp deploys services defined in Compose files

func (*APIClient) ConnectContainerToNetwork

func (c *APIClient) ConnectContainerToNetwork(ctx context.Context, networkID, containerID string, config *networktypes.EndpointSettings) error

ConnectContainerToNetwork connects a container to a network

func (*APIClient) CopyFromContainer

func (c *APIClient) CopyFromContainer(ctx context.Context, containerID, path string) (io.ReadCloser, error)

CopyFromContainer copies files/folders from a container

func (*APIClient) CopyToContainer

func (c *APIClient) CopyToContainer(ctx context.Context, containerID, path string, content io.Reader) error

CopyToContainer copies files/folders to a container

func (*APIClient) CreateContainer

func (c *APIClient) CreateContainer(ctx context.Context, req *models.ContainerCreateRequest) (*models.Container, error)

CreateContainer creates a new container

func (*APIClient) CreateMacvlan

func (c *APIClient) CreateMacvlan(ctx context.Context, name, parent string, subnet, gateway string) (*models.Network, error)

CreateMacvlan creates a new Macvlan network

func (*APIClient) CreateNetwork

func (c *APIClient) CreateNetwork(ctx context.Context, options *models.NetworkCreateRequest) (*models.Network, error)

CreateNetwork creates a new network

func (*APIClient) CreateOverlay

func (c *APIClient) CreateOverlay(ctx context.Context, name string, attachable bool, subnet, gateway string) (*models.Network, error)

CreateOverlay creates a new overlay network

func (*APIClient) CreateVolume

func (c *APIClient) CreateVolume(ctx context.Context, options *models.VolumeCreateRequest) (*models.Volume, error)

CreateVolume creates a new volume

func (*APIClient) DisconnectContainerFromNetwork

func (c *APIClient) DisconnectContainerFromNetwork(ctx context.Context, networkID, containerID string, force bool) error

DisconnectContainerFromNetwork disconnects a container from a network

func (*APIClient) Do

func (c *APIClient) Do(ctx context.Context, req *http.Request) (*http.Response, error)

Do sends an HTTP request and returns the response

func (*APIClient) ExecCreate

func (c *APIClient) ExecCreate(ctx context.Context, containerID string, req *models.ContainerExecCreateRequest) (string, error)

ExecCreate creates an exec instance in a container

func (*APIClient) ExecResize

func (c *APIClient) ExecResize(ctx context.Context, execID string, height, width uint) error

ExecResize resizes the TTY session of an exec instance

func (*APIClient) ExecStart

func (c *APIClient) ExecStart(ctx context.Context, execID string, interactive bool) (io.ReadWriteCloser, error)

ExecStart starts an exec instance

func (*APIClient) GetComposeLogs

func (c *APIClient) GetComposeLogs(ctx context.Context, id string, service string, tail int) (io.ReadCloser, error)

GetComposeLogs gets logs for a service in a Compose deployment

func (*APIClient) GetComposeStatus

func (c *APIClient) GetComposeStatus(ctx context.Context, id string) (*models.ComposeStatus, error)

GetComposeStatus gets the status of a Compose deployment

func (*APIClient) GetContainer

func (c *APIClient) GetContainer(ctx context.Context, id string) (*models.Container, error)

GetContainer gets detailed information about a container

func (*APIClient) GetContainerLogs

func (c *APIClient) GetContainerLogs(ctx context.Context, id string, options map[string]string) (io.ReadCloser, error)

GetContainerLogs gets logs from a container

func (*APIClient) GetContainerNetworks

func (c *APIClient) GetContainerNetworks(ctx context.Context, containerID string) ([]models.Network, error)

GetContainerNetworks gets all networks a container is connected to

func (*APIClient) GetContainerProcesses

func (c *APIClient) GetContainerProcesses(ctx context.Context, id string) ([][]string, error)

GetContainerProcesses gets processes running in a container

func (*APIClient) GetContainerStats

func (c *APIClient) GetContainerStats(ctx context.Context, id string) (*models.ContainerStats, error)

GetContainerStats gets stats from a container

func (*APIClient) GetCurrentUser

func (c *APIClient) GetCurrentUser(ctx context.Context) (*models.UserResponse, error)

GetCurrentUser returns the current authenticated user

func (*APIClient) GetImage

func (c *APIClient) GetImage(ctx context.Context, id string) (*models.Image, error)

GetImage gets detailed information about an image

func (*APIClient) GetImageHistory

func (c *APIClient) GetImageHistory(ctx context.Context, id string) ([]models.ImageHistoryResponse, error)

GetImageHistory gets the history of an image

func (*APIClient) GetNetwork

func (c *APIClient) GetNetwork(ctx context.Context, id string) (*models.Network, error)

GetNetwork gets detailed information about a network

func (*APIClient) GetToken

func (c *APIClient) GetToken() (accessToken, refreshToken string, expiresAt time.Time)

GetToken returns the current access and refresh tokens

func (*APIClient) GetVolume

func (c *APIClient) GetVolume(ctx context.Context, name string) (*models.Volume, error)

GetVolume gets detailed information about a volume

func (*APIClient) HasValidToken

func (c *APIClient) HasValidToken() bool

HasValidToken checks if the client has a valid access token

func (*APIClient) Health

func (c *APIClient) Health(ctx context.Context) (map[string]interface{}, error)

Health checks the API health

func (*APIClient) InspectNetwork

func (c *APIClient) InspectNetwork(ctx context.Context, id string) (*models.Network, error)

InspectNetwork gets detailed information about a network This is an alias for GetNetwork for Docker CLI compatibility

func (*APIClient) InspectVolume

func (c *APIClient) InspectVolume(ctx context.Context, name string) (*models.Volume, error)

InspectVolume gets detailed information about a volume This is an alias for GetVolume for Docker CLI compatibility

func (*APIClient) IsNetworkExist

func (c *APIClient) IsNetworkExist(ctx context.Context, idOrName string) (bool, error)

IsNetworkExist checks if a network with the given ID or name exists

func (*APIClient) ListComposeDeployments

func (c *APIClient) ListComposeDeployments(ctx context.Context) ([]models.ComposeDeploymentResponse, error)

ListComposeDeployments lists Compose deployments

func (*APIClient) ListContainers

func (c *APIClient) ListContainers(ctx context.Context, filters map[string]string) ([]models.Container, error)

ListContainers lists containers with optional filters

func (*APIClient) ListImages

func (c *APIClient) ListImages(ctx context.Context, filters map[string]string) ([]models.Image, error)

ListImages lists images with optional filters

func (*APIClient) ListNetworks

func (c *APIClient) ListNetworks(ctx context.Context, filters map[string]string) ([]models.Network, error)

ListNetworks lists networks with optional filters

func (*APIClient) ListVolumes

func (c *APIClient) ListVolumes(ctx context.Context, filters map[string]string) ([]models.Volume, error)

ListVolumes lists volumes with optional filters

func (*APIClient) Login

func (c *APIClient) Login(ctx context.Context, username, password string) (*AuthResponse, error)

Login authenticates with the API and returns an authentication response

func (*APIClient) Logout

func (c *APIClient) Logout(ctx context.Context) error

Logout logs out the current user and invalidates the tokens

func (*APIClient) MountVolume

func (c *APIClient) MountVolume(ctx context.Context, volumeName, mountPoint string) error

MountVolume mounts a volume to a path on the host Note: This is a higher-level operation that is not directly supported by the Docker API It requires creating a temporary container to mount the volume

func (*APIClient) PauseContainer

func (c *APIClient) PauseContainer(ctx context.Context, id string) error

PauseContainer pauses a container

func (*APIClient) PruneNetworks

func (c *APIClient) PruneNetworks(ctx context.Context, filters map[string]string) (uint64, error)

PruneNetworks removes unused networks

func (*APIClient) PruneVolumes

func (c *APIClient) PruneVolumes(ctx context.Context, filters map[string]string) (uint64, error)

PruneVolumes removes unused volumes

func (*APIClient) PullComposeImages

func (c *APIClient) PullComposeImages(ctx context.Context, id string) error

PullComposeImages pulls images for a Compose deployment

func (*APIClient) PullImage

func (c *APIClient) PullImage(ctx context.Context, ref string, auth *registry.AuthConfig) error

PullImage pulls an image from a registry

func (*APIClient) PushImage

func (c *APIClient) PushImage(ctx context.Context, ref string, auth *registry.AuthConfig) error

PushImage pushes an image to a registry

func (*APIClient) RefreshToken

func (c *APIClient) RefreshToken(ctx context.Context) (*AuthResponse, error)

RefreshToken refreshes the access token using the refresh token

func (*APIClient) Register

func (c *APIClient) Register(ctx context.Context, username, password, email string) (*AuthResponse, error)

Register registers a new user and returns an authentication response

func (*APIClient) RemoveContainer

func (c *APIClient) RemoveContainer(ctx context.Context, id string, force bool) error

RemoveContainer removes a container with optional force flag

func (*APIClient) RemoveImage

func (c *APIClient) RemoveImage(ctx context.Context, id string, force bool) error

RemoveImage removes an image with optional force flag

func (*APIClient) RemoveNetwork

func (c *APIClient) RemoveNetwork(ctx context.Context, id string) error

RemoveNetwork removes a network

func (*APIClient) RemoveVolume

func (c *APIClient) RemoveVolume(ctx context.Context, name string, force bool) error

RemoveVolume removes a volume with optional force flag

func (*APIClient) RenameContainer

func (c *APIClient) RenameContainer(ctx context.Context, id string, newName string) error

RenameContainer renames a container

func (*APIClient) ResizeContainerTTY

func (c *APIClient) ResizeContainerTTY(ctx context.Context, id string, height, width uint) error

ResizeContainerTTY resizes the TTY of a running container

func (*APIClient) RestartComposeService

func (c *APIClient) RestartComposeService(ctx context.Context, id string, service string) error

RestartComposeService restarts a service in a Compose deployment

func (*APIClient) RestartContainer

func (c *APIClient) RestartContainer(ctx context.Context, id string, timeout *int) error

RestartContainer restarts a container with optional timeout

func (*APIClient) ScaleComposeService

func (c *APIClient) ScaleComposeService(ctx context.Context, id string, service string, replicas int) error

ScaleComposeService scales a service in a Compose deployment

func (*APIClient) SearchImages

func (c *APIClient) SearchImages(ctx context.Context, term string, limit int) ([]registry.SearchResult, error)

SearchImages searches for images in registries

func (*APIClient) SetToken

func (c *APIClient) SetToken(accessToken, refreshToken string, expiresAt time.Time)

SetToken manually sets the access and refresh tokens

func (*APIClient) StartContainer

func (c *APIClient) StartContainer(ctx context.Context, id string) error

StartContainer starts a container

func (*APIClient) StopContainer

func (c *APIClient) StopContainer(ctx context.Context, id string, timeout *int) error

StopContainer stops a container with optional timeout

func (*APIClient) TagImage

func (c *APIClient) TagImage(ctx context.Context, id, repo, tag string) error

TagImage tags an image with a repository and tag

func (*APIClient) UnmountVolume

func (c *APIClient) UnmountVolume(ctx context.Context, volumeName string) error

UnmountVolume unmounts a volume Note: This is a higher-level operation that is not directly supported by the Docker API It stops and removes any containers using the volume

func (*APIClient) UnpauseContainer

func (c *APIClient) UnpauseContainer(ctx context.Context, id string) error

UnpauseContainer unpauses a container

func (*APIClient) UpdateContainer

func (c *APIClient) UpdateContainer(ctx context.Context, id string, updateConfig *container.UpdateConfig) (*models.Container, error)

UpdateContainer updates the configuration of a container

func (*APIClient) UpdateCurrentUser

func (c *APIClient) UpdateCurrentUser(ctx context.Context, user *models.User) (*models.User, error)

UpdateCurrentUser updates the current user's profile

func (*APIClient) UpdateNetwork

func (c *APIClient) UpdateNetwork(ctx context.Context, id string, options *models.NetworkUpdateOptions) error

UpdateNetwork updates a network's configuration

func (*APIClient) UpdateVolume

func (c *APIClient) UpdateVolume(ctx context.Context, name string, labels map[string]string) error

UpdateVolume updates a volume's metadata

func (*APIClient) UploadComposeFile

func (c *APIClient) UploadComposeFile(ctx context.Context, content io.Reader, filename string) (string, error)

UploadComposeFile uploads a Compose file to the server

func (*APIClient) ValidateComposeFile

func (c *APIClient) ValidateComposeFile(ctx context.Context, fileID string) ([]string, error)

ValidateComposeFile validates a Compose file

func (*APIClient) WaitContainer

func (c *APIClient) WaitContainer(ctx context.Context, id string, condition string) (int, error)

WaitContainer waits for a container to reach a certain condition

func (*APIClient) WatchComposeDeployment

func (c *APIClient) WatchComposeDeployment(ctx context.Context, id string, interval time.Duration) (<-chan *models.ComposeStatus, <-chan error)

WatchComposeDeployment watches the status of a Compose deployment

type AuthResponse

type AuthResponse = models.TokenResponse

AuthResponse represents the response from authentication endpoints Using models.TokenResponse structure now

type Client

type Client interface {
	// Authentication
	Login(ctx context.Context, username, password string) (*AuthResponse, error)           // Uses models.TokenResponse via alias
	Register(ctx context.Context, username, password, email string) (*AuthResponse, error) // Uses models.TokenResponse via alias
	RefreshToken(ctx context.Context) (*AuthResponse, error)                               // Uses models.TokenResponse via alias
	Logout(ctx context.Context) error

	// Health check
	Health(ctx context.Context) (map[string]interface{}, error)

	// User management
	GetCurrentUser(ctx context.Context) (*models.UserResponse, error) // Return UserResponse
	UpdateCurrentUser(ctx context.Context, user *models.User) (*models.User, error)
	ChangePassword(ctx context.Context, oldPassword, newPassword string) error

	// Containers
	ListContainers(ctx context.Context, filters map[string]string) ([]models.Container, error)
	GetContainer(ctx context.Context, id string) (*models.Container, error)
	CreateContainer(ctx context.Context, req *models.ContainerCreateRequest) (*models.Container, error)
	StartContainer(ctx context.Context, id string) error
	StopContainer(ctx context.Context, id string, timeout *int) error
	RestartContainer(ctx context.Context, id string, timeout *int) error
	PauseContainer(ctx context.Context, id string) error
	UnpauseContainer(ctx context.Context, id string) error
	RemoveContainer(ctx context.Context, id string, force bool) error

	// Container operations
	GetContainerLogs(ctx context.Context, id string, options map[string]string) (io.ReadCloser, error)
	GetContainerStats(ctx context.Context, id string) (*models.ContainerStats, error)
	GetContainerProcesses(ctx context.Context, id string) ([][]string, error)

	// Exec
	ExecCreate(ctx context.Context, containerID string, req *models.ContainerExecCreateRequest) (string, error)
	ExecStart(ctx context.Context, execID string, interactive bool) (io.ReadWriteCloser, error)
	ExecResize(ctx context.Context, execID string, height, width uint) error
	// Images
	ListImages(ctx context.Context, filters map[string]string) ([]models.Image, error)
	GetImage(ctx context.Context, id string) (*models.Image, error)
	PullImage(ctx context.Context, ref string, auth *registrytypes.AuthConfig) error
	BuildImage(ctx context.Context, options *models.ImageBuildRequest) (string, error)
	RemoveImage(ctx context.Context, id string, force bool) error
	TagImage(ctx context.Context, id, repo, tag string) error

	// Volumes
	ListVolumes(ctx context.Context, filters map[string]string) ([]models.Volume, error)
	GetVolume(ctx context.Context, name string) (*models.Volume, error)
	CreateVolume(ctx context.Context, options *models.VolumeCreateRequest) (*models.Volume, error)
	RemoveVolume(ctx context.Context, name string, force bool) error

	// Networks
	ListNetworks(ctx context.Context, filters map[string]string) ([]models.Network, error)
	GetNetwork(ctx context.Context, id string) (*models.Network, error)
	CreateNetwork(ctx context.Context, options *models.NetworkCreateRequest) (*models.Network, error)
	RemoveNetwork(ctx context.Context, id string) error
	ConnectContainerToNetwork(ctx context.Context, networkID, containerID string, config *networktypes.EndpointSettings) error
	DisconnectContainerFromNetwork(ctx context.Context, networkID, containerID string, force bool) error

	// Compose
	ComposeUp(ctx context.Context, files []io.Reader, options interface{}) (string, error)      // Placeholder type
	ComposeDown(ctx context.Context, id string, options interface{}) error                      // Placeholder type
	GetComposeStatus(ctx context.Context, id string) (*models.ComposeDeploymentResponse, error) // Use models type
	ListComposeDeployments(ctx context.Context) ([]models.ComposeDeployment, error)             // Use models type

	// System
	GetSystemInfo(ctx context.Context) (*models.SystemInfoResponse, error)                                                      // Use models type
	GetEvents(ctx context.Context, since, until time.Time, filters map[string]string) (<-chan models.DockerEvent, <-chan error) // Use models.DockerEvent

	// Raw HTTP
	Do(ctx context.Context, req *http.Request) (*http.Response, error)
}

Client defines the interface for the Docker Server Manager API client Uses types from internal/models

type ClientConfig

type ClientConfig struct {
	BaseURL               string
	Timeout               time.Duration
	MaxRetries            int
	RetryDelay            time.Duration
	UserAgent             string
	AccessToken           string
	RefreshToken          string
	HTTPClient            *http.Client
	Headers               map[string]string
	AutoRefresh           bool
	TLSInsecureSkipVerify bool
}

ClientConfig represents the configuration for the client

func DefaultClientConfig

func DefaultClientConfig() ClientConfig

DefaultClientConfig returns the default client configuration

type ClientOption

type ClientOption func(*ClientConfig) error

ClientOption represents a functional option for configuring the client

func WithAccessToken

func WithAccessToken(token string) ClientOption

WithAccessToken sets the initial access token

func WithAutoRefresh

func WithAutoRefresh(autoRefresh bool) ClientOption

WithAutoRefresh sets the auto refresh option

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL sets the base URL

func WithHTTPClient

func WithHTTPClient(client *http.Client) ClientOption

WithHTTPClient sets a custom HTTP client

func WithHeader

func WithHeader(key, value string) ClientOption

WithHeader adds an HTTP header

func WithRefreshToken

func WithRefreshToken(token string) ClientOption

WithRefreshToken sets the initial refresh token

func WithRetryOptions

func WithRetryOptions(maxRetries int, retryDelay time.Duration) ClientOption

WithRetryOptions sets the retry options

func WithTLSInsecureSkipVerify

func WithTLSInsecureSkipVerify(skip bool) ClientOption

WithTLSInsecureSkipVerify sets the TLS insecure skip verify option

func WithTimeout

func WithTimeout(timeout time.Duration) ClientOption

WithTimeout sets the timeout

func WithUserAgent

func WithUserAgent(userAgent string) ClientOption

WithUserAgent sets the user agent

type ContainerListOptions

type ContainerListOptions struct {
	All     bool
	Limit   int
	Size    bool
	Filters map[string][]string
}

ContainerListOptions represents options for listing containers

type ContainerLogOptions

type ContainerLogOptions struct {
	ShowStdout bool
	ShowStderr bool
	Since      string
	Until      string
	Timestamps bool
	Follow     bool
	Tail       string
	Details    bool
}

ContainerLogOptions represents options for getting container logs

type ExecStartOptions

type ExecStartOptions struct {
	Detach      bool
	Tty         bool
	Interactive bool
}

ExecStartOptions represents options for starting an exec instance

type ImageBuildOptions

type ImageBuildOptions struct {
	Repository     string                         `json:"repository"`
	Tag            string                         `json:"tag"`
	Dockerfile     string                         `json:"dockerfile"`
	Context        io.Reader                      `json:"-"` // Build context stream
	BuildArgs      map[string]string              `json:"build_args"`
	Labels         map[string]string              `json:"labels"`
	NoCache        bool                           `json:"no_cache"`
	Pull           bool                           `json:"pull"`
	RemoveAfter    bool                           `json:"remove_after"` // Corresponds to 'rm' in Docker API
	ForceRemove    bool                           `json:"force_remove"` // Corresponds to 'forcerm' in Docker API
	Target         string                         `json:"target"`
	Platform       string                         `json:"platform"`
	ExtraHosts     []string                       `json:"extra_hosts"`
	NetworkMode    string                         `json:"network_mode"`
	CgroupParent   string                         `json:"cgroup_parent"`
	ShmSize        int64                          `json:"shm_size"`
	Memory         int64                          `json:"memory"`
	MemorySwap     int64                          `json:"memory_swap"`
	CPUSetCPUs     string                         `json:"cpuset_cpus"`
	CPUSetMems     string                         `json:"cpuset_mems"`
	CPUShares      int64                          `json:"cpu_shares"`
	CPUPeriod      int64                          `json:"cpu_period"`
	CPUQuota       int64                          `json:"cpu_quota"`
	BuildID        string                         `json:"build_id"`
	Secrets        []map[string]string            `json:"secrets"`
	CacheFrom      []string                       `json:"cache_from"`
	SecurityOpt    []string                       `json:"security_opt"`
	NetworkConfig  map[string]string              `json:"network_config"`
	Squash         bool                           `json:"squash"`
	AuthConfigs    map[string]registry.AuthConfig `json:"auth_configs"` // Use registry.AuthConfig
	OutputFormat   string                         `json:"output_format"`
	BuildContextID string                         `json:"build_context_id"`
}

ImageBuildOptions represents options for building images Note: This mirrors models.ImageBuildRequest but includes io.Reader for context

type ImageListOptions

type ImageListOptions struct {
	All     bool
	Digests bool
	Filters map[string][]string
}

ImageListOptions represents options for listing images

type ImagePullOptions

type ImagePullOptions struct {
	Registry     string
	Repository   string
	Tag          string
	Platform     string
	Auth         *registry.AuthConfig // Use registry.AuthConfig
	RegistryAuth interface{}
}

ImagePullOptions represents options for pulling images

type LoginRequest

type LoginRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

LoginRequest represents the request body for a login request

type NetworkListOptions

type NetworkListOptions struct {
	Filters map[string][]string
}

NetworkListOptions represents options for listing networks

type PasswordChangeRequest

type PasswordChangeRequest struct {
	OldPassword string `json:"oldPassword"`
	NewPassword string `json:"newPassword"`
}

PasswordChangeRequest represents the request body for a password change

type RegisterRequest

type RegisterRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Email    string `json:"email"`
}

RegisterRequest represents the request body for a register request

type VolumeListOptions

type VolumeListOptions struct {
	Filters map[string][]string
}

VolumeListOptions represents options for listing volumes

Jump to

Keyboard shortcuts

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