service

package
v0.0.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	Files map[string]*CachedFile `json:"files,omitempty"`
}

type CacheService

type CacheService struct {
	Cache *Cache
	// contains filtered or unexported fields
}

func InitCache

func InitCache(filePath string) (*CacheService, error)

func (*CacheService) Save

func (c *CacheService) Save() error

type CachedFile

type CachedFile struct {
	Hash string `json:"hash"`
}

type R2Client

type R2Client struct {
	BucketName      string
	AccountID       string
	Endpoint        string
	AccessKeyID     string
	AccessKeySecret string
	// contains filtered or unexported fields
}

func InitR2FromEnv

func InitR2FromEnv(directory string, cacheSvc *CacheService) *R2Client

func (*R2Client) Fetch

func (r2 *R2Client) Fetch(contents []*models.Content) error

func (*R2Client) List

func (r2 *R2Client) List(namespace string) ([]*models.Content, error)

Jump to

Keyboard shortcuts

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