Documentation ¶
Index ¶
- type APIClient
- func (clt APIClient) Get(url string) (*http.Response, error)
- func (clt APIClient) GetPublishers() ([]common.Publisher, error)
- func (clt APIClient) GetSoftwareByURL(url string) (*Software, error)
- func (clt APIClient) Patch(url string, body []byte) (*http.Response, error)
- func (clt APIClient) PatchSoftware(id string, url string, aliases []string, publiccodeYml string) (*http.Response, error)
- func (clt APIClient) Post(url string, body []byte) (*http.Response, error)
- func (clt APIClient) PostLog(message string) (*http.Response, error)
- func (clt APIClient) PostSoftware(url string, aliases []string, publiccodeYml string, active bool) (*Software, error)
- func (clt 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. In case no software is found and no error occours, (nil, nil) is returned.
func (APIClient) PatchSoftware ¶
func (clt 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.