api

package
v0.0.0-...-37cb674 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Copyright © 2021 kubelt

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Package mock_api is a generated GoMock package.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	KindPath       cue.Path = cue.ParsePath("kind")
	ApiVersionPath cue.Path = cue.ParsePath("apiVersion")
)
View Source
var (
	StaticFS embed.FS
)

this api is used multuple times during an execution so we create a singleton

Functions

This section is empty.

Types

type AuthAPI

type AuthAPI interface {
	GenerateKeys(string) error
	CommitKeys() error
	LoadKeys(username string) error
	AuthKey() *[32]byte
	EncryptionKey() *[32]byte
	SignNode(node interface{}) ([]byte, error)
	ValidateNode(signature []byte) bool
}

AuthAPI

type ConfigAPI

type ConfigAPI interface {
	InitConfig() error
	GetCurrentUser() (*UserConfig, error)
	AddUser(id string, username string, email string, isDefault ...bool) error
	RemoveUser(user string) error
	SetDefaultUser(user string) error
	CommitConfig() error
}

ConfigAPI

type CueAPI

type CueAPI interface {
	CompileSchemaFromString(apply string) (cue.Value, error)
	GenerateCueSpec(schema string, properties map[string]interface{}) (cue.Value, error)
	ValidateResource(def string, val cue.Value) (cue.Value, error)
}

CueAPI

type KmdrAPI

type KmdrAPI interface {
	SetupUser(string, string) error
	Apply(string) error
}

KmdrApi

func NewAPI

func NewAPI() (KmdrAPI, error)

NewAPI creates a instance of KmdrAPI

type KtrlAPI

type KtrlAPI interface {
	RegisterUser(*kb.Command) (*kb.Node, error)
	Query(*kb.Manifests) ([]*kb.Node, error)
	Apply(*kb.Commands) ([]*kb.Node, error)
	// contains filtered or unexported methods
}

KtrlAPI

type MockKmdrAPI

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

MockKmdrAPI is a mock of KmdrAPI interface.

func NewMockKmdrAPI

func NewMockKmdrAPI(ctrl *gomock.Controller) *MockKmdrAPI

NewMockKmdrAPI creates a new mock instance.

func (*MockKmdrAPI) Apply

func (m *MockKmdrAPI) Apply(arg0 string) error

Apply mocks base method.

func (*MockKmdrAPI) EXPECT

func (m *MockKmdrAPI) EXPECT() *MockKmdrAPIMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockKmdrAPI) SetupUser

func (m *MockKmdrAPI) SetupUser(arg0 string) error

SetupUser mocks base method.

type MockKmdrAPIMockRecorder

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

MockKmdrAPIMockRecorder is the mock recorder for MockKmdrAPI.

func (*MockKmdrAPIMockRecorder) Apply

func (mr *MockKmdrAPIMockRecorder) Apply(arg0 interface{}) *gomock.Call

Apply indicates an expected call of Apply.

func (*MockKmdrAPIMockRecorder) SetupUser

func (mr *MockKmdrAPIMockRecorder) SetupUser(arg0 interface{}) *gomock.Call

SetupUser indicates an expected call of SetupUser.

type PlanAPI

type PlanAPI interface {
	Lookup(*cue.Value) (*kb.Manifests, error)
	Plan([]*kb.Node) (*kb.Commands, error)
	User(string, string) *kb.Command
}

PlanAPI

type UserConfig

type UserConfig struct {
	ID       string `toml:"id"`
	Username string `toml:"username"`
	Email    string `toml:"email"`
}

Jump to

Keyboard shortcuts

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