| giolekva | 050609f | 2021-12-29 15:51:40 +0400 | [diff] [blame] | 1 | package main |
| 2 | |
| 3 | import "text/template" |
| 4 | |
| 5 | type App struct { |
| 6 | Name string |
| 7 | Templates []*template.Template |
| 8 | } |
| 9 | |
| 10 | func CreateAppIngressPrivate(tmpls *template.Template) App { |
| 11 | return App{ |
| 12 | "ingress-private", |
| 13 | []*template.Template{ |
| 14 | tmpls.Lookup("vpn-mesh-config.yaml"), |
| 15 | tmpls.Lookup("ingress-private.yaml"), |
| 16 | tmpls.Lookup("certificate-issuer.yaml"), |
| 17 | }, |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | func CreateAppCoreAuth(tmpls *template.Template) App { |
| 22 | return App{ |
| 23 | "core-auth", |
| 24 | []*template.Template{ |
| 25 | tmpls.Lookup("core-auth-storage.yaml"), |
| 26 | tmpls.Lookup("core-auth.yaml"), |
| 27 | }, |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | func CreateAppVaultwarden(tmpls *template.Template) App { |
| 32 | return App{ |
| 33 | "vaultwarden", |
| 34 | []*template.Template{ |
| 35 | tmpls.Lookup("vaultwarden.yaml"), |
| 36 | }, |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | func CreateAppMatrix(tmpls *template.Template) App { |
| 41 | return App{ |
| 42 | "matrix", |
| 43 | []*template.Template{ |
| 44 | tmpls.Lookup("matrix-storage.yaml"), |
| 45 | tmpls.Lookup("matrix.yaml"), |
| 46 | }, |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | func CreateAppPihole(tmpls *template.Template) App { |
| 51 | return App{ |
| 52 | "pihole", |
| 53 | []*template.Template{ |
| 54 | tmpls.Lookup("pihole.yaml"), |
| 55 | }, |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | func CreateAppMaddy(tmpls *template.Template) App { |
| 60 | return App{ |
| 61 | "maddy", |
| 62 | []*template.Template{ |
| 63 | tmpls.Lookup("maddy.yaml"), |
| 64 | }, |
| 65 | } |
| 66 | } |