Documentation
¶
Index ¶
- Constants
- func ComputeStructHash(template interface{}, collisionCount *int32) string
- func ContentTrim(contentType, content string) string
- func DeepHashObject(hasher hash.Hash, objectToWrite interface{})
- func GenerateContentAbstract(content string) string
- func GenerateContentHeaderImage(content string) string
- func MarshalMap(obj any) map[string]interface{}
- func SafetyFilePathJoin(parent, filename string) string
- func SanitizeFilename(name string) string
- func UnmarshalMap(data map[string]interface{}, obj any)
- type FileAccess
- func (fa *FileAccess) Copy(dstPath, srcPath string, perm os.FileMode) error
- func (fa *FileAccess) Create(path string, perm os.FileMode) (*os.File, error)
- func (fa *FileAccess) Exists(path string) bool
- func (fa *FileAccess) GetAbsPath(path string) (string, error)
- func (fa *FileAccess) MkdirAll(path string, perm os.FileMode) error
- func (fa *FileAccess) Open(path string) (*os.File, error)
- func (fa *FileAccess) Read(path string) ([]byte, error)
- func (fa *FileAccess) Remove(path string) error
- func (fa *FileAccess) Rename(oldPath, newPath string) error
- func (fa *FileAccess) Stat(path string) (os.FileInfo, error)
- func (fa *FileAccess) ValidatePath(path string) error
- func (fa *FileAccess) Workdir() string
- func (fa *FileAccess) Write(path string, data []byte, perm os.FileMode) error
Constants ¶
View Source
const (
PathSeparator = string(os.PathSeparator)
)
Variables ¶
This section is empty.
Functions ¶
func ComputeStructHash ¶
func ContentTrim ¶
func DeepHashObject ¶
DeepHashObject writes specified object to hash using the spew library which follows pointers and prints actual values of the nested objects ensuring the hash does not change when a pointer changes.
func GenerateContentAbstract ¶
func MarshalMap ¶
func SafetyFilePathJoin ¶
func SanitizeFilename ¶
func UnmarshalMap ¶
Types ¶
type FileAccess ¶
type FileAccess struct {
// contains filtered or unexported fields
}
func NewFileAccess ¶
func NewFileAccess(workdir string) *FileAccess
func (*FileAccess) Copy ¶
func (fa *FileAccess) Copy(dstPath, srcPath string, perm os.FileMode) error
func (*FileAccess) Exists ¶
func (fa *FileAccess) Exists(path string) bool
func (*FileAccess) GetAbsPath ¶
func (fa *FileAccess) GetAbsPath(path string) (string, error)
func (*FileAccess) Remove ¶
func (fa *FileAccess) Remove(path string) error
func (*FileAccess) Rename ¶
func (fa *FileAccess) Rename(oldPath, newPath string) error
func (*FileAccess) ValidatePath ¶
func (fa *FileAccess) ValidatePath(path string) error
func (*FileAccess) Workdir ¶
func (fa *FileAccess) Workdir() string
Click to show internal directories.
Click to hide internal directories.