apicommon

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const ApiBasePathV1 = "api/v1"

ApiBasePathV1 is the base path for version 1 of the API.

View Source
const DeltaApiPath = "delta"

DeltaApiPath is the sub path for the delta creation API.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Error APIErrorInner `json:"error"`
}

type APIErrorInner

type APIErrorInner struct {
	Code         int    `json:"code"`
	Message      string `json:"message,omitempty"`
	ErrorContext string `json:"context,omitempty"`
}

type Config

type Config struct {
	RepoClients map[string]remote.Client
}

Config is used to configure repository clients for Server.

type ReadDeltaRequest

type ReadDeltaRequest struct {
	From               string   `json:"from"`
	To                 string   `json:"to"`
	AcceptedAlgorithms []string `json:"accepted_algorithms"`
}

type ReadDeltaResponse

type ReadDeltaResponse struct {
	TargetImage string `json:"target_image"`
	DeltaImage  string `json:"delta_image"`
}

type SuccessResponse

type SuccessResponse[T any] struct {
	Success T `json:"success"`
}

Jump to

Keyboard shortcuts

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