1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
package api
import (
"codeberg.org/snonux/gonf/api/options"
"codeberg.org/snonux/gonf/internal/resource/dir"
"codeberg.org/snonux/gonf/internal/resource/file"
"codeberg.org/snonux/gonf/internal/resource/link"
)
// File creates a file resource.
func File(path string, opts ...options.Option) Resource {
return file.Present(path, opts...)
}
// NoFile creates a file resource that is ensured to be absent.
func NoFile(path string, opts ...options.Option) Resource {
return file.Absent(path, opts...)
}
// Dir creates a directory resource.
func Dir(path string, opts ...options.Option) Resource {
return dir.Present(path, opts...)
}
// NoDir creates a directory resource that is ensured to be absent.
func NoDir(path string, opts ...options.Option) Resource {
return dir.Absent(path, opts...)
}
// Link creates a link resource (symbolic or hard).
func Link(path string, opts ...options.Option) Resource {
return link.Present(path, opts...)
}
// NoLink creates a link resource that is ensured to be absent.
func NoLink(path string, opts ...options.Option) Resource {
return link.Absent(path, opts...)
}
// func Package(name string, ...options.Options) Resource {
// return pkg.Present(name, opts...)
// }
|