Documentation ¶
Index ¶
- type AuthenticateResult
- type Client
- func (c *Client) Login(username, password string) error
- func (c *Client) ReportHTML(reportBy interface{}) ([]byte, error)
- func (c *Client) ReportJSON(reportBy interface{}) (*ReportJSONResult, error)
- func (c *Client) SetToken(token string)
- func (c *Client) Status(statusBy interface{}) (*StatusResult, error)
- func (c *Client) Submit(filename string, file io.Reader, isVictoria bool) (*SubmitResult, error)
- type ClientInterface
- type Error
- type ReportJSONResult
- type ShaId
- type StatusResult
- type SubmitResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticateResult ¶
type AuthenticateResult struct { StatusCode int `json:"status_code"` Status string `json:"status"` Msg string `json:"msg"` Data struct { Token string `json:"token"` User struct { Name string `json:"name"` Email string `json:"email"` Username string `json:"username"` Groups []string `json:"groups"` } `json:"user"` } `json:"data"` }
AuthenticateResult ...
func Authenticate ¶
func Authenticate(username, password string) (*AuthenticateResult, error)
Authenticate ...
type Client ¶
type Client struct { *resty.Client // contains filtered or unexported fields }
Client to interface with the appinspect service
func (*Client) ReportHTML ¶
ReportHTML of an app-package inspection
func (*Client) ReportJSON ¶
func (c *Client) ReportJSON(reportBy interface{}) (*ReportJSONResult, error)
ReportJSON of an app-package inspection
func (*Client) Status ¶
func (c *Client) Status(statusBy interface{}) (*StatusResult, error)
Status of an app-package inspection
type ClientInterface ¶
type ClientInterface interface { Login(username string, password string) error SetToken(token string) Submit(filename string, file io.Reader, isVictoria bool) (*SubmitResult, error) Status(statusBy interface{}) (*StatusResult, error) ReportJSON(reportBy interface{}) (*ReportJSONResult, error) ReportHTML(reportBy interface{}) ([]byte, error) }
type ReportJSONResult ¶
type ReportJSONResult struct { RequestID string `json:"request_id"` Cloc string `json:"cloc"` Reports []struct { AppAuthor string `json:"app_author"` AppDescription string `json:"app_description"` AppHash string `json:"app_hash"` AppName string `json:"app_name"` AppVersion string `json:"app_version"` Metrics struct { StartTime string `json:"start_time"` EndTime string `json:"end_time"` ExecutionTime float64 `json:"execution_time"` } `json:"metrics"` RunParameters struct { APIRequestID string `json:"api_request_id"` Identity string `json:"identity"` SplunkbaseID string `json:"splunkbase_id"` Version string `json:"version"` SplunkVersion string `json:"splunk_version"` StackID string `json:"stack_id"` APITimestamp string `json:"api_timestamp"` PackageLocation string `json:"package_location"` AppinspectVersion string `json:"appinspect_version"` IncludedTags []string `json:"included_tags"` ExcludedTags []string `json:"excluded_tags"` } `json:"run_parameters"` Groups []struct { Checks []struct { Description string `json:"description"` Messages []struct { Code string `json:"code"` Filename string `json:"filename"` Line int `json:"line"` Message string `json:"message"` Result string `json:"result"` MessageFilename string `json:"message_filename"` MessageLine interface{} `json:"message_line"` } `json:"messages"` Name string `json:"name"` Tags []string `json:"tags"` Result string `json:"result"` } `json:"checks"` Description string `json:"description"` Name string `json:"name"` } `json:"groups"` Summary struct { Error int `json:"error"` Failure int `json:"failure"` Skipped int `json:"skipped"` ManualCheck int `json:"manual_check"` NotApplicable int `json:"not_applicable"` Warning int `json:"warning"` Success int `json:"success"` } `json:"summary"` } `json:"reports"` Summary struct { Error int `json:"error"` Failure int `json:"failure"` Skipped int `json:"skipped"` ManualCheck int `json:"manual_check"` NotApplicable int `json:"not_applicable"` Warning int `json:"warning"` Success int `json:"success"` } `json:"summary"` Metrics struct { StartTime string `json:"start_time"` EndTime string `json:"end_time"` ExecutionTime float64 `json:"execution_time"` } `json:"metrics"` RunParameters struct { APIRequestID string `json:"api_request_id"` Identity string `json:"identity"` SplunkbaseID string `json:"splunkbase_id"` Version string `json:"version"` SplunkVersion string `json:"splunk_version"` StackID string `json:"stack_id"` APITimestamp string `json:"api_timestamp"` PackageLocation string `json:"package_location"` AppinspectVersion string `json:"appinspect_version"` IncludedTags []string `json:"included_tags"` ExcludedTags []string `json:"excluded_tags"` } `json:"run_parameters"` Links []struct { Rel string `json:"rel"` Href string `json:"href"` } `json:"links"` }
ReportJSONResult ...
type StatusResult ¶
type StatusResult struct { RequestID string `json:"request_id"` Sha string `json:"sha"` StatusCode int `json:"status_code"` Status string `json:"status"` Info struct { Error int `json:"error"` Failure int `json:"failure"` Skipped int `json:"skipped"` ManualCheck int `json:"manual_check"` NotApplicable int `json:"not_applicable"` Warning int `json:"warning"` Success int `json:"success"` } `json:"info"` Links []struct { Rel string `json:"rel"` Href string `json:"href"` } `json:"links"` }
StatusResult ...
Click to show internal directories.
Click to hide internal directories.