Documentation
¶
Overview ¶
Package contextprofile stores the owner's named contexts. It owns persistence, revision checks and backups; activation and tool enforcement belong to the host.
Index ¶
- Variables
- type Backup
- type Record
- type Store
- func (s *Store) Delete(ctx context.Context, name, revision, reason string) error
- func (s *Store) Get(ctx context.Context, name string) (Record, error)
- func (s *Store) History(ctx context.Context, name string) ([]Backup, error)
- func (s *Store) List(ctx context.Context) ([]Record, error)
- func (s *Store) Put(ctx context.Context, p steer.Preset, revision, reason string) (Record, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Record ¶
type Record struct {
steer.Preset
Revision string `json:"revision"`
UpdatedAt string `json:"updated_at"`
}
Record keeps the authored definition separate from any resolved context.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) History ¶
History returns superseded and deleted definitions, newest first. Restoring one uses Put with the current revision; backups never bypass optimistic concurrency.