Documentation ¶
Overview ¶
Package backend is responsible for storing and fetching asset from or to the designated location.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct { // Name of the asset which has to be either uploaded or downloaded. Name string `json:"name" yaml:"name"` // Cloud name of the bucket to which asset belongs to. Cloud string `json:"cloud" yaml:"cloud"` // Bucket name in appropriate cloud for asset store. Bucket string `json:"bucket" yaml:"bucket"` // Folder under which the asset has to be placed. Folder string `json:"folder" yaml:"folder"` // Path to the asset which has to be store on to cloud. Path string `json:"path" yaml:"path"` // TargetPath refers to path where the asset has to be fetched to. TargetPath string `json:"targetpath" yaml:"targetpath"` // Path to cloud credentail file, 'service-account.json' incase of gcp. CredentialPath string `json:"credspath" yaml:"credspath" env:"UNPACKKER_CREDENTIAL_PATH"` // CredentialType of for cloud config. Unpackker supports two type, default and file type. // It defaults to default config. CredentialType string `json:"credstype" yaml:"credstype" env:"UNPACKKER_CREDENTIAL_TYPE"` // SkipRemoteCheck would skip feature which avoids pushing asset which is present at backend. SkipRemoteCheck bool `json:"skipremotecheck" yaml:"skipremotecheck"` // Region where the bucket resides. Region string `json:"region" yaml:"region" env:"UNPACKKER_CLOUD_REGION"` // Metadata of the asset that would be stored. MetaData map[string]string `json:"metadata" yaml:"metadata"` // contains filtered or unexported fields }
Store helps one to specify where the artifact should be tranported, default to local.
func (*Store) FetchAsset ¶
FetchAsset stores the packed asset at specified location. Make sure that InitBackend is invoked before calling this.
func (*Store) InitBackend ¶
InitBackend initializes backend for Unpackker to store or retrieve the packed asset.
func (*Store) StoreAsset ¶
StoreAsset stores the packed asset at specified location. Make sure that InitBackend is invoked before calling this.
Click to show internal directories.
Click to hide internal directories.