container

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: Apache-2.0 Imports: 17 Imported by: 4

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

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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