예제 #1
0
func (s *FakeBundleCollection) Get(definition bc.BundleDefinition) (bc.Bundle, error) {
	if len(definition.BundleName()) == 0 {
		return nil, errors.New("missing bundle name")
	}

	if len(definition.BundleVersion()) == 0 {
		return nil, errors.New("missing bundle version")
	}

	return s.FakeGet(definition), s.GetErr
}
예제 #2
0
func NewBundleKey(definition bc.BundleDefinition) BundleKey {
	return BundleKey{
		Name:    definition.BundleName(),
		Version: definition.BundleVersion(),
	}
}