stats

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatWithDisplayTags

func FormatWithDisplayTags(v interface{}) string

func PrintArtifactoryDashboard

func PrintArtifactoryDashboard(stats *ArtifactoryStatsSummary)

func PrintArtifactoryStats

func PrintArtifactoryStats(stats *ArtifactoryStatsSummary)

func PrintErrorsDashboard

func PrintErrorsDashboard(genericError *jpd.GenericError)

func PrintGenericError

func PrintGenericError(err *jpd.GenericError)

func PrintJPDsDashboard

func PrintJPDsDashboard(jpdList []JPD, displayLimit int)

func PrintJPDsStats

func PrintJPDsStats(jpdList *[]JPD, displayLimit int)

func PrintProjectsDashboard

func PrintProjectsDashboard(projects []services.Project, displayLimit int)

func PrintProjectsStats

func PrintProjectsStats(projects []services.Project, displayLimit int)

func PrintReleaseBundlesDashboard

func PrintReleaseBundlesDashboard(rbResponse *ReleaseBundleResponse, displayLimit int)

func PrintReleaseBundlesStats

func PrintReleaseBundlesStats(rbResponse *ReleaseBundleResponse, displayLimit int)

Types

type APIError

type APIError struct {
	Type    string `json:"type"`
	Message string `json:"message"`
}

type ArtifactoryStats

type ArtifactoryStats struct {
	ServicesManager         artifactory.ArtifactoryServicesManager
	AccessManager           access.AccessServicesManager
	LifecycleServiceManager lifecycle.LifecycleServicesManager
	JPDServicesManager      jpd.JPDServicesManager
	Format                  string
	AccessToken             string
	ServerId                string
	ServerUrl               string
	DisplayLimit            int
	ProjectCount            int
}

func NewArtifactoryStatsCommand

func NewArtifactoryStatsCommand() *ArtifactoryStats

func (*ArtifactoryStats) GetArtifactoryStats

func (sa *ArtifactoryStats) GetArtifactoryStats() interface{}

func (*ArtifactoryStats) GetCommandList

func (sa *ArtifactoryStats) GetCommandList() map[string]StatsFunc

func (*ArtifactoryStats) GetJPDsStats

func (sa *ArtifactoryStats) GetJPDsStats() interface{}

func (*ArtifactoryStats) GetProjectsStats

func (sa *ArtifactoryStats) GetProjectsStats() interface{}

func (*ArtifactoryStats) GetReleaseBundlesStats

func (sa *ArtifactoryStats) GetReleaseBundlesStats() interface{}

func (*ArtifactoryStats) GetStats

func (sa *ArtifactoryStats) GetStats() error

func (*ArtifactoryStats) PrintAllResults

func (sa *ArtifactoryStats) PrintAllResults(results map[string]interface{}) error

func (*ArtifactoryStats) Run

func (sa *ArtifactoryStats) Run() error

func (*ArtifactoryStats) SetAccessToken

func (sa *ArtifactoryStats) SetAccessToken(token string) *ArtifactoryStats

func (*ArtifactoryStats) SetDisplayLimit

func (sa *ArtifactoryStats) SetDisplayLimit(displayLimit int) *ArtifactoryStats

func (*ArtifactoryStats) SetFormat

func (sa *ArtifactoryStats) SetFormat(format string) *ArtifactoryStats

func (*ArtifactoryStats) SetServerId

func (sa *ArtifactoryStats) SetServerId(id string) *ArtifactoryStats

type ArtifactoryStatsSummary

type ArtifactoryStatsSummary struct {
	ProjectsCount       int                          `display:"Total Projects"`
	TotalBinariesCount  string                       `display:"Total No of Binaries"`
	TotalBinariesSize   string                       `display:"Total Binaries Size"`
	TotalArtifactsCount string                       `display:"Total No of Artifacts"`
	TotalArtifactsSize  string                       `display:"Total Artifacts Size"`
	StorageType         string                       `display:"Storage Type"`
	RepositoriesDetails []services.RepositoryDetails `json:"-"`
}

type CommandRunner

type CommandRunner interface {
	Run() error
}

type ErrorResponse

type ErrorResponse struct {
	Errors []APIError `json:"errors"`
}

type GenericResultsWriter

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

func NewGenericResultsWriter

func NewGenericResultsWriter(data interface{}, format string, displayLimit int) *GenericResultsWriter

func (*GenericResultsWriter) Print

func (rw *GenericResultsWriter) Print() error

func (*GenericResultsWriter) PrintConsole

func (rw *GenericResultsWriter) PrintConsole() error

func (*GenericResultsWriter) PrintDashboard

func (rw *GenericResultsWriter) PrintDashboard() error

func (*GenericResultsWriter) PrintJson

func (rw *GenericResultsWriter) PrintJson() error

type JPD

type JPD struct {
	ID       string    `json:"id"`
	Name     string    `json:"name" display:"Name"`
	URL      string    `json:"base_url"`
	Status   Status    `json:"status" display:"Status"`
	Local    bool      `json:"local"`
	Services []Service `json:"services"`
	Licenses []License `json:"licenses"`
}

type License

type License struct {
	Type       string `json:"type"`
	Expired    bool   `json:"expired"`
	LicensedTo string `json:"licensed_to"`
}

type ReleaseBundleInfo

type ReleaseBundleInfo struct {
	RepositoryKey     string `json:"repository_key" display:"Repository Key"`
	ReleaseBundleName string `json:"release_bundle_name" display:"Release Bundle Name"`
	ProjectKey        string `json:"project_key" display:"Project Key"`
}

type ReleaseBundleResponse

type ReleaseBundleResponse struct {
	ReleaseBundles []ReleaseBundleInfo `json:"release_bundles"`
}

type Service

type Service struct {
	Type   string `json:"type"`
	Status Status `json:"status"`
}

type Stats

type Stats struct {
	Format       string
	AccessToken  string
	ServerId     string
	DisplayLimit int
}

func NewStatsCommand

func NewStatsCommand() *Stats

func (*Stats) NewArtifactoryStatsCommand

func (ss *Stats) NewArtifactoryStatsCommand() *ArtifactoryStats

func (*Stats) Run

func (ss *Stats) Run() error

func (*Stats) SetAccessToken

func (s *Stats) SetAccessToken(token string) *Stats

func (*Stats) SetFormat

func (s *Stats) SetFormat(format string) *Stats

func (*Stats) SetServerId

func (s *Stats) SetServerId(id string) *Stats

type StatsFunc

type StatsFunc func() interface{}

type Status

type Status struct {
	Code    string `json:"code" display:"Code"`
	Message string `json:"message"`
}

type TableRow

type TableRow struct {
	Metric string `col-name:"Metric"`
	Value  string `col-name:"Value"`
}

Jump to

Keyboard shortcuts

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