Help us shape the future of Go! Take the 2026 Go Developer Survey

mock

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2017 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ACLManagementToken

func ACLManagementToken() *structs.ACLToken

func ACLPolicy

func ACLPolicy() *structs.ACLPolicy

func ACLToken

func ACLToken() *structs.ACLToken

func AgentPolicy

func AgentPolicy(policy string) string

AgentPolicy is a helper for generating the hcl for a given agent policy.

func Alloc

func Alloc() *structs.Allocation

func CreatePolicy

func CreatePolicy(t testing.T, state StateStore, index uint64, name, rule string)

CreatePolicy creates a policy with the given name and rule.

func CreatePolicyAndToken

func CreatePolicyAndToken(t testing.T, state StateStore, index uint64, name, rule string) *structs.ACLToken

CreatePolicyAndToken creates a policy and then returns a token configured for just that policy. CreatePolicyAndToken uses the given index and index+1.

func CreateToken

func CreateToken(t testing.T, state StateStore, index uint64, policies []string) *structs.ACLToken

CreateToken creates a local, client token for the given policies

func Deployment

func Deployment() *structs.Deployment

func Eval

func Eval() *structs.Evaluation

func Job

func Job() *structs.Job

func JobSummary

func JobSummary(jobID string) *structs.JobSummary

func NamespacePolicy

func NamespacePolicy(namespace string, policy string, capabilities []string) string

NamespacePolicy is a helper for generating the policy hcl for a given namepsace. Either policy or capabilities may be nil but not both.

func Node

func Node() *structs.Node

func NodePolicy

func NodePolicy(policy string) string

NodePolicy is a helper for generating the hcl for a given node policy.

func PeriodicJob

func PeriodicJob() *structs.Job

func Plan

func Plan() *structs.Plan

func PlanResult

func PlanResult() *structs.PlanResult

func QuotaPolicy

func QuotaPolicy(policy string) string

QuotaPolicy is a helper for generating the hcl for a given quota policy.

func SystemJob

func SystemJob() *structs.Job

func VaultAccessor

func VaultAccessor() *structs.VaultAccessor

Types

type StateStore

type StateStore interface {
	UpsertACLPolicies(index uint64, policies []*structs.ACLPolicy) error
	UpsertACLTokens(index uint64, tokens []*structs.ACLToken) error
}

StateStore defines the methods required from state.StateStore but avoids a circular dependency.

Jump to

Keyboard shortcuts

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