-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable GraphQL endpoints to be defined in the manifest (#464)
- Loading branch information
1 parent
b0f3605
commit 1b06fb5
Showing
48 changed files
with
604 additions
and
294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Copyright 2024 Hypermode Inc. | ||
* Licensed under the terms of the Apache License, Version 2.0 | ||
* See the LICENSE file that accompanied this code for further details. | ||
* | ||
* SPDX-FileCopyrightText: 2024 Hypermode Inc. <hello@hypermode.com> | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package manifest | ||
|
||
type EndpointInfo interface { | ||
EndpointName() string | ||
EndpointType() EndpointType | ||
EndpointAuth() EndpointAuthType | ||
} | ||
|
||
type EndpointType string | ||
|
||
const ( | ||
EndpointTypeGraphQL EndpointType = "graphql" | ||
) | ||
|
||
type EndpointAuthType string | ||
|
||
const ( | ||
EndpointAuthNone EndpointAuthType = "none" | ||
EndpointAuthBearerToken EndpointAuthType = "bearer-token" | ||
) | ||
|
||
type GraphqlEndpointInfo struct { | ||
Name string `json:"-"` | ||
Type EndpointType `json:"type"` | ||
Path string `json:"path"` | ||
Auth EndpointAuthType `json:"auth"` | ||
} | ||
|
||
func (e GraphqlEndpointInfo) EndpointName() string { | ||
return e.Name | ||
} | ||
|
||
func (e GraphqlEndpointInfo) EndpointType() EndpointType { | ||
return e.Type | ||
} | ||
|
||
func (e GraphqlEndpointInfo) EndpointAuth() EndpointAuthType { | ||
return e.Auth | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.