|
| 1 | +package firebase |
| 2 | + |
| 3 | +// Based on https://github.com/firebase/firebase-tools/blob/master/src/firebaseConfig.ts |
| 4 | + |
| 5 | +type EmulatorsConfig struct { |
| 6 | + SingleProjectMode bool `json:"singleProjectMode,omitempty"` |
| 7 | + |
| 8 | + Auth struct { |
| 9 | + Host string `json:"host,omitempty"` |
| 10 | + Port int `json:"port,omitempty"` |
| 11 | + } `json:"auth,omitempty"` |
| 12 | + |
| 13 | + Database struct { |
| 14 | + Host string `json:"host,omitempty"` |
| 15 | + Port int `json:"port,omitempty"` |
| 16 | + } `json:"database,omitempty"` |
| 17 | + |
| 18 | + Firestore struct { |
| 19 | + Host string `json:"host,omitempty"` |
| 20 | + Port int `json:"port,omitempty"` |
| 21 | + WebsocketPort int `json:"websocketPort,omitempty"` |
| 22 | + } `json:"firestore,omitempty"` |
| 23 | + |
| 24 | + Functions struct { |
| 25 | + Host string `json:"host,omitempty"` |
| 26 | + Port int `json:"port,omitempty"` |
| 27 | + } `json:"functions,omitempty"` |
| 28 | + |
| 29 | + Hosting struct { |
| 30 | + Host string `json:"host,omitempty"` |
| 31 | + Port int `json:"port,omitempty"` |
| 32 | + } `json:"hosting,omitempty"` |
| 33 | + |
| 34 | + AppHosting struct { |
| 35 | + Host string `json:"host,omitempty"` |
| 36 | + Port int `json:"port,omitempty"` |
| 37 | + StartCommand string `json:"startCommand,omitempty"` |
| 38 | + RootDirectory string `json:"rootDirectory,omitempty"` |
| 39 | + } `json:"apphosting,omitempty"` |
| 40 | + |
| 41 | + PubSub struct { |
| 42 | + Host string `json:"host,omitempty"` |
| 43 | + Port int `json:"port,omitempty"` |
| 44 | + } `json:"pubsub,omitempty"` |
| 45 | + |
| 46 | + Storage struct { |
| 47 | + Host string `json:"host,omitempty"` |
| 48 | + Port int `json:"port,omitempty"` |
| 49 | + } `json:"storage,omitempty"` |
| 50 | + |
| 51 | + Logging struct { |
| 52 | + Host string `json:"host,omitempty"` |
| 53 | + Port int `json:"port,omitempty"` |
| 54 | + } `json:"logging,omitempty"` |
| 55 | + |
| 56 | + Hub struct { |
| 57 | + Host string `json:"host,omitempty"` |
| 58 | + Port int `json:"port,omitempty"` |
| 59 | + } `json:"hub,omitempty"` |
| 60 | + |
| 61 | + UI struct { |
| 62 | + Enabled bool `json:"enabled,omitempty"` |
| 63 | + Host string `json:"host,omitempty"` |
| 64 | + Port int `json:"port,omitempty"` |
| 65 | + } `json:"ui,omitempty"` |
| 66 | + |
| 67 | + EventArc struct { |
| 68 | + Host string `json:"host,omitempty"` |
| 69 | + Port int `json:"port,omitempty"` |
| 70 | + } `json:"eventarc,omitempty"` |
| 71 | + |
| 72 | + DataConnect struct { |
| 73 | + Host string `json:"host,omitempty"` |
| 74 | + Port int `json:"port,omitempty"` |
| 75 | + PostgresHost string `json:"postgresHost,omitempty"` |
| 76 | + PostgresPort int `json:"postgresPort,omitempty"` |
| 77 | + DataDir string `json:"dataDir,omitempty"` |
| 78 | + } `json:"dataconnect,omitempty"` |
| 79 | + |
| 80 | + Tasks struct { |
| 81 | + Host string `json:"host,omitempty"` |
| 82 | + Port int `json:"port,omitempty"` |
| 83 | + } `json:"tasks,omitempty"` |
| 84 | +} |
| 85 | +type FirebaseConfig struct { |
| 86 | + Emulators EmulatorsConfig `json:"emulators,omitempty"` |
| 87 | +} |
0 commit comments