Documentation
¶
Index ¶
- func IdentityExists(i Identity) bool
- func Init() error
- type ConfigError
- type FatalError
- type GitHub
- type GitHubConfig
- type GitHubIdentity
- type GitHubSAMLMapping
- type Identity
- type LDAP
- type LDAPConfig
- type LDAPIdentity
- type MockIdentity
- type MockService
- type NoneIdentity
- type Service
- type ServiceNotDefined
- type SourceGroupEmptyError
- type Target
- type TargetNotDefined
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IdentityExists ¶
Types ¶
type ConfigError ¶
type ConfigError struct {
// contains filtered or unexported fields
}
func (ConfigError) Error ¶
func (e ConfigError) Error() string
type FatalError ¶
type FatalError struct {
// contains filtered or unexported fields
}
A wrapper used to let upper layers know the error isn't recoverable.
func (FatalError) Error ¶
func (e FatalError) Error() string
type GitHubConfig ¶
type GitHubIdentity ¶
func (GitHubIdentity) String ¶
func (i GitHubIdentity) String() string
type GitHubSAMLMapping ¶
type GitHubSAMLMapping struct {
User struct {
ID string
Name string
Email string
Login string
}
SamlIdentity struct {
NameID string `graphql:"nameId"`
} `graphql:"samlIdentity"`
}
GitHubSAMLMapping represents a mapping of a GitHub identity to a SAML identity.
type Identity ¶
type Identity interface {
String() string
// contains filtered or unexported methods
}
type LDAP ¶
type LDAP struct {
// contains filtered or unexported fields
}
LDAP contains the LDAP config and (once established) the active connection to an LDAP server.
type LDAPConfig ¶
type LDAPConfig struct {
// Connection
Port int32
Server string
SSL bool
SkipVerify bool `mapstructure:"skip_verify"`
// Auth
BindUser string `mapstructure:"bind_user"`
BindPassword string `mapstructure:"bind_password"`
// Schema
UserBaseDN string `mapstructure:"user_base_dn"`
GroupBaseDN string `mapstructure:"group_base_dn"`
UserClass string `mapstructure:"user_class"`
SearchAttribute string `mapstructure:"search_attribute"`
UserIDAttribute string `mapstructure:"user_id_attribute"`
}
LDAPConfig contains all the ino needed to connect to (and authenticate with) an LDAP instance, as well as how to fetch group membership data from the particular scheme used.
type LDAPIdentity ¶
type LDAPIdentity struct {
// contains filtered or unexported fields
}
func (LDAPIdentity) String ¶
func (i LDAPIdentity) String() string
type MockIdentity ¶
type MockIdentity struct {
// contains filtered or unexported fields
}
func (MockIdentity) String ¶
func (i MockIdentity) String() string
type MockService ¶
type MockService struct {
}
func (MockService) AddMembers ¶
func (t MockService) AddMembers(users []User) error
func (MockService) GroupMembers ¶
func (t MockService) GroupMembers(group string) ([]User, error)
func (MockService) RemoveMembers ¶
func (t MockService) RemoveMembers(users []User) error
type NoneIdentity ¶
type NoneIdentity struct{}
func (NoneIdentity) String ¶
func (_ NoneIdentity) String() string
type Service ¶
type Service interface {
// Get the members of group `group` as a slice of User instances.
GroupMembers(group string) ([]User, error)
}
Service represents a service that holds information about groups and group memberships.
func SvcFromString ¶
type ServiceNotDefined ¶
type ServiceNotDefined struct {
// contains filtered or unexported fields
}
func (ServiceNotDefined) Error ¶
func (e ServiceNotDefined) Error() string
type SourceGroupEmptyError ¶
type SourceGroupEmptyError struct {
}
func (SourceGroupEmptyError) Error ¶
func (e SourceGroupEmptyError) Error() string
type Target ¶
type Target interface {
AddMembers(team string, users []User) error
RemoveMembers(team string, users []User) error
// Target implementors should also implement Service.
GroupMembers(group string) ([]User, error)
// contains filtered or unexported methods
}
Target represents a service whose group memberships can be mutated.
func TargetFromString ¶
type TargetNotDefined ¶
type TargetNotDefined struct {
// contains filtered or unexported fields
}
func (TargetNotDefined) Error ¶
func (e TargetNotDefined) Error() string
Click to show internal directories.
Click to hide internal directories.