package
0.0.0-20250307055322-04d9774b42d2
Repository: https://github.com/snetsystems/cloudhub.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
Convert changes an InfluxQL query to a QueryConfig.
CreateTransport create a new transport.
DefaultAuthorization creates either a shared JWT builder, basic auth or Noop or Token authentication.
Difference compares two permission sets and returns a set to be revoked and a set to be added.
JWT returns a token string accepted by InfluxDB using the sharedSecret as an Authorization: Bearer header.
NewAnnotationStore constructs an annoation store with a client.
ParseTime extracts the duration of the time range of the query.
SharedTransport returns a shared transport with requested TLS InsecureSkipVerify value.
TimeRangeAsEpochNano extracs the min and max epoch times from the expression.
ToGrant converts the permission into InfluxQL grants.
ToInfluxQL converts the permission into InfluxQL.
ToPriv converts cloudhub allowances to InfluxQL.
ToRevoke converts the permission into InfluxQL revokes.
# Constants
AllAnnotations returns all annotations from the CloudHub database.
AnnotationsDB is CloudHub.
DefaultMeasurement is annotations.
DefaultRP is autogen.
GetAnnotationID returns all annotations from the CloudHub database where id is %s.
WhereToken is used to parse the time expression from an influxql query.
# Variables
All means a user has both read and write perms.
AllowAllAdmin means a user gets both read and write permissions for an admin.
AllowAllDB means a user gets both read and write permissions for a db.
AllowRead means a user is only able to read the database.
AllowWrite means a user is able to only write to the database.
AllPrivileges means that a user has both read and write perms.
NoPrivileges occasionally shows up as a response for a users grants.
Read means a user can read a database.
Write means a user can write to a database.
# Structs
AnnotationStore stores annotations within InfluxDB.
BasicAuth adds Authorization: Basic to the request header.
BearerJWT is the default Bearer for InfluxDB.
Client is a device for retrieving time series data from an InfluxDB instance.
NoAuthorization does not add any authorization headers.
TokenAuth adds Authorization: Token to the request header.
# Interfaces
Authorizer adds optional authorization header to request.
# Type aliases
Now returns the current time.