Documentation ¶
Index ¶
- type ApiClient
- func (clt ApiClient) Get(url string) (resp *http.Response, err error)
- func (c ApiClient) GetPublishers() ([]common.Publisher, error)
- func (c ApiClient) GetSoftwareByURL(url string) (*Software, error)
- func (clt ApiClient) Patch(url string, body []byte) (resp *http.Response, err error)
- func (c ApiClient) PatchSoftware(id string, url string, aliases []string, publiccodeYml string) (*http.Response, error)
- func (clt ApiClient) Post(url string, body []byte) (resp *http.Response, err error)
- func (c ApiClient) PostLog(message string) (*http.Response, error)
- func (c ApiClient) PostSoftware(url string, aliases []string, publiccodeYml string) (*http.Response, error)
- func (c ApiClient) PostSoftwareLog(softwareId string, message string) (*http.Response, error)
- type CodeHosting
- type Links
- type Publisher
- type PublishersPaginated
- type Software
- type SoftwarePaginated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiClient ¶
type ApiClient struct {
// contains filtered or unexported fields
}
func (ApiClient) GetPublishers ¶
GetPublishers returns a slice with all the publishers from the API and any error encountered.
func (ApiClient) GetSoftwareByURL ¶
GetSoftwareByURL returns the software matching the given repo URL and any error encountered.
func (ApiClient) PatchSoftware ¶
func (c ApiClient) PatchSoftware(id string, url string, aliases []string, publiccodeYml string) (*http.Response, error)
PatchSoftware updates a software resource with the given fields and returns an http.Response and any error encountered.
func (ApiClient) PostLog ¶
PostLog creates a new log with the given message and returns an http.Response and any error encountered.
type CodeHosting ¶
type Publisher ¶
type Publisher struct { ID string `json:"id"` AlternativeID string `json:"alternativeId"` Email string `json:"email"` Description string `json:"description"` CodeHostings []CodeHosting `json:"codeHosting"` Active bool `json:"active"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
type PublishersPaginated ¶
type SoftwarePaginated ¶
Click to show internal directories.
Click to hide internal directories.