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
listlengths
21
1.41k
docstring
stringlengths
6
2.61k
docstring_tokens
listlengths
3
215
sha
stringlengths
40
40
url
stringlengths
85
252
146,900
jackc/pgx
pgtype/pguint32.go
Set
func (dst *pguint32) Set(src interface{}) error { switch value := src.(type) { case int64: if value < 0 { return errors.Errorf("%d is less than minimum value for pguint32", value) } if value > math.MaxUint32 { return errors.Errorf("%d is greater than maximum value for pguint32", value) } *dst = pguint...
go
func (dst *pguint32) Set(src interface{}) error { switch value := src.(type) { case int64: if value < 0 { return errors.Errorf("%d is less than minimum value for pguint32", value) } if value > math.MaxUint32 { return errors.Errorf("%d is greater than maximum value for pguint32", value) } *dst = pguint...
[ "func", "(", "dst", "*", "pguint32", ")", "Set", "(", "src", "interface", "{", "}", ")", "error", "{", "switch", "value", ":=", "src", ".", "(", "type", ")", "{", "case", "int64", ":", "if", "value", "<", "0", "{", "return", "errors", ".", "Error...
// Set converts from src to dst. Note that as pguint32 is not a general // number type Set does not do automatic type conversion as other number // types do.
[ "Set", "converts", "from", "src", "to", "dst", ".", "Note", "that", "as", "pguint32", "is", "not", "a", "general", "number", "type", "Set", "does", "not", "do", "automatic", "type", "conversion", "as", "other", "number", "types", "do", "." ]
25c2375fd84652ac32aa0ecc9a6b872a4ab25cdc
https://github.com/jackc/pgx/blob/25c2375fd84652ac32aa0ecc9a6b872a4ab25cdc/pgtype/pguint32.go#L23-L40
146,901
jackc/pgx
pgtype/pguint32.go
AssignTo
func (src *pguint32) AssignTo(dst interface{}) error { switch v := dst.(type) { case *uint32: if src.Status == Present { *v = src.Uint } else { return errors.Errorf("cannot assign %v into %T", src, dst) } case **uint32: if src.Status == Present { n := src.Uint *v = &n } else { *v = nil } ...
go
func (src *pguint32) AssignTo(dst interface{}) error { switch v := dst.(type) { case *uint32: if src.Status == Present { *v = src.Uint } else { return errors.Errorf("cannot assign %v into %T", src, dst) } case **uint32: if src.Status == Present { n := src.Uint *v = &n } else { *v = nil } ...
[ "func", "(", "src", "*", "pguint32", ")", "AssignTo", "(", "dst", "interface", "{", "}", ")", "error", "{", "switch", "v", ":=", "dst", ".", "(", "type", ")", "{", "case", "*", "uint32", ":", "if", "src", ".", "Status", "==", "Present", "{", "*",...
// AssignTo assigns from src to dst. Note that as pguint32 is not a general number // type AssignTo does not do automatic type conversion as other number types do.
[ "AssignTo", "assigns", "from", "src", "to", "dst", ".", "Note", "that", "as", "pguint32", "is", "not", "a", "general", "number", "type", "AssignTo", "does", "not", "do", "automatic", "type", "conversion", "as", "other", "number", "types", "do", "." ]
25c2375fd84652ac32aa0ecc9a6b872a4ab25cdc
https://github.com/jackc/pgx/blob/25c2375fd84652ac32aa0ecc9a6b872a4ab25cdc/pgtype/pguint32.go#L55-L73
146,902
jackc/pgx
stdlib/opendbpool.go
OpenDBFromPool
func OpenDBFromPool(pool *pgx.ConnPool, opts ...OptionOpenDBFromPool) *sql.DB { c := poolConnector{ pool: pool, driver: pgxDriver, } for _, opt := range opts { opt(&c) } return sql.OpenDB(c) }
go
func OpenDBFromPool(pool *pgx.ConnPool, opts ...OptionOpenDBFromPool) *sql.DB { c := poolConnector{ pool: pool, driver: pgxDriver, } for _, opt := range opts { opt(&c) } return sql.OpenDB(c) }
[ "func", "OpenDBFromPool", "(", "pool", "*", "pgx", ".", "ConnPool", ",", "opts", "...", "OptionOpenDBFromPool", ")", "*", "sql", ".", "DB", "{", "c", ":=", "poolConnector", "{", "pool", ":", "pool", ",", "driver", ":", "pgxDriver", ",", "}", "\n\n", "f...
// OpenDBFromPool create a sql.DB connection from a pgx.ConnPool
[ "OpenDBFromPool", "create", "a", "sql", ".", "DB", "connection", "from", "a", "pgx", ".", "ConnPool" ]
25c2375fd84652ac32aa0ecc9a6b872a4ab25cdc
https://github.com/jackc/pgx/blob/25c2375fd84652ac32aa0ecc9a6b872a4ab25cdc/stdlib/opendbpool.go#L24-L35
146,903
jackc/pgx
pgtype/bytea.go
DecodeText
func (dst *Bytea) DecodeText(ci *ConnInfo, src []byte) error { if src == nil { *dst = Bytea{Status: Null} return nil } if len(src) < 2 || src[0] != '\\' || src[1] != 'x' { return errors.Errorf("invalid hex format") } buf := make([]byte, (len(src)-2)/2) _, err := hex.Decode(buf, src[2:]) if err != nil { ...
go
func (dst *Bytea) DecodeText(ci *ConnInfo, src []byte) error { if src == nil { *dst = Bytea{Status: Null} return nil } if len(src) < 2 || src[0] != '\\' || src[1] != 'x' { return errors.Errorf("invalid hex format") } buf := make([]byte, (len(src)-2)/2) _, err := hex.Decode(buf, src[2:]) if err != nil { ...
[ "func", "(", "dst", "*", "Bytea", ")", "DecodeText", "(", "ci", "*", "ConnInfo", ",", "src", "[", "]", "byte", ")", "error", "{", "if", "src", "==", "nil", "{", "*", "dst", "=", "Bytea", "{", "Status", ":", "Null", "}", "\n", "return", "nil", "...
// DecodeText only supports the hex format. This has been the default since // PostgreSQL 9.0.
[ "DecodeText", "only", "supports", "the", "hex", "format", ".", "This", "has", "been", "the", "default", "since", "PostgreSQL", "9", ".", "0", "." ]
25c2375fd84652ac32aa0ecc9a6b872a4ab25cdc
https://github.com/jackc/pgx/blob/25c2375fd84652ac32aa0ecc9a6b872a4ab25cdc/pgtype/bytea.go#L72-L90
146,904
jackc/pgx
stdlib/opendb.go
OptionAfterConnect
func OptionAfterConnect(ac func(*pgx.Conn) error) OptionOpenDB { return func(dc *connector) { dc.AfterConnect = ac } }
go
func OptionAfterConnect(ac func(*pgx.Conn) error) OptionOpenDB { return func(dc *connector) { dc.AfterConnect = ac } }
[ "func", "OptionAfterConnect", "(", "ac", "func", "(", "*", "pgx", ".", "Conn", ")", "error", ")", "OptionOpenDB", "{", "return", "func", "(", "dc", "*", "connector", ")", "{", "dc", ".", "AfterConnect", "=", "ac", "\n", "}", "\n", "}" ]
// OptionAfterConnect provide a callback for after connect.
[ "OptionAfterConnect", "provide", "a", "callback", "for", "after", "connect", "." ]
25c2375fd84652ac32aa0ecc9a6b872a4ab25cdc
https://github.com/jackc/pgx/blob/25c2375fd84652ac32aa0ecc9a6b872a4ab25cdc/stdlib/opendb.go#L17-L21
146,905
parnurzeal/gorequest
gorequest_client_go1.3.go
safeModifyHttpClient
func (s *SuperAgent) safeModifyHttpClient() { if !s.isClone { return } oldClient := s.Client s.Client = &http.Client{} s.Client.Jar = oldClient.Jar s.Client.Transport = oldClient.Transport s.Client.Timeout = oldClient.Timeout s.Client.CheckRedirect = oldClient.CheckRedir...
go
func (s *SuperAgent) safeModifyHttpClient() { if !s.isClone { return } oldClient := s.Client s.Client = &http.Client{} s.Client.Jar = oldClient.Jar s.Client.Transport = oldClient.Transport s.Client.Timeout = oldClient.Timeout s.Client.CheckRedirect = oldClient.CheckRedir...
[ "func", "(", "s", "*", "SuperAgent", ")", "safeModifyHttpClient", "(", ")", "{", "if", "!", "s", ".", "isClone", "{", "return", "\n", "}", "\n", "oldClient", ":=", "s", ".", "Client", "\n", "s", ".", "Client", "=", "&", "http", ".", "Client", "{", ...
// we don't want to mess up other clones when we modify the client.. // so unfortantely we need to create a new client
[ "we", "don", "t", "want", "to", "mess", "up", "other", "clones", "when", "we", "modify", "the", "client", "..", "so", "unfortantely", "we", "need", "to", "create", "a", "new", "client" ]
b0604454e3c35c21d4c86e4771dc1e24c896cdd3
https://github.com/parnurzeal/gorequest/blob/b0604454e3c35c21d4c86e4771dc1e24c896cdd3/gorequest_client_go1.3.go#L13-L23
146,906
parnurzeal/gorequest
gorequest_transport_go1.7.go
safeModifyTransport
func (s *SuperAgent) safeModifyTransport() { if !s.isClone { return } oldTransport := s.Transport s.Transport = &http.Transport{ Proxy: oldTransport.Proxy, Dial: oldTransport.Dial, DialTLS: oldTransport.DialTLS, ...
go
func (s *SuperAgent) safeModifyTransport() { if !s.isClone { return } oldTransport := s.Transport s.Transport = &http.Transport{ Proxy: oldTransport.Proxy, Dial: oldTransport.Dial, DialTLS: oldTransport.DialTLS, ...
[ "func", "(", "s", "*", "SuperAgent", ")", "safeModifyTransport", "(", ")", "{", "if", "!", "s", ".", "isClone", "{", "return", "\n", "}", "\n", "oldTransport", ":=", "s", ".", "Transport", "\n", "s", ".", "Transport", "=", "&", "http", ".", "Transpor...
// does a shallow clone of the transport
[ "does", "a", "shallow", "clone", "of", "the", "transport" ]
b0604454e3c35c21d4c86e4771dc1e24c896cdd3
https://github.com/parnurzeal/gorequest/blob/b0604454e3c35c21d4c86e4771dc1e24c896cdd3/gorequest_transport_go1.7.go#L11-L34
146,907
parnurzeal/gorequest
gorequest.go
New
func New() *SuperAgent { cookiejarOptions := cookiejar.Options{ PublicSuffixList: publicsuffix.List, } jar, _ := cookiejar.New(&cookiejarOptions) debug := os.Getenv("GOREQUEST_DEBUG") == "1" s := &SuperAgent{ TargetType: TypeJSON, Data: make(map[string]interface{}), Header: ...
go
func New() *SuperAgent { cookiejarOptions := cookiejar.Options{ PublicSuffixList: publicsuffix.List, } jar, _ := cookiejar.New(&cookiejarOptions) debug := os.Getenv("GOREQUEST_DEBUG") == "1" s := &SuperAgent{ TargetType: TypeJSON, Data: make(map[string]interface{}), Header: ...
[ "func", "New", "(", ")", "*", "SuperAgent", "{", "cookiejarOptions", ":=", "cookiejar", ".", "Options", "{", "PublicSuffixList", ":", "publicsuffix", ".", "List", ",", "}", "\n", "jar", ",", "_", ":=", "cookiejar", ".", "New", "(", "&", "cookiejarOptions",...
// Used to create a new SuperAgent object.
[ "Used", "to", "create", "a", "new", "SuperAgent", "object", "." ]
b0604454e3c35c21d4c86e4771dc1e24c896cdd3
https://github.com/parnurzeal/gorequest/blob/b0604454e3c35c21d4c86e4771dc1e24c896cdd3/gorequest.go#L99-L130
146,908
parnurzeal/gorequest
gorequest.go
copyRetryable
func copyRetryable(old superAgentRetryable) superAgentRetryable { newRetryable := old newRetryable.RetryableStatus = make([]int, len(old.RetryableStatus)) for i := range old.RetryableStatus { newRetryable.RetryableStatus[i] = old.RetryableStatus[i] } return newRetryable }
go
func copyRetryable(old superAgentRetryable) superAgentRetryable { newRetryable := old newRetryable.RetryableStatus = make([]int, len(old.RetryableStatus)) for i := range old.RetryableStatus { newRetryable.RetryableStatus[i] = old.RetryableStatus[i] } return newRetryable }
[ "func", "copyRetryable", "(", "old", "superAgentRetryable", ")", "superAgentRetryable", "{", "newRetryable", ":=", "old", "\n", "newRetryable", ".", "RetryableStatus", "=", "make", "(", "[", "]", "int", ",", "len", "(", "old", ".", "RetryableStatus", ")", ")",...
// just need to change the array pointer?
[ "just", "need", "to", "change", "the", "array", "pointer?" ]
b0604454e3c35c21d4c86e4771dc1e24c896cdd3
https://github.com/parnurzeal/gorequest/blob/b0604454e3c35c21d4c86e4771dc1e24c896cdd3/gorequest.go#L194-L201
146,909
parnurzeal/gorequest
gorequest.go
SetCurlCommand
func (s *SuperAgent) SetCurlCommand(enable bool) *SuperAgent { s.CurlCommand = enable return s }
go
func (s *SuperAgent) SetCurlCommand(enable bool) *SuperAgent { s.CurlCommand = enable return s }
[ "func", "(", "s", "*", "SuperAgent", ")", "SetCurlCommand", "(", "enable", "bool", ")", "*", "SuperAgent", "{", "s", ".", "CurlCommand", "=", "enable", "\n", "return", "s", "\n", "}" ]
// Enable the curlcommand mode which display a CURL command line
[ "Enable", "the", "curlcommand", "mode", "which", "display", "a", "CURL", "command", "line" ]
b0604454e3c35c21d4c86e4771dc1e24c896cdd3
https://github.com/parnurzeal/gorequest/blob/b0604454e3c35c21d4c86e4771dc1e24c896cdd3/gorequest.go#L248-L251
146,910
parnurzeal/gorequest
gorequest.go
SetDoNotClearSuperAgent
func (s *SuperAgent) SetDoNotClearSuperAgent(enable bool) *SuperAgent { s.DoNotClearSuperAgent = enable return s }
go
func (s *SuperAgent) SetDoNotClearSuperAgent(enable bool) *SuperAgent { s.DoNotClearSuperAgent = enable return s }
[ "func", "(", "s", "*", "SuperAgent", ")", "SetDoNotClearSuperAgent", "(", "enable", "bool", ")", "*", "SuperAgent", "{", "s", ".", "DoNotClearSuperAgent", "=", "enable", "\n", "return", "s", "\n", "}" ]
// Enable the DoNotClear mode for not clearing super agent and reuse for the next request
[ "Enable", "the", "DoNotClear", "mode", "for", "not", "clearing", "super", "agent", "and", "reuse", "for", "the", "next", "request" ]
b0604454e3c35c21d4c86e4771dc1e24c896cdd3
https://github.com/parnurzeal/gorequest/blob/b0604454e3c35c21d4c86e4771dc1e24c896cdd3/gorequest.go#L254-L257
146,911
parnurzeal/gorequest
gorequest.go
ClearSuperAgent
func (s *SuperAgent) ClearSuperAgent() { if s.DoNotClearSuperAgent { return } s.Url = "" s.Method = "" s.Header = http.Header{} s.Data = make(map[string]interface{}) s.SliceData = []interface{}{} s.FormData = url.Values{} s.QueryData = url.Values{} s.FileData = make([]File, 0) s.BounceToRawString = false ...
go
func (s *SuperAgent) ClearSuperAgent() { if s.DoNotClearSuperAgent { return } s.Url = "" s.Method = "" s.Header = http.Header{} s.Data = make(map[string]interface{}) s.SliceData = []interface{}{} s.FormData = url.Values{} s.QueryData = url.Values{} s.FileData = make([]File, 0) s.BounceToRawString = false ...
[ "func", "(", "s", "*", "SuperAgent", ")", "ClearSuperAgent", "(", ")", "{", "if", "s", ".", "DoNotClearSuperAgent", "{", "return", "\n", "}", "\n", "s", ".", "Url", "=", "\"", "\"", "\n", "s", ".", "Method", "=", "\"", "\"", "\n", "s", ".", "Head...
// Clear SuperAgent data for another new request.
[ "Clear", "SuperAgent", "data", "for", "another", "new", "request", "." ]
b0604454e3c35c21d4c86e4771dc1e24c896cdd3
https://github.com/parnurzeal/gorequest/blob/b0604454e3c35c21d4c86e4771dc1e24c896cdd3/gorequest.go#L265-L283
146,912
parnurzeal/gorequest
gorequest.go
CustomMethod
func (s *SuperAgent) CustomMethod(method, targetUrl string) *SuperAgent { switch method { case POST: return s.Post(targetUrl) case GET: return s.Get(targetUrl) case HEAD: return s.Head(targetUrl) case PUT: return s.Put(targetUrl) case DELETE: return s.Delete(targetUrl) case PATCH: return s.Patch(targ...
go
func (s *SuperAgent) CustomMethod(method, targetUrl string) *SuperAgent { switch method { case POST: return s.Post(targetUrl) case GET: return s.Get(targetUrl) case HEAD: return s.Head(targetUrl) case PUT: return s.Put(targetUrl) case DELETE: return s.Delete(targetUrl) case PATCH: return s.Patch(targ...
[ "func", "(", "s", "*", "SuperAgent", ")", "CustomMethod", "(", "method", ",", "targetUrl", "string", ")", "*", "SuperAgent", "{", "switch", "method", "{", "case", "POST", ":", "return", "s", ".", "Post", "(", "targetUrl", ")", "\n", "case", "GET", ":",...
// Just a wrapper to initialize SuperAgent instance by method string
[ "Just", "a", "wrapper", "to", "initialize", "SuperAgent", "instance", "by", "method", "string" ]
b0604454e3c35c21d4c86e4771dc1e24c896cdd3
https://github.com/parnurzeal/gorequest/blob/b0604454e3c35c21d4c86e4771dc1e24c896cdd3/gorequest.go#L286-L309
146,913
parnurzeal/gorequest
gorequest.go
RedirectPolicy
func (s *SuperAgent) RedirectPolicy(policy func(req Request, via []Request) error) *SuperAgent { s.safeModifyHttpClient() s.Client.CheckRedirect = func(r *http.Request, v []*http.Request) error { vv := make([]Request, len(v)) for i, r := range v { vv[i] = Request(r) } return policy(Request(r), vv) } retu...
go
func (s *SuperAgent) RedirectPolicy(policy func(req Request, via []Request) error) *SuperAgent { s.safeModifyHttpClient() s.Client.CheckRedirect = func(r *http.Request, v []*http.Request) error { vv := make([]Request, len(v)) for i, r := range v { vv[i] = Request(r) } return policy(Request(r), vv) } retu...
[ "func", "(", "s", "*", "SuperAgent", ")", "RedirectPolicy", "(", "policy", "func", "(", "req", "Request", ",", "via", "[", "]", "Request", ")", "error", ")", "*", "SuperAgent", "{", "s", ".", "safeModifyHttpClient", "(", ")", "\n", "s", ".", "Client", ...
// RedirectPolicy accepts a function to define how to handle redirects. If the // policy function returns an error, the next Request is not made and the previous // request is returned. // // The policy function's arguments are the Request about to be made and the // past requests in order of oldest first.
[ "RedirectPolicy", "accepts", "a", "function", "to", "define", "how", "to", "handle", "redirects", ".", "If", "the", "policy", "function", "returns", "an", "error", "the", "next", "Request", "is", "not", "made", "and", "the", "previous", "request", "is", "ret...
b0604454e3c35c21d4c86e4771dc1e24c896cdd3
https://github.com/parnurzeal/gorequest/blob/b0604454e3c35c21d4c86e4771dc1e24c896cdd3/gorequest.go#L649-L659
146,914
parnurzeal/gorequest
gorequest.go
EndStruct
func (s *SuperAgent) EndStruct(v interface{}, callback ...func(response Response, v interface{}, body []byte, errs []error)) (Response, []byte, []error) { resp, body, errs := s.EndBytes() if errs != nil { return nil, body, errs } err := json.Unmarshal(body, &v) if err != nil { s.Errors = append(s.Errors, err) ...
go
func (s *SuperAgent) EndStruct(v interface{}, callback ...func(response Response, v interface{}, body []byte, errs []error)) (Response, []byte, []error) { resp, body, errs := s.EndBytes() if errs != nil { return nil, body, errs } err := json.Unmarshal(body, &v) if err != nil { s.Errors = append(s.Errors, err) ...
[ "func", "(", "s", "*", "SuperAgent", ")", "EndStruct", "(", "v", "interface", "{", "}", ",", "callback", "...", "func", "(", "response", "Response", ",", "v", "interface", "{", "}", ",", "body", "[", "]", "byte", ",", "errs", "[", "]", "error", ")"...
// EndStruct should be used when you want the body as a struct. The callbacks work the same way as with `End`, except that a struct is used instead of a string.
[ "EndStruct", "should", "be", "used", "when", "you", "want", "the", "body", "as", "a", "struct", ".", "The", "callbacks", "work", "the", "same", "way", "as", "with", "End", "except", "that", "a", "struct", "is", "used", "instead", "of", "a", "string", "...
b0604454e3c35c21d4c86e4771dc1e24c896cdd3
https://github.com/parnurzeal/gorequest/blob/b0604454e3c35c21d4c86e4771dc1e24c896cdd3/gorequest.go#L1124-L1139
146,915
parnurzeal/gorequest
gorequest.go
AsCurlCommand
func (s *SuperAgent) AsCurlCommand() (string, error) { req, err := s.MakeRequest() if err != nil { return "", err } cmd, err := http2curl.GetCurlCommand(req) if err != nil { return "", err } return cmd.String(), nil }
go
func (s *SuperAgent) AsCurlCommand() (string, error) { req, err := s.MakeRequest() if err != nil { return "", err } cmd, err := http2curl.GetCurlCommand(req) if err != nil { return "", err } return cmd.String(), nil }
[ "func", "(", "s", "*", "SuperAgent", ")", "AsCurlCommand", "(", ")", "(", "string", ",", "error", ")", "{", "req", ",", "err", ":=", "s", ".", "MakeRequest", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return", "\"", "\"", ",", "err", "\n", ...
// AsCurlCommand returns a string representing the runnable `curl' command // version of the request.
[ "AsCurlCommand", "returns", "a", "string", "representing", "the", "runnable", "curl", "command", "version", "of", "the", "request", "." ]
b0604454e3c35c21d4c86e4771dc1e24c896cdd3
https://github.com/parnurzeal/gorequest/blob/b0604454e3c35c21d4c86e4771dc1e24c896cdd3/gorequest.go#L1405-L1415
146,916
yuin/gopher-lua
table.go
Len
func (tb *LTable) Len() int { if tb.array == nil { return 0 } var prev LValue = LNil for i := len(tb.array) - 1; i >= 0; i-- { v := tb.array[i] if prev == LNil && v != LNil { return i + 1 } prev = v } return 0 }
go
func (tb *LTable) Len() int { if tb.array == nil { return 0 } var prev LValue = LNil for i := len(tb.array) - 1; i >= 0; i-- { v := tb.array[i] if prev == LNil && v != LNil { return i + 1 } prev = v } return 0 }
[ "func", "(", "tb", "*", "LTable", ")", "Len", "(", ")", "int", "{", "if", "tb", ".", "array", "==", "nil", "{", "return", "0", "\n", "}", "\n", "var", "prev", "LValue", "=", "LNil", "\n", "for", "i", ":=", "len", "(", "tb", ".", "array", ")",...
// Len returns length of this LTable.
[ "Len", "returns", "length", "of", "this", "LTable", "." ]
8bfc7677f583b35a5663a9dd934c08f3b5774bbb
https://github.com/yuin/gopher-lua/blob/8bfc7677f583b35a5663a9dd934c08f3b5774bbb/table.go#L50-L63
146,917
yuin/gopher-lua
table.go
Append
func (tb *LTable) Append(value LValue) { if value == LNil { return } if tb.array == nil { tb.array = make([]LValue, 0, defaultArrayCap) } tb.array = append(tb.array, value) }
go
func (tb *LTable) Append(value LValue) { if value == LNil { return } if tb.array == nil { tb.array = make([]LValue, 0, defaultArrayCap) } tb.array = append(tb.array, value) }
[ "func", "(", "tb", "*", "LTable", ")", "Append", "(", "value", "LValue", ")", "{", "if", "value", "==", "LNil", "{", "return", "\n", "}", "\n", "if", "tb", ".", "array", "==", "nil", "{", "tb", ".", "array", "=", "make", "(", "[", "]", "LValue"...
// Append appends a given LValue to this LTable.
[ "Append", "appends", "a", "given", "LValue", "to", "this", "LTable", "." ]
8bfc7677f583b35a5663a9dd934c08f3b5774bbb
https://github.com/yuin/gopher-lua/blob/8bfc7677f583b35a5663a9dd934c08f3b5774bbb/table.go#L66-L74
146,918
yuin/gopher-lua
table.go
Insert
func (tb *LTable) Insert(i int, value LValue) { if tb.array == nil { tb.array = make([]LValue, 0, defaultArrayCap) } if i > len(tb.array) { tb.RawSetInt(i, value) return } if i <= 0 { tb.RawSet(LNumber(i), value) return } i -= 1 tb.array = append(tb.array, LNil) copy(tb.array[i+1:], tb.array[i:]) tb...
go
func (tb *LTable) Insert(i int, value LValue) { if tb.array == nil { tb.array = make([]LValue, 0, defaultArrayCap) } if i > len(tb.array) { tb.RawSetInt(i, value) return } if i <= 0 { tb.RawSet(LNumber(i), value) return } i -= 1 tb.array = append(tb.array, LNil) copy(tb.array[i+1:], tb.array[i:]) tb...
[ "func", "(", "tb", "*", "LTable", ")", "Insert", "(", "i", "int", ",", "value", "LValue", ")", "{", "if", "tb", ".", "array", "==", "nil", "{", "tb", ".", "array", "=", "make", "(", "[", "]", "LValue", ",", "0", ",", "defaultArrayCap", ")", "\n...
// Insert inserts a given LValue at position `i` in this table.
[ "Insert", "inserts", "a", "given", "LValue", "at", "position", "i", "in", "this", "table", "." ]
8bfc7677f583b35a5663a9dd934c08f3b5774bbb
https://github.com/yuin/gopher-lua/blob/8bfc7677f583b35a5663a9dd934c08f3b5774bbb/table.go#L77-L93
146,919
yuin/gopher-lua
table.go
MaxN
func (tb *LTable) MaxN() int { if tb.array == nil { return 0 } for i := len(tb.array) - 1; i >= 0; i-- { if tb.array[i] != LNil { return i + 1 } } return 0 }
go
func (tb *LTable) MaxN() int { if tb.array == nil { return 0 } for i := len(tb.array) - 1; i >= 0; i-- { if tb.array[i] != LNil { return i + 1 } } return 0 }
[ "func", "(", "tb", "*", "LTable", ")", "MaxN", "(", ")", "int", "{", "if", "tb", ".", "array", "==", "nil", "{", "return", "0", "\n", "}", "\n", "for", "i", ":=", "len", "(", "tb", ".", "array", ")", "-", "1", ";", "i", ">=", "0", ";", "i...
// MaxN returns a maximum number key that nil value does not exist before it.
[ "MaxN", "returns", "a", "maximum", "number", "key", "that", "nil", "value", "does", "not", "exist", "before", "it", "." ]
8bfc7677f583b35a5663a9dd934c08f3b5774bbb
https://github.com/yuin/gopher-lua/blob/8bfc7677f583b35a5663a9dd934c08f3b5774bbb/table.go#L96-L106
146,920
yuin/gopher-lua
table.go
Remove
func (tb *LTable) Remove(pos int) LValue { if tb.array == nil { return LNil } larray := len(tb.array) if larray == 0 { return LNil } i := pos - 1 oldval := LNil switch { case i >= larray: // nothing to do case i == larray-1 || i < 0: oldval = tb.array[larray-1] tb.array = tb.array[:larray-1] defaul...
go
func (tb *LTable) Remove(pos int) LValue { if tb.array == nil { return LNil } larray := len(tb.array) if larray == 0 { return LNil } i := pos - 1 oldval := LNil switch { case i >= larray: // nothing to do case i == larray-1 || i < 0: oldval = tb.array[larray-1] tb.array = tb.array[:larray-1] defaul...
[ "func", "(", "tb", "*", "LTable", ")", "Remove", "(", "pos", "int", ")", "LValue", "{", "if", "tb", ".", "array", "==", "nil", "{", "return", "LNil", "\n", "}", "\n", "larray", ":=", "len", "(", "tb", ".", "array", ")", "\n", "if", "larray", "=...
// Remove removes from this table the element at a given position.
[ "Remove", "removes", "from", "this", "table", "the", "element", "at", "a", "given", "position", "." ]
8bfc7677f583b35a5663a9dd934c08f3b5774bbb
https://github.com/yuin/gopher-lua/blob/8bfc7677f583b35a5663a9dd934c08f3b5774bbb/table.go#L109-L132
146,921
yuin/gopher-lua
table.go
ForEach
func (tb *LTable) ForEach(cb func(LValue, LValue)) { if tb.array != nil { for i, v := range tb.array { if v != LNil { cb(LNumber(i+1), v) } } } if tb.strdict != nil { for k, v := range tb.strdict { if v != LNil { cb(LString(k), v) } } } if tb.dict != nil { for k, v := range tb.dict { ...
go
func (tb *LTable) ForEach(cb func(LValue, LValue)) { if tb.array != nil { for i, v := range tb.array { if v != LNil { cb(LNumber(i+1), v) } } } if tb.strdict != nil { for k, v := range tb.strdict { if v != LNil { cb(LString(k), v) } } } if tb.dict != nil { for k, v := range tb.dict { ...
[ "func", "(", "tb", "*", "LTable", ")", "ForEach", "(", "cb", "func", "(", "LValue", ",", "LValue", ")", ")", "{", "if", "tb", ".", "array", "!=", "nil", "{", "for", "i", ",", "v", ":=", "range", "tb", ".", "array", "{", "if", "v", "!=", "LNil...
// ForEach iterates over this table of elements, yielding each in turn to a given function.
[ "ForEach", "iterates", "over", "this", "table", "of", "elements", "yielding", "each", "in", "turn", "to", "a", "given", "function", "." ]
8bfc7677f583b35a5663a9dd934c08f3b5774bbb
https://github.com/yuin/gopher-lua/blob/8bfc7677f583b35a5663a9dd934c08f3b5774bbb/table.go#L316-L338
146,922
yuin/gopher-lua
linit.go
OpenLibs
func (ls *LState) OpenLibs() { // NB: Map iteration order in Go is deliberately randomised, so must open Load/Base // prior to iterating. for _, lib := range luaLibs { ls.Push(ls.NewFunction(lib.libFunc)) ls.Push(LString(lib.libName)) ls.Call(1, 0) } }
go
func (ls *LState) OpenLibs() { // NB: Map iteration order in Go is deliberately randomised, so must open Load/Base // prior to iterating. for _, lib := range luaLibs { ls.Push(ls.NewFunction(lib.libFunc)) ls.Push(LString(lib.libName)) ls.Call(1, 0) } }
[ "func", "(", "ls", "*", "LState", ")", "OpenLibs", "(", ")", "{", "// NB: Map iteration order in Go is deliberately randomised, so must open Load/Base", "// prior to iterating.", "for", "_", ",", "lib", ":=", "range", "luaLibs", "{", "ls", ".", "Push", "(", "ls", "....
// OpenLibs loads the built-in libraries. It is equivalent to running OpenLoad, // then OpenBase, then iterating over the other OpenXXX functions in any order.
[ "OpenLibs", "loads", "the", "built", "-", "in", "libraries", ".", "It", "is", "equivalent", "to", "running", "OpenLoad", "then", "OpenBase", "then", "iterating", "over", "the", "other", "OpenXXX", "functions", "in", "any", "order", "." ]
8bfc7677f583b35a5663a9dd934c08f3b5774bbb
https://github.com/yuin/gopher-lua/blob/8bfc7677f583b35a5663a9dd934c08f3b5774bbb/linit.go#L46-L54
146,923
yuin/gopher-lua
_state.go
NewThread
func (ls *LState) NewThread() (*LState, context.CancelFunc) { thread := newLState(ls.Options) thread.G = ls.G thread.Env = ls.Env var f context.CancelFunc = nil if ls.ctx != nil { thread.mainLoop = mainLoopWithContext thread.ctx, f = context.WithCancel(ls.ctx) } return thread, f }
go
func (ls *LState) NewThread() (*LState, context.CancelFunc) { thread := newLState(ls.Options) thread.G = ls.G thread.Env = ls.Env var f context.CancelFunc = nil if ls.ctx != nil { thread.mainLoop = mainLoopWithContext thread.ctx, f = context.WithCancel(ls.ctx) } return thread, f }
[ "func", "(", "ls", "*", "LState", ")", "NewThread", "(", ")", "(", "*", "LState", ",", "context", ".", "CancelFunc", ")", "{", "thread", ":=", "newLState", "(", "ls", ".", "Options", ")", "\n", "thread", ".", "G", "=", "ls", ".", "G", "\n", "thre...
// NewThread returns a new LState that shares with the original state all global objects. // If the original state has context.Context, the new state has a new child context of the original state and this function returns its cancel function.
[ "NewThread", "returns", "a", "new", "LState", "that", "shares", "with", "the", "original", "state", "all", "global", "objects", ".", "If", "the", "original", "state", "has", "context", ".", "Context", "the", "new", "state", "has", "a", "new", "child", "con...
8bfc7677f583b35a5663a9dd934c08f3b5774bbb
https://github.com/yuin/gopher-lua/blob/8bfc7677f583b35a5663a9dd934c08f3b5774bbb/_state.go#L1121-L1131
146,924
yuin/gopher-lua
_state.go
SetContext
func (ls *LState) SetContext(ctx context.Context) { ls.mainLoop = mainLoopWithContext ls.ctx = ctx }
go
func (ls *LState) SetContext(ctx context.Context) { ls.mainLoop = mainLoopWithContext ls.ctx = ctx }
[ "func", "(", "ls", "*", "LState", ")", "SetContext", "(", "ctx", "context", ".", "Context", ")", "{", "ls", ".", "mainLoop", "=", "mainLoopWithContext", "\n", "ls", ".", "ctx", "=", "ctx", "\n", "}" ]
// SetContext set a context ctx to this LState. The provided ctx must be non-nil.
[ "SetContext", "set", "a", "context", "ctx", "to", "this", "LState", ".", "The", "provided", "ctx", "must", "be", "non", "-", "nil", "." ]
8bfc7677f583b35a5663a9dd934c08f3b5774bbb
https://github.com/yuin/gopher-lua/blob/8bfc7677f583b35a5663a9dd934c08f3b5774bbb/_state.go#L1760-L1763
146,925
yuin/gopher-lua
_state.go
RemoveContext
func (ls *LState) RemoveContext() context.Context { oldctx := ls.ctx ls.mainLoop = mainLoop ls.ctx = nil return oldctx }
go
func (ls *LState) RemoveContext() context.Context { oldctx := ls.ctx ls.mainLoop = mainLoop ls.ctx = nil return oldctx }
[ "func", "(", "ls", "*", "LState", ")", "RemoveContext", "(", ")", "context", ".", "Context", "{", "oldctx", ":=", "ls", ".", "ctx", "\n", "ls", ".", "mainLoop", "=", "mainLoop", "\n", "ls", ".", "ctx", "=", "nil", "\n", "return", "oldctx", "\n", "}...
// RemoveContext removes the context associated with this LState and returns this context.
[ "RemoveContext", "removes", "the", "context", "associated", "with", "this", "LState", "and", "returns", "this", "context", "." ]
8bfc7677f583b35a5663a9dd934c08f3b5774bbb
https://github.com/yuin/gopher-lua/blob/8bfc7677f583b35a5663a9dd934c08f3b5774bbb/_state.go#L1771-L1776
146,926
yuin/gopher-lua
_state.go
ToChannel
func (ls *LState) ToChannel(n int) chan LValue { if lv, ok := ls.Get(n).(LChannel); ok { return (chan LValue)(lv) } return nil }
go
func (ls *LState) ToChannel(n int) chan LValue { if lv, ok := ls.Get(n).(LChannel); ok { return (chan LValue)(lv) } return nil }
[ "func", "(", "ls", "*", "LState", ")", "ToChannel", "(", "n", "int", ")", "chan", "LValue", "{", "if", "lv", ",", "ok", ":=", "ls", ".", "Get", "(", "n", ")", ".", "(", "LChannel", ")", ";", "ok", "{", "return", "(", "chan", "LValue", ")", "(...
// Converts the Lua value at the given acceptable index to the chan LValue.
[ "Converts", "the", "Lua", "value", "at", "the", "given", "acceptable", "index", "to", "the", "chan", "LValue", "." ]
8bfc7677f583b35a5663a9dd934c08f3b5774bbb
https://github.com/yuin/gopher-lua/blob/8bfc7677f583b35a5663a9dd934c08f3b5774bbb/_state.go#L1779-L1784
146,927
yuin/gopher-lua
value.go
LVAsString
func LVAsString(v LValue) string { switch sn := v.(type) { case LString, LNumber: return sn.String() default: return "" } }
go
func LVAsString(v LValue) string { switch sn := v.(type) { case LString, LNumber: return sn.String() default: return "" } }
[ "func", "LVAsString", "(", "v", "LValue", ")", "string", "{", "switch", "sn", ":=", "v", ".", "(", "type", ")", "{", "case", "LString", ",", "LNumber", ":", "return", "sn", ".", "String", "(", ")", "\n", "default", ":", "return", "\"", "\"", "\n", ...
// LVAsString returns string representation of a given LValue // if the LValue is a string or number, otherwise an empty string.
[ "LVAsString", "returns", "string", "representation", "of", "a", "given", "LValue", "if", "the", "LValue", "is", "a", "string", "or", "number", "otherwise", "an", "empty", "string", "." ]
8bfc7677f583b35a5663a9dd934c08f3b5774bbb
https://github.com/yuin/gopher-lua/blob/8bfc7677f583b35a5663a9dd934c08f3b5774bbb/value.go#L48-L55
146,928
yuin/gopher-lua
value.go
LVAsNumber
func LVAsNumber(v LValue) LNumber { switch lv := v.(type) { case LNumber: return lv case LString: if num, err := parseNumber(string(lv)); err == nil { return num } } return LNumber(0) }
go
func LVAsNumber(v LValue) LNumber { switch lv := v.(type) { case LNumber: return lv case LString: if num, err := parseNumber(string(lv)); err == nil { return num } } return LNumber(0) }
[ "func", "LVAsNumber", "(", "v", "LValue", ")", "LNumber", "{", "switch", "lv", ":=", "v", ".", "(", "type", ")", "{", "case", "LNumber", ":", "return", "lv", "\n", "case", "LString", ":", "if", "num", ",", "err", ":=", "parseNumber", "(", "string", ...
// LVAsNumber tries to convert a given LValue to a number.
[ "LVAsNumber", "tries", "to", "convert", "a", "given", "LValue", "to", "a", "number", "." ]
8bfc7677f583b35a5663a9dd934c08f3b5774bbb
https://github.com/yuin/gopher-lua/blob/8bfc7677f583b35a5663a9dd934c08f3b5774bbb/value.go#L69-L79
146,929
yuin/gopher-lua
auxlib.go
PreloadModule
func (ls *LState) PreloadModule(name string, loader LGFunction) { preload := ls.GetField(ls.GetField(ls.Get(EnvironIndex), "package"), "preload") if _, ok := preload.(*LTable); !ok { ls.RaiseError("package.preload must be a table") } ls.SetField(preload, name, ls.NewFunction(loader)) }
go
func (ls *LState) PreloadModule(name string, loader LGFunction) { preload := ls.GetField(ls.GetField(ls.Get(EnvironIndex), "package"), "preload") if _, ok := preload.(*LTable); !ok { ls.RaiseError("package.preload must be a table") } ls.SetField(preload, name, ls.NewFunction(loader)) }
[ "func", "(", "ls", "*", "LState", ")", "PreloadModule", "(", "name", "string", ",", "loader", "LGFunction", ")", "{", "preload", ":=", "ls", ".", "GetField", "(", "ls", ".", "GetField", "(", "ls", ".", "Get", "(", "EnvironIndex", ")", ",", "\"", "\""...
// Set a module loader to the package.preload table.
[ "Set", "a", "module", "loader", "to", "the", "package", ".", "preload", "table", "." ]
8bfc7677f583b35a5663a9dd934c08f3b5774bbb
https://github.com/yuin/gopher-lua/blob/8bfc7677f583b35a5663a9dd934c08f3b5774bbb/auxlib.go#L425-L431
146,930
yuin/gopher-lua
auxlib.go
CheckChannel
func (ls *LState) CheckChannel(n int) chan LValue { v := ls.Get(n) if ch, ok := v.(LChannel); ok { return (chan LValue)(ch) } ls.TypeError(n, LTChannel) return nil }
go
func (ls *LState) CheckChannel(n int) chan LValue { v := ls.Get(n) if ch, ok := v.(LChannel); ok { return (chan LValue)(ch) } ls.TypeError(n, LTChannel) return nil }
[ "func", "(", "ls", "*", "LState", ")", "CheckChannel", "(", "n", "int", ")", "chan", "LValue", "{", "v", ":=", "ls", ".", "Get", "(", "n", ")", "\n", "if", "ch", ",", "ok", ":=", "v", ".", "(", "LChannel", ")", ";", "ok", "{", "return", "(", ...
// Checks whether the given index is an LChannel and returns this channel.
[ "Checks", "whether", "the", "given", "index", "is", "an", "LChannel", "and", "returns", "this", "channel", "." ]
8bfc7677f583b35a5663a9dd934c08f3b5774bbb
https://github.com/yuin/gopher-lua/blob/8bfc7677f583b35a5663a9dd934c08f3b5774bbb/auxlib.go#L434-L441
146,931
bwmarrin/snowflake
snowflake.go
NewNode
func NewNode(node int64) (*Node, error) { // re-calc in case custom NodeBits or StepBits were set // DEPRECATED: the below block will be removed in a future release. mu.Lock() nodeMax = -1 ^ (-1 << NodeBits) nodeMask = nodeMax << StepBits stepMask = -1 ^ (-1 << StepBits) timeShift = NodeBits + StepBits nodeShi...
go
func NewNode(node int64) (*Node, error) { // re-calc in case custom NodeBits or StepBits were set // DEPRECATED: the below block will be removed in a future release. mu.Lock() nodeMax = -1 ^ (-1 << NodeBits) nodeMask = nodeMax << StepBits stepMask = -1 ^ (-1 << StepBits) timeShift = NodeBits + StepBits nodeShi...
[ "func", "NewNode", "(", "node", "int64", ")", "(", "*", "Node", ",", "error", ")", "{", "// re-calc in case custom NodeBits or StepBits were set", "// DEPRECATED: the below block will be removed in a future release.", "mu", ".", "Lock", "(", ")", "\n", "nodeMax", "=", "...
// NewNode returns a new snowflake node that can be used to generate snowflake // IDs
[ "NewNode", "returns", "a", "new", "snowflake", "node", "that", "can", "be", "used", "to", "generate", "snowflake", "IDs" ]
c09e69ae59935edf6d85799e858c26de86b04cb3
https://github.com/bwmarrin/snowflake/blob/c09e69ae59935edf6d85799e858c26de86b04cb3/snowflake.go#L100-L129
146,932
bwmarrin/snowflake
snowflake.go
Generate
func (n *Node) Generate() ID { n.mu.Lock() now := time.Since(n.epoch).Nanoseconds() / 1000000 if now == n.time { n.step = (n.step + 1) & n.stepMask if n.step == 0 { for now <= n.time { now = time.Since(n.epoch).Nanoseconds() / 1000000 } } } else { n.step = 0 } n.time = now r := ID((now)<<...
go
func (n *Node) Generate() ID { n.mu.Lock() now := time.Since(n.epoch).Nanoseconds() / 1000000 if now == n.time { n.step = (n.step + 1) & n.stepMask if n.step == 0 { for now <= n.time { now = time.Since(n.epoch).Nanoseconds() / 1000000 } } } else { n.step = 0 } n.time = now r := ID((now)<<...
[ "func", "(", "n", "*", "Node", ")", "Generate", "(", ")", "ID", "{", "n", ".", "mu", ".", "Lock", "(", ")", "\n\n", "now", ":=", "time", ".", "Since", "(", "n", ".", "epoch", ")", ".", "Nanoseconds", "(", ")", "/", "1000000", "\n\n", "if", "n...
// Generate creates and returns a unique snowflake ID // To help guarantee uniqueness // - Make sure your system is keeping accurate system time // - Make sure you never have multiple nodes running with the same node ID
[ "Generate", "creates", "and", "returns", "a", "unique", "snowflake", "ID", "To", "help", "guarantee", "uniqueness", "-", "Make", "sure", "your", "system", "is", "keeping", "accurate", "system", "time", "-", "Make", "sure", "you", "never", "have", "multiple", ...
c09e69ae59935edf6d85799e858c26de86b04cb3
https://github.com/bwmarrin/snowflake/blob/c09e69ae59935edf6d85799e858c26de86b04cb3/snowflake.go#L135-L162
146,933
bwmarrin/snowflake
snowflake.go
ParseString
func ParseString(id string) (ID, error) { i, err := strconv.ParseInt(id, 10, 64) return ID(i), err }
go
func ParseString(id string) (ID, error) { i, err := strconv.ParseInt(id, 10, 64) return ID(i), err }
[ "func", "ParseString", "(", "id", "string", ")", "(", "ID", ",", "error", ")", "{", "i", ",", "err", ":=", "strconv", ".", "ParseInt", "(", "id", ",", "10", ",", "64", ")", "\n", "return", "ID", "(", "i", ")", ",", "err", "\n\n", "}" ]
// ParseString converts a string into a snowflake ID
[ "ParseString", "converts", "a", "string", "into", "a", "snowflake", "ID" ]
c09e69ae59935edf6d85799e858c26de86b04cb3
https://github.com/bwmarrin/snowflake/blob/c09e69ae59935edf6d85799e858c26de86b04cb3/snowflake.go#L180-L184
146,934
bwmarrin/snowflake
snowflake.go
Base58
func (f ID) Base58() string { if f < 58 { return string(encodeBase58Map[f]) } b := make([]byte, 0, 11) for f >= 58 { b = append(b, encodeBase58Map[f%58]) f /= 58 } b = append(b, encodeBase58Map[f]) for x, y := 0, len(b)-1; x < y; x, y = x+1, y-1 { b[x], b[y] = b[y], b[x] } return string(b) }
go
func (f ID) Base58() string { if f < 58 { return string(encodeBase58Map[f]) } b := make([]byte, 0, 11) for f >= 58 { b = append(b, encodeBase58Map[f%58]) f /= 58 } b = append(b, encodeBase58Map[f]) for x, y := 0, len(b)-1; x < y; x, y = x+1, y-1 { b[x], b[y] = b[y], b[x] } return string(b) }
[ "func", "(", "f", "ID", ")", "Base58", "(", ")", "string", "{", "if", "f", "<", "58", "{", "return", "string", "(", "encodeBase58Map", "[", "f", "]", ")", "\n", "}", "\n\n", "b", ":=", "make", "(", "[", "]", "byte", ",", "0", ",", "11", ")", ...
// Base58 returns a base58 string of the snowflake ID
[ "Base58", "returns", "a", "base58", "string", "of", "the", "snowflake", "ID" ]
c09e69ae59935edf6d85799e858c26de86b04cb3
https://github.com/bwmarrin/snowflake/blob/c09e69ae59935edf6d85799e858c26de86b04cb3/snowflake.go#L250-L268
146,935
bwmarrin/snowflake
snowflake.go
ParseBase64
func ParseBase64(id string) (ID, error) { b, err := base64.StdEncoding.DecodeString(id) if err != nil { return -1, err } return ParseBytes(b) }
go
func ParseBase64(id string) (ID, error) { b, err := base64.StdEncoding.DecodeString(id) if err != nil { return -1, err } return ParseBytes(b) }
[ "func", "ParseBase64", "(", "id", "string", ")", "(", "ID", ",", "error", ")", "{", "b", ",", "err", ":=", "base64", ".", "StdEncoding", ".", "DecodeString", "(", "id", ")", "\n", "if", "err", "!=", "nil", "{", "return", "-", "1", ",", "err", "\n...
// ParseBase64 converts a base64 string into a snowflake ID
[ "ParseBase64", "converts", "a", "base64", "string", "into", "a", "snowflake", "ID" ]
c09e69ae59935edf6d85799e858c26de86b04cb3
https://github.com/bwmarrin/snowflake/blob/c09e69ae59935edf6d85799e858c26de86b04cb3/snowflake.go#L291-L298
146,936
bwmarrin/snowflake
snowflake.go
ParseBytes
func ParseBytes(id []byte) (ID, error) { i, err := strconv.ParseInt(string(id), 10, 64) return ID(i), err }
go
func ParseBytes(id []byte) (ID, error) { i, err := strconv.ParseInt(string(id), 10, 64) return ID(i), err }
[ "func", "ParseBytes", "(", "id", "[", "]", "byte", ")", "(", "ID", ",", "error", ")", "{", "i", ",", "err", ":=", "strconv", ".", "ParseInt", "(", "string", "(", "id", ")", ",", "10", ",", "64", ")", "\n", "return", "ID", "(", "i", ")", ",", ...
// ParseBytes converts a byte slice into a snowflake ID
[ "ParseBytes", "converts", "a", "byte", "slice", "into", "a", "snowflake", "ID" ]
c09e69ae59935edf6d85799e858c26de86b04cb3
https://github.com/bwmarrin/snowflake/blob/c09e69ae59935edf6d85799e858c26de86b04cb3/snowflake.go#L306-L309
146,937
bwmarrin/snowflake
snowflake.go
IntBytes
func (f ID) IntBytes() [8]byte { var b [8]byte binary.BigEndian.PutUint64(b[:], uint64(f)) return b }
go
func (f ID) IntBytes() [8]byte { var b [8]byte binary.BigEndian.PutUint64(b[:], uint64(f)) return b }
[ "func", "(", "f", "ID", ")", "IntBytes", "(", ")", "[", "8", "]", "byte", "{", "var", "b", "[", "8", "]", "byte", "\n", "binary", ".", "BigEndian", ".", "PutUint64", "(", "b", "[", ":", "]", ",", "uint64", "(", "f", ")", ")", "\n", "return", ...
// IntBytes returns an array of bytes of the snowflake ID, encoded as a // big endian integer.
[ "IntBytes", "returns", "an", "array", "of", "bytes", "of", "the", "snowflake", "ID", "encoded", "as", "a", "big", "endian", "integer", "." ]
c09e69ae59935edf6d85799e858c26de86b04cb3
https://github.com/bwmarrin/snowflake/blob/c09e69ae59935edf6d85799e858c26de86b04cb3/snowflake.go#L313-L317
146,938
bwmarrin/snowflake
snowflake.go
ParseIntBytes
func ParseIntBytes(id [8]byte) ID { return ID(int64(binary.BigEndian.Uint64(id[:]))) }
go
func ParseIntBytes(id [8]byte) ID { return ID(int64(binary.BigEndian.Uint64(id[:]))) }
[ "func", "ParseIntBytes", "(", "id", "[", "8", "]", "byte", ")", "ID", "{", "return", "ID", "(", "int64", "(", "binary", ".", "BigEndian", ".", "Uint64", "(", "id", "[", ":", "]", ")", ")", ")", "\n", "}" ]
// ParseIntBytes converts an array of bytes encoded as big endian integer as // a snowflake ID
[ "ParseIntBytes", "converts", "an", "array", "of", "bytes", "encoded", "as", "big", "endian", "integer", "as", "a", "snowflake", "ID" ]
c09e69ae59935edf6d85799e858c26de86b04cb3
https://github.com/bwmarrin/snowflake/blob/c09e69ae59935edf6d85799e858c26de86b04cb3/snowflake.go#L321-L323
146,939
bwmarrin/snowflake
snowflake.go
MarshalJSON
func (f ID) MarshalJSON() ([]byte, error) { buff := make([]byte, 0, 22) buff = append(buff, '"') buff = strconv.AppendInt(buff, int64(f), 10) buff = append(buff, '"') return buff, nil }
go
func (f ID) MarshalJSON() ([]byte, error) { buff := make([]byte, 0, 22) buff = append(buff, '"') buff = strconv.AppendInt(buff, int64(f), 10) buff = append(buff, '"') return buff, nil }
[ "func", "(", "f", "ID", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "buff", ":=", "make", "(", "[", "]", "byte", ",", "0", ",", "22", ")", "\n", "buff", "=", "append", "(", "buff", ",", "'\"'", ")", "\n", "b...
// MarshalJSON returns a json byte array string of the snowflake ID.
[ "MarshalJSON", "returns", "a", "json", "byte", "array", "string", "of", "the", "snowflake", "ID", "." ]
c09e69ae59935edf6d85799e858c26de86b04cb3
https://github.com/bwmarrin/snowflake/blob/c09e69ae59935edf6d85799e858c26de86b04cb3/snowflake.go#L344-L350
146,940
bwmarrin/snowflake
snowflake.go
UnmarshalJSON
func (f *ID) UnmarshalJSON(b []byte) error { if len(b) < 3 || b[0] != '"' || b[len(b)-1] != '"' { return JSONSyntaxError{b} } i, err := strconv.ParseInt(string(b[1:len(b)-1]), 10, 64) if err != nil { return err } *f = ID(i) return nil }
go
func (f *ID) UnmarshalJSON(b []byte) error { if len(b) < 3 || b[0] != '"' || b[len(b)-1] != '"' { return JSONSyntaxError{b} } i, err := strconv.ParseInt(string(b[1:len(b)-1]), 10, 64) if err != nil { return err } *f = ID(i) return nil }
[ "func", "(", "f", "*", "ID", ")", "UnmarshalJSON", "(", "b", "[", "]", "byte", ")", "error", "{", "if", "len", "(", "b", ")", "<", "3", "||", "b", "[", "0", "]", "!=", "'\"'", "||", "b", "[", "len", "(", "b", ")", "-", "1", "]", "!=", "...
// UnmarshalJSON converts a json byte array of a snowflake ID into an ID type.
[ "UnmarshalJSON", "converts", "a", "json", "byte", "array", "of", "a", "snowflake", "ID", "into", "an", "ID", "type", "." ]
c09e69ae59935edf6d85799e858c26de86b04cb3
https://github.com/bwmarrin/snowflake/blob/c09e69ae59935edf6d85799e858c26de86b04cb3/snowflake.go#L353-L365
146,941
grafov/m3u8
writer.go
Append
func (p *MasterPlaylist) Append(uri string, chunklist *MediaPlaylist, params VariantParams) { v := new(Variant) v.URI = uri v.Chunklist = chunklist v.VariantParams = params p.Variants = append(p.Variants, v) if len(v.Alternatives) > 0 { // From section 7: // The EXT-X-MEDIA tag and the AUDIO, VIDEO and SUBTIT...
go
func (p *MasterPlaylist) Append(uri string, chunklist *MediaPlaylist, params VariantParams) { v := new(Variant) v.URI = uri v.Chunklist = chunklist v.VariantParams = params p.Variants = append(p.Variants, v) if len(v.Alternatives) > 0 { // From section 7: // The EXT-X-MEDIA tag and the AUDIO, VIDEO and SUBTIT...
[ "func", "(", "p", "*", "MasterPlaylist", ")", "Append", "(", "uri", "string", ",", "chunklist", "*", "MediaPlaylist", ",", "params", "VariantParams", ")", "{", "v", ":=", "new", "(", "Variant", ")", "\n", "v", ".", "URI", "=", "uri", "\n", "v", ".", ...
// Append variant to master playlist. // This operation does reset playlist cache.
[ "Append", "variant", "to", "master", "playlist", ".", "This", "operation", "does", "reset", "playlist", "cache", "." ]
1d88be54fa785021109edc0bd1a65518cec073a9
https://github.com/grafov/m3u8/blob/1d88be54fa785021109edc0bd1a65518cec073a9/writer.go#L49-L66
146,942
grafov/m3u8
writer.go
Encode
func (p *MasterPlaylist) Encode() *bytes.Buffer { if p.buf.Len() > 0 { return &p.buf } p.buf.WriteString("#EXTM3U\n#EXT-X-VERSION:") p.buf.WriteString(strver(p.ver)) p.buf.WriteRune('\n') if p.IndependentSegments() { p.buf.WriteString("#EXT-X-INDEPENDENT-SEGMENTS\n") } var altsWritten map[string]bool = m...
go
func (p *MasterPlaylist) Encode() *bytes.Buffer { if p.buf.Len() > 0 { return &p.buf } p.buf.WriteString("#EXTM3U\n#EXT-X-VERSION:") p.buf.WriteString(strver(p.ver)) p.buf.WriteRune('\n') if p.IndependentSegments() { p.buf.WriteString("#EXT-X-INDEPENDENT-SEGMENTS\n") } var altsWritten map[string]bool = m...
[ "func", "(", "p", "*", "MasterPlaylist", ")", "Encode", "(", ")", "*", "bytes", ".", "Buffer", "{", "if", "p", ".", "buf", ".", "Len", "(", ")", ">", "0", "{", "return", "&", "p", ".", "buf", "\n", "}", "\n\n", "p", ".", "buf", ".", "WriteStr...
// Generate output in M3U8 format.
[ "Generate", "output", "in", "M3U8", "format", "." ]
1d88be54fa785021109edc0bd1a65518cec073a9
https://github.com/grafov/m3u8/blob/1d88be54fa785021109edc0bd1a65518cec073a9/writer.go#L73-L243
146,943
grafov/m3u8
writer.go
NewMediaPlaylist
func NewMediaPlaylist(winsize uint, capacity uint) (*MediaPlaylist, error) { p := new(MediaPlaylist) p.ver = minver p.capacity = capacity if err := p.SetWinSize(winsize); err != nil { return nil, err } p.Segments = make([]*MediaSegment, capacity) return p, nil }
go
func NewMediaPlaylist(winsize uint, capacity uint) (*MediaPlaylist, error) { p := new(MediaPlaylist) p.ver = minver p.capacity = capacity if err := p.SetWinSize(winsize); err != nil { return nil, err } p.Segments = make([]*MediaSegment, capacity) return p, nil }
[ "func", "NewMediaPlaylist", "(", "winsize", "uint", ",", "capacity", "uint", ")", "(", "*", "MediaPlaylist", ",", "error", ")", "{", "p", ":=", "new", "(", "MediaPlaylist", ")", "\n", "p", ".", "ver", "=", "minver", "\n", "p", ".", "capacity", "=", "...
// Creates new media playlist structure. // Winsize defines how much items will displayed on playlist generation. // Capacity is total size of a playlist.
[ "Creates", "new", "media", "playlist", "structure", ".", "Winsize", "defines", "how", "much", "items", "will", "displayed", "on", "playlist", "generation", ".", "Capacity", "is", "total", "size", "of", "a", "playlist", "." ]
1d88be54fa785021109edc0bd1a65518cec073a9
https://github.com/grafov/m3u8/blob/1d88be54fa785021109edc0bd1a65518cec073a9/writer.go#L278-L287
146,944
grafov/m3u8
writer.go
last
func (p *MediaPlaylist) last() uint { if p.tail == 0 { return p.capacity - 1 } return p.tail - 1 }
go
func (p *MediaPlaylist) last() uint { if p.tail == 0 { return p.capacity - 1 } return p.tail - 1 }
[ "func", "(", "p", "*", "MediaPlaylist", ")", "last", "(", ")", "uint", "{", "if", "p", ".", "tail", "==", "0", "{", "return", "p", ".", "capacity", "-", "1", "\n", "}", "\n", "return", "p", ".", "tail", "-", "1", "\n", "}" ]
// last returns the previously written segment's index
[ "last", "returns", "the", "previously", "written", "segment", "s", "index" ]
1d88be54fa785021109edc0bd1a65518cec073a9
https://github.com/grafov/m3u8/blob/1d88be54fa785021109edc0bd1a65518cec073a9/writer.go#L290-L295
146,945
grafov/m3u8
writer.go
Remove
func (p *MediaPlaylist) Remove() (err error) { if p.count == 0 { return errors.New("playlist is empty") } p.head = (p.head + 1) % p.capacity p.count-- if !p.Closed { p.SeqNo++ } p.buf.Reset() return nil }
go
func (p *MediaPlaylist) Remove() (err error) { if p.count == 0 { return errors.New("playlist is empty") } p.head = (p.head + 1) % p.capacity p.count-- if !p.Closed { p.SeqNo++ } p.buf.Reset() return nil }
[ "func", "(", "p", "*", "MediaPlaylist", ")", "Remove", "(", ")", "(", "err", "error", ")", "{", "if", "p", ".", "count", "==", "0", "{", "return", "errors", ".", "New", "(", "\"", "\"", ")", "\n", "}", "\n", "p", ".", "head", "=", "(", "p", ...
// Remove current segment from the head of chunk slice form a media playlist. Useful for sliding playlists. // This operation does reset playlist cache.
[ "Remove", "current", "segment", "from", "the", "head", "of", "chunk", "slice", "form", "a", "media", "playlist", ".", "Useful", "for", "sliding", "playlists", ".", "This", "operation", "does", "reset", "playlist", "cache", "." ]
1d88be54fa785021109edc0bd1a65518cec073a9
https://github.com/grafov/m3u8/blob/1d88be54fa785021109edc0bd1a65518cec073a9/writer.go#L299-L310
146,946
grafov/m3u8
writer.go
Append
func (p *MediaPlaylist) Append(uri string, duration float64, title string) error { seg := new(MediaSegment) seg.URI = uri seg.Duration = duration seg.Title = title return p.AppendSegment(seg) }
go
func (p *MediaPlaylist) Append(uri string, duration float64, title string) error { seg := new(MediaSegment) seg.URI = uri seg.Duration = duration seg.Title = title return p.AppendSegment(seg) }
[ "func", "(", "p", "*", "MediaPlaylist", ")", "Append", "(", "uri", "string", ",", "duration", "float64", ",", "title", "string", ")", "error", "{", "seg", ":=", "new", "(", "MediaSegment", ")", "\n", "seg", ".", "URI", "=", "uri", "\n", "seg", ".", ...
// Append general chunk to the tail of chunk slice for a media playlist. // This operation does reset playlist cache.
[ "Append", "general", "chunk", "to", "the", "tail", "of", "chunk", "slice", "for", "a", "media", "playlist", ".", "This", "operation", "does", "reset", "playlist", "cache", "." ]
1d88be54fa785021109edc0bd1a65518cec073a9
https://github.com/grafov/m3u8/blob/1d88be54fa785021109edc0bd1a65518cec073a9/writer.go#L314-L320
146,947
grafov/m3u8
writer.go
AppendSegment
func (p *MediaPlaylist) AppendSegment(seg *MediaSegment) error { if p.head == p.tail && p.count > 0 { return ErrPlaylistFull } seg.SeqId = p.SeqNo if p.count > 0 { seg.SeqId = p.Segments[(p.capacity+p.tail-1)%p.capacity].SeqId + 1 } p.Segments[p.tail] = seg p.tail = (p.tail + 1) % p.capacity p.count++ if p...
go
func (p *MediaPlaylist) AppendSegment(seg *MediaSegment) error { if p.head == p.tail && p.count > 0 { return ErrPlaylistFull } seg.SeqId = p.SeqNo if p.count > 0 { seg.SeqId = p.Segments[(p.capacity+p.tail-1)%p.capacity].SeqId + 1 } p.Segments[p.tail] = seg p.tail = (p.tail + 1) % p.capacity p.count++ if p...
[ "func", "(", "p", "*", "MediaPlaylist", ")", "AppendSegment", "(", "seg", "*", "MediaSegment", ")", "error", "{", "if", "p", ".", "head", "==", "p", ".", "tail", "&&", "p", ".", "count", ">", "0", "{", "return", "ErrPlaylistFull", "\n", "}", "\n", ...
// AppendSegment appends a MediaSegment to the tail of chunk slice for a media playlist. // This operation does reset playlist cache.
[ "AppendSegment", "appends", "a", "MediaSegment", "to", "the", "tail", "of", "chunk", "slice", "for", "a", "media", "playlist", ".", "This", "operation", "does", "reset", "playlist", "cache", "." ]
1d88be54fa785021109edc0bd1a65518cec073a9
https://github.com/grafov/m3u8/blob/1d88be54fa785021109edc0bd1a65518cec073a9/writer.go#L324-L340
146,948
grafov/m3u8
writer.go
DurationAsInt
func (p *MediaPlaylist) DurationAsInt(yes bool) { if yes { // duration must be integers if protocol version is less than 3 version(&p.ver, 3) } p.durationAsInt = yes }
go
func (p *MediaPlaylist) DurationAsInt(yes bool) { if yes { // duration must be integers if protocol version is less than 3 version(&p.ver, 3) } p.durationAsInt = yes }
[ "func", "(", "p", "*", "MediaPlaylist", ")", "DurationAsInt", "(", "yes", "bool", ")", "{", "if", "yes", "{", "// duration must be integers if protocol version is less than 3", "version", "(", "&", "p", ".", "ver", ",", "3", ")", "\n", "}", "\n", "p", ".", ...
// TargetDuration will be int on Encode
[ "TargetDuration", "will", "be", "int", "on", "Encode" ]
1d88be54fa785021109edc0bd1a65518cec073a9
https://github.com/grafov/m3u8/blob/1d88be54fa785021109edc0bd1a65518cec073a9/writer.go#L655-L661
146,949
grafov/m3u8
writer.go
Close
func (p *MediaPlaylist) Close() { if p.buf.Len() > 0 { p.buf.WriteString("#EXT-X-ENDLIST\n") } p.Closed = true }
go
func (p *MediaPlaylist) Close() { if p.buf.Len() > 0 { p.buf.WriteString("#EXT-X-ENDLIST\n") } p.Closed = true }
[ "func", "(", "p", "*", "MediaPlaylist", ")", "Close", "(", ")", "{", "if", "p", ".", "buf", ".", "Len", "(", ")", ">", "0", "{", "p", ".", "buf", ".", "WriteString", "(", "\"", "\\n", "\"", ")", "\n", "}", "\n", "p", ".", "Closed", "=", "tr...
// Close sliding playlist and make them fixed.
[ "Close", "sliding", "playlist", "and", "make", "them", "fixed", "." ]
1d88be54fa785021109edc0bd1a65518cec073a9
https://github.com/grafov/m3u8/blob/1d88be54fa785021109edc0bd1a65518cec073a9/writer.go#L669-L674
146,950
grafov/m3u8
writer.go
SetSCTE35
func (p *MediaPlaylist) SetSCTE35(scte35 *SCTE) error { if p.count == 0 { return errors.New("playlist is empty") } p.Segments[p.last()].SCTE = scte35 return nil }
go
func (p *MediaPlaylist) SetSCTE35(scte35 *SCTE) error { if p.count == 0 { return errors.New("playlist is empty") } p.Segments[p.last()].SCTE = scte35 return nil }
[ "func", "(", "p", "*", "MediaPlaylist", ")", "SetSCTE35", "(", "scte35", "*", "SCTE", ")", "error", "{", "if", "p", ".", "count", "==", "0", "{", "return", "errors", ".", "New", "(", "\"", "\"", ")", "\n", "}", "\n", "p", ".", "Segments", "[", ...
// SetSCTE35 sets the SCTE cue format for the current media segment
[ "SetSCTE35", "sets", "the", "SCTE", "cue", "format", "for", "the", "current", "media", "segment" ]
1d88be54fa785021109edc0bd1a65518cec073a9
https://github.com/grafov/m3u8/blob/1d88be54fa785021109edc0bd1a65518cec073a9/writer.go#L751-L757
146,951
grafov/m3u8
writer.go
SetWinSize
func (p *MediaPlaylist) SetWinSize(winsize uint) error { if winsize > p.capacity { return errors.New("capacity must be greater than winsize or equal") } p.winsize = winsize return nil }
go
func (p *MediaPlaylist) SetWinSize(winsize uint) error { if winsize > p.capacity { return errors.New("capacity must be greater than winsize or equal") } p.winsize = winsize return nil }
[ "func", "(", "p", "*", "MediaPlaylist", ")", "SetWinSize", "(", "winsize", "uint", ")", "error", "{", "if", "winsize", ">", "p", ".", "capacity", "{", "return", "errors", ".", "New", "(", "\"", "\"", ")", "\n", "}", "\n", "p", ".", "winsize", "=", ...
// SetWinSize overwrites the playlist's window size.
[ "SetWinSize", "overwrites", "the", "playlist", "s", "window", "size", "." ]
1d88be54fa785021109edc0bd1a65518cec073a9
https://github.com/grafov/m3u8/blob/1d88be54fa785021109edc0bd1a65518cec073a9/writer.go#L801-L807
146,952
grafov/m3u8
reader.go
Decode
func (p *MasterPlaylist) Decode(data bytes.Buffer, strict bool) error { return p.decode(&data, strict) }
go
func (p *MasterPlaylist) Decode(data bytes.Buffer, strict bool) error { return p.decode(&data, strict) }
[ "func", "(", "p", "*", "MasterPlaylist", ")", "Decode", "(", "data", "bytes", ".", "Buffer", ",", "strict", "bool", ")", "error", "{", "return", "p", ".", "decode", "(", "&", "data", ",", "strict", ")", "\n", "}" ]
// Decode parses a master playlist passed from the buffer. If `strict` // parameter is true then it returns first syntax error.
[ "Decode", "parses", "a", "master", "playlist", "passed", "from", "the", "buffer", ".", "If", "strict", "parameter", "is", "true", "then", "it", "returns", "first", "syntax", "error", "." ]
1d88be54fa785021109edc0bd1a65518cec073a9
https://github.com/grafov/m3u8/blob/1d88be54fa785021109edc0bd1a65518cec073a9/reader.go#L35-L37
146,953
grafov/m3u8
reader.go
decode
func (p *MasterPlaylist) decode(buf *bytes.Buffer, strict bool) error { var eof bool state := new(decodingState) for !eof { line, err := buf.ReadString('\n') if err == io.EOF { eof = true } else if err != nil { break } err = decodeLineOfMasterPlaylist(p, state, line, strict) if strict && err != n...
go
func (p *MasterPlaylist) decode(buf *bytes.Buffer, strict bool) error { var eof bool state := new(decodingState) for !eof { line, err := buf.ReadString('\n') if err == io.EOF { eof = true } else if err != nil { break } err = decodeLineOfMasterPlaylist(p, state, line, strict) if strict && err != n...
[ "func", "(", "p", "*", "MasterPlaylist", ")", "decode", "(", "buf", "*", "bytes", ".", "Buffer", ",", "strict", "bool", ")", "error", "{", "var", "eof", "bool", "\n\n", "state", ":=", "new", "(", "decodingState", ")", "\n\n", "for", "!", "eof", "{", ...
// Parse master playlist. Internal function.
[ "Parse", "master", "playlist", ".", "Internal", "function", "." ]
1d88be54fa785021109edc0bd1a65518cec073a9
https://github.com/grafov/m3u8/blob/1d88be54fa785021109edc0bd1a65518cec073a9/reader.go#L52-L73
146,954
grafov/m3u8
reader.go
Decode
func Decode(data bytes.Buffer, strict bool) (Playlist, ListType, error) { return decode(&data, strict) }
go
func Decode(data bytes.Buffer, strict bool) (Playlist, ListType, error) { return decode(&data, strict) }
[ "func", "Decode", "(", "data", "bytes", ".", "Buffer", ",", "strict", "bool", ")", "(", "Playlist", ",", "ListType", ",", "error", ")", "{", "return", "decode", "(", "&", "data", ",", "strict", ")", "\n", "}" ]
// Decode detects type of playlist and decodes it. It accepts bytes // buffer as input.
[ "Decode", "detects", "type", "of", "playlist", "and", "decodes", "it", ".", "It", "accepts", "bytes", "buffer", "as", "input", "." ]
1d88be54fa785021109edc0bd1a65518cec073a9
https://github.com/grafov/m3u8/blob/1d88be54fa785021109edc0bd1a65518cec073a9/reader.go#L125-L127
146,955
grafov/m3u8
reader.go
DecodeFrom
func DecodeFrom(reader io.Reader, strict bool) (Playlist, ListType, error) { buf := new(bytes.Buffer) _, err := buf.ReadFrom(reader) if err != nil { return nil, 0, err } return decode(buf, strict) }
go
func DecodeFrom(reader io.Reader, strict bool) (Playlist, ListType, error) { buf := new(bytes.Buffer) _, err := buf.ReadFrom(reader) if err != nil { return nil, 0, err } return decode(buf, strict) }
[ "func", "DecodeFrom", "(", "reader", "io", ".", "Reader", ",", "strict", "bool", ")", "(", "Playlist", ",", "ListType", ",", "error", ")", "{", "buf", ":=", "new", "(", "bytes", ".", "Buffer", ")", "\n", "_", ",", "err", ":=", "buf", ".", "ReadFrom...
// DecodeFrom detects type of playlist and decodes it. It accepts data // conformed with io.Reader.
[ "DecodeFrom", "detects", "type", "of", "playlist", "and", "decodes", "it", ".", "It", "accepts", "data", "conformed", "with", "io", ".", "Reader", "." ]
1d88be54fa785021109edc0bd1a65518cec073a9
https://github.com/grafov/m3u8/blob/1d88be54fa785021109edc0bd1a65518cec073a9/reader.go#L131-L138
146,956
grafov/m3u8
reader.go
decode
func decode(buf *bytes.Buffer, strict bool) (Playlist, ListType, error) { var eof bool var line string var master *MasterPlaylist var media *MediaPlaylist var listType ListType var err error state := new(decodingState) wv := new(WV) master = NewMasterPlaylist() media, err = NewMediaPlaylist(8, 1024) // Wins...
go
func decode(buf *bytes.Buffer, strict bool) (Playlist, ListType, error) { var eof bool var line string var master *MasterPlaylist var media *MediaPlaylist var listType ListType var err error state := new(decodingState) wv := new(WV) master = NewMasterPlaylist() media, err = NewMediaPlaylist(8, 1024) // Wins...
[ "func", "decode", "(", "buf", "*", "bytes", ".", "Buffer", ",", "strict", "bool", ")", "(", "Playlist", ",", "ListType", ",", "error", ")", "{", "var", "eof", "bool", "\n", "var", "line", "string", "\n", "var", "master", "*", "MasterPlaylist", "\n", ...
// Detect playlist type and decode it. May be used as decoder for both // master and media playlists.
[ "Detect", "playlist", "type", "and", "decode", "it", ".", "May", "be", "used", "as", "decoder", "for", "both", "master", "and", "media", "playlists", "." ]
1d88be54fa785021109edc0bd1a65518cec073a9
https://github.com/grafov/m3u8/blob/1d88be54fa785021109edc0bd1a65518cec073a9/reader.go#L142-L203
146,957
grafov/m3u8
reader.go
StrictTimeParse
func StrictTimeParse(value string) (time.Time, error) { return time.Parse(DATETIME, value) }
go
func StrictTimeParse(value string) (time.Time, error) { return time.Parse(DATETIME, value) }
[ "func", "StrictTimeParse", "(", "value", "string", ")", "(", "time", ".", "Time", ",", "error", ")", "{", "return", "time", ".", "Parse", "(", "DATETIME", ",", "value", ")", "\n", "}" ]
// StrictTimeParse implements RFC3339 with Nanoseconds accuracy.
[ "StrictTimeParse", "implements", "RFC3339", "with", "Nanoseconds", "accuracy", "." ]
1d88be54fa785021109edc0bd1a65518cec073a9
https://github.com/grafov/m3u8/blob/1d88be54fa785021109edc0bd1a65518cec073a9/reader.go#L712-L714
146,958
envoyproxy/go-control-plane
envoy/config/rbac/v2alpha/rbac.pb.validate.go
Validate
func (m *Policy) Validate() error { if m == nil { return nil } if len(m.GetPermissions()) < 1 { return PolicyValidationError{ field: "Permissions", reason: "value must contain at least 1 item(s)", } } for idx, item := range m.GetPermissions() { _, _ = idx, item { tmp := item if v, ok := ...
go
func (m *Policy) Validate() error { if m == nil { return nil } if len(m.GetPermissions()) < 1 { return PolicyValidationError{ field: "Permissions", reason: "value must contain at least 1 item(s)", } } for idx, item := range m.GetPermissions() { _, _ = idx, item { tmp := item if v, ok := ...
[ "func", "(", "m", "*", "Policy", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetPermissions", "(", ")", ")", "<", "1", "{", "return", "PolicyValidationError"...
// Validate checks the field values on 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", "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/config/rbac/v2alpha/rbac.pb.validate.go#L106-L166
146,959
envoyproxy/go-control-plane
envoy/config/rbac/v2alpha/rbac.pb.validate.go
Validate
func (m *Permission_Set) Validate() error { if m == nil { return nil } if len(m.GetRules()) < 1 { return Permission_SetValidationError{ field: "Rules", reason: "value must contain at least 1 item(s)", } } for idx, item := range m.GetRules() { _, _ = idx, item { tmp := item if v, ok := in...
go
func (m *Permission_Set) Validate() error { if m == nil { return nil } if len(m.GetRules()) < 1 { return Permission_SetValidationError{ field: "Rules", reason: "value must contain at least 1 item(s)", } } for idx, item := range m.GetRules() { _, _ = idx, item { tmp := item if v, ok := in...
[ "func", "(", "m", "*", "Permission_Set", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetRules", "(", ")", ")", "<", "1", "{", "return", "Permission_SetValida...
// Validate checks the field values on Permission_Set 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", "Permission_Set", "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/rbac/v2alpha/rbac.pb.validate.go#L638-L671
146,960
envoyproxy/go-control-plane
envoy/config/rbac/v2alpha/rbac.pb.validate.go
Validate
func (m *Principal_Set) Validate() error { if m == nil { return nil } if len(m.GetIds()) < 1 { return Principal_SetValidationError{ field: "Ids", reason: "value must contain at least 1 item(s)", } } for idx, item := range m.GetIds() { _, _ = idx, item { tmp := item if v, ok := interface{...
go
func (m *Principal_Set) Validate() error { if m == nil { return nil } if len(m.GetIds()) < 1 { return Principal_SetValidationError{ field: "Ids", reason: "value must contain at least 1 item(s)", } } for idx, item := range m.GetIds() { _, _ = idx, item { tmp := item if v, ok := interface{...
[ "func", "(", "m", "*", "Principal_Set", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetIds", "(", ")", ")", "<", "1", "{", "return", "Principal_SetValidation...
// Validate checks the field values on Principal_Set 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", "Principal_Set", "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/rbac/v2alpha/rbac.pb.validate.go#L730-L763
146,961
envoyproxy/go-control-plane
envoy/config/rbac/v2alpha/rbac.pb.validate.go
Validate
func (m *Principal_Authenticated) Validate() error { if m == nil { return nil } { tmp := m.GetPrincipalName() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Principal_AuthenticatedValidationError{ field: "PrincipalName", reaso...
go
func (m *Principal_Authenticated) Validate() error { if m == nil { return nil } { tmp := m.GetPrincipalName() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Principal_AuthenticatedValidationError{ field: "PrincipalName", reaso...
[ "func", "(", "m", "*", "Principal_Authenticated", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetPrincipalName", "(", ")", "\n\n", "if", "v", ",", "ok", ":="...
// Validate checks the field values on Principal_Authenticated 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", "Principal_Authenticated", "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/rbac/v2alpha/rbac.pb.validate.go#L822-L843
146,962
envoyproxy/go-control-plane
envoy/admin/v2alpha/tap.pb.validate.go
Validate
func (m *TapRequest) Validate() error { if m == nil { return nil } if len(m.GetConfigId()) < 1 { return TapRequestValidationError{ field: "ConfigId", reason: "value length must be at least 1 bytes", } } if m.GetTapConfig() == nil { return TapRequestValidationError{ field: "TapConfig", reaso...
go
func (m *TapRequest) Validate() error { if m == nil { return nil } if len(m.GetConfigId()) < 1 { return TapRequestValidationError{ field: "ConfigId", reason: "value length must be at least 1 bytes", } } if m.GetTapConfig() == nil { return TapRequestValidationError{ field: "TapConfig", reaso...
[ "func", "(", "m", "*", "TapRequest", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetConfigId", "(", ")", ")", "<", "1", "{", "return", "TapRequestValidationE...
// Validate checks the field values on TapRequest 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", "TapRequest", "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/tap.pb.validate.go#L38-L73
146,963
envoyproxy/go-control-plane
envoy/config/accesslog/v2/als.pb.validate.go
Validate
func (m *HttpGrpcAccessLogConfig) Validate() error { if m == nil { return nil } if m.GetCommonConfig() == nil { return HttpGrpcAccessLogConfigValidationError{ field: "CommonConfig", reason: "value is required", } } { tmp := m.GetCommonConfig() if v, ok := interface{}(tmp).(interface{ Validate()...
go
func (m *HttpGrpcAccessLogConfig) Validate() error { if m == nil { return nil } if m.GetCommonConfig() == nil { return HttpGrpcAccessLogConfigValidationError{ field: "CommonConfig", reason: "value is required", } } { tmp := m.GetCommonConfig() if v, ok := interface{}(tmp).(interface{ Validate()...
[ "func", "(", "m", "*", "HttpGrpcAccessLogConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetCommonConfig", "(", ")", "==", "nil", "{", "return", "HttpGrpcAccessLogConfigV...
// Validate checks the field values on HttpGrpcAccessLogConfig 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", "HttpGrpcAccessLogConfig", "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/accesslog/v2/als.pb.validate.go#L39-L67
146,964
envoyproxy/go-control-plane
envoy/config/accesslog/v2/als.pb.validate.go
Validate
func (m *TcpGrpcAccessLogConfig) Validate() error { if m == nil { return nil } if m.GetCommonConfig() == nil { return TcpGrpcAccessLogConfigValidationError{ field: "CommonConfig", reason: "value is required", } } { tmp := m.GetCommonConfig() if v, ok := interface{}(tmp).(interface{ Validate() e...
go
func (m *TcpGrpcAccessLogConfig) Validate() error { if m == nil { return nil } if m.GetCommonConfig() == nil { return TcpGrpcAccessLogConfigValidationError{ field: "CommonConfig", reason: "value is required", } } { tmp := m.GetCommonConfig() if v, ok := interface{}(tmp).(interface{ Validate() e...
[ "func", "(", "m", "*", "TcpGrpcAccessLogConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetCommonConfig", "(", ")", "==", "nil", "{", "return", "TcpGrpcAccessLogConfigVal...
// Validate checks the field values on TcpGrpcAccessLogConfig 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", "TcpGrpcAccessLogConfig", "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/accesslog/v2/als.pb.validate.go#L128-L156
146,965
envoyproxy/go-control-plane
envoy/config/accesslog/v2/als.pb.validate.go
Validate
func (m *CommonGrpcAccessLogConfig) Validate() error { if m == nil { return nil } if len(m.GetLogName()) < 1 { return CommonGrpcAccessLogConfigValidationError{ field: "LogName", reason: "value length must be at least 1 bytes", } } if m.GetGrpcService() == nil { return CommonGrpcAccessLogConfigVali...
go
func (m *CommonGrpcAccessLogConfig) Validate() error { if m == nil { return nil } if len(m.GetLogName()) < 1 { return CommonGrpcAccessLogConfigValidationError{ field: "LogName", reason: "value length must be at least 1 bytes", } } if m.GetGrpcService() == nil { return CommonGrpcAccessLogConfigVali...
[ "func", "(", "m", "*", "CommonGrpcAccessLogConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetLogName", "(", ")", ")", "<", "1", "{", "return", "CommonG...
// Validate checks the field values on CommonGrpcAccessLogConfig 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", "CommonGrpcAccessLogConfig", "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/accesslog/v2/als.pb.validate.go#L217-L252
146,966
envoyproxy/go-control-plane
envoy/service/auth/v2/attribute_context.pb.validate.go
Validate
func (m *AttributeContext) Validate() error { if m == nil { return nil } { tmp := m.GetSource() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AttributeContextValidationError{ field: "Source", reason: "embedded message failed ...
go
func (m *AttributeContext) Validate() error { if m == nil { return nil } { tmp := m.GetSource() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AttributeContextValidationError{ field: "Source", reason: "embedded message failed ...
[ "func", "(", "m", "*", "AttributeContext", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetSource", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interface...
// Validate checks the field values on AttributeContext 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", "AttributeContext", "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/auth/v2/attribute_context.pb.validate.go#L39-L92
146,967
envoyproxy/go-control-plane
envoy/service/auth/v2/attribute_context.pb.validate.go
Validate
func (m *AttributeContext_Peer) Validate() error { if m == nil { return nil } { tmp := m.GetAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AttributeContext_PeerValidationError{ field: "Address", reason: "embedded mes...
go
func (m *AttributeContext_Peer) Validate() error { if m == nil { return nil } { tmp := m.GetAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AttributeContext_PeerValidationError{ field: "Address", reason: "embedded mes...
[ "func", "(", "m", "*", "AttributeContext_Peer", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetAddress", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "int...
// Validate checks the field values on AttributeContext_Peer 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", "AttributeContext_Peer", "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/auth/v2/attribute_context.pb.validate.go#L151-L178
146,968
envoyproxy/go-control-plane
envoy/service/auth/v2/attribute_context.pb.validate.go
Validate
func (m *AttributeContext_Request) Validate() error { if m == nil { return nil } { tmp := m.GetTime() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AttributeContext_RequestValidationError{ field: "Time", reason: "embedded mes...
go
func (m *AttributeContext_Request) Validate() error { if m == nil { return nil } { tmp := m.GetTime() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AttributeContext_RequestValidationError{ field: "Time", reason: "embedded mes...
[ "func", "(", "m", "*", "AttributeContext_Request", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetTime", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "int...
// Validate checks the field values on AttributeContext_Request 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", "AttributeContext_Request", "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/auth/v2/attribute_context.pb.validate.go#L239-L275
146,969
envoyproxy/go-control-plane
envoy/config/filter/http/transcoder/v2/transcoder.pb.validate.go
Validate
func (m *GrpcJsonTranscoder) Validate() error { if m == nil { return nil } if len(m.GetServices()) < 1 { return GrpcJsonTranscoderValidationError{ field: "Services", reason: "value must contain at least 1 item(s)", } } { tmp := m.GetPrintOptions() if v, ok := interface{}(tmp).(interface{ Valida...
go
func (m *GrpcJsonTranscoder) Validate() error { if m == nil { return nil } if len(m.GetServices()) < 1 { return GrpcJsonTranscoderValidationError{ field: "Services", reason: "value must contain at least 1 item(s)", } } { tmp := m.GetPrintOptions() if v, ok := interface{}(tmp).(interface{ Valida...
[ "func", "(", "m", "*", "GrpcJsonTranscoder", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetServices", "(", ")", ")", "<", "1", "{", "return", "GrpcJsonTrans...
// Validate checks the field values on GrpcJsonTranscoder 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", "GrpcJsonTranscoder", "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/transcoder/v2/transcoder.pb.validate.go#L39-L85
146,970
envoyproxy/go-control-plane
envoy/service/metrics/v2/metrics_service.pb.validate.go
Validate
func (m *StreamMetricsMessage) Validate() error { if m == nil { return nil } { tmp := m.GetIdentifier() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamMetricsMessageValidationError{ field: "Identifier", reason: "embedded...
go
func (m *StreamMetricsMessage) Validate() error { if m == nil { return nil } { tmp := m.GetIdentifier() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamMetricsMessageValidationError{ field: "Identifier", reason: "embedded...
[ "func", "(", "m", "*", "StreamMetricsMessage", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetIdentifier", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "i...
// Validate checks the field values on StreamMetricsMessage 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", "StreamMetricsMessage", "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/metrics/v2/metrics_service.pb.validate.go#L106-L147
146,971
envoyproxy/go-control-plane
envoy/service/metrics/v2/metrics_service.pb.validate.go
Validate
func (m *StreamMetricsMessage_Identifier) Validate() error { if m == nil { return nil } if m.GetNode() == nil { return StreamMetricsMessage_IdentifierValidationError{ field: "Node", reason: "value is required", } } { tmp := m.GetNode() if v, ok := interface{}(tmp).(interface{ Validate() error }...
go
func (m *StreamMetricsMessage_Identifier) Validate() error { if m == nil { return nil } if m.GetNode() == nil { return StreamMetricsMessage_IdentifierValidationError{ field: "Node", reason: "value is required", } } { tmp := m.GetNode() if v, ok := interface{}(tmp).(interface{ Validate() error }...
[ "func", "(", "m", "*", "StreamMetricsMessage_Identifier", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetNode", "(", ")", "==", "nil", "{", "return", "StreamMetricsMessage_Ide...
// Validate checks the field values on StreamMetricsMessage_Identifier 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", "StreamMetricsMessage_Identifier", "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/metrics/v2/metrics_service.pb.validate.go#L208-L236
146,972
envoyproxy/go-control-plane
envoy/config/grpc_credential/v2alpha/file_based_metadata.pb.validate.go
Validate
func (m *FileBasedMetadataConfig) Validate() error { if m == nil { return nil } { tmp := m.GetSecretData() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FileBasedMetadataConfigValidationError{ field: "SecretData", reason: "em...
go
func (m *FileBasedMetadataConfig) Validate() error { if m == nil { return nil } { tmp := m.GetSecretData() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FileBasedMetadataConfigValidationError{ field: "SecretData", reason: "em...
[ "func", "(", "m", "*", "FileBasedMetadataConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetSecretData", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", ...
// Validate checks the field values on FileBasedMetadataConfig 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", "FileBasedMetadataConfig", "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/grpc_credential/v2alpha/file_based_metadata.pb.validate.go#L39-L64
146,973
envoyproxy/go-control-plane
envoy/data/tap/v2alpha/wrapper.pb.validate.go
Validate
func (m *TraceWrapper) Validate() error { if m == nil { return nil } switch m.Trace.(type) { case *TraceWrapper_HttpBufferedTrace: { tmp := m.GetHttpBufferedTrace() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceWrapperVali...
go
func (m *TraceWrapper) Validate() error { if m == nil { return nil } switch m.Trace.(type) { case *TraceWrapper_HttpBufferedTrace: { tmp := m.GetHttpBufferedTrace() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceWrapperVali...
[ "func", "(", "m", "*", "TraceWrapper", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "switch", "m", ".", "Trace", ".", "(", "type", ")", "{", "case", "*", "TraceWrapper_HttpBufferedTrace", "...
// Validate checks the field values on TraceWrapper 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", "TraceWrapper", "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/data/tap/v2alpha/wrapper.pb.validate.go#L39-L123
146,974
envoyproxy/go-control-plane
envoy/api/v2/rds.pb.validate.go
Validate
func (m *RouteConfiguration) Validate() error { if m == nil { return nil } // no validation rules for Name for idx, item := range m.GetVirtualHosts() { _, _ = idx, item { tmp := item if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { re...
go
func (m *RouteConfiguration) Validate() error { if m == nil { return nil } // no validation rules for Name for idx, item := range m.GetVirtualHosts() { _, _ = idx, item { tmp := item if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { re...
[ "func", "(", "m", "*", "RouteConfiguration", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Name", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetVirtualHosts",...
// Validate checks the field values on RouteConfiguration 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", "RouteConfiguration", "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/rds.pb.validate.go#L39-L151
146,975
envoyproxy/go-control-plane
envoy/api/v2/rds.pb.validate.go
Validate
func (m *Vhds) Validate() error { if m == nil { return nil } { tmp := m.GetConfigSource() if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VhdsValidationError{ field: "ConfigSource", reason: "embedded message failed validation"...
go
func (m *Vhds) Validate() error { if m == nil { return nil } { tmp := m.GetConfigSource() if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VhdsValidationError{ field: "ConfigSource", reason: "embedded message failed validation"...
[ "func", "(", "m", "*", "Vhds", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetConfigSource", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interface", "...
// Validate checks the field values on Vhds 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", "Vhds", "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/rds.pb.validate.go#L211-L232
146,976
envoyproxy/go-control-plane
envoy/admin/v2alpha/server_info.pb.validate.go
Validate
func (m *ServerInfo) Validate() error { if m == nil { return nil } // no validation rules for Version // no validation rules for State { tmp := m.GetUptimeCurrentEpoch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ServerInfoValida...
go
func (m *ServerInfo) Validate() error { if m == nil { return nil } // no validation rules for Version // no validation rules for State { tmp := m.GetUptimeCurrentEpoch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ServerInfoValida...
[ "func", "(", "m", "*", "ServerInfo", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Version", "// no validation rules for State", "{", "tmp", ":=", "m", ".", "GetUptimeCurre...
// Validate checks the field values on ServerInfo 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", "ServerInfo", "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/server_info.pb.validate.go#L38-L93
146,977
envoyproxy/go-control-plane
envoy/admin/v2alpha/server_info.pb.validate.go
Validate
func (m *CommandLineOptions) Validate() error { if m == nil { return nil } // no validation rules for BaseId // no validation rules for Concurrency // no validation rules for ConfigPath // no validation rules for ConfigYaml // no validation rules for AllowUnknownFields // no validation rules for AdminAd...
go
func (m *CommandLineOptions) Validate() error { if m == nil { return nil } // no validation rules for BaseId // no validation rules for Concurrency // no validation rules for ConfigPath // no validation rules for ConfigYaml // no validation rules for AllowUnknownFields // no validation rules for AdminAd...
[ "func", "(", "m", "*", "CommandLineOptions", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for BaseId", "// no validation rules for Concurrency", "// no validation rules for ConfigPath",...
// Validate checks the field values on CommandLineOptions 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", "CommandLineOptions", "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/server_info.pb.validate.go#L152-L247
146,978
envoyproxy/go-control-plane
envoy/config/trace/v2/trace.pb.validate.go
Validate
func (m *Tracing) Validate() error { if m == nil { return nil } { tmp := m.GetHttp() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TracingValidationError{ field: "Http", reason: "embedded message failed validation", caus...
go
func (m *Tracing) Validate() error { if m == nil { return nil } { tmp := m.GetHttp() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TracingValidationError{ field: "Http", reason: "embedded message failed validation", caus...
[ "func", "(", "m", "*", "Tracing", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetHttp", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interface", "{", ...
// Validate checks the field values on Tracing 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", "Tracing", "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/trace/v2/trace.pb.validate.go#L38-L59
146,979
envoyproxy/go-control-plane
envoy/config/trace/v2/trace.pb.validate.go
Validate
func (m *LightstepConfig) Validate() error { if m == nil { return nil } if len(m.GetCollectorCluster()) < 1 { return LightstepConfigValidationError{ field: "CollectorCluster", reason: "value length must be at least 1 bytes", } } if len(m.GetAccessTokenFile()) < 1 { return LightstepConfigValidation...
go
func (m *LightstepConfig) Validate() error { if m == nil { return nil } if len(m.GetCollectorCluster()) < 1 { return LightstepConfigValidationError{ field: "CollectorCluster", reason: "value length must be at least 1 bytes", } } if len(m.GetAccessTokenFile()) < 1 { return LightstepConfigValidation...
[ "func", "(", "m", "*", "LightstepConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetCollectorCluster", "(", ")", ")", "<", "1", "{", "return", "Lightste...
// Validate checks the field values on LightstepConfig 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", "LightstepConfig", "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/trace/v2/trace.pb.validate.go#L118-L138
146,980
envoyproxy/go-control-plane
envoy/config/trace/v2/trace.pb.validate.go
Validate
func (m *ZipkinConfig) Validate() error { if m == nil { return nil } if len(m.GetCollectorCluster()) < 1 { return ZipkinConfigValidationError{ field: "CollectorCluster", reason: "value length must be at least 1 bytes", } } if len(m.GetCollectorEndpoint()) < 1 { return ZipkinConfigValidationError{ ...
go
func (m *ZipkinConfig) Validate() error { if m == nil { return nil } if len(m.GetCollectorCluster()) < 1 { return ZipkinConfigValidationError{ field: "CollectorCluster", reason: "value length must be at least 1 bytes", } } if len(m.GetCollectorEndpoint()) < 1 { return ZipkinConfigValidationError{ ...
[ "func", "(", "m", "*", "ZipkinConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetCollectorCluster", "(", ")", ")", "<", "1", "{", "return", "ZipkinConfi...
// Validate checks the field values on ZipkinConfig 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", "ZipkinConfig", "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/trace/v2/trace.pb.validate.go#L197-L234
146,981
envoyproxy/go-control-plane
envoy/config/trace/v2/trace.pb.validate.go
Validate
func (m *DynamicOtConfig) Validate() error { if m == nil { return nil } if len(m.GetLibrary()) < 1 { return DynamicOtConfigValidationError{ field: "Library", reason: "value length must be at least 1 bytes", } } { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error });...
go
func (m *DynamicOtConfig) Validate() error { if m == nil { return nil } if len(m.GetLibrary()) < 1 { return DynamicOtConfigValidationError{ field: "Library", reason: "value length must be at least 1 bytes", } } { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error });...
[ "func", "(", "m", "*", "DynamicOtConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetLibrary", "(", ")", ")", "<", "1", "{", "return", "DynamicOtConfigVa...
// Validate checks the field values on DynamicOtConfig 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", "DynamicOtConfig", "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/trace/v2/trace.pb.validate.go#L293-L321
146,982
envoyproxy/go-control-plane
envoy/config/trace/v2/trace.pb.validate.go
Validate
func (m *DatadogConfig) Validate() error { if m == nil { return nil } if len(m.GetCollectorCluster()) < 1 { return DatadogConfigValidationError{ field: "CollectorCluster", reason: "value length must be at least 1 bytes", } } if len(m.GetServiceName()) < 1 { return DatadogConfigValidationError{ ...
go
func (m *DatadogConfig) Validate() error { if m == nil { return nil } if len(m.GetCollectorCluster()) < 1 { return DatadogConfigValidationError{ field: "CollectorCluster", reason: "value length must be at least 1 bytes", } } if len(m.GetServiceName()) < 1 { return DatadogConfigValidationError{ ...
[ "func", "(", "m", "*", "DatadogConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetCollectorCluster", "(", ")", ")", "<", "1", "{", "return", "DatadogCon...
// Validate checks the field values on DatadogConfig 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", "DatadogConfig", "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/trace/v2/trace.pb.validate.go#L380-L400
146,983
envoyproxy/go-control-plane
envoy/config/trace/v2/trace.pb.validate.go
Validate
func (m *TraceServiceConfig) Validate() error { if m == nil { return nil } if m.GetGrpcService() == nil { return TraceServiceConfigValidationError{ field: "GrpcService", reason: "value is required", } } { tmp := m.GetGrpcService() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok...
go
func (m *TraceServiceConfig) Validate() error { if m == nil { return nil } if m.GetGrpcService() == nil { return TraceServiceConfigValidationError{ field: "GrpcService", reason: "value is required", } } { tmp := m.GetGrpcService() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok...
[ "func", "(", "m", "*", "TraceServiceConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetGrpcService", "(", ")", "==", "nil", "{", "return", "TraceServiceConfigValidationEr...
// Validate checks the field values on TraceServiceConfig 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", "TraceServiceConfig", "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/trace/v2/trace.pb.validate.go#L459-L487
146,984
envoyproxy/go-control-plane
envoy/config/trace/v2/trace.pb.validate.go
Validate
func (m *Tracing_Http) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return Tracing_HttpValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } switch m.ConfigType.(type) { case *Tracing_Http_Config: { tmp := m.GetConfig() if v, ok :...
go
func (m *Tracing_Http) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return Tracing_HttpValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } switch m.ConfigType.(type) { case *Tracing_Http_Config: { tmp := m.GetConfig() if v, ok :...
[ "func", "(", "m", "*", "Tracing_Http", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetName", "(", ")", ")", "<", "1", "{", "return", "Tracing_HttpValidationE...
// Validate checks the field values on Tracing_Http 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", "Tracing_Http", "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/trace/v2/trace.pb.validate.go#L548-L599
146,985
envoyproxy/go-control-plane
envoy/api/v2/cds.pb.validate.go
Validate
func (m *UpstreamBindConfig) Validate() error { if m == nil { return nil } { tmp := m.GetSourceAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamBindConfigValidationError{ field: "SourceAddress", reason: "embedd...
go
func (m *UpstreamBindConfig) Validate() error { if m == nil { return nil } { tmp := m.GetSourceAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamBindConfigValidationError{ field: "SourceAddress", reason: "embedd...
[ "func", "(", "m", "*", "UpstreamBindConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetSourceAddress", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "...
// Validate checks the field values on UpstreamBindConfig 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", "UpstreamBindConfig", "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/cds.pb.validate.go#L563-L584
146,986
envoyproxy/go-control-plane
envoy/api/v2/cds.pb.validate.go
Validate
func (m *UpstreamConnectionOptions) Validate() error { if m == nil { return nil } { tmp := m.GetTcpKeepalive() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamConnectionOptionsValidationError{ field: "TcpKeepalive", rea...
go
func (m *UpstreamConnectionOptions) Validate() error { if m == nil { return nil } { tmp := m.GetTcpKeepalive() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamConnectionOptionsValidationError{ field: "TcpKeepalive", rea...
[ "func", "(", "m", "*", "UpstreamConnectionOptions", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetTcpKeepalive", "(", ")", "\n\n", "if", "v", ",", "ok", ":=...
// Validate checks the field values on UpstreamConnectionOptions 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", "UpstreamConnectionOptions", "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/cds.pb.validate.go#L645-L666
146,987
envoyproxy/go-control-plane
envoy/api/v2/cds.pb.validate.go
Validate
func (m *Cluster_CustomClusterType) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return Cluster_CustomClusterTypeValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } { tmp := m.GetTypedConfig() if v, ok := interface{}(tmp).(interface{ V...
go
func (m *Cluster_CustomClusterType) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return Cluster_CustomClusterTypeValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } { tmp := m.GetTypedConfig() if v, ok := interface{}(tmp).(interface{ V...
[ "func", "(", "m", "*", "Cluster_CustomClusterType", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetName", "(", ")", ")", "<", "1", "{", "return", "Cluster_Cu...
// Validate checks the field values on Cluster_CustomClusterType 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", "Cluster_CustomClusterType", "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/cds.pb.validate.go#L727-L755
146,988
envoyproxy/go-control-plane
envoy/api/v2/cds.pb.validate.go
Validate
func (m *Cluster_EdsClusterConfig) Validate() error { if m == nil { return nil } { tmp := m.GetEdsConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_EdsClusterConfigValidationError{ field: "EdsConfig", reason: "em...
go
func (m *Cluster_EdsClusterConfig) Validate() error { if m == nil { return nil } { tmp := m.GetEdsConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_EdsClusterConfigValidationError{ field: "EdsConfig", reason: "em...
[ "func", "(", "m", "*", "Cluster_EdsClusterConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetEdsConfig", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", ...
// Validate checks the field values on Cluster_EdsClusterConfig 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", "Cluster_EdsClusterConfig", "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/cds.pb.validate.go#L816-L839
146,989
envoyproxy/go-control-plane
envoy/api/v2/cds.pb.validate.go
Validate
func (m *Cluster_LbSubsetConfig) Validate() error { if m == nil { return nil } if _, ok := Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_name[int32(m.GetFallbackPolicy())]; !ok { return Cluster_LbSubsetConfigValidationError{ field: "FallbackPolicy", reason: "value must be one of the defined enum values",...
go
func (m *Cluster_LbSubsetConfig) Validate() error { if m == nil { return nil } if _, ok := Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_name[int32(m.GetFallbackPolicy())]; !ok { return Cluster_LbSubsetConfigValidationError{ field: "FallbackPolicy", reason: "value must be one of the defined enum values",...
[ "func", "(", "m", "*", "Cluster_LbSubsetConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "_", ",", "ok", ":=", "Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_name", "[", "int32", "(", ...
// Validate checks the field values on Cluster_LbSubsetConfig 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", "Cluster_LbSubsetConfig", "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/cds.pb.validate.go#L900-L954
146,990
envoyproxy/go-control-plane
envoy/api/v2/cds.pb.validate.go
Validate
func (m *Cluster_LeastRequestLbConfig) Validate() error { if m == nil { return nil } if wrapper := m.GetChoiceCount(); wrapper != nil { if wrapper.GetValue() < 2 { return Cluster_LeastRequestLbConfigValidationError{ field: "ChoiceCount", reason: "value must be greater than or equal to 2", } } ...
go
func (m *Cluster_LeastRequestLbConfig) Validate() error { if m == nil { return nil } if wrapper := m.GetChoiceCount(); wrapper != nil { if wrapper.GetValue() < 2 { return Cluster_LeastRequestLbConfigValidationError{ field: "ChoiceCount", reason: "value must be greater than or equal to 2", } } ...
[ "func", "(", "m", "*", "Cluster_LeastRequestLbConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "wrapper", ":=", "m", ".", "GetChoiceCount", "(", ")", ";", "wrapper", "!=", "nil", ...
// Validate checks the field values on Cluster_LeastRequestLbConfig 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", "Cluster_LeastRequestLbConfig", "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/cds.pb.validate.go#L1015-L1032
146,991
envoyproxy/go-control-plane
envoy/api/v2/cds.pb.validate.go
Validate
func (m *Cluster_RingHashLbConfig) Validate() error { if m == nil { return nil } if wrapper := m.GetMinimumRingSize(); wrapper != nil { if wrapper.GetValue() > 8388608 { return Cluster_RingHashLbConfigValidationError{ field: "MinimumRingSize", reason: "value must be less than or equal to 8388608", ...
go
func (m *Cluster_RingHashLbConfig) Validate() error { if m == nil { return nil } if wrapper := m.GetMinimumRingSize(); wrapper != nil { if wrapper.GetValue() > 8388608 { return Cluster_RingHashLbConfigValidationError{ field: "MinimumRingSize", reason: "value must be less than or equal to 8388608", ...
[ "func", "(", "m", "*", "Cluster_RingHashLbConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "wrapper", ":=", "m", ".", "GetMinimumRingSize", "(", ")", ";", "wrapper", "!=", "nil", ...
// Validate checks the field values on Cluster_RingHashLbConfig 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", "Cluster_RingHashLbConfig", "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/cds.pb.validate.go#L1094-L1129
146,992
envoyproxy/go-control-plane
envoy/api/v2/cds.pb.validate.go
Validate
func (m *Cluster_CommonLbConfig) Validate() error { if m == nil { return nil } { tmp := m.GetHealthyPanicThreshold() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfigValidationError{ field: "HealthyPanicThreshol...
go
func (m *Cluster_CommonLbConfig) Validate() error { if m == nil { return nil } { tmp := m.GetHealthyPanicThreshold() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfigValidationError{ field: "HealthyPanicThreshol...
[ "func", "(", "m", "*", "Cluster_CommonLbConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetHealthyPanicThreshold", "(", ")", "\n\n", "if", "v", ",", "ok",...
// Validate checks the field values on Cluster_CommonLbConfig 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", "Cluster_CommonLbConfig", "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/cds.pb.validate.go#L1260-L1334
146,993
envoyproxy/go-control-plane
envoy/api/v2/cds.pb.validate.go
Validate
func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) Validate() error { if m == nil { return nil } { tmp := m.GetRoutingEnabled() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ ...
go
func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) Validate() error { if m == nil { return nil } { tmp := m.GetRoutingEnabled() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ ...
[ "func", "(", "m", "*", "Cluster_CommonLbConfig_ZoneAwareLbConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetRoutingEnabled", "(", ")", "\n\n", "if", "v", "...
// Validate checks the field values on Cluster_CommonLbConfig_ZoneAwareLbConfig // 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", "Cluster_CommonLbConfig_ZoneAwareLbConfig", "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/cds.pb.validate.go#L1463-L1499
146,994
envoyproxy/go-control-plane
envoy/api/v2/auth/cert.pb.validate.go
Validate
func (m *TlsParameters) Validate() error { if m == nil { return nil } if _, ok := TlsParameters_TlsProtocol_name[int32(m.GetTlsMinimumProtocolVersion())]; !ok { return TlsParametersValidationError{ field: "TlsMinimumProtocolVersion", reason: "value must be one of the defined enum values", } } if _, ...
go
func (m *TlsParameters) Validate() error { if m == nil { return nil } if _, ok := TlsParameters_TlsProtocol_name[int32(m.GetTlsMinimumProtocolVersion())]; !ok { return TlsParametersValidationError{ field: "TlsMinimumProtocolVersion", reason: "value must be one of the defined enum values", } } if _, ...
[ "func", "(", "m", "*", "TlsParameters", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "_", ",", "ok", ":=", "TlsParameters_TlsProtocol_name", "[", "int32", "(", "m", ".", "GetTlsMinimumP...
// Validate checks the field values on TlsParameters 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", "TlsParameters", "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/auth/cert.pb.validate.go#L39-L59
146,995
envoyproxy/go-control-plane
envoy/api/v2/auth/cert.pb.validate.go
Validate
func (m *TlsCertificate) Validate() error { if m == nil { return nil } { tmp := m.GetCertificateChain() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: "CertificateChain", reason: "embedded...
go
func (m *TlsCertificate) Validate() error { if m == nil { return nil } { tmp := m.GetCertificateChain() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: "CertificateChain", reason: "embedded...
[ "func", "(", "m", "*", "TlsCertificate", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetCertificateChain", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "i...
// Validate checks the field values on TlsCertificate 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", "TlsCertificate", "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/auth/cert.pb.validate.go#L118-L204
146,996
envoyproxy/go-control-plane
envoy/api/v2/auth/cert.pb.validate.go
Validate
func (m *TlsSessionTicketKeys) Validate() error { if m == nil { return nil } if len(m.GetKeys()) < 1 { return TlsSessionTicketKeysValidationError{ field: "Keys", reason: "value must contain at least 1 item(s)", } } for idx, item := range m.GetKeys() { _, _ = idx, item { tmp := item if v,...
go
func (m *TlsSessionTicketKeys) Validate() error { if m == nil { return nil } if len(m.GetKeys()) < 1 { return TlsSessionTicketKeysValidationError{ field: "Keys", reason: "value must contain at least 1 item(s)", } } for idx, item := range m.GetKeys() { _, _ = idx, item { tmp := item if v,...
[ "func", "(", "m", "*", "TlsSessionTicketKeys", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetKeys", "(", ")", ")", "<", "1", "{", "return", "TlsSessionTicke...
// Validate checks the field values on TlsSessionTicketKeys 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", "TlsSessionTicketKeys", "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/auth/cert.pb.validate.go#L263-L296
146,997
envoyproxy/go-control-plane
envoy/api/v2/auth/cert.pb.validate.go
Validate
func (m *CertificateValidationContext) Validate() error { if m == nil { return nil } { tmp := m.GetTrustedCa() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationContextValidationError{ field: "TrustedCa", rea...
go
func (m *CertificateValidationContext) Validate() error { if m == nil { return nil } { tmp := m.GetTrustedCa() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationContextValidationError{ field: "TrustedCa", rea...
[ "func", "(", "m", "*", "CertificateValidationContext", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetTrustedCa", "(", ")", "\n\n", "if", "v", ",", "ok", ":=...
// Validate checks the field values on CertificateValidationContext 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", "CertificateValidationContext", "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/auth/cert.pb.validate.go#L357-L449
146,998
envoyproxy/go-control-plane
envoy/api/v2/auth/cert.pb.validate.go
Validate
func (m *UpstreamTlsContext) Validate() error { if m == nil { return nil } { tmp := m.GetCommonTlsContext() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamTlsContextValidationError{ field: "CommonTlsContext", reason: "...
go
func (m *UpstreamTlsContext) Validate() error { if m == nil { return nil } { tmp := m.GetCommonTlsContext() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamTlsContextValidationError{ field: "CommonTlsContext", reason: "...
[ "func", "(", "m", "*", "UpstreamTlsContext", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetCommonTlsContext", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", ...
// Validate checks the field values on UpstreamTlsContext 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", "UpstreamTlsContext", "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/auth/cert.pb.validate.go#L693-L738
146,999
envoyproxy/go-control-plane
envoy/api/v2/auth/cert.pb.validate.go
Validate
func (m *DownstreamTlsContext) Validate() error { if m == nil { return nil } { tmp := m.GetCommonTlsContext() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DownstreamTlsContextValidationError{ field: "CommonTlsContext", reaso...
go
func (m *DownstreamTlsContext) Validate() error { if m == nil { return nil } { tmp := m.GetCommonTlsContext() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DownstreamTlsContextValidationError{ field: "CommonTlsContext", reaso...
[ "func", "(", "m", "*", "DownstreamTlsContext", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetCommonTlsContext", "(", ")", "\n\n", "if", "v", ",", "ok", ":="...
// Validate checks the field values on DownstreamTlsContext 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", "DownstreamTlsContext", "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/auth/cert.pb.validate.go#L799-L888