gql

package
v0.0.0-...-c387957 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitGQLClient

func InitGQLClient(url string)

func InitGQLClientWithToken

func InitGQLClientWithToken(url string, token string)

func RefreshToken

func RefreshToken(ctx context.Context, token string) (string, error)

Types

type GQLError

type GQLError string
const (
	InvalidUsernamePasssword GQLError = "Invalid username or password"
	ServerError                       = "Unknown server error, try again later"
)

func Login

func Login(ctx context.Context, email string, password string) (*loginUserResponse, GQLError)

type LoginInput

type LoginInput struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

func (*LoginInput) GetEmail

func (v *LoginInput) GetEmail() string

GetEmail returns LoginInput.Email, and is useful for accessing the field via an interface.

func (*LoginInput) GetPassword

func (v *LoginInput) GetPassword() string

GetPassword returns LoginInput.Password, and is useful for accessing the field via an interface.

type RefreshTokenInput

type RefreshTokenInput struct {
	Token string `json:"token"`
}

func (*RefreshTokenInput) GetToken

func (v *RefreshTokenInput) GetToken() string

GetToken returns RefreshTokenInput.Token, and is useful for accessing the field via an interface.

Jump to

Keyboard shortcuts

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