Documentation
¶
Index ¶
- Constants
- func EnableDebugLogs()
- func FilterSlice[T any](slice *[]T, predicate func(T) bool)
- func SetPackagesConfiguration(install func([]string) (Status, []string), update *CommandPromise)
- func SetServiceFunction(f func(string, string) (Status, error))
- func SetUsersConfiguration(useradd func(data UserData) (Status, error))
- type BytesValue
- type CommandPromise
- type CustomPromise
- type FilePromise
- func (f *FilePromise) Contents(contents any) *FilePromise
- func (f *FilePromise) DirectoriesPermissions(p *Permissions) *FilePromise
- func (f *FilePromise) IfRepaired(p ...Promise) Promise
- func (f *FilePromise) Permissions(p *Permissions) *FilePromise
- func (f *FilePromise) Promise() *FilePromise
- func (f *FilePromise) Resolve()
- func (f FilePromise) Status() Status
- func (f *FilePromise) Template(contents any) *FilePromise
- type FileType
- type IntValue
- type PackagePromise
- type Permissions
- type Promise
- type ServicePromise
- type Status
- type StringValue
- type StringsListValue
- type TemplateValue
- type UserData
- type UserPromise
- type Value
- type VariablePromise
Constants ¶
View Source
const ( FILE = iota DIRECTORY )
View Source
const ( DECLARED = iota PROMISED BROKEN KEPT REPAIRED )
Variables ¶
This section is empty.
Functions ¶
func EnableDebugLogs ¶
func EnableDebugLogs()
func SetPackagesConfiguration ¶
func SetPackagesConfiguration(install func([]string) (Status, []string), update *CommandPromise)
Types ¶
type BytesValue ¶
type BytesValue struct {
// contains filtered or unexported fields
}
func (BytesValue) Bytes ¶
func (b BytesValue) Bytes() []byte
func (BytesValue) Int ¶
func (b BytesValue) Int() (int, error)
func (BytesValue) String ¶
func (b BytesValue) String() string
type CommandPromise ¶
type CommandPromise struct { Stdout bytes.Buffer Stderr bytes.Buffer // contains filtered or unexported fields }
func Command ¶
func Command(cmd string, args ...string) *CommandPromise
func CommandWithEnv ¶
func CommandWithEnv(env []string, cmd string, args ...string) *CommandPromise
func (*CommandPromise) IfRepaired ¶
func (c *CommandPromise) IfRepaired(p ...Promise) Promise
func (*CommandPromise) Promise ¶
func (c *CommandPromise) Promise() *CommandPromise
func (*CommandPromise) Resolve ¶
func (c *CommandPromise) Resolve()
func (CommandPromise) Status ¶
func (c CommandPromise) Status() Status
type CustomPromise ¶
type CustomPromise struct {
// contains filtered or unexported fields
}
func MakeCustomPromise ¶
func MakeCustomPromise(p Promise) *CustomPromise
func (*CustomPromise) IfRepaired ¶
func (c *CustomPromise) IfRepaired(p ...Promise) Promise
func (*CustomPromise) Promise ¶
func (c *CustomPromise) Promise() *CustomPromise
func (*CustomPromise) Resolve ¶
func (c *CustomPromise) Resolve()
func (CustomPromise) Status ¶
func (c CustomPromise) Status() Status
type FilePromise ¶
type FilePromise struct {
// contains filtered or unexported fields
}
func Directory ¶
func Directory(filename any) *FilePromise
func File ¶
func File(filename any) *FilePromise
func (*FilePromise) Contents ¶
func (f *FilePromise) Contents(contents any) *FilePromise
func (*FilePromise) DirectoriesPermissions ¶
func (f *FilePromise) DirectoriesPermissions(p *Permissions) *FilePromise
func (*FilePromise) IfRepaired ¶
func (f *FilePromise) IfRepaired(p ...Promise) Promise
func (*FilePromise) Permissions ¶
func (f *FilePromise) Permissions(p *Permissions) *FilePromise
func (*FilePromise) Promise ¶
func (f *FilePromise) Promise() *FilePromise
func (*FilePromise) Resolve ¶
func (f *FilePromise) Resolve()
func (FilePromise) Status ¶
func (f FilePromise) Status() Status
func (*FilePromise) Template ¶
func (f *FilePromise) Template(contents any) *FilePromise
type IntValue ¶
type IntValue struct {
// contains filtered or unexported fields
}
type PackagePromise ¶
type PackagePromise struct {
// contains filtered or unexported fields
}
func Package ¶
func Package(names ...string) *PackagePromise
func (*PackagePromise) IfRepaired ¶
func (p *PackagePromise) IfRepaired(ps ...Promise) Promise
func (*PackagePromise) Promise ¶
func (p *PackagePromise) Promise() *PackagePromise
func (*PackagePromise) Resolve ¶
func (p *PackagePromise) Resolve()
func (PackagePromise) Status ¶
func (p PackagePromise) Status() Status
type Permissions ¶
type Permissions struct {
// contains filtered or unexported fields
}
func ModeUserGroup ¶
func ModeUserGroup(mode, user, group interface{}) *Permissions
type ServicePromise ¶
type ServicePromise struct {
// contains filtered or unexported fields
}
func Service ¶
func Service(names ...string) *ServicePromise
func (*ServicePromise) IfRepaired ¶
func (s *ServicePromise) IfRepaired(p ...Promise) Promise
func (*ServicePromise) Promise ¶
func (s *ServicePromise) Promise() *ServicePromise
func (*ServicePromise) Resolve ¶
func (s *ServicePromise) Resolve()
func (*ServicePromise) State ¶
func (s *ServicePromise) State(states ...string) *ServicePromise
func (ServicePromise) Status ¶
func (s ServicePromise) Status() Status
type StringValue ¶
type StringValue struct {
// contains filtered or unexported fields
}
func (StringValue) Bytes ¶
func (s StringValue) Bytes() []byte
func (StringValue) Int ¶
func (s StringValue) Int() (int, error)
func (StringValue) String ¶
func (s StringValue) String() string
type StringsListValue ¶
type StringsListValue struct {
// contains filtered or unexported fields
}
func (*StringsListValue) Append ¶
func (s *StringsListValue) Append(v ...string)
func (StringsListValue) Bytes ¶
func (s StringsListValue) Bytes() []byte
func (StringsListValue) Int ¶
func (s StringsListValue) Int() (int, error)
func (StringsListValue) String ¶
func (s StringsListValue) String() string
type TemplateValue ¶
type TemplateValue struct {
// contains filtered or unexported fields
}
func (*TemplateValue) Bytes ¶
func (t *TemplateValue) Bytes() []byte
func (TemplateValue) Int ¶
func (t TemplateValue) Int() (int, error)
func (TemplateValue) String ¶
func (t TemplateValue) String() string
type UserPromise ¶
type UserPromise struct {
// contains filtered or unexported fields
}
func User ¶
func User(data UserData) *UserPromise
func (*UserPromise) IfRepaired ¶
func (u *UserPromise) IfRepaired(p ...Promise) Promise
func (*UserPromise) Promise ¶
func (u *UserPromise) Promise() *UserPromise
func (*UserPromise) Resolve ¶
func (u *UserPromise) Resolve()
func (UserPromise) Status ¶
func (u UserPromise) Status() Status
type VariablePromise ¶
type VariablePromise struct {
// contains filtered or unexported fields
}
func AppendVariable ¶
func AppendVariable(name string, values ...string) *VariablePromise
func Default ¶
func Default(name string, value string) *VariablePromise
func Variable ¶
func Variable(name string, value string) *VariablePromise
func (VariablePromise) Bytes ¶
func (s VariablePromise) Bytes() []byte
func (VariablePromise) Int ¶
func (s VariablePromise) Int() (int, error)
func (VariablePromise) String ¶
func (s VariablePromise) String() string
Click to show internal directories.
Click to hide internal directories.