supabase

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MIT Imports: 6 Imported by: 0

README

Supabase

Supabase utilities

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminAuth added in v0.0.3

type AdminAuth struct {
	// contains filtered or unexported fields
}
func (a *AdminAuth) MagicLink(email string) (MagicLink, error)

func (*AdminAuth) NewStorageClient added in v0.1.0

func (a *AdminAuth) NewStorageClient() *storage_go.Client

type AnonAuth added in v0.0.3

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

func (*AnonAuth) GetUser added in v0.0.3

func (a *AnonAuth) GetUser(accessToken string) (User, error)

type AuthClient added in v0.0.4

type AuthClient struct {
	gotrue.Client
	ProjectReference,
	ApiKey string
}

func NewAuth

func NewAuth(projectReference, apiKey string) *AuthClient
type MagicLink struct {
	Token    string `json:"token,omitempty"`
	URL      string `json:"url,omitempty"`
	EmailOTP string `json:"email_otp,omitempty"`
}

type Supabase

type Supabase struct {
	Anon  *AnonAuth
	Admin *AdminAuth
}

func MustNew

func MustNew(projectReference, anonKey, serviceKey string) *Supabase

func (*Supabase) EchoKeyValidation

func (s *Supabase) EchoKeyValidation(accessToken string, c echo.Context) (bool, error)

type User

type User struct {
	types.User
	AccessToken string
	// contains filtered or unexported fields
}

func (*User) NewAuthenticatedRestClient

func (u *User) NewAuthenticatedRestClient() *postgrest.Client

func (*User) NewAuthenticatedStorageClient added in v0.0.2

func (u *User) NewAuthenticatedStorageClient() *storage_go.Client

Jump to

Keyboard shortcuts

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