Documentation ¶
Index ¶
- func DecodeFieldsSubTypes(fields []string, decodeMap map[string]string) ([]string, error)
- func EncodeFieldsSubTypes(fields []string, encodeMap map[string]string) ([]string, error)
- func FilterToNewFilter(f *Filter) *reportportal.NewFilter
- func FilterToUpdateFilter(f *Filter) *reportportal.UpdateFilter
- func FromWidget(dashboardHash string, w *Widget, filtersMap map[string]int, ...) (*reportportal.NewWidget, *reportportal.DashboardWidget, error)
- func HashName(name string) string
- type Dashboard
- type DashboardService
- func (s *DashboardService) Create(project string, o Object) error
- func (s *DashboardService) Delete(project, name string) error
- func (s *DashboardService) Get(project string, id int) (Object, error)
- func (s *DashboardService) GetByName(project, name string) (Object, error)
- func (s *DashboardService) Update(project string, current, target Object) error
- type Filter
- type FilterCondition
- type FilterOrder
- type FilterService
- func (s *FilterService) Create(project string, o Object) error
- func (s *FilterService) Delete(project, name string) error
- func (s *FilterService) Get(project string, id int) (Object, error)
- func (s *FilterService) GetByName(project, name string) (Object, error)
- func (s *FilterService) Update(project string, current, target Object) error
- type GenericObject
- type MockObject
- type MockObjectCounter
- type MockService
- func (s *MockService) Create(project string, o Object) error
- func (s *MockService) Delete(project, name string) error
- func (s *MockService) Get(project string, id int) (Object, error)
- func (s *MockService) GetByName(project, name string) (Object, error)
- func (s *MockService) Update(project string, current Object, target Object) error
- type MockServiceCounter
- type Object
- type ObjectKind
- type ReportPortal
- func (r *ReportPortal) Apply(project, file string, recursive bool) error
- func (r *ReportPortal) ApplyFile(project, file string) error
- func (r *ReportPortal) ApplyObject(project string, o Object) error
- func (r *ReportPortal) Create(project, file string) error
- func (r *ReportPortal) Export(k ObjectKind, project string, id int, name string, file string) error
- func (r *ReportPortal) Service(kind ObjectKind) (ServiceInterface, error)
- type ServiceInterface
- type Widget
- type WidgetContentParameters
- type WidgetPosition
- type WidgetSize
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeFieldsSubTypes ¶
convert 'statistics$defects$system_issue$xx_xxxxxxxxxxx' fields to 'statistics$defects$system_issue$shortname`
func EncodeFieldsSubTypes ¶
convert 'statistics$defects$system_issue$shortname' fields to 'statistics$defects$system_issue$xx_xxxxxxxxxxx'
func FilterToNewFilter ¶ added in v0.3.0
func FilterToNewFilter(f *Filter) *reportportal.NewFilter
func FilterToUpdateFilter ¶ added in v0.3.0
func FilterToUpdateFilter(f *Filter) *reportportal.UpdateFilter
func FromWidget ¶
func FromWidget(dashboardHash string, w *Widget, filtersMap map[string]int, encodeSubTypesMap map[string]string) (*reportportal.NewWidget, *reportportal.DashboardWidget, error)
Types ¶
type Dashboard ¶
type Dashboard struct { Kind ObjectKind `json:"kind"` Name string `json:"name"` Description string `json:"description"` Widgets []*Widget `json:"widgets"` // contains filtered or unexported fields }
func ToDashboard ¶
func ToDashboard(d *reportportal.Dashboard, widgets []*Widget) *Dashboard
func (*Dashboard) GetKind ¶ added in v0.2.0
func (d *Dashboard) GetKind() ObjectKind
type DashboardService ¶ added in v0.3.0
type DashboardService service
func (*DashboardService) Create ¶ added in v0.3.0
func (s *DashboardService) Create(project string, o Object) error
func (*DashboardService) Delete ¶ added in v0.3.0
func (s *DashboardService) Delete(project, name string) error
Delete the Dashboard with the given name and Widgets created for it
func (*DashboardService) Get ¶ added in v0.3.0
func (s *DashboardService) Get(project string, id int) (Object, error)
type Filter ¶ added in v0.2.0
type Filter struct { Kind ObjectKind `json:"kind"` Name string `json:"name"` Type string `json:"type"` Description string `json:"description"` Conditions []FilterCondition `json:"conditions"` Orders []FilterOrder `json:"orders"` // contains filtered or unexported fields }
func LoadFilterFromFile ¶ added in v0.2.0
func ToFilter ¶ added in v0.2.0
func ToFilter(f *reportportal.Filter) *Filter
func (*Filter) GetKind ¶ added in v0.2.0
func (f *Filter) GetKind() ObjectKind
type FilterCondition ¶ added in v0.2.0
type FilterOrder ¶ added in v0.2.0
type FilterService ¶ added in v0.3.0
type FilterService service
func (*FilterService) Create ¶ added in v0.3.0
func (s *FilterService) Create(project string, o Object) error
func (*FilterService) Delete ¶ added in v0.3.0
func (s *FilterService) Delete(project, name string) error
func (*FilterService) Get ¶ added in v0.3.0
func (s *FilterService) Get(project string, id int) (Object, error)
type GenericObject ¶ added in v0.2.0
type GenericObject struct { Kind ObjectKind `json:"kind"` Name string `json:"name"` }
type MockObject ¶ added in v0.3.0
type MockObject struct { Kind ObjectKind Name string Counter MockObjectCounter }
func (*MockObject) Equals ¶ added in v0.3.0
func (m *MockObject) Equals(o Object) bool
func (*MockObject) GetKind ¶ added in v0.3.0
func (m *MockObject) GetKind() ObjectKind
func (*MockObject) GetName ¶ added in v0.3.0
func (m *MockObject) GetName() string
type MockObjectCounter ¶ added in v0.3.0
type MockObjectCounter struct {
Equals int
}
type MockService ¶ added in v0.3.0
type MockService struct { GetM func(project string, id int) (Object, error) GetByNameM func(project, name string) (Object, error) CreateM func(project string, o Object) error UpdateM func(project string, current Object, target Object) error DeleteM func(project, name string) error Counter MockServiceCounter }
func (*MockService) Create ¶ added in v0.3.0
func (s *MockService) Create(project string, o Object) error
func (*MockService) Delete ¶ added in v0.3.0
func (s *MockService) Delete(project, name string) error
func (*MockService) Get ¶ added in v0.3.0
func (s *MockService) Get(project string, id int) (Object, error)
type MockServiceCounter ¶ added in v0.3.0
type Object ¶ added in v0.2.0
type Object interface { GetName() string GetKind() ObjectKind Equals(o Object) bool }
func UnmarshalObject ¶ added in v0.3.0
type ObjectKind ¶ added in v0.3.0
type ObjectKind int
const ( UnknownKind ObjectKind = iota DashboardKind FilterKind )
func (ObjectKind) MarshalJSON ¶ added in v0.3.0
func (k ObjectKind) MarshalJSON() ([]byte, error)
MarshalJSON marshals the enum as a quoted json string
func (ObjectKind) MarshalYAML ¶ added in v0.3.0
func (k ObjectKind) MarshalYAML() (interface{}, error)
func (ObjectKind) String ¶ added in v0.3.0
func (k ObjectKind) String() string
func (*ObjectKind) UnmarshalJSON ¶ added in v0.3.0
func (k *ObjectKind) UnmarshalJSON(b []byte) error
UnmarshalJSON unmashals a quoted json string to the enum value
func (*ObjectKind) UnmarshalYAML ¶ added in v0.3.0
func (k *ObjectKind) UnmarshalYAML(unmarshal func(interface{}) error) error
type ReportPortal ¶
type ReportPortal struct { Dashboard ServiceInterface Filter ServiceInterface // contains filtered or unexported fields }
func NewReportPortal ¶
func NewReportPortal(c *reportportal.Client) *ReportPortal
func (*ReportPortal) Apply ¶ added in v0.3.0
func (r *ReportPortal) Apply(project, file string, recursive bool) error
func (*ReportPortal) ApplyFile ¶ added in v0.3.0
func (r *ReportPortal) ApplyFile(project, file string) error
func (*ReportPortal) ApplyObject ¶ added in v0.3.0
func (r *ReportPortal) ApplyObject(project string, o Object) error
func (*ReportPortal) Create ¶ added in v0.3.0
func (r *ReportPortal) Create(project, file string) error
Create a object/resource in ReportPortal from the passed file.
func (*ReportPortal) Export ¶ added in v0.3.0
func (r *ReportPortal) Export(k ObjectKind, project string, id int, name string, file string) error
Export the ObjectKind with the passed id or name from the passed project to the passed file.
The file can be a relative or absoulte path to the file that will be written with the full content of the exported Object.
func (*ReportPortal) Service ¶ added in v0.3.0
func (r *ReportPortal) Service(kind ObjectKind) (ServiceInterface, error)
type ServiceInterface ¶ added in v0.3.0
type Widget ¶
type Widget struct { Name string `json:"name"` Description string `json:"description"` WidgetType string `json:"widgetType"` WidgetSize WidgetSize `json:"widgetSize"` WidgetPosition WidgetPosition `json:"widgetPosition"` Filters []string `json:"filters"` ContentParameters WidgetContentParameters `json:"contentParameters"` // contains filtered or unexported fields }
func ToWidget ¶
func ToWidget(w *reportportal.Widget, dw *reportportal.DashboardWidget, dashboardHash string, decodeSubTypesMap map[string]string) (*Widget, error)