feat: RBAC provisionerdaemons and parameters (#1755)

* chore: Remove org_id from provisionerdaemons
This commit is contained in:
Steven Masley
2022-05-26 11:20:54 -05:00
committed by GitHub
parent 104d07f659
commit c04d045279
18 changed files with 184 additions and 63 deletions
+2 -2
View File
@@ -90,9 +90,9 @@ func (c *Client) Organization(ctx context.Context, id uuid.UUID) (Organization,
}
// ProvisionerDaemonsByOrganization returns provisioner daemons available for an organization.
func (c *Client) ProvisionerDaemonsByOrganization(ctx context.Context, organizationID uuid.UUID) ([]ProvisionerDaemon, error) {
func (c *Client) ProvisionerDaemons(ctx context.Context) ([]ProvisionerDaemon, error) {
res, err := c.Request(ctx, http.MethodGet,
fmt.Sprintf("/api/v2/organizations/%s/provisionerdaemons", organizationID.String()),
"/api/v2/provisionerdaemons",
nil,
)
if err != nil {
+5 -6
View File
@@ -31,12 +31,11 @@ const (
)
type ProvisionerDaemon struct {
ID uuid.UUID `json:"id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt sql.NullTime `json:"updated_at"`
OrganizationID uuid.NullUUID `json:"organization_id"`
Name string `json:"name"`
Provisioners []ProvisionerType `json:"provisioners"`
ID uuid.UUID `json:"id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt sql.NullTime `json:"updated_at"`
Name string `json:"name"`
Provisioners []ProvisionerType `json:"provisioners"`
}
// ProvisionerJobStaus represents the at-time state of a job.