projectLib

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanGitURL

func CleanGitURL(apiURL string) string

func ConfirmSelectedProject

func ConfirmSelectedProject() error

func CreateRepository

func CreateRepository(client *client.Client, name, description string, private bool) (id string, err error)

func Description

func Description(p *client.Project) string

func Deselect

func Deselect(ctx *cli.Context, name string) error

func List

func List() ([]string, error)

func ListResources

func ListResources() ([]*client.Project, error)

func New

func New(p *Project, location string, embedToken bool) error

New creates a new project. It creates the config and code repositories and registers them with the auth server. It then creates a project on the auth server and sets the current project to the new project. After that it will clone the project then push the id, description, and email to the config.yaml file.

Args:

ctx: The cli context
p: The project to create
location: The location to clone the project to. If not specified, it
	clones to the current directory.
embedToken: Whether to embed the auth token in the git config

func Select

func Select(ctx *cli.Context, name string) error

func SelectedProjectConfig

func SelectedProjectConfig() (configProject config.Project, err error)

func SelectedProjectInterface

func SelectedProjectInterface() (project.Project, error)

Types

type Project

type Project struct {
	Id          string
	Name        string
	Description string
	Public      bool
}

type ProjectRepository

type ProjectRepository interface {
	Config() (*git.Repository, error)
	Code() (*git.Repository, error)
	CurrentBranch() (string, error)
}

type RepositoryHandler

type RepositoryHandler interface {
	Open() (ProjectRepository, error)
	Clone(tauProject config.Project, embedToken bool) (ProjectRepository, error)
}

func Repository

func Repository(projectName string) RepositoryHandler

Jump to

Keyboard shortcuts

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