Documentation
¶
Overview ¶
Package container exposes Secret Container operations.
Licensed to Elasticsearch B.V. under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Elasticsearch B.V. licenses this file to you 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 ¶
- func Dump(w io.Writer, c *containerv1.Container) error
- func GenerateKey(fopts ...GenerateOption) (publicKey, privateKey *[32]byte, err error)
- func Load(r io.Reader) (*containerv1.Container, error)
- func Seal(container *containerv1.Container, peersPublicKey ...*[32]byte) (*containerv1.Container, error)
- func Unseal(container *containerv1.Container, identity *memguard.LockedBuffer) (*containerv1.Container, error)
- type GenerateOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dump ¶
func Dump(w io.Writer, c *containerv1.Container) error
Dump the marshaled container instance to writer. nolint:interfacer // Tighly coupled to type
func GenerateKey ¶ added in v0.2.1
func GenerateKey(fopts ...GenerateOption) (publicKey, privateKey *[32]byte, err error)
CenerateKey create an X25519 key pair used as container identifier.
func Load ¶
func Load(r io.Reader) (*containerv1.Container, error)
Load a reader to extract as a container.
func Seal ¶
func Seal(container *containerv1.Container, peersPublicKey ...*[32]byte) (*containerv1.Container, error)
Seal a secret container
func Unseal ¶
func Unseal(container *containerv1.Container, identity *memguard.LockedBuffer) (*containerv1.Container, error)
Unseal a sealed container with the given identity
Types ¶
type GenerateOption ¶ added in v0.2.1
type GenerateOption func(o *generateOptions)
GenerateOption represents functional pattern builder for optional parameters.
func WithDeterministicKey ¶ added in v0.2.1
func WithDeterministicKey(masterKey *memguard.LockedBuffer, target string) GenerateOption
WithDeterministicKey enables deterministic container key generation.
func WithRandom ¶ added in v0.2.1
func WithRandom(random io.Reader) GenerateOption
WithRandom provides the random source for key generation.