text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (t TransformCollection) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "@odata.nextLink", t.ODataNextLink)
populate(objectMap, "value", t.Value)
return json.Marshal(objectMap)
} | [
-0.8234490752220154,
-0.21647386252880096,
0.2859836518764496,
-1.0497956275939941,
0.2592394948005676,
-0.7875249981880188,
0.9117701053619385,
0.5810324549674988,
-0.11765585094690323,
-0.3640543818473816,
-0.9225282073020935,
1.0918595790863037,
-0.2687338590621948,
0.8401146531105042,
... |
func (t *TransformCollection) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", t, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "@odata.nextLink":
err = unp... | [
-1.1451053619384766,
0.2705528736114502,
0.6661267876625061,
-1.7559356689453125,
-0.24123457074165344,
-0.6307810544967651,
0.8846238851547241,
-0.11166239529848099,
-0.6606540083885193,
-0.1923060417175293,
-0.4381932020187378,
0.32969099283218384,
-0.45796439051628113,
1.052333474159240... |
func (t TransformOutput) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "onError", t.OnError)
populate(objectMap, "preset", t.Preset)
populate(objectMap, "relativePriority", t.RelativePriority)
return json.Marshal(objectMap)
} | [
-0.38138705492019653,
-0.9965361952781677,
0.17698213458061218,
-0.7560821771621704,
-0.46129992604255676,
-0.9523571729660034,
1.1804916858673096,
0.5439152717590332,
-0.1979498416185379,
-0.18503235280513763,
-0.9535040855407715,
0.2949393093585968,
0.04487476497888565,
0.540959596633911... |
func (t *TransformOutput) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", t, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "onError":
err = unpopulate(val,... | [
-0.9471002817153931,
0.01059896033257246,
0.5105915665626526,
-1.168846845626831,
-0.6771731376647949,
-0.8990302085876465,
0.9555838108062744,
0.01215696707367897,
-0.673747181892395,
0.09123612940311432,
-0.4859444499015808,
-0.39271071553230286,
-0.15011964738368988,
0.8305994272232056,... |
func (t TransformProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populateTimeRFC3339(objectMap, "created", t.Created)
populate(objectMap, "description", t.Description)
populateTimeRFC3339(objectMap, "lastModified", t.LastModified)
populate(objectMap, "outputs", t.Outputs)
return json... | [
-0.5427103638648987,
-0.9412369132041931,
0.30095601081848145,
-1.2084102630615234,
0.43828460574150085,
-0.646477222442627,
0.8071561455726624,
0.5520452857017517,
-0.5597885251045227,
0.439956396818161,
-0.7769536972045898,
0.32363760471343994,
-0.2677735388278961,
0.7442627549171448,
... |
func (t *TransformProperties) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", t, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "created":
err = unpopulateT... | [
-0.8185908198356628,
-0.0957680493593216,
0.5861807465553284,
-1.5330829620361328,
-0.18406818807125092,
-0.6351065635681152,
0.562395453453064,
0.06602541357278824,
-0.6884725093841553,
0.48040080070495605,
-0.2532516121864319,
-0.1444699764251709,
-0.2812138497829437,
0.8065401911735535,... |
func (t TransportStreamFormat) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "filenamePattern", t.FilenamePattern)
objectMap["@odata.type"] = "#Microsoft.Media.TransportStreamFormat"
populate(objectMap, "outputFiles", t.OutputFiles)
return json.Marshal(objectMap)
} | [
-0.5460101962089539,
-0.7781772613525391,
0.31282806396484375,
-1.3407891988754272,
-0.8387278914451599,
-0.22878484427928925,
0.5080673098564148,
0.00879258569329977,
-0.2907108962535858,
0.4714864194393158,
-0.621534526348114,
0.11335394531488419,
-0.375630646944046,
0.40362706780433655,... |
func (t *TransportStreamFormat) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", t, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "filenamePattern":
err = u... | [
-0.666869580745697,
0.13350434601306915,
0.7771245837211609,
-1.8185291290283203,
-1.036327838897705,
-0.263653963804245,
0.4872898757457733,
-0.387785941362381,
-0.8307865858078003,
0.48547542095184326,
-0.30988943576812744,
-0.3094744384288788,
-0.36010047793388367,
0.996505081653595,
... |
func (u UTCClipTime) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
objectMap["@odata.type"] = "#Microsoft.Media.UtcClipTime"
populateTimeRFC3339(objectMap, "time", u.Time)
return json.Marshal(objectMap)
} | [
-1.4256504774093628,
-0.5338220596313477,
0.18185020983219147,
-0.4945150315761566,
-0.7248938679695129,
-0.024483071640133858,
0.12326546013355255,
0.4876663088798523,
0.8970053791999817,
0.5133759379386902,
-0.521384060382843,
-0.6447975039482117,
0.4164964556694031,
0.7509337663650513,
... |
func (u *UTCClipTime) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", u, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "@odata.type":
err = unpopulate(val,... | [
-1.5215564966201782,
0.22330501675605774,
0.6823225617408752,
-1.3778059482574463,
-1.0769352912902832,
-0.019665800034999847,
0.29966992139816284,
-0.04018748179078102,
0.0020022252574563026,
0.9426648616790771,
0.14139345288276672,
-0.6790221929550171,
0.3332620859146118,
1.2113108634948... |
func (u UserAssignedManagedIdentity) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "clientId", u.ClientID)
populate(objectMap, "principalId", u.PrincipalID)
return json.Marshal(objectMap)
} | [
-0.1890089213848114,
-1.5526037216186523,
-0.028542816638946533,
-0.301538348197937,
-0.18787220120429993,
0.3922269642353058,
0.4738773703575134,
0.19971610605716705,
0.5457034707069397,
-0.288082093000412,
-0.8009546995162964,
1.3163464069366455,
0.6089115142822266,
1.3206942081451416,
... |
func (u *UserAssignedManagedIdentity) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", u, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "clientId":
err = un... | [
-0.41899946331977844,
-0.8322548866271973,
0.5093965530395508,
-1.218119740486145,
-0.5755535364151001,
0.041234761476516724,
0.516413688659668,
-0.33313921093940735,
0.26388654112815857,
0.28885185718536377,
-0.18764272332191467,
0.7617523670196533,
0.3923514783382416,
1.410936713218689,
... |
func (v Video) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "keyFrameInterval", v.KeyFrameInterval)
populate(objectMap, "label", v.Label)
objectMap["@odata.type"] = "#Microsoft.Media.Video"
populate(objectMap, "stretchMode", v.StretchMode)
populate(objectMap, "syncMode", v... | [
-0.38913434743881226,
-0.6602103114128113,
0.3214457333087921,
0.41285964846611023,
-0.5284249186515808,
-0.19060970842838287,
0.29422587156295776,
0.38984090089797974,
1.0748822689056396,
0.030265577137470245,
-0.888117790222168,
1.139022946357727,
-0.2959756553173065,
0.8404850363731384,... |
func (v *Video) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", v, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "keyFrameInterval":
err = unpopulate(val, ... | [
-0.657524049282074,
0.007808366324752569,
0.7472261190414429,
-0.32083404064178467,
-0.4727717936038971,
-0.5065904855728149,
0.6603683829307556,
-0.3134278953075409,
0.47493764758110046,
0.23768861591815948,
-0.45761838555336,
0.9093405604362488,
-0.33747944235801697,
0.9610282778739929,
... |
func (v VideoAnalyzerPreset) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "audioLanguage", v.AudioLanguage)
populate(objectMap, "experimentalOptions", v.ExperimentalOptions)
populate(objectMap, "insightsToExtract", v.InsightsToExtract)
populate(objectMap, "mode", v.Mode)
o... | [
-0.6980766654014587,
-0.5018628835678101,
0.12567013502120972,
-0.5170896649360657,
-0.3482888340950012,
-0.5634930729866028,
0.3751041293144226,
-0.1598328948020935,
0.5421410799026489,
0.2501099109649658,
-0.33861127495765686,
0.3118131160736084,
-0.0962735265493393,
0.016276556998491287... |
func (v *VideoAnalyzerPreset) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", v, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "audioLanguage":
err = unpop... | [
-0.9267386794090271,
0.05754290521144867,
0.7341551780700684,
-1.030307412147522,
-0.7912719249725342,
-0.8166554570198059,
0.1935538947582245,
-0.6568506360054016,
-0.04238579049706459,
0.2854052782058716,
0.16050408780574799,
0.16241440176963806,
0.044168055057525635,
0.5783348679542542,... |
func (v VideoLayer) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "adaptiveBFrame", v.AdaptiveBFrame)
populate(objectMap, "bFrames", v.BFrames)
populate(objectMap, "bitrate", v.Bitrate)
populate(objectMap, "frameRate", v.FrameRate)
populate(objectMap, "height", v.Height)
p... | [
-0.0418999046087265,
-0.9881157875061035,
0.36602193117141724,
-0.26701655983924866,
-0.5504730343818665,
-0.9989215731620789,
0.15114696323871613,
0.2814326286315918,
0.27541518211364746,
0.3220483660697937,
-1.6235899925231934,
1.0553909540176392,
-0.5550143122673035,
1.174139142036438,
... |
func (v *VideoLayer) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", v, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "adaptiveBFrame":
err = unpopulate(va... | [
-0.23905323445796967,
-0.2880982756614685,
0.8494691252708435,
-0.6881994009017944,
-0.8548433780670166,
-0.6551709771156311,
0.3358931839466095,
-0.3202466070652008,
-0.14505112171173096,
0.37146085500717163,
-0.8321851491928101,
0.762531578540802,
-0.584983229637146,
1.3406383991241455,
... |
func (v VideoOverlay) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "audioGainLevel", v.AudioGainLevel)
populate(objectMap, "cropRectangle", v.CropRectangle)
populate(objectMap, "end", v.End)
populate(objectMap, "fadeInDuration", v.FadeInDuration)
populate(objectMap, "fadeO... | [
-0.36426615715026855,
-0.6879366636276245,
0.17486117780208588,
-0.5526356101036072,
-1.3616693019866943,
-0.8369392156600952,
0.08930625021457672,
0.06047080084681511,
0.7918139696121216,
0.3168271780014038,
-1.4174236059188843,
0.017799682915210724,
-0.35070449113845825,
0.33760118484497... |
func (v *VideoOverlay) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", v, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "audioGainLevel":
err = unpopulate(... | [
-0.7290725111961365,
-0.24043722450733185,
0.8175508379936218,
-0.6407357454299927,
-1.0582424402236938,
-0.6564607620239258,
0.33778896927833557,
-0.6170753836631775,
0.21627910435199738,
0.3947632312774658,
-0.7119211554527283,
0.14835424721240997,
-0.2291429340839386,
0.8799968957901001... |
func (v VideoTrack) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
objectMap["@odata.type"] = "#Microsoft.Media.VideoTrack"
return json.Marshal(objectMap)
} | [
-0.06271284073591232,
-0.3585945963859558,
0.2171853631734848,
0.10658898204565048,
-0.38246920704841614,
-0.3560493588447571,
-0.2655733525753021,
0.26730066537857056,
0.4355063736438751,
0.14840444922447205,
-0.9394078254699707,
0.8141487836837769,
-0.4375459849834442,
0.5691473484039307... |
func (v *VideoTrack) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", v, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "@odata.type":
err = unpopulate(val, ... | [
-0.39051979780197144,
0.38059645891189575,
0.7452230453491211,
-0.876130223274231,
-0.643635630607605,
-0.43752893805503845,
0.171315997838974,
-0.4726240634918213,
-0.27588218450546265,
0.4300764203071594,
-0.22043348848819733,
0.5296577215194702,
-0.4011530876159668,
0.8448242545127869,
... |
func (v VideoTrackDescriptor) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
objectMap["@odata.type"] = "#Microsoft.Media.VideoTrackDescriptor"
return json.Marshal(objectMap)
} | [
0.5116579532623291,
-0.25327688455581665,
0.3214891850948334,
-0.40382304787635803,
-0.298844575881958,
-0.25169384479522705,
-0.162680983543396,
0.7434525489807129,
0.036706507205963135,
0.16233618557453156,
-0.40999162197113037,
0.7632067799568176,
-0.06238128989934921,
0.836180329322814... |
func (v *VideoTrackDescriptor) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", v, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "@odata.type":
err = unpopu... | [
-0.023912915959954262,
0.4494076371192932,
0.7532395124435425,
-1.2129201889038086,
-0.6946027874946594,
-0.5220242738723755,
0.03649941831827164,
-0.06152714788913727,
-0.6416464447975159,
0.46929121017456055,
0.18879200518131256,
0.5333037972450256,
0.012436874210834503,
0.95209783315658... |
func NewFilecoinRetrievalProviderAdmin(settings ProviderAdminSettings) *FilecoinRetrievalProviderAdmin {
return &FilecoinRetrievalProviderAdmin{
Settings: settings,
ActiveProviders: make(map[string]register.ProviderRegistrar),
ActiveProvidersLock: sync.RWMutex{},
AdminApiCaller: adminapi.Ne... | [
0.1260424554347992,
0.04030393436551094,
-0.08107796311378479,
-0.4371679127216339,
0.049041084945201874,
0.13989800214767456,
-0.6293076276779175,
-0.34448274970054626,
0.6592898964881897,
0.39743366837501526,
-0.04700954630970955,
0.6136304140090942,
-0.5525532960891724,
-0.1639317572116... |
func (c *FilecoinRetrievalProviderAdmin) InitialiseProvider(providerRegistrar register.ProviderRegistrar, providerPrivKey *fcrcrypto.KeyPair, providerPrivKeyVer *fcrcrypto.KeyVersion) error {
err := c.AdminApiCaller.RequestInitialiseKey(providerRegistrar, providerPrivKey, providerPrivKeyVer, c.Settings.providerAdminPr... | [
-0.5709006190299988,
0.2887846529483795,
0.22825486958026886,
-0.26947927474975586,
0.5782390832901001,
-0.3058660626411438,
0.07811543345451355,
0.2317664623260498,
0.5156207084655762,
0.8325502276420593,
-0.49756401777267456,
0.9920915961265564,
-1.209399700164795,
0.6640130877494812,
... |
func (c *FilecoinRetrievalProviderAdmin) InitialiseProviderV2(
providerRegistrar register.ProviderRegistrar,
providerPrivKey *fcrcrypto.KeyPair,
providerPrivKeyVer *fcrcrypto.KeyVersion,
lotusWalletPrivateKey string,
lotusAP string,
lotusAuthToken string,
) error {
err := c.AdminApiCaller.RequestInitialiseKeyV2(... | [
-0.47920337319374084,
-0.32152071595191956,
0.28434890508651733,
-0.09507646411657333,
0.21323338150978088,
-0.5583409070968628,
-0.16766244173049927,
0.31200966238975525,
0.4058517813682556,
0.4779960513114929,
-0.8154382705688477,
1.6368159055709839,
-1.2179410457611084,
0.37252855300903... |
func (c *FilecoinRetrievalProviderAdmin) PublishGroupCID(providerID *nodeid.NodeID, cids []cid.ContentID, price uint64, expiry int64, qos uint64) error {
c.ActiveProvidersLock.RLock()
defer c.ActiveProvidersLock.RUnlock()
providerRegistrar, exists := c.ActiveProviders[providerID.ToString()]
if !exists {
return er... | [
-0.6677846312522888,
0.0509730726480484,
0.2685437500476837,
-0.2045588493347168,
0.2172795832157135,
-0.7226963639259338,
0.14227449893951416,
-0.20277151465415955,
-0.6402949690818787,
1.232953429222107,
0.7428082227706909,
1.474212884902954,
-1.36228609085083,
0.3451499342918396,
0.34... |
func (c *FilecoinRetrievalProviderAdmin) PublishDHTCID(providerID *nodeid.NodeID, cids []cid.ContentID, price []uint64, expiry []int64, qos []uint64) error {
c.ActiveProvidersLock.RLock()
defer c.ActiveProvidersLock.RUnlock()
providerRegistrar, exists := c.ActiveProviders[providerID.ToString()]
if !exists {
retur... | [
-0.2870427668094635,
0.23293739557266235,
0.22301223874092102,
-0.4098329246044159,
0.5058117508888245,
-0.1592881679534912,
-0.13109031319618225,
-0.4052466154098511,
-0.00450180983170867,
1.0757286548614502,
0.31416675448417664,
1.230983853340149,
-0.8236022591590881,
0.28485795855522156... |
func (c *FilecoinRetrievalProviderAdmin) GetGroupCIDOffer(providerID *nodeid.NodeID, gatewayIDs []nodeid.NodeID) (bool, []cidoffer.CIDOffer, error) {
c.ActiveProvidersLock.RLock()
defer c.ActiveProvidersLock.RUnlock()
providerRegistrar, exists := c.ActiveProviders[providerID.ToString()]
if !exists {
return false,... | [
-0.301728218793869,
-0.10482363402843475,
0.43794819712638855,
-0.24170687794685364,
0.2607698142528534,
-0.13371744751930237,
0.09383099526166916,
-0.107838936150074,
-0.8554143309593201,
0.9214568734169006,
0.41434261202812195,
1.2413904666900635,
-1.8334294557571411,
0.6387653946876526,... |
func (c *FilecoinRetrievalProviderAdmin) ForceUpdate(providerID *nodeid.NodeID) error {
c.ActiveProvidersLock.RLock()
defer c.ActiveProvidersLock.RUnlock()
providerRegistrar, exists := c.ActiveProviders[providerID.ToString()]
if !exists {
return errors.New("unable to find the provider in admin storage")
}
retur... | [
-1.0166122913360596,
0.6426711082458496,
0.04716033488512039,
-0.5142983198165894,
0.884580671787262,
-0.10049354285001755,
-0.5245101451873779,
-0.8551962971687317,
0.626362681388855,
1.3045965433120728,
-0.46565330028533936,
1.446589469909668,
-0.8665309548377991,
0.18431402742862701,
... |
func New() *Config {
return NewConfig(true, true, "config", "yml")
} | [
0.560256838798523,
-0.26894569396972656,
0.09407706558704376,
0.8843699097633362,
-0.9378430843353271,
-1.041614294052124,
-0.2481532245874405,
1.2710175514221191,
-1.3312959671020508,
-0.1688622236251831,
-0.919194221496582,
-0.22378738224506378,
1.2046079635620117,
1.6035935878753662,
... |
func NewConfig(
loadGlobalConfig, loadUserConfig bool,
configName, configType string) *Config {
log.Debug("initializing configuration")
c := &Config{
secureConfig: secureConfig{},
plainTextConfig: plainTextConfig{},
Viper: viper.New(),
GlobalFlags: &flag.FlagSet{},
Addit... | [
0.380104660987854,
-0.4393022358417511,
0.6658627390861511,
0.6560831069946289,
-0.1552376002073288,
0.21536339819431305,
0.20975805819034576,
0.3254581093788147,
-0.6798198819160461,
0.7066333889961243,
-0.06023324280977249,
0.20867197215557098,
-0.20495903491973877,
0.6090937852859497,
... |
func (c *Config) JSONMarshalStrategy() JSONMarshalStrategy {
return c.jsonMarshalStrategy
} | [
0.22509782016277313,
-0.661232590675354,
0.3777788579463959,
-1.1702903509140015,
-0.40349695086479187,
-0.2519412636756897,
-0.5619962811470032,
-0.608478844165802,
1.1601985692977905,
-0.14948982000350952,
0.8568890690803528,
0.3644762933254242,
1.3203670978546143,
0.16445744037628174,
... |
func (c *Config) SetJSONMarshalStrategy(s JSONMarshalStrategy) {
c.jsonMarshalStrategy = s
} | [
0.17060919106006622,
-0.5291436910629272,
0.35046887397766113,
-0.8970396518707275,
-0.5122851133346558,
-0.024462314322590828,
-0.44587242603302,
-0.31002771854400635,
0.7826502323150635,
-0.154793381690979,
0.06553202867507935,
0.5542176961898804,
1.4407563209533691,
0.7992798686027527,
... |
func (c *Config) Copy() (*Config, error) {
newC := New()
c.Viper.Unmarshal(&newC.plainTextConfig)
c.Viper.Unmarshal(&newC.secureConfig)
return newC, nil
} | [
-0.6891735792160034,
-1.2140593528747559,
0.34892937541007996,
0.517842173576355,
-1.244042158126831,
0.7205526828765869,
-0.33978086709976196,
0.4244348704814911,
-0.19964279234409332,
0.9586711525917053,
-0.5891302824020386,
-0.23269684612751007,
-0.7186928391456604,
-0.17812389135360718... |
func FromJSON(from string) (*Config, error) {
c := New()
if err := json.Unmarshal([]byte(from), c); err != nil {
return nil, err
}
c.sync()
return c, nil
} | [
-0.36194363236427307,
-0.19330544769763947,
0.4769003093242645,
-0.32819175720214844,
-1.5778183937072754,
-0.11056819558143616,
-0.555256724357605,
-0.3663037121295929,
0.26041874289512634,
0.3150527775287628,
-1.1206762790679932,
0.3957725465297699,
-0.42987924814224243,
-0.0863508507609... |
func (c *Config) ToJSON() (string, error) {
buf, _ := c.marshalJSON(JSONMarshalPlainText)
return string(buf), nil
} | [
-0.11103600263595581,
-0.25569620728492737,
0.47880104184150696,
-0.35502317547798157,
-0.9747347831726074,
-0.05279344320297241,
0.06927987933158875,
0.40396276116371155,
0.29460421204566956,
1.0614650249481201,
-0.7154670357704163,
-0.06665850430727005,
-0.5807068943977356,
-0.4348443150... |
func (c *Config) ToSecureJSON() (string, error) {
buf, _ := c.marshalJSON(JSONMarshalSecure)
return string(buf), nil
} | [
-0.6690685749053955,
-0.4290144145488739,
0.4849069118499756,
-0.44568008184432983,
-0.5698744058609009,
-0.6948490142822266,
-0.35175466537475586,
-0.4971098303794861,
0.678723931312561,
1.076758623123169,
-1.3962225914001465,
0.8163274526596069,
-0.23194801807403564,
-0.3518425524234772,... |
func (c *Config) MarshalJSON() ([]byte, error) {
return c.marshalJSON(c.jsonMarshalStrategy)
} | [
0.10394016653299332,
-0.28853434324264526,
0.23324552178382874,
0.2850712537765503,
-0.20556534826755524,
-0.6346608400344849,
0.023214060813188553,
0.484726220369339,
0.6773297786712646,
0.3106760084629059,
-0.225863978266716,
0.5841614007949829,
0.27570682764053345,
0.7704079151153564,
... |
func (c *Config) ReadConfig(in io.Reader) error {
if in == nil {
return errors.New("config reader is nil")
}
c.Viper.ReadConfigNoNil(in)
c.Viper.Unmarshal(&c.secureConfig)
c.Viper.Unmarshal(&c.plainTextConfig)
for key := range keys {
c.updateFlag(key, c.GlobalFlags)
c.updateFlag(key, c.AdditionalFlags)
... | [
-0.5213707089424133,
-0.4259708821773529,
0.3274233043193817,
-0.036667607724666595,
0.10898812860250473,
0.3176707625389099,
0.4390107989311218,
1.3193401098251343,
-0.8266253471374512,
0.3530738651752472,
-0.4843701422214508,
0.05179247260093689,
-0.21157440543174744,
0.9479840993881226,... |
func (c *Config) ReadConfigFile(filePath string) error {
buf, err := ioutil.ReadFile(filePath)
if err != nil {
return err
}
return c.ReadConfig(bytes.NewBuffer(buf))
} | [
0.01623375713825226,
0.5820320844650269,
0.10982992500066757,
-0.0659930631518364,
0.05567985773086548,
0.6457834839820862,
0.06692726165056229,
0.062114689499139786,
-1.775363802909851,
1.2203013896942139,
-0.6834596395492554,
-0.6363720297813416,
-0.3164467513561249,
0.7021039724349976,
... |
func (c *Config) EnvVars() []string {
evArr := make([]string, len(keys))
for k, v := range keys {
evArr = append(evArr,
fmt.Sprintf("%s=%s", v.EnvVar, c.Viper.GetString(k)))
}
return evArr
} | [
-1.2542312145233154,
-0.39983513951301575,
0.033890970051288605,
-1.0413635969161987,
0.37774011492729187,
0.7217375636100769,
-1.5112004280090332,
0.05161455646157265,
-0.8204177618026733,
1.3636815547943115,
-0.19995670020580292,
0.7884095311164856,
-0.7360215783119202,
0.901171982288360... |
func main() {
OrgPath := "/Volumes/HD2/temp"
Recurse := true
walkFn := func(path string, info os.FileInfo, err error) error {
stat, err := os.Stat(path)
if err != nil {
return err
}
if stat.IsDir() && path != OrgPath && !Recurse {
fmt.Println("skipping dir:", path)
return filepath.SkipDir
}
if... | [
0.08907389640808105,
-0.4962180256843567,
1.0842012166976929,
0.7881832122802734,
0.34861379861831665,
0.6982535719871521,
1.4417365789413452,
-0.6061084866523743,
-0.4158056080341339,
-0.9038802981376648,
0.7304840087890625,
0.06177815422415733,
-0.35867956280708313,
0.2702321410179138,
... |
func main() {
// create new connection
client := newClient()
// set value
err := hSetValue(client)
if err != nil {
fmt.Println("Error at set value", err)
}
} | [
0.41791027784347534,
0.1874150186777115,
0.6667273640632629,
0.9907313585281372,
0.4652549922466278,
0.6149371266365051,
0.5340056419372559,
0.2831510901451111,
-1.4781475067138672,
0.18897229433059692,
0.02136901766061783,
0.8542121052742004,
0.13803072273731232,
0.08162754774093628,
0.... |
func (c Command) Output(args ...string) ([]byte, error) {
return c.builder().Output(args...)
} | [
0.180557519197464,
0.286584734916687,
0.315459281206131,
0.8029986619949341,
0.06155744194984436,
-0.46412694454193115,
0.3587932884693146,
0.020588859915733337,
-0.7484174370765686,
-0.5435405969619751,
-0.6987740993499756,
0.45493394136428833,
-1.1570546627044678,
0.638836145401001,
-0... |
func (c Command) Start(args ...string) error {
return c.builder().Start(args...)
} | [
0.4583159387111664,
-0.028634678572416306,
0.27766498923301697,
1.1408151388168335,
0.9154267907142639,
0.32703840732574463,
0.5958001613616943,
0.9968629479408264,
-0.6256362795829773,
-0.6801508665084839,
-0.8338643908500671,
1.1960852146148682,
-0.06020244583487511,
0.6832883358001709,
... |
func (c Command) Run(args ...string) error {
return c.builder().Run(args...)
} | [
0.04006420820951462,
-0.21376816928386688,
0.280224084854126,
0.738332986831665,
0.828291118144989,
0.5838564038276672,
0.4865434467792511,
0.7412554621696472,
-0.49340522289276123,
-1.3741425275802612,
-1.1596729755401611,
0.24545970559120178,
-0.5443261861801147,
0.41041994094848633,
-... |
func (c Command) WithOptions(options template.Options) *Builder {
b := c.builder()
b.options = options
return b
} | [
0.7805786728858948,
0.11923861503601074,
0.2673661708831787,
-0.2015506774187088,
-0.04848754033446312,
-0.521666407585144,
0.4165281057357788,
-0.21200433373451233,
0.7944120764732361,
-1.2240241765975952,
0.04471386969089508,
-0.5797315239906311,
-0.18539586663246155,
0.3908003568649292,... |
func (c Command) WithFunc(name string, function interface{}) *Builder {
b := c.builder()
b.funcs[name] = function
return b
} | [
0.593829870223999,
0.5216310620307922,
0.40182894468307495,
0.34249448776245117,
-0.5625551342964172,
-0.8280587196350098,
0.028368698433041573,
0.15585123002529144,
-0.05221211910247803,
-1.19110906124115,
-0.22315485775470734,
0.3535279333591461,
0.9185375571250916,
0.013870893977582455,... |
func (c Command) WithContext(context interface{}) *Builder {
b := c.builder()
b.context = context
return b
} | [
0.4773561358451843,
0.1793716847896576,
0.6553575992584229,
0.6616687774658203,
-0.6910025477409363,
0.1160389855504036,
0.19939541816711426,
-0.2022564858198166,
1.3807835578918457,
-1.3976577520370483,
-0.3094286620616913,
0.14552557468414307,
-0.4453021287918091,
0.13246169686317444,
... |
func (b *Builder) WithOptions(options template.Options) *Builder {
b.options = options
return b
} | [
0.32160666584968567,
0.3501685857772827,
0.18655970692634583,
-0.07010769844055176,
-0.11674454808235168,
-0.5590100288391113,
0.6866694092750549,
0.07606244832277298,
0.9639585614204407,
-0.7994784712791443,
-0.31354936957359314,
-1.130393385887146,
0.03710309788584709,
0.3420596420764923... |
func (b *Builder) WithFunc(name string, function interface{}) *Builder {
b.funcs[name] = function
return b
} | [
-0.05192755162715912,
0.7261324524879456,
0.2946833372116089,
0.5425848364830017,
-0.6168597340583801,
-0.637214720249176,
0.252647340297699,
0.35199102759361267,
0.14797009527683258,
-0.7102037668228149,
-0.44825777411460876,
0.304530531167984,
1.1263247728347778,
0.0048527526669204235,
... |
func (b *Builder) WithContext(context interface{}) *Builder {
b.context = context
return b
} | [
-0.012255673296749592,
0.4768367111682892,
0.5382147431373596,
0.9422667622566223,
-0.8431010842323303,
0.43919506669044495,
0.31294456124305725,
0.08524708449840546,
1.4975202083587646,
-0.8431684970855713,
-0.805174708366394,
-0.2210577130317688,
-0.3048352599143982,
0.0673733726143837,
... |
func (b *Builder) Output(args ...string) ([]byte, error) {
run, err := b.exec(args...)
if err != nil {
return nil, err
}
return run.Output()
} | [
-0.11447496712207794,
0.4564644992351532,
0.5611555576324463,
1.434788703918457,
-0.41858288645744324,
-0.38961419463157654,
0.36208614706993103,
0.021227948367595673,
-0.6390600800514221,
0.07407283037900925,
-0.2184344083070755,
0.3592192232608795,
-1.3727277517318726,
0.3395537436008453... |
func (b *Builder) Start(args ...string) error {
run, err := b.exec(args...)
if err != nil {
return err
}
return run.Start()
} | [
0.3931941092014313,
0.15261715650558472,
0.405086487531662,
1.6852965354919434,
0.5514866709709167,
0.43776848912239075,
0.47763845324516296,
0.9941478371620178,
-0.9112211465835571,
-0.10440994054079056,
-0.17832276225090027,
1.2085561752319336,
-0.3938087821006775,
0.37343835830688477,
... |
func (b *Builder) Run(args ...string) error {
run, err := b.exec(args...)
if err != nil {
return err
}
return run.Run()
} | [
-0.1471826732158661,
0.08051018416881561,
0.39714694023132324,
1.290712833404541,
0.5445542931556702,
0.48505935072898865,
0.48306116461753845,
0.7407439351081848,
-0.6830866932868958,
-0.5285834074020386,
-0.5133126378059387,
0.11417583376169205,
-1.0073126554489136,
0.3076467514038086,
... |
func NewNotificationsHandler(notifier *handlers.Notifier) *NotificationsHandler {
return &NotificationsHandler{notifier}
} | [
0.5719529390335083,
0.2062845528125763,
-0.34479448199272156,
0.4116356074810028,
-0.9495259523391724,
0.08483696728944778,
-0.400757759809494,
-0.9476138949394226,
0.1908036172389984,
-0.2569561004638672,
-0.35494619607925415,
-0.4457255005836487,
-0.11511655151844025,
0.9438463449478149,... |
func (nh *NotificationsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
w.Header().Add("Access-Control-Allow-Origin", "*")
msg := fmt.Sprintf("Notification pushed from the server at %s", time.Now().Format("15:04:05"))
nh.notifier.Notify([]byte(msg))
} | [
0.9779390692710876,
0.5510390996932983,
0.5094208121299744,
0.2445424348115921,
0.13206437230110168,
0.8139501214027405,
-0.206968292593956,
-0.08535252511501312,
-1.7013769149780273,
0.9181422591209412,
-0.5398651361465454,
0.38426095247268677,
-0.1919575184583664,
0.7145947217941284,
0... |
func writeToDB(exchange,queue,bindingKey,msg,errInfo string) {
//fmt.Println("in writeToDB(),111")
stmt, err := SqlDB.Prepare("insert into failed_message(exchange,queue,binding_key,message,error) values(?,?,?,?,?)")
FailOnError(err, "prepare error")
_,err = stmt.Exec(exchange, queue, bindingKey, msg, errInfo)
Fail... | [
-0.9252610206604004,
-0.08382809907197952,
0.9267328381538391,
0.3196646273136139,
0.7497426271438599,
0.4085457921028137,
0.453778475522995,
0.2873460650444031,
-0.36894166469573975,
0.369401752948761,
-0.0283091738820076,
-0.24552704393863678,
-1.3018733263015747,
0.7505750060081482,
0... |
func (i *IAM) ListInstances(kt *kit.Kit, resType client.TypeID, filter *types.ListInstanceFilter,
page types.Page) (*types.ListInstanceResult, error) {
bizID, pbFilter, err := filter.GetBizIDAndPbFilter()
if err != nil {
return nil, err
}
countReq := &pbds.ListInstancesReq{
BizId: bizID,
ResourceTyp... | [
-1.0304685831069946,
-0.16559623181819916,
0.6677314639091492,
-0.9739263653755188,
-0.17459072172641754,
-0.19860120117664337,
0.29815226793289185,
-0.13528887927532196,
0.5874958634376526,
0.5625750422477722,
-0.005520772188901901,
0.6943046450614929,
-0.9316080808639526,
0.4485189318656... |
func (i *IAM) ListInstancesWithAttributes(ctx context.Context, opts *client.ListWithAttributes) (idList []string,
err error) {
// Note implement this when attribute auth is enabled
return make([]string, 0), nil
} | [
-1.734486699104309,
-0.7162497639656067,
0.5355168581008911,
-1.0995949506759644,
-0.3965361416339874,
0.3987949788570404,
0.2126571089029312,
-0.32805556058883667,
0.8297502994537354,
0.2795652449131012,
-0.486493319272995,
0.7577829360961914,
-0.7707740068435669,
0.3084443211555481,
-0... |
func peaksAndHeights(n int) (peaks, heights []int) {
pos := 0
for n-pos > 0 {
peakHeight := log2(n - pos + 1)
peakSize := pow2(peakHeight) - 1
peaks = append(peaks, pos+peakSize-1)
heights = append(heights, peakHeight-1)
pos += peakSize
}
return peaks, heights
} | [
-0.5143749713897705,
-0.1859477013349533,
0.5500220060348511,
0.5064465999603271,
-0.12332889437675476,
-0.45504555106163025,
-0.5042740106582642,
-0.44931939244270325,
-0.3365350067615509,
0.2378353625535965,
-1.5747228860855103,
-0.5565295219421387,
0.3255739212036133,
0.6153635382652283... |
func Advance(m *MMR) Node {
var r Node
r.Pos = m.Len()
np := len(m.peaks)
// Non-leaf?
if len(m.heights) >= 2 && m.heights[np-1] == m.heights[np-2] {
r.Height = m.heights[np-1] + 1
m.peaks = m.peaks[:np-2]
m.heights = m.heights[:np-2]
}
m.peaks = append(m.peaks, r.Pos)
m.heights = append(m.heights, r.Hei... | [
-0.20242606103420258,
-0.39402395486831665,
0.847915530204773,
-0.5125765204429626,
-0.48378852009773254,
0.23197346925735474,
-0.27384859323501587,
-0.5449863076210022,
-0.13217543065547943,
0.1066599190235138,
0.4688904881477356,
-0.04519478976726532,
-0.21410486102104187,
0.511757194995... |
func New(n int) MMR {
peaks, heights := peaksAndHeights(n)
return MMR{
peaks: peaks,
heights: heights,
}
} | [
-0.24977318942546844,
-0.9206079244613647,
0.08623164892196655,
-0.1886967569589615,
-0.4742543697357178,
-0.7435122728347778,
-0.8051152229309082,
-0.7019626498222351,
0.11562079936265945,
-0.2999655604362488,
-0.40132471919059753,
-0.5798296928405762,
0.473371684551239,
1.527758717536926... |
func (m MMR) Digest() Path {
var path Path
for _, p := range m.peaks {
path = append(path, PathEntry{op: PUSHPOS, pos: p})
}
return path
} | [
0.5895929932594299,
-0.6114595532417297,
0.49612370133399963,
0.20794184505939484,
0.43629205226898193,
0.7958207130432129,
0.6782759428024292,
0.29677706956863403,
0.24697422981262207,
-0.07160182297229767,
0.742597222328186,
-0.6450287699699402,
-0.1239834651350975,
0.320060670375824,
... |
func (m MMR) Has(pos int) Path {
if pos >= m.Len() {
panic(fmt.Sprintf("pos %d does not exist in MMR of size %d", pos, m.Len()))
}
var path Path
found := false
for i, p := range m.peaks {
if !found {
if p < pos {
path = append(path, PathEntry{op: PUSHPOS, pos: p})
continue
}
found = true
no... | [
1.3683925867080688,
-0.1837673783302307,
0.7185391187667847,
-0.5640271902084351,
-0.39170101284980774,
-0.08607517182826996,
0.08064033836126328,
0.6952856183052063,
0.2587600350379944,
0.1402875781059265,
0.15589985251426697,
-0.6149253249168396,
-0.44587692618370056,
0.40084418654441833... |
func (m1 MMR) To(m2 MMR) Path {
var path Path
if m2.Len() < m1.Len() {
panic(fmt.Sprintf("consistency cannot be shown from MMR of size %d to MMR of size %d", m1.Len(), m2.Len()))
}
lastPeak := m1.peaks[len(m1.peaks)-1]
found := false
for i, p := range m2.peaks {
if !found {
if p < lastPeak {
continue
... | [
0.08678553998470306,
0.16342422366142273,
0.7054163813591003,
-0.44053229689598083,
-0.318670392036438,
-0.09800370782613754,
0.4781651496887207,
0.2073650360107422,
0.09178882092237473,
0.8753337264060974,
0.5794885754585266,
0.7183300852775574,
-0.2015439122915268,
-0.08985549956560135,
... |
func TestVoting(t *testing.T) {
// Define the various voting scenarios to test
tests := []struct {
epoch uint64
validators []string
votes []testerVote
results []string
}{
{
// Single validator, no votes cast
validators: []string{"A"},
votes: []testerVote{{validator: "A"}},
res... | [
-1.1216356754302979,
0.3792770206928253,
0.6553953289985657,
0.22385966777801514,
0.5348584055900574,
0.22045502066612244,
-0.10093757510185242,
-0.33019545674324036,
-0.08567388355731964,
0.29018497467041016,
-0.4096437096595764,
-0.2688414454460144,
-0.26897796988487244,
0.47056072950363... |
func TestOneLogger(t *testing.T) {
// Default output to stderr
SetLevel(LevelDebug)
Debug("stderr: Debug")
Debugf("stderr: Debug%s", "f")
Info("stderr: Info")
Infof("stderr: Info%s", "f")
Warn("stderr: Warn")
Warnf("stderr: Warn%s", "f")
Error("stderr: Error")
Errorf("stderr: Error%s", "f")
//Panic("stderr: ... | [
0.3388616442680359,
-0.528753936290741,
0.7423824071884155,
-0.21771030128002167,
-0.042661603540182114,
0.2485019713640213,
0.8284475207328796,
-0.3598877489566803,
-0.3434770107269287,
-0.4097624719142914,
0.11563272774219513,
-0.6039904356002808,
0.746120035648346,
1.1020739078521729,
... |
func TestMultiLoggers(t *testing.T) {
// New logger for output stderr
logStd := New("", LevelDebug, os.Stderr)
logStd.Info("a stderr logger")
// New logger for output file
fw, err := FileWriter("logs/test.log")
if err != nil {
panic(err)
return
}
logFile := New("", LevelDebug, fw)
logFile.Info("a file log... | [
0.35153576731681824,
-0.48543688654899597,
0.6389108896255493,
0.431668758392334,
0.005348284728825092,
0.3761350214481354,
-0.06656111031770706,
-0.3064849376678467,
-0.7724003195762634,
-0.19958490133285522,
-0.4022384583950043,
-0.36593568325042725,
0.4691203832626343,
1.110719323158264... |
func TestMultiHandlers(t *testing.T) {
// New logger for output stderr
logStd := New("", LevelDebug, os.Stderr)
AddHandler(logStd)
// New logger for output file
fw, err := FileWriter("logs/test.log")
if err != nil {
panic(err)
}
logFile := New("", LevelDebug, fw)
AddHandler(logFile)
// Test
Debug("MultiH... | [
0.3137994110584259,
-0.6027714610099792,
0.7485767006874084,
0.5545302629470825,
-0.007615850307047367,
0.959143340587616,
0.2776358425617218,
-0.3983951210975647,
-0.6424887776374817,
-0.4093554615974426,
-0.2949526906013489,
-0.6694312691688538,
0.21649309992790222,
0.4457804560661316,
... |
func Test(t *testing.T) {
rw, err := NewRotateWriter("./logs/data.log", RotateTimeClose)
if err != nil {
panic(err)
}
SetOutput(rw)
Info("TEST INFO")
} | [
0.8285160660743713,
-0.025544244796037674,
0.5623549818992615,
0.06761482357978821,
0.7505314350128174,
0.47544780373573303,
1.2879161834716797,
-0.20584768056869507,
-0.7016580104827881,
-0.12216348201036453,
0.10274738818407059,
0.20128199458122253,
-0.886939287185669,
-0.169630661606788... |
func main() {
connectOpions, err := redis.ParseURL("redis://")
if err != nil {
panic(err)
}
client := redis.NewClient(connectOpions)
// initialize celery client
cli, _ := gocelery.NewCeleryClient(
gocelery.NewRedisBroker(client),
&gocelery.RedisCeleryBackend{UniversalClient: client},
1,
)
// prepare ... | [
0.5142509341239929,
1.0772771835327148,
1.394106149673462,
0.6164199709892273,
1.0666065216064453,
0.3392346501350403,
0.18004995584487915,
0.3744005560874939,
-1.0501153469085693,
0.8458867073059082,
-0.24558165669441223,
0.21068863570690155,
-0.35808664560317993,
-0.053588978946208954,
... |
func (o *UpdateHostLogsProgressReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 204:
result := NewUpdateHostLogsProgressNoContent()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}... | [
-0.14527617394924164,
-1.1781442165374756,
0.8547927141189575,
0.5506110787391663,
-0.8214218616485596,
-0.5691348910331726,
0.5685741305351257,
-0.14692166447639465,
0.04573383927345276,
0.6707509160041809,
0.033547405153512955,
-0.7402843236923218,
-1.3589725494384766,
-0.210409149527549... |
func NewUpdateHostLogsProgressNoContent() *UpdateHostLogsProgressNoContent {
return &UpdateHostLogsProgressNoContent{}
} | [
-0.24589450657367706,
-1.4471827745437622,
0.0628163293004036,
0.12592901289463043,
-1.4821562767028809,
0.11746525764465332,
0.7412412166595459,
0.2604907751083374,
-1.5502686500549316,
0.23534151911735535,
-0.8667678833007812,
-0.5679125189781189,
-1.1399803161621094,
-0.3314060866832733... |
func NewUpdateHostLogsProgressUnauthorized() *UpdateHostLogsProgressUnauthorized {
return &UpdateHostLogsProgressUnauthorized{}
} | [
-0.18212053179740906,
-1.414474606513977,
0.5302958488464355,
1.1530829668045044,
-1.5809245109558105,
0.07802436500787735,
0.498756468296051,
1.6310570240020752,
-1.1518203020095825,
0.06300805509090424,
-0.8005142211914062,
0.41511452198028564,
-0.7060133218765259,
-0.2489340454339981,
... |
func NewUpdateHostLogsProgressForbidden() *UpdateHostLogsProgressForbidden {
return &UpdateHostLogsProgressForbidden{}
} | [
0.27197468280792236,
-1.0185765027999878,
0.4784276485443115,
1.3387097120285034,
-1.644698143005371,
0.9465645551681519,
1.0103546380996704,
0.3773365914821625,
-1.1048141717910767,
0.27051860094070435,
-0.7080592513084412,
0.047346293926239014,
-0.9013096690177917,
-0.5635126233100891,
... |
func NewUpdateHostLogsProgressNotFound() *UpdateHostLogsProgressNotFound {
return &UpdateHostLogsProgressNotFound{}
} | [
0.022698083892464638,
-1.9531114101409912,
0.1253448873758316,
0.4182521104812622,
-0.5459669828414917,
0.9978946447372437,
0.6049651503562927,
0.874140202999115,
-1.073021411895752,
0.3744860291481018,
-0.6995453238487244,
-0.09917378425598145,
-0.8135046362876892,
0.23707228899002075,
... |
func NewUpdateHostLogsProgressMethodNotAllowed() *UpdateHostLogsProgressMethodNotAllowed {
return &UpdateHostLogsProgressMethodNotAllowed{}
} | [
0.09089889377355576,
-0.2748678922653198,
0.622592568397522,
0.9402093291282654,
-1.615332841873169,
0.8636911511421204,
0.9256253838539124,
0.11179894208908081,
-1.502148985862732,
0.6531219482421875,
0.5421656966209412,
-0.04570707678794861,
-0.9060326218605042,
-0.18400898575782776,
-... |
func NewUpdateHostLogsProgressConflict() *UpdateHostLogsProgressConflict {
return &UpdateHostLogsProgressConflict{}
} | [
0.16057519614696503,
-1.588103175163269,
0.6331868767738342,
0.7150225043296814,
-1.0261048078536987,
0.4960917532444,
0.6753329038619995,
1.0082420110702515,
-1.2348099946975708,
0.36854374408721924,
0.012179740704596043,
-0.568689227104187,
-1.11717689037323,
0.14623132348060608,
0.287... |
func NewUpdateHostLogsProgressServiceUnavailable() *UpdateHostLogsProgressServiceUnavailable {
return &UpdateHostLogsProgressServiceUnavailable{}
} | [
-0.9990431666374207,
-1.2997567653656006,
0.5760992765426636,
0.4872906804084778,
-0.8344175815582275,
0.5625284910202026,
0.44212695956230164,
1.623682975769043,
-0.9212101697921753,
0.27915158867836,
-0.2655760645866394,
-0.2880488932132721,
-0.16155846416950226,
-0.255558043718338,
0.... |
func init() {
apiauditMixin := schema.APIAudit{}.Mixin()
apiauditMixinFields0 := apiauditMixin[0].Fields()
_ = apiauditMixinFields0
apiauditFields := schema.APIAudit{}.Fields()
_ = apiauditFields
// apiauditDescCreatedAt is the schema descriptor for created_at field.
apiauditDescCreatedAt := apiauditMixinFields0... | [
-0.2238484025001526,
-0.12628531455993652,
0.6032174229621887,
-0.2816062271595001,
1.030847191810608,
-0.021849000826478004,
0.33177128434181213,
0.4037490785121918,
-0.1300378143787384,
-0.4385800063610077,
-0.8879765272140503,
0.295261949300766,
0.27087467908859253,
-0.00038857274921610... |
func decryptSessionTicket(staticPv crypto.PrivateKey, ticket []byte) ([]byte, uint32, error) {
ec := ecdh.NewCurve25519ECDH()
ephPub, _ := ec.Unmarshal(ticket[0:32])
key, err := ec.GenerateSharedSecret(staticPv, ephPub)
if err != nil {
return nil, 0, err
}
UIDsID := util.AESDecrypt(ticket[0:16], key, ticket[32:... | [
-0.33419016003608704,
-0.2574130594730377,
0.5456541180610657,
-0.3423309326171875,
-0.29518580436706543,
0.7757121920585632,
0.8268508911132812,
-0.2538994550704956,
0.8578535318374634,
0.37559759616851807,
-0.6977642178535461,
-0.1465182900428772,
-0.46907874941825867,
-0.258497416973114... |
func (e SymptomEdges) RepairInformationOrErr() ([]*RepairInvoice, error) {
if e.loadedTypes[0] {
return e.RepairInformation, nil
}
return nil, &NotLoadedError{edge: "repair_information"}
} | [
-0.561793327331543,
-0.5455889701843262,
0.30827903747558594,
-0.6423168778419495,
0.4157084822654724,
-0.51688152551651,
-0.4351109564304352,
-0.47495225071907043,
0.571395754814148,
-0.015523129142820835,
0.5367815494537354,
-0.015196500346064568,
-0.5552140474319458,
-0.3608854711055755... |
func (*Symptom) scanValues() []interface{} {
return []interface{}{
&sql.NullInt64{}, // id
&sql.NullString{}, // Syname
}
} | [
-0.34505534172058105,
0.208718404173851,
0.36966732144355774,
0.5807463526725769,
-0.23206977546215057,
-0.8500306010246277,
-1.0635322332382202,
0.183301642537117,
0.9058855772018433,
-0.9420568943023682,
-0.6948074102401733,
-0.13450363278388977,
-0.3400266468524933,
0.6411537528038025,
... |
func (s *Symptom) assignValues(values ...interface{}) error {
if m, n := len(values), len(symptom.Columns); m < n {
return fmt.Errorf("mismatch number of scan values: %d != %d", m, n)
}
value, ok := values[0].(*sql.NullInt64)
if !ok {
return fmt.Errorf("unexpected type %T for field id", value)
}
s.ID = int(va... | [
-0.3306930661201477,
0.006737607531249523,
0.6015864610671997,
0.32748404145240784,
0.522373378276825,
-0.4841126799583435,
-0.15096735954284668,
0.8832917809486389,
0.3686346113681793,
-0.3413640260696411,
-0.4019668400287628,
-0.7945824861526489,
-0.14567133784294128,
0.7264499068260193,... |
func (s *Symptom) QueryRepairInformation() *RepairInvoiceQuery {
return (&SymptomClient{config: s.config}).QueryRepairInformation(s)
} | [
0.6503811478614807,
-0.40446487069129944,
0.2039572298526764,
-0.7977269291877747,
0.1364104449748993,
-1.512558937072754,
-0.08782745897769928,
0.9783096313476562,
0.47389575839042664,
-1.0220444202423096,
-0.1343233585357666,
0.300599604845047,
-0.8648127913475037,
-1.341312289237976,
... |
func (s *Symptom) Update() *SymptomUpdateOne {
return (&SymptomClient{config: s.config}).UpdateOne(s)
} | [
0.6939460039138794,
-0.5159733295440674,
-0.014061587862670422,
0.07218681275844574,
0.042795222252607346,
-0.9723874926567078,
0.13662691414356232,
0.46466031670570374,
1.2149920463562012,
0.17551983892917633,
-1.0885229110717773,
0.37461161613464355,
-1.12944757938385,
-1.117885351181030... |
func (s *Symptom) Unwrap() *Symptom {
tx, ok := s.config.driver.(*txDriver)
if !ok {
panic("ent: Symptom is not a transactional entity")
}
s.config.driver = tx.drv
return s
} | [
0.1561315506696701,
0.2982117831707001,
0.29479464888572693,
-0.5158808827400208,
0.26690784096717834,
-0.9714906811714172,
0.5855743288993835,
1.0584068298339844,
0.4946201741695404,
0.4806622862815857,
0.11611068993806839,
0.15158581733703613,
0.42003992199897766,
-0.984470546245575,
0... |
func (s *Symptom) String() string {
var builder strings.Builder
builder.WriteString("Symptom(")
builder.WriteString(fmt.Sprintf("id=%v", s.ID))
builder.WriteString(", Syname=")
builder.WriteString(s.Syname)
builder.WriteByte(')')
return builder.String()
} | [
0.6834293603897095,
-1.3069000244140625,
0.09630432724952698,
-0.4429301619529724,
0.16431894898414612,
-0.13514776527881622,
0.4998684823513031,
-0.007928061299026012,
0.25600287318229675,
-0.39455917477607727,
-0.9785425662994385,
0.8484519124031067,
-0.30311107635498047,
-1.168123364448... |
func NewFakeHandler(allow bool) Handler {
return &fakeHandler{allow: allow}
} | [
-0.31499549746513367,
0.2273314744234085,
0.17148788273334503,
0.857163667678833,
-1.3634408712387085,
0.563301682472229,
-0.04598871245980263,
0.1086200699210167,
0.19825950264930725,
0.3142912685871124,
-0.09694209694862366,
-0.2911175787448883,
-1.91494619846344,
0.5258787274360657,
-... |
func NewCreateOverrideRules(rules string) *CreateOverrideRules {
this := CreateOverrideRules{}
this.Rules = rules
return &this
} | [
-0.123964823782444,
0.5611466765403748,
0.3347425162792206,
0.0409114733338356,
0.6148231029510498,
0.10538287460803986,
0.6069239974021912,
-0.41688400506973267,
-0.13598285615444183,
0.08620397746562958,
-0.7572932839393616,
0.4071708023548126,
-1.7302985191345215,
0.3394949436187744,
... |
func NewCreateOverrideRulesWithDefaults() *CreateOverrideRules {
this := CreateOverrideRules{}
return &this
} | [
0.5224155187606812,
0.6473659873008728,
0.09477732330560684,
0.1999400407075882,
1.3857218027114868,
-0.22628472745418549,
0.1861693561077118,
-0.5850664377212524,
-0.2335379421710968,
-0.13883256912231445,
-0.838219940662384,
-0.6160305142402649,
-1.157254695892334,
0.8058574199676514,
... |
func (o *CreateOverrideRules) GetRules() string {
if o == nil {
var ret string
return ret
}
return o.Rules
} | [
0.3892265558242798,
0.5966388583183289,
-0.3908136785030365,
0.023309752345085144,
0.9334613680839539,
0.20261721312999725,
0.5756568908691406,
-0.2858169674873352,
0.8029071688652039,
-0.7754270434379578,
0.5069734454154968,
-0.9907098412513733,
-0.5928278565406799,
0.051791660487651825,
... |
func (o *CreateOverrideRules) GetRulesOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Rules, true
} | [
0.8910444378852844,
1.0934842824935913,
0.3399549722671509,
-0.2570774257183075,
0.6593294143676758,
0.682216465473175,
0.7724114656448364,
-0.30697640776634216,
-0.06315053254365921,
0.8973281979560852,
-0.7069616317749023,
-1.2399075031280518,
0.11029452085494995,
0.005842444021254778,
... |
func (o *CreateOverrideRules) SetRules(v string) {
o.Rules = v
} | [
0.19531428813934326,
0.9435203075408936,
-0.11685647815465927,
-0.5998048186302185,
0.4036860167980194,
0.37529632449150085,
0.5803261995315552,
-0.2640377879142761,
-0.5531642436981201,
-0.12563282251358032,
-0.20363479852676392,
0.12252719700336456,
-1.30494225025177,
-0.0277914479374885... |
func (o *CreateOverrideRules) GetGroupGuid() string {
if o == nil || o.GroupGuid == nil {
var ret string
return ret
}
return *o.GroupGuid
} | [
0.528216540813446,
0.4201837182044983,
-0.10516787320375443,
0.7672476172447205,
0.2906445264816284,
0.336032509803772,
0.33305588364601135,
-0.38672491908073425,
0.2880006730556488,
0.015588370151817799,
0.33128252625465393,
-0.3788665235042572,
-1.3948404788970947,
0.9990063309669495,
... |
func (o *CreateOverrideRules) GetGroupGuidOk() (*string, bool) {
if o == nil || o.GroupGuid == nil {
return nil, false
}
return o.GroupGuid, true
} | [
0.11710770428180695,
0.4711116552352905,
0.5563014149665833,
0.47948986291885376,
0.8002061247825623,
1.0196694135665894,
1.0810185670852661,
0.5638040900230408,
-0.5153486132621765,
-0.019484179094433784,
-0.38937583565711975,
-0.5231823921203613,
-0.5751157402992249,
0.9538466930389404,
... |
func (o *CreateOverrideRules) HasGroupGuid() bool {
if o != nil && o.GroupGuid != nil {
return true
}
return false
} | [
0.7303056120872498,
0.48702573776245117,
0.17951765656471252,
0.22343868017196655,
0.6231443285942078,
-0.2570560574531555,
0.06202387809753418,
0.44982096552848816,
-0.5501368641853333,
-0.278585821390152,
0.03758934140205383,
-0.32483965158462524,
-0.6892734169960022,
1.0253212451934814,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.