headers

package
v0.0.0-...-47530dd Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package headers provides functionality to generate S3 HTTP headers randomly using type constraints of S3. Therefore this package provides lookup functions to get the value type of a header key.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kind

type Kind string

Kind represents all different kinds of AWS S3 HTTP header types.

const (
	// Enum is a set of values
	Enum Kind = "enum"
	// Int is a natural number
	Int Kind = "int"
	// Time is a date in time.
	Time Kind = "time"
	// Base64 is a base64-encoded string
	Base64 Kind = "base64"
	// Hex is a hex-encoded string
	Hex Kind = "hex"
)

type Type

type Type interface {
	// Random returns a random value of this type.
	Random(rand sf.Random) string

	// Kind returns the kind this type belongs to.
	Kind() Kind
}

Type represents a type of an AWS S3 HTTP header.

func TypeOf

func TypeOf(header string) (t Type, ok bool)

TypeOf returns the type of the provided header. The additional ok value indicates whether the header exists.

func TypeOfKind

func TypeOfKind(kind Kind, rand sf.Random) (t Type, ok bool)

TypeOfKind returns a random type of the requested kind. The additional ok value indicates whether such a kind exists and whether there are any types of that kind.

Jump to

Keyboard shortcuts

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