github

package
v0.0.0-...-e5c8c29 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneRepo

func CloneRepo(URL string) error

func FetchTceRelease

func FetchTceRelease(releaseVersion string, token string) (*shared.Release, error)

TODO: Return a custom Release struct which contains only the list of links to different assets in a release i.e link to download the assets. TODO: Maybe make token optional. We need to pass token for higher privileges - to access draft releases / non-published releases. But we don't need token for fetching published releases that are public

func SetToken

func SetToken(r *http.Request, token string)

SetToken sets the request's Authorization header to use HTTP Token Authentication with the token

Types

type AuthenticatedClient

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

AuthenticatedClient implements the net/http.RoundTripper interface

func NewAuthenticatedClient

func NewAuthenticatedClient(token string) (*AuthenticatedClient, error)

func (*AuthenticatedClient) RoundTrip

func (c *AuthenticatedClient) RoundTrip(req *http.Request) (*http.Response, error)

type BaseRepo

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

func (BaseRepo) RepoHost

func (baseRepo BaseRepo) RepoHost() string

func (BaseRepo) RepoName

func (baseRepo BaseRepo) RepoName() string

func (BaseRepo) RepoOwner

func (baseRepo BaseRepo) RepoOwner() string

Jump to

Keyboard shortcuts

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