prototool

package
v14.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_internal_tool_prototool_prototool_proto protoreflect.FileDescriptor

Functions

func Duration

func Duration(d **duration.Duration, defaultValue time.Duration)

func Float64

func Float64(s *float64, defaultValue float64)

func HttpHeaderToValuesMap

func HttpHeaderToValuesMap(from http.Header) map[string]*Values

func Int32

func Int32(s *int32, defaultValue int32)

func NotNil

func NotNil(field interface{})

NotNil ensures that the memory that the field pointer is pointing to is not nil. field must be a valid pointer. It's target is checked for nil-ness and populated if it's nil.

func String

func String(s *string, defaultValue string)

func Uint32

func Uint32(d *uint32, defaultValue uint32)

func UrlValuesToValuesMap

func UrlValuesToValuesMap(from url.Values) map[string]*Values

func ValuesMapToHttpHeader

func ValuesMapToHttpHeader(from map[string]*Values) http.Header

func ValuesMapToUrlValues

func ValuesMapToUrlValues(from map[string]*Values) url.Values

Types

type HttpRequest

type HttpRequest struct {
	Method  string             `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
	Header  map[string]*Values `` /* 153-byte string literal not displayed */
	UrlPath string             `protobuf:"bytes,3,opt,name=url_path,json=urlPath,proto3" json:"url_path,omitempty"`
	Query   map[string]*Values `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*HttpRequest) Descriptor deprecated

func (*HttpRequest) Descriptor() ([]byte, []int)

Deprecated: Use HttpRequest.ProtoReflect.Descriptor instead.

func (*HttpRequest) GetHeader

func (x *HttpRequest) GetHeader() map[string]*Values

func (*HttpRequest) GetMethod

func (x *HttpRequest) GetMethod() string

func (*HttpRequest) GetQuery

func (x *HttpRequest) GetQuery() map[string]*Values

func (*HttpRequest) GetUrlPath

func (x *HttpRequest) GetUrlPath() string

func (*HttpRequest) HttpHeader

func (x *HttpRequest) HttpHeader() http.Header

func (*HttpRequest) ProtoMessage

func (*HttpRequest) ProtoMessage()

func (*HttpRequest) ProtoReflect

func (x *HttpRequest) ProtoReflect() protoreflect.Message

func (*HttpRequest) Reset

func (x *HttpRequest) Reset()

func (*HttpRequest) String

func (x *HttpRequest) String() string

func (*HttpRequest) UrlQuery

func (x *HttpRequest) UrlQuery() url.Values

func (*HttpRequest) Validate

func (m *HttpRequest) Validate() error

Validate checks the field values on HttpRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type HttpRequestValidationError

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

HttpRequestValidationError is the validation error returned by HttpRequest.Validate if the designated constraints aren't met.

func (HttpRequestValidationError) Cause

Cause function returns cause value.

func (HttpRequestValidationError) Error

Error satisfies the builtin error interface

func (HttpRequestValidationError) ErrorName

func (e HttpRequestValidationError) ErrorName() string

ErrorName returns error name.

func (HttpRequestValidationError) Field

Field function returns field value.

func (HttpRequestValidationError) Key

Key function returns key value.

func (HttpRequestValidationError) Reason

Reason function returns reason value.

type HttpResponse

type HttpResponse struct {
	StatusCode int32              `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	Status     string             `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	Header     map[string]*Values `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*HttpResponse) Descriptor deprecated

func (*HttpResponse) Descriptor() ([]byte, []int)

Deprecated: Use HttpResponse.ProtoReflect.Descriptor instead.

func (*HttpResponse) GetHeader

func (x *HttpResponse) GetHeader() map[string]*Values

func (*HttpResponse) GetStatus

func (x *HttpResponse) GetStatus() string

func (*HttpResponse) GetStatusCode

func (x *HttpResponse) GetStatusCode() int32

func (*HttpResponse) HttpHeader

func (x *HttpResponse) HttpHeader() http.Header

func (*HttpResponse) ProtoMessage

func (*HttpResponse) ProtoMessage()

func (*HttpResponse) ProtoReflect

func (x *HttpResponse) ProtoReflect() protoreflect.Message

func (*HttpResponse) Reset

func (x *HttpResponse) Reset()

func (*HttpResponse) String

func (x *HttpResponse) String() string

func (*HttpResponse) Validate

func (m *HttpResponse) Validate() error

Validate checks the field values on HttpResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type HttpResponseValidationError

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

HttpResponseValidationError is the validation error returned by HttpResponse.Validate if the designated constraints aren't met.

func (HttpResponseValidationError) Cause

Cause function returns cause value.

func (HttpResponseValidationError) Error

Error satisfies the builtin error interface

func (HttpResponseValidationError) ErrorName

func (e HttpResponseValidationError) ErrorName() string

ErrorName returns error name.

func (HttpResponseValidationError) Field

Field function returns field value.

func (HttpResponseValidationError) Key

Key function returns key value.

func (HttpResponseValidationError) Reason

Reason function returns reason value.

type Values

type Values struct {
	Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Values) Descriptor deprecated

func (*Values) Descriptor() ([]byte, []int)

Deprecated: Use Values.ProtoReflect.Descriptor instead.

func (*Values) GetValue

func (x *Values) GetValue() []string

func (*Values) ProtoMessage

func (*Values) ProtoMessage()

func (*Values) ProtoReflect

func (x *Values) ProtoReflect() protoreflect.Message

func (*Values) Reset

func (x *Values) Reset()

func (*Values) String

func (x *Values) String() string

func (*Values) Validate

func (m *Values) Validate() error

Validate checks the field values on Values with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type ValuesValidationError

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

ValuesValidationError is the validation error returned by Values.Validate if the designated constraints aren't met.

func (ValuesValidationError) Cause

func (e ValuesValidationError) Cause() error

Cause function returns cause value.

func (ValuesValidationError) Error

func (e ValuesValidationError) Error() string

Error satisfies the builtin error interface

func (ValuesValidationError) ErrorName

func (e ValuesValidationError) ErrorName() string

ErrorName returns error name.

func (ValuesValidationError) Field

func (e ValuesValidationError) Field() string

Field function returns field value.

func (ValuesValidationError) Key

func (e ValuesValidationError) Key() bool

Key function returns key value.

func (ValuesValidationError) Reason

func (e ValuesValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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