Documentation
¶
Index ¶
Constants ¶
View Source
const (
DefaultK8sSecret = "dunebot-token-storage"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileStorage ¶
type FileStorage struct {
File string
}
func NewFileStorage ¶
func NewFileStorage(file string) *FileStorage
func (*FileStorage) Load ¶
func (s *FileStorage) Load() (map[string]*proto.Installation, error)
func (*FileStorage) Save ¶
func (s *FileStorage) Save(tokens map[string]*proto.Installation) error
type K8sConfigReadder ¶
func InClusterConfig ¶
func InClusterConfig() K8sConfigReadder
type K8sStorage ¶
type K8sStorage struct { Clientset kubernetes.Interface Namespace string }
func NewK8sStorage ¶
func NewK8sStorage(namespace string, k8sConfig K8sConfigReadder) (*K8sStorage, error)
func (*K8sStorage) Load ¶
func (s *K8sStorage) Load() (map[string]*proto.Installation, error)
func (*K8sStorage) Save ¶
func (s *K8sStorage) Save(tokens map[string]*proto.Installation) error
type Storage ¶
type Storage interface { Load() (map[string]*proto.Installation, error) Save(tokens map[string]*proto.Installation) error }
Click to show internal directories.
Click to hide internal directories.