affiliation

package
v0.0.0-...-b175f30 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBConnector

type DBConnector interface {
	Get(dest interface{}, query string, args ...interface{}) error
	Select(dest interface{}, query string, args ...interface{}) error
}

DBConnector contains dataAccess functionalities

type Identity

type Identity struct {
	ID            sql.NullString
	UUID          sql.NullString
	Name          sql.NullString
	Username      sql.NullString
	Email         sql.NullString
	Domain        sql.NullString
	Gender        sql.NullString
	GenderACC     *int `db:"gender_acc"`
	OrgName       sql.NullString
	IsBot         bool `db:"is_bot"`
	MultiOrgNames []string
}

Identity contains sortingHat user Identity

type IdentityProvider

type IdentityProvider struct {
	// contains filtered or unexported fields
}

IdentityProvider manages user identities

func NewIdentityProvider

func NewIdentityProvider(db DBConnector) *IdentityProvider

NewIdentityProvider initiates a new IdentityProvider instance

func (*IdentityProvider) GetIdentity

func (i *IdentityProvider) GetIdentity(key string, val string) (*Identity, error)

GetIdentity ...

func (*IdentityProvider) GetOrganizations

func (i *IdentityProvider) GetOrganizations(uuid string, date time.Time) ([]string, error)

GetOrganizations gets user's enrolled organizations until given time

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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