| 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 | |
| giolekva | ef76a3e | 2022-01-10 12:22:28 +0400 | [diff] [blame] | 10 | func CreateAllApps(tmpls *template.Template) []App { |
| 11 | return []App{ |
| 12 | CreateAppIngressPrivate(tmpls), |
| 13 | CreateAppCoreAuth(tmpls), |
| 14 | CreateAppVaultwarden(tmpls), |
| 15 | CreateAppMatrix(tmpls), |
| 16 | CreateAppPihole(tmpls), |
| 17 | CreateAppMaddy(tmpls), |
| 18 | CreateAppQBittorrent(tmpls), |
| 19 | CreateAppJellyfin(tmpls), |
| 20 | } |
| 21 | } |
| 22 | |
| giolekva | 050609f | 2021-12-29 15:51:40 +0400 | [diff] [blame] | 23 | func CreateAppIngressPrivate(tmpls *template.Template) App { |
| 24 | return App{ |
| 25 | "ingress-private", |
| 26 | []*template.Template{ |
| 27 | tmpls.Lookup("vpn-mesh-config.yaml"), |
| 28 | tmpls.Lookup("ingress-private.yaml"), |
| 29 | tmpls.Lookup("certificate-issuer.yaml"), |
| 30 | }, |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | func CreateAppCoreAuth(tmpls *template.Template) App { |
| 35 | return App{ |
| 36 | "core-auth", |
| 37 | []*template.Template{ |
| 38 | tmpls.Lookup("core-auth-storage.yaml"), |
| 39 | tmpls.Lookup("core-auth.yaml"), |
| 40 | }, |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | func CreateAppVaultwarden(tmpls *template.Template) App { |
| 45 | return App{ |
| 46 | "vaultwarden", |
| 47 | []*template.Template{ |
| 48 | tmpls.Lookup("vaultwarden.yaml"), |
| 49 | }, |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | func CreateAppMatrix(tmpls *template.Template) App { |
| 54 | return App{ |
| 55 | "matrix", |
| 56 | []*template.Template{ |
| 57 | tmpls.Lookup("matrix-storage.yaml"), |
| 58 | tmpls.Lookup("matrix.yaml"), |
| 59 | }, |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | func CreateAppPihole(tmpls *template.Template) App { |
| 64 | return App{ |
| 65 | "pihole", |
| 66 | []*template.Template{ |
| 67 | tmpls.Lookup("pihole.yaml"), |
| 68 | }, |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | func CreateAppMaddy(tmpls *template.Template) App { |
| 73 | return App{ |
| 74 | "maddy", |
| 75 | []*template.Template{ |
| 76 | tmpls.Lookup("maddy.yaml"), |
| 77 | }, |
| 78 | } |
| 79 | } |
| giolekva | ef76a3e | 2022-01-10 12:22:28 +0400 | [diff] [blame] | 80 | |
| 81 | func CreateAppQBittorrent(tmpls *template.Template) App { |
| 82 | return App{ |
| 83 | "qbittorrent", |
| 84 | []*template.Template{ |
| 85 | tmpls.Lookup("qbittorrent.yaml"), |
| 86 | }, |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | func CreateAppJellyfin(tmpls *template.Template) App { |
| 91 | return App{ |
| 92 | "jellyfin", |
| 93 | []*template.Template{ |
| 94 | tmpls.Lookup("jellyfin.yaml"), |
| 95 | }, |
| 96 | } |
| 97 | } |