Documentation ¶
Index ¶
- Variables
- type Content
- type DefaultProfile
- type Profile
- func (p *Profile) AddRoute(route *Route)
- func (p *Profile) AddRouteUniq(route *Route)
- func (p *Profile) AddRoutes(routes []*Route)
- func (p *Profile) AddRoutesUniq(routes []*Route)
- func (p *Profile) GetAllHostNames() []string
- func (p *Profile) GetHostNames(ip string) ([]string, error)
- func (p *Profile) GetStatus() string
- func (p *Profile) RemoveHostnames(hostnames []string)
- func (p *Profile) Render(w io.StringWriter) error
- func (p *Profile) String() string
- type Renderer
- type Route
- type Row
- type Status
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrMissingProfile when the profile is mandatory ErrMissingProfile = errors.New("missing profile name") // ErrUnknownProfile when the profile is not present ErrUnknownProfile = errors.New("unknown profile name") // ErrDefaultProfile when trying to edit default content ErrDefaultProfile = errors.New("'default' profile should not be handled by hostctl") // ErrNoContent when data to write is empty ErrNoContent = errors.New("no content to write") // ErrNotPresentIP when looking for an IP not contained in profile ErrNotPresentIP = errors.New("ip not present") // ErrUnknownNetworkID when you pass an invalid network ID to sync docker ErrUnknownNetworkID = errors.New("unknown network ID") // ErrInvalidIP when the IP is malformed ErrInvalidIP = errors.New("invalid ip") // ErrInvalidProfileHeader when the profile header is invalid ErrInvalidProfileHeader = errors.New("invalid format for profile header") )
View Source
var ( // DefaultColumns is the list of default columns to use when showing table list DefaultColumns = []string{"profile", "status", "ip", "domain"} // ProfilesOnlyColumns are the columns used for profile status list ProfilesOnlyColumns = []string{"profile", "status"} )
nolint:gochecknoglobals
Functions ¶
This section is empty.
Types ¶
type Content ¶
type Content struct { DefaultProfile DefaultProfile ProfileNames []string Profiles map[string]*Profile }
Content contains complete data of all profiles
type DefaultProfile ¶
type DefaultProfile []*Row
DefaultProfile contains data for the default profile
func (DefaultProfile) Render ¶
func (d DefaultProfile) Render(w io.StringWriter) error
Render writes the default profile content to the given StringWriter
type Profile ¶
Profile contains all data of a single profile
func (*Profile) AddRouteUniq ¶
AddRouteUniq adds a single route to the profile and removes duplicates
func (*Profile) AddRoutesUniq ¶
AddRoutesUniq adds non duplicated routes to a profile
func (*Profile) GetAllHostNames ¶
GetAllHostNames returns all hostnames of the profile.
func (*Profile) GetHostNames ¶
GetHostNames returns a list of all hostnames of the given ip.
func (*Profile) RemoveHostnames ¶
RemoveHostnames removes multiple hostnames of a profile
Click to show internal directories.
Click to hide internal directories.