Help us shape the future of Go! Take the 2026 Go Developer Survey

apisurface

package
v1.45.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package apisurface lists the Go API that AuthKit v1 covers (docs/stability.md), one feature per line: every exported constant, variable, function, type, field (with its struct tag) and method of the covered packages. api/go.txt holds the list; go generate ./internal/httpapi rewrites it and TestGoAPISurface fails when it is stale.

Index

Constants

View Source
const (
	// Module is AuthKit's module path.
	Module = "github.com/open-rails/authkit"
	// File is where the list lives, relative to the repository.
	File = "api/go.txt"
)

Variables

View Source
var ErrStale = errors.New(File + " is stale: run go generate ./internal/httpapi")

ErrStale reports a stale api/go.txt.

View Source
var Packages = []string{
	"", "adapters/fiber", "adapters/gin", "adapters/smtp", "adapters/twilio", "auth", "auth/authtest", "authtest",
	"devicekey", "iam", "keys", "notify", "provider", "userinfo", "userinfo/userinfotest", "verify",
}

Packages are the covered packages, relative to Module.

Functions

This section is empty.

Types

type Surface

type Surface struct {
	// Features is one sorted line per exported feature.
	Features []string
	// Leaks are internal types the covered API reaches without a covered
	// package naming them by an alias.
	Leaks []string
}

Surface is the covered API.

func Load

func Load() (*Surface, error)

Load type-checks the covered packages from their export data (go list -export) and lists their features. It runs the go command in the working directory, which must be inside the module.

func (*Surface) Text

func (s *Surface) Text() []byte

Text is the list as api/go.txt holds it.

Jump to

Keyboard shortcuts

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