text
stringlengths
11
6.3k
embedding
listlengths
768
768
func WithWorkflowTaskStartToCloseTimeout(ctx Context, d time.Duration) Context { ctx1 := setWorkflowEnvOptionsIfNotExist(ctx) getWorkflowEnvOptions(ctx1).taskStartToCloseTimeoutSeconds = common.Int32Ptr(int32(d.Seconds())) return ctx1 }
[ -0.09753425419330597, -0.3984159529209137, 0.527424693107605, -0.12023167312145233, 0.18752172589302063, 0.05707811191678047, 0.8360461592674255, 0.137874037027359, 0.4549892544746399, 0.6239408850669861, -0.07721411436796188, -0.41626060009002686, 0.9699648022651672, 0.8895055055618286, ...
func GetSignalChannel(ctx Context, signalName string) Channel { return getWorkflowEnvOptions(ctx).getSignalChannel(ctx, signalName) }
[ -0.03192906826734543, -0.20964041352272034, 0.4538509249687195, 0.27630043029785156, 0.15928128361701965, -0.11150099337100983, -0.5471785664558411, -0.5888665914535522, 0.969451904296875, -0.012204933911561966, 0.20363812148571014, 1.0479404926300049, -0.17461684346199036, 0.6966741681098...
func (b EncodedValue) Get(valuePtr interface{}) error { return getHostEnvironment().decodeArg(b, valuePtr) }
[ -0.30183738470077515, 0.046234581619501114, 0.3541182577610016, 0.44804510474205017, 0.0737636387348175, 0.49333691596984863, -0.005301920231431723, -0.12698547542095184, -0.5939152836799622, 0.17760281264781952, -0.340213805437088, 1.3537330627441406, -0.5316287875175476, 0.13932141661643...
func RequestInfo() *RequestInfoApplyConfiguration { return &RequestInfoApplyConfiguration{} }
[ -0.3263211250305176, -0.31300991773605347, 0.4910906255245209, 0.9045988917350769, -0.3767801821231842, -0.01401847880333662, -0.19325754046440125, 0.5300080180168152, 0.3290778696537018, -0.8243737816810608, -0.1035660058259964, -0.08803482353687286, 0.08904243260622025, 0.267807215452194...
func (b *RequestInfoApplyConfiguration) WithRoles(values ...string) *RequestInfoApplyConfiguration { for i := range values { b.Roles = append(b.Roles, values[i]) } return b }
[ -0.4997141659259796, 0.23065674304962158, 0.3660890460014343, -0.25292354822158813, 0.49904265999794006, 0.4112597703933716, -0.739447832107544, -0.47812309861183167, -0.024143151938915253, -1.1863723993301392, 0.9711712598800659, -0.9293410778045654, -0.1669558882713318, 0.251467317342758...
func (b *RequestInfoApplyConfiguration) WithClusterRoles(values ...string) *RequestInfoApplyConfiguration { for i := range values { b.ClusterRoles = append(b.ClusterRoles, values[i]) } return b }
[ 0.20039501786231995, 0.18784233927726746, 0.27909523248672485, 0.1869419664144516, 0.346446692943573, 0.4207702577114105, -0.35182252526283264, -0.0970693975687027, 0.2992410957813263, -0.12129208445549011, 0.5862137079238892, -0.9155462980270386, -0.5604471564292908, 0.08867988735437393, ...
func (b *RequestInfoApplyConfiguration) WithAdmissionUserInfo(value v1.UserInfo) *RequestInfoApplyConfiguration { b.AdmissionUserInfo = &value return b }
[ 0.7353911399841309, -0.08403000980615616, 0.31582894921302795, 0.46251779794692993, -1.2313923835754395, 0.9356324076652527, 0.3552091717720032, -0.2178453654050827, -0.5098024606704712, -0.0993623286485672, 0.8055186867713928, 0.12903250753879547, 1.058959722518921, 0.6828535795211792, ...
func (s *appendBlobSenderBase) generateAppendBlockToRemoteFunc(id common.ChunkID, appendBlock appendBlockFunc) chunkFunc { // Copy must be totally sequential for append blobs // The way we enforce that is simple: we won't even CREATE // a chunk func, until all previously-scheduled chunk funcs have completed // Here...
[ 0.7838660478591919, -0.13451442122459412, 0.8661216497421265, -0.08460398763418198, -0.43453449010849, -0.47173812985420227, 0.15807808935642242, 0.31530293822288513, -0.17194774746894836, 0.3132910430431366, -0.6398990154266357, 0.21511422097682953, -0.4416729211807251, 0.3598313927650451...
func (s *appendBlobSenderBase) GetDestinationLength() (int64, error) { prop, err := s.destAppendBlobClient.GetProperties(s.jptm.Context(), &blob.GetPropertiesOptions{CPKInfo: s.jptm.CpkInfo()}) if err != nil { return -1, err } if prop.ContentLength == nil { return -1, fmt.Errorf("destination content length no...
[ 0.02270331047475338, 0.3348050117492676, 0.5966921448707581, 0.5395280122756958, -0.3288189470767975, 0.518790066242218, 0.4724924862384796, -0.1548522710800171, -0.5883165001869202, 0.726010262966156, -0.3944098651409149, -0.5288836359977722, -0.6555328369140625, 0.09970322996377945, 0....
func SetKafka(bk *KafkaBroker) OptionFunc { return func(bi *brokerInstance) { bi.kafka = bk } }
[ -0.028823627158999443, -0.08641641587018967, 0.4624485671520233, 1.411670446395874, -0.31462621688842773, -0.34009596705436707, 1.341943383216858, 0.2553800046443939, 0.2823193669319153, 0.1283138245344162, -0.21318264305591583, 0.2729429304599762, -0.840498149394989, 0.3403674364089966, ...
func SetRabbitMQ(bk *RabbitMQBroker) OptionFunc { return func(bi *brokerInstance) { bi.rabbitmq = bk } }
[ -0.7183166742324829, -0.7867708802223206, 0.5889890193939209, -0.023461831733584404, -0.6386547088623047, 0.3188316524028778, 0.028968961909413338, 0.3871823847293854, -0.002296817023307085, 0.5764961242675781, -1.6654249429702759, 0.5412606000900269, -0.8737502098083496, 0.296485275030136...
func InitBrokers(opts ...OptionFunc) interfaces.Broker { brokerInst := new(brokerInstance) for _, opt := range opts { opt(brokerInst) } return brokerInst }
[ -0.5592551827430725, 0.5995662212371826, 0.4718061089515686, 0.0726628378033638, 0.28040191531181335, -0.4941118061542511, -0.37985360622406006, 0.4085129201412201, 0.05229364335536957, -0.364433228969574, -0.3536704182624817, 0.48963823914527893, -1.9446067810058594, 0.5182390809059143, ...
func NewFIBeneficiaryAdvice() *FIBeneficiaryAdvice { fiba := &FIBeneficiaryAdvice{ tag: TagFIBeneficiaryAdvice, } return fiba }
[ 0.1098632737994194, -0.6613502502441406, -0.13528546690940857, 0.298602432012558, 0.42760369181632996, -0.6050163507461548, 0.20711496472358704, -0.044390276074409485, -0.46329161524772644, 0.13987819850444794, 0.4912445545196533, 0.9794055223464966, -0.931952953338623, 0.5150294303894043,...
func (fiba *FIBeneficiaryAdvice) Parse(record string) error { if utf8.RuneCountInString(record) != 200 { return NewTagWrongLengthErr(200, len(record)) } fiba.tag = record[:6] fiba.Advice.AdviceCode = fiba.parseStringField(record[6:9]) fiba.Advice.LineOne = fiba.parseStringField(record[9:35]) fiba.Advice.LineTwo...
[ 0.39719119668006897, -0.15976130962371826, 0.4757617115974426, -0.45787501335144043, 0.6506003737449646, -1.1164038181304932, 0.13164162635803223, 0.07820210605859756, -0.49969956278800964, 0.48716095089912415, 0.16945461928844452, 0.5585379600524902, -0.4896579086780548, 0.570860564708709...
func (fiba *FIBeneficiaryAdvice) Validate() error { if fiba.tag != TagFIBeneficiaryAdvice { return fieldError("tag", ErrValidTagForType, fiba.tag) } if err := fiba.isAdviceCode(fiba.Advice.AdviceCode); err != nil { return fieldError("AdviceCode", err, fiba.Advice.AdviceCode) } if err := fiba.isAlphanumeric(fib...
[ -0.02711753360927105, -0.5791455507278442, 0.5818116068840027, -0.35889285802841187, 0.5468535423278809, -0.25438183546066284, 0.16154898703098297, -0.5506390929222107, -0.1430608630180359, 0.2176205962896347, 1.0190242528915405, 0.38740503787994385, -0.16310307383537292, 0.985295891761779...
func (fiba *FIBeneficiaryAdvice) AdviceCodeField() string { return fiba.alphaField(fiba.Advice.AdviceCode, 3) }
[ 0.5027308464050293, -0.051586784422397614, 0.24730780720710754, -0.6432549357414246, 0.4896007478237152, 1.2651708126068115, 0.3066437840461731, 0.23275618255138397, 0.005727705080062151, 1.1748484373092651, 0.6265084743499756, 0.19845956563949585, -1.2675954103469849, 0.5718203783035278, ...
func (fiba *FIBeneficiaryAdvice) LineOneField() string { return fiba.alphaField(fiba.Advice.LineOne, 26) }
[ 0.13557030260562897, -0.5765300989151001, 0.13151785731315613, -0.41189852356910706, 1.200326681137085, 1.360416293144226, -0.14593391120433807, -0.11428322643041611, 0.07587475329637527, 0.09097475558519363, -0.403177410364151, 0.030462520197033882, -1.5839942693710327, 0.0134104331955313...
func (fiba *FIBeneficiaryAdvice) LineTwoField() string { return fiba.alphaField(fiba.Advice.LineTwo, 33) }
[ 0.31530991196632385, -1.0282155275344849, 0.24443645775318146, -0.6652987599372864, 1.2525290250778198, 0.9242715239524841, -0.588700532913208, -0.794273853302002, -0.6013128757476807, 0.06316713988780975, -0.6857049465179443, -0.019589867442846298, -0.5461474657058716, -0.3370148241519928...
func (fiba *FIBeneficiaryAdvice) LineThreeField() string { return fiba.alphaField(fiba.Advice.LineThree, 33) }
[ 0.5867140293121338, 0.043742138892412186, 0.15406431257724762, -1.2289491891860962, 0.9666813611984253, 1.7437814474105835, -0.757258415222168, -0.34744399785995483, 0.5224286913871765, 0.29312863945961, -0.6121581792831421, -0.04451398551464081, -1.4179513454437256, -1.0084238052368164, ...
func (fiba *FIBeneficiaryAdvice) LineFourField() string { return fiba.alphaField(fiba.Advice.LineFour, 33) }
[ 0.7355048656463623, -0.48426148295402527, 0.07043548673391342, -0.7338078618049622, 0.6531006097793579, 1.0986156463623047, -0.33885008096694946, -0.6218367218971252, -0.41641440987586975, -0.23577484488487244, -0.5276667475700378, 0.23753340542316437, -1.640442967414856, 0.180519565939903...
func (fiba *FIBeneficiaryAdvice) LineFiveField() string { return fiba.alphaField(fiba.Advice.LineFive, 33) }
[ 0.1546563357114792, -0.40855133533477783, 0.13768750429153442, -0.3784469664096832, 0.8274371027946472, 0.9105510115623474, 0.10945530235767365, -1.2156202793121338, -0.311250239610672, 0.5573378205299377, -1.1481853723526, 0.10574258118867874, -1.8140521049499512, -0.13567620515823364, ...
func (fiba *FIBeneficiaryAdvice) LineSixField() string { return fiba.alphaField(fiba.Advice.LineSix, 33) }
[ 1.2133519649505615, -0.5645343065261841, -0.02627585455775261, 0.11526605486869812, 0.6821913123130798, 1.4022090435028076, -0.5801622867584229, 0.23229262232780457, 0.4479808807373047, -0.10273668169975281, -0.8435380458831787, 0.0696779191493988, -0.48482823371887207, -0.672238826751709,...
func getSummary(content string) (string, error) { var buf bytes.Buffer buf.Write([]byte(content)) doc, err := goquery.NewDocumentFromReader(&buf) if err != nil { return "", err } str := doc.Find("body").Text() strRune := []rune(str) if len(strRune) > 400 { strRune = strRune[:400] } return string(strRune)...
[ 0.2141953706741333, 0.796422004699707, 0.8378467559814453, -0.6219939589500427, -0.03961725905537605, -0.05781010538339615, -0.6686044931411743, -0.1125897541642189, 0.3070670962333679, 0.6694282293319702, 0.2902350127696991, 0.8323482871055603, -0.753607988357544, -0.513146162033081, 0....
func newCreateTerminatorCmd(f cmdutil.Factory, out io.Writer, errOut io.Writer) *cobra.Command { options := &createTerminatorOptions{ edgeOptions: edgeOptions{ CommonOptions: common.CommonOptions{ Factory: f, Out: out, Err: errOut, }, }, } cmd := &cobra.Command{ Use: "terminator se...
[ -0.0847061276435852, -0.7802677750587463, 0.7050997614860535, -0.6211788058280945, 0.04189152270555496, -0.6329312324523926, 0.5450373888015747, 0.2654396891593933, -0.21968962252140045, -0.33966365456581116, 0.3560777008533478, 0.006177348550409079, -0.11693405359983444, 0.003524081083014...
func runCreateTerminator(o *createTerminatorOptions) (err error) { entityData := gabs.New() service, err := mapNameToID("services", o.Args[0], o.edgeOptions) if err != nil { return err } router, err := mapNameToID("edge-routers", o.Args[1], o.edgeOptions) if err != nil { router = o.Args[1] // might be a pure...
[ -0.5103060007095337, -0.3827553689479828, 0.8811958432197571, -0.550574004650116, 0.13472898304462433, -0.274944543838501, -0.16402342915534973, -0.41315123438835144, 0.11402001976966858, 0.4990846812725067, -0.24881285429000854, 0.22189700603485107, 0.22988760471343994, -0.206371784210205...
func NewKubeGenericRuntimeManager( recorder record.EventRecorder, livenessManager proberesults.Manager, readinessManager proberesults.Manager, startupManager proberesults.Manager, rootDirectory string, machineInfo *cadvisorapi.MachineInfo, podStateProvider podStateProvider, osInterface kubecontainer.OSInterface...
[ -0.7390278577804565, 0.04529988393187523, 0.9915218353271484, 0.16198690235614777, 0.05751565843820572, -0.6109015345573425, -0.4111863672733307, -0.725801944732666, 0.26235485076904297, 0.1277424842119217, -0.15568743646144867, -0.11795779317617416, -1.0081126689910889, 0.6345130205154419...
func (m *kubeGenericRuntimeManager) Type() string { return m.runtimeName }
[ -0.729927659034729, -0.3855131268501282, 0.28032609820365906, 0.21010853350162506, 0.28587427735328674, 0.7893032431602478, -0.7410617470741272, -1.1178313493728638, 0.033709779381752014, 0.19995445013046265, 0.484730064868927, 0.43344730138778687, -1.2528762817382812, 1.6575194597244263, ...
func (m *kubeGenericRuntimeManager) Version(ctx context.Context) (kubecontainer.Version, error) { typedVersion, err := m.getTypedVersion(ctx) if err != nil { return nil, err } return newRuntimeVersion(typedVersion.RuntimeVersion) }
[ -0.6470184326171875, -0.8242794871330261, 0.4853672981262207, 0.8914161920547485, 0.8048830032348633, 0.17035573720932007, -0.2743757367134094, -1.2236223220825195, -0.006481246091425419, 0.05560877546668053, -0.18928737938404083, 0.3291718363761902, -1.1291791200637817, 1.1913962364196777...
func (m *kubeGenericRuntimeManager) APIVersion() (kubecontainer.Version, error) { versionObject, err := m.versionCache.Get(m.machineInfo.MachineID) if err != nil { return nil, err } typedVersion := versionObject.(*runtimeapi.VersionResponse) return newRuntimeVersion(typedVersion.RuntimeApiVersion) }
[ -0.9077233672142029, -0.7652336359024048, 0.3337617814540863, 0.047764770686626434, -0.04792970046401024, -0.43395882844924927, -0.6061294674873352, -0.6041542887687683, -0.07362155616283417, 0.3199079930782318, -0.6669341325759888, 0.33903107047080994, -1.0027680397033691, 0.5712283849716...
func (m *kubeGenericRuntimeManager) Status(ctx context.Context) (*kubecontainer.RuntimeStatus, error) { resp, err := m.runtimeService.Status(ctx, false) if err != nil { return nil, err } if resp.GetStatus() == nil { return nil, errors.New("runtime status is nil") } return toKubeRuntimeStatus(resp.GetStatus())...
[ -0.5585144758224487, -0.672490656375885, 0.4446709454059601, -0.019744135439395905, -0.08977266401052475, -0.29642438888549805, -1.1360942125320435, -0.5102588534355164, 0.34988725185394287, -0.02461526170372963, 0.010163047350943089, 0.5350455641746521, -0.7773952484130859, 1.577706694602...
func (m *kubeGenericRuntimeManager) GetPods(ctx context.Context, all bool) ([]*kubecontainer.Pod, error) { pods := make(map[kubetypes.UID]*kubecontainer.Pod) sandboxes, err := m.getKubeletSandboxes(ctx, all) if err != nil { return nil, err } for i := range sandboxes { s := sandboxes[i] if s.Metadata == nil {...
[ -0.7401931285858154, -0.2479182928800583, 1.0001709461212158, 0.4772632420063019, 0.7003791332244873, 0.1796964555978775, -0.5899478793144226, -1.0346429347991943, 0.12036290019750595, 0.2500714659690857, 0.7743682265281677, 0.5662428140640259, 0.0913490355014801, 0.9624395966529846, 0.2...
func (m *kubeGenericRuntimeManager) computePodActions(ctx context.Context, pod *v1.Pod, podStatus *kubecontainer.PodStatus) podActions { klog.V(5).InfoS("Syncing Pod", "pod", klog.KObj(pod)) createPodSandbox, attempt, sandboxID := runtimeutil.PodSandboxChanged(pod, podStatus) changes := podActions{ KillPod: ...
[ -0.6074235439300537, -0.5433666110038757, 0.7301548719406128, 0.5881801247596741, 0.5215632915496826, -0.6004661917686462, 0.19764497876167297, -0.24654795229434967, 0.6908729076385498, 0.4813769459724426, -0.5410560965538025, 0.5707330703735352, 0.13329391181468964, 0.29956167936325073, ...
func (m *kubeGenericRuntimeManager) SyncPod(ctx context.Context, pod *v1.Pod, podStatus *kubecontainer.PodStatus, pullSecrets []v1.Secret, backOff *flowcontrol.Backoff) (result kubecontainer.PodSyncResult) { // Step 1: Compute sandbox and container changes. podContainerChanges := m.computePodActions(ctx, pod, podStat...
[ -0.3062939941883087, -0.21634170413017273, 0.7678651809692383, 0.5842844843864441, 0.39767807722091675, -0.0536079965531826, 0.17229406535625458, -0.24259480834007263, 0.164895161986351, 0.6759618520736694, -0.12148687988519669, 0.6999548077583313, 0.3051612675189972, 0.18520556390285492, ...
func (m *kubeGenericRuntimeManager) doBackOff(pod *v1.Pod, container *v1.Container, podStatus *kubecontainer.PodStatus, backOff *flowcontrol.Backoff) (bool, string, error) { var cStatus *kubecontainer.Status for _, c := range podStatus.ContainerStatuses { if c.Name == container.Name && c.State == kubecontainer.Cont...
[ -0.5408936738967896, 0.3781689703464508, 0.8775666952133179, 0.09779152274131775, 0.47439372539520264, -0.2374800592660904, 0.10564829409122467, -0.39936113357543945, -0.4001672863960266, 0.8079037666320801, -0.4887109696865082, -0.2624516785144806, -0.1523025780916214, -0.3247507214546203...
func (m *kubeGenericRuntimeManager) KillPod(ctx context.Context, pod *v1.Pod, runningPod kubecontainer.Pod, gracePeriodOverride *int64) error { err := m.killPodWithSyncResult(ctx, pod, runningPod, gracePeriodOverride) return err.Error() }
[ -1.0936833620071411, -0.33260318636894226, 0.5095783472061157, 0.21185053884983063, 0.49782228469848633, 0.8255611658096313, 0.7555596828460693, -0.9764447212219238, -0.46004563570022583, 0.3664887845516205, 0.6909458637237549, 0.8931417465209961, -0.22867617011070251, -0.502528727054596, ...
func (m *kubeGenericRuntimeManager) killPodWithSyncResult(ctx context.Context, pod *v1.Pod, runningPod kubecontainer.Pod, gracePeriodOverride *int64) (result kubecontainer.PodSyncResult) { killContainerResults := m.killContainersWithSyncResult(ctx, pod, runningPod, gracePeriodOverride) for _, containerResult := range...
[ -0.7488285899162292, -0.4764861464500427, 0.9258390665054321, 0.4067577123641968, 0.6143073439598083, -0.34698379039764404, 0.4287073314189911, -0.9089816212654114, 0.06894133239984512, 0.45955196022987366, -0.043834149837493896, 0.1911451816558838, 0.011517764069139957, 0.1445531696081161...
func (m *kubeGenericRuntimeManager) GetPodStatus(ctx context.Context, uid kubetypes.UID, name, namespace string) (*kubecontainer.PodStatus, error) { // Now we retain restart count of container as a container label. Each time a container // restarts, pod will read the restart count from the registered dead container, ...
[ -0.6885308027267456, -0.17758195102214813, 0.6848355531692505, 0.3592493236064911, 0.39578381180763245, -0.7712466716766357, -0.458139032125473, -0.8919098973274231, 0.49788257479667664, 0.026923175901174545, -0.536677896976471, 0.5747951865196228, 0.14528879523277283, 0.9143270254135132, ...
func (m *kubeGenericRuntimeManager) GarbageCollect(ctx context.Context, gcPolicy kubecontainer.GCPolicy, allSourcesReady bool, evictNonDeletedPods bool) error { return m.containerGC.GarbageCollect(ctx, gcPolicy, allSourcesReady, evictNonDeletedPods) }
[ 0.2896490693092346, 0.5621946454048157, 0.6186642646789551, -0.3784811496734619, 0.9338406324386597, 0.0016214754432439804, -0.6157488226890564, -1.056342363357544, 0.506020188331604, 0.0718899667263031, 0.3526941239833832, 0.729564368724823, -0.3666702210903168, 1.0193297863006592, 0.47...
func (m *kubeGenericRuntimeManager) UpdatePodCIDR(ctx context.Context, podCIDR string) error { // TODO(#35531): do we really want to write a method on this manager for each // field of the config? klog.InfoS("Updating runtime config through cri with podcidr", "CIDR", podCIDR) return m.runtimeService.UpdateRuntimeCo...
[ -0.6349829435348511, -0.6477243304252625, 0.09222287684679031, -0.7898643612861633, -0.6185204982757568, -0.2876291275024414, -0.8728101849555969, -0.18371324241161346, -0.7181609869003296, 0.6915385127067566, -0.16286663711071014, -0.36989644169807434, -1.2644535303115845, 0.6743373274803...
func (r *apiV1Router) GetTeams(ctx *gin.Context) { teams, err := r.teamService.GetTeams(ctx) if err != nil { r.logger.Error("could not fetch teams", zap.Error(err)) models.SendAPIError(ctx, http.StatusInternalServerError, "could not fetch teams") return } ctx.JSON(http.StatusOK, getTeamsRes{ Response: mode...
[ -0.4622068703174591, 0.5070377588272095, 0.32975339889526367, -0.12688151001930237, 0.8774181008338928, 0.5731092691421509, -0.21738140285015106, -1.3063442707061768, -0.1935938447713852, -0.03714289888739586, 0.02333815209567547, 0.651867151260376, -0.07530497014522552, -0.085205785930156...
func (r *apiV1Router) CreateTeam(ctx *gin.Context) { name := ctx.PostForm("name") if len(name) == 0 { r.logger.Debug("team name not specified", zap.String("name", name)) models.SendAPIError(ctx, http.StatusBadRequest, "request must include the team's name") return } team, err := r.teamService.CreateTeamForUs...
[ -0.36150550842285156, 0.026460042223334312, 0.646324634552002, 0.5695177912712097, 0.2669508457183838, 0.44192516803741455, -0.21514703333377838, -0.9810773730278015, -0.2751401662826538, -0.05856349691748619, -0.09611771255731583, 0.08556731790304184, -0.08492259681224823, -0.106182277202...
func (r *apiV1Router) LeaveTeam(ctx *gin.Context) { err := r.teamService.RemoveUserWithJWTFromTheirTeam(ctx, ctx.GetHeader(authHeaderName)) if err != nil { switch err { case services.ErrInvalidToken: r.logger.Debug("invalid token") models.SendAPIError(ctx, http.StatusUnauthorized, "invalid auth token") b...
[ -0.2258986383676529, -0.5868078470230103, 0.5288616418838501, -0.22635801136493683, -0.28322842717170715, 0.4412359595298767, -0.190324068069458, -0.5826674699783325, -0.13426880538463593, 0.2117588222026825, -0.14222925901412964, 0.2578403055667877, -0.450507789850235, -0.0091134924441576...
func (r *apiV1Router) JoinTeam(ctx *gin.Context) { team := ctx.Param("id") if len(team) == 0 { r.logger.Debug("team id not provided") models.SendAPIError(ctx, http.StatusBadRequest, "team id must be provided") return } err := r.teamService.AddUserWithJWTToTeamWithID(ctx, ctx.GetHeader(authHeaderName), team) ...
[ -0.21297390758991241, -0.680361270904541, 0.7699784636497498, 0.39751875400543213, 0.2918105125427246, 1.221269130706787, 0.26261478662490845, -0.5866789221763611, -0.19621826708316803, 0.0022498418111354113, -0.048029642552137375, 0.6919046640396118, -0.3151957392692566, -0.14160417020320...
func (r *apiV1Router) GetTeamMembers(ctx *gin.Context) { team := ctx.Param("id") if len(team) == 0 { r.logger.Debug("team id not provided") models.SendAPIError(ctx, http.StatusBadRequest, "team id must be provided") return } teamMembers, err := r.userService.GetUsersWithTeam(ctx, team) if err != nil { swi...
[ -0.6177089810371399, 0.024556240066885948, 0.4259757995605469, 0.12989746034145355, 0.36358025670051575, 0.23046395182609558, -0.7037006616592407, -0.805556058883667, -0.33008068799972534, 0.383542001247406, -0.2533313035964966, 1.1162339448928833, -0.482608824968338, 0.6638650894165039, ...
func (m MyReader) Read(b []byte) (int, error) { b[0] = 'A' return 1, nil }
[ -1.270098090171814, -0.5619897246360779, 0.47529613971710205, -0.13947409391403198, -0.21123093366622925, -0.5053322911262512, 0.5434061288833618, 0.7887340188026428, 0.507936418056488, -0.06789366900920868, -0.16078287363052368, 0.09731920808553696, -1.329677700996399, 0.8042670488357544,...
func main() { reader.Validate(MyReader{}) }
[ 0.1960979849100113, -1.4205678701400757, 0.2115708738565445, 0.49583175778388977, -0.20673036575317383, 0.5655127763748169, 0.21380816400051117, 0.9323192238807678, -0.6808211207389832, -0.8356861472129822, 0.6917353868484497, -0.08567813038825989, -0.7043231129646301, -0.20185866951942444...
func (h HashAlgorithm) Hasher() func() hash.Hash { return map[HashAlgorithm]func() hash.Hash{ SHA1: sha1.New, SHA256: sha256.New, SHA512: sha512.New, }[h] }
[ -0.24668237566947937, -0.1673380434513092, 0.31886571645736694, 1.1563100814819336, -0.3573439419269562, 0.3401334583759308, 0.578068733215332, -0.30262333154678345, 0.052876416593790054, -0.9754787087440491, -0.49699416756629944, -0.26117759943008423, 1.0582959651947021, 1.143339991569519...
func (h HashAlgorithm) String() string { return string(h) }
[ 0.7671093940734863, -0.4648076593875885, 0.13071171939373016, 0.5415616631507874, -0.44842344522476196, 0.7570402026176453, 0.7565497756004333, -0.6588727831840515, -0.387698769569397, -0.23297733068466187, 0.24460020661354065, 0.691275417804718, 0.764671266078949, 0.48539620637893677, 0...
func (d Digits) String() string { return fmt.Sprintf("%d", d) }
[ -0.4378233850002289, 0.7143135070800781, 0.011897463351488113, -0.9697442054748535, -0.3563295602798462, 0.8755155801773071, 0.035472702234983444, -0.858974039554596, -0.00469932658597827, -0.5006940960884094, 0.2575772702693939, 1.0174278020858765, 0.8127698302268982, 0.623647153377533, ...
func (k *Key) Type() OTPType { return OTPType(k.Host) }
[ -0.643606424331665, 0.2529383599758148, 0.12098217010498047, -0.10594295710325241, -0.13111162185668945, 0.5603303909301758, -0.22859114408493042, -0.983771562576294, 0.49951452016830444, 0.8133577704429626, 0.3089621663093567, 0.6682100296020508, -1.103355050086975, 0.18985754251480103, ...
func (k *Key) Label() string { return strings.TrimPrefix(k.Path, "/") }
[ -0.45616722106933594, -0.9234278202056885, 0.10499241948127747, 0.030554838478565216, 0.12731991708278656, 1.60562002658844, -0.008056901395320892, 0.21360881626605988, 0.8058895468711853, 0.8346286416053772, 0.802277684211731, -0.42416632175445557, -0.5650289058685303, -0.1229192763566970...
func (k *Key) Secret() string { return k.Query().Get("secret") }
[ 0.2099284827709198, 0.6465611457824707, 0.0984661802649498, 0.7626789808273315, -0.07016853243112564, -0.30504652857780457, -0.9922717809677124, -0.11819447576999664, -0.5051376223564148, 0.2971852719783783, -0.006310151424258947, -0.23609651625156403, -0.14381526410579681, -0.477106928825...
func (k *Key) Digits() Digits { str := k.Query().Get("digits") d, err := strconv.Atoi(str) if err != nil { return SixDigits } return Digits(d) }
[ -0.5146504044532776, 0.6173153519630432, 0.10920120030641556, -0.32715725898742676, 0.4832703173160553, -1.1178938150405884, -1.3356029987335205, 0.29398319125175476, 0.2707270085811615, -0.1314014196395874, 0.3427761495113373, -0.3692358434200287, -0.042894892394542694, 0.618301510810852,...
func (k *Key) Issuer() string { return k.Query().Get("issuer") }
[ -0.04938744753599167, -0.30357271432876587, 0.17375323176383972, 0.7372013926506042, -1.2736557722091675, 0.49884048104286194, 0.1501648724079132, 0.8228126764297485, 0.15950797498226166, -0.15710292756557465, 1.1435067653656006, -0.7772600054740906, -0.15298199653625488, -0.11502671986818...
func (k *Key) IssuerLabelPrefix() string { sub := strings.Split(k.Label(), ":") if len(sub) == 2 { return sub[0] } return "" }
[ 0.13436076045036316, -0.3551545739173889, 0.5256805419921875, -0.7714775800704956, -0.3288247883319855, 0.3221963942050934, -1.1595335006713867, 0.14699222147464752, 1.0006219148635864, 1.373010277748108, 0.4440160095691681, -0.09010583162307739, -0.3671417832374573, -0.7304636240005493, ...
func (k *Key) AccountName() string { sub := strings.Split(k.Label(), ":") if len(sub) == 2 { return sub[1] } return "" }
[ -0.898461639881134, -0.4181385338306427, 0.6567421555519104, 1.4081237316131592, -0.0997573658823967, 0.47782737016677856, 0.5175888538360596, 0.6665518283843994, 0.12550295889377594, 1.0593183040618896, 0.6262636780738831, 0.30359119176864624, -0.2894124388694763, -0.5732448101043701, 0...
func (k *Key) Algorithm() HashAlgorithm { return HashAlgorithm(k.Query().Get("algorithm")) }
[ 0.37380051612854004, 0.200588658452034, 0.12684665620326996, 0.30575934052467346, -0.4285180866718292, 0.3253982663154602, -0.07971133291721344, 0.7814748883247375, -0.03190264105796814, 0.7132340669631958, 0.5531142354011536, 0.30189821124076843, 0.2785661220550537, 0.9908103346824646, ...
func (k *Key) Period() uint64 { if k.Type() == TOTP { if period := k.Query().Get("period"); len(period) > 0 { p, err := strconv.ParseUint(period, 10, 64) if err != nil { return 30 } return p } return 30 } return 0 }
[ -1.074602723121643, 0.7350051403045654, 0.5941687226295471, 0.5666462779045105, -0.36968445777893066, 0.17830362915992737, -0.10690044611692429, 0.26106005907058716, 0.8482663035392761, 0.9509027004241943, 1.1800867319107056, 0.1649012416601181, -0.9006407260894775, -0.11952801048755646, ...
func (k *Key) Counter() uint64 { if k.Type() == HOTP { if counter := k.Query().Get("counter"); len(counter) > 0 { p, _ := strconv.ParseUint(counter, 10, 64) return p } } return 0 }
[ -0.12356530129909515, 0.06263437122106552, 0.5310102701187134, 0.9181298613548279, -0.28182390332221985, 0.2828620374202728, -0.32758864760398865, 0.7576330900192261, 0.45626720786094666, 0.6281070709228516, 0.5107824206352234, -0.5650584101676941, -0.4765905439853668, 1.1428428888320923, ...
func (k *Key) SetCounter(count uint64) { if k.Type() == HOTP { q := k.Query() q.Set("counter", strconv.FormatUint(count, 10)) k.RawQuery = q.Encode() } }
[ -0.18887408077716827, -0.08298229426145554, 0.5442476868629456, 0.4549962282180786, -0.07344575226306915, 1.3112119436264038, -0.417369544506073, 0.6055371165275574, -0.28938716650009155, -0.05956726893782616, -0.31002330780029297, -0.6675648093223572, -0.22966398298740387, 2.0644707679748...
func GenerateOTP(otp OTP) (string, error) { secret := strings.ToUpper(otp.Secret()) key, err := base32.StdEncoding.DecodeString(secret) if err != nil { return "", err } interval := make([]byte, 8) binary.BigEndian.PutUint64(interval, otp.Interval()) hash := hmac.New(otp.Algorithm().Hasher(), key) _, err = ...
[ -0.03680635988712311, 0.13640840351581573, 1.0005512237548828, -0.32596728205680847, -0.6372798681259155, 0.18797777593135834, -0.37941789627075195, -0.3718872666358948, 0.6531145572662354, 0.5939369797706604, -0.25040683150291443, -0.8948037028312683, -0.5956625938415527, -0.8743715882301...
func GenerateSecret(size uint) (string, error) { if size < 16 { return "", ErrWeakSecretSize } encoder := base32.StdEncoding.WithPadding(base32.NoPadding) secret := make([]byte, size) _, err := rand.Read(secret) if err != nil { return "", err } return encoder.EncodeToString(secret), nil }
[ 0.32198598980903625, 0.4980413615703583, 0.7658563852310181, -0.34469833970069885, -0.6760075688362122, 0.10843207687139511, -1.2206312417984009, -1.0673387050628662, 0.2967585325241089, -0.22269727289676666, -1.3098266124725342, 0.0545150488615036, -0.5337892174720764, 0.1475876420736313,...
func NewOTP(cfg *OTPConfig) (*Key, OTP, error) { var otp OTP vals := url.Values{} key := new(Key) base, err := newBaseOTP(cfg, key) if err != nil { return nil, nil, err } if len(cfg.Label) == 0 { return nil, nil, ErrMissingLabel } if len(cfg.Issuer) != 0 { vals.Set("issuer", cfg.Issuer) } if cfg.OT...
[ -0.9643137454986572, -0.6870641708374023, 0.7594617605209351, -0.31362661719322205, -0.9393638968467712, 0.4050527811050415, -0.6328474283218384, -0.1338501125574112, 0.03176819533109665, 1.192193627357483, -0.03228941932320595, -0.28707149624824524, 0.012753818184137344, -0.03708441555500...
func NewOTPFromKey(raw string) (*Key, OTP, error) { url, err := url.Parse(raw) if err != nil { return nil, nil, err } key := &Key{url} cfg := &OTPConfig{ Secret: key.Secret(), Counter: key.Counter(), OTPType: key.Type(), Digits: key.Digits(), HashAlgorithm: key.Algorithm(), ...
[ -0.10037823021411896, -0.41126176714897156, 0.5028188824653625, 0.022175155580043793, -1.4217333793640137, -0.5225031971931458, -0.5616618394851685, -0.02736651711165905, 0.22211134433746338, 0.46381649374961853, -0.6498040556907654, -0.25114110112190247, -0.011898336932063103, -0.34256350...
func (s *GreeterServer) SayRecord(stream pb.Greeter_SayRecordServer) error { for { resp, err := stream.Recv() if err == io.EOF { return stream.SendAndClose(&pb.HelloReply{Message: "client side streaming rpc over"}) } if err != nil { return err } log.Printf("resp: %v", resp) } return nil }
[ 0.8252004981040955, -0.11443191766738892, 0.7742136120796204, -0.47255149483680725, 0.09613984078168869, 0.5540077090263367, -0.19386237859725952, -1.1508543491363525, -0.6309387683868408, 0.39088085293769836, 0.2878260016441345, 0.983206033706665, -1.7512574195861816, 1.599192500114441, ...
func NewProjectConfig() *ProjectConfig { readyConfig := &ProjectConfig{} projectConfigFile := os.Getenv("RIG_PROJECT_CONFIG_FILE") if projectConfigFile == "" { projectConfigFile, _ = FindProjectConfigFilePath() // nolint: gosec } if projectConfigFile != "" { if config, err := NewProjectConfigFromFile(project...
[ 0.7746309041976929, -0.31933310627937317, 0.48111492395401, 0.42874041199684143, -0.9072652459144592, -0.2746734619140625, 0.342634916305542, 0.17937451601028442, -0.6790224313735962, 1.166102409362793, -0.7139231562614441, -0.12505710124969482, -0.39014795422554016, 0.7205289006233215, ...
func FindProjectConfigFilePath() (string, error) { if cwd, err := os.Getwd(); err == nil { var configFilePath string for cwd != "." && cwd != string(filepath.Separator) { for _, filename := range [2]string{"outrigger.yml", ".outrigger.yml"} { configFilePath = filepath.Join(cwd, filename) if _, e := os.S...
[ -0.14610189199447632, -0.4149969816207886, 0.7115041017532349, 0.2289949357509613, 0.3009940981864929, 0.12098807096481323, 1.1604961156845093, -0.24115385115146637, -1.8361856937408447, 0.605216920375824, 0.04958931729197502, -0.6222218871116638, -0.6719754338264465, 1.1276384592056274, ...
func NewProjectConfigFromFile(filename string) (*ProjectConfig, error) { logger := util.Logger() filepath, _ := filepath.Abs(filename) // nolint: gosec config := &ProjectConfig{ File: filename, Path: filepath, } yamlFile, err := ioutil.ReadFile(config.File) if err != nil { logger.Verbose("No project config...
[ 0.32248207926750183, -0.21945536136627197, 0.4595627784729004, 0.481631338596344, -0.8221699595451355, -0.45212918519973755, 0.16837862133979797, 0.6261961460113525, -0.9946219325065613, 1.20334792137146, -0.7514293789863586, -0.23546575009822845, -0.38040825724601746, 0.6561710834503174, ...
func (c *ProjectConfig) ValidateConfigVersion() error { if len(c.Version) == 0 { return fmt.Errorf("no 'version' property detected") } if c.Version != "1.0" { return fmt.Errorf("version '1.0' is the only supported value, found '%s'", c.Version) } return nil }
[ -0.6567827463150024, -0.43158531188964844, 0.18792395293712616, 0.49557265639305115, -0.012230689637362957, 0.5924832820892334, 0.21808432042598724, 0.44139212369918823, -0.852705180644989, 0.838847815990448, -0.2689409852027893, -0.7939021587371826, -0.5121328234672546, 1.517655611038208,...
func (c *ProjectConfig) NotEmpty() bool { if err := c.ValidateConfigVersion(); err != nil { return false } return true }
[ -1.1361178159713745, 0.1992340385913849, 0.7240334749221802, 0.22538895905017853, 0.4807238280773163, 1.029327392578125, -0.7712071537971497, -0.38967278599739075, -1.506895661354065, 1.418408989906311, -1.0918562412261963, -0.6308862566947937, -0.5833308100700378, 0.19194072484970093, 0...
func (c *ProjectConfig) ValidateProjectScripts(subcommands []cli.Command) { logger := util.Logger() if c.Scripts != nil { for id, script := range c.Scripts { // Check for an empty script if script == nil { logger.Channel.Error.Fatalf("Project script '%s' has no configuration", id) } // Check for ...
[ 0.3187377452850342, 0.0004296489933039993, 0.8763195872306824, -0.27849000692367554, 0.51608806848526, 0.17353318631649017, 0.46452227234840393, -0.46112367510795593, -0.5964299440383911, 0.5094020962715149, 0.05200299620628357, 0.6358917951583862, -0.34830763936042786, 1.0714631080627441,...
func (r *Router) findNode(pathSegments []string, fuzzy bool) (*routingTreeNode, []string) { node := r.root for i, p := range pathSegments { if c, found := node.children[p]; found { node = c } else { if fuzzy { // try fuzzy search candidates := []string{} for key, _ := range node.children { if s...
[ -0.5459793210029602, -0.1443866789340973, 0.6685832738876343, 0.744379460811615, 0.3127198815345764, -0.4828863739967346, 0.2747745215892792, 0.3446570336818695, -0.42952674627304077, 0.5485138893127441, 0.646613597869873, -0.910382866859436, -1.0419106483459473, 1.282335638999939, -0.38...
func rotLeft(a []int32, d int32) []int32 { tengah := int32(len(a)) / 2 selisih := int32(len(a)) - d keKiri := true if selisih > tengah { // geser ke kiri keKiri = true } else { // geser ke kanan keKiri = false } if keKiri { // geser ke kiri // geser sekali ke kiri for i := int32(0); i < d; i++ { a...
[ -0.2616689205169678, 0.3904287815093994, 0.6645631194114685, -0.31538864970207214, 0.10538030415773392, 0.5855979323387146, 0.3402233421802521, -0.5185856819152832, 1.0638340711593628, 0.7369740009307861, 0.5901811718940735, 0.025462152436375618, -0.6088624000549316, 0.3715284764766693, ...
func Check(err error) { if err != nil { panic(err) } }
[ 0.9076279997825623, 0.3895120620727539, -0.00933310016989708, 1.6255722045898438, -0.009953747503459454, 0.42037415504455566, -0.4049481749534607, 0.15466098487377167, 0.46837079524993896, 0.12247966974973679, 0.17285889387130737, 0.4687558114528656, 0.4242030084133148, 1.6115363836288452,...
func CheckFileExists(file string) { fileMode, err := os.Stat(file) if os.IsNotExist(err) { panic(err) } else if fileMode.IsDir() { panic(fmt.Sprintf("File is a directory: %s", file)) } }
[ 0.29075106978416443, 0.4304888844490051, 0.43684089183807373, 0.8671444654464722, 1.1779285669326782, 1.4337950944900513, -0.0877571702003479, 0.5559873580932617, -0.03897712379693985, 0.05665324255824089, 0.4646115005016327, 0.05419869348406792, 0.6567385196685791, 0.8528603911399841, -...
func IsFile(path string) bool { fileMode, err := os.Stat(path) if err != nil || fileMode.IsDir() { return false } return true }
[ -0.2738548517227173, 0.4171253442764282, 0.5922597646713257, 1.0804616212844849, 0.4870973229408264, 0.6404087543487549, 0.6744168996810913, 0.07469725608825684, 0.2979724705219269, -1.4162356853485107, 0.21864666044712067, -0.7119134664535522, -0.45754295587539673, 0.4010836184024811, -...
func StringInSlice(a string, list []string) bool { for _, b := range list { if b == a { return true } } return false }
[ 0.1872318536043167, -1.2441215515136719, 0.33633801341056824, 0.2545374035835266, -0.6286222338676453, -0.49445807933807373, -0.8293318152427673, 0.6134192943572998, 0.006875546183437109, 0.880862295627594, -0.6804824471473694, 0.20464710891246796, -0.6598539352416992, 0.15983858704566956,...
func IsEmptyString(aStr string) bool { return len(strings.TrimSpace(aStr)) == 0 }
[ -1.5134514570236206, 0.3207018971443176, 0.2767146825790405, -0.8806539177894592, -0.05632902309298515, 0.39998021721839905, -0.45574599504470825, -0.7534554600715637, 0.4319215416908264, 0.726597249507904, -0.45635345578193665, -0.3736836314201355, 0.6232017874717712, 0.02451625093817711,...
func main() { processor.RegisterProcessors(Process) }
[ -0.058570496737957, 0.35205668210983276, 0.5735512971878052, 0.20213152468204498, 1.068443775177002, -0.22524628043174744, 0.3658255338668823, 1.1575461626052856, 0.09066051244735718, 0.3196321427822113, -0.6676063537597656, 1.5229384899139404, -0.17629124224185944, 0.48651447892189026, ...
func (pu *PhoneUpdate) Where(ps ...predicate.Phone) *PhoneUpdate { pu.mutation.predicates = append(pu.mutation.predicates, ps...) return pu }
[ 0.12385819107294083, -0.7162191271781921, 0.39195913076400757, 0.3596957325935364, -0.7150902152061462, 0.8758212327957153, -0.9069548845291138, 0.0947934091091156, -0.06053731590509415, -0.9071379899978638, 0.6647529602050781, -0.14808283746242523, -0.19069181382656097, -0.423459321260452...
func (pu *PhoneUpdate) SetName(s string) *PhoneUpdate { pu.mutation.SetName(s) return pu }
[ -0.7381678819656372, 0.1212274506688118, 0.2458873987197876, 1.3525638580322266, -0.6663239598274231, 0.4206318259239197, -0.5049471855163574, 0.622266411781311, 0.8768919706344604, 0.02769656479358673, -0.8644433617591858, -1.6824226379394531, 0.12636329233646393, -0.22441770136356354, ...
func (pu *PhoneUpdate) SetManufacturerID(id int) *PhoneUpdate { pu.mutation.SetManufacturerID(id) return pu }
[ -1.7784756422042847, -0.33041056990623474, 0.17464743554592133, 1.0234074592590332, -0.7621529698371887, 0.6030564308166504, -0.17125549912452698, 1.2484687566757202, 1.1679540872573853, 0.010363294743001461, -0.4184507429599762, 0.2712803781032562, 0.4319940507411957, 1.8372777700424194, ...
func (pu *PhoneUpdate) SetManufacturer(m *Manufacturer) *PhoneUpdate { return pu.SetManufacturerID(m.ID) }
[ -0.7794649004936218, 0.14598163962364197, 0.20346732437610626, 1.2229912281036377, -0.5748655200004578, 0.1789654791355133, -0.2934551537036896, 0.5835515856742859, 0.6967595219612122, -1.1692802906036377, 0.1068161204457283, 0.1100640669465065, -0.3717777729034424, 0.9847269654273987, -...
func (pu *PhoneUpdate) SetOperatingSystemID(id int) *PhoneUpdate { pu.mutation.SetOperatingSystemID(id) return pu }
[ -1.9060672521591187, -0.37602928280830383, -0.07028733193874359, 0.7894899249076843, -0.3691950738430023, 0.8981597423553467, -0.21724261343479156, -0.09783772379159927, 1.0796318054199219, -0.1599784791469574, 0.038759514689445496, -0.45693519711494446, -0.06681801378726959, 0.29263275861...
func (pu *PhoneUpdate) SetOperatingSystem(o *OperatingSystem) *PhoneUpdate { return pu.SetOperatingSystemID(o.ID) }
[ -1.4006109237670898, 0.27350950241088867, 0.3824371099472046, 0.6190347075462341, 0.011722293682396412, 0.5316728353500366, 0.17437207698822021, -0.38031575083732605, 0.7929434776306152, -1.0470248460769653, 0.052459489554166794, -0.5056760907173157, -0.2604798376560211, -0.234620451927185...
func (pu *PhoneUpdate) Mutation() *PhoneMutation { return pu.mutation }
[ -0.4254003167152405, -0.6860958933830261, 0.3467866778373718, 0.6332769989967346, 0.10257948935031891, 0.893979549407959, -0.4527222216129303, -0.09647683054208755, 1.4689782857894897, -0.6353362202644348, 0.4744526445865631, -1.1853240728378296, -0.46461713314056396, -0.4433513283729553, ...
func (pu *PhoneUpdate) ClearManufacturer() *PhoneUpdate { pu.mutation.ClearManufacturer() return pu }
[ -1.3375909328460693, 0.7722765207290649, 0.18488581478595734, 1.384266972541809, -1.1445752382278442, 0.5083290934562683, -0.9569620490074158, 0.011404248885810375, 1.0685235261917114, -0.3127354085445404, 0.21874402463436127, 0.8150654435157776, 0.043173618614673615, 0.2525043487548828, ...
func (pu *PhoneUpdate) ClearOperatingSystem() *PhoneUpdate { pu.mutation.ClearOperatingSystem() return pu }
[ -1.4307537078857422, 0.9886088967323303, 0.17134898900985718, 1.042049527168274, -0.8055325746536255, 0.7093080282211304, -0.2039562463760376, -0.7906917333602905, 0.48483607172966003, -0.21577279269695282, 0.6687620878219604, -0.2608221173286438, 0.2916520833969116, -0.6453737020492554, ...
func (pu *PhoneUpdate) Save(ctx context.Context) (int, error) { var ( err error affected int ) pu.defaults() if len(pu.hooks) == 0 { if err = pu.check(); err != nil { return 0, err } affected, err = pu.sqlSave(ctx) } else { var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Val...
[ -0.9502599835395813, 0.38099053502082825, 0.7840466499328613, 0.19555701315402985, 0.37560394406318665, -0.5736172795295715, 0.30706754326820374, -0.5227335095405579, -0.3649996519088745, 0.09291978925466537, -0.0978049635887146, -0.957955002784729, -0.9278124570846558, -0.2030635476112365...
func (pu *PhoneUpdate) SaveX(ctx context.Context) int { affected, err := pu.Save(ctx) if err != nil { panic(err) } return affected }
[ -0.6052150130271912, 0.8709591627120972, 0.7444174289703369, 0.49538522958755493, -0.5046849846839905, 0.8842995166778564, -0.7184332609176636, 0.7055999040603638, 1.1903877258300781, -0.03515405207872391, -0.9400594234466553, -1.1121124029159546, -0.8659644722938538, -0.4352080523967743, ...
func (pu *PhoneUpdate) Exec(ctx context.Context) error { _, err := pu.Save(ctx) return err }
[ 0.047723423689603806, -0.14848192036151886, 0.6192206740379333, 0.4957059919834137, 0.34676486253738403, 1.3087263107299805, -0.9298170208930969, 0.1647854447364807, 0.30943503975868225, 0.07247698307037354, 0.16715370118618011, -0.939775824546814, -0.41577813029289246, -0.660696268081665,...
func (pu *PhoneUpdate) ExecX(ctx context.Context) { if err := pu.Exec(ctx); err != nil { panic(err) } }
[ 0.520718514919281, 0.4632510840892792, 0.7402161359786987, 0.478333443403244, -0.045360248535871506, 1.3565411567687988, -1.269390344619751, 0.2686591148376465, 0.8785690665245056, -0.2713739573955536, 0.49277743697166443, -0.19406458735466003, -0.032699715346097946, -0.4540579915046692, ...
func (pu *PhoneUpdate) defaults() { if _, ok := pu.mutation.ModifiedAt(); !ok { v := phone.UpdateDefaultModifiedAt() pu.mutation.SetModifiedAt(v) } }
[ -0.724260151386261, 0.035270947962999344, 0.19271282851696014, 0.08411867916584015, 0.9155942797660828, -0.07374824583530426, -1.067181944847107, -0.40394172072410583, 0.5051434636116028, -0.8115530014038086, -0.21576939523220062, -0.6515113711357117, -0.19235694408416748, -0.2469431459903...
func (pu *PhoneUpdate) check() error { if v, ok := pu.mutation.Name(); ok { if err := phone.NameValidator(v); err != nil { return &ValidationError{Name: "name", err: fmt.Errorf("ent: validator failed for field \"name\": %w", err)} } } if _, ok := pu.mutation.ManufacturerID(); pu.mutation.ManufacturerCleared()...
[ -0.5162780284881592, 0.0961192175745964, 0.5302979350090027, 0.4220748245716095, 0.41363927721977234, 0.8208723068237305, -0.2931474447250366, -0.14993876218795776, 0.15441815555095673, -0.005446473136544228, 0.47014930844306946, -0.45715197920799255, -0.14952784776687622, 0.97486591339111...
func (puo *PhoneUpdateOne) SetName(s string) *PhoneUpdateOne { puo.mutation.SetName(s) return puo }
[ -0.6597139835357666, 0.41259336471557617, 0.20381176471710205, 1.5984989404678345, -0.3858034014701843, 0.22775264084339142, -0.23299866914749146, 0.765352189540863, 0.7770897150039673, -0.06858593970537186, -0.9540290832519531, -1.696182131767273, -0.042664892971515656, 0.0367405638098716...
func (puo *PhoneUpdateOne) SetManufacturerID(id int) *PhoneUpdateOne { puo.mutation.SetManufacturerID(id) return puo }
[ -1.8014296293258667, -0.22785593569278717, 0.10269947350025177, 1.2220067977905273, -0.6537228226661682, 0.5666764974594116, -0.26363107562065125, 1.391890287399292, 1.1385492086410522, 0.03337613120675087, -0.49703606963157654, 0.16648060083389282, 0.14680883288383484, 1.9024543762207031,...
func (puo *PhoneUpdateOne) SetManufacturer(m *Manufacturer) *PhoneUpdateOne { return puo.SetManufacturerID(m.ID) }
[ -0.7911431789398193, 0.44875726103782654, 0.1983587145805359, 1.4268262386322021, -0.24228782951831818, 0.2872138023376465, -0.10467315465211868, 0.693243145942688, 0.5750591158866882, -1.2636449337005615, -0.023105904459953308, 0.11171931028366089, -0.6890577077865601, 1.0536576509475708,...
func (puo *PhoneUpdateOne) SetOperatingSystemID(id int) *PhoneUpdateOne { puo.mutation.SetOperatingSystemID(id) return puo }
[ -1.8977324962615967, -0.25619709491729736, -0.09773120284080505, 1.0568073987960815, -0.19223196804523468, 0.841793954372406, -0.22844475507736206, -0.02438240870833397, 1.0138548612594604, -0.16086259484291077, -0.004540105815976858, -0.5267320871353149, -0.2745394706726074, 0.24492923915...
func (puo *PhoneUpdateOne) SetOperatingSystem(o *OperatingSystem) *PhoneUpdateOne { return puo.SetOperatingSystemID(o.ID) }
[ -1.4802262783050537, 0.4677669405937195, 0.43490633368492126, 0.7580564022064209, 0.29382309317588806, 0.46779629588127136, 0.2977396547794342, -0.24506065249443054, 0.5718470811843872, -1.1654566526412964, 0.01845669373869896, -0.5570532083511353, -0.49487656354904175, -0.2678972184658050...
func (puo *PhoneUpdateOne) Mutation() *PhoneMutation { return puo.mutation }
[ -0.5239681005477905, -0.3536585867404938, 0.3031425476074219, 0.8164497017860413, 0.3770245611667633, 0.7521589994430542, -0.13859795033931732, -0.017279548570513725, 1.4678443670272827, -0.5108561515808105, 0.23754188418388367, -1.2609750032424927, -0.7112951278686523, -0.1369090974330902...