cdb

package
v0.0.0-...-7b3a301 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommitSites

func CommitSites(opts *CommitSitesOptions) error

func GetWorktree

func GetWorktree() (*git.Worktree, error)

Types

type CommitSitesOptions

type CommitSitesOptions struct {
	// A site of site Ids for which to commit changes.  If not supplied,
	// then all sites with changes will be committeed
	Ids map[int]bool
	// A short message snippet which will be embedded in the commit message
	// (e.g. "Update admins")
	Message string
	// The name of the command that is being run (e.g. "sync")
	Cmd string
	// If set perform dry run only
	DryRun bool
	// If set force the tree to be updated when dry run is also set
	ForceUpdateTree bool
	// If set commit but don't push to origin
	NoPush bool
}

type Site

type Site struct {
	Id             int
	FullName       string `yaml:"full-name"`
	Email          string
	DisplayEmail   string `yaml:"display-email,omitempty"`
	Admins         []string
	ImmortalAdmins []string `yaml:"immortal-admins,omitempty"`
	Expiry         string
	Paths          []string
	Domains        []interface{} `yaml:"domains,omitempty"`
	Disabled       bool          `yaml:"disabled,omitempty"`
	DisabledReason string        `yaml:"disabled_reason,omitempty"`
	Php            interface{}   `yaml:"php,omitempty"`
	Passenger      bool          `yaml:"passenger,omitempty"`
	Subpaths       bool          `yaml:"subpaths,omitempty"`
	// contains filtered or unexported fields
}

func GetAllSites

func GetAllSites() ([]*Site, error)

func GetSiteById

func GetSiteById(id int) (*Site, error)

func GetSiteByName

func GetSiteByName(name string) (*Site, error)

func LoadSite

func LoadSite(siteFileName string) (*Site, error)

func NewSite

func NewSite() *Site

func (*Site) AddAdmin

func (s *Site) AddAdmin(username string)

func (*Site) Changed

func (s *Site) Changed() bool

func (*Site) FileName

func (s *Site) FileName() string

func (*Site) FileNameRepo

func (s *Site) FileNameRepo() string

func (*Site) MarkAsChanged

func (s *Site) MarkAsChanged()

func (*Site) Name

func (s *Site) Name() string

func (*Site) RemoveAdmin

func (s *Site) RemoveAdmin(username string)

func (*Site) Save

func (s *Site) Save() error

Jump to

Keyboard shortcuts

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