Documentation ¶
Index ¶
- Constants
- func MakeCommitError(err error) *commitresp
- type Auther
- type CommitMgr
- type Session
- func (s *Session) Changed(ctx *configd.Context) bool
- func (s *Session) Comment(ctx *configd.Context, path []string) error
- func (s *Session) Commit(ctx *configd.Context, message string, debug bool) ([]*exec.Output, []error, bool)
- func (s *Session) CopyConfig(ctx *configd.Context, ...) error
- func (s *Session) Delete(ctx *configd.Context, path []string) error
- func (s *Session) Discard(ctx *configd.Context) error
- func (s *Session) EditConfigXML(ctx *configd.Context, ...) error
- func (s *Session) Exists(ctx *configd.Context, path []string) bool
- func (s *Session) Get(ctx *configd.Context, path []string) ([]string, error)
- func (s *Session) GetFullTree(ctx *configd.Context, path []string, opts *TreeOpts) (union.Node, error, []error)
- func (s *Session) GetHelp(ctx *configd.Context, schema bool, path []string) (map[string]string, error)
- func (s *Session) GetStatus(ctx *configd.Context, path []string) (rpc.NodeStatus, error)
- func (s *Session) GetTree(ctx *configd.Context, path []string, opts *TreeOpts) (union.Node, error)
- func (s *Session) GetType(ctx *configd.Context, path []string) (rpc.NodeType, error)
- func (s *Session) IsDefault(ctx *configd.Context, path []string) (bool, error)
- func (s *Session) IsShared() bool
- func (s *Session) Kill()
- func (s *Session) Load(ctx *configd.Context, file string, r io.Reader) (error, []error)
- func (s *Session) Lock(ctx *configd.Context) (int32, error)
- func (s *Session) Locked(ctx *configd.Context) (int32, error)
- func (s *Session) MarkSaved(ctx *configd.Context, saved bool)
- func (s *Session) Merge(ctx *configd.Context, file string) (error, []error)
- func (s *Session) MergeTree(ctx *configd.Context) *data.Node
- func (s *Session) MergeTreeWithoutDefaults(ctx *configd.Context) *data.Node
- func (s *Session) NewAuther(ctx *configd.Context) union.Auther
- func (s *Session) OwnedBy(uid uint32) bool
- func (s *Session) Saved(ctx *configd.Context) bool
- func (s *Session) Set(ctx *configd.Context, path []string) error
- func (s *Session) Show(ctx *configd.Context, path []string, hideSecrets, showDefaults bool) (string, error)
- func (s *Session) ShowForceSecrets(ctx *configd.Context, path []string, hideSecrets, showDefaults bool) (string, error)
- func (s *Session) Unlock(ctx *configd.Context) (int32, error)
- func (s *Session) Validate(ctx *configd.Context) ([]*exec.Output, []error, bool)
- func (s *Session) ValidateSet(ctx *configd.Context, path []string) error
- type SessionMgr
- func (mgr *SessionMgr) Create(ctx *configd.Context, sid string, cmgr *CommitMgr, st, stFull schema.ModelSet, ...) (*Session, error)
- func (mgr *SessionMgr) Destroy(ctx *configd.Context, sid string) error
- func (mgr *SessionMgr) Get(ctx *configd.Context, sid string) (*Session, error)
- func (mgr *SessionMgr) Lock(ctx *configd.Context, sid string) (int32, error)
- func (mgr *SessionMgr) Unlock(ctx *configd.Context, sid string) (int32, error)
- func (mgr *SessionMgr) UnlockAllPid(ctx *configd.Context) error
- type SessionOption
- type TreeOpts
Constants ¶
View Source
const ()
Variables ¶
This section is empty.
Functions ¶
func MakeCommitError ¶
func MakeCommitError(err error) *commitresp
Types ¶
type Auther ¶
type Auther struct {
// contains filtered or unexported fields
}
Implements the Auther interface from union tree
func (*Auther) AuthCreate ¶
func (*Auther) AuthDelete ¶
func (*Auther) AuthReadSecrets ¶
func (*Auther) AuthUpdate ¶
type CommitMgr ¶
type CommitMgr struct {
// contains filtered or unexported fields
}
func NewCommitMgr ¶
func NewCommitMgr(running *data.AtomicNode, schema schema.ModelSet) *CommitMgr
func (*CommitMgr) SetEffective ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSession ¶
func (*Session) CopyConfig ¶
func (*Session) EditConfigXML ¶
func (*Session) GetFullTree ¶
func (s *Session) GetFullTree(ctx *configd.Context, path []string, opts *TreeOpts) (union.Node, error, []error)
GetFullTree - return state and config nodes, plus any error and warnings. error is fatal; warnings relate to specific parts of the tree not returning valid data.
func (*Session) MergeTreeWithoutDefaults ¶
func (*Session) ShowForceSecrets ¶
type SessionMgr ¶
Session manager is a monitor that provides access to the shared session state. All methods must be protected by Mutex
func NewSessionMgr ¶
func NewSessionMgr() *SessionMgr
func NewSessionMgrCustomLog ¶
func NewSessionMgrCustomLog(elog *log.Logger) *SessionMgr
func (*SessionMgr) UnlockAllPid ¶
func (mgr *SessionMgr) UnlockAllPid(ctx *configd.Context) error
type SessionOption ¶
type SessionOption func(*session)
func WithOwner ¶
func WithOwner(owner uint32) SessionOption
type TreeOpts ¶
type TreeOpts struct {
Defaults, Secrets, CouldExistIsAllowed bool
}
Defaults - return defaults Secrets - return secrets in plain text CouldExist - path is valid if it *could* exist, but currently doesn't
func NewTreeOpts ¶
func (*TreeOpts) AllowCouldExist ¶
func (t *TreeOpts) AllowCouldExist()
func (*TreeOpts) ToUnionOptions ¶
func (t *TreeOpts) ToUnionOptions() []union.UnionOption
Source Files ¶
Click to show internal directories.
Click to hide internal directories.