-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dashboards_folder, dashboards validations and api updates (#196)
* patch - dashboards_folder and dashboards updates
- Loading branch information
Showing
82 changed files
with
14,809 additions
and
1,784 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package clientset | ||
|
||
import ( | ||
"context" | ||
|
||
dashboards "terraform-provider-coralogix/coralogix/clientset/grpc/dashboards" | ||
) | ||
|
||
type DashboardsFoldersClient struct { | ||
callPropertiesCreator *CallPropertiesCreator | ||
} | ||
|
||
func (c DashboardsFoldersClient) CreateDashboardsFolder(ctx context.Context, req *dashboards.CreateDashboardFolderRequest) (*dashboards.CreateDashboardFolderResponse, error) { | ||
callProperties, err := c.callPropertiesCreator.GetCallProperties(ctx) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
conn := callProperties.Connection | ||
defer conn.Close() | ||
client := dashboards.NewDashboardFoldersServiceClient(conn) | ||
|
||
return client.CreateDashboardFolder(callProperties.Ctx, req, callProperties.CallOptions...) | ||
} | ||
|
||
func (c DashboardsFoldersClient) GetDashboardsFolders(ctx context.Context, req *dashboards.ListDashboardFoldersRequest) (*dashboards.ListDashboardFoldersResponse, error) { | ||
callProperties, err := c.callPropertiesCreator.GetCallProperties(ctx) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
conn := callProperties.Connection | ||
defer conn.Close() | ||
client := dashboards.NewDashboardFoldersServiceClient(conn) | ||
|
||
return client.ListDashboardFolders(callProperties.Ctx, req, callProperties.CallOptions...) | ||
} | ||
|
||
func (c DashboardsFoldersClient) UpdateDashboardsFolder(ctx context.Context, req *dashboards.ReplaceDashboardFolderRequest) (*dashboards.ReplaceDashboardFolderResponse, error) { | ||
callProperties, err := c.callPropertiesCreator.GetCallProperties(ctx) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
conn := callProperties.Connection | ||
defer conn.Close() | ||
client := dashboards.NewDashboardFoldersServiceClient(conn) | ||
|
||
return client.ReplaceDashboardFolder(callProperties.Ctx, req, callProperties.CallOptions...) | ||
} | ||
|
||
func (c DashboardsFoldersClient) DeleteDashboardsFolder(ctx context.Context, req *dashboards.DeleteDashboardFolderRequest) (*dashboards.DeleteDashboardFolderResponse, error) { | ||
callProperties, err := c.callPropertiesCreator.GetCallProperties(ctx) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
conn := callProperties.Connection | ||
defer conn.Close() | ||
client := dashboards.NewDashboardFoldersServiceClient(conn) | ||
|
||
return client.DeleteDashboardFolder(callProperties.Ctx, req, callProperties.CallOptions...) | ||
} | ||
|
||
func NewDashboardsFoldersClient(c *CallPropertiesCreator) *DashboardsFoldersClient { | ||
return &DashboardsFoldersClient{callPropertiesCreator: c} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.