remote

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package remote calls the signed /admin endpoints of a central SupaCraft server (see internal/studiosign for the scheme).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client talks to one server with SUPACRAFT_ADMIN_SECRET.

func New

func New(server, secret string) (*Client, error)

New checks the server URL and returns a client. Plain http is only allowed for localhost, since requests carry secret values.

func (*Client) Do

func (c *Client) Do(ctx context.Context, method, path string, reqBody, out any) error

Do sends a signed request; reqBody and out are JSON (either may be nil).

type Error

type Error struct {
	Status         int
	Message        string
	MissingSecrets []string
	Issues         []Issue
}

Error is a non-2xx response. MissingSecrets and Issues are filled when the server reports them (deploy).

func (*Error) Error

func (e *Error) Error() string

type Issue

type Issue struct {
	Path     string `json:"path"`
	Message  string `json:"message"`
	Severity string `json:"severity"`
}

Issue is a validation problem reported by the server.

func (Issue) String

func (i Issue) String() string

Jump to

Keyboard shortcuts

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