(ctx context.Context, obj interface{})
| 7107 | } |
| 7108 | |
| 7109 | func (ec *executionContext) unmarshalInputPostgresInput(ctx context.Context, obj interface{}) (model.PostgresInput, error) { |
| 7110 | var it model.PostgresInput |
| 7111 | asMap := map[string]interface{}{} |
| 7112 | for k, v := range obj.(map[string]interface{}) { |
| 7113 | asMap[k] = v |
| 7114 | } |
| 7115 | |
| 7116 | fieldsInOrder := [...]string{"external", "host", "port", "username", "password", "database", "SSLMode", "timezone"} |
| 7117 | for _, k := range fieldsInOrder { |
| 7118 | v, ok := asMap[k] |
| 7119 | if !ok { |
| 7120 | continue |
| 7121 | } |
| 7122 | switch k { |
| 7123 | case "external": |
| 7124 | ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("external")) |
| 7125 | data, err := ec.unmarshalNBoolean2bool(ctx, v) |
| 7126 | if err != nil { |
| 7127 | return it, err |
| 7128 | } |
| 7129 | it.External = data |
| 7130 | case "host": |
| 7131 | ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("host")) |
| 7132 | data, err := ec.unmarshalNString2string(ctx, v) |
| 7133 | if err != nil { |
| 7134 | return it, err |
| 7135 | } |
| 7136 | it.Host = data |
| 7137 | case "port": |
| 7138 | ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("port")) |
| 7139 | data, err := ec.unmarshalNInt2int(ctx, v) |
| 7140 | if err != nil { |
| 7141 | return it, err |
| 7142 | } |
| 7143 | it.Port = data |
| 7144 | case "username": |
| 7145 | ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("username")) |
| 7146 | data, err := ec.unmarshalNString2string(ctx, v) |
| 7147 | if err != nil { |
| 7148 | return it, err |
| 7149 | } |
| 7150 | it.Username = data |
| 7151 | case "password": |
| 7152 | ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("password")) |
| 7153 | data, err := ec.unmarshalNString2string(ctx, v) |
| 7154 | if err != nil { |
| 7155 | return it, err |
| 7156 | } |
| 7157 | it.Password = data |
| 7158 | case "database": |
| 7159 | ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("database")) |
| 7160 | data, err := ec.unmarshalNString2string(ctx, v) |
| 7161 | if err != nil { |
| 7162 | return it, err |
| 7163 | } |
| 7164 | it.Database = data |
| 7165 | case "SSLMode": |
| 7166 | ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("SSLMode")) |
no test coverage detected