Documentation
¶
Index ¶
- Constants
- Variables
- func MatchGRPCError(code interface{}, err interface{}) types.GomegaMatcher
- func NewApplicationsServer(cfg *ApplicationsConfig) pb.ApplicationsServer
- func NewHandlers(ctx context.Context, cfg *Config) (http.Handler, error)
- func NewProfilesServer(config ProfilesConfig) (pb.ProfilesServer, error)
- type ApplicationsConfig
- type Config
- type HelmRepoManager
- type ProfilesConfig
- type ProfilesServer
Constants ¶
View Source
const ( OctetStreamType = "application/octet-stream" JsonType = "application/json" )
Variables ¶
View Source
var ( ErrEmptyAccessToken = errors.New("access token is empty") ErrBadProvider = errors.New("wrong provider name") )
View Source
var ( KustomizeNameKey = fmt.Sprintf("%s/name", kustomizev2.GroupVersion.Group) KustomizeNamespaceKey = fmt.Sprintf("%s/namespace", kustomizev2.GroupVersion.Group) HelmNameKey = fmt.Sprintf("%s/name", helmv2.GroupVersion.Group) HelmNamespaceKey = fmt.Sprintf("%s/namespace", helmv2.GroupVersion.Group) )
Flux owner labels
Functions ¶
func MatchGRPCError ¶ added in v0.2.5
func MatchGRPCError(code interface{}, err interface{}) types.GomegaMatcher
func NewApplicationsServer ¶
func NewApplicationsServer(cfg *ApplicationsConfig) pb.ApplicationsServer
NewApplicationsServer creates a grpc Applications server
func NewHandlers ¶ added in v0.6.0
func NewProfilesServer ¶ added in v0.6.0
func NewProfilesServer(config ProfilesConfig) (pb.ProfilesServer, error)
Types ¶
type ApplicationsConfig ¶ added in v0.2.3
type ApplicationsConfig struct {
Logger logr.Logger
Factory services.Factory
JwtClient auth.JWTClient
KubeClient client.Client
GithubAuthClient auth.GithubAuthClient
Fetcher applicationv2.Fetcher
GitlabAuthClient auth.GitlabAuthClient
}
An ApplicationsConfig allows for the customization of an ApplicationsServer. Use the DefaultConfig() to use the default dependencies.
func DefaultApplicationsConfig ¶ added in v0.6.0
func DefaultApplicationsConfig() (*ApplicationsConfig, error)
DefaultApplicationsConfig creates a populated config with the dependencies for a Server
type Config ¶ added in v0.6.0
type Config struct {
AppConfig *ApplicationsConfig
ProfilesConfig ProfilesConfig
}
type HelmRepoManager ¶ added in v0.6.0
type HelmRepoManager interface {
GetCharts(ctx context.Context, hr *sourcev1beta1.HelmRepository, pred helm.ChartPredicate) ([]*pb.Profile, error)
GetValuesFile(ctx context.Context, helmRepo *sourcev1beta1.HelmRepository, c *helm.ChartReference, filename string) ([]byte, error)
}
type ProfilesConfig ¶ added in v0.6.0
type ProfilesConfig struct {
// contains filtered or unexported fields
}
func NewProfilesConfig ¶ added in v0.6.0
func NewProfilesConfig(kubeClient client.Client, helmRepoNamespace, helmRepoName string) ProfilesConfig
type ProfilesServer ¶ added in v0.6.0
type ProfilesServer struct {
pb.UnimplementedProfilesServer
KubeClient client.Client
Log logr.Logger
HelmChartManager HelmRepoManager
HelmRepoName string
HelmRepoNamespace string
// contains filtered or unexported fields
}
func (*ProfilesServer) GetProfileValues ¶ added in v0.6.0
func (s *ProfilesServer) GetProfileValues(ctx context.Context, msg *pb.GetProfileValuesRequest) (*httpbody.HttpBody, error)
func (*ProfilesServer) GetProfiles ¶ added in v0.6.0
func (s *ProfilesServer) GetProfiles(ctx context.Context, msg *pb.GetProfilesRequest) (*pb.GetProfilesResponse, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.