github

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CtxGithubClientInstance

func CtxGithubClientInstance(entry interface{}, ctx context.Context) context.Context

func GetPermission

func GetPermission(queue *pqueue.PriorityQueue, function any, args []any, priority int) (*data.Permission, error)

func GetPermissions

func GetPermissions(queue *pqueue.PriorityQueue, function any, args []any, priority int) ([]data.Permission, error)

func GetRequestError

func GetRequestError(queue *pqueue.PriorityQueue, function any, args []any, priority int) error

func GetString

func GetString(queue *pqueue.PriorityQueue, function any, args []any, priority int) (string, error)

func GetUser

func GetUser(queue *pqueue.PriorityQueue, function any, args []any, priority int) (*data.User, error)

func GetUsers

func GetUsers(queue *pqueue.PriorityQueue, function any, args []any, priority int) ([]data.User, error)

func NewGithubAsInterface

func NewGithubAsInterface(cfg config.Config, _ context.Context) interface{}

Types

type GithubClient

type GithubClient interface {
	AddUserFromApi(typeTo, link, username, permission string) (*data.Permission, error)
	UpdateUserFromApi(typeTo, link, username, permission string) (*data.Permission, error)
	AddOrUpdateUserInRepositoryFromApi(link, username, permission string) (*data.Permission, error)
	AddOrUpdateUserInOrganizationFromApi(link, username, permission string) (*data.Permission, error)

	GetUsersFromApi(link, typeTo string) ([]data.Permission, error)
	GetUserFromApi(username string) (*data.User, error)

	RemoveUserFromApi(link, username, typeTo string) error

	GetOrganizationFromApi(link string) (*data.Sub, error)
	GetRepositoryFromApi(link string) (*data.Sub, error)

	CheckUserFromApi(link, username, typeTo string) (*data.Permission, error)
	CheckRepositoryCollaborator(link, username string) (*data.Permission, error)
	CheckOrganizationCollaborator(link, username string) (*data.Permission, error)

	FindType(link string) (*TypeSub, error)
	FindRepositoryOwner(link string) (string, error)

	SearchByFromApi(username string) ([]data.User, error)
	GetProjectsFromApi(link string) ([]data.Sub, error)
}

func GithubClientInstance

func GithubClientInstance(ctx context.Context) GithubClient

type TypeSub

type TypeSub struct {
	Type string
	Sub  data.Sub
}

func GetPermissionWithType

func GetPermissionWithType(queue *pqueue.PriorityQueue, function any, args []any, priority int) (*TypeSub, error)

Jump to

Keyboard shortcuts

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