external

package
v0.0.0-...-46fdcb5 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRequestWithTID

func NewRequestWithTID[T any](ctx context.Context, msg *T) *connect.Request[T]

Types

type Auth

type Auth struct {
	Endpoint     string
	APIKey       string
	HTTPClient   *http.Client
	FirebaseAuth *auth.Client
}

func (*Auth) SignIn

func (fb *Auth) SignIn(ctx context.Context, email model.EMail, password model.Password) (model.Auth, error)

func (*Auth) SignUp

func (fb *Auth) SignUp(ctx context.Context, uid model.UserID, email model.EMail, password model.Password) error

type AuthFactory

type AuthFactory interface {
	Auth(secret string, endpoint string, apiKey string) (*Auth, error)
}

type SignInRequest

type SignInRequest struct {
	Email             string `json:"email"`
	Password          string `json:"password"`
	ReturnSecureToken bool   `json:"returnSecureToken"`
}

type SignInResponse

type SignInResponse struct {
	ExpiresIn    string `json:"expiresIn"`
	LocalID      string `json:"localId"`
	IDToken      string `json:"idToken"`
	RefreshToken string `json:"refreshToken"`
}

type User

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

func NewUser

func NewUser(
	connect userv1connect.UserServiceClient,
) *User

func (*User) Create

func (us *User) Create(ctx context.Context) (model.User, error)

type UserFactory

type UserFactory interface {
	User(string) (*User, error)
}

Jump to

Keyboard shortcuts

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