Documentation ¶
Index ¶
- type GcsArtifactClient
- func (gac *GcsArtifactClient) DeleteArtifact(ctx context.Context, url string) error
- func (gac *GcsArtifactClient) ParseURL(gsURL string) (*URL, error)
- func (gac *GcsArtifactClient) ReadArtifact(ctx context.Context, url string) ([]byte, error)
- func (gac *GcsArtifactClient) WriteArtifact(ctx context.Context, url string, content []byte) error
- type NopArtifactClient
- func (nac *NopArtifactClient) DeleteArtifact(ctx context.Context, url string) error
- func (nac *NopArtifactClient) ParseURL(gsURL string) (*URL, error)
- func (nac *NopArtifactClient) ReadArtifact(ctx context.Context, url string) ([]byte, error)
- func (nac *NopArtifactClient) WriteArtifact(ctx context.Context, url string, content []byte) error
- type Service
- type URL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GcsArtifactClient ¶
func (*GcsArtifactClient) DeleteArtifact ¶
func (gac *GcsArtifactClient) DeleteArtifact(ctx context.Context, url string) error
func (*GcsArtifactClient) ParseURL ¶ added in v1.12.0
func (gac *GcsArtifactClient) ParseURL(gsURL string) (*URL, error)
Parse parses a Google Cloud Storage string into a URL struct. The expected format of the string is gs://[bucket-name]/[object-path]. If the provided URL is formatted incorrectly an error will be returned.
func (*GcsArtifactClient) ReadArtifact ¶ added in v1.12.0
func (*GcsArtifactClient) WriteArtifact ¶ added in v1.12.0
type NopArtifactClient ¶
type NopArtifactClient struct{}
func (*NopArtifactClient) DeleteArtifact ¶
func (nac *NopArtifactClient) DeleteArtifact(ctx context.Context, url string) error
func (*NopArtifactClient) ParseURL ¶ added in v1.12.0
func (nac *NopArtifactClient) ParseURL(gsURL string) (*URL, error)
func (*NopArtifactClient) ReadArtifact ¶ added in v1.12.0
func (*NopArtifactClient) WriteArtifact ¶ added in v1.12.0
type Service ¶
type Service interface { ParseURL(gsURL string) (*URL, error) ReadArtifact(ctx context.Context, url string) ([]byte, error) WriteArtifact(ctx context.Context, url string, content []byte) error DeleteArtifact(ctx context.Context, url string) error }
func NewGcsArtifactClient ¶
func NewNopArtifactClient ¶
func NewNopArtifactClient() Service
type URL ¶ added in v1.12.0
type URL struct { // Bucket is the name of the Google Cloud Storage bucket where the object // is located. Bucket string // Object is the name and or path of the object stored in the bucket. It // should not start with a forward slash. Object string }
URL contains the information needed to identify the location of an object located in Google Cloud Storage.
Click to show internal directories.
Click to hide internal directories.