Documentation ¶
Index ¶
- type FileStorage
- type Option
- func WithBlacklist(blacklist *regexp.Regexp) Option
- func WithExpiration(exp time.Duration) Option
- func WithMkdirPermission(perm string) Option
- func WithPathPrefix(prefix string) Option
- func WithSafeChars(chars string) Option
- func WithSaveErrIfExists(saveErrIfExists bool) Option
- func WithWritePermission(perm string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileStorage ¶
type FileStorage struct { BaseDir string PathPrefix string Blacklists []*regexp.Regexp MkdirPermission os.FileMode WritePermission os.FileMode SaveErrIfExists bool SafeChars string Expiration time.Duration // contains filtered or unexported fields }
func New ¶
func New(baseDir string, options ...Option) *FileStorage
type Option ¶
type Option func(h *FileStorage)
func WithBlacklist ¶
func WithExpiration ¶ added in v0.8.10
func WithMkdirPermission ¶
func WithPathPrefix ¶
func WithSafeChars ¶
func WithSaveErrIfExists ¶
func WithWritePermission ¶
Click to show internal directories.
Click to hide internal directories.