Documentation
¶
Overview ¶
Package objectstore provides the small S3-compatible object-store surface used by Shrike. It intentionally owns HTTP and signing rather than exposing an SDK client to API packages.
Index ¶
- Constants
- type Object
- type ObjectInfo
- type PutOptions
- type S3Options
- type S3Store
- func (s *S3Store) Delete(ctx context.Context, key string) error
- func (s *S3Store) Get(ctx context.Context, key string) ([]byte, error)
- func (s *S3Store) GetObject(ctx context.Context, key string) (*Object, error)
- func (s *S3Store) Put(ctx context.Context, key string, body []byte, contentType string) error
- func (s *S3Store) PutWithOptions(ctx context.Context, key string, body []byte, options PutOptions) error
- func (s *S3Store) Stat(ctx context.Context, key string) (*ObjectInfo, error)
Constants ¶
const (
BackblazeRegion = "eu-central-003"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Object ¶
type Object struct {
Body []byte
ObjectInfo
}
Object is an object body together with the metadata returned by B2.
type ObjectInfo ¶
type ObjectInfo struct {
Key string
Size int64
ETag string
ContentType string
CacheControl string
LastModified time.Time
Metadata map[string]string
}
ObjectInfo is the metadata available from S3 HEAD and GET responses.
type PutOptions ¶
type S3Store ¶
type S3Store struct {
// contains filtered or unexported fields
}
S3Store is a path-style, Signature V4 S3 client with a small in-process read cache. Backblaze B2 implements this protocol and uses path-style bucket URLs at the endpoint already present in the TypeScript deployment.
func NewS3Store ¶
func (*S3Store) GetObject ¶
GetObject bypasses the small generic cache so callers that need current ETags and metadata do not accidentally pair a cached body with fresh object metadata. The image service owns its own response cache and uses this method.