drive

package
v0.0.0-...-9e48597 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DIGITALOCEAN_REPLACE_TARGET_FOR_TEAM = "sfo3.digitaloceanspaces.com/"
View Source
const TEAM_FOLDER_PREFIX = "team-"
View Source
const TEAM_ICON_FOLDER = "/icon"
View Source
const TEAM_SPACE_FOLDER = "/team"
View Source
const TEAM_SYSTEM_FOLDER = "/system"

Variables

This section is empty.

Functions

func FormatTeamIconURL

func FormatTeamIconURL(url string) string

Types

type Drive

type Drive struct {
	SystemDriveS3Instance S3Instance
	TeamDriveS3Instance   S3Instance
	// contains filtered or unexported fields
}

func NewDrive

func NewDrive(teamDriveS3Instance S3Instance, logger *zap.SugaredLogger) *Drive

type S3Instance

type S3Instance interface {
	GetPreSignedPutURL(fileName string) (string, error)
}

type TeamDrive

type TeamDrive struct {
	UID              uuid.UUID  `json:"uid"`
	Drive            S3Instance `json:"-"`
	TeamSystemFolder string     `json:"teamsystemfolder"`
	TeamSpaceFolder  string     `json:"teamspacefolder"`
}

func NewTeamDrive

func NewTeamDrive(drive *Drive) *TeamDrive

func (*TeamDrive) GetAIAgentIconUploadPreSignedURL

func (d *TeamDrive) GetAIAgentIconUploadPreSignedURL(fileName string) (string, error)

func (*TeamDrive) GetIconUploadPreSignedURL

func (d *TeamDrive) GetIconUploadPreSignedURL(fileName string) (string, error)

func (*TeamDrive) SetTeam

func (d *TeamDrive) SetTeam(team *model.Team)

Jump to

Keyboard shortcuts

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