url

package
v1.0.0-beta3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(client *occlient.Client, urlName string, portNumber int, componentName, applicationName string) (string, error)

Create creates a URL and returns url string and error if any portNumber is the target port number for the route and is -1 in case no port number is specified in which case it is automatically detected for components which expose only one service port)

func Delete

func Delete(client *occlient.Client, urlName string, applicationName string) error

Delete deletes a URL

func Exists added in v0.0.9

func Exists(client *occlient.Client, urlName string, componentName string, applicationName string) (bool, error)

Exists checks if the url exists in the component or not urlName is the name of the url for checking componentName is the name of the component to which the url's existence is checked applicationName is the name of the application to which the url's existence is checked

func GetComponentServicePortNumbers added in v0.0.10

func GetComponentServicePortNumbers(client *occlient.Client, componentName string, applicationName string) ([]int, error)

GetComponentServicePortNumbers returns the port numbers exposed by the service of the component componentName is the name of the component applicationName is the name of the application

func GetURLName added in v0.0.18

func GetURLName(componentName string, componentPort int) string

GetURLName returns a url name from the component name and the given port number

func GetURLString added in v0.0.17

func GetURLString(protocol, URL string) string

GetURLString returns a string representation of given url

func GetValidPortNumber added in v0.0.18

func GetValidPortNumber(client *occlient.Client, portNumber int, componentName string, applicationName string) (int, error)

GetValidPortNumber checks if the given port number is a valid component port or not if port number is not provided and the component is a single port component, the component port is returned port number is -1 if the user does not specify any port

Types

type Url added in v0.0.19

type Url struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              UrlSpec `json:"spec,omitempty"`
}

URL is

type UrlList added in v0.0.19

type UrlList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Url `json:"items"`
}

AppList is a list of applications

func List

func List(client *occlient.Client, componentName string, applicationName string) (UrlList, error)

List lists the URLs in an application. The results can further be narrowed down if a component name is provided, which will only list URLs for the given component

func (UrlList) Get added in v0.0.20

func (urls UrlList) Get(urlName string) Url

Get returns URL defination for given URL name

type UrlSpec added in v0.0.19

type UrlSpec struct {
	Host     string `json:"host,omitempty"`
	Protocol string `json:"protocol,omitempty"`
	Port     int    `json:"port,omitempty"`
}

UrlSpec is

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL