-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
1,560 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
HONU_MAINTENANCE=false | ||
HONU_LOG_LEVEL=info | ||
HONU_CONSOLE_LOG=true | ||
HONU_BIND_ADDR=127.0.0.1:3264 |
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,37 @@ | ||
package api | ||
|
||
import "context" | ||
|
||
//=========================================================================== | ||
// Service Interface | ||
//=========================================================================== | ||
|
||
// Client defines the service interface for interacting with the HonuDB service. | ||
type Client interface { | ||
Status(context.Context) (*StatusReply, error) | ||
} | ||
|
||
//=========================================================================== | ||
// Top Level Requests and Responses | ||
//=========================================================================== | ||
|
||
// Reply contains standard fields that are used for generic API responses and errors. | ||
type Reply struct { | ||
Success bool `json:"success"` | ||
Error string `json:"error,omitempty"` | ||
ErrorDetail ErrorDetail `json:"errors,omitempty"` | ||
} | ||
|
||
// Returned on status requests. | ||
type StatusReply struct { | ||
Status string `json:"status"` | ||
Uptime string `json:"uptime,omitempty"` | ||
Version string `json:"version,omitempty"` | ||
} | ||
|
||
// PageQuery manages paginated list requests. | ||
type PageQuery struct { | ||
PageSize int `json:"page_size,omitempty" url:"page_size,omitempty" form:"page_size"` | ||
NextPageToken string `json:"next_page_token,omitempty" url:"next_page_token,omitempty" form:"next_page_token"` | ||
PrevPageToken string `json:"prev_page_token,omitempty" url:"prev_page_token,omitempty" form:"prev_page_token"` | ||
} |
Oops, something went wrong.