identity

package
v0.0.0-...-6dcaeb9 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Package identity defines the various types to work with the Pebble identities file.

This is a subset of the types in github.com/canonical/pebble/cmd, copied directly from that repository.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IdentitiesFile

type IdentitiesFile struct {
	Identities map[string]*Identity `json:"identities" yaml:"identities"`
}

type Identity

type Identity struct {
	Access IdentityAccess `json:"access" yaml:"access"`

	// One or more of the following type-specific configuration fields must be
	// non-nil (currently the only type is "local").
	Local *LocalIdentity `json:"local,omitempty" yaml:"local,omitempty"`
}

Identity holds the configuration of a single identity.

type IdentityAccess

type IdentityAccess string

IdentityAccess defines the access level for an identity.

const (
	AdminAccess     IdentityAccess = "admin"
	ReadAccess      IdentityAccess = "read"
	UntrustedAccess IdentityAccess = "untrusted"
)

type LocalIdentity

type LocalIdentity struct {
	// This is a pointer so we can distinguish between not set and 0 (a valid
	// user-id meaning root).
	UserID *uint32 `json:"user-id" yaml:"user-id"`
}

LocalIdentity holds identity configuration specific to the "local" type (for ucrednet/UID authentication).

Jump to

Keyboard shortcuts

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