mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: RBAC provisionerdaemons and parameters (#1755)
* chore: Remove org_id from provisionerdaemons
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user