fix(influxdb): rename organizationID to orgID in json struct tags
Note. This may require that users blow away thier existing boltdb databases to avoid errors.pull/11049/head
parent
263b3e228d
commit
7c1372cdfc
|
@ -20,7 +20,7 @@ const InfiniteRetention = 0
|
|||
// Bucket is a bucket. 🎉
|
||||
type Bucket struct {
|
||||
ID ID `json:"id,omitempty"`
|
||||
OrganizationID ID `json:"organizationID,omitempty"`
|
||||
OrganizationID ID `json:"orgID,omitempty"`
|
||||
Organization string `json:"organization,omitempty"`
|
||||
Name string `json:"name"`
|
||||
RetentionPolicyName string `json:"rp,omitempty"` // This to support v1 sources
|
||||
|
|
|
@ -69,7 +69,7 @@ type DashboardService interface {
|
|||
// Dashboard represents all visual and query data for a dashboard.
|
||||
type Dashboard struct {
|
||||
ID ID `json:"id,omitempty"`
|
||||
OrganizationID ID `json:"organizationID,omitempty"`
|
||||
OrganizationID ID `json:"orgID,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Cells []*Cell `json:"cells"`
|
||||
|
|
|
@ -102,7 +102,7 @@ func TestService_handleGetDashboards(t *testing.T) {
|
|||
"dashboards": [
|
||||
{
|
||||
"id": "da7aba5e5d81e550",
|
||||
"organizationID": "0000000000000001",
|
||||
"orgID": "0000000000000001",
|
||||
"name": "hello",
|
||||
"description": "oh hello there!",
|
||||
"labels": [
|
||||
|
@ -143,7 +143,7 @@ func TestService_handleGetDashboards(t *testing.T) {
|
|||
},
|
||||
{
|
||||
"id": "0ca2204eca2204e0",
|
||||
"organizationID": "0000000000000001",
|
||||
"orgID": "0000000000000001",
|
||||
"name": "example",
|
||||
"description": "",
|
||||
"labels": [
|
||||
|
@ -301,7 +301,7 @@ func TestService_handleGetDashboard(t *testing.T) {
|
|||
body: `
|
||||
{
|
||||
"id": "020f755c3c082000",
|
||||
"organizationID": "0000000000000001",
|
||||
"orgID": "0000000000000001",
|
||||
"name": "hello",
|
||||
"description": "",
|
||||
"labels": [],
|
||||
|
@ -453,7 +453,7 @@ func TestService_handlePostDashboard(t *testing.T) {
|
|||
body: `
|
||||
{
|
||||
"id": "020f755c3c082000",
|
||||
"organizationID": "0000000000000001",
|
||||
"orgID": "0000000000000001",
|
||||
"name": "hello",
|
||||
"description": "howdy there",
|
||||
"labels": [],
|
||||
|
@ -691,7 +691,7 @@ func TestService_handlePatchDashboard(t *testing.T) {
|
|||
body: `
|
||||
{
|
||||
"id": "020f755c3c082000",
|
||||
"organizationID": "0000000000000001",
|
||||
"orgID": "0000000000000001",
|
||||
"name": "example",
|
||||
"description": "",
|
||||
"labels": [],
|
||||
|
|
|
@ -121,7 +121,7 @@ func (h *ProtoHandler) handleGetProtos(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
type createProtoResourcesRequest struct {
|
||||
ProtoID platform.ID `json:"-"`
|
||||
OrganizationID platform.ID `json:"organizationID"`
|
||||
OrganizationID platform.ID `json:"orgID"`
|
||||
}
|
||||
|
||||
// Decode turns an http request into a createProtoResourceRequest.
|
||||
|
|
|
@ -154,7 +154,7 @@ func TestProtoHandler(t *testing.T) {
|
|||
],
|
||||
"description": "oh hello there!",
|
||||
"id": "da7aba5e5d81e550",
|
||||
"organizationID": "0000000000000001",
|
||||
"orgID": "0000000000000001",
|
||||
"labels": [
|
||||
],
|
||||
"links": {
|
||||
|
@ -177,7 +177,7 @@ func TestProtoHandler(t *testing.T) {
|
|||
],
|
||||
"description": "",
|
||||
"id": "0ca2204eca2204e0",
|
||||
"organizationID": "0000000000000001",
|
||||
"orgID": "0000000000000001",
|
||||
"labels": [
|
||||
],
|
||||
"links": {
|
||||
|
|
|
@ -4946,7 +4946,7 @@ components:
|
|||
type: string
|
||||
name:
|
||||
type: string
|
||||
organizationID:
|
||||
orgID:
|
||||
type: string
|
||||
organization:
|
||||
type: string
|
||||
|
@ -5161,7 +5161,7 @@ components:
|
|||
id:
|
||||
readOnly: true
|
||||
type: string
|
||||
organizationID:
|
||||
orgID:
|
||||
description: The ID of the organization that owns this Task.
|
||||
type: string
|
||||
name:
|
||||
|
@ -6152,7 +6152,7 @@ components:
|
|||
type: string
|
||||
CreateProtoResourcesRequest:
|
||||
properties:
|
||||
organizationID:
|
||||
orgID:
|
||||
type: string
|
||||
Proto:
|
||||
properties:
|
||||
|
@ -6196,7 +6196,7 @@ components:
|
|||
id:
|
||||
readOnly: true
|
||||
type: string
|
||||
organizationID:
|
||||
orgID:
|
||||
type: string
|
||||
description: id of the organization that owns the dashboard
|
||||
name:
|
||||
|
@ -6237,7 +6237,7 @@ components:
|
|||
type: string
|
||||
id:
|
||||
type: string
|
||||
organizationID:
|
||||
orgID:
|
||||
type: string
|
||||
default:
|
||||
type: boolean
|
||||
|
|
|
@ -100,7 +100,7 @@ func TestTaskHandler_handleGetTasks(t *testing.T) {
|
|||
}
|
||||
}
|
||||
],
|
||||
"organizationID": "0000000000000001",
|
||||
"orgID": "0000000000000001",
|
||||
"status": "",
|
||||
"flux": "",
|
||||
"owner": {
|
||||
|
@ -128,7 +128,7 @@ func TestTaskHandler_handleGetTasks(t *testing.T) {
|
|||
}
|
||||
}
|
||||
],
|
||||
"organizationID": "0000000000000002",
|
||||
"orgID": "0000000000000002",
|
||||
"status": "",
|
||||
"flux": "",
|
||||
"owner": {
|
||||
|
@ -224,7 +224,7 @@ func TestTaskHandler_handlePostTasks(t *testing.T) {
|
|||
"id": "0000000000000001",
|
||||
"name": "task1",
|
||||
"labels": [],
|
||||
"organizationID": "0000000000000001",
|
||||
"orgID": "0000000000000001",
|
||||
"status": "",
|
||||
"flux": "",
|
||||
"owner": {
|
||||
|
|
|
@ -24,7 +24,7 @@ const (
|
|||
// TODO(desa): do sources belong
|
||||
type Source struct {
|
||||
ID ID `json:"id,string,omitempty"` // ID is the unique ID of the source
|
||||
OrganizationID ID `json:"organizationID"` // OrganizationID is the organization ID that resource belongs to
|
||||
OrganizationID ID `json:"orgID"` // OrganizationID is the organization ID that resource belongs to
|
||||
Default bool `json:"default"` // Default specifies the default source for the application
|
||||
Name string `json:"name"` // Name is the user-defined name for the source
|
||||
Type SourceType `json:"type,omitempty"` // Type specifies which kinds of source (enterprise vs oss vs 2.0)
|
||||
|
|
Loading…
Reference in New Issue