artifact

package
v0.0.0-...-502a390 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GCSService

type GCSService struct {
	// contains filtered or unexported fields
}

GCSService represents an artifact service implementation using Google Cloud Storage (GCS).

func NewGCSService

func NewGCSService(ctx context.Context, bucketName string) (*GCSService, error)

NewGCSService creates a new GCSService instance with the given bucket name.

func (*GCSService) Close

func (a *GCSService) Close() error

Close implements types.ArtifactService.

func (*GCSService) DeleteArtifact

func (a *GCSService) DeleteArtifact(ctx context.Context, appName, userID, sessionID, filename string) error

DeleteArtifact implements types.ArtifactService.

func (*GCSService) ListArtifactKey

func (a *GCSService) ListArtifactKey(ctx context.Context, appName, userID, sessionID string) ([]string, error)

ListArtifactKey implements types.ArtifactService.

func (*GCSService) ListVersions

func (a *GCSService) ListVersions(ctx context.Context, appName, userID, sessionID, filename string) ([]int, error)

ListVersions implements types.ArtifactService.

func (*GCSService) LoadArtifact

func (a *GCSService) LoadArtifact(ctx context.Context, appName, userID, sessionID, filename string, version int) (*genai.Part, error)

LoadArtifact implements types.ArtifactService.

func (*GCSService) SaveArtifact

func (a *GCSService) SaveArtifact(ctx context.Context, appName, userID, sessionID, filename string, artifact *genai.Part) (int, error)

SaveArtifact implements types.ArtifactService.

type InMemoryService

type InMemoryService struct {
	// contains filtered or unexported fields
}

InMemoryService represents an in-memory implementation of the artifact service.

func NewInMemoryService

func NewInMemoryService() *InMemoryService

NewInMemoryService creates a new instance of InMemoryService.

func (*InMemoryService) Close

func (a *InMemoryService) Close() error

Close implements types.ArtifactService.

func (*InMemoryService) DeleteArtifact

func (a *InMemoryService) DeleteArtifact(ctx context.Context, appName, userID, sessionID, filename string) error

DeleteArtifact implements types.ArtifactService.

func (*InMemoryService) ListArtifactKey

func (a *InMemoryService) ListArtifactKey(ctx context.Context, appName, userID, sessionID string) ([]string, error)

ListArtifactKey implements types.ArtifactService.

func (*InMemoryService) ListVersions

func (a *InMemoryService) ListVersions(ctx context.Context, appName, userID, sessionID, filename string) ([]int, error)

ListVersions implements types.ArtifactService.

func (*InMemoryService) LoadArtifact

func (a *InMemoryService) LoadArtifact(ctx context.Context, appName, userID, sessionID, filename string, version int) (*genai.Part, error)

LoadArtifact implements types.ArtifactService.

func (*InMemoryService) SaveArtifact

func (a *InMemoryService) SaveArtifact(ctx context.Context, appName, userID, sessionID, filename string, artifact *genai.Part) (int, error)

SaveArtifact implements types.ArtifactService.

Jump to

Keyboard shortcuts

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