models

package
v0.0.0-...-dbde7e4 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credential

type Credential struct {
	Credential     string         `json:"credential"`
	CredentialType TypeCredential `json:"credential_type"`
	ProviderType   TypeProvider   `json:"provider_type"`
	Integration    Integration    `json:"integration"`
	CredentialID   int64          `gorm:"primaryKey" json:"credential_id"`
	UserID         int64          `json:"user_id"`
}

type Filesystem

type Filesystem struct {
	Fs          string         `json:"fs"`
	Permissions []string       `json:"permissions"`
	Params      map[string]any `json:"params"`
}

type Integration

type Integration string
const (
	SFTP Integration = "SFTP"
	Mail Integration = "MAIL"
)

type TypeCredential

type TypeCredential string

TypeCredential is the type of credential used for authentication.

const (
	Password  TypeCredential = "PASSWORD"
	TwoFactor TypeCredential = "TWO_FACTOR"
	APIKey    TypeCredential = "API_Key"
	Oauth     TypeCredential = "OAUTH"
)

type TypeProvider

type TypeProvider string

TypeProvider is the type of provider used for authentication.

const (
	Local   TypeProvider = "LOCAL"
	Cognito TypeProvider = "COGNITO"
	Dropbox TypeProvider = "DROPBOX"
	GDrive  TypeProvider = "GDRIVE"
	S3      TypeProvider = "S3"
)

type User

type User struct {
	ID                int64         `json:"id"`
	Username          string        `json:"username"`
	Password          string        `json:"password"`
	Filesystems       []*Filesystem `json:"filesystems"`
	DefaultFilesystem string        `json:"default_filesystem"`
	Filesystem        *Filesystem   `json:"filesystem"`
	Permissions       []string      `json:"permissions"`
}

func (User) GetFilesystem

func (u User) GetFilesystem() (*Filesystem, error)

Jump to

Keyboard shortcuts

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