format

package
v0.0.0-...-d88c8b5 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BufferFlowSchemaSpec

func BufferFlowSchemaSpec(buf *bytes.Buffer, fsSpec *fcv1a1.FlowSchemaSpec)

BufferFlowSchemaSpec writes a golang source expression for the given value to the given buffer

func BufferFmtPolicyRulesWithSubjectsSlim

func BufferFmtPolicyRulesWithSubjectsSlim(buf *bytes.Buffer, rule fcv1a1.PolicyRulesWithSubjects)

BufferFmtPolicyRulesWithSubjectsSlim writes a golang source expression for the given value to the given buffer but excludes the leading type name

func BufferPriorityLevelConfigurationSpec

func BufferPriorityLevelConfigurationSpec(buf *bytes.Buffer, plSpec *fcv1a1.PriorityLevelConfigurationSpec)

BufferPriorityLevelConfigurationSpec writes a golang source expression for the given value to the given buffer

func FmtFlowSchema

func FmtFlowSchema(fs *fcv1a1.FlowSchema) string

FmtFlowSchema produces a golang source expression of the value.

func FmtFlowSchemaSpec

func FmtFlowSchemaSpec(fsSpec *fcv1a1.FlowSchemaSpec) string

FmtFlowSchemaSpec produces a golang source expression equivalent to the given spec

func FmtPolicyRulesWithSubjects

func FmtPolicyRulesWithSubjects(rule fcv1a1.PolicyRulesWithSubjects) string

FmtPolicyRulesWithSubjects produces a golang source expression of the value.

func FmtPolicyRulesWithSubjectsSlim

func FmtPolicyRulesWithSubjectsSlim(rule fcv1a1.PolicyRulesWithSubjects) string

FmtPolicyRulesWithSubjectsSlim produces a golang source expression of the value but without the leading type name. See above for an example context where this is useful.

func FmtPriorityLevelConfiguration

func FmtPriorityLevelConfiguration(pl *fcv1a1.PriorityLevelConfiguration) string

FmtPriorityLevelConfiguration returns a golang source expression equivalent to the given value

func FmtPriorityLevelConfigurationSpec

func FmtPriorityLevelConfigurationSpec(plSpec *fcv1a1.PriorityLevelConfigurationSpec) string

FmtPriorityLevelConfigurationSpec returns a golang source expression equivalent to the given value

func FmtRequests

func FmtRequests(list []*request.RequestInfo) string

FmtRequests produces a golang source expression of the value.

func FmtUsers

func FmtUsers(list []user.Info) string

FmtUsers produces a golang source expression of the value.

func ToJSON

func ToJSON(val interface{}) string

ToJSON converts using encoding/json and handles errors by formatting them

Types

type Stringer

type Stringer struct {
	// contains filtered or unexported fields
}

Stringer marks the given value for custom formatting by this package.

func Fmt

func Fmt(val interface{}) Stringer

Fmt marks the given value for custom formatting by this package.

func (Stringer) String

func (sr Stringer) String() string

String formats to a string in full detail

Jump to

Keyboard shortcuts

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