output

package
v0.0.0-...-1be983a Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Keys = &keys{}
)

Redis keys

Functions

func GetTaskOutputFiles

func GetTaskOutputFiles(workspaceName string, task *types.TaskWithRelated) map[string]string

func GetTaskOutputPath

func GetTaskOutputPath(workspaceName string, task *types.TaskWithRelated, outputId string, filename string) string

func GetTaskOutputRootPath

func GetTaskOutputRootPath(workspaceName string, task *types.TaskWithRelated) string

func SetPublicURL

func SetPublicURL(ctx context.Context, config types.AppConfig, backendRepo repository.BackendRepository, redisClient *common.RedisClient, workspaceName, taskId, outputId, filename string, expires uint32) (string, error)

Types

type OutputRedisService

type OutputRedisService struct {
	pb.UnimplementedOutputServiceServer
	// contains filtered or unexported fields
}

func (*OutputRedisService) OutputPublicURL

func (*OutputRedisService) OutputSaveStream

func (*OutputRedisService) OutputStat

type OutputSaveContent

type OutputSaveContent struct {
	Filename string
	TaskID   string
	Content  []byte
}

type OutputService

type OutputService interface {
	pb.OutputServiceServer
	OutputSaveStream(stream pb.OutputService_OutputSaveStreamServer) error
	OutputStat(ctx context.Context, in *pb.OutputStatRequest) (*pb.OutputStatResponse, error)
	OutputPublicURL(ctx context.Context, in *pb.OutputPublicURLRequest) (*pb.OutputPublicURLResponse, error)
}

func NewOutputRedisService

func NewOutputRedisService(config types.AppConfig, redisClient *common.RedisClient, backendRepo repository.BackendRepository, routeGroup *echo.Group) (OutputService, error)

type Stat

type Stat struct {
	Mode  string
	Size  int64
	Atime time.Time
	Mtime time.Time
}

Jump to

Keyboard shortcuts

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