_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c171200
// New returns new EventBus with empty handlers.
c171201
// doSubscribe handles the subscription logic and is utilized by the public Subscribe functions
c171202
// Subscribe subscribes to a topic. // Returns error if `fn` is not a function.
c171203
// HasCallback returns true if exists any callback subscribed to the topic.
c171204
// Unsubscribe removes callback defined for a topic. // Returns error if there are no callbacks subscribed to the topic.
c171205
// Publish executes callback defined for a topic. Any additional argument will be transferred to the callback.
c171206
// NewNetworkBus - returns a new network bus object at the server address and path
c171207
// Start - helper method to serve a network bus service
c171208
// NewServer - create a new Server at the address and path
c171209
// HasClientSubscribed - True if a client subscribed to this server with the same topic
c171210
// Start - starts a service for remote clients to subscribe to events
c171211
// Register - Registers a remote handler to this event bus // for a remote subscribe - a given client address only needs to subscribe once // event will be republished in local event bus
c171212
// Valid determines if the provided `when` time is within the GTLDPeriod for the // gTLD. E.g. whether a certificate issued at `when` with a subject identifier // using the specified gTLD can be considered a valid use of the gTLD.
c171213
// HasValidTLD checks that a domain ends in a valid TLD that was delegated in // the root DNS at the time specified.
c171214
// IsInTLDMap checks that a label is present in the TLD map. It does not // consider the TLD's validity period and whether the TLD may have been removed, // only whether it was ever a TLD that was delegated.
c171215
// Execute will check the given certificate to ensure that all of the DNS // subject alternate names that specify a reverse DNS name under the respective // IPv4 or IPv6 arpa zones are well formed. A Warn LintResult is returned if // the name is in a reverse DNS zone but has the wrong number of labels.
c171216
// lintReversedIPAddressLabels lints the given name as either a reversed IPv4 or // IPv6 address under the respective ARPA zone based on the address class. An // error is returned if there aren't enough labels in the name after removing // the relevant arpa suffix.
c171217
// CheckRDNSequenceWhiteSpace returns true if there is leading or trailing // whitespace in any name attribute in the sequence, respectively.
c171218
// IsIA5String returns true if raw is an IA5String, and returns false otherwise.
c171219
// AllAlternateNameWithTagAreIA5 returns true if all sequence members with the // given tag are encoded as IA5 strings, and false otherwise. If it encounters // errors parsing asn1, err will be non-nil.
c171220
// IsEV returns true if the input is a known Extended Validation OID.
c171221
// Execute returns an Error LintResult if the certificate is not an EV // certificate. CheckApplies has already verified the certificate contains one // or more `.onion` subjects and so it must be an EV certificate.
c171222
// getData fetches the response body bytes from an HTTP get to the provider url, // or returns an error.
c171223
// getGTLDData fetches the ICANN_GTLD_JSON and parses it into a list of // util.GTLDPeriod objects, or returns an error. The gTLDEntries are returned // as-is and may contain entries that were never delegated from the root DNS.
c171224
// delegatedGTLDs filters the provided list of GTLDPeriods removing any entries // that were never delegated from the root DNS.
c171225
// validateGTLDs checks that all entries have a valid parseable DelegationDate // string, and if not-empty, a valid parseable RemovalDate string. This function // assumes an entry with an empty DelegationDate is an error. Use // `delegatedGTLDs` to filter out entries that were never delegated before // validating.
c171226
// init sets up command line flags
c171227
// IsNameAttribute returns true if the given ObjectIdentifier corresponds with // the type of any name attribute for PKIX.
c171228
// MarshalJSON implements the json.Marshaler interface.
c171229
// String returns the canonical representation of a LintStatus as a string.
c171230
// EncodeLintDescriptionsToJSON outputs a description of each lint as JSON // object, one object per line.
c171231
// LintCertificate runs all registered lints on c, producing a ZLint.
c171232
// CheckApplies returns true if the certificate is a subscriber certificate that // contains a subject name ending in `.onion`.
c171233
// failResult is a small utility function for creating a failed lint result.
c171234
// CheckEffective returns true if c was issued on or after the EffectiveDate. If // EffectiveDate is zero, CheckEffective always returns true.
c171235
// GetExtFromCert returns the extension with the matching OID, if present. If // the extension if not present, it returns nil.
c171236
// Helper function that checks for a name type in a pkix.Name
c171237
//helper function to parse policyMapping extensions, returns slices of CertPolicyIds separated by domain
c171238
// printJSON prints v as JSON encoded with indent to stdout. It panics on any error.
c171239
// UnmarshalJSON implements the json.Unmarshaler interface. // The URI is expected to be a quoted string.
c171240
// NewClient creates a new GitHub GraphQL API v4 client with the provided http.Client. // If httpClient is nil, then http.DefaultClient is used. // // Note that GitHub GraphQL API v4 requires authentication, so // the provided http.Client is expected to take care of that.
c171241
// NewEnterpriseClient creates a new GitHub GraphQL API v4 client for the GitHub Enterprise // instance with the specified GraphQL endpoint URL, using the provided http.Client. // If httpClient is nil, then http.DefaultClient is used. // // Note that GitHub GraphQL API v4 requires authentication, so // the provided htt...
c171242
// Query executes a single GraphQL query request, // with a query derived from q, populating the response into it. // q should be a pointer to struct that corresponds to the GitHub GraphQL schema.
c171243
// Mutate executes a single GraphQL mutation request, // with a mutation derived from m, populating the response into it. // m should be a pointer to struct that corresponds to the GitHub GraphQL schema. // Provided input will be set as a variable named "input".
c171244
// Fills the ListBox with the file names from current directory. // Files which names do not match mask are filtered out. // If select directory is set, then the ListBox contains only directories. // Directory names ends with path separator
c171245
// Tries to find the best fit for the given path. // It goes up until it gets into the existing directory. // If all fails it returns working directory.
c171246
// Goes up in the directory tree if it is possible
c171247
// Enters the directory
c171248
// Destroy removes an object from its parental chain
c171249
// cache data from a new row span // It imitates a random data by selecting values from predefined arrays. Sizes // of all arrays should be different to make TableView data look more random
c171250
// returns the cell value for a given col and row. Col and row are absolute // value. But cache keeps limited number of rows to minimize memory usage. // So, the position of the value of the cell should be calculated // To simplify, the function just returns empty string if the cell is not // cached. It is unlikely but...
c171251
// Repaints everything on the screen
c171252
// AddWindow constucts a new Window, adds it to the composer automatically, // and makes it active // posX and posY are top left coordinates of the Window // width and height are Window size // title is a Window title
c171253
// DestroyWindow removes the Window from the list of managed Windows
c171254
// IsDeadKey returns true if the pressed key is the first key in // the key sequence understood by composer. Dead key is never sent to // any control
c171255
// SetTextDisplay sets which part of the title is displayed in case of the title // is longer than the lable. Only AlignLeft and AlignRigth are valid values // for the property. Any other value does is skipped and does not affect // displaying the title
c171256
// NewRadioGroup creates a new RadioGroup
c171257
// Selected returns the number of currently selected radio // button inside the group or -1 if no button is selected
c171258
// SelectItem makes the radio selected. The function returns false // if it failed to find the radio in the radio group
c171259
// SetSelected selects the radio by its number. The function // returns false if the number is invalid for the radio group
c171260
// AddItem add a new radio button to group
c171261
// NewColorParser creates a new string parser. // str is a string to parse. // defText is a default text color. // defBack is a default background color. // Default colors are applied in case of reset color tag
c171262
// NextElement parses and returns the next string element
c171263
// SetTitle changes the EditField content and emits OnChage eventif the new value does not equal to old one
c171264
// SetMaxWidth sets the maximum lenght of the EditField text. If the current text is longer it is truncated
c171265
// SetSize changes control size. Constant DoNotChange can be // used as placeholder to indicate that the control attrubute // should be unchanged. // Method does nothing if new size is less than minimal size // EditField height cannot be changed - it equals 1 always
c171266
// PopAttributes restores saved with PushAttributes colors. Function does // nothing if there is no saved colors
c171267
// PushClip saves the current clipping window
c171268
// PopClip restores saved with PushClip clipping window
c171269
// InClipRect returns true if x and y position is inside current clipping // rectangle
c171270
// SetSize sets the new Canvas size. If new size does not // equal old size then Canvas is recreated and cleared // with default colors. Both Canvas width and height must // be greater than 2
c171271
// Symbol returns the character and its attributes by its coordinates
c171272
// SetClipRect defines a new clipping rect. Maybe useful with PopClip and // PushClip functions
c171273
// ClipRect returns the current clipping rectangle
c171274
// DrawHorizontalLine draws the part of the horizontal line that is inside // current clipping rectangle
c171275
// DrawVerticalLine draws the part of the vertical line that is inside current // clipping rectangle
c171276
// DrawRawText draws the part of text that is inside the current clipping // rectangle. DrawRawText always paints string as is - no color changes. // If you want to draw string with color changing commands included then // use DrawText function
c171277
// DrawTextVertical draws the part of text that is inside the current clipping // rectangle. DrawTextVertical always paints colorized string. If you want to draw // raw string then use DrawRawTextVertical function
c171278
// DrawRawTextVertical draws the part of text that is inside the current clipping // rectangle. DrawRawTextVertical always paints string as is - no color changes. // If you want to draw string with color changing commands included then // use DrawTextVertical function
c171279
// DrawFrame paints the frame without changing area inside it
c171280
// FillRect paints the area with r character using the current colors
c171281
// TextExtent calculates the width and the height of the text
c171282
// EnsureVisible makes the currently selected item visible and scrolls the item list if it is required
c171283
// Clear deletes all ListBox items
c171284
// own methods // AddItem adds a new item to item list. // Returns true if the operation is successful
c171285
// SelectItem selects item which number in the list equals // id. If the item exists the ListBox scrolls the list to // make the item visible. // Returns true if the item is selected successfully
c171286
// Item returns item text by its index. // If index is out of range an empty string and false are returned
c171287
// FindItem looks for an item in list which text equals // to text, by default the search is casesensitive. // Returns item number in item list or -1 if nothing is found.
c171288
// PartialFindItem looks for an item in list which text starts from // the given substring, by default the search is casesensitive. // Returns item number in item list or -1 if nothing is found.
c171289
// SelectedItemText returns text of currently selected item or empty sting if nothing is // selected or ListBox is empty.
c171290
// RemoveItem deletes an item which number is id in item list // Returns true if item is deleted
c171291
// SysColor returns attribute by its id for the current theme. // The method panics if theme loop is detected - check if // parent attribute is correct
c171292
// SysObject returns object look by its id for the current // theme. E.g, border lines for frame or arrows for scrollbar. // The method panics if theme loop is detected - check if // parent attribute is correct
c171293
// SetThemePath changes the directory that contains themes. // If new path does not equal old one, theme list reloads
c171294
// loadTheme loads the theme if it is not in the cache already. // If theme is in the cache loadTheme does nothing
c171295
// ReloadTheme refresh cache entry for the theme with new // data loaded from file. Use it to apply theme changes on // the fly without resetting manager or restarting application
c171296
// ThemeInfo returns detailed info about theme
c171297
// Ellipsize truncates text to maxWidth by replacing a // substring in the middle with ellipsis and keeping // the beginning and ending of the string untouched. // If maxWidth is less than 5 then no ellipsis is // added, the text is just truncated from the right.
c171298
// CutText makes a text no longer than maxWidth
c171299
// AlignText calculates the initial position of the text // output depending on str length and available width. // The str is truncated in case of its lenght greater than // width. Function returns shift that should be added to // original label position before output instead of padding // the string with spaces. The r...