DTOs.hpp

This File On Github
Ask A Question

API: latest
module: oatpp-consul
#include "oatpp-consul/rest/DTOs.hpp"

KVMetadata

DTO object representing Consul KV Metadata Response.
For More info see Consul KV Store Endpoints.

namespace oatpp { namespace consul { namespace rest { 
  class KVMetadata : public oatpp::data::mapping::type::Object {}
}}}

Fields

Type Name Summary
String key Full path of the entry.
String value Value.
May contain base64 encoded value if no "raw" parameter were specified in request ex.:"v1/kv/{key}?raw".
String session Session.
Int32 createIndex Internal index value that represents when the entry was created.
Int32 modifyIndex Last index that modified this key.
Int32 lockIndex The number of times this key has successfully been acquired in a lock. If the lock is held, the Session key provides the session that owns the lock.
Int32 flags An opaque unsigned integer that can be attached to each entry.

Methods

Return Type Name Summary
String getValueDecoded Get base64 decoded KVMetadata::value.

KVMetadata::key

Full path of the entry.

DTO_FIELD(String, key, "Key")

KVMetadata::value

Value.
May contain base64 encoded value if no "raw" parameter were specified in request ex.:"v1/kv/{key}?raw".

DTO_FIELD(String, value, "Value")

KVMetadata::session

Session.

DTO_FIELD(String, session, "Session")

KVMetadata::createIndex

Internal index value that represents when the entry was created.

DTO_FIELD(Int32, createIndex, "CreateIndex")

KVMetadata::modifyIndex

Last index that modified this key.

DTO_FIELD(Int32, modifyIndex, "ModifyIndex")

KVMetadata::lockIndex

The number of times this key has successfully been acquired in a lock. If the lock is held, the Session key provides the session that owns the lock.

DTO_FIELD(Int32, lockIndex, "LockIndex")

KVMetadata::flags

An opaque unsigned integer that can be attached to each entry.

DTO_FIELD(Int32, flags, "Flags")

KVMetadata::getValueDecoded

Get base64 decoded KVMetadata::value.

String getValueDecoded() const

AgentCheckRegisterPayload

DTO Object representing Consul Agent Register Check.
For more information see Consul Agent Register Check.

namespace oatpp { namespace consul { namespace rest { 
  class AgentCheckRegisterPayload : public oatpp::data::mapping::type::Object {}
}}}

Fields

Type Name Summary
String name Name of the check.
String id Unique ID for this check on the node.
String interval Frequency at which to run this check.
String notes Arbitrary information.
String deregisterCriticalServiceAfter Specifies that checks associated with a service should deregister after this time.
List<String>::ObjectWrapper args Command arguments to run to update the status of the check.
String dockerContainerID Specifies that the check is a Docker check.
String grpc Specifies a gRPC check's endpoint that supports the standard gRPC health checking protocol.
Boolean grpcUseTLS Set trueto use TLS for this gRPC health check.
String http HTTP check's endpoint. Default Method is GET.
String method Specifies a different HTTP method to be used for an HTTP check. If not specified GET is used.
Fields<List<String>::ObjectWrapper>::ObjectWrapper header Set of headers that should be set for HTTP checks.
String timeout Timeout for outgoing connections
Boolean tlsSkipVerify Specifies if the certificate for an HTTPS check should not be verified.
String tcp Specifies a TCP to connect against the value of TCP (expected to be an IP or hostname plus port combination) every Interval.
String ttl Specifies this is a TTL check, and the TTL endpoint must be used periodically to update the state of the check.
String serviceID Specifies the ID of a service to associate the registered check with an existing service provided by the agent.
String status Initial status of the health check.

AgentCheckRegisterPayload::name

Name of the check.

DTO_FIELD(String, name, "Name")

AgentCheckRegisterPayload::id

Unique ID for this check on the node.

DTO_FIELD(String, id, "ID")

AgentCheckRegisterPayload::interval

Frequency at which to run this check.

DTO_FIELD(String, interval, "Interval")

AgentCheckRegisterPayload::notes

Arbitrary information.

DTO_FIELD(String, notes, "Notes")

AgentCheckRegisterPayload::deregisterCriticalServiceAfter

Specifies that checks associated with a service should deregister after this time.

DTO_FIELD(String, deregisterCriticalServiceAfter, "DeregisterCriticalServiceAfter")

AgentCheckRegisterPayload::args

Command arguments to run to update the status of the check.

DTO_FIELD(List<String>::ObjectWrapper, args, "Args")

AgentCheckRegisterPayload::dockerContainerID

Specifies that the check is a Docker check.

DTO_FIELD(String, dockerContainerID, "DockerContainerID")

AgentCheckRegisterPayload::grpc

Specifies a gRPC check's endpoint that supports the standard gRPC health checking protocol.

DTO_FIELD(String, grpc, "GRPC")

AgentCheckRegisterPayload::grpcUseTLS

Set trueto use TLS for this gRPC health check.

DTO_FIELD(Boolean, grpcUseTLS, "GRPCUseTLS")

AgentCheckRegisterPayload::http

HTTP check's endpoint. Default Method is GET.

DTO_FIELD(String, http, "HTTP")

AgentCheckRegisterPayload::method

Specifies a different HTTP method to be used for an HTTP check. If not specified GET is used.

DTO_FIELD(String, method, "Method")

AgentCheckRegisterPayload::header

Set of headers that should be set for HTTP checks.

DTO_FIELD(Fields<List<String>::ObjectWrapper>::ObjectWrapper, header, "Header")

AgentCheckRegisterPayload::timeout

Timeout for outgoing connections

DTO_FIELD(String, timeout, "Timeout")

AgentCheckRegisterPayload::tlsSkipVerify

Specifies if the certificate for an HTTPS check should not be verified.

DTO_FIELD(Boolean, tlsSkipVerify, "TLSSkipVerify")

AgentCheckRegisterPayload::tcp

Specifies a TCP to connect against the value of TCP (expected to be an IP or hostname plus port combination) every Interval.

DTO_FIELD(String, tcp, "TCP")

AgentCheckRegisterPayload::ttl

Specifies this is a TTL check, and the TTL endpoint must be used periodically to update the state of the check.

DTO_FIELD(String, ttl, "TTL")

AgentCheckRegisterPayload::serviceID

Specifies the ID of a service to associate the registered check with an existing service provided by the agent.

DTO_FIELD(String, serviceID, "ServiceID")

AgentCheckRegisterPayload::status

Initial status of the health check.

DTO_FIELD(String, status, "Status")

AgentServiceRegisterPayload

DTO Object representing Consul Agent Register Service.
For more information see Consul Agent Register Service.

namespace oatpp { namespace consul { namespace rest { 
  class AgentServiceRegisterPayload : public oatpp::data::mapping::type::Object {}
}}}

Fields

Type Name Summary
String name Logical name of the service.
String id Unique ID for this service.
List<String>::ObjectWrapper tags List of tags to assign to the service.
String address Specifies the address of the service. If not provided, the agent's address is used as the address for the service during DNS queries.
Fields<String>::ObjectWrapper meta Specifies arbitrary KV metadata linked to the service instance.
Int32 port Port of the service.
String kind The kind of service. Defaults to "" which is a typical Consul service. This value may also be "connect-proxy" for services that are Connect-capable proxies representing another service.
String proxyDestination Deprecated.
AgentCheckRegisterPayload::ObjectWrapper check AgentCheckRegisterPayload.
List<AgentCheckRegisterPayload::ObjectWrapper>::ObjectWrapper checks List of AgentCheckRegisterPayload.
Boolean enableTagOverride Specifies to disable the anti-entropy feature for this service's tags.

AgentServiceRegisterPayload::name

Logical name of the service.

DTO_FIELD(String, name, "Name")

AgentServiceRegisterPayload::id

Unique ID for this service.

DTO_FIELD(String, id, "ID")

AgentServiceRegisterPayload::tags

List of tags to assign to the service.

DTO_FIELD(List<String>::ObjectWrapper, tags, "Tags")

AgentServiceRegisterPayload::address

Specifies the address of the service. If not provided, the agent's address is used as the address for the service during DNS queries.

DTO_FIELD(String, address, "Address")

AgentServiceRegisterPayload::meta

Specifies arbitrary KV metadata linked to the service instance.

DTO_FIELD(Fields<String>::ObjectWrapper, meta, "Meta")

AgentServiceRegisterPayload::port

Port of the service.

DTO_FIELD(Int32, port, "Port")

AgentServiceRegisterPayload::kind

The kind of service. Defaults to "" which is a typical Consul service. This value may also be "connect-proxy" for services that are Connect-capable proxies representing another service.

DTO_FIELD(String, kind, "Kind")

AgentServiceRegisterPayload::proxyDestination

Deprecated.

DTO_FIELD(String, proxyDestination, "ProxyDestination")

AgentServiceRegisterPayload::check

AgentCheckRegisterPayload.

DTO_FIELD(AgentCheckRegisterPayload::ObjectWrapper, check, "Check")

AgentServiceRegisterPayload::checks

List of AgentCheckRegisterPayload.

DTO_FIELD(List<AgentCheckRegisterPayload::ObjectWrapper>::ObjectWrapper, checks, "Checks")

AgentServiceRegisterPayload::enableTagOverride

Specifies to disable the anti-entropy feature for this service's tags.

DTO_FIELD(Boolean, enableTagOverride, "EnableTagOverride")