surface

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package surface computes an app's surface, its size: the larger of the number of its entry points and the number of its effects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Surface

type Surface struct {
	// Size is the larger of EntryPoints and Effects.
	Size int `json:"size"`
	// EntryPoints counts the pages, the page calls, once for each page that offers one, the
	// functions the app serves other apps and its scheduled jobs, from the access, services and
	// schedule sections of its permission list.
	EntryPoints int `json:"entry_points"`
	// Effects counts the tables its SQL writes, once for each kind of write, the connectors it
	// declares, the outside services it may call and the domains it may send mail to.
	Effects int `json:"effects"`
	// Writes lists the writes of its SQL as "INSERT notes", sorted.
	Writes []string `json:"writes,omitempty"`
}

Surface is the size of an app.

func Of

func Of(m manifest.Manifest, writes []lint.Write) Surface

Of returns the surface of the app whose permission list is m and whose SQL makes writes.

func (Surface) String

func (s Surface) String() string

String returns the surface as aicoded describe and check print it.

Jump to

Keyboard shortcuts

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