utils

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Cfg ...
	Cfg = &Config{}
)

Functions

func GetProjectFromIssueKey

func GetProjectFromIssueKey(issuekey string) string

GetProjectFromIssueKey - ...

Types

type Config

type Config struct {
	// Username - Jira username for authentication
	Username string `yaml:"username"`
	// Password - Jira password for authentication
	Password string `yaml:"password"`
	// IncludeEstimatedTime - If 'true' includes Estimate time to report, also it can be passed in command via 'estimated-time' flag
	IncludeEstimatedTime bool `yaml:"include_estimated_time"`
	// IncludeLoggedTime - If 'true' includes Logged time to report, also it can be passed in command via 'log-time' flag
	IncludeLoggedTime bool `yaml:"include_logged_time"`
	// EligibleUsersHistories - updates from these users are considered valid when finding tickets from the last business day
	EligibleUsersHistories []string `yaml:"eligible_users_histories" default:"gitlab"`
	// ExcludeJiraProjects - Jira projects that tickets will be ignore while creating report
	ExcludeJiraProjects []string `yaml:"exclude_jira_projects" default:"retest"`

	// CmdStartTime - command start time in UTC
	CmdStartTime time.Time
	// NumberOfDaysForGetTickets - number of days for which we take tickets for report
	NumberOfDaysForGetTickets int
}

Config - ...

func NewConfig

func NewConfig(path string, addEstimatedTime, addLogTime bool) (*Config, error)

NewConfig - ...

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger - struct of Logger

var Log Logger

Log - main Logger for program

func NewLogger

func NewLogger(logLevel string) Logger

NewLogger - creater for Logger

func (*Logger) Debug

func (l *Logger) Debug() *zerolog.Event

Debug - ...

func (*Logger) Error

func (l *Logger) Error() *zerolog.Event

Error - ,,,

func (*Logger) Fatal

func (l *Logger) Fatal() *zerolog.Event

Fatal - ...

func (*Logger) Info

func (l *Logger) Info() *zerolog.Event

Info - ...

func (*Logger) Warn

func (l *Logger) Warn() *zerolog.Event

Warn - ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL