-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: split library into smaller files (#1)
* refactor(generator): split library into smaller files * refactor(grafanaplane): split library into smaller files * docs: fix import statements * chore: Makefile targets and use long import path * chore: ensure jsonnetfile.lock.json is up-to-date
- Loading branch information
Showing
410 changed files
with
78,234 additions
and
78,105 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ Jsonnet library providing a namespaced set of compositions/XRDs for the Grafana | |
The compositions/XRDs can be imported like this: | ||
|
||
```jsonnet | ||
local compositions = import "github.com/Duologic/grafana-crossplane-libsonnet/grafanaplane/compositions.libsonnet" | ||
local compositions = import 'github.com/Duologic/grafana-crossplane-libsonnet/grafanaplane/compositions.libsonnet'; | ||
[ | ||
# Each composition has a `definition` and `composition` key | ||
|
@@ -30,10 +30,11 @@ jb install github.com/Duologic/grafana-crossplane-libsonnet/[email protected] | |
## Usage | ||
|
||
```jsonnet | ||
local grafanaplane = import "github.com/Duologic/grafana-crossplane-libsonnet/grafanaplane/main.libsonnet" | ||
local grafanaplane = import 'github.com/Duologic/grafana-crossplane-libsonnet/grafanaplane/main.libsonnet'; | ||
``` | ||
|
||
|
||
|
||
## Subpackages | ||
|
||
* [alerting](alerting/index.md) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
'#': { help: '', name: 'alerting' }, | ||
v1alpha1+: import './v1alpha1/main.libsonnet', | ||
} |
34 changes: 34 additions & 0 deletions
34
grafanaplane/alerting/v1alpha1/contactPoint/main.libsonnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
'#': { help: '', name: 'contactPoint' }, | ||
'#new': { 'function': { args: [{ default: null, enums: null, name: 'name', type: 'string' }], help: '`new` creates a new instance' } }, | ||
new(name): | ||
self.withApiVersion() | ||
+ self.withKind() | ||
+ self.metadata.withName(name), | ||
'#withApiVersion': { 'function': { args: [], help: '' } }, | ||
withApiVersion(): { | ||
apiVersion: 'alerting.grafana.crossplane.io.namespaced/v1alpha1', | ||
}, | ||
'#withKind': { 'function': { args: [], help: '' } }, | ||
withKind(): { | ||
kind: 'ContactPoint', | ||
}, | ||
'#withMetadata': { 'function': { args: [{ default: null, enums: null, name: 'value', type: ['object'] }], help: 'ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.' } }, | ||
withMetadata(value): { | ||
metadata: value, | ||
}, | ||
'#withMetadataMixin': { 'function': { args: [{ default: null, enums: null, name: 'value', type: ['object'] }], help: 'ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.' } }, | ||
withMetadataMixin(value): { | ||
metadata+: value, | ||
}, | ||
metadata+: import './metadata/main.libsonnet', | ||
'#withSpec': { 'function': { args: [{ default: null, enums: null, name: 'value', type: ['object'] }], help: '' } }, | ||
withSpec(value): { | ||
spec: value, | ||
}, | ||
'#withSpecMixin': { 'function': { args: [{ default: null, enums: null, name: 'value', type: ['object'] }], help: '' } }, | ||
withSpecMixin(value): { | ||
spec+: value, | ||
}, | ||
spec+: import './spec/main.libsonnet', | ||
} |
Oops, something went wrong.