Versions in this module Expand all Collapse all v0 v0.1.0 Nov 14, 2023 Changes in this version + const AdminEndpoint + const AuthEndpoint + const RestEndpoint + const StorageEndpoint + var ErrNotFound = errors.New("file not found") + type Admin struct + func (a *Admin) CreateUser(ctx context.Context, params AdminUserParams) (*AdminUser, error) + func (a *Admin) GenerateLink(ctx context.Context, params GenerateLinkParams) (*GenerateLinkResponse, error) + func (a *Admin) GetUser(ctx context.Context, userID string) (*AdminUser, error) + func (a *Admin) UpdateUser(ctx context.Context, userID string, params AdminUserParams) (*AdminUser, error) + type AdminUser struct + AppMetaData JSONMap + Aud string + BannedUntil *time.Time + ConfirmationSentAt *time.Time + CreatedAt time.Time + DeletedAt *time.Time + Email string + EmailChange string + EmailChangeSentAt *time.Time + EmailConfirmedAt *time.Time + Factors []Factor + ID string + Identities []Identity + InvitedAt *time.Time + LastSignInAt *time.Time + Phone string + PhoneChange string + PhoneChangeSentAt *time.Time + PhoneConfirmedAt *time.Time + ReauthenticationSentAt *time.Time + RecoverySentAt *time.Time + Role string + UpdatedAt time.Time + UserMetaData JSONMap + type AdminUserParams struct + AppMetadata JSONMap + BanDuration string + Email string + EmailConfirm bool + Password *string + Phone string + PhoneConfirm bool + Role string + UserMetadata JSONMap + 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) 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) + type AuthenticatedDetails struct + AccessToken string + ExpiresIn int + ProviderRefreshToken string + ProviderToken string + RefreshToken string + TokenType string + User User + type BucketOption struct + Id string + Name string + Public bool + type Client struct + Admin *Admin + 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 Factor struct + CreatedAt time.Time + FactorType string + FriendlyName string + ID string + Status string + UpdatedAt time.Time + 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 GenerateLinkParams struct + Data map[string]interface{} + Email string + NewEmail string + Password string + RedirectTo string + Type string + type GenerateLinkResponse struct + ActionLink string + EmailOtp string + HashedToken string + RedirectTo string + VerificationType string + type Identity struct + CreatedAt time.Time + ID string + IdentityData JSONMap + LastSignInAt *time.Time + Provider string + UpdatedAt time.Time + UserID string + type JSONMap map[string]interface + type ListFileRequest struct + Limit int + Offset int + Prefix string + SortBy SortBy + 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