Documentation
¶
Index ¶
Constants ¶
View Source
const (
CLIComment = "rocketpool CLI"
)
View Source
const (
Prefix = "rpsn_"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type File ¶
type File struct {
Tokens []Record `json:"tokens"`
}
File is the on-disk token list.
func EnsureFile ¶
EnsureFile returns the token file at path, creating a write-scoped CLI token if the file is missing or has no tokens. Creation uses O_EXCL so concurrent callers converge on a single file.
type Record ¶
type Record struct {
Token Token `json:"token"`
Comment string `json:"comment"`
Scope Scope `json:"scope"`
}
Record is one token in the sidecar JSON file.
type Scope ¶
type Scope string
Scope is the privilege of a stored token.
func (*Scope) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler for Scope.
type Token ¶
type Token [rawBytes]byte
Token is a 32-byte API bearer secret. Text form is rpsn_ plus 64 hex chars.
func (Token) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*Token) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
Click to show internal directories.
Click to hide internal directories.