config

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveToFile

func SaveToFile(config *Config, filename string) error

Types

type Config

type Config struct {
	Organization string          `yaml:"organization"`
	OrgUnits     []OrgUnitConfig `yaml:"org_units,omitempty"`
	Users        []UserConfig    `yaml:"users,omitempty"`
	Groups       []GroupConfig   `yaml:"groups,omitempty"`
}

func LoadFromFile

func LoadFromFile(filename string) (*Config, error)

func (*Config) ValidateGroups added in v0.0.6

func (c *Config) ValidateGroups() []error

func (*Config) ValidateOrgUnits added in v0.0.6

func (c *Config) ValidateOrgUnits() []error

func (*Config) ValidateUsers added in v0.0.6

func (c *Config) ValidateUsers() []error

type EmployeeConfig added in v0.0.4

type EmployeeConfig struct {
	EmployeeID   string `yaml:"employee_ID,omitempty"`
	Department   string `yaml:"department,omitempty"`
	JobTitle     string `yaml:"job_title,omitempty"`
	Type         string `yaml:"type,omitempty"`
	CostCenter   string `yaml:"cost_center,omitempty"`
	ManagerEmail string `yaml:"manager_email,omitempty"`
}

type GroupConfig

type GroupConfig struct {
	Name                 string         `yaml:"name"`
	Email                string         `yaml:"email"`
	Description          string         `yaml:"description,omitempty"`
	WhoCanContactOwner   string         `yaml:"who_can_contact_owner,omitempty"`
	WhoCanViewMembership string         `yaml:"who_can_view_members,omitempty"`
	WhoCanApproveMembers string         `yaml:"who_can_approve_members,omitempty"`
	WhoCanPostMessage    string         `yaml:"who_can_post,omitempty"`
	WhoCanJoin           string         `yaml:"who_can_join,omitempty"`
	AllowExternalMembers bool           `yaml:"allow_external_members"`
	IsArchived           bool           `yaml:"is_archived"`
	Members              []MemberConfig `yaml:"members,omitempty"`
}

type LocationConfig added in v0.0.4

type LocationConfig struct {
	Building     string `yaml:"building,omitempty"`
	Floor        string `yaml:"floor,omitempty"`
	FloorSection string `yaml:"floor_section,omitempty"`
}

type MemberConfig

type MemberConfig struct {
	Email string `yaml:"email"`
	Role  string `yaml:"role,omitempty"`
}

type OrgUnitConfig

type OrgUnitConfig struct {
	Name              string `yaml:"name"`
	Description       string `yaml:"description,omitempty"`
	ParentOrgUnitPath string `yaml:"parent_org_unit_path,omitempty"`
	OrgUnitPath       string `yaml:"org_unit_path,omitempty"`
	BlockInheritance  bool   `yaml:"block_inheritance,omitempty"`
}

type UserConfig

type UserConfig struct {
	FirstName      string         `yaml:"given_name"`
	LastName       string         `yaml:"family_name"`
	PrimaryEmail   string         `yaml:"primary_email"`
	SecondaryEmail string         `yaml:"secondary_email,omitempty"`
	Aliases        []string       `yaml:"aliases,omitempty"`
	Phones         []string       `yaml:"phones,omitempty"`
	RecoveryPhone  string         `yaml:"recovery_phone,omitempty"`
	RecoveryEmail  string         `yaml:"recovery_email,omitempty"`
	OrgUnitPath    string         `yaml:"org_unit_path,omitempty"`
	Licenses       []string       `yaml:"licenses,omitempty"`
	Employee       EmployeeConfig `yaml:"employee_info,omitempty"`
	Location       LocationConfig `yaml:"location,omitempty"`
	Address        string         `yaml:"addresses,omitempty"`
}

Jump to

Keyboard shortcuts

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