id
int32
0
167k
repo
stringlengths
5
54
path
stringlengths
4
155
func_name
stringlengths
1
118
original_string
stringlengths
52
85.5k
language
stringclasses
1 value
code
stringlengths
52
85.5k
code_tokens
list
docstring
stringlengths
6
2.61k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
85
252
25,200
envoyproxy/go-control-plane
envoy/admin/v2alpha/config_dump.pb.validate.go
Validate
func (m *RoutesConfigDump) Validate() error { if m == nil { return nil } for idx, item := range m.GetStaticRouteConfigs() { _, _ = idx, item { tmp := item if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDumpValidatio...
go
func (m *RoutesConfigDump) Validate() error { if m == nil { return nil } for idx, item := range m.GetStaticRouteConfigs() { _, _ = idx, item { tmp := item if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDumpValidatio...
[ "func", "(", "m", "*", "RoutesConfigDump", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetStaticRouteConfigs", "(", ")", "{", "_", ",...
// Validate checks the field values on RoutesConfigDump with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RoutesConfigDump", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/admin/v2alpha/config_dump.pb.validate.go#L498-L544
25,201
envoyproxy/go-control-plane
envoy/admin/v2alpha/config_dump.pb.validate.go
Validate
func (m *ListenersConfigDump_StaticListener) Validate() error { if m == nil { return nil } { tmp := m.GetListener() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_StaticListenerValidationError{ field: "Listener"...
go
func (m *ListenersConfigDump_StaticListener) Validate() error { if m == nil { return nil } { tmp := m.GetListener() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_StaticListenerValidationError{ field: "Listener"...
[ "func", "(", "m", "*", "ListenersConfigDump_StaticListener", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetListener", "(", ")", "\n\n", "if", "v", ",", "ok", ...
// Validate checks the field values on ListenersConfigDump_StaticListener with // the rules defined in the proto definition for this message. If any rules // are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "ListenersConfigDump_StaticListener", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "retur...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/admin/v2alpha/config_dump.pb.validate.go#L603-L639
25,202
envoyproxy/go-control-plane
envoy/admin/v2alpha/config_dump.pb.validate.go
Validate
func (m *ListenersConfigDump_DynamicListener) Validate() error { if m == nil { return nil } // no validation rules for VersionInfo { tmp := m.GetListener() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_DynamicListe...
go
func (m *ListenersConfigDump_DynamicListener) Validate() error { if m == nil { return nil } // no validation rules for VersionInfo { tmp := m.GetListener() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_DynamicListe...
[ "func", "(", "m", "*", "ListenersConfigDump_DynamicListener", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for VersionInfo", "{", "tmp", ":=", "m", ".", "GetListener", "(", ...
// Validate checks the field values on ListenersConfigDump_DynamicListener with // the rules defined in the proto definition for this message. If any rules // are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "ListenersConfigDump_DynamicListener", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "retu...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/admin/v2alpha/config_dump.pb.validate.go#L701-L739
25,203
envoyproxy/go-control-plane
envoy/admin/v2alpha/config_dump.pb.validate.go
Validate
func (m *ClustersConfigDump_StaticCluster) Validate() error { if m == nil { return nil } { tmp := m.GetCluster() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDump_StaticClusterValidationError{ field: "Cluster", ...
go
func (m *ClustersConfigDump_StaticCluster) Validate() error { if m == nil { return nil } { tmp := m.GetCluster() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDump_StaticClusterValidationError{ field: "Cluster", ...
[ "func", "(", "m", "*", "ClustersConfigDump_StaticCluster", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetCluster", "(", ")", "\n\n", "if", "v", ",", "ok", "...
// Validate checks the field values on ClustersConfigDump_StaticCluster with // the rules defined in the proto definition for this message. If any rules // are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "ClustersConfigDump_StaticCluster", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returne...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/admin/v2alpha/config_dump.pb.validate.go#L801-L837
25,204
envoyproxy/go-control-plane
envoy/admin/v2alpha/config_dump.pb.validate.go
Validate
func (m *ClustersConfigDump_DynamicCluster) Validate() error { if m == nil { return nil } // no validation rules for VersionInfo { tmp := m.GetCluster() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDump_DynamicClusterVa...
go
func (m *ClustersConfigDump_DynamicCluster) Validate() error { if m == nil { return nil } // no validation rules for VersionInfo { tmp := m.GetCluster() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDump_DynamicClusterVa...
[ "func", "(", "m", "*", "ClustersConfigDump_DynamicCluster", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for VersionInfo", "{", "tmp", ":=", "m", ".", "GetCluster", "(", ")"...
// Validate checks the field values on ClustersConfigDump_DynamicCluster with // the rules defined in the proto definition for this message. If any rules // are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "ClustersConfigDump_DynamicCluster", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "return...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/admin/v2alpha/config_dump.pb.validate.go#L899-L937
25,205
envoyproxy/go-control-plane
envoy/admin/v2alpha/config_dump.pb.validate.go
Validate
func (m *RoutesConfigDump_StaticRouteConfig) Validate() error { if m == nil { return nil } { tmp := m.GetRouteConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDump_StaticRouteConfigValidationError{ field: "RouteC...
go
func (m *RoutesConfigDump_StaticRouteConfig) Validate() error { if m == nil { return nil } { tmp := m.GetRouteConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDump_StaticRouteConfigValidationError{ field: "RouteC...
[ "func", "(", "m", "*", "RoutesConfigDump_StaticRouteConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetRouteConfig", "(", ")", "\n\n", "if", "v", ",", "ok...
// Validate checks the field values on RoutesConfigDump_StaticRouteConfig with // the rules defined in the proto definition for this message. If any rules // are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RoutesConfigDump_StaticRouteConfig", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "retur...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/admin/v2alpha/config_dump.pb.validate.go#L999-L1035
25,206
envoyproxy/go-control-plane
envoy/admin/v2alpha/config_dump.pb.validate.go
Validate
func (m *RoutesConfigDump_DynamicRouteConfig) Validate() error { if m == nil { return nil } // no validation rules for VersionInfo { tmp := m.GetRouteConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDump_DynamicRoute...
go
func (m *RoutesConfigDump_DynamicRouteConfig) Validate() error { if m == nil { return nil } // no validation rules for VersionInfo { tmp := m.GetRouteConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDump_DynamicRoute...
[ "func", "(", "m", "*", "RoutesConfigDump_DynamicRouteConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for VersionInfo", "{", "tmp", ":=", "m", ".", "GetRouteConfig", "(",...
// Validate checks the field values on RoutesConfigDump_DynamicRouteConfig with // the rules defined in the proto definition for this message. If any rules // are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RoutesConfigDump_DynamicRouteConfig", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "retu...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/admin/v2alpha/config_dump.pb.validate.go#L1097-L1135
25,207
envoyproxy/go-control-plane
envoy/admin/v2alpha/certs.pb.validate.go
Validate
func (m *Certificates) Validate() error { if m == nil { return nil } for idx, item := range m.GetCertificates() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificatesValidationError{ f...
go
func (m *Certificates) Validate() error { if m == nil { return nil } for idx, item := range m.GetCertificates() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificatesValidationError{ f...
[ "func", "(", "m", "*", "Certificates", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetCertificates", "(", ")", "{", "_", ",", "_", ...
// Validate checks the field values on Certificates with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "Certificates", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/admin/v2alpha/certs.pb.validate.go#L39-L65
25,208
envoyproxy/go-control-plane
envoy/admin/v2alpha/certs.pb.validate.go
Validate
func (m *Certificate) Validate() error { if m == nil { return nil } for idx, item := range m.GetCaCert() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationError{ field: f...
go
func (m *Certificate) Validate() error { if m == nil { return nil } for idx, item := range m.GetCaCert() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationError{ field: f...
[ "func", "(", "m", "*", "Certificate", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetCaCert", "(", ")", "{", "_", ",", "_", "=", ...
// Validate checks the field values on Certificate with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "Certificate", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/admin/v2alpha/certs.pb.validate.go#L124-L170
25,209
envoyproxy/go-control-plane
envoy/admin/v2alpha/certs.pb.validate.go
Validate
func (m *CertificateDetails) Validate() error { if m == nil { return nil } // no validation rules for Path // no validation rules for SerialNumber for idx, item := range m.GetSubjectAltNames() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { ...
go
func (m *CertificateDetails) Validate() error { if m == nil { return nil } // no validation rules for Path // no validation rules for SerialNumber for idx, item := range m.GetSubjectAltNames() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { ...
[ "func", "(", "m", "*", "CertificateDetails", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Path", "// no validation rules for SerialNumber", "for", "idx", ",", "item", ":=", ...
// Validate checks the field values on CertificateDetails with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "CertificateDetails", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/admin/v2alpha/certs.pb.validate.go#L229-L291
25,210
envoyproxy/go-control-plane
envoy/admin/v2alpha/certs.pb.validate.go
Validate
func (m *SubjectAlternateName) Validate() error { if m == nil { return nil } switch m.Name.(type) { case *SubjectAlternateName_Dns: // no validation rules for Dns case *SubjectAlternateName_Uri: // no validation rules for Uri } return nil }
go
func (m *SubjectAlternateName) Validate() error { if m == nil { return nil } switch m.Name.(type) { case *SubjectAlternateName_Dns: // no validation rules for Dns case *SubjectAlternateName_Uri: // no validation rules for Uri } return nil }
[ "func", "(", "m", "*", "SubjectAlternateName", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "switch", "m", ".", "Name", ".", "(", "type", ")", "{", "case", "*", "SubjectAlternateName_Dns", ...
// Validate checks the field values on SubjectAlternateName with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "SubjectAlternateName", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/admin/v2alpha/certs.pb.validate.go#L352-L368
25,211
envoyproxy/go-control-plane
envoy/api/v2/lds.pb.validate.go
Validate
func (m *Listener_DeprecatedV1) Validate() error { if m == nil { return nil } { tmp := m.GetBindToPort() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Listener_DeprecatedV1ValidationError{ field: "BindToPort", reason: "embedd...
go
func (m *Listener_DeprecatedV1) Validate() error { if m == nil { return nil } { tmp := m.GetBindToPort() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Listener_DeprecatedV1ValidationError{ field: "BindToPort", reason: "embedd...
[ "func", "(", "m", "*", "Listener_DeprecatedV1", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetBindToPort", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "...
// Validate checks the field values on Listener_DeprecatedV1 with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "Listener_DeprecatedV1", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/lds.pb.validate.go#L309-L330
25,212
envoyproxy/go-control-plane
envoy/api/v2/eds.pb.validate.go
Validate
func (m *ClusterLoadAssignment) Validate() error { if m == nil { return nil } if len(m.GetClusterName()) < 1 { return ClusterLoadAssignmentValidationError{ field: "ClusterName", reason: "value length must be at least 1 bytes", } } for idx, item := range m.GetEndpoints() { _, _ = idx, item { ...
go
func (m *ClusterLoadAssignment) Validate() error { if m == nil { return nil } if len(m.GetClusterName()) < 1 { return ClusterLoadAssignmentValidationError{ field: "ClusterName", reason: "value length must be at least 1 bytes", } } for idx, item := range m.GetEndpoints() { _, _ = idx, item { ...
[ "func", "(", "m", "*", "ClusterLoadAssignment", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetClusterName", "(", ")", ")", "<", "1", "{", "return", "Cluster...
// Validate checks the field values on ClusterLoadAssignment with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "ClusterLoadAssignment", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/eds.pb.validate.go#L39-L89
25,213
envoyproxy/go-control-plane
envoy/api/v2/eds.pb.validate.go
Validate
func (m *ClusterLoadAssignment_Policy) Validate() error { if m == nil { return nil } for idx, item := range m.GetDropOverloads() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterLoadAssignme...
go
func (m *ClusterLoadAssignment_Policy) Validate() error { if m == nil { return nil } for idx, item := range m.GetDropOverloads() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterLoadAssignme...
[ "func", "(", "m", "*", "ClusterLoadAssignment_Policy", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetDropOverloads", "(", ")", "{", "_...
// Validate checks the field values on ClusterLoadAssignment_Policy with the // rules defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "ClusterLoadAssignment_Policy", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", ...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/eds.pb.validate.go#L150-L208
25,214
envoyproxy/go-control-plane
envoy/api/v2/eds.pb.validate.go
Validate
func (m *ClusterLoadAssignment_Policy_DropOverload) Validate() error { if m == nil { return nil } if len(m.GetCategory()) < 1 { return ClusterLoadAssignment_Policy_DropOverloadValidationError{ field: "Category", reason: "value length must be at least 1 bytes", } } { tmp := m.GetDropPercentage() ...
go
func (m *ClusterLoadAssignment_Policy_DropOverload) Validate() error { if m == nil { return nil } if len(m.GetCategory()) < 1 { return ClusterLoadAssignment_Policy_DropOverloadValidationError{ field: "Category", reason: "value length must be at least 1 bytes", } } { tmp := m.GetDropPercentage() ...
[ "func", "(", "m", "*", "ClusterLoadAssignment_Policy_DropOverload", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetCategory", "(", ")", ")", "<", "1", "{", "re...
// Validate checks the field values on // ClusterLoadAssignment_Policy_DropOverload with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "ClusterLoadAssignment_Policy_DropOverload", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", ...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/eds.pb.validate.go#L270-L298
25,215
envoyproxy/go-control-plane
envoy/config/filter/network/mysql_proxy/v1alpha1/mysql_proxy.pb.validate.go
Validate
func (m *MySQLProxy) Validate() error { if m == nil { return nil } if len(m.GetStatPrefix()) < 1 { return MySQLProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } } // no validation rules for AccessLog return nil }
go
func (m *MySQLProxy) Validate() error { if m == nil { return nil } if len(m.GetStatPrefix()) < 1 { return MySQLProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } } // no validation rules for AccessLog return nil }
[ "func", "(", "m", "*", "MySQLProxy", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetStatPrefix", "(", ")", ")", "<", "1", "{", "return", "MySQLProxyValidatio...
// Validate checks the field values on MySQLProxy with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "MySQLProxy", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/network/mysql_proxy/v1alpha1/mysql_proxy.pb.validate.go#L38-L53
25,216
envoyproxy/go-control-plane
pkg/cache/simple.go
SetSnapshot
func (cache *snapshotCache) SetSnapshot(node string, snapshot Snapshot) error { cache.mu.Lock() defer cache.mu.Unlock() // update the existing entry cache.snapshots[node] = snapshot // trigger existing watches for which version changed if info, ok := cache.status[node]; ok { info.mu.Lock() for id, watch := ...
go
func (cache *snapshotCache) SetSnapshot(node string, snapshot Snapshot) error { cache.mu.Lock() defer cache.mu.Unlock() // update the existing entry cache.snapshots[node] = snapshot // trigger existing watches for which version changed if info, ok := cache.status[node]; ok { info.mu.Lock() for id, watch := ...
[ "func", "(", "cache", "*", "snapshotCache", ")", "SetSnapshot", "(", "node", "string", ",", "snapshot", "Snapshot", ")", "error", "{", "cache", ".", "mu", ".", "Lock", "(", ")", "\n", "defer", "cache", ".", "mu", ".", "Unlock", "(", ")", "\n\n", "// ...
// SetSnapshotCache updates a snapshot for a node.
[ "SetSnapshotCache", "updates", "a", "snapshot", "for", "a", "node", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/pkg/cache/simple.go#L100-L126
25,217
envoyproxy/go-control-plane
pkg/cache/simple.go
GetSnapshot
func (cache *snapshotCache) GetSnapshot(node string) (Snapshot, error) { cache.mu.RLock() defer cache.mu.RUnlock() snap, ok := cache.snapshots[node] if !ok { return Snapshot{}, fmt.Errorf("no snapshot found for node %s", node) } return snap, nil }
go
func (cache *snapshotCache) GetSnapshot(node string) (Snapshot, error) { cache.mu.RLock() defer cache.mu.RUnlock() snap, ok := cache.snapshots[node] if !ok { return Snapshot{}, fmt.Errorf("no snapshot found for node %s", node) } return snap, nil }
[ "func", "(", "cache", "*", "snapshotCache", ")", "GetSnapshot", "(", "node", "string", ")", "(", "Snapshot", ",", "error", ")", "{", "cache", ".", "mu", ".", "RLock", "(", ")", "\n", "defer", "cache", ".", "mu", ".", "RUnlock", "(", ")", "\n\n", "s...
// GetSnapshots gets the snapshot for a node, and returns an error if not found.
[ "GetSnapshots", "gets", "the", "snapshot", "for", "a", "node", "and", "returns", "an", "error", "if", "not", "found", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/pkg/cache/simple.go#L129-L138
25,218
envoyproxy/go-control-plane
pkg/cache/simple.go
ClearSnapshot
func (cache *snapshotCache) ClearSnapshot(node string) { cache.mu.Lock() defer cache.mu.Unlock() delete(cache.snapshots, node) delete(cache.status, node) }
go
func (cache *snapshotCache) ClearSnapshot(node string) { cache.mu.Lock() defer cache.mu.Unlock() delete(cache.snapshots, node) delete(cache.status, node) }
[ "func", "(", "cache", "*", "snapshotCache", ")", "ClearSnapshot", "(", "node", "string", ")", "{", "cache", ".", "mu", ".", "Lock", "(", ")", "\n", "defer", "cache", ".", "mu", ".", "Unlock", "(", ")", "\n\n", "delete", "(", "cache", ".", "snapshots"...
// ClearSnapshot clears snapshot and info for a node.
[ "ClearSnapshot", "clears", "snapshot", "and", "info", "for", "a", "node", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/pkg/cache/simple.go#L141-L147
25,219
envoyproxy/go-control-plane
pkg/cache/simple.go
nameSet
func nameSet(names []string) map[string]bool { set := make(map[string]bool) for _, name := range names { set[name] = true } return set }
go
func nameSet(names []string) map[string]bool { set := make(map[string]bool) for _, name := range names { set[name] = true } return set }
[ "func", "nameSet", "(", "names", "[", "]", "string", ")", "map", "[", "string", "]", "bool", "{", "set", ":=", "make", "(", "map", "[", "string", "]", "bool", ")", "\n", "for", "_", ",", "name", ":=", "range", "names", "{", "set", "[", "name", ...
// nameSet creates a map from a string slice to value true.
[ "nameSet", "creates", "a", "map", "from", "a", "string", "slice", "to", "value", "true", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/pkg/cache/simple.go#L150-L156
25,220
envoyproxy/go-control-plane
pkg/cache/simple.go
superset
func superset(names map[string]bool, resources map[string]Resource) error { for resourceName := range resources { if _, exists := names[resourceName]; !exists { return fmt.Errorf("%q not listed", resourceName) } } return nil }
go
func superset(names map[string]bool, resources map[string]Resource) error { for resourceName := range resources { if _, exists := names[resourceName]; !exists { return fmt.Errorf("%q not listed", resourceName) } } return nil }
[ "func", "superset", "(", "names", "map", "[", "string", "]", "bool", ",", "resources", "map", "[", "string", "]", "Resource", ")", "error", "{", "for", "resourceName", ":=", "range", "resources", "{", "if", "_", ",", "exists", ":=", "names", "[", "reso...
// superset checks that all resources are listed in the names set.
[ "superset", "checks", "that", "all", "resources", "are", "listed", "in", "the", "names", "set", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/pkg/cache/simple.go#L159-L166
25,221
envoyproxy/go-control-plane
pkg/cache/simple.go
CreateWatch
func (cache *snapshotCache) CreateWatch(request Request) (chan Response, func()) { nodeID := cache.hash.ID(request.Node) cache.mu.Lock() defer cache.mu.Unlock() info, ok := cache.status[nodeID] if !ok { info = newStatusInfo(request.Node) cache.status[nodeID] = info } // update last watch request time inf...
go
func (cache *snapshotCache) CreateWatch(request Request) (chan Response, func()) { nodeID := cache.hash.ID(request.Node) cache.mu.Lock() defer cache.mu.Unlock() info, ok := cache.status[nodeID] if !ok { info = newStatusInfo(request.Node) cache.status[nodeID] = info } // update last watch request time inf...
[ "func", "(", "cache", "*", "snapshotCache", ")", "CreateWatch", "(", "request", "Request", ")", "(", "chan", "Response", ",", "func", "(", ")", ")", "{", "nodeID", ":=", "cache", ".", "hash", ".", "ID", "(", "request", ".", "Node", ")", "\n\n", "cach...
// CreateWatch returns a watch for an xDS request.
[ "CreateWatch", "returns", "a", "watch", "for", "an", "xDS", "request", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/pkg/cache/simple.go#L169-L209
25,222
envoyproxy/go-control-plane
pkg/cache/simple.go
cancelWatch
func (cache *snapshotCache) cancelWatch(nodeID string, watchID int64) func() { return func() { // uses the cache mutex cache.mu.Lock() defer cache.mu.Unlock() if info, ok := cache.status[nodeID]; ok { info.mu.Lock() delete(info.watches, watchID) info.mu.Unlock() } } }
go
func (cache *snapshotCache) cancelWatch(nodeID string, watchID int64) func() { return func() { // uses the cache mutex cache.mu.Lock() defer cache.mu.Unlock() if info, ok := cache.status[nodeID]; ok { info.mu.Lock() delete(info.watches, watchID) info.mu.Unlock() } } }
[ "func", "(", "cache", "*", "snapshotCache", ")", "cancelWatch", "(", "nodeID", "string", ",", "watchID", "int64", ")", "func", "(", ")", "{", "return", "func", "(", ")", "{", "// uses the cache mutex", "cache", ".", "mu", ".", "Lock", "(", ")", "\n", "...
// cancellation function for cleaning stale watches
[ "cancellation", "function", "for", "cleaning", "stale", "watches" ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/pkg/cache/simple.go#L216-L227
25,223
envoyproxy/go-control-plane
pkg/cache/simple.go
Fetch
func (cache *snapshotCache) Fetch(ctx context.Context, request Request) (*Response, error) { nodeID := cache.hash.ID(request.Node) cache.mu.RLock() defer cache.mu.RUnlock() if snapshot, exists := cache.snapshots[nodeID]; exists { // Respond only if the request version is distinct from the current snapshot state...
go
func (cache *snapshotCache) Fetch(ctx context.Context, request Request) (*Response, error) { nodeID := cache.hash.ID(request.Node) cache.mu.RLock() defer cache.mu.RUnlock() if snapshot, exists := cache.snapshots[nodeID]; exists { // Respond only if the request version is distinct from the current snapshot state...
[ "func", "(", "cache", "*", "snapshotCache", ")", "Fetch", "(", "ctx", "context", ".", "Context", ",", "request", "Request", ")", "(", "*", "Response", ",", "error", ")", "{", "nodeID", ":=", "cache", ".", "hash", ".", "ID", "(", "request", ".", "Node...
// Fetch implements the cache fetch function. // Fetch is called on multiple streams, so responding to individual names with the same version works.
[ "Fetch", "implements", "the", "cache", "fetch", "function", ".", "Fetch", "is", "called", "on", "multiple", "streams", "so", "responding", "to", "individual", "names", "with", "the", "same", "version", "works", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/pkg/cache/simple.go#L278-L298
25,224
envoyproxy/go-control-plane
pkg/cache/simple.go
GetStatusInfo
func (cache *snapshotCache) GetStatusInfo(node string) StatusInfo { cache.mu.RLock() defer cache.mu.RUnlock() info, exists := cache.status[node] if !exists { return nil } return info }
go
func (cache *snapshotCache) GetStatusInfo(node string) StatusInfo { cache.mu.RLock() defer cache.mu.RUnlock() info, exists := cache.status[node] if !exists { return nil } return info }
[ "func", "(", "cache", "*", "snapshotCache", ")", "GetStatusInfo", "(", "node", "string", ")", "StatusInfo", "{", "cache", ".", "mu", ".", "RLock", "(", ")", "\n", "defer", "cache", ".", "mu", ".", "RUnlock", "(", ")", "\n\n", "info", ",", "exists", "...
// GetStatusInfo retrieves the status info for the node.
[ "GetStatusInfo", "retrieves", "the", "status", "info", "for", "the", "node", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/pkg/cache/simple.go#L301-L311
25,225
envoyproxy/go-control-plane
pkg/cache/simple.go
GetStatusKeys
func (cache *snapshotCache) GetStatusKeys() []string { cache.mu.RLock() defer cache.mu.RUnlock() out := make([]string, 0, len(cache.status)) for id := range cache.status { out = append(out, id) } return out }
go
func (cache *snapshotCache) GetStatusKeys() []string { cache.mu.RLock() defer cache.mu.RUnlock() out := make([]string, 0, len(cache.status)) for id := range cache.status { out = append(out, id) } return out }
[ "func", "(", "cache", "*", "snapshotCache", ")", "GetStatusKeys", "(", ")", "[", "]", "string", "{", "cache", ".", "mu", ".", "RLock", "(", ")", "\n", "defer", "cache", ".", "mu", ".", "RUnlock", "(", ")", "\n\n", "out", ":=", "make", "(", "[", "...
// GetStatusKeys retrieves all node IDs in the status map.
[ "GetStatusKeys", "retrieves", "all", "node", "IDs", "in", "the", "status", "map", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/pkg/cache/simple.go#L314-L324
25,226
envoyproxy/go-control-plane
envoy/config/ratelimit/v2/rls.pb.validate.go
Validate
func (m *RateLimitServiceConfig) Validate() error { if m == nil { return nil } if m.GetGrpcService() == nil { return RateLimitServiceConfigValidationError{ field: "GrpcService", reason: "value is required", } } { tmp := m.GetGrpcService() if v, ok := interface{}(tmp).(interface{ Validate() erro...
go
func (m *RateLimitServiceConfig) Validate() error { if m == nil { return nil } if m.GetGrpcService() == nil { return RateLimitServiceConfigValidationError{ field: "GrpcService", reason: "value is required", } } { tmp := m.GetGrpcService() if v, ok := interface{}(tmp).(interface{ Validate() erro...
[ "func", "(", "m", "*", "RateLimitServiceConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetGrpcService", "(", ")", "==", "nil", "{", "return", "RateLimitServiceConfigVali...
// Validate checks the field values on RateLimitServiceConfig with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RateLimitServiceConfig", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/ratelimit/v2/rls.pb.validate.go#L39-L67
25,227
envoyproxy/go-control-plane
envoy/type/matcher/number.pb.validate.go
Validate
func (m *DoubleMatcher) Validate() error { if m == nil { return nil } switch m.MatchPattern.(type) { case *DoubleMatcher_Range: { tmp := m.GetRange() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DoubleMatcherValidationError{ ...
go
func (m *DoubleMatcher) Validate() error { if m == nil { return nil } switch m.MatchPattern.(type) { case *DoubleMatcher_Range: { tmp := m.GetRange() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DoubleMatcherValidationError{ ...
[ "func", "(", "m", "*", "DoubleMatcher", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "switch", "m", ".", "MatchPattern", ".", "(", "type", ")", "{", "case", "*", "DoubleMatcher_Range", ":",...
// Validate checks the field values on DoubleMatcher with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "DoubleMatcher", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/type/matcher/number.pb.validate.go#L39-L75
25,228
envoyproxy/go-control-plane
envoy/config/metrics/v2/stats.pb.validate.go
Validate
func (m *StatsSink) Validate() error { if m == nil { return nil } // no validation rules for Name switch m.ConfigType.(type) { case *StatsSink_Config: { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Stats...
go
func (m *StatsSink) Validate() error { if m == nil { return nil } // no validation rules for Name switch m.ConfigType.(type) { case *StatsSink_Config: { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Stats...
[ "func", "(", "m", "*", "StatsSink", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Name", "switch", "m", ".", "ConfigType", ".", "(", "type", ")", "{", "case", "*", ...
// Validate checks the field values on StatsSink with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "StatsSink", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/metrics/v2/stats.pb.validate.go#L38-L84
25,229
envoyproxy/go-control-plane
envoy/config/metrics/v2/stats.pb.validate.go
Validate
func (m *StatsConfig) Validate() error { if m == nil { return nil } for idx, item := range m.GetStatsTags() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StatsConfigValidationError{ field:...
go
func (m *StatsConfig) Validate() error { if m == nil { return nil } for idx, item := range m.GetStatsTags() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StatsConfigValidationError{ field:...
[ "func", "(", "m", "*", "StatsConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetStatsTags", "(", ")", "{", "_", ",", "_", "=...
// Validate checks the field values on StatsConfig with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "StatsConfig", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/metrics/v2/stats.pb.validate.go#L143-L199
25,230
envoyproxy/go-control-plane
envoy/config/metrics/v2/stats.pb.validate.go
Validate
func (m *StatsMatcher) Validate() error { if m == nil { return nil } switch m.StatsMatcher.(type) { case *StatsMatcher_RejectAll: // no validation rules for RejectAll case *StatsMatcher_ExclusionList: { tmp := m.GetExclusionList() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { ...
go
func (m *StatsMatcher) Validate() error { if m == nil { return nil } switch m.StatsMatcher.(type) { case *StatsMatcher_RejectAll: // no validation rules for RejectAll case *StatsMatcher_ExclusionList: { tmp := m.GetExclusionList() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { ...
[ "func", "(", "m", "*", "StatsMatcher", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "switch", "m", ".", "StatsMatcher", ".", "(", "type", ")", "{", "case", "*", "StatsMatcher_RejectAll", ":...
// Validate checks the field values on StatsMatcher with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "StatsMatcher", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/metrics/v2/stats.pb.validate.go#L258-L311
25,231
envoyproxy/go-control-plane
envoy/config/metrics/v2/stats.pb.validate.go
Validate
func (m *TagSpecifier) Validate() error { if m == nil { return nil } // no validation rules for TagName switch m.TagValue.(type) { case *TagSpecifier_Regex: if len(m.GetRegex()) > 1024 { return TagSpecifierValidationError{ field: "Regex", reason: "value length must be at most 1024 bytes", } ...
go
func (m *TagSpecifier) Validate() error { if m == nil { return nil } // no validation rules for TagName switch m.TagValue.(type) { case *TagSpecifier_Regex: if len(m.GetRegex()) > 1024 { return TagSpecifierValidationError{ field: "Regex", reason: "value length must be at most 1024 bytes", } ...
[ "func", "(", "m", "*", "TagSpecifier", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for TagName", "switch", "m", ".", "TagValue", ".", "(", "type", ")", "{", "case", "...
// Validate checks the field values on TagSpecifier with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "TagSpecifier", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/metrics/v2/stats.pb.validate.go#L370-L394
25,232
envoyproxy/go-control-plane
envoy/config/metrics/v2/stats.pb.validate.go
Validate
func (m *StatsdSink) Validate() error { if m == nil { return nil } // no validation rules for Prefix switch m.StatsdSpecifier.(type) { case *StatsdSink_Address: { tmp := m.GetAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { r...
go
func (m *StatsdSink) Validate() error { if m == nil { return nil } // no validation rules for Prefix switch m.StatsdSpecifier.(type) { case *StatsdSink_Address: { tmp := m.GetAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { r...
[ "func", "(", "m", "*", "StatsdSink", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Prefix", "switch", "m", ".", "StatsdSpecifier", ".", "(", "type", ")", "{", "case",...
// Validate checks the field values on StatsdSink with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "StatsdSink", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/metrics/v2/stats.pb.validate.go#L452-L490
25,233
envoyproxy/go-control-plane
envoy/config/metrics/v2/stats.pb.validate.go
Validate
func (m *DogStatsdSink) Validate() error { if m == nil { return nil } // no validation rules for Prefix switch m.DogStatsdSpecifier.(type) { case *DogStatsdSink_Address: { tmp := m.GetAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil...
go
func (m *DogStatsdSink) Validate() error { if m == nil { return nil } // no validation rules for Prefix switch m.DogStatsdSpecifier.(type) { case *DogStatsdSink_Address: { tmp := m.GetAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil...
[ "func", "(", "m", "*", "DogStatsdSink", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Prefix", "switch", "m", ".", "DogStatsdSpecifier", ".", "(", "type", ")", "{", "...
// Validate checks the field values on DogStatsdSink with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "DogStatsdSink", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/metrics/v2/stats.pb.validate.go#L549-L584
25,234
envoyproxy/go-control-plane
pkg/cache/snapshot.go
IndexResourcesByName
func IndexResourcesByName(items []Resource) map[string]Resource { indexed := make(map[string]Resource, len(items)) for _, item := range items { indexed[GetResourceName(item)] = item } return indexed }
go
func IndexResourcesByName(items []Resource) map[string]Resource { indexed := make(map[string]Resource, len(items)) for _, item := range items { indexed[GetResourceName(item)] = item } return indexed }
[ "func", "IndexResourcesByName", "(", "items", "[", "]", "Resource", ")", "map", "[", "string", "]", "Resource", "{", "indexed", ":=", "make", "(", "map", "[", "string", "]", "Resource", ",", "len", "(", "items", ")", ")", "\n", "for", "_", ",", "item...
// IndexResourcesByName creates a map from the resource name to the resource.
[ "IndexResourcesByName", "creates", "a", "map", "from", "the", "resource", "name", "to", "the", "resource", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/pkg/cache/snapshot.go#L32-L38
25,235
envoyproxy/go-control-plane
pkg/cache/snapshot.go
NewResources
func NewResources(version string, items []Resource) Resources { return Resources{ Version: version, Items: IndexResourcesByName(items), } }
go
func NewResources(version string, items []Resource) Resources { return Resources{ Version: version, Items: IndexResourcesByName(items), } }
[ "func", "NewResources", "(", "version", "string", ",", "items", "[", "]", "Resource", ")", "Resources", "{", "return", "Resources", "{", "Version", ":", "version", ",", "Items", ":", "IndexResourcesByName", "(", "items", ")", ",", "}", "\n", "}" ]
// NewResources creates a new resource group.
[ "NewResources", "creates", "a", "new", "resource", "group", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/pkg/cache/snapshot.go#L41-L46
25,236
envoyproxy/go-control-plane
pkg/cache/snapshot.go
NewSnapshot
func NewSnapshot(version string, endpoints []Resource, clusters []Resource, routes []Resource, listeners []Resource) Snapshot { return Snapshot{ Endpoints: NewResources(version, endpoints), Clusters: NewResources(version, clusters), Routes: NewResources(version, routes), Listeners: NewResources(version...
go
func NewSnapshot(version string, endpoints []Resource, clusters []Resource, routes []Resource, listeners []Resource) Snapshot { return Snapshot{ Endpoints: NewResources(version, endpoints), Clusters: NewResources(version, clusters), Routes: NewResources(version, routes), Listeners: NewResources(version...
[ "func", "NewSnapshot", "(", "version", "string", ",", "endpoints", "[", "]", "Resource", ",", "clusters", "[", "]", "Resource", ",", "routes", "[", "]", "Resource", ",", "listeners", "[", "]", "Resource", ")", "Snapshot", "{", "return", "Snapshot", "{", ...
// NewSnapshot creates a snapshot from response types and a version.
[ "NewSnapshot", "creates", "a", "snapshot", "from", "response", "types", "and", "a", "version", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/pkg/cache/snapshot.go#L69-L80
25,237
envoyproxy/go-control-plane
pkg/cache/snapshot.go
GetResources
func (s *Snapshot) GetResources(typ string) map[string]Resource { if s == nil { return nil } switch typ { case EndpointType: return s.Endpoints.Items case ClusterType: return s.Clusters.Items case RouteType: return s.Routes.Items case ListenerType: return s.Listeners.Items case SecretType: return s....
go
func (s *Snapshot) GetResources(typ string) map[string]Resource { if s == nil { return nil } switch typ { case EndpointType: return s.Endpoints.Items case ClusterType: return s.Clusters.Items case RouteType: return s.Routes.Items case ListenerType: return s.Listeners.Items case SecretType: return s....
[ "func", "(", "s", "*", "Snapshot", ")", "GetResources", "(", "typ", "string", ")", "map", "[", "string", "]", "Resource", "{", "if", "s", "==", "nil", "{", "return", "nil", "\n", "}", "\n", "switch", "typ", "{", "case", "EndpointType", ":", "return",...
// GetResources selects snapshot resources by type.
[ "GetResources", "selects", "snapshot", "resources", "by", "type", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/pkg/cache/snapshot.go#L110-L127
25,238
envoyproxy/go-control-plane
pkg/cache/snapshot.go
GetVersion
func (s *Snapshot) GetVersion(typ string) string { if s == nil { return "" } switch typ { case EndpointType: return s.Endpoints.Version case ClusterType: return s.Clusters.Version case RouteType: return s.Routes.Version case ListenerType: return s.Listeners.Version case SecretType: return s.Secrets....
go
func (s *Snapshot) GetVersion(typ string) string { if s == nil { return "" } switch typ { case EndpointType: return s.Endpoints.Version case ClusterType: return s.Clusters.Version case RouteType: return s.Routes.Version case ListenerType: return s.Listeners.Version case SecretType: return s.Secrets....
[ "func", "(", "s", "*", "Snapshot", ")", "GetVersion", "(", "typ", "string", ")", "string", "{", "if", "s", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n", "switch", "typ", "{", "case", "EndpointType", ":", "return", "s", ".", "Endpoints", ...
// GetVersion returns the version for a resource type.
[ "GetVersion", "returns", "the", "version", "for", "a", "resource", "type", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/pkg/cache/snapshot.go#L130-L147
25,239
envoyproxy/go-control-plane
envoy/config/metrics/v2/metrics_service.pb.validate.go
Validate
func (m *MetricsServiceConfig) Validate() error { if m == nil { return nil } if m.GetGrpcService() == nil { return MetricsServiceConfigValidationError{ field: "GrpcService", reason: "value is required", } } { tmp := m.GetGrpcService() if v, ok := interface{}(tmp).(interface{ Validate() error })...
go
func (m *MetricsServiceConfig) Validate() error { if m == nil { return nil } if m.GetGrpcService() == nil { return MetricsServiceConfigValidationError{ field: "GrpcService", reason: "value is required", } } { tmp := m.GetGrpcService() if v, ok := interface{}(tmp).(interface{ Validate() error })...
[ "func", "(", "m", "*", "MetricsServiceConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetGrpcService", "(", ")", "==", "nil", "{", "return", "MetricsServiceConfigValidati...
// Validate checks the field values on MetricsServiceConfig with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "MetricsServiceConfig", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/metrics/v2/metrics_service.pb.validate.go#L39-L67
25,240
envoyproxy/go-control-plane
envoy/config/filter/http/lua/v2/lua.pb.validate.go
Validate
func (m *Lua) Validate() error { if m == nil { return nil } if len(m.GetInlineCode()) < 1 { return LuaValidationError{ field: "InlineCode", reason: "value length must be at least 1 bytes", } } return nil }
go
func (m *Lua) Validate() error { if m == nil { return nil } if len(m.GetInlineCode()) < 1 { return LuaValidationError{ field: "InlineCode", reason: "value length must be at least 1 bytes", } } return nil }
[ "func", "(", "m", "*", "Lua", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetInlineCode", "(", ")", ")", "<", "1", "{", "return", "LuaValidationError", "{"...
// Validate checks the field values on Lua with the rules defined in the proto // definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "Lua", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/lua/v2/lua.pb.validate.go#L38-L51
25,241
envoyproxy/go-control-plane
envoy/service/tap/v2alpha/common.pb.validate.go
Validate
func (m *TapConfig) Validate() error { if m == nil { return nil } if m.GetMatchConfig() == nil { return TapConfigValidationError{ field: "MatchConfig", reason: "value is required", } } { tmp := m.GetMatchConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v...
go
func (m *TapConfig) Validate() error { if m == nil { return nil } if m.GetMatchConfig() == nil { return TapConfigValidationError{ field: "MatchConfig", reason: "value is required", } } { tmp := m.GetMatchConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v...
[ "func", "(", "m", "*", "TapConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetMatchConfig", "(", ")", "==", "nil", "{", "return", "TapConfigValidationError", "{", "fi...
// Validate checks the field values on TapConfig with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "TapConfig", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/tap/v2alpha/common.pb.validate.go#L38-L88
25,242
envoyproxy/go-control-plane
envoy/service/tap/v2alpha/common.pb.validate.go
Validate
func (m *OutputConfig) Validate() error { if m == nil { return nil } if len(m.GetSinks()) != 1 { return OutputConfigValidationError{ field: "Sinks", reason: "value must contain exactly 1 item(s)", } } for idx, item := range m.GetSinks() { _, _ = idx, item { tmp := item if v, ok := interf...
go
func (m *OutputConfig) Validate() error { if m == nil { return nil } if len(m.GetSinks()) != 1 { return OutputConfigValidationError{ field: "Sinks", reason: "value must contain exactly 1 item(s)", } } for idx, item := range m.GetSinks() { _, _ = idx, item { tmp := item if v, ok := interf...
[ "func", "(", "m", "*", "OutputConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetSinks", "(", ")", ")", "!=", "1", "{", "return", "OutputConfigValidatio...
// Validate checks the field values on OutputConfig with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "OutputConfig", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/tap/v2alpha/common.pb.validate.go#L435-L500
25,243
envoyproxy/go-control-plane
envoy/service/tap/v2alpha/common.pb.validate.go
Validate
func (m *OutputSink) Validate() error { if m == nil { return nil } if _, ok := OutputSink_Format_name[int32(m.GetFormat())]; !ok { return OutputSinkValidationError{ field: "Format", reason: "value must be one of the defined enum values", } } switch m.OutputSinkType.(type) { case *OutputSink_Stream...
go
func (m *OutputSink) Validate() error { if m == nil { return nil } if _, ok := OutputSink_Format_name[int32(m.GetFormat())]; !ok { return OutputSinkValidationError{ field: "Format", reason: "value must be one of the defined enum values", } } switch m.OutputSinkType.(type) { case *OutputSink_Stream...
[ "func", "(", "m", "*", "OutputSink", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "_", ",", "ok", ":=", "OutputSink_Format_name", "[", "int32", "(", "m", ".", "GetFormat", "(", ")",...
// Validate checks the field values on OutputSink with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "OutputSink", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/tap/v2alpha/common.pb.validate.go#L558-L615
25,244
envoyproxy/go-control-plane
envoy/service/tap/v2alpha/common.pb.validate.go
Validate
func (m *FilePerTapSink) Validate() error { if m == nil { return nil } if len(m.GetPathPrefix()) < 1 { return FilePerTapSinkValidationError{ field: "PathPrefix", reason: "value length must be at least 1 bytes", } } return nil }
go
func (m *FilePerTapSink) Validate() error { if m == nil { return nil } if len(m.GetPathPrefix()) < 1 { return FilePerTapSinkValidationError{ field: "PathPrefix", reason: "value length must be at least 1 bytes", } } return nil }
[ "func", "(", "m", "*", "FilePerTapSink", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetPathPrefix", "(", ")", ")", "<", "1", "{", "return", "FilePerTapSinkV...
// Validate checks the field values on FilePerTapSink with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "FilePerTapSink", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/tap/v2alpha/common.pb.validate.go#L741-L754
25,245
envoyproxy/go-control-plane
envoy/config/filter/accesslog/v2/accesslog.pb.validate.go
Validate
func (m *AccessLog) Validate() error { if m == nil { return nil } // no validation rules for Name { tmp := m.GetFilter() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogValidationError{ field: "Filter", reason: "embe...
go
func (m *AccessLog) Validate() error { if m == nil { return nil } // no validation rules for Name { tmp := m.GetFilter() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogValidationError{ field: "Filter", reason: "embe...
[ "func", "(", "m", "*", "AccessLog", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Name", "{", "tmp", ":=", "m", ".", "GetFilter", "(", ")", "\n\n", "if", "v", ","...
// Validate checks the field values on AccessLog with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "AccessLog", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/accesslog/v2/accesslog.pb.validate.go#L38-L99
25,246
envoyproxy/go-control-plane
envoy/config/filter/accesslog/v2/accesslog.pb.validate.go
Validate
func (m *ComparisonFilter) Validate() error { if m == nil { return nil } if _, ok := ComparisonFilter_Op_name[int32(m.GetOp())]; !ok { return ComparisonFilterValidationError{ field: "Op", reason: "value must be one of the defined enum values", } } { tmp := m.GetValue() if v, ok := interface{}(t...
go
func (m *ComparisonFilter) Validate() error { if m == nil { return nil } if _, ok := ComparisonFilter_Op_name[int32(m.GetOp())]; !ok { return ComparisonFilterValidationError{ field: "Op", reason: "value must be one of the defined enum values", } } { tmp := m.GetValue() if v, ok := interface{}(t...
[ "func", "(", "m", "*", "ComparisonFilter", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "_", ",", "ok", ":=", "ComparisonFilter_Op_name", "[", "int32", "(", "m", ".", "GetOp", "(", ...
// Validate checks the field values on ComparisonFilter with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "ComparisonFilter", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/accesslog/v2/accesslog.pb.validate.go#L403-L431
25,247
envoyproxy/go-control-plane
envoy/config/filter/accesslog/v2/accesslog.pb.validate.go
Validate
func (m *StatusCodeFilter) Validate() error { if m == nil { return nil } if m.GetComparison() == nil { return StatusCodeFilterValidationError{ field: "Comparison", reason: "value is required", } } { tmp := m.GetComparison() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { ...
go
func (m *StatusCodeFilter) Validate() error { if m == nil { return nil } if m.GetComparison() == nil { return StatusCodeFilterValidationError{ field: "Comparison", reason: "value is required", } } { tmp := m.GetComparison() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { ...
[ "func", "(", "m", "*", "StatusCodeFilter", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetComparison", "(", ")", "==", "nil", "{", "return", "StatusCodeFilterValidationError",...
// Validate checks the field values on StatusCodeFilter with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "StatusCodeFilter", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/accesslog/v2/accesslog.pb.validate.go#L490-L518
25,248
envoyproxy/go-control-plane
envoy/config/filter/accesslog/v2/accesslog.pb.validate.go
Validate
func (m *DurationFilter) Validate() error { if m == nil { return nil } if m.GetComparison() == nil { return DurationFilterValidationError{ field: "Comparison", reason: "value is required", } } { tmp := m.GetComparison() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if e...
go
func (m *DurationFilter) Validate() error { if m == nil { return nil } if m.GetComparison() == nil { return DurationFilterValidationError{ field: "Comparison", reason: "value is required", } } { tmp := m.GetComparison() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if e...
[ "func", "(", "m", "*", "DurationFilter", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetComparison", "(", ")", "==", "nil", "{", "return", "DurationFilterValidationError", "...
// Validate checks the field values on DurationFilter with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "DurationFilter", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/accesslog/v2/accesslog.pb.validate.go#L577-L605
25,249
envoyproxy/go-control-plane
envoy/config/filter/accesslog/v2/accesslog.pb.validate.go
Validate
func (m *RuntimeFilter) Validate() error { if m == nil { return nil } if len(m.GetRuntimeKey()) < 1 { return RuntimeFilterValidationError{ field: "RuntimeKey", reason: "value length must be at least 1 bytes", } } { tmp := m.GetPercentSampled() if v, ok := interface{}(tmp).(interface{ Validate()...
go
func (m *RuntimeFilter) Validate() error { if m == nil { return nil } if len(m.GetRuntimeKey()) < 1 { return RuntimeFilterValidationError{ field: "RuntimeKey", reason: "value length must be at least 1 bytes", } } { tmp := m.GetPercentSampled() if v, ok := interface{}(tmp).(interface{ Validate()...
[ "func", "(", "m", "*", "RuntimeFilter", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetRuntimeKey", "(", ")", ")", "<", "1", "{", "return", "RuntimeFilterVal...
// Validate checks the field values on RuntimeFilter with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RuntimeFilter", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/accesslog/v2/accesslog.pb.validate.go#L796-L826
25,250
envoyproxy/go-control-plane
envoy/config/filter/accesslog/v2/accesslog.pb.validate.go
Validate
func (m *OrFilter) Validate() error { if m == nil { return nil } if len(m.GetFilters()) < 2 { return OrFilterValidationError{ field: "Filters", reason: "value must contain at least 2 item(s)", } } for idx, item := range m.GetFilters() { _, _ = idx, item { tmp := item if v, ok := interfac...
go
func (m *OrFilter) Validate() error { if m == nil { return nil } if len(m.GetFilters()) < 2 { return OrFilterValidationError{ field: "Filters", reason: "value must contain at least 2 item(s)", } } for idx, item := range m.GetFilters() { _, _ = idx, item { tmp := item if v, ok := interfac...
[ "func", "(", "m", "*", "OrFilter", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetFilters", "(", ")", ")", "<", "2", "{", "return", "OrFilterValidationError"...
// Validate checks the field values on OrFilter with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "OrFilter", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/accesslog/v2/accesslog.pb.validate.go#L975-L1008
25,251
envoyproxy/go-control-plane
envoy/config/filter/accesslog/v2/accesslog.pb.validate.go
Validate
func (m *HeaderFilter) Validate() error { if m == nil { return nil } if m.GetHeader() == nil { return HeaderFilterValidationError{ field: "Header", reason: "value is required", } } { tmp := m.GetHeader() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate...
go
func (m *HeaderFilter) Validate() error { if m == nil { return nil } if m.GetHeader() == nil { return HeaderFilterValidationError{ field: "Header", reason: "value is required", } } { tmp := m.GetHeader() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate...
[ "func", "(", "m", "*", "HeaderFilter", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetHeader", "(", ")", "==", "nil", "{", "return", "HeaderFilterValidationError", "{", "f...
// Validate checks the field values on HeaderFilter with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "HeaderFilter", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/accesslog/v2/accesslog.pb.validate.go#L1067-L1095
25,252
envoyproxy/go-control-plane
envoy/config/filter/accesslog/v2/accesslog.pb.validate.go
Validate
func (m *ResponseFlagFilter) Validate() error { if m == nil { return nil } for idx, item := range m.GetFlags() { _, _ = idx, item if _, ok := _ResponseFlagFilter_Flags_InLookup[item]; !ok { return ResponseFlagFilterValidationError{ field: fmt.Sprintf("Flags[%v]", idx), reason: "value must be in l...
go
func (m *ResponseFlagFilter) Validate() error { if m == nil { return nil } for idx, item := range m.GetFlags() { _, _ = idx, item if _, ok := _ResponseFlagFilter_Flags_InLookup[item]; !ok { return ResponseFlagFilterValidationError{ field: fmt.Sprintf("Flags[%v]", idx), reason: "value must be in l...
[ "func", "(", "m", "*", "ResponseFlagFilter", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetFlags", "(", ")", "{", "_", ",", "_", ...
// Validate checks the field values on ResponseFlagFilter with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "ResponseFlagFilter", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/accesslog/v2/accesslog.pb.validate.go#L1154-L1172
25,253
envoyproxy/go-control-plane
envoy/config/filter/accesslog/v2/accesslog.pb.validate.go
Validate
func (m *GrpcStatusFilter) Validate() error { if m == nil { return nil } for idx, item := range m.GetStatuses() { _, _ = idx, item if _, ok := GrpcStatusFilter_Status_name[int32(item)]; !ok { return GrpcStatusFilterValidationError{ field: fmt.Sprintf("Statuses[%v]", idx), reason: "value must be o...
go
func (m *GrpcStatusFilter) Validate() error { if m == nil { return nil } for idx, item := range m.GetStatuses() { _, _ = idx, item if _, ok := GrpcStatusFilter_Status_name[int32(item)]; !ok { return GrpcStatusFilterValidationError{ field: fmt.Sprintf("Statuses[%v]", idx), reason: "value must be o...
[ "func", "(", "m", "*", "GrpcStatusFilter", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetStatuses", "(", ")", "{", "_", ",", "_", ...
// Validate checks the field values on GrpcStatusFilter with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "GrpcStatusFilter", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/accesslog/v2/accesslog.pb.validate.go#L1253-L1273
25,254
rs/zerolog
log.go
ParseLevel
func ParseLevel(levelStr string) (Level, error) { switch levelStr { case LevelFieldMarshalFunc(DebugLevel): return DebugLevel, nil case LevelFieldMarshalFunc(InfoLevel): return InfoLevel, nil case LevelFieldMarshalFunc(WarnLevel): return WarnLevel, nil case LevelFieldMarshalFunc(ErrorLevel): return ErrorLe...
go
func ParseLevel(levelStr string) (Level, error) { switch levelStr { case LevelFieldMarshalFunc(DebugLevel): return DebugLevel, nil case LevelFieldMarshalFunc(InfoLevel): return InfoLevel, nil case LevelFieldMarshalFunc(WarnLevel): return WarnLevel, nil case LevelFieldMarshalFunc(ErrorLevel): return ErrorLe...
[ "func", "ParseLevel", "(", "levelStr", "string", ")", "(", "Level", ",", "error", ")", "{", "switch", "levelStr", "{", "case", "LevelFieldMarshalFunc", "(", "DebugLevel", ")", ":", "return", "DebugLevel", ",", "nil", "\n", "case", "LevelFieldMarshalFunc", "(",...
// ParseLevel converts a level string into a zerolog Level value. // returns an error if the input string does not match known values.
[ "ParseLevel", "converts", "a", "level", "string", "into", "a", "zerolog", "Level", "value", ".", "returns", "an", "error", "if", "the", "input", "string", "does", "not", "match", "known", "values", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/log.go#L153-L171
25,255
rs/zerolog
log.go
New
func New(w io.Writer) Logger { if w == nil { w = ioutil.Discard } lw, ok := w.(LevelWriter) if !ok { lw = levelWriterAdapter{w} } return Logger{w: lw} }
go
func New(w io.Writer) Logger { if w == nil { w = ioutil.Discard } lw, ok := w.(LevelWriter) if !ok { lw = levelWriterAdapter{w} } return Logger{w: lw} }
[ "func", "New", "(", "w", "io", ".", "Writer", ")", "Logger", "{", "if", "w", "==", "nil", "{", "w", "=", "ioutil", ".", "Discard", "\n", "}", "\n", "lw", ",", "ok", ":=", "w", ".", "(", "LevelWriter", ")", "\n", "if", "!", "ok", "{", "lw", ...
// New creates a root logger with given output writer. If the output writer implements // the LevelWriter interface, the WriteLevel method will be called instead of the Write // one. // // Each logging operation makes a single call to the Writer's Write method. There is no // guaranty on access serialization to the Wri...
[ "New", "creates", "a", "root", "logger", "with", "given", "output", "writer", ".", "If", "the", "output", "writer", "implements", "the", "LevelWriter", "interface", "the", "WriteLevel", "method", "will", "be", "called", "instead", "of", "the", "Write", "one", ...
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/log.go#L193-L202
25,256
rs/zerolog
log.go
Output
func (l Logger) Output(w io.Writer) Logger { l2 := New(w) l2.level = l.level l2.sampler = l.sampler if len(l.hooks) > 0 { l2.hooks = append(l2.hooks, l.hooks...) } if l.context != nil { l2.context = make([]byte, len(l.context), cap(l.context)) copy(l2.context, l.context) } return l2 }
go
func (l Logger) Output(w io.Writer) Logger { l2 := New(w) l2.level = l.level l2.sampler = l.sampler if len(l.hooks) > 0 { l2.hooks = append(l2.hooks, l.hooks...) } if l.context != nil { l2.context = make([]byte, len(l.context), cap(l.context)) copy(l2.context, l.context) } return l2 }
[ "func", "(", "l", "Logger", ")", "Output", "(", "w", "io", ".", "Writer", ")", "Logger", "{", "l2", ":=", "New", "(", "w", ")", "\n", "l2", ".", "level", "=", "l", ".", "level", "\n", "l2", ".", "sampler", "=", "l", ".", "sampler", "\n", "if"...
// Output duplicates the current logger and sets w as its output.
[ "Output", "duplicates", "the", "current", "logger", "and", "sets", "w", "as", "its", "output", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/log.go#L210-L222
25,257
rs/zerolog
log.go
With
func (l Logger) With() Context { context := l.context l.context = make([]byte, 0, 500) if context != nil { l.context = append(l.context, context...) } return Context{l} }
go
func (l Logger) With() Context { context := l.context l.context = make([]byte, 0, 500) if context != nil { l.context = append(l.context, context...) } return Context{l} }
[ "func", "(", "l", "Logger", ")", "With", "(", ")", "Context", "{", "context", ":=", "l", ".", "context", "\n", "l", ".", "context", "=", "make", "(", "[", "]", "byte", ",", "0", ",", "500", ")", "\n", "if", "context", "!=", "nil", "{", "l", "...
// With creates a child logger with the field added to its context.
[ "With", "creates", "a", "child", "logger", "with", "the", "field", "added", "to", "its", "context", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/log.go#L225-L232
25,258
rs/zerolog
log.go
UpdateContext
func (l *Logger) UpdateContext(update func(c Context) Context) { if l == disabledLogger { return } if cap(l.context) == 0 { l.context = make([]byte, 0, 500) } c := update(Context{*l}) l.context = c.l.context }
go
func (l *Logger) UpdateContext(update func(c Context) Context) { if l == disabledLogger { return } if cap(l.context) == 0 { l.context = make([]byte, 0, 500) } c := update(Context{*l}) l.context = c.l.context }
[ "func", "(", "l", "*", "Logger", ")", "UpdateContext", "(", "update", "func", "(", "c", "Context", ")", "Context", ")", "{", "if", "l", "==", "disabledLogger", "{", "return", "\n", "}", "\n", "if", "cap", "(", "l", ".", "context", ")", "==", "0", ...
// UpdateContext updates the internal logger's context. // // Use this method with caution. If unsure, prefer the With method.
[ "UpdateContext", "updates", "the", "internal", "logger", "s", "context", ".", "Use", "this", "method", "with", "caution", ".", "If", "unsure", "prefer", "the", "With", "method", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/log.go#L237-L246
25,259
rs/zerolog
log.go
Level
func (l Logger) Level(lvl Level) Logger { l.level = lvl return l }
go
func (l Logger) Level(lvl Level) Logger { l.level = lvl return l }
[ "func", "(", "l", "Logger", ")", "Level", "(", "lvl", "Level", ")", "Logger", "{", "l", ".", "level", "=", "lvl", "\n", "return", "l", "\n", "}" ]
// Level creates a child logger with the minimum accepted level set to level.
[ "Level", "creates", "a", "child", "logger", "with", "the", "minimum", "accepted", "level", "set", "to", "level", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/log.go#L249-L252
25,260
rs/zerolog
log.go
Sample
func (l Logger) Sample(s Sampler) Logger { l.sampler = s return l }
go
func (l Logger) Sample(s Sampler) Logger { l.sampler = s return l }
[ "func", "(", "l", "Logger", ")", "Sample", "(", "s", "Sampler", ")", "Logger", "{", "l", ".", "sampler", "=", "s", "\n", "return", "l", "\n", "}" ]
// Sample returns a logger with the s sampler.
[ "Sample", "returns", "a", "logger", "with", "the", "s", "sampler", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/log.go#L255-L258
25,261
rs/zerolog
log.go
Hook
func (l Logger) Hook(h Hook) Logger { l.hooks = append(l.hooks, h) return l }
go
func (l Logger) Hook(h Hook) Logger { l.hooks = append(l.hooks, h) return l }
[ "func", "(", "l", "Logger", ")", "Hook", "(", "h", "Hook", ")", "Logger", "{", "l", ".", "hooks", "=", "append", "(", "l", ".", "hooks", ",", "h", ")", "\n", "return", "l", "\n", "}" ]
// Hook returns a logger with the h Hook.
[ "Hook", "returns", "a", "logger", "with", "the", "h", "Hook", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/log.go#L261-L264
25,262
rs/zerolog
log.go
Err
func (l *Logger) Err(err error) *Event { if err != nil { return l.Error().Err(err) } else { return l.Info() } }
go
func (l *Logger) Err(err error) *Event { if err != nil { return l.Error().Err(err) } else { return l.Info() } }
[ "func", "(", "l", "*", "Logger", ")", "Err", "(", "err", "error", ")", "*", "Event", "{", "if", "err", "!=", "nil", "{", "return", "l", ".", "Error", "(", ")", ".", "Err", "(", "err", ")", "\n", "}", "else", "{", "return", "l", ".", "Info", ...
// Err starts a new message with error level with err as a field if not nil or // with info level if err is nil. // // You must call Msg on the returned event in order to send the event.
[ "Err", "starts", "a", "new", "message", "with", "error", "level", "with", "err", "as", "a", "field", "if", "not", "nil", "or", "with", "info", "level", "if", "err", "is", "nil", ".", "You", "must", "call", "Msg", "on", "the", "returned", "event", "in...
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/log.go#L298-L304
25,263
rs/zerolog
log.go
WithLevel
func (l *Logger) WithLevel(level Level) *Event { switch level { case DebugLevel: return l.Debug() case InfoLevel: return l.Info() case WarnLevel: return l.Warn() case ErrorLevel: return l.Error() case FatalLevel: return l.newEvent(FatalLevel, nil) case PanicLevel: return l.newEvent(PanicLevel, nil) ...
go
func (l *Logger) WithLevel(level Level) *Event { switch level { case DebugLevel: return l.Debug() case InfoLevel: return l.Info() case WarnLevel: return l.Warn() case ErrorLevel: return l.Error() case FatalLevel: return l.newEvent(FatalLevel, nil) case PanicLevel: return l.newEvent(PanicLevel, nil) ...
[ "func", "(", "l", "*", "Logger", ")", "WithLevel", "(", "level", "Level", ")", "*", "Event", "{", "switch", "level", "{", "case", "DebugLevel", ":", "return", "l", ".", "Debug", "(", ")", "\n", "case", "InfoLevel", ":", "return", "l", ".", "Info", ...
// WithLevel starts a new message with level. Unlike Fatal and Panic // methods, WithLevel does not terminate the program or stop the ordinary // flow of a gourotine when used with their respective levels. // // You must call Msg on the returned event in order to send the event.
[ "WithLevel", "starts", "a", "new", "message", "with", "level", ".", "Unlike", "Fatal", "and", "Panic", "methods", "WithLevel", "does", "not", "terminate", "the", "program", "or", "stop", "the", "ordinary", "flow", "of", "a", "gourotine", "when", "used", "wit...
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/log.go#L327-L348
25,264
rs/zerolog
log.go
Print
func (l *Logger) Print(v ...interface{}) { if e := l.Debug(); e.Enabled() { e.Msg(fmt.Sprint(v...)) } }
go
func (l *Logger) Print(v ...interface{}) { if e := l.Debug(); e.Enabled() { e.Msg(fmt.Sprint(v...)) } }
[ "func", "(", "l", "*", "Logger", ")", "Print", "(", "v", "...", "interface", "{", "}", ")", "{", "if", "e", ":=", "l", ".", "Debug", "(", ")", ";", "e", ".", "Enabled", "(", ")", "{", "e", ".", "Msg", "(", "fmt", ".", "Sprint", "(", "v", ...
// Print sends a log event using debug level and no extra field. // Arguments are handled in the manner of fmt.Print.
[ "Print", "sends", "a", "log", "event", "using", "debug", "level", "and", "no", "extra", "field", ".", "Arguments", "are", "handled", "in", "the", "manner", "of", "fmt", ".", "Print", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/log.go#L360-L364
25,265
rs/zerolog
log.go
Printf
func (l *Logger) Printf(format string, v ...interface{}) { if e := l.Debug(); e.Enabled() { e.Msg(fmt.Sprintf(format, v...)) } }
go
func (l *Logger) Printf(format string, v ...interface{}) { if e := l.Debug(); e.Enabled() { e.Msg(fmt.Sprintf(format, v...)) } }
[ "func", "(", "l", "*", "Logger", ")", "Printf", "(", "format", "string", ",", "v", "...", "interface", "{", "}", ")", "{", "if", "e", ":=", "l", ".", "Debug", "(", ")", ";", "e", ".", "Enabled", "(", ")", "{", "e", ".", "Msg", "(", "fmt", "...
// Printf sends a log event using debug level and no extra field. // Arguments are handled in the manner of fmt.Printf.
[ "Printf", "sends", "a", "log", "event", "using", "debug", "level", "and", "no", "extra", "field", ".", "Arguments", "are", "handled", "in", "the", "manner", "of", "fmt", ".", "Printf", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/log.go#L368-L372
25,266
rs/zerolog
log.go
Write
func (l Logger) Write(p []byte) (n int, err error) { n = len(p) if n > 0 && p[n-1] == '\n' { // Trim CR added by stdlog. p = p[0 : n-1] } l.Log().Msg(string(p)) return }
go
func (l Logger) Write(p []byte) (n int, err error) { n = len(p) if n > 0 && p[n-1] == '\n' { // Trim CR added by stdlog. p = p[0 : n-1] } l.Log().Msg(string(p)) return }
[ "func", "(", "l", "Logger", ")", "Write", "(", "p", "[", "]", "byte", ")", "(", "n", "int", ",", "err", "error", ")", "{", "n", "=", "len", "(", "p", ")", "\n", "if", "n", ">", "0", "&&", "p", "[", "n", "-", "1", "]", "==", "'\\n'", "{"...
// Write implements the io.Writer interface. This is useful to set as a writer // for the standard library log.
[ "Write", "implements", "the", "io", ".", "Writer", "interface", ".", "This", "is", "useful", "to", "set", "as", "a", "writer", "for", "the", "standard", "library", "log", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/log.go#L376-L384
25,267
rs/zerolog
log.go
should
func (l *Logger) should(lvl Level) bool { if lvl < l.level || lvl < GlobalLevel() { return false } if l.sampler != nil && !samplingDisabled() { return l.sampler.Sample(lvl) } return true }
go
func (l *Logger) should(lvl Level) bool { if lvl < l.level || lvl < GlobalLevel() { return false } if l.sampler != nil && !samplingDisabled() { return l.sampler.Sample(lvl) } return true }
[ "func", "(", "l", "*", "Logger", ")", "should", "(", "lvl", "Level", ")", "bool", "{", "if", "lvl", "<", "l", ".", "level", "||", "lvl", "<", "GlobalLevel", "(", ")", "{", "return", "false", "\n", "}", "\n", "if", "l", ".", "sampler", "!=", "ni...
// should returns true if the log event should be logged.
[ "should", "returns", "true", "if", "the", "log", "event", "should", "be", "logged", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/log.go#L404-L412
25,268
rs/zerolog
console.go
NewConsoleWriter
func NewConsoleWriter(options ...func(w *ConsoleWriter)) ConsoleWriter { w := ConsoleWriter{ Out: os.Stdout, TimeFormat: consoleDefaultTimeFormat, PartsOrder: consoleDefaultPartsOrder(), } for _, opt := range options { opt(&w) } return w }
go
func NewConsoleWriter(options ...func(w *ConsoleWriter)) ConsoleWriter { w := ConsoleWriter{ Out: os.Stdout, TimeFormat: consoleDefaultTimeFormat, PartsOrder: consoleDefaultPartsOrder(), } for _, opt := range options { opt(&w) } return w }
[ "func", "NewConsoleWriter", "(", "options", "...", "func", "(", "w", "*", "ConsoleWriter", ")", ")", "ConsoleWriter", "{", "w", ":=", "ConsoleWriter", "{", "Out", ":", "os", ".", "Stdout", ",", "TimeFormat", ":", "consoleDefaultTimeFormat", ",", "PartsOrder", ...
// NewConsoleWriter creates and initializes a new ConsoleWriter.
[ "NewConsoleWriter", "creates", "and", "initializes", "a", "new", "ConsoleWriter", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/console.go#L71-L83
25,269
rs/zerolog
console.go
Write
func (w ConsoleWriter) Write(p []byte) (n int, err error) { if w.PartsOrder == nil { w.PartsOrder = consoleDefaultPartsOrder() } var buf = consoleBufPool.Get().(*bytes.Buffer) defer func() { buf.Reset() consoleBufPool.Put(buf) }() var evt map[string]interface{} p = decodeIfBinaryToBytes(p) d := json.New...
go
func (w ConsoleWriter) Write(p []byte) (n int, err error) { if w.PartsOrder == nil { w.PartsOrder = consoleDefaultPartsOrder() } var buf = consoleBufPool.Get().(*bytes.Buffer) defer func() { buf.Reset() consoleBufPool.Put(buf) }() var evt map[string]interface{} p = decodeIfBinaryToBytes(p) d := json.New...
[ "func", "(", "w", "ConsoleWriter", ")", "Write", "(", "p", "[", "]", "byte", ")", "(", "n", "int", ",", "err", "error", ")", "{", "if", "w", ".", "PartsOrder", "==", "nil", "{", "w", ".", "PartsOrder", "=", "consoleDefaultPartsOrder", "(", ")", "\n...
// Write transforms the JSON input with formatters and appends to w.Out.
[ "Write", "transforms", "the", "JSON", "input", "with", "formatters", "and", "appends", "to", "w", ".", "Out", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/console.go#L86-L118
25,270
rs/zerolog
console.go
writeFields
func (w ConsoleWriter) writeFields(evt map[string]interface{}, buf *bytes.Buffer) { var fields = make([]string, 0, len(evt)) for field := range evt { switch field { case LevelFieldName, TimestampFieldName, MessageFieldName, CallerFieldName: continue } fields = append(fields, field) } sort.Strings(fields)...
go
func (w ConsoleWriter) writeFields(evt map[string]interface{}, buf *bytes.Buffer) { var fields = make([]string, 0, len(evt)) for field := range evt { switch field { case LevelFieldName, TimestampFieldName, MessageFieldName, CallerFieldName: continue } fields = append(fields, field) } sort.Strings(fields)...
[ "func", "(", "w", "ConsoleWriter", ")", "writeFields", "(", "evt", "map", "[", "string", "]", "interface", "{", "}", ",", "buf", "*", "bytes", ".", "Buffer", ")", "{", "var", "fields", "=", "make", "(", "[", "]", "string", ",", "0", ",", "len", "...
// writeFields appends formatted key-value pairs to buf.
[ "writeFields", "appends", "formatted", "key", "-", "value", "pairs", "to", "buf", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/console.go#L121-L205
25,271
rs/zerolog
console.go
writePart
func (w ConsoleWriter) writePart(buf *bytes.Buffer, evt map[string]interface{}, p string) { var f Formatter switch p { case LevelFieldName: if w.FormatLevel == nil { f = consoleDefaultFormatLevel(w.NoColor) } else { f = w.FormatLevel } case TimestampFieldName: if w.FormatTimestamp == nil { f = con...
go
func (w ConsoleWriter) writePart(buf *bytes.Buffer, evt map[string]interface{}, p string) { var f Formatter switch p { case LevelFieldName: if w.FormatLevel == nil { f = consoleDefaultFormatLevel(w.NoColor) } else { f = w.FormatLevel } case TimestampFieldName: if w.FormatTimestamp == nil { f = con...
[ "func", "(", "w", "ConsoleWriter", ")", "writePart", "(", "buf", "*", "bytes", ".", "Buffer", ",", "evt", "map", "[", "string", "]", "interface", "{", "}", ",", "p", "string", ")", "{", "var", "f", "Formatter", "\n\n", "switch", "p", "{", "case", "...
// writePart appends a formatted part to buf.
[ "writePart", "appends", "a", "formatted", "part", "to", "buf", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/console.go#L208-L252
25,272
rs/zerolog
console.go
needsQuote
func needsQuote(s string) bool { for i := range s { if s[i] < 0x20 || s[i] > 0x7e || s[i] == ' ' || s[i] == '\\' || s[i] == '"' { return true } } return false }
go
func needsQuote(s string) bool { for i := range s { if s[i] < 0x20 || s[i] > 0x7e || s[i] == ' ' || s[i] == '\\' || s[i] == '"' { return true } } return false }
[ "func", "needsQuote", "(", "s", "string", ")", "bool", "{", "for", "i", ":=", "range", "s", "{", "if", "s", "[", "i", "]", "<", "0x20", "||", "s", "[", "i", "]", ">", "0x7e", "||", "s", "[", "i", "]", "==", "' '", "||", "s", "[", "i", "]"...
// needsQuote returns true when the string s should be quoted in output.
[ "needsQuote", "returns", "true", "when", "the", "string", "s", "should", "be", "quoted", "in", "output", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/console.go#L255-L262
25,273
rs/zerolog
console.go
colorize
func colorize(s interface{}, c int, disabled bool) string { if disabled { return fmt.Sprintf("%s", s) } return fmt.Sprintf("\x1b[%dm%v\x1b[0m", c, s) }
go
func colorize(s interface{}, c int, disabled bool) string { if disabled { return fmt.Sprintf("%s", s) } return fmt.Sprintf("\x1b[%dm%v\x1b[0m", c, s) }
[ "func", "colorize", "(", "s", "interface", "{", "}", ",", "c", "int", ",", "disabled", "bool", ")", "string", "{", "if", "disabled", "{", "return", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "s", ")", "\n", "}", "\n", "return", "fmt", ".", "Spr...
// colorize returns the string s wrapped in ANSI code c, unless disabled is true.
[ "colorize", "returns", "the", "string", "s", "wrapped", "in", "ANSI", "code", "c", "unless", "disabled", "is", "true", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/console.go#L265-L270
25,274
rs/zerolog
syslog.go
WriteLevel
func (sw syslogWriter) WriteLevel(level Level, p []byte) (n int, err error) { switch level { case DebugLevel: err = sw.w.Debug(string(p)) case InfoLevel: err = sw.w.Info(string(p)) case WarnLevel: err = sw.w.Warning(string(p)) case ErrorLevel: err = sw.w.Err(string(p)) case FatalLevel: err = sw.w.Emerg(...
go
func (sw syslogWriter) WriteLevel(level Level, p []byte) (n int, err error) { switch level { case DebugLevel: err = sw.w.Debug(string(p)) case InfoLevel: err = sw.w.Info(string(p)) case WarnLevel: err = sw.w.Warning(string(p)) case ErrorLevel: err = sw.w.Err(string(p)) case FatalLevel: err = sw.w.Emerg(...
[ "func", "(", "sw", "syslogWriter", ")", "WriteLevel", "(", "level", "Level", ",", "p", "[", "]", "byte", ")", "(", "n", "int", ",", "err", "error", ")", "{", "switch", "level", "{", "case", "DebugLevel", ":", "err", "=", "sw", ".", "w", ".", "Deb...
// WriteLevel implements LevelWriter interface.
[ "WriteLevel", "implements", "LevelWriter", "interface", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/syslog.go#L36-L57
25,275
rs/zerolog
internal/cbor/time.go
AppendTime
func (e Encoder) AppendTime(dst []byte, t time.Time, unused string) []byte { utc := t.UTC() if utc.Nanosecond() == 0 { return appendIntegerTimestamp(dst, utc) } return e.appendFloatTimestamp(dst, utc) }
go
func (e Encoder) AppendTime(dst []byte, t time.Time, unused string) []byte { utc := t.UTC() if utc.Nanosecond() == 0 { return appendIntegerTimestamp(dst, utc) } return e.appendFloatTimestamp(dst, utc) }
[ "func", "(", "e", "Encoder", ")", "AppendTime", "(", "dst", "[", "]", "byte", ",", "t", "time", ".", "Time", ",", "unused", "string", ")", "[", "]", "byte", "{", "utc", ":=", "t", ".", "UTC", "(", ")", "\n", "if", "utc", ".", "Nanosecond", "(",...
// AppendTime encodes and adds a timestamp to the dst byte array.
[ "AppendTime", "encodes", "and", "adds", "a", "timestamp", "to", "the", "dst", "byte", "array", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/cbor/time.go#L36-L42
25,276
rs/zerolog
internal/cbor/time.go
AppendTimes
func (e Encoder) AppendTimes(dst []byte, vals []time.Time, unused string) []byte { major := majorTypeArray l := len(vals) if l == 0 { return e.AppendArrayEnd(e.AppendArrayStart(dst)) } if l <= additionalMax { lb := byte(l) dst = append(dst, byte(major|lb)) } else { dst = appendCborTypePrefix(dst, major, u...
go
func (e Encoder) AppendTimes(dst []byte, vals []time.Time, unused string) []byte { major := majorTypeArray l := len(vals) if l == 0 { return e.AppendArrayEnd(e.AppendArrayStart(dst)) } if l <= additionalMax { lb := byte(l) dst = append(dst, byte(major|lb)) } else { dst = appendCborTypePrefix(dst, major, u...
[ "func", "(", "e", "Encoder", ")", "AppendTimes", "(", "dst", "[", "]", "byte", ",", "vals", "[", "]", "time", ".", "Time", ",", "unused", "string", ")", "[", "]", "byte", "{", "major", ":=", "majorTypeArray", "\n", "l", ":=", "len", "(", "vals", ...
// AppendTimes encodes and adds an array of timestamps to the dst byte array.
[ "AppendTimes", "encodes", "and", "adds", "an", "array", "of", "timestamps", "to", "the", "dst", "byte", "array", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/cbor/time.go#L45-L62
25,277
rs/zerolog
internal/json/types.go
AppendArrayDelim
func (Encoder) AppendArrayDelim(dst []byte) []byte { if len(dst) > 0 { return append(dst, ',') } return dst }
go
func (Encoder) AppendArrayDelim(dst []byte) []byte { if len(dst) > 0 { return append(dst, ',') } return dst }
[ "func", "(", "Encoder", ")", "AppendArrayDelim", "(", "dst", "[", "]", "byte", ")", "[", "]", "byte", "{", "if", "len", "(", "dst", ")", ">", "0", "{", "return", "append", "(", "dst", ",", "','", ")", "\n", "}", "\n", "return", "dst", "\n", "}"...
// AppendArrayDelim adds markers to indicate end of a particular array element.
[ "AppendArrayDelim", "adds", "markers", "to", "indicate", "end", "of", "a", "particular", "array", "element", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L42-L47
25,278
rs/zerolog
internal/json/types.go
AppendBool
func (Encoder) AppendBool(dst []byte, val bool) []byte { return strconv.AppendBool(dst, val) }
go
func (Encoder) AppendBool(dst []byte, val bool) []byte { return strconv.AppendBool(dst, val) }
[ "func", "(", "Encoder", ")", "AppendBool", "(", "dst", "[", "]", "byte", ",", "val", "bool", ")", "[", "]", "byte", "{", "return", "strconv", ".", "AppendBool", "(", "dst", ",", "val", ")", "\n", "}" ]
// AppendBool converts the input bool to a string and // appends the encoded string to the input byte slice.
[ "AppendBool", "converts", "the", "input", "bool", "to", "a", "string", "and", "appends", "the", "encoded", "string", "to", "the", "input", "byte", "slice", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L51-L53
25,279
rs/zerolog
internal/json/types.go
AppendBools
func (Encoder) AppendBools(dst []byte, vals []bool) []byte { if len(vals) == 0 { return append(dst, '[', ']') } dst = append(dst, '[') dst = strconv.AppendBool(dst, vals[0]) if len(vals) > 1 { for _, val := range vals[1:] { dst = strconv.AppendBool(append(dst, ','), val) } } dst = append(dst, ']') retu...
go
func (Encoder) AppendBools(dst []byte, vals []bool) []byte { if len(vals) == 0 { return append(dst, '[', ']') } dst = append(dst, '[') dst = strconv.AppendBool(dst, vals[0]) if len(vals) > 1 { for _, val := range vals[1:] { dst = strconv.AppendBool(append(dst, ','), val) } } dst = append(dst, ']') retu...
[ "func", "(", "Encoder", ")", "AppendBools", "(", "dst", "[", "]", "byte", ",", "vals", "[", "]", "bool", ")", "[", "]", "byte", "{", "if", "len", "(", "vals", ")", "==", "0", "{", "return", "append", "(", "dst", ",", "'['", ",", "']'", ")", "...
// AppendBools encodes the input bools to json and // appends the encoded string list to the input byte slice.
[ "AppendBools", "encodes", "the", "input", "bools", "to", "json", "and", "appends", "the", "encoded", "string", "list", "to", "the", "input", "byte", "slice", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L57-L70
25,280
rs/zerolog
internal/json/types.go
AppendInt
func (Encoder) AppendInt(dst []byte, val int) []byte { return strconv.AppendInt(dst, int64(val), 10) }
go
func (Encoder) AppendInt(dst []byte, val int) []byte { return strconv.AppendInt(dst, int64(val), 10) }
[ "func", "(", "Encoder", ")", "AppendInt", "(", "dst", "[", "]", "byte", ",", "val", "int", ")", "[", "]", "byte", "{", "return", "strconv", ".", "AppendInt", "(", "dst", ",", "int64", "(", "val", ")", ",", "10", ")", "\n", "}" ]
// AppendInt converts the input int to a string and // appends the encoded string to the input byte slice.
[ "AppendInt", "converts", "the", "input", "int", "to", "a", "string", "and", "appends", "the", "encoded", "string", "to", "the", "input", "byte", "slice", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L74-L76
25,281
rs/zerolog
internal/json/types.go
AppendInts
func (Encoder) AppendInts(dst []byte, vals []int) []byte { if len(vals) == 0 { return append(dst, '[', ']') } dst = append(dst, '[') dst = strconv.AppendInt(dst, int64(vals[0]), 10) if len(vals) > 1 { for _, val := range vals[1:] { dst = strconv.AppendInt(append(dst, ','), int64(val), 10) } } dst = appe...
go
func (Encoder) AppendInts(dst []byte, vals []int) []byte { if len(vals) == 0 { return append(dst, '[', ']') } dst = append(dst, '[') dst = strconv.AppendInt(dst, int64(vals[0]), 10) if len(vals) > 1 { for _, val := range vals[1:] { dst = strconv.AppendInt(append(dst, ','), int64(val), 10) } } dst = appe...
[ "func", "(", "Encoder", ")", "AppendInts", "(", "dst", "[", "]", "byte", ",", "vals", "[", "]", "int", ")", "[", "]", "byte", "{", "if", "len", "(", "vals", ")", "==", "0", "{", "return", "append", "(", "dst", ",", "'['", ",", "']'", ")", "\n...
// AppendInts encodes the input ints to json and // appends the encoded string list to the input byte slice.
[ "AppendInts", "encodes", "the", "input", "ints", "to", "json", "and", "appends", "the", "encoded", "string", "list", "to", "the", "input", "byte", "slice", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L80-L93
25,282
rs/zerolog
internal/json/types.go
AppendInts8
func (Encoder) AppendInts8(dst []byte, vals []int8) []byte { if len(vals) == 0 { return append(dst, '[', ']') } dst = append(dst, '[') dst = strconv.AppendInt(dst, int64(vals[0]), 10) if len(vals) > 1 { for _, val := range vals[1:] { dst = strconv.AppendInt(append(dst, ','), int64(val), 10) } } dst = ap...
go
func (Encoder) AppendInts8(dst []byte, vals []int8) []byte { if len(vals) == 0 { return append(dst, '[', ']') } dst = append(dst, '[') dst = strconv.AppendInt(dst, int64(vals[0]), 10) if len(vals) > 1 { for _, val := range vals[1:] { dst = strconv.AppendInt(append(dst, ','), int64(val), 10) } } dst = ap...
[ "func", "(", "Encoder", ")", "AppendInts8", "(", "dst", "[", "]", "byte", ",", "vals", "[", "]", "int8", ")", "[", "]", "byte", "{", "if", "len", "(", "vals", ")", "==", "0", "{", "return", "append", "(", "dst", ",", "'['", ",", "']'", ")", "...
// AppendInts8 encodes the input int8s to json and // appends the encoded string list to the input byte slice.
[ "AppendInts8", "encodes", "the", "input", "int8s", "to", "json", "and", "appends", "the", "encoded", "string", "list", "to", "the", "input", "byte", "slice", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L103-L116
25,283
rs/zerolog
internal/json/types.go
AppendInt16
func (Encoder) AppendInt16(dst []byte, val int16) []byte { return strconv.AppendInt(dst, int64(val), 10) }
go
func (Encoder) AppendInt16(dst []byte, val int16) []byte { return strconv.AppendInt(dst, int64(val), 10) }
[ "func", "(", "Encoder", ")", "AppendInt16", "(", "dst", "[", "]", "byte", ",", "val", "int16", ")", "[", "]", "byte", "{", "return", "strconv", ".", "AppendInt", "(", "dst", ",", "int64", "(", "val", ")", ",", "10", ")", "\n", "}" ]
// AppendInt16 converts the input int16 to a string and // appends the encoded string to the input byte slice.
[ "AppendInt16", "converts", "the", "input", "int16", "to", "a", "string", "and", "appends", "the", "encoded", "string", "to", "the", "input", "byte", "slice", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L120-L122
25,284
rs/zerolog
internal/json/types.go
AppendInts16
func (Encoder) AppendInts16(dst []byte, vals []int16) []byte { if len(vals) == 0 { return append(dst, '[', ']') } dst = append(dst, '[') dst = strconv.AppendInt(dst, int64(vals[0]), 10) if len(vals) > 1 { for _, val := range vals[1:] { dst = strconv.AppendInt(append(dst, ','), int64(val), 10) } } dst = ...
go
func (Encoder) AppendInts16(dst []byte, vals []int16) []byte { if len(vals) == 0 { return append(dst, '[', ']') } dst = append(dst, '[') dst = strconv.AppendInt(dst, int64(vals[0]), 10) if len(vals) > 1 { for _, val := range vals[1:] { dst = strconv.AppendInt(append(dst, ','), int64(val), 10) } } dst = ...
[ "func", "(", "Encoder", ")", "AppendInts16", "(", "dst", "[", "]", "byte", ",", "vals", "[", "]", "int16", ")", "[", "]", "byte", "{", "if", "len", "(", "vals", ")", "==", "0", "{", "return", "append", "(", "dst", ",", "'['", ",", "']'", ")", ...
// AppendInts16 encodes the input int16s to json and // appends the encoded string list to the input byte slice.
[ "AppendInts16", "encodes", "the", "input", "int16s", "to", "json", "and", "appends", "the", "encoded", "string", "list", "to", "the", "input", "byte", "slice", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L126-L139
25,285
rs/zerolog
internal/json/types.go
AppendInt32
func (Encoder) AppendInt32(dst []byte, val int32) []byte { return strconv.AppendInt(dst, int64(val), 10) }
go
func (Encoder) AppendInt32(dst []byte, val int32) []byte { return strconv.AppendInt(dst, int64(val), 10) }
[ "func", "(", "Encoder", ")", "AppendInt32", "(", "dst", "[", "]", "byte", ",", "val", "int32", ")", "[", "]", "byte", "{", "return", "strconv", ".", "AppendInt", "(", "dst", ",", "int64", "(", "val", ")", ",", "10", ")", "\n", "}" ]
// AppendInt32 converts the input int32 to a string and // appends the encoded string to the input byte slice.
[ "AppendInt32", "converts", "the", "input", "int32", "to", "a", "string", "and", "appends", "the", "encoded", "string", "to", "the", "input", "byte", "slice", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L143-L145
25,286
rs/zerolog
internal/json/types.go
AppendInts32
func (Encoder) AppendInts32(dst []byte, vals []int32) []byte { if len(vals) == 0 { return append(dst, '[', ']') } dst = append(dst, '[') dst = strconv.AppendInt(dst, int64(vals[0]), 10) if len(vals) > 1 { for _, val := range vals[1:] { dst = strconv.AppendInt(append(dst, ','), int64(val), 10) } } dst = ...
go
func (Encoder) AppendInts32(dst []byte, vals []int32) []byte { if len(vals) == 0 { return append(dst, '[', ']') } dst = append(dst, '[') dst = strconv.AppendInt(dst, int64(vals[0]), 10) if len(vals) > 1 { for _, val := range vals[1:] { dst = strconv.AppendInt(append(dst, ','), int64(val), 10) } } dst = ...
[ "func", "(", "Encoder", ")", "AppendInts32", "(", "dst", "[", "]", "byte", ",", "vals", "[", "]", "int32", ")", "[", "]", "byte", "{", "if", "len", "(", "vals", ")", "==", "0", "{", "return", "append", "(", "dst", ",", "'['", ",", "']'", ")", ...
// AppendInts32 encodes the input int32s to json and // appends the encoded string list to the input byte slice.
[ "AppendInts32", "encodes", "the", "input", "int32s", "to", "json", "and", "appends", "the", "encoded", "string", "list", "to", "the", "input", "byte", "slice", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L149-L162
25,287
rs/zerolog
internal/json/types.go
AppendInt64
func (Encoder) AppendInt64(dst []byte, val int64) []byte { return strconv.AppendInt(dst, val, 10) }
go
func (Encoder) AppendInt64(dst []byte, val int64) []byte { return strconv.AppendInt(dst, val, 10) }
[ "func", "(", "Encoder", ")", "AppendInt64", "(", "dst", "[", "]", "byte", ",", "val", "int64", ")", "[", "]", "byte", "{", "return", "strconv", ".", "AppendInt", "(", "dst", ",", "val", ",", "10", ")", "\n", "}" ]
// AppendInt64 converts the input int64 to a string and // appends the encoded string to the input byte slice.
[ "AppendInt64", "converts", "the", "input", "int64", "to", "a", "string", "and", "appends", "the", "encoded", "string", "to", "the", "input", "byte", "slice", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L166-L168
25,288
rs/zerolog
internal/json/types.go
AppendInts64
func (Encoder) AppendInts64(dst []byte, vals []int64) []byte { if len(vals) == 0 { return append(dst, '[', ']') } dst = append(dst, '[') dst = strconv.AppendInt(dst, vals[0], 10) if len(vals) > 1 { for _, val := range vals[1:] { dst = strconv.AppendInt(append(dst, ','), val, 10) } } dst = append(dst, ']...
go
func (Encoder) AppendInts64(dst []byte, vals []int64) []byte { if len(vals) == 0 { return append(dst, '[', ']') } dst = append(dst, '[') dst = strconv.AppendInt(dst, vals[0], 10) if len(vals) > 1 { for _, val := range vals[1:] { dst = strconv.AppendInt(append(dst, ','), val, 10) } } dst = append(dst, ']...
[ "func", "(", "Encoder", ")", "AppendInts64", "(", "dst", "[", "]", "byte", ",", "vals", "[", "]", "int64", ")", "[", "]", "byte", "{", "if", "len", "(", "vals", ")", "==", "0", "{", "return", "append", "(", "dst", ",", "'['", ",", "']'", ")", ...
// AppendInts64 encodes the input int64s to json and // appends the encoded string list to the input byte slice.
[ "AppendInts64", "encodes", "the", "input", "int64s", "to", "json", "and", "appends", "the", "encoded", "string", "list", "to", "the", "input", "byte", "slice", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L172-L185
25,289
rs/zerolog
internal/json/types.go
AppendUint
func (Encoder) AppendUint(dst []byte, val uint) []byte { return strconv.AppendUint(dst, uint64(val), 10) }
go
func (Encoder) AppendUint(dst []byte, val uint) []byte { return strconv.AppendUint(dst, uint64(val), 10) }
[ "func", "(", "Encoder", ")", "AppendUint", "(", "dst", "[", "]", "byte", ",", "val", "uint", ")", "[", "]", "byte", "{", "return", "strconv", ".", "AppendUint", "(", "dst", ",", "uint64", "(", "val", ")", ",", "10", ")", "\n", "}" ]
// AppendUint converts the input uint to a string and // appends the encoded string to the input byte slice.
[ "AppendUint", "converts", "the", "input", "uint", "to", "a", "string", "and", "appends", "the", "encoded", "string", "to", "the", "input", "byte", "slice", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L189-L191
25,290
rs/zerolog
internal/json/types.go
AppendUints
func (Encoder) AppendUints(dst []byte, vals []uint) []byte { if len(vals) == 0 { return append(dst, '[', ']') } dst = append(dst, '[') dst = strconv.AppendUint(dst, uint64(vals[0]), 10) if len(vals) > 1 { for _, val := range vals[1:] { dst = strconv.AppendUint(append(dst, ','), uint64(val), 10) } } dst ...
go
func (Encoder) AppendUints(dst []byte, vals []uint) []byte { if len(vals) == 0 { return append(dst, '[', ']') } dst = append(dst, '[') dst = strconv.AppendUint(dst, uint64(vals[0]), 10) if len(vals) > 1 { for _, val := range vals[1:] { dst = strconv.AppendUint(append(dst, ','), uint64(val), 10) } } dst ...
[ "func", "(", "Encoder", ")", "AppendUints", "(", "dst", "[", "]", "byte", ",", "vals", "[", "]", "uint", ")", "[", "]", "byte", "{", "if", "len", "(", "vals", ")", "==", "0", "{", "return", "append", "(", "dst", ",", "'['", ",", "']'", ")", "...
// AppendUints encodes the input uints to json and // appends the encoded string list to the input byte slice.
[ "AppendUints", "encodes", "the", "input", "uints", "to", "json", "and", "appends", "the", "encoded", "string", "list", "to", "the", "input", "byte", "slice", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L195-L208
25,291
rs/zerolog
internal/json/types.go
AppendUint8
func (Encoder) AppendUint8(dst []byte, val uint8) []byte { return strconv.AppendUint(dst, uint64(val), 10) }
go
func (Encoder) AppendUint8(dst []byte, val uint8) []byte { return strconv.AppendUint(dst, uint64(val), 10) }
[ "func", "(", "Encoder", ")", "AppendUint8", "(", "dst", "[", "]", "byte", ",", "val", "uint8", ")", "[", "]", "byte", "{", "return", "strconv", ".", "AppendUint", "(", "dst", ",", "uint64", "(", "val", ")", ",", "10", ")", "\n", "}" ]
// AppendUint8 converts the input uint8 to a string and // appends the encoded string to the input byte slice.
[ "AppendUint8", "converts", "the", "input", "uint8", "to", "a", "string", "and", "appends", "the", "encoded", "string", "to", "the", "input", "byte", "slice", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L212-L214
25,292
rs/zerolog
internal/json/types.go
AppendUints8
func (Encoder) AppendUints8(dst []byte, vals []uint8) []byte { if len(vals) == 0 { return append(dst, '[', ']') } dst = append(dst, '[') dst = strconv.AppendUint(dst, uint64(vals[0]), 10) if len(vals) > 1 { for _, val := range vals[1:] { dst = strconv.AppendUint(append(dst, ','), uint64(val), 10) } } ds...
go
func (Encoder) AppendUints8(dst []byte, vals []uint8) []byte { if len(vals) == 0 { return append(dst, '[', ']') } dst = append(dst, '[') dst = strconv.AppendUint(dst, uint64(vals[0]), 10) if len(vals) > 1 { for _, val := range vals[1:] { dst = strconv.AppendUint(append(dst, ','), uint64(val), 10) } } ds...
[ "func", "(", "Encoder", ")", "AppendUints8", "(", "dst", "[", "]", "byte", ",", "vals", "[", "]", "uint8", ")", "[", "]", "byte", "{", "if", "len", "(", "vals", ")", "==", "0", "{", "return", "append", "(", "dst", ",", "'['", ",", "']'", ")", ...
// AppendUints8 encodes the input uint8s to json and // appends the encoded string list to the input byte slice.
[ "AppendUints8", "encodes", "the", "input", "uint8s", "to", "json", "and", "appends", "the", "encoded", "string", "list", "to", "the", "input", "byte", "slice", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L218-L231
25,293
rs/zerolog
internal/json/types.go
AppendUint16
func (Encoder) AppendUint16(dst []byte, val uint16) []byte { return strconv.AppendUint(dst, uint64(val), 10) }
go
func (Encoder) AppendUint16(dst []byte, val uint16) []byte { return strconv.AppendUint(dst, uint64(val), 10) }
[ "func", "(", "Encoder", ")", "AppendUint16", "(", "dst", "[", "]", "byte", ",", "val", "uint16", ")", "[", "]", "byte", "{", "return", "strconv", ".", "AppendUint", "(", "dst", ",", "uint64", "(", "val", ")", ",", "10", ")", "\n", "}" ]
// AppendUint16 converts the input uint16 to a string and // appends the encoded string to the input byte slice.
[ "AppendUint16", "converts", "the", "input", "uint16", "to", "a", "string", "and", "appends", "the", "encoded", "string", "to", "the", "input", "byte", "slice", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L235-L237
25,294
rs/zerolog
internal/json/types.go
AppendUints16
func (Encoder) AppendUints16(dst []byte, vals []uint16) []byte { if len(vals) == 0 { return append(dst, '[', ']') } dst = append(dst, '[') dst = strconv.AppendUint(dst, uint64(vals[0]), 10) if len(vals) > 1 { for _, val := range vals[1:] { dst = strconv.AppendUint(append(dst, ','), uint64(val), 10) } } ...
go
func (Encoder) AppendUints16(dst []byte, vals []uint16) []byte { if len(vals) == 0 { return append(dst, '[', ']') } dst = append(dst, '[') dst = strconv.AppendUint(dst, uint64(vals[0]), 10) if len(vals) > 1 { for _, val := range vals[1:] { dst = strconv.AppendUint(append(dst, ','), uint64(val), 10) } } ...
[ "func", "(", "Encoder", ")", "AppendUints16", "(", "dst", "[", "]", "byte", ",", "vals", "[", "]", "uint16", ")", "[", "]", "byte", "{", "if", "len", "(", "vals", ")", "==", "0", "{", "return", "append", "(", "dst", ",", "'['", ",", "']'", ")",...
// AppendUints16 encodes the input uint16s to json and // appends the encoded string list to the input byte slice.
[ "AppendUints16", "encodes", "the", "input", "uint16s", "to", "json", "and", "appends", "the", "encoded", "string", "list", "to", "the", "input", "byte", "slice", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L241-L254
25,295
rs/zerolog
internal/json/types.go
AppendUint32
func (Encoder) AppendUint32(dst []byte, val uint32) []byte { return strconv.AppendUint(dst, uint64(val), 10) }
go
func (Encoder) AppendUint32(dst []byte, val uint32) []byte { return strconv.AppendUint(dst, uint64(val), 10) }
[ "func", "(", "Encoder", ")", "AppendUint32", "(", "dst", "[", "]", "byte", ",", "val", "uint32", ")", "[", "]", "byte", "{", "return", "strconv", ".", "AppendUint", "(", "dst", ",", "uint64", "(", "val", ")", ",", "10", ")", "\n", "}" ]
// AppendUint32 converts the input uint32 to a string and // appends the encoded string to the input byte slice.
[ "AppendUint32", "converts", "the", "input", "uint32", "to", "a", "string", "and", "appends", "the", "encoded", "string", "to", "the", "input", "byte", "slice", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L258-L260
25,296
rs/zerolog
internal/json/types.go
AppendUints32
func (Encoder) AppendUints32(dst []byte, vals []uint32) []byte { if len(vals) == 0 { return append(dst, '[', ']') } dst = append(dst, '[') dst = strconv.AppendUint(dst, uint64(vals[0]), 10) if len(vals) > 1 { for _, val := range vals[1:] { dst = strconv.AppendUint(append(dst, ','), uint64(val), 10) } } ...
go
func (Encoder) AppendUints32(dst []byte, vals []uint32) []byte { if len(vals) == 0 { return append(dst, '[', ']') } dst = append(dst, '[') dst = strconv.AppendUint(dst, uint64(vals[0]), 10) if len(vals) > 1 { for _, val := range vals[1:] { dst = strconv.AppendUint(append(dst, ','), uint64(val), 10) } } ...
[ "func", "(", "Encoder", ")", "AppendUints32", "(", "dst", "[", "]", "byte", ",", "vals", "[", "]", "uint32", ")", "[", "]", "byte", "{", "if", "len", "(", "vals", ")", "==", "0", "{", "return", "append", "(", "dst", ",", "'['", ",", "']'", ")",...
// AppendUints32 encodes the input uint32s to json and // appends the encoded string list to the input byte slice.
[ "AppendUints32", "encodes", "the", "input", "uint32s", "to", "json", "and", "appends", "the", "encoded", "string", "list", "to", "the", "input", "byte", "slice", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L264-L277
25,297
rs/zerolog
internal/json/types.go
AppendUint64
func (Encoder) AppendUint64(dst []byte, val uint64) []byte { return strconv.AppendUint(dst, uint64(val), 10) }
go
func (Encoder) AppendUint64(dst []byte, val uint64) []byte { return strconv.AppendUint(dst, uint64(val), 10) }
[ "func", "(", "Encoder", ")", "AppendUint64", "(", "dst", "[", "]", "byte", ",", "val", "uint64", ")", "[", "]", "byte", "{", "return", "strconv", ".", "AppendUint", "(", "dst", ",", "uint64", "(", "val", ")", ",", "10", ")", "\n", "}" ]
// AppendUint64 converts the input uint64 to a string and // appends the encoded string to the input byte slice.
[ "AppendUint64", "converts", "the", "input", "uint64", "to", "a", "string", "and", "appends", "the", "encoded", "string", "to", "the", "input", "byte", "slice", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L281-L283
25,298
rs/zerolog
internal/json/types.go
AppendUints64
func (Encoder) AppendUints64(dst []byte, vals []uint64) []byte { if len(vals) == 0 { return append(dst, '[', ']') } dst = append(dst, '[') dst = strconv.AppendUint(dst, vals[0], 10) if len(vals) > 1 { for _, val := range vals[1:] { dst = strconv.AppendUint(append(dst, ','), val, 10) } } dst = append(dst...
go
func (Encoder) AppendUints64(dst []byte, vals []uint64) []byte { if len(vals) == 0 { return append(dst, '[', ']') } dst = append(dst, '[') dst = strconv.AppendUint(dst, vals[0], 10) if len(vals) > 1 { for _, val := range vals[1:] { dst = strconv.AppendUint(append(dst, ','), val, 10) } } dst = append(dst...
[ "func", "(", "Encoder", ")", "AppendUints64", "(", "dst", "[", "]", "byte", ",", "vals", "[", "]", "uint64", ")", "[", "]", "byte", "{", "if", "len", "(", "vals", ")", "==", "0", "{", "return", "append", "(", "dst", ",", "'['", ",", "']'", ")",...
// AppendUints64 encodes the input uint64s to json and // appends the encoded string list to the input byte slice.
[ "AppendUints64", "encodes", "the", "input", "uint64s", "to", "json", "and", "appends", "the", "encoded", "string", "list", "to", "the", "input", "byte", "slice", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L287-L300
25,299
rs/zerolog
internal/json/types.go
AppendFloat32
func (Encoder) AppendFloat32(dst []byte, val float32) []byte { return appendFloat(dst, float64(val), 32) }
go
func (Encoder) AppendFloat32(dst []byte, val float32) []byte { return appendFloat(dst, float64(val), 32) }
[ "func", "(", "Encoder", ")", "AppendFloat32", "(", "dst", "[", "]", "byte", ",", "val", "float32", ")", "[", "]", "byte", "{", "return", "appendFloat", "(", "dst", ",", "float64", "(", "val", ")", ",", "32", ")", "\n", "}" ]
// AppendFloat32 converts the input float32 to a string and // appends the encoded string to the input byte slice.
[ "AppendFloat32", "converts", "the", "input", "float32", "to", "a", "string", "and", "appends", "the", "encoded", "string", "to", "the", "input", "byte", "slice", "." ]
acf3980132bfcdc48638724e6e3d9e5749b85999
https://github.com/rs/zerolog/blob/acf3980132bfcdc48638724e6e3d9e5749b85999/internal/json/types.go#L319-L321