Skip to content

Commit

Permalink
add API for enroll server (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alva8756 authored Nov 20, 2023
1 parent c1f65bc commit 9ad76dc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/api/v1/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,10 @@ func (c *Client) ServerConditionCreate(ctx context.Context, serverID uuid.UUID,

return c.post(ctx, path, conditionCreate)
}

func (c *Client) ServerEnroll(ctx context.Context, serverID string, conditionCreate v1types.ConditionCreate) (*v1types.ServerResponse, error) {
// Empty server ID is allowed. Conditionorc will create a new server ID if it is empty.
path := fmt.Sprintf("serverEnroll/%s", serverID)

return c.post(ctx, path, conditionCreate)
}

0 comments on commit 9ad76dc

Please sign in to comment.