Documentation ¶
Index ¶
- Variables
- func InitModels()
- type Identifier
- type Manager
- func (m *Manager) DeleteForClient(azp string) error
- func (m *Manager) GetByID(iyoid string) (*Identifier, error)
- func (m *Manager) GetByIDAndAZP(iyoid, azp string) (*Identifier, error)
- func (m *Manager) GetByUsernameAndAZP(username, azp string) (*Identifier, error)
- func (m *Manager) UpsertIdentifier(username, azp, iyoid string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrIDLimitReached indicates that the max amount of ids has been reached ErrIDLimitReached = errors.New("Max amount of iyoids reached for this username and azp") )
Functions ¶
Types ¶
type Identifier ¶
type Identifier struct { Username string `json:"username"` IyoIDs []string `json:"iyoids"` Azp string `json:"azp"` // Only this party can see this ID }
Identifier represents the mapping of an ID to a username, with the azp of the party which is authorized to see it
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager represents the database session
func NewManager ¶
NewManager creates and initializes a new Manager
func (*Manager) DeleteForClient ¶
DeleteForClient deletes all iyoids for a client id
func (*Manager) GetByID ¶
func (m *Manager) GetByID(iyoid string) (*Identifier, error)
GetByID returns the full identifier object for this iyoid
func (*Manager) GetByIDAndAZP ¶
func (m *Manager) GetByIDAndAZP(iyoid, azp string) (*Identifier, error)
GetByIDAndAZP gets an Identifier object by IyoID.
func (*Manager) GetByUsernameAndAZP ¶
func (m *Manager) GetByUsernameAndAZP(username, azp string) (*Identifier, error)
GetByUsernameAndAZP returns the Identifier object for this username and azp combo
func (*Manager) UpsertIdentifier ¶
UpsertIdentifier adds a new iyoid to a mapping or creates a new mapping
Click to show internal directories.
Click to hide internal directories.