github

package
v0.1.256 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReflectTypeIGithubOAuth2Authenticator = di.GetInterfaceReflectType((*IGithubOAuth2Authenticator)(nil))

ReflectTypeIGithubOAuth2Authenticator used when your service claims to implement IGithubOAuth2Authenticator

Functions

func AddScopedIGithubOAuth2Authenticator

func AddScopedIGithubOAuth2Authenticator(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)

AddScopedIGithubOAuth2Authenticator adds a type that implements IGithubOAuth2Authenticator

func AddScopedIGithubOAuth2AuthenticatorByFunc

func AddScopedIGithubOAuth2AuthenticatorByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)

AddScopedIGithubOAuth2AuthenticatorByFunc adds a type by a custom func

func AddScopedIGithubOAuth2AuthenticatorByFuncWithMetadata

func AddScopedIGithubOAuth2AuthenticatorByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddScopedIGithubOAuth2AuthenticatorByFuncWithMetadata adds a type by a custom func

func AddScopedIGithubOAuth2AuthenticatorWithMetadata

func AddScopedIGithubOAuth2AuthenticatorWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddScopedIGithubOAuth2AuthenticatorWithMetadata adds a type that implements IGithubOAuth2Authenticator

func AddSingletonIGithubOAuth2Authenticator

func AddSingletonIGithubOAuth2Authenticator(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)

AddSingletonIGithubOAuth2Authenticator adds a type that implements IGithubOAuth2Authenticator

func AddSingletonIGithubOAuth2AuthenticatorByFunc

func AddSingletonIGithubOAuth2AuthenticatorByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)

AddSingletonIGithubOAuth2AuthenticatorByFunc adds a type by a custom func

func AddSingletonIGithubOAuth2AuthenticatorByFuncWithMetadata

func AddSingletonIGithubOAuth2AuthenticatorByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddSingletonIGithubOAuth2AuthenticatorByFuncWithMetadata adds a type by a custom func

func AddSingletonIGithubOAuth2AuthenticatorByObj

func AddSingletonIGithubOAuth2AuthenticatorByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)

AddSingletonIGithubOAuth2AuthenticatorByObj adds a prebuilt obj

func AddSingletonIGithubOAuth2AuthenticatorByObjWithMetadata

func AddSingletonIGithubOAuth2AuthenticatorByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddSingletonIGithubOAuth2AuthenticatorByObjWithMetadata adds a prebuilt obj

func AddSingletonIGithubOAuth2AuthenticatorWithMetadata

func AddSingletonIGithubOAuth2AuthenticatorWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddSingletonIGithubOAuth2AuthenticatorWithMetadata adds a type that implements IGithubOAuth2Authenticator

func AddTransientIGithubOAuth2Authenticator

func AddTransientIGithubOAuth2Authenticator(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)

AddTransientIGithubOAuth2Authenticator adds a type that implements IGithubOAuth2Authenticator

func AddTransientIGithubOAuth2AuthenticatorByFunc

func AddTransientIGithubOAuth2AuthenticatorByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)

AddTransientIGithubOAuth2AuthenticatorByFunc adds a type by a custom func

func AddTransientIGithubOAuth2AuthenticatorByFuncWithMetadata

func AddTransientIGithubOAuth2AuthenticatorByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddTransientIGithubOAuth2AuthenticatorByFuncWithMetadata adds a type by a custom func

func AddTransientIGithubOAuth2AuthenticatorWithMetadata

func AddTransientIGithubOAuth2AuthenticatorWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddTransientIGithubOAuth2AuthenticatorWithMetadata adds a type that implements IGithubOAuth2Authenticator

func GetIGithubOAuth2AuthenticatorDefinition

func GetIGithubOAuth2AuthenticatorDefinition(ctn di.Container) *di.Def

GetIGithubOAuth2AuthenticatorDefinition returns that last definition registered that this container can provide

func GetIGithubOAuth2AuthenticatorDefinitions

func GetIGithubOAuth2AuthenticatorDefinitions(ctn di.Container) []*di.Def

GetIGithubOAuth2AuthenticatorDefinitions returns all definitions that this container can provide

func RemoveAllIGithubOAuth2Authenticator

func RemoveAllIGithubOAuth2Authenticator(builder *di.Builder)

RemoveAllIGithubOAuth2Authenticator removes all IGithubOAuth2Authenticator from the DI

Types

type Email

type Email struct {
	Email    string `json:"email"`
	Primary  bool   `json:"primary"`
	Verified bool   `json:"verified"`
}

type IGithubOAuth2Authenticator

type IGithubOAuth2Authenticator interface {
	contracts_oauth2.IOAuth2Authenticator
	GetUser(token *oauth2.Token) (*User, error)
}

IGithubOAuth2Authenticator ...

func GetIGithubOAuth2AuthenticatorFromContainer

func GetIGithubOAuth2AuthenticatorFromContainer(ctn di.Container) IGithubOAuth2Authenticator

GetIGithubOAuth2AuthenticatorFromContainer alternative to SafeGetIGithubOAuth2AuthenticatorFromContainer but panics of object is not present

func GetManyIGithubOAuth2AuthenticatorFromContainer

func GetManyIGithubOAuth2AuthenticatorFromContainer(ctn di.Container) []IGithubOAuth2Authenticator

GetManyIGithubOAuth2AuthenticatorFromContainer alternative to SafeGetManyIGithubOAuth2AuthenticatorFromContainer but panics of object is not present

func SafeGetIGithubOAuth2AuthenticatorFromContainer

func SafeGetIGithubOAuth2AuthenticatorFromContainer(ctn di.Container) (IGithubOAuth2Authenticator, error)

SafeGetIGithubOAuth2AuthenticatorFromContainer trys to get the object by type, will not panic, returns nil and error

func SafeGetManyIGithubOAuth2AuthenticatorFromContainer

func SafeGetManyIGithubOAuth2AuthenticatorFromContainer(ctn di.Container) ([]IGithubOAuth2Authenticator, error)

SafeGetManyIGithubOAuth2AuthenticatorFromContainer trys to get the object by type, will not panic, returns nil and error

type User

type User struct {
	Name     string  `json:"name"`
	Email    string  `json:"email"`
	Picture  string  `json:"picture"`
	UserName string  `json:"userName"`
	ID       int64   `json:"id"`
	Emails   []Email `json:"emails"`
}

User ...

Jump to

Keyboard shortcuts

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