commits

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package commits provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.

Index

Constants

View Source
const ServerURLHTTPSCommitsEcosysteMsAPIV1 = "https://commits.ecosyste.ms/api/v1"

ServerURLHTTPSCommitsEcosysteMsAPIV1 defines the Server URL for https://commits.ecosyste.ms/api/v1

Variables

This section is empty.

Functions

func NewGetHostCommitterRequest

func NewGetHostCommitterRequest(server string, hostName string, login string) (*http.Request, error)

NewGetHostCommitterRequest constructs an http.Request for the GetHostCommitter method

func NewGetHostRepositoriesRequest

func NewGetHostRepositoriesRequest(server string, hostName string, params *GetHostRepositoriesParams) (*http.Request, error)

NewGetHostRepositoriesRequest constructs an http.Request for the GetHostRepositories method

func NewGetHostRepositoryRequest

func NewGetHostRepositoryRequest(server string, hostName string, repoName string) (*http.Request, error)

NewGetHostRepositoryRequest constructs an http.Request for the GetHostRepository method

func NewGetHostRequest

func NewGetHostRequest(server string, hostName string, params *GetHostParams) (*http.Request, error)

NewGetHostRequest constructs an http.Request for the GetHost method

func NewGetHostsRequest added in v0.4.0

func NewGetHostsRequest(server string, params *GetHostsParams) (*http.Request, error)

NewGetHostsRequest constructs an http.Request for the GetHosts method

func NewGetRepositoryCommitsRequest

func NewGetRepositoryCommitsRequest(server string, hostName string, repoName string, params *GetRepositoryCommitsParams) (*http.Request, error)

NewGetRepositoryCommitsRequest constructs an http.Request for the GetRepositoryCommits method

func NewRepositoriesLookupRequest

func NewRepositoriesLookupRequest(server string, params *RepositoriesLookupParams) (*http.Request, error)

NewRepositoriesLookupRequest constructs an http.Request for the RepositoriesLookup method

Types

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) GetHost

func (c *Client) GetHost(ctx context.Context, hostName string, params *GetHostParams, reqEditors ...RequestEditorFn) (*http.Response, error)

GetHost get a host by name

Corresponds with GET /hosts/{hostName} (the `GetHost` operationId).

func (*Client) GetHostCommitter

func (c *Client) GetHostCommitter(ctx context.Context, hostName string, login string, reqEditors ...RequestEditorFn) (*http.Response, error)

GetHostCommitter get a committer from a host

Corresponds with GET /hosts/{hostName}/committers/{login} (the `GetHostCommitter` operationId).

func (*Client) GetHostRepositories

func (c *Client) GetHostRepositories(ctx context.Context, hostName string, params *GetHostRepositoriesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

GetHostRepositories get a list of repositories from a host

Corresponds with GET /hosts/{hostName}/repositories (the `GetHostRepositories` operationId).

func (*Client) GetHostRepository

func (c *Client) GetHostRepository(ctx context.Context, hostName string, repoName string, reqEditors ...RequestEditorFn) (*http.Response, error)

GetHostRepository get a repository from a host

Corresponds with GET /hosts/{hostName}/repositories/{repoName} (the `GetHostRepository` operationId).

func (*Client) GetHosts added in v0.4.0

func (c *Client) GetHosts(ctx context.Context, params *GetHostsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

GetHosts list hosts

Corresponds with GET /hosts (the `GetHosts` operationId).

func (*Client) GetRepositoryCommits

func (c *Client) GetRepositoryCommits(ctx context.Context, hostName string, repoName string, params *GetRepositoryCommitsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

GetRepositoryCommits get a list of commits from a repository

Corresponds with GET /hosts/{hostName}/repositories/{repoName}/commits (the `GetRepositoryCommits` operationId).

func (*Client) RepositoriesLookup

func (c *Client) RepositoriesLookup(ctx context.Context, params *RepositoriesLookupParams, reqEditors ...RequestEditorFn) (*http.Response, error)

RepositoriesLookup Lookup repository metadata

Corresponds with GET /repositories/lookup (the `RepositoriesLookup` operationId).

type ClientInterface

type ClientInterface interface {

	// GetHosts list hosts
	//
	// Corresponds with GET /hosts (the `GetHosts` operationId).
	GetHosts(ctx context.Context, params *GetHostsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetHost get a host by name
	//
	// Corresponds with GET /hosts/{hostName} (the `GetHost` operationId).
	GetHost(ctx context.Context, hostName string, params *GetHostParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetHostCommitter get a committer from a host
	//
	// Corresponds with GET /hosts/{hostName}/committers/{login} (the `GetHostCommitter` operationId).
	GetHostCommitter(ctx context.Context, hostName string, login string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetHostRepositories get a list of repositories from a host
	//
	// Corresponds with GET /hosts/{hostName}/repositories (the `GetHostRepositories` operationId).
	GetHostRepositories(ctx context.Context, hostName string, params *GetHostRepositoriesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetHostRepository get a repository from a host
	//
	// Corresponds with GET /hosts/{hostName}/repositories/{repoName} (the `GetHostRepository` operationId).
	GetHostRepository(ctx context.Context, hostName string, repoName string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetRepositoryCommits get a list of commits from a repository
	//
	// Corresponds with GET /hosts/{hostName}/repositories/{repoName}/commits (the `GetRepositoryCommits` operationId).
	GetRepositoryCommits(ctx context.Context, hostName string, repoName string, params *GetRepositoryCommitsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RepositoriesLookup Lookup repository metadata
	//
	// Corresponds with GET /repositories/lookup (the `RepositoriesLookup` operationId).
	RepositoriesLookup(ctx context.Context, params *RepositoriesLookupParams, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) GetHostCommitterWithResponse

func (c *ClientWithResponses) GetHostCommitterWithResponse(ctx context.Context, hostName string, login string, reqEditors ...RequestEditorFn) (*GetHostCommitterResponse, error)

GetHostCommitterWithResponse get a committer from a host

Returns a wrapper object for the known response body format(s).

Corresponds with GET /hosts/{hostName}/committers/{login} (the `GetHostCommitter` operationId).

func (*ClientWithResponses) GetHostRepositoriesWithResponse

func (c *ClientWithResponses) GetHostRepositoriesWithResponse(ctx context.Context, hostName string, params *GetHostRepositoriesParams, reqEditors ...RequestEditorFn) (*GetHostRepositoriesResponse, error)

GetHostRepositoriesWithResponse get a list of repositories from a host

Returns a wrapper object for the known response body format(s).

Corresponds with GET /hosts/{hostName}/repositories (the `GetHostRepositories` operationId).

func (*ClientWithResponses) GetHostRepositoryWithResponse

func (c *ClientWithResponses) GetHostRepositoryWithResponse(ctx context.Context, hostName string, repoName string, reqEditors ...RequestEditorFn) (*GetHostRepositoryResponse, error)

GetHostRepositoryWithResponse get a repository from a host

Returns a wrapper object for the known response body format(s).

Corresponds with GET /hosts/{hostName}/repositories/{repoName} (the `GetHostRepository` operationId).

func (*ClientWithResponses) GetHostWithResponse

func (c *ClientWithResponses) GetHostWithResponse(ctx context.Context, hostName string, params *GetHostParams, reqEditors ...RequestEditorFn) (*GetHostResponse, error)

GetHostWithResponse get a host by name

Returns a wrapper object for the known response body format(s).

Corresponds with GET /hosts/{hostName} (the `GetHost` operationId).

func (*ClientWithResponses) GetHostsWithResponse added in v0.4.0

func (c *ClientWithResponses) GetHostsWithResponse(ctx context.Context, params *GetHostsParams, reqEditors ...RequestEditorFn) (*GetHostsResponse, error)

GetHostsWithResponse list hosts

Returns a wrapper object for the known response body format(s).

Corresponds with GET /hosts (the `GetHosts` operationId).

func (*ClientWithResponses) GetRepositoryCommitsWithResponse

func (c *ClientWithResponses) GetRepositoryCommitsWithResponse(ctx context.Context, hostName string, repoName string, params *GetRepositoryCommitsParams, reqEditors ...RequestEditorFn) (*GetRepositoryCommitsResponse, error)

GetRepositoryCommitsWithResponse get a list of commits from a repository

Returns a wrapper object for the known response body format(s).

Corresponds with GET /hosts/{hostName}/repositories/{repoName}/commits (the `GetRepositoryCommits` operationId).

func (*ClientWithResponses) RepositoriesLookupWithResponse

func (c *ClientWithResponses) RepositoriesLookupWithResponse(ctx context.Context, params *RepositoriesLookupParams, reqEditors ...RequestEditorFn) (*RepositoriesLookupResponse, error)

RepositoriesLookupWithResponse Lookup repository metadata

Returns a wrapper object for the known response body format(s).

Corresponds with GET /repositories/lookup (the `RepositoriesLookup` operationId).

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {

	// GetHostsWithResponse list hosts
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /hosts (the `GetHosts` operationId).
	GetHostsWithResponse(ctx context.Context, params *GetHostsParams, reqEditors ...RequestEditorFn) (*GetHostsResponse, error)

	// GetHostWithResponse get a host by name
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /hosts/{hostName} (the `GetHost` operationId).
	GetHostWithResponse(ctx context.Context, hostName string, params *GetHostParams, reqEditors ...RequestEditorFn) (*GetHostResponse, error)

	// GetHostCommitterWithResponse get a committer from a host
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /hosts/{hostName}/committers/{login} (the `GetHostCommitter` operationId).
	GetHostCommitterWithResponse(ctx context.Context, hostName string, login string, reqEditors ...RequestEditorFn) (*GetHostCommitterResponse, error)

	// GetHostRepositoriesWithResponse get a list of repositories from a host
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /hosts/{hostName}/repositories (the `GetHostRepositories` operationId).
	GetHostRepositoriesWithResponse(ctx context.Context, hostName string, params *GetHostRepositoriesParams, reqEditors ...RequestEditorFn) (*GetHostRepositoriesResponse, error)

	// GetHostRepositoryWithResponse get a repository from a host
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /hosts/{hostName}/repositories/{repoName} (the `GetHostRepository` operationId).
	GetHostRepositoryWithResponse(ctx context.Context, hostName string, repoName string, reqEditors ...RequestEditorFn) (*GetHostRepositoryResponse, error)

	// GetRepositoryCommitsWithResponse get a list of commits from a repository
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /hosts/{hostName}/repositories/{repoName}/commits (the `GetRepositoryCommits` operationId).
	GetRepositoryCommitsWithResponse(ctx context.Context, hostName string, repoName string, params *GetRepositoryCommitsParams, reqEditors ...RequestEditorFn) (*GetRepositoryCommitsResponse, error)

	// RepositoriesLookupWithResponse Lookup repository metadata
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /repositories/lookup (the `RepositoriesLookup` operationId).
	RepositoriesLookupWithResponse(ctx context.Context, params *RepositoriesLookupParams, reqEditors ...RequestEditorFn) (*RepositoriesLookupResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type Commit

type Commit struct {
	Author    *string    `json:"author,omitempty"`
	Committer *string    `json:"committer,omitempty"`
	HTMLURL   *string    `json:"html_url,omitempty"`
	Merge     *bool      `json:"merge,omitempty"`
	Message   *string    `json:"message,omitempty"`
	Sha       *string    `json:"sha,omitempty"`
	Timestamp *time.Time `json:"timestamp,omitempty"`
}

Commit defines model for Commit.

type Committer

type Committer struct {
	CommitsCount      *int                     `json:"commits_count,omitempty"`
	CreatedAt         *time.Time               `json:"created_at,omitempty"`
	Emails            []string                 `json:"emails,omitempty"`
	ID                *int                     `json:"id,omitempty"`
	Login             *string                  `json:"login,omitempty"`
	Repositories      []Committer_Repositories `json:"repositories,omitempty"`
	RepositoriesCount *int                     `json:"repositories_count,omitempty"`
	UpdatedAt         *time.Time               `json:"updated_at,omitempty"`
}

Committer defines model for Committer.

type Committer_Repositories added in v0.4.0

type Committer_Repositories struct {
	CommitCount *int    `json:"commit_count,omitempty"`
	FullName    *string `json:"full_name,omitempty"`
	ID          *int    `json:"id,omitempty"`
}

Committer_Repositories defines model for Committer.Repositories.

type GetHostCommitterResponse

type GetHostCommitterResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Committer
}

func ParseGetHostCommitterResponse

func ParseGetHostCommitterResponse(rsp *http.Response) (*GetHostCommitterResponse, error)

ParseGetHostCommitterResponse parses an HTTP response from a GetHostCommitterWithResponse call

func (GetHostCommitterResponse) ContentType added in v0.4.0

func (r GetHostCommitterResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetHostCommitterResponse) Status

func (r GetHostCommitterResponse) Status() string

Status returns HTTPResponse.Status

func (GetHostCommitterResponse) StatusCode

func (r GetHostCommitterResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetHostParams

type GetHostParams struct {
	// Page pagination page number
	Page *int `form:"page,omitempty" json:"page,omitempty"`

	// PerPage Number of records to return
	PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"`
}

GetHostParams defines parameters for GetHost.

type GetHostRepositoriesParams

type GetHostRepositoriesParams struct {
	// Page pagination page number
	Page *int `form:"page,omitempty" json:"page,omitempty"`

	// PerPage Number of records to return
	PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"`

	// CreatedAfter filter by created_at after given time
	CreatedAfter *time.Time `form:"created_after,omitempty" json:"created_after,omitempty"`

	// UpdatedAfter filter by updated_at after given time
	UpdatedAfter *time.Time `form:"updated_after,omitempty" json:"updated_after,omitempty"`

	// Sort field to order results by
	Sort *string `form:"sort,omitempty" json:"sort,omitempty"`

	// Order direction to order results by
	Order *string `form:"order,omitempty" json:"order,omitempty"`
}

GetHostRepositoriesParams defines parameters for GetHostRepositories.

type GetHostRepositoriesResponse

type GetHostRepositoriesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *[]Repository
}

func ParseGetHostRepositoriesResponse

func ParseGetHostRepositoriesResponse(rsp *http.Response) (*GetHostRepositoriesResponse, error)

ParseGetHostRepositoriesResponse parses an HTTP response from a GetHostRepositoriesWithResponse call

func (GetHostRepositoriesResponse) ContentType added in v0.4.0

func (r GetHostRepositoriesResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetHostRepositoriesResponse) Status

Status returns HTTPResponse.Status

func (GetHostRepositoriesResponse) StatusCode

func (r GetHostRepositoriesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetHostRepositoryResponse

type GetHostRepositoryResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Repository
}

func ParseGetHostRepositoryResponse

func ParseGetHostRepositoryResponse(rsp *http.Response) (*GetHostRepositoryResponse, error)

ParseGetHostRepositoryResponse parses an HTTP response from a GetHostRepositoryWithResponse call

func (GetHostRepositoryResponse) ContentType added in v0.4.0

func (r GetHostRepositoryResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetHostRepositoryResponse) Status

func (r GetHostRepositoryResponse) Status() string

Status returns HTTPResponse.Status

func (GetHostRepositoryResponse) StatusCode

func (r GetHostRepositoryResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetHostResponse

type GetHostResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Host
}

func ParseGetHostResponse

func ParseGetHostResponse(rsp *http.Response) (*GetHostResponse, error)

ParseGetHostResponse parses an HTTP response from a GetHostWithResponse call

func (GetHostResponse) ContentType added in v0.4.0

func (r GetHostResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetHostResponse) Status

func (r GetHostResponse) Status() string

Status returns HTTPResponse.Status

func (GetHostResponse) StatusCode

func (r GetHostResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetHostsParams added in v0.4.0

type GetHostsParams struct {
	// Page pagination page number
	Page *int `form:"page,omitempty" json:"page,omitempty"`

	// PerPage Number of records to return
	PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"`
}

GetHostsParams defines parameters for GetHosts.

type GetHostsResponse added in v0.4.0

type GetHostsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *[]Host
}

func ParseGetHostsResponse added in v0.4.0

func ParseGetHostsResponse(rsp *http.Response) (*GetHostsResponse, error)

ParseGetHostsResponse parses an HTTP response from a GetHostsWithResponse call

func (GetHostsResponse) ContentType added in v0.4.0

func (r GetHostsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetHostsResponse) Status added in v0.4.0

func (r GetHostsResponse) Status() string

Status returns HTTPResponse.Status

func (GetHostsResponse) StatusCode added in v0.4.0

func (r GetHostsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetRepositoryCommitsParams

type GetRepositoryCommitsParams struct {
	// Page pagination page number
	Page *int `form:"page,omitempty" json:"page,omitempty"`

	// PerPage Number of records to return
	PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"`

	// Since filter by commits since given time
	Since *time.Time `form:"since,omitempty" json:"since,omitempty"`

	// Until filter by commits until given time
	Until *time.Time `form:"until,omitempty" json:"until,omitempty"`

	// Sort field to order results by
	Sort *string `form:"sort,omitempty" json:"sort,omitempty"`

	// Order direction to order results by
	Order *string `form:"order,omitempty" json:"order,omitempty"`
}

GetRepositoryCommitsParams defines parameters for GetRepositoryCommits.

type GetRepositoryCommitsResponse

type GetRepositoryCommitsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *[]Commit
}

func ParseGetRepositoryCommitsResponse

func ParseGetRepositoryCommitsResponse(rsp *http.Response) (*GetRepositoryCommitsResponse, error)

ParseGetRepositoryCommitsResponse parses an HTTP response from a GetRepositoryCommitsWithResponse call

func (GetRepositoryCommitsResponse) ContentType added in v0.4.0

func (r GetRepositoryCommitsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetRepositoryCommitsResponse) Status

Status returns HTTPResponse.Status

func (GetRepositoryCommitsResponse) StatusCode

func (r GetRepositoryCommitsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Host

type Host struct {
	CommitsCount      *int       `json:"commits_count,omitempty"`
	ContributorsCount *int       `json:"contributors_count,omitempty"`
	IconURL           *string    `json:"icon_url,omitempty"`
	Kind              *string    `json:"kind,omitempty"`
	LastSyncedAt      *time.Time `json:"last_synced_at,omitempty"`
	Name              *string    `json:"name,omitempty"`
	OwnersCount       *int       `json:"owners_count,omitempty"`
	RepositoriesCount *int       `json:"repositories_count,omitempty"`
	URL               *string    `json:"url,omitempty"`
}

Host defines model for Host.

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type RepositoriesLookupParams

type RepositoriesLookupParams struct {
	// URL The URL of the repository to lookup
	URL string `form:"url" json:"url"`
}

RepositoriesLookupParams defines parameters for RepositoriesLookup.

type RepositoriesLookupResponse

type RepositoriesLookupResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Repository
}

func ParseRepositoriesLookupResponse

func ParseRepositoriesLookupResponse(rsp *http.Response) (*RepositoriesLookupResponse, error)

ParseRepositoriesLookupResponse parses an HTTP response from a RepositoriesLookupWithResponse call

func (RepositoriesLookupResponse) ContentType added in v0.4.0

func (r RepositoriesLookupResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (RepositoriesLookupResponse) Status

Status returns HTTPResponse.Status

func (RepositoriesLookupResponse) StatusCode

func (r RepositoriesLookupResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Repository

type Repository struct {
	CommitsURL                 *string                  `json:"commits_url,omitempty"`
	Committers                 []map[string]interface{} `json:"committers,omitempty"`
	CreatedAt                  *time.Time               `json:"created_at,omitempty"`
	Dds                        *float32                 `json:"dds,omitempty"`
	DefaultBranch              *string                  `json:"default_branch,omitempty"`
	FullName                   *string                  `json:"full_name,omitempty"`
	ID                         *int                     `json:"id,omitempty"`
	LastSyncedAt               *time.Time               `json:"last_synced_at,omitempty"`
	LastSyncedCommit           *string                  `json:"last_synced_commit,omitempty"`
	MeanCommits                *float32                 `json:"mean_commits,omitempty"`
	PastYearCommitters         []map[string]interface{} `json:"past_year_committers,omitempty"`
	PastYearDds                *float32                 `json:"past_year_dds,omitempty"`
	PastYearMeanCommits        *float32                 `json:"past_year_mean_commits,omitempty"`
	PastYearTotalBotCommits    *int                     `json:"past_year_total_bot_commits,omitempty"`
	PastYearTotalBotCommitters *int                     `json:"past_year_total_bot_committers,omitempty"`
	PastYearTotalCommits       *int                     `json:"past_year_total_commits,omitempty"`
	PastYearTotalCommitters    *int                     `json:"past_year_total_committers,omitempty"`
	TotalBotCommits            *int                     `json:"total_bot_commits,omitempty"`
	TotalBotCommitters         *int                     `json:"total_bot_committers,omitempty"`
	TotalCommits               *int                     `json:"total_commits,omitempty"`
	TotalCommitters            *int                     `json:"total_committers,omitempty"`
	UpdatedAt                  *time.Time               `json:"updated_at,omitempty"`
}

Repository defines model for Repository.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

Jump to

Keyboard shortcuts

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