common

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	CreateRepository(name string, description string, private bool) (Repository, error)
	GetByID(id string) (Repository, error)
	GetByName(owner, name string) (Repository, error)
	ListRepositories() ([]Repository, error)
	ReadConfig(owner, repo string) (*ProjectConfig, error)

	// Used to extract the inner github client
	GithubTODO() (*github.Client, error)
}

Client is the interface for the git client

type ProjectConfig

type ProjectConfig struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	Description  string `json:"description"`
	Notification struct {
		Email string `json:"email"`
	} `json:"notification"`
}

ProjectConfig is read from the config.yaml file in the configuration repository

type Repository

type Repository interface {
	Get() RepositoryGetter

	// Used to extract the inner github.Repository type
	// Note: this is a temporary solution, if you need to use this function
	// you should submit a PR to add the function to the interface
	GithubTODO() (*github.Repository, error)
}

Repository is the interface for the git repository

type RepositoryGetter

type RepositoryGetter interface {
	ID() string
	Name() string
	Fullname() string
	Private() bool
}

RepositoryGetter is an interface for getting information about a repository

Jump to

Keyboard shortcuts

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