You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Push a bundle file (that was created earlier) to registry, // Then resolve the corresponding Package CR yaml using above registry endpoint, // Finally copy the resolved Package CR yaml to declared output locationvarmyBundle1=&BundlePushSpecs {
Method: ImgpkgCopyTarToRepo, // Low level operation; declarativeSource: BundleSourceSpecs {
BundleFilePath: "${GOBUILD_RELM_PATH}/bundle.tar.gz",
},
Destination: BundleDestinationSpecs {
Address: "localhost:5000",
BundlePath: "bundles/relm_bun",
BundleTag: "v1.0.0",
},
PackageCR: &PackageCRResolveSpecs { // [optional];Method: YttFileOut,
Source: "relm/package.yaml", // templated fileDestination: "nested/bundle/config/relm/package.yaml",
KeyValues: map[string]string {
"version": "v1.0.0",
"image": "localhost:5000/bundles/relm_bun:v1.0.0",
},
KeyValueRefs: map[string]string { // Alternative to KeyValues"version": LookupBundleTag,
"image": LookupBundleURLTag,
},
refValues: map[string]string { // Private/Internal; filled up by BundleSpecsLookupBundleTag: "v1.0.0",
LookupBundleURLTag: "localhost:5000/bundles/relm_bun:v1.0.0",
LookupBundleURLDigest: "localhost:5000/bundles/relm_bun@sha256:digestxxx",
},
},
}
Summary
- One interface per action i.e. API
- Interfaces determine the main behaviour i.e. API
- Use prefix `Any` for interface names
- Use suffix `Specs` for struct names
- One struct (i.e. specs) for multiple interfaces wherever possible
- Every API should have corresponding Assert API
- Read (i.e. Maintainability) over Write (i.e. Implementation)
- Distinct, Non ambiguous, Easy to understand
- Use verbose field names in Specs struct
- Use verbose method / function names
- E.g.: getXXX, runXXX, createXXX, newXXX, etc.
- Keywords:
- `XXXState`# PackageCRState, etc.; Multiple States per Action
- `PostOperation`# PreOperation, etc.
- `Method`# ImgpkgCopy, Ytt, CranePull, etc.
- Names the `Low Level Operations`
- `Target`# w.r.t Assert i.e. TargetUnderTest
The text was updated successfully, but these errors were encountered:
AmitKumarDas
changed the title
design api & test api: action, state & specifications
design: main api & test api: action, state, specs & bulk specs
Jul 12, 2024
AmitKumarDas
changed the title
design: main api & test api: action, state, specs & bulk specs
design: main api && test api: action, state, specs & bulk specs
Jul 12, 2024
AmitKumarDas
changed the title
design: main api && test api: action, state, specs & bulk specs
api in pairs: main api && test api: action, state, specs & bulk specs
Jul 13, 2024
AmitKumarDas
changed the title
api in pairs: main api && test api: action, state, specs & bulk specs
api in pairs: main api && test api: action, state, specs: bulk specs
Jul 13, 2024
AmitKumarDas
changed the title
api in pairs: main api && test api: action, state, specs: bulk specs
api in pairs: main && test apis: action, state, specs: bulk specs
Jul 13, 2024
relm
relm/pkg/carvel
relm/pkg/carvel/bundle.go
23/JUL/2024
The text was updated successfully, but these errors were encountered: