githubapi

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

githubapi

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBranch

func GetBranch(ctx context.Context, personalToken, repoName, ownerName string) ([]*github.Branch, error)

func GetCommit

func GetCommit(ctx context.Context, personalToken, repoName, ownerName, sha string) (*github.RepositoryCommit, error)

func ListCommitALL

func ListCommitALL(ctx context.Context, PersonalToken, repoName, ownerName string) ([]*github.RepositoryCommit, error)

func ListRepositoriesOrg

func ListRepositoriesOrg(ctx context.Context, personalToken, OrgName string) (dest []*github.Repository, err error)

func MakeClient

func MakeClient(personalToken string) *github.Client

func UploadFileToRepository

func UploadFileToRepository(val PushRepositories) (response *github.RepositoryContentResponse, err error)

Types

type Commit

type Commit struct {
	Type  string `json:"type"`
	Items struct {
		Title       string `json:"title"`
		Description string `json:"description"`
		Type        string `json:"type"`
		Properties  struct {
			URL         string `json:"url"`
			SHA         string `json:"sha"`
			NodeID      string `json:"node_id"`
			HTMLURL     string `json:"html_url"`
			CommentsURL string `json:"comments_url"`
			Commit      struct {
				URL    string `json:"url"`
				Author struct {
					Name  string `json:"name"`
					Email string `json:"email"`
					Date  string `json:"date"`
				} `json:"author"`
				Committer struct {
					Name  string `json:"name"`
					Email string `json:"email"`
					Date  string `json:"date"`
				} `json:"committer"`
				Message      string `json:"message"`
				CommentCount int    `json:"comment_count"`
				Tree         struct {
					SHA string `json:"sha"`
					URL string `json:"url"`
				} `json:"tree"`
				Verification struct {
					Verified  bool   `json:"verified"`
					Reason    string `json:"reason"`
					Payload   string `json:"payload"`
					Signature string `json:"signature"`
				} `json:"verification"`
			} `json:"commit"`
			Author struct {
				Name              string `json:"name"`
				Email             string `json:"email"`
				Login             string `json:"login"`
				ID                int    `json:"id"`
				NodeID            string `json:"node_id"`
				AvatarURL         string `json:"avatar_url"`
				GravatarID        string `json:"gravatar_id"`
				URL               string `json:"url"`
				HTMLURL           string `json:"html_url"`
				FollowersURL      string `json:"followers_url"`
				FollowingURL      string `json:"following_url"`
				GistsURL          string `json:"gists_url"`
				StarredURL        string `json:"starred_url"`
				SubscriptionsURL  string `json:"subscriptions_url"`
				OrganizationsURL  string `json:"organizations_url"`
				ReposURL          string `json:"repos_url"`
				EventsURL         string `json:"events_url"`
				ReceivedEventsURL string `json:"received_events_url"`
				Type              string `json:"type"`
				SiteAdmin         bool   `json:"site_admin"`
				StarredAt         string `json:"starred_at"`
			} `json:"author"`
			Committer struct {
				Name              string `json:"name"`
				Email             string `json:"email"`
				Login             string `json:"login"`
				ID                int    `json:"id"`
				NodeID            string `json:"node_id"`
				AvatarURL         string `json:"avatar_url"`
				GravatarID        string `json:"gravatar_id"`
				URL               string `json:"url"`
				HTMLURL           string `json:"html_url"`
				FollowersURL      string `json:"followers_url"`
				FollowingURL      string `json:"following_url"`
				GistsURL          string `json:"gists_url"`
				StarredURL        string `json:"starred_url"`
				SubscriptionsURL  string `json:"subscriptions_url"`
				OrganizationsURL  string `json:"organizations_url"`
				ReposURL          string `json:"repos_url"`
				EventsURL         string `json:"events_url"`
				ReceivedEventsURL string `json:"received_events_url"`
				Type              string `json:"type"`
				SiteAdmin         bool   `json:"site_admin"`
				StarredAt         string `json:"starred_at"`
			} `json:"committer"`
			Parents struct {
				Type  string `json:"type"`
				Items struct {
					Sha     string `json:"sha"`
					URL     string `json:"url"`
					HTMLURL string `json:"html_url"`
				} `json:"items"`
			} `json:"parents"`
			Stats struct {
				Type       string `json:"type"`
				Properties struct {
					Additions int `json:"additions"`
					Deletions int `json:"deletions"`
					Total     int `json:"total"`
				} `json:"properties"`
			} `json:"stats"`
			Files struct {
				Type  string `json:"type"`
				Items struct {
					Title       string `json:"title"`
					Description string `json:"description"`
					Type        string `json:"type"`
					Properties  struct {
						SHA              string `json:"sha"`
						Filename         string `json:"filename"`
						Status           string `json:"status"`
						Additions        int    `json:"additions"`
						Deletions        int    `json:"deletions"`
						Changes          int    `json:"changes"`
						BlobURL          string `json:"blob_url"`
						RawURL           string `json:"raw_url"`
						ContentsURL      string `json:"contents_url"`
						Patch            string `json:"patch"`
						PreviousFilename string `json:"previous_filename"`
					} `json:"properties"`
				} `json:"items"`
			} `json:"files"`
		} `json:"items"`
	} `json:"items"`
}

type PushRepositories

type PushRepositories struct {
	Context       context.Context `json:"context"`
	PersonalToken string          `json:"personalToken"`
	Reponame      string          `json:"reponame"`
	OwnerName     string          `json:"ownerName"`
	Path          string          `json:"path"`
	Username      string          `json:"username"`
	Email         string          `json:"email"`
	Message       string          `json:"message"`
	Branch        string          `json:"branch"`
}

type Repositories

type Repositories struct {
	Name     *string `json:"name"`
	FullName *string `json:"full-name"`
	Homepage *string `json:"homepage"`
}

func ListRepositoriesOnlydDetail

func ListRepositoriesOnlydDetail(ctx context.Context, personalToken, OrgName string) (dest []Repositories, err error)

Jump to

Keyboard shortcuts

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