schema

package
v0.2.25 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CredentialListLimit = 100
)
View Source
const (
	DefaultSchema = "credential"
)

Variables

View Source
var Objects string
View Source
var Queries string

Functions

This section is empty.

Types

type Credential

type Credential struct {
	CredentialKey
	UpdatedAt time.Time `json:"updated_at" help:"Update timestamp" readonly:""`
}

Credential is the public credential row returned from the database. Secret material and passphrase version are intentionally excluded.

func (Credential) Cell

func (r Credential) Cell(col int) string

func (Credential) Header

func (r Credential) Header() []string

func (*Credential) Scan

func (c *Credential) Scan(row pg.Row) error

Expected column order: key, updated_at.

func (Credential) String

func (c Credential) String() string

func (Credential) Width

func (r Credential) Width(col int) int

type CredentialCreate

type CredentialCreate struct {
	CredentialKey
	Credentials any `json:"credentials" help:"Credential value"`
}

CredentialCreate contains the values required to create a credential row. The returned Credential omits PV and Credentials.

func (CredentialCreate) Insert

func (c CredentialCreate) Insert(bind *pg.Bind) (string, error)

func (CredentialCreate) RedactedString

func (c CredentialCreate) RedactedString() string

func (*CredentialCreate) Scan

func (c *CredentialCreate) Scan(row pg.Row) error

Expected column order: key, credential.

func (CredentialCreate) String

func (c CredentialCreate) String() string

func (CredentialCreate) Update

func (c CredentialCreate) Update(_ *pg.Bind) error

type CredentialGet

type CredentialGet struct {
	CredentialKey
	PV          uint64 `json:"pv" help:"Passphrase version"`
	Credentials any    `json:"credentials" help:"Credential value"`
}

CredentialGet contains the values required to retrieve a credential row. The returned Credential includes PV and Credentials.

func (*CredentialGet) Scan

func (c *CredentialGet) Scan(row pg.Row) error

Expected column order: pv, credential.

type CredentialKey

type CredentialKey struct {
	Key string `json:"key" help:"Credential key"`
}

func (CredentialKey) Select

func (c CredentialKey) Select(bind *pg.Bind, op pg.Op) (string, error)

type CredentialList

type CredentialList struct {
	CredentialListRequest
	Count uint64        `json:"count,omitempty"`
	Body  []*Credential `json:"body,omitempty"`
}

func (*CredentialList) Scan

func (c *CredentialList) Scan(rows pg.Row) error

func (*CredentialList) ScanCount

func (c *CredentialList) ScanCount(row pg.Row) error

func (CredentialList) String

func (c CredentialList) String() string

type CredentialListRequest

type CredentialListRequest struct {
	pg.OffsetLimit
	Rotate *bool `json:"rotate,omitempty" help:"Return credentials that should be rotated to the latest passphrase version" negatable:""`
}

func (CredentialListRequest) Query

func (r CredentialListRequest) Query() url.Values

func (*CredentialListRequest) Select

func (c *CredentialListRequest) Select(bind *pg.Bind, op pg.Op) (string, error)

func (CredentialListRequest) String

func (c CredentialListRequest) String() string

Jump to

Keyboard shortcuts

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