Documentation ¶
Index ¶
- Constants
- Variables
- func AddPool(opts AddPoolOptions) error
- func AddTeamsToPool(poolName string, teams []string) error
- func AppendPoolConstraint(c *PoolConstraint) error
- func GetProvisionerForPool(name string) (provision.Provisioner, error)
- func MigratePoolTeamsToPoolConstraints() error
- func PoolUpdate(name string, opts UpdatePoolOptions) error
- func RemovePool(poolName string) error
- func RemoveTeamsFromPool(poolName string, teams []string) error
- func RenamePoolTeam(oldName, newName string) error
- func ResetCache()
- func SetPoolConstraint(c *PoolConstraint) error
- func ToConstraintType(value string) (poolConstraintType, error)
- type AddPoolOptions
- type Pool
- func GetDefaultPool() (*Pool, error)
- func GetPoolByName(name string) (*Pool, error)
- func ListAllPools() ([]Pool, error)
- func ListPools(names ...string) ([]Pool, error)
- func ListPoolsForTeam(team string) ([]Pool, error)
- func ListPossiblePools(teams []string) ([]Pool, error)
- func ListPublicPools() ([]Pool, error)
- func (p *Pool) GetDefaultRouter() (string, error)
- func (p *Pool) GetProvisioner() (provision.Provisioner, error)
- func (p *Pool) GetRouters() ([]string, error)
- func (p *Pool) GetServices() ([]string, error)
- func (p *Pool) GetTeams() ([]string, error)
- func (p *Pool) MarshalJSON() ([]byte, error)
- func (p *Pool) ValidateRouters(routers []appTypes.AppRouter) error
- type PoolConstraint
- type UpdatePoolOptions
Constants ¶
View Source
const ( ConstraintTypeTeam = poolConstraintType("team") ConstraintTypeRouter = poolConstraintType("router") ConstraintTypeService = poolConstraintType("service") )
Variables ¶
View Source
var ( ErrPublicDefaultPoolCantHaveTeams = errors.New("Public/Default pool can't have teams.") ErrDefaultPoolAlreadyExists = errors.New("Default pool already exists.") ErrPoolNameIsRequired = errors.New("Pool name is required.") ErrPoolNotFound = errors.New("Pool does not exist.") ErrPoolAlreadyExists = errors.New("Pool already exists.") ErrPoolHasNoTeam = errors.New("no team found for pool") ErrPoolHasNoRouter = errors.New("no router found for pool") ErrPoolHasNoService = errors.New("no service found for pool") )
View Source
var (
ErrInvalidConstraintType = errors.Errorf("invalid constraint type. Valid types are: %s", validConstraintTypes)
)
Functions ¶
func AddPool ¶
func AddPool(opts AddPoolOptions) error
func AddTeamsToPool ¶
func AppendPoolConstraint ¶
func AppendPoolConstraint(c *PoolConstraint) error
func GetProvisionerForPool ¶
func GetProvisionerForPool(name string) (provision.Provisioner, error)
func MigratePoolTeamsToPoolConstraints ¶
func MigratePoolTeamsToPoolConstraints() error
func PoolUpdate ¶
func PoolUpdate(name string, opts UpdatePoolOptions) error
func RemovePool ¶
func RemoveTeamsFromPool ¶
func RenamePoolTeam ¶
func ResetCache ¶
func ResetCache()
func SetPoolConstraint ¶
func SetPoolConstraint(c *PoolConstraint) error
func ToConstraintType ¶
Types ¶
type AddPoolOptions ¶
type Pool ¶
func GetDefaultPool ¶
func GetPoolByName ¶
GetPoolByName finds a pool by name
func ListAllPools ¶
func ListPoolsForTeam ¶
func ListPossiblePools ¶
func ListPublicPools ¶
func (*Pool) GetDefaultRouter ¶
func (*Pool) GetProvisioner ¶
func (p *Pool) GetProvisioner() (provision.Provisioner, error)
func (*Pool) GetRouters ¶
func (*Pool) GetServices ¶
func (*Pool) MarshalJSON ¶
type PoolConstraint ¶
type PoolConstraint struct { PoolExpr string Field poolConstraintType Values []string Blacklist bool }
func ListPoolsConstraints ¶
func ListPoolsConstraints(query bson.M) ([]*PoolConstraint, error)
func (*PoolConstraint) AllowsAll ¶
func (c *PoolConstraint) AllowsAll() bool
type UpdatePoolOptions ¶
Click to show internal directories.
Click to hide internal directories.