org

package
v0.0.747 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Metadata
	Teams   map[string]Team `json:"teams,omitempty"`
	Members []string        `json:"members,omitempty"`
	Admins  []string        `json:"admins,omitempty"`
}

Config declares org metadata as well as its people and teams.

type Metadata

type Metadata struct {
	BillingEmail                 *string              `json:"billing_email,omitempty"`
	Company                      *string              `json:"company,omitempty"`
	Email                        *string              `json:"email,omitempty"`
	Name                         *string              `json:"name,omitempty"`
	Description                  *string              `json:"description,omitempty"`
	Location                     *string              `json:"location,omitempty"`
	HasOrganizationProjects      *bool                `json:"has_organization_projects,omitempty"`
	HasRepositoryProjects        *bool                `json:"has_repository_projects,omitempty"`
	DefaultRepositoryPermission  *RepoPermissionLevel `json:"default_repository_permission,omitempty"`
	MembersCanCreateRepositories *bool                `json:"members_can_create_repositories,omitempty"`
}

Metadata declares metadata about the GitHub org.

See https://developer.github.com/v3/orgs/#edit-an-organization

type Privacy

type Privacy string

Privacy is secret or closed.

See https://developer.github.com/v3/teams/#edit-team

const (
	// Closed means it is only visible to org members
	Closed Privacy = "closed"
	// Secret means it is only visible to team members.
	Secret Privacy = "secret"
)

func (Privacy) MarshalText

func (p Privacy) MarshalText() ([]byte, error)

MarshalText returns bytes that equal secret or closed

func (*Privacy) UnmarshalText

func (p *Privacy) UnmarshalText(text []byte) error

UnmarshalText returns an error if text != secret or closed

type RepoPermissionLevel

type RepoPermissionLevel string

RepoPermissionLevel is admin, write, read or none.

See https://developer.github.com/v3/repos/collaborators/#review-a-users-permission-level

const (
	// Read allows pull but not push
	Read RepoPermissionLevel = "read"
	// Write allows Read plus push
	Write RepoPermissionLevel = "write"
	// Admin allows Write plus change others' rights.
	Admin RepoPermissionLevel = "admin"
	// None disallows everything
	None RepoPermissionLevel = "none"
)

func (RepoPermissionLevel) MarshalText

func (l RepoPermissionLevel) MarshalText() ([]byte, error)

MarshalText returns the byte representation of the permission

func (*RepoPermissionLevel) UnmarshalText

func (l *RepoPermissionLevel) UnmarshalText(text []byte) error

UnmarshalText validates the text is a valid string

type Team

type Team struct {
	TeamMetadata
	Members     []string        `json:"members,omitempty"`
	Maintainers []string        `json:"maintainers,omitempty"`
	Children    map[string]Team `json:"teams,omitempty"`

	Previously []string `json:"previously,omitempty"`
}

Team declares metadata as well as its poeple.

type TeamMetadata

type TeamMetadata struct {
	Description *string  `json:"description,omitempty"`
	Privacy     *Privacy `json:"privacy,omitempty"`
}

TeamMetadata declares metadata about the github team.

See https://developer.github.com/v3/teams/#edit-team

Jump to

Keyboard shortcuts

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