structs

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2017 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GCredentials

type GCredentials struct {
	ClientID        string   `mapstructure:"client_id"`
	ClientSecret    string   `mapstructure:"client_secret"`
	RedirectURLs    []string `mapstructure:"callback_urls"`
	PreferredDomain string   `mapstructre:"preferredDomain"`
}

GCredentials google credentials loaded from yaml config

type GenericOauth added in v0.2.1

type GenericOauth struct {
	ClientID     string   `mapstructure:"client_id"`
	ClientSecret string   `mapstructure:"client_secret"`
	AuthURL      string   `mapstructure:"auth_url"`
	TokenURL     string   `mapstructure:"token_url"`
	RedirectURL  string   `mapstructure:"callback_url  	"`
	Scopes       []string `mapstructure:"scopes"`
	UserInfoURL  string   `mapstructure:"user_info_url"`
	Provider     string   `mapstructure:"provider"`
}

GenericOauth provides endoint for access

type GithubUser added in v0.2.1

type GithubUser struct {
	User
	Picture string `json:"avatar_url"`
}

GithubUser is a retrieved and authentiacted user from Github.

type GoogleUser added in v0.2.1

type GoogleUser struct {
	User
	Sub           string `json:"sub"`
	GivenName     string `json:"given_name"`
	FamilyName    string `json:"family_name"`
	Profile       string `json:"profile"`
	Picture       string `json:"picture"`
	EmailVerified bool   `json:"email_verified"`
	Gender        string `json:"gender"`
	HostDomain    string `json:"hd"`
}

GoogleUser is a retrieved and authentiacted user from Google.

type Site

type Site struct {
	Domain     string `json:"domain"`
	CreatedOn  int64  `json:"createdon"`
	LastUpdate int64  `json:"lastupdate"`
	ID         int    `json:"id",mapstructure:"id"`
}

Site is the basic unit of auth

type Team

type Team struct {
	Name       string   `json:"name",mapstructure:"name"`
	Members    []string `json:"members",mapstructure:"members"` // just the emails
	Sites      []string `json:"sites",mapstructure:"sites"`     // just the domains
	CreatedOn  int64    `json:"createdon",mapstructure:"createdon"`
	LastUpdate int64    `json:"lastupdate",mapstructure:"lastupdate"`
	ID         int      `json:"id",mapstructure:"id"`
}

Team has members and provides acess to sites

type User

type User struct {
	Name       string `json:"name"`
	Email      string `json:"email"`
	CreatedOn  int64  `json:"createdon"`
	LastUpdate int64  `json:"lastupdate"`
	ID         int    `json:"id",mapstructure:"id"`
}

User is inherited.

Jump to

Keyboard shortcuts

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