mirror of
https://github.com/hauler-dev/hauler.git
synced 2026-08-24 11:47:20 +00:00
* pull back in ocil * updates to OCIL funcs to handle cosign changes * add cosign logic * adjust Makefile to be a little more generic * cli updates to accomodate the cosign additions * add cosign drop-in funcs * impl for cosign functions for images & store copy * fixes and logging for cosign verify <iamge> * fix cosign verify logging * update go.mod Signed-off-by: Adam Martin <adam.martin@rancherfederal.com>
27 lines
520 B
Go
27 lines
520 B
Go
package file
|
|
|
|
import (
|
|
"github.com/rancherfederal/hauler/pkg/artifacts"
|
|
"github.com/rancherfederal/hauler/pkg/artifacts/file/getter"
|
|
)
|
|
|
|
type Option func(*File)
|
|
|
|
func WithClient(c *getter.Client) Option {
|
|
return func(f *File) {
|
|
f.client = c
|
|
}
|
|
}
|
|
|
|
func WithConfig(obj interface{}, mediaType string) Option {
|
|
return func(f *File) {
|
|
f.config = artifacts.ToConfig(obj, artifacts.WithConfigMediaType(mediaType))
|
|
}
|
|
}
|
|
|
|
func WithAnnotations(m map[string]string) Option {
|
|
return func(f *File) {
|
|
f.annotations = m
|
|
}
|
|
}
|