Documentation
¶
Index ¶
- type GCSService
- func (a *GCSService) Close() error
- func (a *GCSService) DeleteArtifact(ctx context.Context, appName, userID, sessionID, filename string) error
- func (a *GCSService) ListArtifactKey(ctx context.Context, appName, userID, sessionID string) ([]string, error)
- func (a *GCSService) ListVersions(ctx context.Context, appName, userID, sessionID, filename string) ([]int, error)
- func (a *GCSService) LoadArtifact(ctx context.Context, appName, userID, sessionID, filename string, version int) (*genai.Part, error)
- func (a *GCSService) SaveArtifact(ctx context.Context, appName, userID, sessionID, filename string, ...) (int, error)
- type InMemoryService
- func (a *InMemoryService) Close() error
- func (a *InMemoryService) DeleteArtifact(ctx context.Context, appName, userID, sessionID, filename string) error
- func (a *InMemoryService) ListArtifactKey(ctx context.Context, appName, userID, sessionID string) ([]string, error)
- func (a *InMemoryService) ListVersions(ctx context.Context, appName, userID, sessionID, filename string) ([]int, error)
- func (a *InMemoryService) LoadArtifact(ctx context.Context, appName, userID, sessionID, filename string, version int) (*genai.Part, error)
- func (a *InMemoryService) SaveArtifact(ctx context.Context, appName, userID, sessionID, filename string, ...) (int, error)
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.