sources

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Detail string `json:"detail"`
}

type LastScan added in v0.2.0

type LastScan struct {
	Date   *time.Time `json:"date"`
	Status string     `json:"status"`
}

type ListOptions

type ListOptions struct {
	Cursor  string          `json:"cursor"`
	PerPage *int            `json:"per_page"`
	Search  string          `json:"search"`
	Type    SourcesListType `json:"type"`
}

type SourcesClient

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

func NewClient

func NewClient(opts ...client.ClientOption) (*SourcesClient, error)

func (*SourcesClient) Get

func (c *SourcesClient) Get(sourceId int) (*SourcesGetResult, error)

func (*SourcesClient) List

type SourcesGetResult

type SourcesGetResult struct {
	Result SourcesResponse `json:"result"`
	Error  *Error          `json:"error"`
}

type SourcesListResult

type SourcesListResult struct {
	Result []SourcesResponse `json:"result"`
	Error  *Error            `json:"error"`
}

type SourcesListType

type SourcesListType string
const (
	Bitbucket SourcesListType = "bitbucket"
	GitHub    SourcesListType = "github"
	GitLab    SourcesListType = "gitlab"
)

type SourcesResponse

type SourcesResponse struct {
	ID                   int64    `json:"id"`
	URL                  string   `json:"url"`
	Type                 string   `json:"type"`
	FullName             string   `json:"full_name"`
	Visibility           string   `json:"visibility"`
	Health               string   `json:"health"`
	OpenIncidentsCount   int      `json:"open_incidents_count"`
	ClosedIncidentsCount int      `json:"closed_incidents_count"`
	LastScan             LastScan `json:"last_scan"`
}

Jump to

Keyboard shortcuts

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