mirror of
https://github.com/hanzo-cpp/sdk.git
synced 2026-11-20 19:55:32 +00:00
The projection these were generated from was a month old and predated the compute migration, so every one of them described /v1/visor — which the API serves at zero paths now. That is why a hand-written console client and a generated one had drifted the same way at the same time. No /v1/visor path survives here. The word still appears as a source-plane value and inside gvisor and supervisor, which are not this rename.
138 lines
5.8 KiB
C++
138 lines
5.8 KiB
C++
/**
|
||
* Hanzo Cloud API
|
||
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||
*
|
||
* The version of the OpenAPI document: v1
|
||
*
|
||
* NOTE: This class is auto generated by OpenAPI-Generator 7.14.0.
|
||
* https://openapi-generator.tech
|
||
* Do not edit the class manually.
|
||
*/
|
||
|
||
/*
|
||
* FlagApi.h
|
||
*
|
||
*
|
||
*/
|
||
|
||
#ifndef HANZO_API_FlagApi_H_
|
||
#define HANZO_API_FlagApi_H_
|
||
|
||
|
||
|
||
#include "hanzo/ApiClient.h"
|
||
|
||
#include "hanzo/model/ActivityOut.h"
|
||
#include "hanzo/AnyType.h"
|
||
#include "hanzo/model/DefRow.h"
|
||
#include "hanzo/model/DefsOut.h"
|
||
#include "hanzo/model/DeletedOut.h"
|
||
#include "hanzo/model/EvaluateIn.h"
|
||
#include "hanzo/model/HealthOut.h"
|
||
#include <cpprest/details/basic_types.h>
|
||
#include <boost/optional.hpp>
|
||
|
||
namespace hanzo {
|
||
namespace api {
|
||
|
||
using namespace hanzo::model;
|
||
|
||
|
||
|
||
class FlagApi
|
||
{
|
||
public:
|
||
|
||
explicit FlagApi( std::shared_ptr<const ApiClient> apiClient );
|
||
|
||
virtual ~FlagApi();
|
||
|
||
/// <summary>
|
||
/// Removes one flag definition by key and records the deletion in the change log.
|
||
/// </summary>
|
||
/// <remarks>
|
||
/// Removes one flag definition by key and records the deletion in the change log. A key the caller's store does not hold is a 404.
|
||
/// </remarks>
|
||
/// <param name="key">Key is the flag key to act on, from the path.</param>
|
||
pplx::task<std::shared_ptr<DeletedOut>> deleteFlagDefsByKey(
|
||
utility::string_t key
|
||
) const;
|
||
/// <summary>
|
||
/// Returns the caller's flag change log newest-first: every create, update and delete, with the actor and the time.
|
||
/// </summary>
|
||
/// <remarks>
|
||
/// Returns the caller's flag change log newest-first: every create, update and delete, with the actor and the time.
|
||
/// </remarks>
|
||
/// <param name="limit">Limit caps the rows returned. 1–500; anything else takes the default 100. (optional, default to 0L)</param>
|
||
pplx::task<std::shared_ptr<ActivityOut>> getFlagActivity(
|
||
boost::optional<int64_t> limit
|
||
) const;
|
||
/// <summary>
|
||
/// Returns every flag definition in the caller's (org, project) store, by key, with its version and who last changed it.
|
||
/// </summary>
|
||
/// <remarks>
|
||
/// Returns every flag definition in the caller's (org, project) store, by key, with its version and who last changed it.
|
||
/// </remarks>
|
||
pplx::task<std::shared_ptr<DefsOut>> getFlagDefs(
|
||
) const;
|
||
/// <summary>
|
||
/// Returns one flag definition by key, or 404 when the caller's store has none under that key.
|
||
/// </summary>
|
||
/// <remarks>
|
||
/// Returns one flag definition by key, or 404 when the caller's store has none under that key.
|
||
/// </remarks>
|
||
/// <param name="key">Key is the flag key to act on, from the path.</param>
|
||
pplx::task<std::shared_ptr<DefRow>> getFlagDefsByKey(
|
||
utility::string_t key
|
||
) const;
|
||
/// <summary>
|
||
/// Health reports that the flag engine is serving.
|
||
/// </summary>
|
||
/// <remarks>
|
||
/// Health reports that the flag engine is serving. It is not gated: liveness must be probe-able without a token.
|
||
/// </remarks>
|
||
pplx::task<std::shared_ptr<HealthOut>> getFlagHealth(
|
||
) const;
|
||
/// <summary>
|
||
/// Evaluate runs the caller's flag definitions for one identity and returns the flag verdict: which flags are on (or which variant), their payloads, and whether any definition failed to compute.
|
||
/// </summary>
|
||
/// <remarks>
|
||
/// Evaluate runs the caller's flag definitions for one identity and returns the flag verdict: which flags are on (or which variant), their payloads, and whether any definition failed to compute. Evaluation is in-process over the caller's own (org, project) definitions — no network hop, no shared KV — so a tenant can only ever evaluate its own flags.
|
||
/// </remarks>
|
||
/// <param name="evaluateIn"></param>
|
||
pplx::task<std::shared_ptr<AnyType>> postFlag(
|
||
std::shared_ptr<EvaluateIn> evaluateIn
|
||
) const;
|
||
/// <summary>
|
||
/// Evaluate runs the caller's flag definitions for one identity and returns the flag verdict: which flags are on (or which variant), their payloads, and whether any definition failed to compute.
|
||
/// </summary>
|
||
/// <remarks>
|
||
/// Evaluate runs the caller's flag definitions for one identity and returns the flag verdict: which flags are on (or which variant), their payloads, and whether any definition failed to compute. Evaluation is in-process over the caller's own (org, project) definitions — no network hop, no shared KV — so a tenant can only ever evaluate its own flags.
|
||
/// </remarks>
|
||
/// <param name="evaluateIn"></param>
|
||
pplx::task<std::shared_ptr<AnyType>> postFlagDecide(
|
||
std::shared_ptr<EvaluateIn> evaluateIn
|
||
) const;
|
||
/// <summary>
|
||
/// Creates or replaces the flag definition at the path's key and returns the stored row.
|
||
/// </summary>
|
||
/// <remarks>
|
||
/// Creates or replaces the flag definition at the path's key and returns the stored row. The BODY IS THE DEFINITION DOCUMENT — the flag-definition JSON object the evaluator consumes — and it is stored verbatim except that its \"key\" is forced to the key in the URL, so a document can never be filed under a name other than the one it was addressed by. Every write bumps the version and appends to the change log under the caller's identity.
|
||
/// </remarks>
|
||
/// <param name="key">Key is the flag key to write, from the path.</param>
|
||
/// <param name="body"></param>
|
||
pplx::task<std::shared_ptr<DefRow>> putFlagDefsByKey(
|
||
utility::string_t key,
|
||
std::shared_ptr<AnyType> body
|
||
) const;
|
||
|
||
protected:
|
||
std::shared_ptr<const ApiClient> m_ApiClient;
|
||
};
|
||
|
||
}
|
||
}
|
||
|
||
#endif /* HANZO_API_FlagApi_H_ */
|
||
|