data

package
v0.0.0-...-4e66905 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNotFoundErr

func IsNotFoundErr(err error) bool

func NewBuildsRepoBuilder

func NewBuildsRepoBuilder(clientBuilder mobile.K8ClientBuilder, ocClientBuilder mobile.OSClientBuilder, namespace, saToken string) mobile.BuildRepoBuilder

NewBuildsRepoBuilder provides an implementation of mobile.ServiceRepoBuilder

func NewMobileAppRepoBuilder

func NewMobileAppRepoBuilder(clientBuilder mobile.K8ClientBuilder, namespace, saToken string) mobile.AppRepoBuilder

NewMobileAppRepoBuilder creates a new instance of a MobileAppRepoBuilder

func NewServiceRepoBuilder

func NewServiceRepoBuilder(clientBuilder mobile.K8ClientBuilder, namespace, saToken string) mobile.ServiceRepoBuilder

NewServiceRepoBuilder provides an implementation of mobile.ServiceRepoBuilder

Types

type BuildRepo

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

func (*BuildRepo) AddBuildAsset

func (br *BuildRepo) AddBuildAsset(asset mobile.BuildAsset) (string, error)

AddBuildAsset will create a secret and return its name

func (BuildRepo) AddDownload

func (br BuildRepo) AddDownload(buildName string, dl *mobile.BuildDownload) error

func (BuildRepo) BuildApp

func (br BuildRepo) BuildApp(buildName string) error

func (*BuildRepo) Create

func (br *BuildRepo) Create(b *mobile.BuildConfig) error

func (*BuildRepo) GetDownload

func (br *BuildRepo) GetDownload(buildName string) (*mobile.BuildDownload, error)

func (*BuildRepo) Status

func (br *BuildRepo) Status(buildName string) (*mobile.BuildStatus, error)

func (*BuildRepo) Update

func (br *BuildRepo) Update(config *build.BuildConfig) (*build.BuildConfig, error)

type BuildRepoBuilder

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

func (*BuildRepoBuilder) Build

func (marb *BuildRepoBuilder) Build() (mobile.BuildCruder, error)

Build builds the final repo

func (*BuildRepoBuilder) UseDefaultSAToken

func (marb *BuildRepoBuilder) UseDefaultSAToken() mobile.BuildRepoBuilder

UseDefaultSAToken delegates off to the service account token setup with the MCP. This should only be used for APIs where no real token is provided and should always be protected

func (*BuildRepoBuilder) WithToken

func (marb *BuildRepoBuilder) WithToken(token string) mobile.BuildRepoBuilder

type DefaultMobileAppValidator

type DefaultMobileAppValidator struct {
}

DefaultMobileAppValidator validates mobile objects

func (DefaultMobileAppValidator) PreCreate

func (mv DefaultMobileAppValidator) PreCreate(a *mobile.App) error

PreCreate checks an App is valid before creating

func (DefaultMobileAppValidator) PreUpdate

func (mv DefaultMobileAppValidator) PreUpdate(old *mobile.App, new *mobile.App) error

PreUpdate checks that an update is valid before it is committed

type DefaultMobileBuildValidator

type DefaultMobileBuildValidator struct{}

func (DefaultMobileBuildValidator) PreCreate

TODO fill these out

func (DefaultMobileBuildValidator) PreUpdate

type DefaultMobileServiceValidator

type DefaultMobileServiceValidator struct{}

func (DefaultMobileServiceValidator) PreCreate

TODO fill these out

func (DefaultMobileServiceValidator) PreUpdate

func (msv DefaultMobileServiceValidator) PreUpdate(old *mobile.Service, new *mobile.Service) error

type MobileAppRepo

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

MobileAppRepo interacts with the data store that backs the mobile objects

func NewMobileAppRepo

NewMobileAppRepo instansiates a new MobileAppRepo

func (*MobileAppRepo) AddAPIKeyToMap

func (mar *MobileAppRepo) AddAPIKeyToMap(app *mobile.App) error

AddAPIKeyToMap Add an apps API key to the API Key Map

func (*MobileAppRepo) Create

func (mar *MobileAppRepo) Create(app *mobile.App) error

Create creates a mobile app object. Fails on duplicates

func (*MobileAppRepo) CreateAPIKeyMap

func (mar *MobileAppRepo) CreateAPIKeyMap() error

CreateAPIKeyMap Create the API Key Map

func (*MobileAppRepo) DeleteByName

func (mar *MobileAppRepo) DeleteByName(name string) error

DeleteByName will delte the underlying configmap

func (*MobileAppRepo) List

func (mar *MobileAppRepo) List() ([]*mobile.App, error)

List will list the configmaps and convert them to mobileapps

func (*MobileAppRepo) ReadByName

func (mar *MobileAppRepo) ReadByName(name string) (*mobile.App, error)

ReadByName attempts to read a mobile app by its unique name

func (*MobileAppRepo) RemoveAPIKeyFromMap

func (mar *MobileAppRepo) RemoveAPIKeyFromMap(appID string) error

RemoveAPIKeyFromMap Remove an apps API key from the API Key Map

func (*MobileAppRepo) Update

func (mar *MobileAppRepo) Update(app *mobile.App) (*mobile.App, error)

Update will update the underlying configmap with the new details

type MobileAppRepoBuilder

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

MobileAppRepoBuilder builds a MobileAppRepo

func (*MobileAppRepoBuilder) Build

func (marb *MobileAppRepoBuilder) Build() (mobile.AppCruder, error)

Build builds the final repo

func (*MobileAppRepoBuilder) UseDefaultSAToken

func (marb *MobileAppRepoBuilder) UseDefaultSAToken() mobile.AppRepoBuilder

UseDefaultSAToken delegates off to the service account token setup with the MCP. This should only be used for APIs where no real token is provided and should always be protected

func (*MobileAppRepoBuilder) WithToken

func (marb *MobileAppRepoBuilder) WithToken(t string) mobile.AppRepoBuilder

type MobileAppValidator

type MobileAppValidator interface {
	PreCreate(a *mobile.App) error
	PreUpdate(old *mobile.App, new *mobile.App) error
}

MobileAppValidator defines what a validator should do

type MobileBuildValidator

type MobileBuildValidator interface {
	PreCreate(a *mobile.BuildConfig) error
	PreUpdate(old *mobile.BuildConfig, new *mobile.BuildConfig) error
}

MobileBuildValidator defines what a validator should do

type MobileServiceRepo

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

MobileServiceRepo implements the mobile.ServiceCruder interface. it backed by the secret resource in kubernetes

func NewMobileServiceRepo

func NewMobileServiceRepo(client corev1.SecretInterface) *MobileServiceRepo

NewMobileServiceRepo returns a new MobileServiceRepo

func (*MobileServiceRepo) Create

func (msr *MobileServiceRepo) Create(ms *mobile.Service) error

Create will take a mobile service and create a secret to represent it

func (*MobileServiceRepo) Delete

func (msr *MobileServiceRepo) Delete(serviceID string) error

func (*MobileServiceRepo) List

func (msr *MobileServiceRepo) List(filter mobile.AttrFilterFunc) ([]*mobile.Service, error)

List will read all the secrets in the namespace and filter them based on the passed function

func (*MobileServiceRepo) ListConfigs

func (msr *MobileServiceRepo) ListConfigs(filter mobile.AttrFilterFunc) ([]*mobile.ServiceConfig, error)

ListConfigs will build a list of configs based on the available services that are represented by secrets in the namespace

func (*MobileServiceRepo) Read

func (msr *MobileServiceRepo) Read(name string) (*mobile.Service, error)

Read the mobile service

func (*MobileServiceRepo) UpdateEnabledIntegrations

func (msr *MobileServiceRepo) UpdateEnabledIntegrations(svcName string, integrations map[string]string) error

UpdateEnabledIntegrations will set labels on the underlying secret to indicate if an integration is enabled (it is really used as a que to the ui)

type MobileServiceRepoBuilder

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

MobileServiceRepoBuilder builds a ServiceCruder

func (*MobileServiceRepoBuilder) Build

Build builds the final repo

func (*MobileServiceRepoBuilder) UseDefaultSAToken

func (marb *MobileServiceRepoBuilder) UseDefaultSAToken() mobile.ServiceRepoBuilder

UseDefaultSAToken delegates off to the service account token setup with the MCP. This should only be used for APIs where no real token is provided and should always be protected

func (*MobileServiceRepoBuilder) WithToken

type MobileServiceValidator

type MobileServiceValidator interface {
	PreCreate(a *mobile.Service) error
	PreUpdate(old *mobile.Service, new *mobile.Service) error
}

MobileServiceValidator defines what a validator should do

type SecretConvertor

type SecretConvertor interface {
	Convert(s v1.Secret) (*mobile.ServiceConfig, error)
}

SecretConvertor converts a kubernetes secret into a mobile.ServiceConfig

Jump to

Keyboard shortcuts

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