Documentation ¶
Overview ¶
Copyright 2020 Security Scorecard Authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Security Scorecard Authors ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Security Scorecard Authors ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
Cache that use the blob storage like GCS or S3.
type CacheService ¶
type CacheService interface { // UpdateCache updates the git cache into the gocloud.dev blob storage. UpdateCache(string) error }
CacheService updates git cache.
func NewCacheService ¶
func NewCacheService(blobURL, tempDir string, logf func(s string, f ...interface{})) (CacheService, error)
NewCacheService returns new CacheService.
type RepoURL ¶
type RepoURL struct { Host string // Host where the repo is stored. Example GitHub.com Owner string // Owner of the repo. Example ossf. Repo string // The actual repo. Example scorecard. }
TODO: This is an exact replica of repos.RepoURL. Combine them somehow. RepoURL parses and stores URL into fields.
func (*RepoURL) NonURLString ¶
type StoragePath ¶
type StoragePath struct { BucketPath string // name of the bucket that is going store the content GitDir string // directory in which the git folder would be used for pull/clone GitTarDir string // directory for tar/gzip the git folder GitTarFile string // the tar file name for the git folder BlobArchiveDir string // directory which is going archive the git folder without .git BlobArchiveFile string // the tar file for the git folder without .git BlobLastCommitPath string // blob path for storing the last commit BlobLastSyncPath string // blob path for storing the lasy sync time BlobGitFolderPath string // blob path for storing the GitTarFile BlobArchivePath string // blob path for storing the archive file BlobArchiveFile }
func NewStoragePath ¶
func NewStoragePath(repo RepoURL, tempDir string) (StoragePath, error)
NewStoragePath returns path for blob, archiving and also creates temp directories for archiving.
func (*StoragePath) Cleanup ¶
func (s *StoragePath) Cleanup()
Cleanup removes the directories that were created.