Documentation
¶
Overview ¶
Package cfg contains common configuration variables.
Index ¶
Constants ¶
View Source
const ( CPUProfile = "" MEMProfile = "" )
Variables ¶
View Source
var ( TraceFile string LogFile string UseJSONHandler bool Verbose bool Output string ConfigFile string Workspace string Limits = network.DefLimits ForceEnterprise bool MachineIDOvr string // Machine ID override NoEncryption bool // disable encryption MemberOnly bool OnlyChannelUsers bool IncludeCustomLabels bool // Requests labels for user custom fields, use with caution due to request throttling. // ChannelTypes lists channel types to fetch. ChannelTypes = slackChanTypes(slackdump.AllChanTypes) // FailOnNonCritical enables hard fail on non-critical errors, such as // "channel not found", or "user not in channel". By default it is // disabled. FailOnNonCritical bool WithFiles bool WithAvatars bool RecordFiles bool // record file chunks in chunk files. // Oldest is the default timestamp of the oldest message to fetch, that is // used by the dump and export commands. Oldest = TimeValue(time.Time{}) // Latest is the default timestamp of the newest message to fetch, that is // used by the dump and export commands. It is set to an exact value // for the dump to be consistent. Latest = TimeValue(time.Now()) LocalCacheDir string UserCacheRetention time.Duration NoUserCache bool NoChunkCache bool UseChunkFiles bool // Use chunk files for storage, instead of sqlite database. Log *slog.Logger = slog.Default() // LoadSecrets is a flag that indicates whether to load secrets from the // environment variables. LoadSecrets bool YesMan bool // if true, all questions are answered with "yes" Version BuildInfo // version propagated by main package. )
View Source
var ( // ErrVerUnknown indicates that this is either a development build or // version is not set. ErrVerUnknown = errors.New("version unknown") // ErrDateUknown indicates that the date is either not set or unknown. ErrDateUnknown = errors.New("unknown date") )
Functions ¶
func SetDebugLevel ¶
func SetDebugLevel()
func StripZipExt ¶
StripZipExt removes the .zip extension from the string.
Types ¶
type BuildInfo ¶
type BuildInfo struct {
Version string `json:"version"`
Commit string `json:"commit"`
Date string `json:"date"`
}
func (BuildInfo) IsReleased ¶ added in v4.1.0
func (BuildInfo) Normalised ¶ added in v4.1.1
Normalised returns the normalised BuildInfo: - version has v prefix - Build is in 2006-01-02 15:04:05Z format. - commit is unchanged, so may be "Homebrew" It will return ErrVerUknown if version is unknown (i.e. unreleased).
type FlagMask ¶
type FlagMask uint32
const ( DefaultFlags FlagMask = 0 OmitAuthFlags FlagMask = 1 << iota OmitWithFilesFlag OmitConfigFlag OmitOutputFlag OmitCacheDir OmitWorkspaceFlag OmitUserCacheFlag OmitTimeframeFlag OmitChunkCacheFlag OmitCustomUserFlags OmitRecordFilesFlag OmitWithAvatarsFlag OmitChunkFileMode OmitYesManFlag OmitChannelTypesFlag OmitMemberOnlyFlag OmitAll = OmitConfigFlag | OmitWithFilesFlag | OmitOutputFlag | OmitCacheDir | OmitWorkspaceFlag | OmitAuthFlags | OmitUserCacheFlag | OmitTimeframeFlag | OmitChunkCacheFlag | OmitCustomUserFlags | OmitRecordFilesFlag | OmitWithAvatarsFlag | OmitChunkFileMode | OmitYesManFlag | OmitMemberOnlyFlag | OmitChannelTypesFlag )
type StringSlice ¶
type StringSlice []string
StringSlice provides a flag.Value interface for a slice of strings.
func (*StringSlice) Set ¶
func (ss *StringSlice) Set(s string) error
func (*StringSlice) String ¶
func (ss *StringSlice) String() string
Click to show internal directories.
Click to hide internal directories.