githubremote

package
v0.0.0-...-0ec24d7 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FirstTag

type FirstTag struct {
	Repository struct {
		Id       string
		Releases struct {
			TotalCount int
			Nodes      []struct {
				Tag struct {
					Name string
				}
				CreatedAt    string
				IsDraft      bool
				IsPrerelease bool
				Url          string
				Description  string
			}
			PageInfo struct {
				HasNextPage bool
				EndCursor   string
			}
		} `graphql:"releases(first: $first)"`
	} `graphql:"repository(owner: $username, name: $name)"`
}

type GitHubProperties

type GitHubProperties struct {
	// UserName is the GitHubs username
	UserName string
	// Security Token to access GitHub
	Token string
	// Your ProjectName
	ProjectName string
	// contains filtered or unexported fields
}

GitHubProperties is the main entry point for the functions

func (*GitHubProperties) GetAllTags

func (gh *GitHubProperties) GetAllTags() (FirstTag, error)

GetAllTags returns all returns all the tags and its details, see FirstTag

func (*GitHubProperties) GetLatestTag

func (gh *GitHubProperties) GetLatestTag() (LatestTag, error)

GetLatestTag returns the latest tag and its details, see LatestTag

func (*GitHubProperties) TotalCount

func (gh *GitHubProperties) TotalCount() (int, error)

TotalCount returns a total number of tags made

func (*GitHubProperties) UserInformation

func (gh *GitHubProperties) UserInformation() (UserInfo, error)

UserInformation returns the current user information based on the token

type LatestTag

type LatestTag struct {
	Repository struct {
		Id       string
		Releases struct {
			TotalCount int
			Nodes      []struct {
				Tag struct {
					Name string
				}
				CreatedAt    string
				IsDraft      bool
				IsPrerelease bool
				Url          string
				Description  string
			}
		} `graphql:"releases(last: $last)"`
	} `graphql:"repository(owner: $username, name: $name)"`
}

type Tags

type Tags struct {
	Repository struct {
		Id       string
		Releases struct {
			TotalCount int
			Nodes      []struct {
				Tag struct {
					Name string
				}
				CreatedAt    string
				IsDraft      bool
				IsPrerelease bool
				Url          string
				Description  string
			}
			PageInfo struct {
				HasNextPage bool
				EndCursor   string
			}
		} `graphql:"releases(first: $first, after: $after)"`
	} `graphql:"repository(owner: $username, name: $name)"`
}

type UserInfo

type UserInfo struct {
	Viewer struct {
		Login string
	}
}

Jump to

Keyboard shortcuts

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