github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/dis/v2/streams/urls.go (about)

     1  package streams
     2  
     3  import "github.com/chnsz/golangsdk"
     4  
     5  const (
     6  	resourcePath = "streams"
     7  	policiesPath = "policies"
     8  )
     9  
    10  // createURL POST /v2/{project_id}/streams
    11  // ListURL   GET  /v2/{project_id}/streams
    12  func rootURL(c *golangsdk.ServiceClient) string {
    13  	return c.ServiceURL(resourcePath)
    14  }
    15  
    16  // GetURL GET /v2/{project_id}/streams/{stream_name}
    17  // deleteURL DELETE /v2/{project_id}/streams/{stream_name}
    18  // ChangePartitionQuantityURL PUT /v2/{project_id}/streams/{stream_name}
    19  func resourceURL(c *golangsdk.ServiceClient, streamName string) string {
    20  	return c.ServiceURL(resourcePath, streamName)
    21  }
    22  
    23  // policiesURL POST /v2/{project_id}/streams/{stream_name}/policies
    24  // policiesURL GET /v2/{project_id}/streams/{stream_name}/policies
    25  func policiesURL(c *golangsdk.ServiceClient, streamName string) string {
    26  	return c.ServiceURL(resourcePath, streamName, policiesPath)
    27  }