Versions in this module Expand all Collapse all v0 v0.4.1 Aug 9, 2023 Changes in this version + type OtpSignInDetails struct + CodeVerifier string + Email string + Phone string + URL string type OtpSignInOptions + CodeChallenge string + CodeChallengeMethod string + Data interface{} v0.4.0 Aug 9, 2023 Changes in this version + const AuthEndpoint + const RestEndpoint + const StorageEndpoint + var ErrNotFound = errors.New("file not found") + type Auth struct + func (a *Auth) ExchangeCode(ctx context.Context, opts ExchangeCodeOpts) (*AuthenticatedDetails, error) + func (a *Auth) InviteUserByEmail(ctx context.Context, email string) (*User, error) + func (a *Auth) RefreshUser(ctx context.Context, userToken string, refreshToken string) (*AuthenticatedDetails, error) + func (a *Auth) ResetPasswordForEmail(ctx context.Context, email string) error + func (a *Auth) SendMagicLink(ctx context.Context, email string) error + func (a *Auth) SignIn(ctx context.Context, credentials UserCredentials) (*AuthenticatedDetails, error) + func (a *Auth) SignInWithOtp(ctx context.Context, opts OtpSignInOptions) error + func (a *Auth) SignInWithProvider(opts ProviderSignInOptions) (*ProviderSignInDetails, error) + func (a *Auth) SignOut(ctx context.Context, userToken string) error + func (a *Auth) SignUp(ctx context.Context, credentials UserCredentials) (*User, error) + func (a *Auth) UpdateUser(ctx context.Context, userToken string, updateData map[string]interface{}) (*User, error) + func (a *Auth) User(ctx context.Context, userToken string) (*User, error) + func (a *Auth) VerifyOtp(ctx context.Context, opts VerifyOtpOptions) (*AuthenticatedDetails, error) + type AuthenticatedDetails struct + AccessToken string + ExpiresIn int + ProviderRefreshToken string + ProviderToken string + RefreshToken string + TokenType string + User User + type Client struct + Auth *Auth + BaseURL string + DB *postgrest.Client + HTTPClient *http.Client + Storage *Storage + func CreateClient(baseURL string, supabaseKey string, debug ...bool) *Client + type ErrorResponse struct + Code int + Message string + func (err *ErrorResponse) Error() string + type ExchangeCodeOpts struct + AuthCode string + CodeVerifier string + type FileErrorResponse struct + Message string + ShortError string + Status string + func (err *FileErrorResponse) Error() string + type FileObject struct + BucketId string + Buckets bucket + CreatedAt string + Id string + LastAccessedAt string + Metadata interface{} + Name string + Owner string + UpdatedAt string + type FileResponse struct + Key string + Message string + type FileSearchOptions struct + Limit int + Offset int + SortBy SortBy + type FlowType string + const Implicit + const PKCE + type ListFileRequest struct + Limit int + Offset int + Prefix string + SortBy SortBy + type OtpSignInOptions struct + Email string + FlowType FlowType + Phone string + RedirectTo string + type PKCEParams struct + Challenge string + ChallengeMethod string + Verifier string + type ProviderSignInDetails struct + CodeVerifier string + Provider string + URL string + type ProviderSignInOptions struct + FlowType FlowType + Provider string + RedirectTo string + Scopes []string + type SignedUrlResponse struct + SignedUrl string + type SortBy struct + Column string + Order string + type Storage struct + func (s *Storage) CreateBucket(ctx context.Context, option bucketOption) (*bucket, error) + func (s *Storage) DeleteBucket(ctx context.Context, id string) (*bucketResponse, error) + func (s *Storage) EmptyBucket(ctx context.Context, id string) (*bucketMessage, error) + func (s *Storage) From(bucketId string) *file + func (s *Storage) GetBucket(ctx context.Context, id string) (*bucketResponse, error) + func (s *Storage) ListBuckets(ctx context.Context) (*[]bucketResponse, error) + func (s *Storage) UpdateBucket(ctx context.Context, id string, option bucketOption) (*bucketMessage, error) + type User struct + AppMetadata struct{} + Aud string + ConfirmationSentAt time.Time + ConfirmedAt time.Time + CreatedAt time.Time + Email string + ID string + InvitedAt time.Time + Role string + UpdatedAt time.Time + UserMetadata map[string]interface{} + type UserCredentials struct + Data interface{} + Email string + Password string + type VerifyOtpOptions struct + Email string + Phone string + Token string