fakecoolify

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package fakecoolify is a read-only stand-in for the Coolify v4 REST API, shaped from the documented responses the importer consumes. It exists for tests and local runs: any request that is not a GET is rejected and recorded, so a test can assert the importer never writes to the source.

Index

Constants

View Source
const (
	Token         = "fake-coolify-token" //nolint:gosec // fixture value
	ProjectUUID   = "proj-shop"
	EnvName       = "production"
	PGUUID        = "pgmain1xuuid"
	RedisUUID     = "rdscache1uuid"
	AppWeb        = "app-web-uuid" //nolint:gosec // fixture value
	AppSearxng    = "app-searxng-uuid"
	AppCompose    = "app-collab-uuid"
	AppMemgraph   = "app-memgraph-uuid"
	AppAPI        = "app-api-uuid"
	AppReport     = "app-report-uuid"
	ServiceUUID   = "svc-plausible-uuid"
	WebSecret     = "web-session-secret-value" //nolint:gosec // fixture value
	WebDBPassword = "s3cr3t-db-pass"
)

Fixture identifiers other packages assert on.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {

	// RedactSensitive makes secret env values come back empty, like a token
	// without the read:sensitive ability.
	RedactSensitive bool
	// SearxngImage replaces the registry image of the searxng app, so a
	// local run can use a small image. Empty keeps the default.
	SearxngImage string
	// SearxngPort replaces the exposed port of the searxng app.
	SearxngPort string
	// contains filtered or unexported fields
}

Server is the fake. Create it with New and serve Handler.

func New

func New() *Server

New returns a fake with the default fixture.

func (*Server) Handler

func (s *Server) Handler() http.Handler

Handler returns the HTTP handler.

func (*Server) Requests

func (s *Server) Requests() []string

Requests returns "METHOD path" for every request received.

func (*Server) Violations

func (s *Server) Violations() []string

Violations returns every request that was not a GET.

Directories

Path Synopsis
cmd
fakecoolify command
Command fakecoolify serves the read-only fake Coolify API for local runs of the app import flow.
Command fakecoolify serves the read-only fake Coolify API for local runs of the app import flow.

Jump to

Keyboard shortcuts

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