Documentation
¶
Index ¶
- Variables
- func ConvertTimeToCarbon(beginDate, endDate string) (carbon.Carbon, carbon.Carbon, error)
- func CreateDBIfNotExists(dbPath string) (*sqlite.Storage, error)
- func DefaultDBPath() (string, error)
- func Execute()
- func InitAWSConfig(ctx context.Context, profile string) (cfg aws.Config, err error)
- func InitDB()
- func NewLogger(debugLevel string) *logrus.Logger
Constants ¶
This section is empty.
Variables ¶
var (
DBPath string
)
Functions ¶
func ConvertTimeToCarbon ¶
ConvertTimeToCarbon converts the begin and end date to carbon.Carbon
func CreateDBIfNotExists ¶
CreateDBIfNotExists creates the database if it does not exist
func DefaultDBPath ¶
DefaultDBPath returns the default path of the database
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately.
func InitAWSConfig ¶
InitAWSConfig initializes the AWS SDK configuration If the ssoProfile is empty, it will use the default profile
func InitDB ¶
func InitDB()
InitDB initializes the database It will create the database if it does not exist It will initialize some global variables In case of error, it will exit the program
func NewLogger ¶
NewLogger creates a new logger The debugLevel is the variable to set the log level It can be "info", "warn", "error" or "debug" If the variable is not set, the default log level is "info" Be careful, the log level is case sensitive and by default, every logs are **discarded**, set the output to os.Stdout to see the logs Example: l:=NewLogger(); l.SetOutput(os.Stdout)
Types ¶
This section is empty.