Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) pagination.Pager
List is a method to obtain an array of one or more dependent packages according to the query parameters.
Types ¶
type Dependency ¶
type Dependency struct { // Dependency ID. ID string `json:"id"` // Dependency owner. Owner string `json:"owner"` // URL of the dependency in the OBS console. Link string `json:"link"` // Runtime. Runtime string `json:"runtime"` // Unique ID of the dependency. Etag string `json:"etag"` // Size of the dependency. Size int `json:"size"` // Name of the dependency. Name string `json:"name"` // Description of the dependency. Description string `json:"description"` // File name of the dependency. FileName string `json:"file_name"` }
Dependency is an object struct that represents the elements of the dependencies parameter.
type DependencyPage ¶
type DependencyPage struct {
pagination.MarkerPageBase
}
DependencyPage represents the response pages of the List method.
func (DependencyPage) IsEmpty ¶
func (r DependencyPage) IsEmpty() (bool, error)
IsEmpty returns true if a ListResult no dependent package.
func (DependencyPage) LastMarker ¶
func (r DependencyPage) LastMarker() (string, error)
LastMarker returns the last marker index in a ListResult.
func (DependencyPage) NextPageURL ¶
func (r DependencyPage) NextPageURL() (string, error)
NextPageURL generates the URL for the page of results after this one.
type ListOpts ¶
type ListOpts struct { // Dependency type, which support public, private, and all, default to all. // public // private // all DependencyType string `q:"dependency_type"` // Runtime of function. Runtime string `q:"runtime"` // Name of the dependency. Name string `q:"name"` // Final record queried last time. Default value: 0. Marker string `q:"marker"` // Maximum number of dependencies that can be obtained in a query, default to 400. Limit string `q:"limit"` }
ListOpts allows to filter list data using given parameters.
func (ListOpts) ToListQuery ¶
ToListQuery is a method which to build a request query by the ListOpts.
type ListOptsBuilder ¶
ListOptsBuilder is an interface which to support request query build of the dependent package search.
type ListResp ¶
type ListResp struct { // Next read location. Next int `json:"next_marker"` // Total number of dependencies. Count int `json:"count"` // Dependency list. Dependencies []Dependency `json:"dependencies"` }
ListResp is an object struct that represents the result of each page.
func ExtractDependencies ¶
func ExtractDependencies(r pagination.Page) (ListResp, error)
ExtractDependencies is a method which to extract the response to a dependent package list, next marker index and count number.