Documentation ¶
Index ¶
- func Context(ctx ...context.Context) (Ctx context.Context)
- type App
- func (this *App) AddScope(s ...string)
- func (this App) FindDomain(tok *oauth2.Token, ctx ...context.Context) (domain string, err error)
- func (this *App) FindScopes(r *http.Request) (scopes []string, err error)
- func (this *App) Handler() http.Handler
- func (this *App) LoadCredentials(b []byte) (err error)
- func (this App) LoadDomain(authCode string, ctx ...context.Context) (domain string, tok *oauth2.Token, err error)
- func (this *App) RegisterHandler(w http.ResponseWriter, r *http.Request)
- func (this *App) RegisterRequest(w http.ResponseWriter, r *http.Request, domain string)
- func (this *App) RegisterRequestHandler(w http.ResponseWriter, r *http.Request)
- func (this *App) ScopeAppender(f ...ScopeAppender) []ScopeAppender
- func (this *App) Scopes() []string
- func (this App) Service(tok *oauth2.Token, ctx ...context.Context) (service *admin.Service, err error)
- func (this *App) Setup(token *Token, r *http.Request) (err error)
- func (this *App) SetupHandler(f ...SetupHandler)
- type DirTokenStorage
- type RegisterSession
- func (this *RegisterSession) Data() *RegisterSessionData
- func (this *RegisterSession) Delete(w http.ResponseWriter) (err error)
- func (this *RegisterSession) Get(key string, result interface{}) error
- func (this *RegisterSession) GetS(key string) string
- func (this *RegisterSession) HasData() bool
- func (this *RegisterSession) Load(r *http.Request) (err error)
- func (this *RegisterSession) Pop(w http.ResponseWriter, key string) error
- func (this *RegisterSession) PopLoad(w http.ResponseWriter, key string, result interface{}) error
- func (this *RegisterSession) Save(w http.ResponseWriter) (err error)
- func (this *RegisterSession) Set(w http.ResponseWriter, key string, value interface{}) error
- func (this *RegisterSession) SetData(data *RegisterSessionData)
- type RegisterSessionData
- type ScopeAppender
- type Scopes
- type SetupHandler
- type Token
- type TokenStorage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App struct { Customer string TokenStorage TokenStorage DomainPageURL string SetupURL string IndexHandler func(w http.ResponseWriter, r *http.Request) Crendentials oauth2.Config RequireDomainToStoreToken bool // contains filtered or unexported fields }
func (App) FindDomain ¶
func (*App) LoadCredentials ¶
func (App) LoadDomain ¶
func (*App) RegisterHandler ¶
func (this *App) RegisterHandler(w http.ResponseWriter, r *http.Request)
func (*App) RegisterRequest ¶
func (*App) RegisterRequestHandler ¶
func (this *App) RegisterRequestHandler(w http.ResponseWriter, r *http.Request)
func (*App) ScopeAppender ¶
func (this *App) ScopeAppender(f ...ScopeAppender) []ScopeAppender
func (*App) SetupHandler ¶
func (this *App) SetupHandler(f ...SetupHandler)
type DirTokenStorage ¶
type DirTokenStorage struct {
Dir string
}
func NewDirTokenStorage ¶
func NewDirTokenStorage(dir string) *DirTokenStorage
type RegisterSession ¶
type RegisterSession struct { Session *sessions.Session Request *http.Request // contains filtered or unexported fields }
func GetRegisterSession ¶
func GetRegisterSession(r *http.Request) (session *RegisterSession, err error)
func (*RegisterSession) Data ¶
func (this *RegisterSession) Data() *RegisterSessionData
func (*RegisterSession) Delete ¶
func (this *RegisterSession) Delete(w http.ResponseWriter) (err error)
func (*RegisterSession) Get ¶
func (this *RegisterSession) Get(key string, result interface{}) error
func (*RegisterSession) GetS ¶
func (this *RegisterSession) GetS(key string) string
func (*RegisterSession) HasData ¶
func (this *RegisterSession) HasData() bool
func (*RegisterSession) Pop ¶
func (this *RegisterSession) Pop(w http.ResponseWriter, key string) error
func (*RegisterSession) PopLoad ¶
func (this *RegisterSession) PopLoad(w http.ResponseWriter, key string, result interface{}) error
func (*RegisterSession) Save ¶
func (this *RegisterSession) Save(w http.ResponseWriter) (err error)
func (*RegisterSession) Set ¶
func (this *RegisterSession) Set(w http.ResponseWriter, key string, value interface{}) error
func (*RegisterSession) SetData ¶
func (this *RegisterSession) SetData(data *RegisterSessionData)
type RegisterSessionData ¶
type ScopeAppender ¶
Click to show internal directories.
Click to hide internal directories.