Documentation ¶
Index ¶
- func IsNotFoundErr(err error) bool
- func NewBuildsRepoBuilder(clientBuilder mobile.K8ClientBuilder, ocClientBuilder mobile.OSClientBuilder, ...) mobile.BuildRepoBuilder
- func NewMobileAppRepoBuilder(clientBuilder mobile.K8ClientBuilder, namespace, saToken string) mobile.AppRepoBuilder
- func NewServiceRepoBuilder(clientBuilder mobile.K8ClientBuilder, namespace, saToken string) mobile.ServiceRepoBuilder
- type BuildRepo
- func (br *BuildRepo) AddBuildAsset(asset mobile.BuildAsset) (string, error)
- func (br BuildRepo) AddDownload(buildName string, dl *mobile.BuildDownload) error
- func (br BuildRepo) BuildApp(buildName string) error
- func (br *BuildRepo) Create(b *mobile.BuildConfig) error
- func (br *BuildRepo) GetDownload(buildName string) (*mobile.BuildDownload, error)
- func (br *BuildRepo) Status(buildName string) (*mobile.BuildStatus, error)
- func (br *BuildRepo) Update(config *build.BuildConfig) (*build.BuildConfig, error)
- type BuildRepoBuilder
- type DefaultMobileAppValidator
- type DefaultMobileBuildValidator
- type DefaultMobileServiceValidator
- type MobileAppRepo
- func (mar *MobileAppRepo) AddAPIKeyToMap(app *mobile.App) error
- func (mar *MobileAppRepo) Create(app *mobile.App) error
- func (mar *MobileAppRepo) CreateAPIKeyMap() error
- func (mar *MobileAppRepo) DeleteByName(name string) error
- func (mar *MobileAppRepo) List() ([]*mobile.App, error)
- func (mar *MobileAppRepo) ReadByName(name string) (*mobile.App, error)
- func (mar *MobileAppRepo) RemoveAPIKeyFromMap(appID string) error
- func (mar *MobileAppRepo) Update(app *mobile.App) (*mobile.App, error)
- type MobileAppRepoBuilder
- type MobileAppValidator
- type MobileBuildValidator
- type MobileServiceRepo
- func (msr *MobileServiceRepo) Create(ms *mobile.Service) error
- func (msr *MobileServiceRepo) Delete(serviceID string) error
- func (msr *MobileServiceRepo) List(filter mobile.AttrFilterFunc) ([]*mobile.Service, error)
- func (msr *MobileServiceRepo) ListConfigs(filter mobile.AttrFilterFunc) ([]*mobile.ServiceConfig, error)
- func (msr *MobileServiceRepo) Read(name string) (*mobile.Service, error)
- func (msr *MobileServiceRepo) UpdateEnabledIntegrations(svcName string, integrations map[string]string) error
- type MobileServiceRepoBuilder
- type MobileServiceValidator
- type SecretConvertor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotFoundErr ¶
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 NewBuildRepo ¶
func NewBuildRepo(bc client.BuildConfigInterface, buildc client.BuildInterface, sc corev1.SecretInterface) *BuildRepo
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) 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
type DefaultMobileBuildValidator ¶
type DefaultMobileBuildValidator struct{}
func (DefaultMobileBuildValidator) PreCreate ¶
func (msv DefaultMobileBuildValidator) PreCreate(mb *mobile.BuildConfig) error
TODO fill these out
func (DefaultMobileBuildValidator) PreUpdate ¶
func (msv DefaultMobileBuildValidator) PreUpdate(old *mobile.BuildConfig, new *mobile.BuildConfig) error
type DefaultMobileServiceValidator ¶
type DefaultMobileServiceValidator struct{}
type MobileAppRepo ¶
type MobileAppRepo struct {
// contains filtered or unexported fields
}
MobileAppRepo interacts with the data store that backs the mobile objects
func NewMobileAppRepo ¶
func NewMobileAppRepo(c corev1.ConfigMapInterface, apiKeyClient corev1.SecretInterface, v MobileAppValidator) *MobileAppRepo
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
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 ¶
func (marb *MobileServiceRepoBuilder) Build() (mobile.ServiceCruder, error)
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 ¶
func (marb *MobileServiceRepoBuilder) WithToken(token string) mobile.ServiceRepoBuilder
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