SetupAPI
public class SetupAPI
-
Declaration
Swift
public init(influxDB2API: InfluxDB2API)
-
Check if database has default user, org, bucket
Declaration
Swift
public func getSetup(zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: IsOnboarding?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
getSetup(zapTraceSpan:
AsynchronousapiResponseQueue: ) Check if database has default user, org, bucket
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func getSetup(zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> IsOnboarding?
Parameters
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Set up initial user, org and bucket
Declaration
Swift
public func postSetup(onboardingRequest: OnboardingRequest, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: OnboardingResponse?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
onboardingRequest
(body) Source to create
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Set up initial user, org and bucket
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func postSetup(onboardingRequest: OnboardingRequest, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> OnboardingResponse?
Parameters
onboardingRequest
(body) Source to create
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects