sonar2csv

package
v0.0.0-...-1b81556 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2018 License: Apache-2.0, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSVWriter

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

func NewWriter

func NewWriter(path string) (*CSVWriter, error)

func (*CSVWriter) WriteAll

func (w *CSVWriter) WriteAll(d []map[string]string) error

func (*CSVWriter) WriteCSV

func (w *CSVWriter) WriteCSV(d []string) error

type Component

type Component struct {
	ID        string    `json:"id"`
	Key       string    `json:"key"`
	Name      string    `json:"name"`
	Qualifier string    `json:"qualifier"`
	Branch    string    `json:"branch"`
	Msr       []Metrics `json:"measures"`
}

type Metrics

type Metrics struct {
	Key string `json:"metric"`
	Val string `json:"value"`
}

Metrics はSonar WebAPI - /api/measures/componentのレスポンスのうち、メトリクスに関するモデル

type SonarResponse

type SonarResponse struct {
	Component Component `json:"component"`
}

sonarResponse は Sonar WebAPI - /api/resource のレスポンスのモデル

func (*SonarResponse) MergeMetrics

func (s *SonarResponse) MergeMetrics(originFile string, appendix map[string]string) ([]map[string]string, error)

type SonarServer

type SonarServer struct {
	Client   *http.Client
	URL      *url.URL
	Resource string
	Branch   string
	Metrics  []string
	Auth     struct {
		Login    string
		Password string
	}
}

func NewServer

func NewServer(c util.SonarSetting) (*SonarServer, error)

func (*SonarServer) Get

func (s *SonarServer) Get() (*http.Response, error)

func (*SonarServer) GetResources

func (s *SonarServer) GetResources() (*http.Response, error)

Jump to

Keyboard shortcuts

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