github.com/influxdata/influxdb/v2@v2.7.6/remote_connection.go (about)

     1  package influxdb
     2  
     3  import (
     4  	"github.com/influxdata/influxdb/v2/kit/platform"
     5  )
     6  
     7  // RemoteConnection contains all info about a remote InfluxDB instance that should be returned to users.
     8  // Note that the auth token used by the request is *not* included here.
     9  type RemoteConnection struct {
    10  	ID               platform.ID  `json:"id" db:"id"`
    11  	OrgID            platform.ID  `json:"orgID" db:"org_id"`
    12  	Name             string       `json:"name" db:"name"`
    13  	Description      *string      `json:"description,omitempty" db:"description"`
    14  	RemoteURL        string       `json:"remoteURL" db:"remote_url"`
    15  	RemoteOrgID      *platform.ID `json:"remoteOrgID" db:"remote_org_id"`
    16  	AllowInsecureTLS bool         `json:"allowInsecureTLS" db:"allow_insecure_tls"`
    17  }
    18  
    19  // RemoteConnectionListFilter is a selection filter for listing remote InfluxDB instances.
    20  type RemoteConnectionListFilter struct {
    21  	OrgID     platform.ID
    22  	Name      *string
    23  	RemoteURL *string
    24  }
    25  
    26  // RemoteConnections is a collection of metadata about remote InfluxDB instances.
    27  type RemoteConnections struct {
    28  	Remotes []RemoteConnection `json:"remotes"`
    29  }
    30  
    31  // CreateRemoteConnectionRequest contains all info needed to establish a new connection to a remote
    32  // InfluxDB instance.
    33  type CreateRemoteConnectionRequest struct {
    34  	OrgID            platform.ID  `json:"orgID"`
    35  	Name             string       `json:"name"`
    36  	Description      *string      `json:"description,omitempty"`
    37  	RemoteURL        string       `json:"remoteURL"`
    38  	RemoteToken      string       `json:"remoteAPIToken"`
    39  	RemoteOrgID      *platform.ID `json:"remoteOrgID"`
    40  	AllowInsecureTLS bool         `json:"allowInsecureTLS"`
    41  }
    42  
    43  // UpdateRemoteConnectionRequest contains a partial update to existing info about a remote InfluxDB instance.
    44  type UpdateRemoteConnectionRequest struct {
    45  	Name             *string      `json:"name,omitempty"`
    46  	Description      *string      `json:"description,omitempty"`
    47  	RemoteURL        *string      `json:"remoteURL,omitempty"`
    48  	RemoteToken      *string      `json:"remoteAPIToken,omitempty"`
    49  	RemoteOrgID      *platform.ID `json:"remoteOrgID,omitempty"`
    50  	AllowInsecureTLS *bool        `json:"allowInsecureTLS,omitempty"`
    51  }