amphora

package
v0.0.0-...-b7fd0f1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Copyright (c) 2021 - for information on the respective copyright owner see the NOTICE file and/or the repository https://github.com/carbynestack/ephemeral.

SPDX-License-Identifier: Apache-2.0

Copyright (c) 2021 - for information on the respective copyright owner see the NOTICE file and/or the repository https://github.com/carbynestack/ephemeral.

SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractClient

type AbstractClient interface {
	GetSecretShare(string) (SecretShare, error)
	CreateSecretShare(*SecretShare) error
}

AbstractClient is an interface for object storage client.

type Client

type Client struct {
	URL        url.URL
	HTTPClient http.Client
}

Client is a client for Amphora.

func NewAmphoraClient

func NewAmphoraClient(u url.URL) (*Client, error)

NewAmphoraClient returns a new Amphora client.

func (*Client) CreateSecretShare

func (c *Client) CreateSecretShare(os *SecretShare) error

CreateSecretShare creates a new secret share by sending a POST request against Amphora.

func (*Client) GetSecretShare

func (c *Client) GetSecretShare(id string) (SecretShare, error)

GetSecretShare creates a new secret share by sending a POST request against Amphora.

type MockedRoundTripper

type MockedRoundTripper struct {
	ExpectedPath         string
	ReturnJson           []byte
	ExpectedResponseCode int
}

func (*MockedRoundTripper) RoundTrip

func (m *MockedRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

type SecretShare

type SecretShare struct {
	SecretID string `json:"secretId"`
	Data     string `json:"data"`
	Tags     []Tag  `json:"tags"`
}

SecretShare is a secret shared value stored in Amphora.

type Tag

type Tag struct {
	ValueType string `json:"valueType"`
	Key       string `json:"key"`
	Value     string `json:"value"`
}

Tag defines a tag that could be assigned to an secret share.

Jump to

Keyboard shortcuts

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