bucket

package
v2.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 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 Client

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

Client abstracts the API access for Grail Buckets

func NewClient

func NewClient(url string, client *rest.Client) *Client

NewClient creates a new client to interact with the Grail Bucket API

func (Client) Get

func (c Client) Get(ctx context.Context, bucketName string) (Response, error)

Get fetches a single bucket based given the bucketName

func (Client) Upsert

func (c Client) Upsert(ctx context.Context, bucketName string, data []byte) (result Response, err error)

Upsert create or updates a given Grail Bucket

type DummyClient

type DummyClient struct{}

func (DummyClient) Upsert

func (c DummyClient) Upsert(_ context.Context, id string, data []byte) (result Response, err error)

type Response

type Response struct {
	BucketName string `json:"bucketName"`
	Status     string `json:"status"`
	Version    int    `json:"version"`
	Data       []byte `json:"-"`
}

Response holds all necessary information to create and update Grail Buckets

Jump to

Keyboard shortcuts

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