Documentation ¶
Overview ¶
Package dbclient exposes dbclient that used to store gocover results.
kusto.go is the kusto client wrapper of the library "github.com/Azure/azure-kusto-go/kusto"
Index ¶
Constants ¶
View Source
const (
Separator = ":"
)
Variables ¶
View Source
var ( ErrEnvRequired = errors.New("environment is required for kusto db") ErrFlagRequired = errors.New("flag is required for kusto db") ErrFormatCustomColumn = errors.New("wrong format, kusto custom column format is {column}:{datatype}:{value}") )
View Source
var ErrUnsupportedDBType = errors.New(`supportted type are "Kusto", unsupported DB client type`)
Functions ¶
This section is empty.
Types ¶
type ClientType ¶
type ClientType string
const ( None ClientType = "None" Kusto ClientType = "Kusto" )
type DBOption ¶ added in v1.0.0
type DBOption struct { DataCollectionEnabled bool DbType ClientType KustoOption KustoOption }
func (*DBOption) GetDbClient ¶ added in v1.0.0
func (o *DBOption) GetDbClient(logger logrus.FieldLogger) (DbClient, error)
type Data ¶
type Data struct { PreciseTimestamp time.Time `json:"preciseTimestamp"` // time send to db TotalLines int64 `json:"totalLines"` // total lines of the entire repo/module. EffectiveLines int64 `json:"effectiveLines"` // the lines for coverage base, total lines - ignored lines IgnoredLines int64 `json:"ignoredLines"` // the lines ignored. CoveredLines int64 `json:"coveredLines"` // the lines covered by test Coverage float64 `json:"coverage"` // unit test coverage, CoveredLines / EffectiveLines CoverageMode string `json:"coverageMode"` // coverage mode, diff or full subcommand ModulePath string `json:"modulePath"` // module name, which is declared in go.mod FilePath string `json:"filePath"` // file path for a concrete file or directory Extra map[string]interface{} // extra data that passing accordingly }
type DbClient ¶
DbClient interface for storing gocover data.
func NewKustoClient ¶
func NewKustoClient(option *KustoOption) (DbClient, error)
type KustoClient ¶
type KustoClient struct {
// contains filtered or unexported fields
}
KustoClient wraps the kusto ingestor and the extra column data and corresponding mappings.
type KustoOption ¶
type KustoOption struct { UseKusto bool Endpoint string Database string Event string CustomColumns []string Logger logrus.FieldLogger // contains filtered or unexported fields }
KustoOption wraps the credential and kusto server information for building kusto client.
func (*KustoOption) Validate ¶
func (o *KustoOption) Validate() error
Validate checks the validation of the input on kusto option.
Click to show internal directories.
Click to hide internal directories.