Documentation ¶
Index ¶
Constants ¶
View Source
const MAX_ATTEMPTS int = 12
Variables ¶
View Source
var ( ErrorServiceNotAvailable = errors.New("connection refused") ErrorDeviceNotRegistered = errors.New("device not registered") )
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService interface { Name() string Start() (string, error) WaitForExternalLogin() error CheckAccount(account map[string]string) (bool, error) Finish( pkey []byte, device string, deviceUID string, ) (models.User, string, error) }
func GetAuthService ¶
func GetAuthService( serviceName string, apiUrl string, ) (AuthService, error)
GetAuthService function returns the instance of an AuthService implementor based on `serviceName`
func GitHubAuth ¶
func GitHubAuth(ctx context.Context, apiUrl string) AuthService
GitHubAuth function returns an instance of GitHubAuth service
func GitlabAuth ¶
func GitlabAuth(ctx context.Context, apiUrl string) AuthService
GitlabAuth function returns an instance of GitLabAuth service
Click to show internal directories.
Click to hide internal directories.