Conversation
Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
Get basic linting tests in place
Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
Add come certificate helpers
This is the same latest we use in fioctl - easier dev process Signed-off-by: Volodymyr Khoroz <volodymyr.khoroz@foundries.io>
Signed-off-by: Volodymyr Khoroz <volodymyr.khoroz@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io> Signed-off-by: Volodymyr Khoroz <volodymyr.khoroz@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io> Signed-off-by: Volodymyr Khoroz <volodymyr.khoroz@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io> Signed-off-by: Volodymyr Khoroz <volodymyr.khoroz@foundries.io>
This allows us to store bigger files like hardware-info and such outside of the database. Signed-off-by: Andy Doan <andy@foundries.io> Signed-off-by: Volodymyr Khoroz <volodymyr.khoroz@foundries.io>
This was spotted by QGenie Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Volodymyr Khoroz <volodymyr.khoroz@foundries.io>
An idea is to pass log inside context to all underlying functions. Log context is initialized at the top-most application level. Common context package is separated to allow access to it from other packages. Third-party packages which do not support slog will be directed to it via a configured bridge. Signed-off-by: Volodymyr Khoroz <volodymyr.khoroz@foundries.io>
Signed-off-by: Volodymyr Khoroz <volodymyr.khoroz@foundries.io>
Signed-off-by: Volodymyr Khoroz <volodymyr.khoroz@foundries.io>
server: skeleton for api and gateway servers
This works in unit tests somehow but was failing under `go run ...` Signed-off-by: Andy Doan <andy@foundries.io>
This change fixes a couple of problems: * The ApiAddress and GatewayAddress struct members were showing up as CLI arguments the user could set. eg: `server --apiaddress=localhost` * `go run ... serve` was failing because it didn't call the `NewServer` function. All of that was tied to the test code needing to wait for the server to start. This change introduces a single, optional callback function that can be used by server_test.go to know when the server is ready. Signed-off-by: Andy Doan <andy@foundries.io>
Server fixes for main
This code introduces a way to define new REST API handlers and test them. Rather than spin up entire HTTP servers like we've done in the past, I'm leaning more on the httptest module to make this easier and faster. Signed-off-by: Andy Doan <andy@foundries.io>
This is very similar to the previous request. However, it also must set an x509.Certificate in request created by httptest.NewRequest so that our middleware can validate the device's certificate. Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
This follows the usual pattern of our projects and makes it easy to launch a shell where you can develop from with all the necessary dependencies in place. Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
Add contrib directory for local development helpers
This can be pretty helpful when debugging why your devices can't communicate with a server Signed-off-by: Andy Doan <andy@foundries.io>
0a3d64b to
7216879
Compare
Signed-off-by: Andy Doan <andy@foundries.io> Signed-off-by: Volodymyr Khoroz <volodymyr.khoroz@foundries.io>
The callers of these APIs get their content as bytes so this removes some extraneous marshalling logic. Furthermore, we have code in the future that needs to save binary content from an io stream. Signed-off-by: Andy Doan <andy@foundries.io>
We have code in fiotest logic that needs to be able to get the raw byte stream. Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
This module is mostly place holder for future user management in this product. For now, we fake out a user. Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.