controller

package
v0.0.0-...-d71fd26 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analytics

type Analytics struct {
}

Analytics implements the segment endpoint, which is invoked to retrieve the amplitude domain for the ui.

func NewAnalytics

func NewAnalytics() *Analytics

NewAnalytics returns a new Analytics instance.

func (*Analytics) GetDevSpacesSegmentWriteKey

func (a *Analytics) GetDevSpacesSegmentWriteKey(ctx *gin.Context)

GetDevSpacesSegmentWriteKey returns segment-write-key content for DevSpaces

func (*Analytics) GetSandboxSegmentWriteKey

func (a *Analytics) GetSandboxSegmentWriteKey(ctx *gin.Context)

GetSandboxSegmentWriteKey returns segment-write-key content for UI.

type AuthConfig

type AuthConfig struct {
}

AuthConfig implements the auth config endpoint, which is invoked to retrieve the auth config for the ui.

func NewAuthConfig

func NewAuthConfig() *AuthConfig

NewAuthConfig returns a new AuthConfig instance.

func (*AuthConfig) GetHandler

func (ac *AuthConfig) GetHandler(ctx *gin.Context)

GetHandler returns raw auth config content for UI.

type HealthCheck

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

HealthCheck implements the health endpoint.

func NewHealthCheck

func NewHealthCheck(checker HealthChecker) *HealthCheck

HealthCheck returns a new HealthCheck instance.

func (*HealthCheck) GetHandler

func (hc *HealthCheck) GetHandler(ctx *gin.Context)

GetHandler returns a default heath check result.

type HealthCheckConfig

type HealthCheckConfig interface {
	GetEnvironment() string
}

type HealthChecker

type HealthChecker interface {
	Alive(*gin.Context) bool
	APIProxyAlive(*gin.Context) bool
}

func NewHealthChecker

func NewHealthChecker(port string) HealthChecker

type HealthStatus

type HealthStatus struct {
	*status.Health
	ProxyAlive bool `json:"proxyAlive"`
}

type Phone

type Phone struct {
	CountryCode string `form:"country_code" json:"country_code" binding:"required"`
	PhoneNumber string `form:"phone_number" json:"phone_number" binding:"required"`
}

type Signup

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

Signup implements the signup endpoint, which is invoked for new user registrations.

func NewSignup

func NewSignup(app application.Application) *Signup

NewSignup returns a new Signup instance.

func (*Signup) GetHandler

func (s *Signup) GetHandler(ctx *gin.Context)

GetHandler returns the Signup resource

func (*Signup) InitVerificationHandler

func (s *Signup) InitVerificationHandler(ctx *gin.Context)

InitVerificationHandler starts the phone verification process for a user. It extracts the user's identifying information from their Access Token (presented in the Authorization HTTP header) to determine the user, and then invokes the Verification service with an E.164 formatted phone number value derived from the country code and phone number provided by the user.

func (*Signup) PostHandler

func (s *Signup) PostHandler(ctx *gin.Context)

PostHandler creates a Signup resource

func (*Signup) VerifyActivationCodeHandler

func (s *Signup) VerifyActivationCodeHandler(ctx *gin.Context)

VerifyActivationCodeHandler validates the activation code passed in by the user as a form value

func (*Signup) VerifyPhoneCodeHandler

func (s *Signup) VerifyPhoneCodeHandler(ctx *gin.Context)

VerifyPhoneCodeHandler validates the phone verification code passed in by the user

type Usernames

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

Usernames implements the usernames endpoint, which is invoked for checking if a given username/email exists.

func NewUsernames

func NewUsernames(app application.Application) *Usernames

NewUsernames returns a new Usernames instance.

func (*Usernames) GetHandler

func (s *Usernames) GetHandler(ctx *gin.Context)

GetHandler returns the list of usernames found, if any.

Jump to

Keyboard shortcuts

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