server

package
v0.0.0-...-1d0deca Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: MIT Imports: 7 Imported by: 0

README

CodeBaseManager/cli - Server

This module is one of the most important as it allows to directly interact with CBM's server

Overview

This section will give a brief overview of each command's capabilities.

Start & Stop

These two commands are pretty self explanatory, so here's a quick exemple of both:

    cbm server start
    cbm server stop
Add & Drop

These two commands allow you to respectively drop or add a repository to CBM's watch-list.

    cbm server add 'path/to/repository'
    cbm server drop 'repository-name'
List

This command will list some information's what CBM's server.

By default, if no arguments are provided, it will display CBM's watch-list (and is currently this only behavior of this command).

    cbm server list

Details

Documentation

Index

Constants

View Source
const (
	OFF         = false
	ON          = true
	BackendDir  = ".cbm/backend/"
	EnvFileName = ".env"
	LocalUrl    = "http://127.0.0.1"
)

Variables

View Source
var Port = ""
View Source
var State = OFF

Functions

func Add

func Add(repoName string)

Add: Check server state and Prepare repository path before calling addNewProject

func Drop

func Drop(repo string)

Drop: Get Repo information and send request to API in order to remove it from API.

func GetApiUrl

func GetApiUrl(urlSuffix string) string

func GetBackendGlobalDirectory

func GetBackendGlobalDirectory() (string, bool)

GetBackendGlobalDirectory: Search global cbm install dir with env.

func GetServerState

func GetServerState() bool

GetServerState: Check if Cbm-api is running with port in global CBM install

func List

func List()

List: Request API to list currently watched repository.

func Start

func Start()

func Stop

func Stop()

Types

This section is empty.

Jump to

Keyboard shortcuts

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