rolodex

package
v42.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(repo TeamRepository) rolodexpb.RolodexServer

func NewTeamRepository

func NewTeamRepository(logger lager.Logger, teamsPath string) *teamRepository

Types

type Repository

type Repository struct {
	Owner string
	Name  string
}

type RolodexConfig

type RolodexConfig struct {
	RepositoryPath string `yaml:"repository_path"`
	RepositoryURL  string `yaml:"repository_url"`

	GitHub struct {
		PrivateKeyPath string `yaml:"private_key_path"`
		PublicKeyPath  string `yaml:"public_key_path"`
	} `yaml:"github"`

	Metrics struct {
		SentryDSN     string `yaml:"sentry_dsn"`
		DatadogAPIKey string `yaml:"datadog_api_key"`
		Environment   string `yaml:"environment"`
	} `yaml:"metrics"`

	RPC struct {
		BindIP   string `yaml:"bind_ip"`
		BindPort uint16 `yaml:"bind_port"`

		CACertificatePath    string `yaml:"ca_certificate_path"`
		CertificatePath      string `yaml:"certificate_path"`
		PrivateKeyPath       string `yaml:"private_key_path"`
		PrivateKeyPassphrase string `yaml:"private_key_passphrase"`
	} `yaml:"rpc_server"`
}

func LoadRolodexConfig

func LoadRolodexConfig(configPath string) (*RolodexConfig, error)

func (*RolodexConfig) Validate

func (c *RolodexConfig) Validate() []error

type SlackChannel

type SlackChannel struct {
	Team string
	Name string
}

type Syncer

type Syncer interface {
	Sync()
}

func NewSyncer

func NewSyncer(logger lager.Logger, repoUrl, repoPath string, gitClient gitclient.Client, teamRepo TeamRepository) Syncer

type Team

type Team struct {
	Name         string
	SlackChannel SlackChannel
}

type TeamRecord

type TeamRecord struct {
	Name         string   `yaml:"name"`
	Repositories []string `yaml:"repositories"`

	Contact struct {
		Slack struct {
			Team    string `yaml:"team"`
			Channel string `yaml:"channel"`
		} `yaml:"slack"`
	} `yaml:"contact"`
}

func (TeamRecord) OwnsRepository

func (t TeamRecord) OwnsRepository(repo Repository) bool

type TeamRepository

type TeamRepository interface {
	GetOwners(Repository) ([]Team, error)

	Reload()
}

Directories

Path Synopsis
cmd
This file was generated by counterfeiter
This file was generated by counterfeiter
Package rolodexpb is a generated protocol buffer package.
Package rolodexpb is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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