swagger

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2017 License: Apache-2.0, Apache-2.0 Imports: 12 Imported by: 0

README

Go API client for swagger

The API for the Menshend Project

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: class io.swagger.codegen.languages.GoClientCodegen

Installation

Put the package under your project folder and add the following in import:

    "./swagger"

Documentation for API Endpoints

All URIs are relative to https://virtserver.swaggerhub.com/nebtex/Menshend/1.0.0

Class Method HTTP request Description
AdminApi AdminDeleteService Delete /v1/adminServices/{id}
AdminApi AdminGetService Get /v1/adminServices/{id}
AdminApi AdminListService Get /v1/adminServices
AdminApi AdminSaveService Put /v1/adminServices/{id}
AuthApi LoginStatus Get /v1/account
AuthApi Logout Delete /v1/account
ClientApi ListAvailableServices Get /v1/clientServices
FlashesApi GetFlashes Get /v1/flashes
SecretsApi ReadSecret Get /v1/secret/{id}
SpaceApi GetSpace Get /v1/space

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient struct {
	// contains filtered or unexported fields
}

func (*APIClient) CallAPI

func (c *APIClient) CallAPI(path string, method string,
	postBody interface{},
	headerParams map[string]string,
	queryParams url.Values,
	formParams map[string]string,
	fileName string,
	fileBytes []byte) (*resty.Response, error)

func (*APIClient) ParameterToString

func (c *APIClient) ParameterToString(obj interface{}, collectionFormat string) string

func (*APIClient) SelectHeaderAccept

func (c *APIClient) SelectHeaderAccept(accepts []string) string

func (*APIClient) SelectHeaderContentType

func (c *APIClient) SelectHeaderContentType(contentTypes []string) string

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the swagger operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type AdminApi

type AdminApi struct {
	Configuration *Configuration
}

func NewAdminApi

func NewAdminApi() *AdminApi

func NewAdminApiWithBasePath

func NewAdminApiWithBasePath(basePath string) *AdminApi

func (AdminApi) AdminDeleteService

func (a AdminApi) AdminDeleteService(id string) (*interface{}, *APIResponse, error)

*

*
* delete service
*
* @param id service id
* @return *interface{}

func (AdminApi) AdminGetService

func (a AdminApi) AdminGetService(id string) (*AdminService, *APIResponse, error)

*

*
* returns all the available information of the service
*
* @param id service id
* @return *AdminService

func (AdminApi) AdminListService

func (a AdminApi) AdminListService(subdomain string) ([]AdminService, *APIResponse, error)

*

*
* returns all the available information of the service over all the roles
*
* @param subdomain subdomain
* @return []AdminService

func (AdminApi) AdminSaveService

func (a AdminApi) AdminSaveService(id string, body AdminService) (*AdminService, *APIResponse, error)

*

*
* create a new service
*
* @param id service id
* @param body
* @return *AdminService

type AdminService

type AdminService struct {
	Meta Metadata `json:"meta,omitempty"`

	Strategy AdminServiceStrategy `json:"strategy,omitempty"`

	Resolver AdminServiceResolver `json:"resolver,omitempty"`

	Cache *ServiceCache `json:"cache,omitempty"`

	ImpersonateWithinRole bool `json:"impersonateWithinRole,omitempty"`

	IsActive bool `json:"isActive,omitempty"`

	FullUrl string `json:"fullUrl,omitempty"`

	SecretPaths []string `json:"secretPaths,omitempty"`
}

type AdminServiceResolver

type AdminServiceResolver struct {
	Lua *LuaResolver `json:"lua,omitempty"`

	Yaml *YamlResolver `json:"yaml,omitempty"`
}

type AdminServiceStrategy

type AdminServiceStrategy struct {
	Proxy *Proxy `json:"proxy,omitempty"`

	Redirect *Redirect `json:"redirect,omitempty"`

	PortForward *PortForward `json:"portForward,omitempty"`
}

type AuthApi

type AuthApi struct {
	Configuration *Configuration
}

func NewAuthApi

func NewAuthApi() *AuthApi

func NewAuthApiWithBasePath

func NewAuthApiWithBasePath(basePath string) *AuthApi

func (AuthApi) LoginStatus

func (a AuthApi) LoginStatus() (*LoginStatus, *APIResponse, error)

*

*
* get login status
*
* @return *LoginStatus

func (AuthApi) Logout

func (a AuthApi) Logout() (*LoginStatus, *APIResponse, error)

*

*
* login off
*
* @return *LoginStatus

type ClientApi

type ClientApi struct {
	Configuration *Configuration
}

func NewClientApi

func NewClientApi() *ClientApi

func NewClientApiWithBasePath

func NewClientApiWithBasePath(basePath string) *ClientApi

func (ClientApi) ListAvailableServices

func (a ClientApi) ListAvailableServices(subdomain string, role string) ([]ClientService, *APIResponse, error)

*

*
* list or search availables services
*
* @param subdomain filter by subdomain
* @param role filter by role
* @return []ClientService

type ClientService

type ClientService struct {
	Meta Metadata `json:"meta,omitempty"`

	ImpersonateWithinRole bool `json:"impersonateWithinRole,omitempty"`

	FullUrl string `json:"fullUrl,omitempty"`

	IsActive bool `json:"isActive,omitempty"`

	SecretPaths []string `json:"secretPaths,omitempty"`
}

type Configuration

type Configuration struct {
	UserName      string            `json:"userName,omitempty"`
	Password      string            `json:"password,omitempty"`
	APIKeyPrefix  map[string]string `json:"APIKeyPrefix,omitempty"`
	APIKey        map[string]string `json:"APIKey,omitempty"`
	Debug         bool              `json:"debug,omitempty"`
	DebugFile     string            `json:"debugFile,omitempty"`
	OAuthToken    string            `json:"oAuthToken,omitempty"`
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	AccessToken   string            `json:"accessToken,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	APIClient     *APIClient
	Transport     *http.Transport
	Timeout       *time.Duration `json:"timeout,omitempty"`
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

func (*Configuration) GetAPIKeyWithPrefix

func (c *Configuration) GetAPIKeyWithPrefix(APIKeyIdentifier string) string

func (*Configuration) GetBasicAuthEncodedString

func (c *Configuration) GetBasicAuthEncodedString() string

type Cors

type Cors struct {
	AllowedOrigins []string `json:"allowedOrigins,omitempty"`

	AllowedMethods []string `json:"allowedMethods,omitempty"`

	AllowedHeaders []string `json:"allowedHeaders,omitempty"`

	AllowCredentials bool `json:"allowCredentials,omitempty"`

	OptionsPassthrough bool `json:"optionsPassthrough,omitempty"`

	MaxAge int32 `json:"maxAge,omitempty"`

	ExposedHeaders []string `json:"exposedHeaders,omitempty"`
}

type Flash

type Flash struct {
	Flashes []string `json:"flashes,omitempty"`
}

type FlashesApi

type FlashesApi struct {
	Configuration *Configuration
}

func NewFlashesApi

func NewFlashesApi() *FlashesApi

func NewFlashesApiWithBasePath

func NewFlashesApiWithBasePath(basePath string) *FlashesApi

func (FlashesApi) GetFlashes

func (a FlashesApi) GetFlashes() (*Flash, *APIResponse, error)

*

*
* list current flashes (only makes sense in browsers)
*
* @return *Flash

type InlineResponse500

type InlineResponse500 struct {
	Message string `json:"message,omitempty"`
}

type LoginStatus

type LoginStatus struct {
	IsLogged bool `json:"isLogged,omitempty"`

	IsAdmin bool `json:"isAdmin,omitempty"`

	CanImpersonate bool `json:"canImpersonate,omitempty"`

	SessionExpiresAt int32 `json:"sessionExpiresAt,omitempty"`
}

type LongDescriptionLocal

type LongDescriptionLocal struct {
	Content string `json:"content,omitempty"`
}

type LongDescriptionRemote

type LongDescriptionRemote struct {
	Content string `json:"content,omitempty"`

	Url string `json:"url,omitempty"`
}

type LuaResolver

type LuaResolver struct {
	Content string `json:"content,omitempty"`

	MakeBodyAvailable bool `json:"makeBodyAvailable,omitempty"`
}

type Metadata

type Metadata struct {
	Id string `json:"id,omitempty"`

	RoleId string `json:"roleId,omitempty"`


	Name string `json:"name,omitempty"`

	Description string `json:"description,omitempty"`

	SubDomain string `json:"subDomain,omitempty"`

	Tags []string `json:"tags,omitempty"`

	LongDescription MetadataLongDescription `json:"longDescription,omitempty"`
}

type MetadataLongDescription

type MetadataLongDescription struct {
	Remote *LongDescriptionRemote `json:"remote,omitempty"`

	Local *LongDescriptionLocal `json:"local,omitempty"`
}

type PortForward

type PortForward struct {
}

type Proxy

type Proxy struct {
	Cors Cors `json:"cors,omitempty"`

	Csrf bool `json:"csrf,omitempty"`
}

type Redirect

type Redirect struct {
}

type Secret

type Secret struct {
	RequestId string `json:"request_id,omitempty"`

	LeaseDuration int32 `json:"lease_duration,omitempty"`

	Renewable bool `json:"renewable,omitempty"`

	Data interface{} `json:"data,omitempty"`

	Warnings []string `json:"warnings,omitempty"`

	WrapInfo SecretWrapInfo `json:"wrap_info,omitempty"`

	Auth SecretAuth `json:"auth,omitempty"`
}

vault secret object

type SecretAuth

type SecretAuth struct {
	ClientToken string `json:"client_token,omitempty"`

	Accessor string `json:"accessor,omitempty"`

	Policies []string `json:"policies,omitempty"`

	Metadata interface{} `json:"metadata,omitempty"`

	LeaseDuration int32 `json:"lease_duration,omitempty"`

	Renewable bool `json:"renewable,omitempty"`
}

type SecretWrapInfo

type SecretWrapInfo struct {
	Token string `json:"token,omitempty"`

	Ttl int32 `json:"ttl,omitempty"`

	CreationTime int32 `json:"creation_time,omitempty"`

	WrappedAccessor string `json:"wrapped_accessor,omitempty"`
}

type SecretsApi

type SecretsApi struct {
	Configuration *Configuration
}

func NewSecretsApi

func NewSecretsApi() *SecretsApi

func NewSecretsApiWithBasePath

func NewSecretsApiWithBasePath(basePath string) *SecretsApi

func (SecretsApi) ReadSecret

func (a SecretsApi) ReadSecret(id string) (*Secret, *APIResponse, error)

*

*
* return secret associate with a service
*
* @param id secret path
* @return *Secret

type ServiceCache

type ServiceCache struct {
	Ttl int32 `json:"ttl,omitempty"`
}

type Space

type Space struct {

	Name string `json:"name,omitempty"`

	ShortDescription string `json:"shortDescription,omitempty"`

	LongDescription string `json:"longDescription,omitempty"`

	Host string `json:"host,omitempty"`
}

type SpaceApi

type SpaceApi struct {
	Configuration *Configuration
}

func NewSpaceApi

func NewSpaceApi() *SpaceApi

func NewSpaceApiWithBasePath

func NewSpaceApiWithBasePath(basePath string) *SpaceApi

func (SpaceApi) GetSpace

func (a SpaceApi) GetSpace() (*Space, *APIResponse, error)

*

*
* get lab metadata (name, log, description)
*
* @return *Space

type YamlResolver

type YamlResolver struct {
	Content string `json:"content,omitempty"`
}

Jump to

Keyboard shortcuts

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