models

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CoverageHistory

type CoverageHistory struct {
	CreatedAt     time.Time `json:"createdAt"`
	TotalCoverage float64   `json:"totalCoverage,omitempty"`
}

type CoverageState

type CoverageState struct {
	Config                  config.Config                                  `json:"config"`
	CreatedAt               time.Time                                      `json:"createdAt"`
	ServiceCoverages        map[config.ServiceKey]ServiceCoverage          `json:"serviceCoverages"`
	LogicalServiceCoverages map[config.ServiceKey][]LogicalServiceCoverage `json:"logicalServiceCoverages"`
}

func NewCoverageState

func NewCoverageState(conf config.Config) CoverageState

func (CoverageState) GetHistoryState

func (s CoverageState) GetHistoryState() HistoryState

func (CoverageState) GetReportStateJSON

func (s CoverageState) GetReportStateJSON() (string, error)

type History

type History struct {
	Service         ServiceHistory                   `json:"service,omitempty"`
	LogicalServices map[string]LogicalServiceHistory `json:"logicalServices,omitempty"`
}

type HistoryState

type HistoryState map[config.ServiceKey]History

type LogicalServiceCoverage

type LogicalServiceCoverage struct {
	Methods              []MethodCoverage  `json:"methods,omitempty"`
	TotalMethods         int               `json:"totalMethods,omitempty"`
	TotalCoverage        float64           `json:"totalCoverage,omitempty"`
	LogicalService       string            `json:"logicalService"`
	TotalCoveredMethods  int               `json:"totalCoveredMethods,omitempty"`
	TotalCoverageHistory []CoverageHistory `json:"totalCoverageHistory,omitempty"`
}

type LogicalServiceHistory

type LogicalServiceHistory struct {
	Methods       map[string]MethodHistory `json:"methods,omitempty"`
	TotalCoverage []CoverageHistory        `json:"totalCoverage,omitempty"`
}

type MethodCoverage

type MethodCoverage struct {
	Method           string                `json:"method"`
	Covered          bool                  `json:"covered,omitempty"`
	TotalCases       int                   `json:"totalCases,omitempty"`
	Deprecated       bool                  `json:"deprecated,omitempty"`
	RequestCoverage  MethodRequestCoverage `json:"requestCoverage,omitempty"`
	ResponseCoverage MethodRequestCoverage `json:"responseCoverage,omitempty"`
}

type MethodHistory

type MethodHistory struct {
	RequestTotalCoverage  []CoverageHistory `json:"requestCoverage,omitempty"`
	ResponseTotalCoverage []CoverageHistory `json:"responseCoverage,omitempty"`
}

type MethodRequestCoverage

type MethodRequestCoverage struct {
	Name                   string             `json:"name"`
	TotalCoverage          float64            `json:"totalCoverage,omitempty"`
	TotalParameters        int                `json:"totalParameters,omitempty"`
	ParametersCoverage     []ResultParameters `json:"parametersCoverage,omitempty"`
	TotalCoverageHistory   []CoverageHistory  `json:"totalCoverageHistory,omitempty"`
	TotalCoveredParameters int                `json:"totalCoveredParameters,omitempty"`
}

type Result

type Result struct {
	Method   string             `json:"method"`
	Request  []ResultParameters `json:"request"`
	Response []ResultParameters `json:"response"`
}

func (Result) GetLogicalService

func (r Result) GetLogicalService() string

type ResultParameters

type ResultParameters struct {
	Covered                bool               `json:"covered,omitempty"`
	Parameter              string             `json:"parameter"`
	Parameters             []ResultParameters `json:"parameters,omitempty"`
	Deprecated             bool               `json:"deprecated,omitempty"`
	HasUncoveredParameters bool               `json:"hasUncoveredParameters,omitempty"`
}

type ServiceCoverage

type ServiceCoverage struct {
	TotalCoverage        float64           `json:"totalCoverage,omitempty"`
	TotalCoverageHistory []CoverageHistory `json:"totalCoverageHistory,omitempty"`
}

type ServiceHistory

type ServiceHistory struct {
	TotalCoverage []CoverageHistory `json:"totalCoverage,omitempty"`
}

Jump to

Keyboard shortcuts

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