client

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSObjectClient added in v0.0.6

type AWSObjectClient struct {
	ObjectClient
	// contains filtered or unexported fields
}

func (*AWSObjectClient) Auth added in v0.0.6

func (aws *AWSObjectClient) Auth(opts *ObjectOpts) error

func (*AWSObjectClient) CreateBucket added in v0.0.6

func (aws *AWSObjectClient) CreateBucket(bucketName string) error

func (*AWSObjectClient) Credentials added in v0.0.6

func (aws *AWSObjectClient) Credentials(userName, bucketName string) (string, string, error)

func (*AWSObjectClient) DeleteBucket added in v0.0.6

func (aws *AWSObjectClient) DeleteBucket(bucketName string) error

func (*AWSObjectClient) DeleteUser added in v0.0.6

func (aws *AWSObjectClient) DeleteUser(userName string) error

func (*AWSObjectClient) ListBuckets added in v0.0.6

func (aws *AWSObjectClient) ListBuckets() ([]string, error)

func (*AWSObjectClient) Provider added in v0.0.6

func (aws *AWSObjectClient) Provider() string

type Client

type Client struct {
	*gitea.Client
	Instance *hyperv1.Gitea

	CA []byte
	// contains filtered or unexported fields
}

func Build

func Build(ctx context.Context, r rclient.Client, instance *hyperv1.InstanceType, ns string) (*Client, *hyperv1.Gitea, error)

func BuildFromOrg

func BuildFromOrg(ctx context.Context, r rclient.Client, instance *hyperv1.OrgRef, ns string) (*Client, *hyperv1.Gitea, error)

func (*Client) Do added in v0.0.5

func (c *Client) Do(req *http.Request) (*http.Response, error)

func (*Client) Get added in v0.0.5

func (c *Client) Get(url string) (resp *http.Response, err error)

func (*Client) GetJSON added in v0.0.6

func (c *Client) GetJSON(url string) (resp *http.Response, err error)

func (*Client) Post added in v0.0.5

func (c *Client) Post(url, contentType string, body io.Reader) (resp *http.Response, err error)

type GCPObjectClient added in v0.0.6

type GCPObjectClient struct {
	ObjectClient
	// contains filtered or unexported fields
}

func (*GCPObjectClient) Auth added in v0.0.6

func (gcp *GCPObjectClient) Auth(opts *ObjectOpts) error

func (*GCPObjectClient) CreateBucket added in v0.0.6

func (gcp *GCPObjectClient) CreateBucket(bucketName string) error

func (*GCPObjectClient) Credentials added in v0.0.6

func (gcp *GCPObjectClient) Credentials(userName, bucketName string) (string, string, error)

func (*GCPObjectClient) DeleteBucket added in v0.0.6

func (gcp *GCPObjectClient) DeleteBucket(bucketName string) error

func (*GCPObjectClient) DeleteUser added in v0.0.6

func (gcp *GCPObjectClient) DeleteUser(userName string) error

func (*GCPObjectClient) ListBuckets added in v0.0.6

func (gcp *GCPObjectClient) ListBuckets() ([]string, error)

func (*GCPObjectClient) Provider added in v0.0.6

func (gcp *GCPObjectClient) Provider() string

type MinioObjectClient added in v0.0.6

type MinioObjectClient struct {
	ObjectClient
	// contains filtered or unexported fields
}

func (*MinioObjectClient) Auth added in v0.0.6

func (mc *MinioObjectClient) Auth(opts *ObjectOpts) error

func (*MinioObjectClient) CreateBucket added in v0.0.6

func (mc *MinioObjectClient) CreateBucket(bucketName string) error

func (*MinioObjectClient) Credentials added in v0.0.6

func (mc *MinioObjectClient) Credentials(userName, bucketName string) (string, string, error)

func (*MinioObjectClient) DeleteBucket added in v0.0.6

func (mc *MinioObjectClient) DeleteBucket(bucketName string) error

func (*MinioObjectClient) DeleteUser added in v0.0.6

func (mc *MinioObjectClient) DeleteUser(userName string) error

func (*MinioObjectClient) ListBuckets added in v0.0.6

func (mc *MinioObjectClient) ListBuckets() ([]string, error)

func (*MinioObjectClient) Provider added in v0.0.6

func (mc *MinioObjectClient) Provider() string

type ObjectClient added in v0.0.6

type ObjectClient interface {
	// Authenticate with the Cloud Provider.
	Auth(opts *ObjectOpts) error
	// ListBuckets lists all buckets.
	ListBuckets() ([]string, error)
	// CreateBucket creates a new bucket.
	CreateBucket(bucketName string) error
	// DeleteBucket deletes a bucket.
	DeleteBucket(bucketName string) error
	// Create Cloud Provider specific credentials.
	Credentials(userName, bucketName string) (string, string, error)
	// Delete a user
	DeleteUser(userName string) error
	// Get the Cloud Provider
	Provider() string
}

func NewObjectClient added in v0.0.6

func NewObjectClient(ctx context.Context, opts *ObjectOpts) (ObjectClient, error)

type ObjectOpts added in v0.0.6

type ObjectOpts struct {
	CloudProvider string
	Endpoint      string
	Region        string
	AccessKey     string
	SecretKey     string
	TLS           bool
}

Jump to

Keyboard shortcuts

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