fasit

package
v0.0.0-...-350dcd6 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NavTruststoreFasitAlias = "nav_truststore"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationInstancePayload

type ApplicationInstancePayload struct {
	Application      string     `json:"application"`
	Environment      string     `json:"environment"`
	Version          string     `json:"version"`
	ExposedResources []Resource `json:"exposedresources"`
	UsedResources    []Resource `json:"usedresources"`
	ClusterName      string     `json:"clustername"`
	Domain           string     `json:"domain"`
}

type FasitClient

type FasitClient struct {
	FasitUrl string
	Username string
	Password string
}

func (FasitClient) GetFasitApplication

func (fasit FasitClient) GetFasitApplication(application string) error

func (FasitClient) GetFasitEnvironmentClass

func (fasit FasitClient) GetFasitEnvironmentClass(environmentName string) (string, error)

func (FasitClient) GetScopedResources

func (fasit FasitClient) GetScopedResources(resourcesRequests []ResourceRequest, fasitEnvironment string, application string, zone string) (resources []NaisResource, err error)

type FasitClientAdapter

type FasitClientAdapter interface {
	GetFasitEnvironmentClass(environmentName string) (string, error)
	GetFasitApplication(application string) error
	GetScopedResources(resourcesRequests []ResourceRequest, fasitEnvironment string, application string, zone string) (resources []NaisResource, err error)
	// contains filtered or unexported methods
}

type FasitIngress

type FasitIngress struct {
	Host string
	Path string
}

type FasitResource

type FasitResource struct {
	Id           int
	Alias        string
	ResourceType string `json:"type"`
	Scope        Scope  `json:"scope"`
	Properties   map[string]string
	Secrets      map[string]map[string]string
	Certificates map[string]interface{} `json:"files"`
}

type NaisResource

type NaisResource struct {
	ID           int               `json:"id"`
	Name         string            `json:"name"`
	ResourceType string            `json:"resourceType"`
	Scope        Scope             `json:"scope"`
	Properties   map[string]string `json:"properties"`
	PropertyMap  map[string]string `json:"propertyMap"`
	Secret       map[string]string `json:"secret"`
	Certificates map[string][]byte `json:"certificates"`
	Ingresses    []FasitIngress    `json:"ingresses"`
}

func FetchFasitResources

func FetchFasitResources(fasit FasitClientAdapter, application string, fasitEnvironment string, zone string, usedResources []naisd.UsedResource) (naisresources []NaisResource, err error)

func (NaisResource) ToEnvironmentVariable

func (nr NaisResource) ToEnvironmentVariable(property string) string

func (NaisResource) ToResourceVariable

func (nr NaisResource) ToResourceVariable(property string) string

type Password

type Password struct {
	Ref string `json:"ref"`
}

type Resource

type Resource struct {
	Id int `json:"id"`
}

type ResourcePayload

type ResourcePayload interface{}

type ResourceRequest

type ResourceRequest struct {
	Alias        string
	ResourceType string
	PropertyMap  map[string]string
}

func DefaultResourceRequests

func DefaultResourceRequests() []ResourceRequest

type RestProperties

type RestProperties struct {
	Url         string `json:"url"`
	Description string `json:"description,omitempty"`
}

type RestResourcePayload

type RestResourcePayload struct {
	Alias      string         `json:"alias"`
	Scope      Scope          `json:"scope"`
	Type       string         `json:"type"`
	Properties RestProperties `json:"properties"`
}

type Scope

type Scope struct {
	EnvironmentClass string `json:"environmentclass"`
	Environment      string `json:"environment,omitempty"`
	Zone             string `json:"zone,omitempty"`
}

type WebserviceProperties

type WebserviceProperties struct {
	EndpointUrl   string `json:"endpointUrl"`
	WsdlUrl       string `json:"wsdlUrl"`
	SecurityToken string `json:"securityToken"`
	Description   string `json:"description,omitempty"`
}

type WebserviceResourcePayload

type WebserviceResourcePayload struct {
	Alias      string               `json:"alias"`
	Scope      Scope                `json:"scope"`
	Type       string               `json:"type"`
	Properties WebserviceProperties `json:"properties"`
}

Jump to

Keyboard shortcuts

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