Documentation ¶
Overview ¶
Package api handles the api routes and related funtionality.
ADMIN ROUTES (requires X-AUTH-TOKEN)
| Action | Route | Description | Payload | Output | |--------|---------------|----------------------|----------------------------------|-----------------| | GET | /add-token | Adds a user token | 'X-USER-TOKEN' Header with token | Success message | | GET | /remove-token | Removes a user token | 'X-USER-TOKEN' Header with token | Success message |
USER ROUTES (requires X-USER-TOKEN)
| Action | Route | Description | Payload | Output | |--------|-------|-------------------|----------------------------------|-----------------| | POST | /logs | Publish a log | 'X-USER-TOKEN' Header with token | Success message | | GET | /logs | Fetch stored logs | 'X-USER-TOKEN' Header with token | Success message |
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateArchiveEndpoint ¶
func GenerateArchiveEndpoint(archive drain.ArchiverDrain) http.HandlerFunc
GenerateArchiveEndpoint generates the endpoint for fetching filtered logs note: javascript number precision may cause unexpected results (missing logs within 100 nanosecond window)
func Start ¶
func Start(collector http.HandlerFunc) error
Start starts the web server with the logvac functions
Types ¶
This section is empty.