Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExportRecord ¶ added in v1.38.13
type ExportRecord struct {
Id string
UserIdentifier string
SecureHash *string
ApiKeyFirstLetters string
Active bool
CreatedAt time.Time
Namespace string
Status ExportStatus
}
ExportRecord is the per-user export result and the RAFT wire type. It is kept separate from View so hash material never reaches an existing response type. Only ExportStatusExported records carry a non-nil SecureHash.
type ExportStatus ¶ added in v1.38.13
type ExportStatus int
ExportStatus classifies each user in an export. Only ExportStatusExported carries a usable credential; the others carry a nil SecureHash and name why the user's key cannot be migrated.
const ( // ExportStatusUnspecified is the zero value. It is never a valid result: a // record that reaches a response with it is a bug, not an exported user. ExportStatusUnspecified ExportStatus = iota // ExportStatusExported marks a strong-key user whose argon2id hash is carried. ExportStatusExported // ExportStatusImportedKey marks a user created from a static key. Its weak // sha256 hash is never carried. ExportStatusImportedKey // ExportStatusRevoked marks a strong-key user whose key was revoked. Carrying // the hash would bring the revoked credential back to life. ExportStatusRevoked )
func (ExportStatus) MarshalText ¶ added in v1.38.13
func (s ExportStatus) MarshalText() ([]byte, error)
MarshalText writes the API spelling so the RAFT wire form stays readable and independent of the iota order.
func (ExportStatus) String ¶ added in v1.38.13
func (s ExportStatus) String() string
String returns the API spelling, or "" for a value that has none.
func (*ExportStatus) UnmarshalText ¶ added in v1.38.13
func (s *ExportStatus) UnmarshalText(text []byte) error
UnmarshalText rejects any spelling not in exportStatusNames.
func (ExportStatus) Valid ¶ added in v1.38.13
func (s ExportStatus) Valid() bool
Valid reports whether s is one of the named statuses.
type View ¶
type View struct {
Id string
Active bool
InternalIdentifier string
ApiKeyFirstLetters string
CreatedAt time.Time
LastUsedAt time.Time
ImportedWithKey bool
Namespace string
}
View is an immutable snapshot of a DB user. It is both the value callers read and the RAFT user-query response shape, so the two cannot drift apart. Field names carry the wire contract.