githosting

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GITHUB = "github"
	GITLAB = "gitlab"
	GITEA  = "gitea"
)
View Source
const (
	AuthorizationPrefixKey = "Bearer"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Type  string
	Url   string
	Token string
}

type Gitea

type Gitea struct {
	Config Config
	Client restc.Interface
}

func (*Gitea) GetUserInfo

func (g *Gitea) GetUserInfo() (*UserInfo, error)

type Github

type Github struct {
	Config Config
	Client restc.Interface
}

func (*Github) GetUserInfo

func (g *Github) GetUserInfo() (*UserInfo, error)

type Gitlab

type Gitlab struct {
	Config Config
	Client restc.Interface
}

func (*Gitlab) GetUserInfo

func (g *Gitlab) GetUserInfo() (*UserInfo, error)

type Interface

type Interface interface {
	GetUserInfo() (*UserInfo, error)
}

func New

func New(config Config) (Interface, error)

type UserInfo

type UserInfo struct {
	Username string
	Email    string
}

Jump to

Keyboard shortcuts

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