Documentation
¶
Index ¶
- Variables
- type FieldModel
- func (*FieldModel) Descriptor() ([]byte, []int)deprecated
- func (x *FieldModel) GetName() string
- func (x *FieldModel) GetOptional() bool
- func (x *FieldModel) GetTag() string
- func (*FieldModel) ProtoMessage()
- func (x *FieldModel) ProtoReflect() protoreflect.Message
- func (x *FieldModel) Reset()
- func (x *FieldModel) String() string
- type FieldResponse
- func (*FieldResponse) Descriptor() ([]byte, []int)deprecated
- func (x *FieldResponse) GetEnumPrefix() bool
- func (x *FieldResponse) GetName() string
- func (*FieldResponse) ProtoMessage()
- func (x *FieldResponse) ProtoReflect() protoreflect.Message
- func (x *FieldResponse) Reset()
- func (x *FieldResponse) String() string
- type FieldValidation
- func (*FieldValidation) Descriptor() ([]byte, []int)deprecated
- func (x *FieldValidation) GetDive() bool
- func (x *FieldValidation) GetFormFileNames() string
- func (x *FieldValidation) GetFormValueNames() string
- func (x *FieldValidation) GetFormat() FieldValidationFormat
- func (x *FieldValidation) GetMax() int32
- func (x *FieldValidation) GetMaxLength() int32
- func (x *FieldValidation) GetMin() int32
- func (x *FieldValidation) GetPattern() string
- func (x *FieldValidation) GetRequired() bool
- func (x *FieldValidation) GetRequiredAll() string
- func (x *FieldValidation) GetRequiredAllError() string
- func (x *FieldValidation) GetRequiredAny() string
- func (x *FieldValidation) GetRequiredAnyError() string
- func (x *FieldValidation) GetRequiredIf() string
- func (x *FieldValidation) GetRequiredIfError() string
- func (x *FieldValidation) GetRequiredIfNot() string
- func (x *FieldValidation) GetRequiredWith() string
- func (x *FieldValidation) GetRequiredWithError() string
- func (x *FieldValidation) GetRequiredWithout() string
- func (*FieldValidation) ProtoMessage()
- func (x *FieldValidation) ProtoReflect() protoreflect.Message
- func (x *FieldValidation) Reset()
- func (x *FieldValidation) String() string
- type FieldValidationFormat
- func (FieldValidationFormat) Descriptor() protoreflect.EnumDescriptor
- func (x FieldValidationFormat) Enum() *FieldValidationFormat
- func (FieldValidationFormat) EnumDescriptor() ([]byte, []int)deprecated
- func (x FieldValidationFormat) Number() protoreflect.EnumNumber
- func (x FieldValidationFormat) String() string
- func (FieldValidationFormat) Type() protoreflect.EnumType
- func (x *FieldValidationFormat) UnmarshalJSON(b []byte) errordeprecated
- type Model
- type Operation
- func (*Operation) Descriptor() ([]byte, []int)deprecated
- func (x *Operation) GetBody() string
- func (x *Operation) GetHeader() []string
- func (x *Operation) GetMultipartContentType() bool
- func (x *Operation) GetScope() []string
- func (x *Operation) GetTextPlainContentType() bool
- func (*Operation) ProtoMessage()
- func (x *Operation) ProtoReflect() protoreflect.Message
- func (x *Operation) Reset()
- func (x *Operation) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( FieldValidationFormat_name = map[int32]string{ 0: "FIELD_VALIDATION_FORMAT_UNSPECIFIED", 1: "FIELD_VALIDATION_FORMAT_REGEX", } FieldValidationFormat_value = map[string]int32{ "FIELD_VALIDATION_FORMAT_UNSPECIFIED": 0, "FIELD_VALIDATION_FORMAT_REGEX": 1, } )
Enum value maps for FieldValidationFormat.
View Source
var ( // optional httpserver.extension.v1.FieldValidation validation = 65042; E_Validation = &file_httpserver_extension_v1_extension_proto_extTypes[0] // optional httpserver.extension.v1.FieldModel model = 65043; E_Model = &file_httpserver_extension_v1_extension_proto_extTypes[1] // optional httpserver.extension.v1.FieldResponse response = 65044; E_Response = &file_httpserver_extension_v1_extension_proto_extTypes[2] )
Extension fields to descriptorpb.FieldOptions.
View Source
var (
// optional httpserver.extension.v1.Model models = 65042;
E_Models = &file_httpserver_extension_v1_extension_proto_extTypes[4]
)
Extension fields to descriptorpb.MessageOptions.
View Source
var (
// optional httpserver.extension.v1.Operation operations = 65042;
E_Operations = &file_httpserver_extension_v1_extension_proto_extTypes[3]
)
Extension fields to descriptorpb.MethodOptions.
View Source
var File_httpserver_extension_v1_extension_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type FieldModel ¶
type FieldModel struct {
// An optional name the the field will have when exported. If none is used,
// the field name is going to be used instead.
Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// Sets if the member is optional, i.e., if it does not need to have a valid
// value.
Optional *bool `protobuf:"varint,2,opt,name=optional" json:"optional,omitempty"`
// Sets an alternative json tag for the field.
Tag *string `protobuf:"bytes,3,opt,name=tag" json:"tag,omitempty"`
// contains filtered or unexported fields
}
func (*FieldModel) Descriptor
deprecated
func (*FieldModel) Descriptor() ([]byte, []int)
Deprecated: Use FieldModel.ProtoReflect.Descriptor instead.
func (*FieldModel) GetName ¶
func (x *FieldModel) GetName() string
func (*FieldModel) GetOptional ¶
func (x *FieldModel) GetOptional() bool
func (*FieldModel) GetTag ¶
func (x *FieldModel) GetTag() string
func (*FieldModel) ProtoMessage ¶
func (*FieldModel) ProtoMessage()
func (*FieldModel) ProtoReflect ¶
func (x *FieldModel) ProtoReflect() protoreflect.Message
func (*FieldModel) Reset ¶
func (x *FieldModel) Reset()
func (*FieldModel) String ¶
func (x *FieldModel) String() string
type FieldResponse ¶
type FieldResponse struct {
// The output name of the field.
Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
// If the field is an enum type and is being exported as a string, sets if it
// will be exported with is prefix or not. The default behavior is disabled.
EnumPrefix *bool `protobuf:"varint,2,opt,name=enum_prefix,json=enumPrefix" json:"enum_prefix,omitempty"`
// contains filtered or unexported fields
}
func (*FieldResponse) Descriptor
deprecated
func (*FieldResponse) Descriptor() ([]byte, []int)
Deprecated: Use FieldResponse.ProtoReflect.Descriptor instead.
func (*FieldResponse) GetEnumPrefix ¶
func (x *FieldResponse) GetEnumPrefix() bool
func (*FieldResponse) GetName ¶
func (x *FieldResponse) GetName() string
func (*FieldResponse) ProtoMessage ¶
func (*FieldResponse) ProtoMessage()
func (*FieldResponse) ProtoReflect ¶
func (x *FieldResponse) ProtoReflect() protoreflect.Message
func (*FieldResponse) Reset ¶
func (x *FieldResponse) Reset()
func (*FieldResponse) String ¶
func (x *FieldResponse) String() string
type FieldValidation ¶
type FieldValidation struct {
// Sets which type of custom validator will be used.
Format *FieldValidationFormat `protobuf:"varint,1,opt,name=format,enum=httpserver.extension.v1.FieldValidationFormat" json:"format,omitempty"`
// Sets the minimum value of the member.
Min *int32 `protobuf:"varint,2,opt,name=min" json:"min,omitempty"`
// Sets the maximum value of the member.
Max *int32 `protobuf:"varint,3,opt,name=max" json:"max,omitempty"`
// Sets the string maximum length.
MaxLength *int32 `protobuf:"varint,4,opt,name=max_length,json=maxLength" json:"max_length,omitempty"`
// Sets a pattern for a specific format. The following formats supports this
// option:
// - id: If used, must contain the desired ID prefix to be validated. If not
// used, any ID will be validated.
Pattern *string `protobuf:"bytes,5,opt,name=pattern" json:"pattern,omitempty"`
// Sets if the member is mandatory, i.e., if it needs to have a valid value.
Required *bool `protobuf:"varint,6,opt,name=required" json:"required,omitempty"`
// Sets a condition to be evaluated as true in order to set the field as
// required when validating the message. The condition here is true when the
// field value is equal to the expected value.
//
// This option must have two arguments, the field name and the expected value.
RequiredIf *string `protobuf:"bytes,8,opt,name=required_if,json=requiredIf" json:"required_if,omitempty"`
// Sets a condition to be evaluated as true in order to set the field as
// required when validating the message. The condition here is the reverse
// of 'required_if' option, i.e., the condition is true when the field value
// is different than the expected value.
//
// This options must have two arguments, the field name and the expected value.
RequiredIfNot *string `protobuf:"bytes,9,opt,name=required_if_not,json=requiredIfNot" json:"required_if_not,omitempty"`
// Sets a custom error message for the 'required_if' condition.
RequiredIfError *string `protobuf:"bytes,10,opt,name=required_if_error,json=requiredIfError" json:"required_if_error,omitempty"`
// Sets a condition to be evaluated in order to set the field as required
// when validating the message. The condition here is true when the field is
// not empty.
RequiredWith *string `protobuf:"bytes,11,opt,name=required_with,json=requiredWith" json:"required_with,omitempty"`
// Sets a condition to be evaluated in order to set the field as required
// when validating the message. The condition here is true when the field is
// empty.
RequiredWithout *string `protobuf:"bytes,12,opt,name=required_without,json=requiredWithout" json:"required_without,omitempty"`
// Sets a custom error message for the 'required_with' condition.
RequiredWithError *string `protobuf:"bytes,13,opt,name=required_with_error,json=requiredWithError" json:"required_with_error,omitempty"`
// Sets a multiple condition to be evaluated in order to set the field as
// required when validating the message.
//
// The condition here is true when all field values are equal to the expected
// values.
RequiredAll *string `protobuf:"bytes,14,opt,name=required_all,json=requiredAll" json:"required_all,omitempty"`
// Sets a custom error message for the 'required_all' condition.
RequiredAllError *string `protobuf:"bytes,15,opt,name=required_all_error,json=requiredAllError" json:"required_all_error,omitempty"`
// Sets a multiple condition to be evaluated in order to set the field as
// required when validating the message.
//
// The condition here is true when any field values are equal to the expected
// values.
RequiredAny *string `protobuf:"bytes,16,opt,name=required_any,json=requiredAny" json:"required_any,omitempty"`
// Sets a custom error message for the 'required_any' condition.
RequiredAnyError *string `protobuf:"bytes,17,opt,name=required_any_error,json=requiredAnyError" json:"required_any_error,omitempty"`
// A required property to be used when 'format' is a 'MULTIPART_FORM' kind.
// It sets all supported field names received inside the form.
FormValueNames *string `protobuf:"bytes,18,opt,name=form_value_names,json=formValueNames" json:"form_value_names,omitempty"`
// A required property to be used when 'format' is a 'MULTIPART_FORM' kind.
// It sets all supported file names received inside the form.
FormFileNames *string `protobuf:"bytes,19,opt,name=form_file_names,json=formFileNames" json:"form_file_names,omitempty"`
// For 'repeated' fields, allows using the validation expression in all
// elements.
Dive *bool `protobuf:"varint,20,opt,name=dive" json:"dive,omitempty"`
// contains filtered or unexported fields
}
func (*FieldValidation) Descriptor
deprecated
func (*FieldValidation) Descriptor() ([]byte, []int)
Deprecated: Use FieldValidation.ProtoReflect.Descriptor instead.
func (*FieldValidation) GetDive ¶
func (x *FieldValidation) GetDive() bool
func (*FieldValidation) GetFormFileNames ¶
func (x *FieldValidation) GetFormFileNames() string
func (*FieldValidation) GetFormValueNames ¶
func (x *FieldValidation) GetFormValueNames() string
func (*FieldValidation) GetFormat ¶
func (x *FieldValidation) GetFormat() FieldValidationFormat
func (*FieldValidation) GetMax ¶
func (x *FieldValidation) GetMax() int32
func (*FieldValidation) GetMaxLength ¶
func (x *FieldValidation) GetMaxLength() int32
func (*FieldValidation) GetMin ¶
func (x *FieldValidation) GetMin() int32
func (*FieldValidation) GetPattern ¶
func (x *FieldValidation) GetPattern() string
func (*FieldValidation) GetRequired ¶
func (x *FieldValidation) GetRequired() bool
func (*FieldValidation) GetRequiredAll ¶
func (x *FieldValidation) GetRequiredAll() string
func (*FieldValidation) GetRequiredAllError ¶
func (x *FieldValidation) GetRequiredAllError() string
func (*FieldValidation) GetRequiredAny ¶
func (x *FieldValidation) GetRequiredAny() string
func (*FieldValidation) GetRequiredAnyError ¶
func (x *FieldValidation) GetRequiredAnyError() string
func (*FieldValidation) GetRequiredIf ¶
func (x *FieldValidation) GetRequiredIf() string
func (*FieldValidation) GetRequiredIfError ¶
func (x *FieldValidation) GetRequiredIfError() string
func (*FieldValidation) GetRequiredIfNot ¶
func (x *FieldValidation) GetRequiredIfNot() string
func (*FieldValidation) GetRequiredWith ¶
func (x *FieldValidation) GetRequiredWith() string
func (*FieldValidation) GetRequiredWithError ¶
func (x *FieldValidation) GetRequiredWithError() string
func (*FieldValidation) GetRequiredWithout ¶
func (x *FieldValidation) GetRequiredWithout() string
func (*FieldValidation) ProtoMessage ¶
func (*FieldValidation) ProtoMessage()
func (*FieldValidation) ProtoReflect ¶
func (x *FieldValidation) ProtoReflect() protoreflect.Message
func (*FieldValidation) Reset ¶
func (x *FieldValidation) Reset()
func (*FieldValidation) String ¶
func (x *FieldValidation) String() string
type FieldValidationFormat ¶
type FieldValidationFormat int32
const ( FieldValidationFormat_FIELD_VALIDATION_FORMAT_UNSPECIFIED FieldValidationFormat = 0 FieldValidationFormat_FIELD_VALIDATION_FORMAT_REGEX FieldValidationFormat = 1 )
func (FieldValidationFormat) Descriptor ¶
func (FieldValidationFormat) Descriptor() protoreflect.EnumDescriptor
func (FieldValidationFormat) Enum ¶
func (x FieldValidationFormat) Enum() *FieldValidationFormat
func (FieldValidationFormat) EnumDescriptor
deprecated
func (FieldValidationFormat) EnumDescriptor() ([]byte, []int)
Deprecated: Use FieldValidationFormat.Descriptor instead.
func (FieldValidationFormat) Number ¶
func (x FieldValidationFormat) Number() protoreflect.EnumNumber
func (FieldValidationFormat) String ¶
func (x FieldValidationFormat) String() string
func (FieldValidationFormat) Type ¶
func (FieldValidationFormat) Type() protoreflect.EnumType
func (*FieldValidationFormat) UnmarshalJSON
deprecated
func (x *FieldValidationFormat) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type Model ¶
type Model struct {
// Sets if the entity will implement the HttpResponse interface. HTTP
// services entities already have this option enabled by default.
HttpResponse *bool `protobuf:"varint,1,opt,name=http_response,json=httpResponse" json:"http_response,omitempty"`
// If true, sets the message to not be exported to the models.go source
// file.
DontExport *bool `protobuf:"varint,2,opt,name=dont_export,json=dontExport" json:"dont_export,omitempty"`
// contains filtered or unexported fields
}
Manipulates options related to the entity model generating. It allows the user to choose whether to create new models of it.
func (*Model) Descriptor
deprecated
func (*Model) GetDontExport ¶
func (*Model) GetHttpResponse ¶
func (*Model) ProtoMessage ¶
func (*Model) ProtoMessage()
func (*Model) ProtoReflect ¶
func (x *Model) ProtoReflect() protoreflect.Message
type Operation ¶
type Operation struct {
// Sets the scope options for the RPC method.
//
// This scope will be used to prevent access the route,
// i.e., the user does not have the right scope to access it.
//
// Example:
//
// service HttpService {
// rpc CreateHttp(CreateHttpRequest) returns (CreateHttpResponse) {
// option (google.api.http) = {
// post: "/create_http"
// body: "*"
// };
// option (fasthttp.extension.v1.operations) = {
// scope: "app/http.write"
// scope: "app/http.read"
// };
// };
// };
//
Scope []string `protobuf:"bytes,1,rep,name=scope" json:"scope,omitempty"`
// Sets a request parameter name that should be loaded from the
// request HTTP header.
//
// This header name must be a valid message field name. Otherwise
// it won't compile.
Header []string `protobuf:"bytes,2,rep,name=header" json:"header,omitempty"`
// Changes the endpoint Content-Type format from 'application/json' into
// a 'multipart/form-data'. Enabling this option will require that the
// endpoint message to have a field of kind shared_message.MultipartFieldProto
// repeated.
MultipartContentType *bool `protobuf:"varint,3,opt,name=multipart_content_type,json=multipartContentType" json:"multipart_content_type,omitempty"`
// Changes the endpoint Content-Type format from 'application/json' into
// a 'text/plain'.
TextPlainContentType *bool `protobuf:"varint,4,opt,name=text_plain_content_type,json=textPlainContentType" json:"text_plain_content_type,omitempty"`
// Sets the name of a valid message field that will hold the entire request
// body. This field must be of a 'bytes' type.
Body *string `protobuf:"bytes,5,opt,name=body" json:"body,omitempty"`
// contains filtered or unexported fields
}
func (*Operation) Descriptor
deprecated
func (*Operation) GetMultipartContentType ¶
func (*Operation) GetTextPlainContentType ¶
func (*Operation) ProtoMessage ¶
func (*Operation) ProtoMessage()
func (*Operation) ProtoReflect ¶
func (x *Operation) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.