sigs.k8s.io/kubebuilder/v3@v3.14.0/pkg/config/store/interface.go (about) 1 /* 2 Copyright 2022 The Kubernetes Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package store 18 19 import ( 20 "sigs.k8s.io/kubebuilder/v3/pkg/config" 21 ) 22 23 // Store represents a persistence backend for config.Config 24 type Store interface { 25 // New creates a new config.Config to store 26 New(config.Version) error 27 // Load retrieves the config.Config from the persistence backend 28 Load() error 29 // LoadFrom retrieves the config.Config from the persistence backend at the specified key 30 LoadFrom(string) error 31 // Save stores the config.Config into the persistence backend 32 Save() error 33 // SaveTo stores the config.Config into the persistence backend at the specified key 34 SaveTo(string) error 35 36 // Config returns the stored config.Config 37 Config() config.Config 38 }