This repository has been archived by the owner on Jun 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathResource.dhall
54 lines (47 loc) · 1.57 KB
/
Resource.dhall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
let Resource
: ∀(_params : { Source : Type, Version : Type }) →
{ Type : Type
, default :
{ icon : Optional Text
, version : Optional _params.Version
, check_every : Optional Text
, tags : Optional (List Text)
, public : Optional Bool
, webhook_token : Optional Text
}
}
= λ(_params : { Source : Type, Version : Type }) →
{ Type =
{ name : Text
, type : Text
, source : _params.Source
, icon : Optional Text
, version : Optional _params.Version
, check_every : Optional Text
, tags : Optional (List Text)
, public : Optional Bool
, webhook_token : Optional Text
}
, default =
{ icon = None Text
, version = None _params.Version
, check_every = None Text
, tags = None (List Text)
, public = None Bool
, webhook_token = None Text
}
}
let example =
let Git = ./resource-types/Git.dhall
let S3 = ./resource-types/S3.dhall
let Source = < Git : Git.Source.Type | S3 : S3.Source.Type >
let Version = < Git : Git.Version.Type | S3 : S3.Version.Type >
let Resource = Resource { Source, Version }
in Resource::{
, name = "example-repository"
, type = Git.meta.name
, source =
Source.Git
Git.Source::{ uri = "[email protected]:example/example.git" }
}
in Resource