text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func validateCookieHandler(w http.ResponseWriter, r *http.Request, conf *config) {
// initialize headers
w.Header().Set("X-Auth-Request-Redirect", "")
w.Header().Set("X-Auth-Request-User", "")
auth := r.Header.Get("Authorization")
split := strings.SplitN(auth, " ", 2)
var tokenvalue string = ""
if len(split) ==... | [
0.443783700466156,
-0.13676238059997559,
0.8851887583732605,
0.4401296377182007,
-1.1184024810791016,
-0.15632283687591553,
0.10099153220653534,
-0.6340097784996033,
-0.06266962736845016,
0.12360293418169022,
0.8981177806854248,
1.175948143005371,
0.6359859704971313,
0.1807234287261963,
... |
func getJWT(code string, conf *config) (string, error) {
client := &http.Client{
Timeout: time.Second * conf.requestTimeout,
}
reqBody := []byte("code=" + url.QueryEscape(code) +
"&client_id=" + url.QueryEscape(conf.clientID) +
"&client_secret=" + url.QueryEscape(conf.clientSecret) +
"&redirect_uri=" + url.... | [
-0.1956101953983307,
0.0628892257809639,
1.301517367362976,
0.09729190170764923,
-0.9169126749038696,
-0.3172933757305145,
-0.10251076519489288,
-0.3940829038619995,
-0.22639472782611847,
0.4857345521450043,
-0.0529678538441658,
1.0214871168136597,
-0.09248397499322891,
-0.0384036190807819... |
func (h *indexedHeap) put(key string, exp uint64, bytes uint) int {
idx := 0
if len(h.entries) < h.maxidx {
// Steal index from previously removed entry
// capacity > size is guaranteed
n := len(h.entries)
idx = h.entries[:n+1][n].idx
} else {
idx = h.maxidx
h.maxidx++
h.indices = append(h.indices, idx... | [
-0.3470885157585144,
0.3210277259349823,
0.4211784899234772,
-0.9588715434074402,
-0.5549070239067078,
-0.06421186029911041,
0.433417946100235,
0.7964573502540588,
0.01986865885555744,
0.536453366279602,
-0.3949013352394104,
0.654464066028595,
-1.3732295036315918,
-0.486580491065979,
0.6... |
func (h *indexedHeap) remove(idx int) (string, uint) {
return h.removeInternal(h.indices[idx])
} | [
-1.3036493062973022,
-0.2742220461368561,
0.5034340023994446,
-0.837213397026062,
-1.3536357879638672,
-0.6259585022926331,
-0.21398456394672394,
-0.04034679755568504,
0.9927780032157898,
0.2810811400413513,
-0.39723461866378784,
-0.8532155752182007,
-0.7224574089050293,
-0.682486593723297... |
func (h *indexedHeap) removeFirst() (string, uint) {
return h.removeInternal(0)
} | [
-0.33938324451446533,
-0.05603165924549103,
0.6895433664321899,
-0.23938366770744324,
-0.2259208709001541,
-1.191076397895813,
-0.104327492415905,
0.5631369352340698,
-0.1804254800081253,
0.17826390266418457,
-0.5241222977638245,
-0.13652589917182922,
-0.4211651086807251,
0.043211467564105... |
func (h AggregableSlices) Sort() []Aggregables {
sorted := make([]Aggregables, len(h))
for i, v := range h {
sorted[i] = v
}
return sorted
} | [
-0.5011898875236511,
0.006596182473003864,
0.5070364475250244,
-0.11288043856620789,
0.16041722893714905,
0.2769211232662201,
-0.5908724069595337,
-1.0972992181777954,
-0.7365619540214539,
0.39462170004844666,
0.41912731528282166,
1.1978482007980347,
-0.7818543910980225,
1.0215171575546265... |
func NewEpisodicSlicer() *EpisodicSlicer {
return &EpisodicSlicer{}
} | [
-0.8249837160110474,
-0.5841314792633057,
-0.2749886214733124,
0.3145279586315155,
-1.207952618598938,
0.04368050768971443,
-0.9907808899879456,
-0.5368187427520752,
-0.39021480083465576,
0.2988792061805725,
-0.16733399033546448,
0.43596717715263367,
0.6121053099632263,
0.9979677796363831,... |
func (e *EpisodicSlicer) Label() string {
return "episode"
} | [
-0.7062404155731201,
-0.8311500549316406,
0.09810370206832886,
-0.40667200088500977,
0.3258150517940521,
1.3190641403198242,
-0.6162030696868896,
-0.037439748644828796,
1.3698840141296387,
1.5126121044158936,
0.4780205190181732,
0.2263718545436859,
0.40613046288490295,
0.05657384917140007,... |
func NewCummulativeRangeSlicer(back, start, end int) *CummulativeRangeSlicer {
return &CummulativeRangeSlicer{
back: back,
start: start,
end: end,
}
} | [
0.3706923723220825,
-1.5150140523910522,
0.47274112701416016,
0.40843766927719116,
-0.88237065076828,
0.3288475573062897,
-0.47611111402511597,
0.098286934196949,
-0.9373918175697327,
0.7709296941757202,
-0.41516757011413574,
0.3041686415672302,
-0.7283982038497925,
0.4525972306728363,
-... |
func (e *CummulativeRangeSlicer) Label() string {
if e.back == 0 {
return "episode"
}
return fmt.Sprintf("per last %d episodes", e.back)
} | [
-0.3764851689338684,
-0.8737953305244446,
0.3880372941493988,
-0.8584457635879517,
0.8053825497627258,
1.1755656003952026,
-0.2714869976043701,
-0.12337590008974075,
0.6097991466522217,
1.3355482816696167,
1.4090986251831055,
0.14862565696239471,
-0.4133548140525818,
-0.30222395062446594,
... |
func (*Set) Descriptor() ([]byte, []int) {
return file_api_proto_rawDescGZIP(), []int{0}
} | [
-1.0138239860534668,
0.6743296384811401,
0.3859751522541046,
-0.6807433366775513,
0.03176679089665413,
-0.009909319691359997,
0.2777949869632721,
-0.1031363233923912,
-0.9104089140892029,
-0.11139339208602905,
-0.10256113111972809,
0.20423491299152374,
0.18640536069869995,
0.83056229352951... |
func (*Name) Descriptor() ([]byte, []int) {
return file_api_proto_rawDescGZIP(), []int{1}
} | [
-0.8798663020133972,
0.04458865150809288,
0.5193578600883484,
-0.17189721763134003,
-0.9744073152542114,
-0.46828505396842957,
0.11625228822231293,
-0.316143274307251,
-0.5785887837409973,
0.5778771042823792,
-1.4808791875839233,
-0.4108746349811554,
-0.011199956759810448,
1.10778188705444... |
func (*Result) Descriptor() ([]byte, []int) {
return file_api_proto_rawDescGZIP(), []int{2}
} | [
-0.858616054058075,
0.9973542094230652,
0.4430641531944275,
0.35038572549819946,
0.29740044474601746,
-0.25954991579055786,
0.8357081413269043,
0.12976454198360443,
-0.3479791581630707,
-0.7540907859802246,
-1.1752676963806152,
0.012678951025009155,
-0.22720734775066376,
0.5057995915412903... |
func (*Empty) Descriptor() ([]byte, []int) {
return file_api_proto_rawDescGZIP(), []int{3}
} | [
-0.8733628392219543,
0.24571800231933594,
0.6159425973892212,
-0.4310360848903656,
0.2504361867904663,
0.4010777473449707,
-0.18959419429302216,
0.14653366804122925,
-0.9040635228157043,
0.32027339935302734,
-0.8444118499755859,
0.5632323622703552,
0.07674215734004974,
0.6136647462844849,
... |
func (*Message) Descriptor() ([]byte, []int) {
return file_api_proto_rawDescGZIP(), []int{4}
} | [
-0.7935477495193481,
1.0787376165390015,
0.5227104425430298,
0.07698886096477509,
-0.06120840087532997,
-0.21473807096481323,
-0.0839189887046814,
0.1643954962491989,
-0.6951631903648376,
-0.8759492039680481,
-0.05064833164215088,
0.011583523824810982,
-0.2580326199531555,
1.27275407314300... |
func onConnect(c *gnet.Connection, solicited bool) {
fmt.Printf("Event Callback: connnect event \n")
} | [
1.4486198425292969,
-0.9016274809837341,
0.5561651587486267,
-0.05289531871676445,
-0.44213736057281494,
0.5113983154296875,
-0.42740052938461304,
-0.12442944198846817,
-0.17742305994033813,
0.9854998588562012,
0.040181662887334824,
-0.10630542039871216,
0.017669115215539932,
-0.0127731384... |
func onDisconnect(c *gnet.Connection,
reason gnet.DisconnectReason) {
fmt.Printf("Event Callback: disconnect event \n")
} | [
1.697114109992981,
-1.3113653659820557,
0.5181708931922913,
-0.11878315359354019,
-0.1196087896823883,
0.3877691328525543,
-0.7189704179763794,
-0.12660858035087585,
0.5029813051223755,
0.8268160223960876,
0.21519188582897186,
0.217445507645607,
-0.0461578443646431,
-0.24938365817070007,
... |
func onMessage(c *gnet.Connection, channel uint16,
msg []byte) error {
fmt.Printf("Event Callback: message event: addr= %s, channel %v, msg= %s \n", c.Addr(), channel, msg)
return nil
} | [
1.0852429866790771,
-0.365546315908432,
0.6964977979660034,
-0.9477420449256897,
0.062137264758348465,
0.02377215400338173,
-0.45668894052505493,
0.2653972804546356,
0.1941743940114975,
0.37023094296455383,
0.5481789112091064,
0.055686865001916885,
-0.49939513206481934,
1.2023953199386597,... |
func main() {
cpool1 := SpawnConnectionPool(6060)
cpool2 := SpawnConnectionPool(6061)
//connect to peer
con, err := cpool1.Connect("127.0.0.1:6061")
_ = con
if err != nil {
log.Panic(err)
}
//new dispatch manager
dm1 := gnet.NewDispatcherManager()
cpool1.Config.MessageCallback = dm1.OnMessage //set mess... | [
0.11439674347639084,
0.41554468870162964,
1.038661241531372,
0.24164506793022156,
0.5381646156311035,
0.9447207450866699,
0.287204384803772,
-0.4065939486026764,
-0.6275123953819275,
-0.21685563027858734,
-0.5455737113952637,
-0.25885650515556335,
-0.3228008449077606,
0.38633477687835693,
... |
func (s *ProcProbe) MapTCP(srcAddr, dstAddr *net.TCPAddr) (src *ProcessInfo, dst *ProcessInfo) {
if src, dst = s.connCache.MapTCP(srcAddr, dstAddr); src == nil && dst == nil {
s.scanProc()
src, dst = s.connCache.MapTCP(srcAddr, dstAddr)
}
return
} | [
0.3422302305698395,
-0.11087934672832489,
0.5695995092391968,
-1.018596887588501,
-0.873174786567688,
-0.07443495094776154,
-0.17234790325164795,
-0.5739781856536865,
0.7783837914466858,
0.6166302561759949,
0.34916365146636963,
-0.2976990342140198,
0.7199798226356506,
0.2881986200809479,
... |
func (s *ProcProbe) Start() error {
if err := s.scanProc(); err != nil {
return err
}
s.updateMetadata()
go func() {
seconds := s.Ctx.Config.GetInt("agent.topology.socketinfo.host_update")
ticker := time.NewTicker(time.Duration(seconds) * time.Second)
defer ticker.Stop()
for {
select {
case <-s.q... | [
0.2043149620294571,
0.16984863579273224,
0.473520964384079,
0.37149909138679504,
0.07466087490320206,
0.4419764280319214,
0.3232572376728058,
-0.4007633328437805,
-1.090366005897522,
0.8242930769920349,
-0.03972788155078888,
1.48574960231781,
-0.4758474826812744,
0.34772607684135437,
0.0... |
func (s *ProcProbe) Stop() {
s.quit <- true
} | [
0.35178712010383606,
0.007446476723998785,
0.3105098307132721,
0.12193763256072998,
0.6875966787338257,
1.2980927228927612,
0.38260579109191895,
-0.2087462842464447,
-1.2012355327606201,
0.6024048328399658,
-0.19322222471237183,
0.8512832522392273,
-1.292028784751892,
0.23005948960781097,
... |
func NewProcProbe(ctx tp.Context) *ProcProbe {
procGlob := "/proc/[0-9]*/task/[0-9]*/net"
pid := os.Getpid()
if _, err := os.Stat(fmt.Sprintf("/proc/%d/tasks/%d/net", pid, pid)); os.IsNotExist(err) {
procGlob = "/proc/[0-9]*/net"
}
return &ProcProbe{
Ctx: ctx,
procGlob: procGlob,
connCache: NewConn... | [
0.4095180034637451,
-0.7111610770225525,
0.5104385018348694,
-0.03833657503128052,
-0.12359356880187988,
0.0449601374566555,
0.1634356528520584,
-0.8546578884124756,
-0.2708192765712738,
0.26379629969596863,
0.31339532136917114,
-0.32778945565223694,
-0.5316771268844604,
0.4199579358100891... |
func SumBytes(data []byte) string {
sum := md5.Sum(data)
return fmt.Sprintf("%x", sum)
} | [
0.036621320992708206,
0.5316466689109802,
0.45875006914138794,
-0.6672924757003784,
-0.8159633874893188,
0.29363149404525757,
0.01093878224492073,
0.1528424471616745,
0.9825724363327026,
0.8182923197746277,
-0.6182659864425659,
-0.35166674852371216,
-0.9419567584991455,
-0.4424039423465729... |
func SumString(data string) string {
sum := md5.Sum([]byte(data))
return fmt.Sprintf("%x", sum)
} | [
-0.3972809910774231,
0.25879374146461487,
0.5573238730430603,
-0.6412533521652222,
-0.8326410055160522,
0.7191030383110046,
-0.15298040211200714,
-0.33322757482528687,
0.7590547800064087,
0.4851960837841034,
-0.3626062572002411,
-0.49135494232177734,
-0.11065620929002762,
-0.90623080730438... |
func SumFile(file string) (string, error) {
f, err := os.Open(file)
if err != nil {
return "", err
}
defer f.Close()
h := md5.New()
if _, err := io.Copy(h, f); err != nil {
return "", err
}
return fmt.Sprintf("%x", h.Sum(nil)), nil
} | [
0.5007190704345703,
0.20037029683589935,
0.8727338910102844,
-0.3360522985458374,
-1.1144884824752808,
0.9893724918365479,
1.0567805767059326,
0.6425448656082153,
-0.2064208835363388,
1.3125147819519043,
-0.19208523631095886,
-0.6784307360649109,
-0.24152395129203796,
-0.3917483389377594,
... |
func GenerateSumFile(file string) error {
sum, err := SumFile(file)
if err != nil {
return err
}
return ioutil.WriteFile(file+".md5", []byte(sum), 0644)
} | [
0.5717511773109436,
0.07071767747402191,
0.9491084814071655,
0.48882144689559937,
0.18729852139949799,
1.2153306007385254,
1.3486151695251465,
0.7390269041061401,
-0.05020737275481224,
0.16465245187282562,
-1.4149222373962402,
-0.5070621371269226,
0.0613832101225853,
-0.06208174303174019,
... |
func (b baseError) Code() string {
return b.code
} | [
-0.30649787187576294,
-0.7803436517715454,
0.003136757295578718,
0.947546124458313,
0.34052860736846924,
1.184968113899231,
-0.2899269163608551,
0.685796320438385,
0.15494386851787567,
-0.21725422143936157,
0.7637417912483215,
0.35395362973213196,
0.07280164211988449,
0.07997429370880127,
... |
func (b baseError) Message() string {
return b.message
} | [
-0.8644281625747681,
-0.1890840083360672,
-0.09500641375780106,
0.9009165167808533,
0.5721891522407532,
0.5696305632591248,
-0.467339426279068,
-0.39399704337120056,
-0.2862647473812103,
-0.39451566338539124,
0.5952203273773193,
0.24184812605381012,
-0.6064091324806213,
0.5870658159255981,... |
func (b baseError) OrigErrs() []error {
return b.errs
} | [
-0.6119787096977234,
-0.5740737318992615,
0.1630847156047821,
-0.5591926574707031,
0.783708393573761,
0.013254466466605663,
-0.7885866165161133,
-0.15280069410800934,
0.7354832887649536,
-0.07527558505535126,
0.8103883266448975,
0.5150216817855835,
-0.9598944187164307,
-0.07169770449399948... |
func (r requestError) StatusCode() int {
return r.statusCode
} | [
-0.578161895275116,
-0.5158273577690125,
0.20414558053016663,
0.5968592762947083,
-0.27076902985572815,
0.41743260622024536,
-0.16127754747867584,
0.7745658159255981,
0.21814556419849396,
-0.7283305525779724,
0.8990932703018188,
0.28270795941352844,
-0.28795790672302246,
-0.533932387828826... |
func (r requestError) RequestID() string {
return r.requestID
} | [
-0.42222046852111816,
-0.9034337997436523,
0.15184366703033447,
0.9033554196357727,
-0.10894502699375153,
1.0633270740509033,
-0.1968931406736374,
-0.10088253021240234,
1.2561321258544922,
-0.3258298337459564,
0.8986143469810486,
0.8013521432876587,
0.09734421968460083,
0.3330078721046448,... |
func (r requestError) OrigErrs() []error {
if b, ok := r.volcengineerror.(BatchedErrors); ok {
return b.OrigErrs()
}
return []error{r.OrigErr()}
} | [
-0.7922499775886536,
-0.3110996186733246,
0.38411325216293335,
0.1658657044172287,
1.195439338684082,
-0.9003530740737915,
-0.9344483017921448,
-0.4636291563510895,
0.33342400193214417,
0.1594052016735077,
1.0834399461746216,
0.4745055139064789,
-0.36509302258491516,
0.21557918190956116,
... |
func (e unmarshalError) Bytes() []byte {
return e.bytes
} | [
-0.4013916552066803,
0.08491441607475281,
0.1619354635477066,
-1.149135947227478,
0.3616144061088562,
0.3979237377643585,
-0.8599116802215576,
0.36098751425743103,
0.5924950242042542,
-0.8342897295951843,
0.4055580794811249,
0.7007142305374146,
0.1426941305398941,
-0.01695660687983036,
0... |
func CreateServicePrincipal(ctx context.Context, appID string) (graphrbac.ServicePrincipal, error) {
spClient := getServicePrincipalsClient()
return spClient.Create(ctx,
graphrbac.ServicePrincipalCreateParameters{
AppID: to.StringPtr(appID),
AccountEnabled: to.BoolPtr(true),
})
} | [
0.6925883293151855,
-0.5158807039260864,
0.2953568994998932,
0.019720833748579025,
-0.3889988660812378,
0.7954729795455933,
-0.42579081654548645,
-0.7891123294830322,
0.7443807125091553,
0.5006152987480164,
-0.6300349831581116,
0.7451075315475464,
-1.7556183338165283,
0.08536988496780396,
... |
func CreateADApplication(ctx context.Context) (graphrbac.Application, error) {
appClient := getApplicationsClient()
return appClient.Create(ctx, graphrbac.ApplicationCreateParameters{
AvailableToOtherTenants: to.BoolPtr(false),
DisplayName: to.StringPtr("Go SDK Samples"),
Homepage: to... | [
0.3177870213985443,
0.2611144781112671,
0.5090163350105286,
-0.7831470966339111,
0.43361514806747437,
0.5147533416748047,
0.04631952941417694,
-0.7883204817771912,
0.29716840386390686,
0.4168950617313385,
-0.17781144380569458,
0.38734737038612366,
-0.4852473735809326,
0.5049837827682495,
... |
func DeleteADApplication(ctx context.Context, appObjID string) (autorest.Response, error) {
appClient := getApplicationsClient()
return appClient.Delete(ctx, appObjID)
} | [
0.2995346188545227,
-0.7271291017532349,
0.42194628715515137,
-0.18245872855186462,
-0.5433703660964966,
0.4053715467453003,
0.18613775074481964,
-0.6544643044471741,
1.7207400798797607,
0.6156345009803772,
-0.46586874127388,
0.38446223735809326,
0.4005199372768402,
0.3603960871696472,
0... |
func AddClientSecret(ctx context.Context, objID string) (autorest.Response, error) {
appClient := getApplicationsClient()
return appClient.UpdatePasswordCredentials(
ctx,
objID,
graphrbac.PasswordCredentialsUpdateParameters{
Value: &[]graphrbac.PasswordCredential{
{
StartDate: &date.Time{time.Now()}... | [
0.44226783514022827,
-0.7930052876472473,
0.7664710879325867,
-0.9380237460136414,
0.027451084926724434,
0.21442753076553345,
-0.5299416780471802,
-1.2733583450317383,
-0.3007051944732666,
0.29685789346694946,
-0.934916615486145,
0.6881821751594543,
-0.9037790298461914,
0.1963120549917221,... |
func GetCurrentUser(ctx context.Context) (graphrbac.AADObject, error) {
objClient := getObjectsClient()
return objClient.GetCurrentUser(ctx)
} | [
0.5481217503547668,
-0.7740325927734375,
0.748155415058136,
0.6073172092437744,
-0.03542257472872734,
0.3450929820537567,
0.7779939770698547,
-1.1240692138671875,
0.3674517273902893,
0.38533705472946167,
0.1401413232088089,
1.5879058837890625,
0.1498652845621109,
-0.2903350591659546,
0.6... |
func URL(route string, opts ...string) (s string) {
size := len(opts)
if size >= 1 {
if strings.Contains(route, "$1") {
route = strings.Replace(route, "$1", opts[0], 1)
}
if size >= 2 && strings.Contains(route, "$2") {
route = strings.Replace(route, "$2", opts[1], 1)
}
}
s = fmt.Sprintf("%s%s", Host, ... | [
-0.1289265751838684,
0.6862536668777466,
0.6144782900810242,
0.017449643462896347,
-0.02827931009232998,
0.14801068603992462,
-0.28428009152412415,
1.2425898313522339,
-0.08576031029224396,
0.5154514908790588,
0.38397184014320374,
0.7961564660072327,
-0.8535614013671875,
-1.157363057136535... |
func buildExampleWriteRequest() []*prompb.TimeSeries {
return []*prompb.TimeSeries{
{
Labels: []*prompb.Label{
{Name: "__name__", Value: "random_metric"}, // This is required and how prom stores the name of metrics
{Name: "example_label_name", Value: "example_label_value"},
},
Samples: []prompb.Samp... | [
-1.118537187576294,
-0.14143453538417816,
0.7193941473960876,
-0.08130449801683426,
0.054124508053064346,
0.23114654421806335,
-0.4718570113182068,
0.5182037949562073,
0.12747304141521454,
0.3772372603416443,
-0.05038410425186157,
0.3008464574813843,
-0.06846046447753906,
0.256132364273071... |
func marshalWriteRequest(samples []*prompb.TimeSeries) ([]byte, error) {
req := &prompb.WriteRequest{
Timeseries: samples,
}
data, err := proto.Marshal(req)
if err != nil {
return nil, err
}
compressed := snappy.Encode(nil, data)
return compressed, nil
} | [
-1.0791809558868408,
0.27181556820869446,
0.4239085912704468,
0.04856722801923752,
0.11008565872907639,
-0.16618184745311737,
-0.45806753635406494,
0.032176561653614044,
0.10374382883310318,
0.1882639229297638,
0.5600248575210571,
0.6395061016082764,
-0.19775566458702087,
0.394099831581115... |
func (c *Client) Store(req []byte) error {
httpReq, err := http.NewRequest("POST", "https://prometheus-us-central1.grafana.net/api/prom/push", bytes.NewReader(req))
if err != nil {
// Errors from NewRequest are from unparseable URLs, so are not
// recoverable.
return err
}
httpReq.Header.Add("Content-Encoding... | [
-0.6535691022872925,
0.48990553617477417,
0.720104455947876,
0.18671301007270813,
0.07141346484422684,
0.4420397877693176,
0.17672261595726013,
-0.6847334504127502,
-0.4265501797199249,
-0.09867484867572784,
-0.49426913261413574,
0.5549916625022888,
-1.053842544555664,
0.12985220551490784,... |
func (r *Row) Scan(dest ...interface{}) (err error) {
rows := (*Rows)(r)
if rows.Err() != nil {
return rows.Err()
}
if !rows.Next() {
if rows.Err() == nil {
return ErrNoRows
}
return rows.Err()
}
rows.Scan(dest...)
rows.Close()
return rows.Err()
} | [
-1.185630440711975,
0.5045440793037415,
0.7642264366149902,
0.6757554411888123,
-0.9820911288261414,
-0.18597427010536194,
0.1071571335196495,
-0.14239883422851562,
0.4271598160266876,
-0.4895592927932739,
0.39278846979141235,
-0.2970607876777649,
0.36846959590911865,
0.5764838457107544,
... |
func (rows *Rows) Close() {
if rows.closed {
return
}
rows.readUntilReadyForQuery()
rows.close()
} | [
-0.274815171957016,
0.22273260354995728,
0.1376294642686844,
-0.23159711062908173,
-0.5956463813781738,
0.4162274897098541,
0.4253179430961609,
-0.6475618481636047,
-0.1650390625,
-0.900060772895813,
1.2972339391708374,
-0.45132848620414734,
-0.37509310245513916,
0.8352189064025879,
0.19... |
func (rows *Rows) abort(err error) {
if rows.err != nil {
return
}
rows.err = err
rows.close()
} | [
-0.013517883606255054,
-0.07538571208715439,
0.44677409529685974,
-0.05091976746916771,
-0.5623378157615662,
0.07771052420139313,
0.33425697684288025,
-0.24298392236232758,
0.8856019973754883,
-0.3888447880744934,
1.710425615310669,
0.6832903027534485,
0.2296220362186432,
1.380997896194458... |
func (rows *Rows) Fatal(err error) {
if rows.err != nil {
return
}
rows.err = err
rows.Close()
} | [
0.48157796263694763,
-0.4157644510269165,
0.27266451716423035,
0.5459775328636169,
-0.15050949156284332,
0.5561656355857849,
0.005818723235279322,
0.844368577003479,
1.0567456483840942,
-0.3106811046600342,
1.195021390914917,
0.3600046634674072,
0.5441345572471619,
1.3783022165298462,
0.... |
func (rows *Rows) Next() bool {
if rows.closed {
return false
}
rows.rowCount++
rows.columnIdx = 0
rows.vr = ValueReader{}
for {
t, r, err := rows.conn.rxMsg()
if err != nil {
rows.Fatal(err)
return false
}
switch t {
case readyForQuery:
rows.conn.rxReadyForQuery(r)
rows.close()
retu... | [
-0.6698186993598938,
0.6646952629089355,
0.7152245044708252,
-0.0749753937125206,
-0.7575079202651978,
-0.1815890073776245,
-0.01623186282813549,
-0.4662015736103058,
0.13833259046077728,
-0.15925031900405884,
0.4546200931072235,
-0.13089708983898163,
-0.8661181926727295,
0.908001422882080... |
func (rows *Rows) Conn() *Conn {
return rows.conn
} | [
-0.07798542082309723,
-0.8421816229820251,
0.12793682515621185,
1.577152132987976,
-0.01973339356482029,
-0.8114200830459595,
0.1877710223197937,
0.9926699995994568,
0.4942493438720703,
-1.4351460933685303,
0.3571617007255554,
0.5012085437774658,
0.948357343673706,
0.1603824496269226,
0.... |
func (rows *Rows) Scan(dest ...interface{}) (err error) {
if len(rows.fields) != len(dest) {
err = fmt.Errorf("Scan received wrong number of arguments, got %d but expected %d", len(dest), len(rows.fields))
rows.Fatal(err)
return err
}
for i, d := range dest {
vr, _ := rows.nextColumn()
if d == nil {
c... | [
-0.7607834339141846,
0.4524310529232025,
0.6943038105964661,
0.6040390133857727,
-0.7133430242538452,
-0.7629701495170593,
-0.31973400712013245,
-0.44964829087257385,
-0.3666333556175232,
-0.5042555928230286,
0.20542635023593903,
0.307912141084671,
0.5051426887512207,
0.47795575857162476,
... |
func (rows *Rows) Values() ([]interface{}, error) {
if rows.closed {
return nil, errors.New("rows is closed")
}
values := make([]interface{}, 0, len(rows.fields))
for range rows.fields {
vr, _ := rows.nextColumn()
if vr.Len() == -1 {
values = append(values, nil)
continue
}
switch vr.Type().Forma... | [
-0.22768071293830872,
-0.12535512447357178,
0.5822353363037109,
-0.10308519750833511,
0.2312309443950653,
-0.5287924408912659,
-0.5998534560203552,
-0.730086624622345,
0.35551777482032776,
-0.36643654108047485,
0.29422324895858765,
0.5563475489616394,
-0.4622524678707123,
0.854391157627105... |
func (rows *Rows) AfterClose(f func(*Rows)) {
if rows.afterClose == nil {
rows.afterClose = f
} else {
prevFn := rows.afterClose
rows.afterClose = func(rows *Rows) {
f(rows)
prevFn(rows)
}
}
} | [
0.03927844017744064,
0.013321110978722572,
0.5916692614555359,
0.789977490901947,
-1.0813912153244019,
-0.43510380387306213,
0.8347017168998718,
0.24073730409145355,
-0.059989310801029205,
-0.1848134845495224,
0.23427753150463104,
-0.678216278553009,
0.06254212558269501,
0.6839166879653931... |
func (c *Conn) Query(sql string, args ...interface{}) (*Rows, error) {
c.lastActivityTime = time.Now()
rows := c.getRows(sql, args)
if err := c.lock(); err != nil {
rows.abort(err)
return rows, err
}
rows.unlockConn = true
ps, ok := c.preparedStatements[sql]
if !ok {
var err error
ps, err = c.Prepare(... | [
0.1288529485464096,
0.4332408905029297,
0.7532016038894653,
0.5221439599990845,
-0.15771767497062683,
-0.9187394976615906,
-0.5884501338005066,
-0.21310719847679138,
0.5248011946678162,
0.36583617329597473,
0.7170659303665161,
-0.18533393740653992,
-0.18664756417274475,
0.4314636290073395,... |
func (c *Conn) QueryRow(sql string, args ...interface{}) *Row {
rows, _ := c.Query(sql, args...)
return (*Row)(rows)
} | [
0.41789957880973816,
0.8651846051216125,
0.2117946892976761,
0.7219502925872803,
-0.03066350519657135,
-0.819756031036377,
-0.8976373076438904,
-0.14457912743091583,
0.06417759507894516,
-1.499742865562439,
0.6945469975471497,
0.19502592086791992,
0.2731914520263672,
0.4588099420070648,
... |
func (fn ListMovesHandlerFunc) Handle(params ListMovesParams) middleware.Responder {
return fn(params)
} | [
-0.17129023373126984,
-0.050679296255111694,
0.44277048110961914,
0.5945608019828796,
0.001375085674226284,
0.12623898684978485,
0.2832307517528534,
0.2571962773799896,
0.4810674488544464,
-0.2873603403568268,
-0.40586057305336,
-0.20983873307704926,
-0.1891324669122696,
0.2096749395132064... |
func NewListMoves(ctx *middleware.Context, handler ListMovesHandler) *ListMoves {
return &ListMoves{Context: ctx, Handler: handler}
} | [
-0.34743937849998474,
-0.3001810908317566,
0.3061710298061371,
0.6338763236999512,
-0.7957686185836792,
-0.22485892474651337,
-0.886565089225769,
-0.4122098982334137,
0.6814408302307129,
-0.15493641793727875,
-0.8496133685112,
0.2267932891845703,
-0.16064320504665375,
0.516944944858551,
... |
func TestAdd(t *testing.T) {
fmt.Println(Add(1,2))
} | [
0.17022131383419037,
-0.6169186234474182,
0.552850604057312,
0.42388585209846497,
0.09468606859445572,
1.6893126964569092,
0.6279070973396301,
0.038065653294324875,
-0.29594433307647705,
-0.8987281322479248,
-0.013008561916649342,
1.0181941986083984,
-0.8772070407867432,
0.2786963880062103... |
func TestSub(t *testing.T) {
fmt.Println(Sub(2,1))
} | [
0.14768080413341522,
-0.06817345321178436,
0.42361921072006226,
1.047731637954712,
-1.0070600509643555,
0.9844335913658142,
0.8825637102127075,
0.3802284300327301,
-0.5124920606613159,
-1.3337490558624268,
-1.1806561946868896,
1.2101285457611084,
-0.25921663641929626,
-0.22986510396003723,... |
func ParseResourceInstance(s string) (ri ResourceInstance, err error) {
if len(s) == 0 {
err = ErrUnimplemented
return
}
i := strings.Index(s, ":")
if i == -1 {
// no clone identifier
ri.Name = strings.TrimSpace(s)
return
}
ri.Clone, err = strconv.Atoi(strings.TrimSpace(s[i+1:]))
if err != nil {
re... | [
-0.22202284634113312,
-1.059350848197937,
0.6273254156112671,
-1.3575057983398438,
-1.591433048248291,
-0.005644793156534433,
0.26043692231178284,
0.4749129116535187,
0.9791560769081116,
0.6033036708831787,
-0.5358899831771851,
-0.6457104682922363,
-0.17814508080482483,
-1.442082166671753,... |
func MakeRenderableNodes(t report.Topology) RenderableNodes {
result := RenderableNodes{}
for id, nmd := range t.Nodes {
rn := NewRenderableNode(id).WithNode(nmd)
rn.Origins = report.MakeIDList(id)
if hostNodeID, ok := nmd.Metadata[report.HostNodeID]; ok {
rn.Origins = rn.Origins.Add(hostNodeID)
}
result... | [
-0.5509583353996277,
0.7575265765190125,
0.6601389646530151,
-1.673648715019226,
-0.17646652460098267,
0.6094927191734314,
0.01648559235036373,
0.09530708193778992,
-0.5846531391143799,
0.8722323179244995,
-0.2883427143096924,
0.4126339256763458,
0.1423412710428238,
-0.579311728477478,
-... |
func Allowf(format string, a ...interface{}) error {
return fmt.Errorf(format+": %w", append(a, Allow)...)
} | [
0.751694917678833,
-0.049166951328516006,
0.591158926486969,
-0.2265048623085022,
-0.7629223465919495,
0.4877502918243408,
-0.02379484847187996,
0.22749009728431702,
-0.32929277420043945,
0.057601261883974075,
1.168190360069275,
1.0859174728393555,
0.4145634174346924,
-0.026655878871679306... |
func Denyf(format string, a ...interface{}) error {
return fmt.Errorf(format+": %w", append(a, Deny)...)
} | [
0.9771071672439575,
0.14619918167591095,
0.7421700358390808,
-0.1267327070236206,
0.18688124418258667,
0.2509298324584961,
-0.3818926513195038,
-0.38585591316223145,
-0.24806277453899384,
-0.2389061003923416,
0.6362797021865845,
0.45647621154785156,
0.24116510152816772,
0.07483982294797897... |
func Skipf(format string, a ...interface{}) error {
return fmt.Errorf(format+": %w", append(a, Skip)...)
} | [
-0.11741471290588379,
-0.08053711801767349,
0.615828275680542,
0.05063910037279129,
0.2033255696296692,
0.4405253231525421,
0.24030113220214844,
-0.0312790684401989,
-0.5902850031852722,
-0.08808372169733047,
0.6367193460464478,
0.16731612384319305,
0.958358108997345,
-0.38870230317115784,... |
func DecisionContext(parent context.Context, decision error) context.Context {
if decision == nil || errors.Is(decision, Skip) {
return parent
}
return context.WithValue(parent, decisionCtxKey{}, decision)
} | [
0.5866243243217468,
-0.08436969667673111,
0.6572994589805603,
0.27532774209976196,
-1.1525967121124268,
0.9042896628379822,
-0.23602528870105743,
-0.5016096830368042,
0.7530267834663391,
0.5683796405792236,
0.5295073986053467,
0.1261839121580124,
0.7511097192764282,
0.127895325422287,
-1... |
func (policy QueryPolicy) EvalQuery(ctx context.Context, q ent.Query) error {
if decision, ok := decisionFromContext(ctx); ok {
return decision
}
for _, rule := range policy {
switch decision := rule.EvalQuery(ctx, q); {
case decision == nil || errors.Is(decision, Skip):
case errors.Is(decision, Allow):
r... | [
0.22128933668136597,
0.06285442411899567,
0.49220407009124756,
-0.251277357339859,
0.2839173972606659,
1.126725673675537,
-1.1387999057769775,
-0.1915145367383957,
0.7001280784606934,
0.5456400513648987,
1.4137635231018066,
0.30023160576820374,
-0.5554840564727783,
0.42126208543777466,
-... |
func (f QueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error {
return f(ctx, q)
} | [
0.09643728286027908,
0.07817871868610382,
0.12593518197536469,
-0.7752083539962769,
0.7690605521202087,
0.7068101763725281,
-1.1406816244125366,
0.9362855553627014,
0.2582365870475769,
-0.11464738845825195,
0.49083539843559265,
0.5011165142059326,
0.593644917011261,
0.49033480882644653,
... |
func (policy MutationPolicy) EvalMutation(ctx context.Context, m ent.Mutation) error {
if decision, ok := decisionFromContext(ctx); ok {
return decision
}
for _, rule := range policy {
switch decision := rule.EvalMutation(ctx, m); {
case decision == nil || errors.Is(decision, Skip):
case errors.Is(decision, ... | [
-0.5792310833930969,
-0.42064929008483887,
0.47453048825263977,
0.1968015432357788,
0.054726943373680115,
1.0808501243591309,
-0.3056272268295288,
0.29946571588516235,
1.2446309328079224,
1.0527280569076538,
1.3262321949005127,
-0.23991179466247559,
-0.898023784160614,
0.2081146240234375,
... |
func (f MutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error {
return f(ctx, m)
} | [
-0.7685005068778992,
-0.3316558301448822,
0.13678859174251556,
-0.09755801409482956,
0.1229577586054802,
0.6400212645530701,
-0.31030040979385376,
1.2252650260925293,
0.8194736242294312,
0.8619536757469177,
0.4524475038051605,
-0.2723236083984375,
0.29301372170448303,
0.1327952891588211,
... |
func (policy Policy) EvalQuery(ctx context.Context, q ent.Query) error {
return policy.Query.EvalQuery(ctx, q)
} | [
-0.07063017785549164,
-0.29180335998535156,
0.22684869170188904,
-0.935712993144989,
0.4124763011932373,
1.207735300064087,
-1.872470498085022,
0.34242820739746094,
1.3159881830215454,
-0.22457340359687805,
0.2778712809085846,
0.4840301275253296,
0.2794739603996277,
0.713668942451477,
-1... |
func (policy Policy) EvalMutation(ctx context.Context, m ent.Mutation) error {
return policy.Mutation.EvalMutation(ctx, m)
} | [
-1.4296433925628662,
-0.6821631789207458,
0.11166459321975708,
-0.06629468500614166,
-0.06410010904073715,
1.3183293342590332,
-0.8661631941795349,
0.7520601749420166,
1.9227248430252075,
0.5989434719085693,
0.2602497637271881,
-0.3575163781642914,
-0.4108283817768097,
0.10484067350625992,... |
func AlwaysAllowRule() QueryMutationRule {
return fixedDecision{Allow}
} | [
1.2047843933105469,
-0.07634048163890839,
0.2646014988422394,
0.3422820270061493,
-0.3837507963180542,
1.3517343997955322,
0.03902316093444824,
0.33452773094177246,
0.39351823925971985,
0.27850106358528137,
1.6840492486953735,
0.6227588057518005,
-0.4313264489173889,
0.7117699384689331,
... |
func AlwaysDenyRule() QueryMutationRule {
return fixedDecision{Deny}
} | [
0.274503231048584,
-0.18863748013973236,
0.41939419507980347,
0.4375142753124237,
0.38098353147506714,
0.7625484466552734,
-0.048384688794612885,
-0.40181902050971985,
0.7031762599945068,
0.010931682772934437,
1.6357078552246094,
0.3151331841945648,
-0.38534972071647644,
0.6163401007652283... |
func ContextQueryMutationRule(eval func(context.Context) error) QueryMutationRule {
return contextDecision{eval}
} | [
-0.37328824400901794,
-0.3615814745426178,
-0.011590121313929558,
0.015832576900720596,
-0.4651096761226654,
1.3016186952590942,
-0.27347543835639954,
0.43139970302581787,
0.9365637302398682,
0.3269309103488922,
1.0186964273452759,
0.004247738514095545,
-0.29980260133743286,
-0.30040049552... |
func OnMutationOperation(rule MutationRule, op ent.Op) MutationRule {
return MutationRuleFunc(func(ctx context.Context, m ent.Mutation) error {
if m.Op().Is(op) {
return rule.EvalMutation(ctx, m)
}
return Skip
})
} | [
-0.16505256295204163,
-0.17298240959644318,
0.48141077160835266,
0.3425057530403137,
-0.7841536402702332,
-0.5548223257064819,
0.35703617334365845,
0.10477253049612045,
0.6971570253372192,
1.5326899290084839,
0.4972090423107147,
-0.6915957927703857,
0.36189451813697815,
-0.2597299516201019... |
func DenyMutationOperationRule(op ent.Op) MutationRule {
rule := MutationRuleFunc(func(_ context.Context, m ent.Mutation) error {
return Denyf("ent/privacy: operation %s is not allowed", m.Op())
})
return OnMutationOperation(rule, op)
} | [
-0.1811409741640091,
1.1240649223327637,
0.9298911690711975,
0.7939708232879639,
-0.5925552248954773,
0.8331833481788635,
0.793516218662262,
-0.3252498209476471,
0.05545154586434364,
0.4421999156475067,
1.3133630752563477,
-0.22400934994220734,
0.1804262399673462,
-0.22932083904743195,
0... |
func (f AmbulanceQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error {
if q, ok := q.(*ent.AmbulanceQuery); ok {
return f(ctx, q)
}
return Denyf("ent/privacy: unexpected query type %T, expect *ent.AmbulanceQuery", q)
} | [
0.41661038994789124,
0.22261615097522736,
0.2733137905597687,
-0.28044891357421875,
0.5528417229652405,
0.8852102756500244,
-1.2536581754684448,
-0.054877106100320816,
0.7559912204742432,
-0.22336921095848083,
1.4357309341430664,
0.24664306640625,
0.29469016194343567,
0.5201548933982849,
... |
func (f AmbulanceMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error {
if m, ok := m.(*ent.AmbulanceMutation); ok {
return f(ctx, m)
}
return Denyf("ent/privacy: unexpected mutation type %T, expect *ent.AmbulanceMutation", m)
} | [
-0.6614062190055847,
-0.07942846417427063,
0.31546324491500854,
0.08664452284574509,
0.3182365596294403,
0.8714009523391724,
-0.4686671197414398,
0.6629936099052429,
0.9709283709526062,
0.5228151082992554,
1.139133334159851,
-0.7337049245834351,
-0.10286032408475876,
-0.04877359792590141,
... |
func (f CarCheckInOutQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error {
if q, ok := q.(*ent.CarCheckInOutQuery); ok {
return f(ctx, q)
}
return Denyf("ent/privacy: unexpected query type %T, expect *ent.CarCheckInOutQuery", q)
} | [
-0.17626453936100006,
-0.02855927310883999,
0.1872766613960266,
-0.4614834189414978,
0.29456624388694763,
0.5445845723152161,
-0.9475916624069214,
0.7275795340538025,
0.2020222246646881,
0.08552587032318115,
1.0354607105255127,
0.48673558235168457,
0.031492285430431366,
0.24297411739826202... |
func (f CarCheckInOutMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error {
if m, ok := m.(*ent.CarCheckInOutMutation); ok {
return f(ctx, m)
}
return Denyf("ent/privacy: unexpected mutation type %T, expect *ent.CarCheckInOutMutation", m)
} | [
-1.0942277908325195,
-0.36550962924957275,
0.23136256635189056,
0.034212466329336166,
-0.1778154969215393,
0.4800536334514618,
-0.005067421123385429,
1.5547146797180176,
0.44376853108406067,
0.5398921966552734,
0.6531838774681091,
-0.19904494285583496,
-0.2955024242401123,
-0.4128566682338... |
func (f CarInspectionQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error {
if q, ok := q.(*ent.CarInspectionQuery); ok {
return f(ctx, q)
}
return Denyf("ent/privacy: unexpected query type %T, expect *ent.CarInspectionQuery", q)
} | [
0.17605231702327728,
0.4596622884273529,
0.16372917592525482,
-0.48467230796813965,
0.46955516934394836,
0.3825134336948395,
-1.238548994064331,
0.19391988217830658,
0.4370349049568176,
0.01680106110870838,
1.2337478399276733,
0.4913432002067566,
0.05418479070067406,
0.2693566679954529,
... |
func (f CarInspectionMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error {
if m, ok := m.(*ent.CarInspectionMutation); ok {
return f(ctx, m)
}
return Denyf("ent/privacy: unexpected mutation type %T, expect *ent.CarInspectionMutation", m)
} | [
-0.7427299618721008,
-0.12612198293209076,
0.14407683908939362,
-0.1128060594201088,
0.07133238017559052,
0.23437924683094025,
-0.4355628788471222,
0.988581657409668,
0.6417327523231506,
0.7368115782737732,
0.9272891879081726,
-0.2915877103805542,
-0.37261760234832764,
-0.2944681942462921,... |
func (f CarRepairrecordQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error {
if q, ok := q.(*ent.CarRepairrecordQuery); ok {
return f(ctx, q)
}
return Denyf("ent/privacy: unexpected query type %T, expect *ent.CarRepairrecordQuery", q)
} | [
0.054490718990564346,
0.22855570912361145,
0.11925344169139862,
-0.5837497711181641,
0.32128921151161194,
0.5400376319885254,
-0.5747520923614502,
0.39379626512527466,
0.2979784607887268,
-0.035645682364702225,
1.0094324350357056,
0.7850592732429504,
-0.3412523865699768,
0.286037802696228,... |
func (f CarRepairrecordMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error {
if m, ok := m.(*ent.CarRepairrecordMutation); ok {
return f(ctx, m)
}
return Denyf("ent/privacy: unexpected mutation type %T, expect *ent.CarRepairrecordMutation", m)
} | [
-0.615062415599823,
-0.06242464482784271,
0.20284457504749298,
-0.18757043778896332,
-0.10187456011772156,
0.5420450568199158,
0.006410260684788227,
1.146935224533081,
0.47128912806510925,
0.6763178706169128,
0.6451191306114197,
0.08568300306797028,
-0.7042831182479858,
-0.1266422271728515... |
func (f CarbrandQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error {
if q, ok := q.(*ent.CarbrandQuery); ok {
return f(ctx, q)
}
return Denyf("ent/privacy: unexpected query type %T, expect *ent.CarbrandQuery", q)
} | [
0.1616397351026535,
0.19490793347358704,
0.055435363203287125,
-0.4498397707939148,
0.5611901879310608,
0.35867738723754883,
-1.1811890602111816,
0.5291502475738525,
0.5962152481079102,
0.02549605816602707,
1.1009310483932495,
0.8463687300682068,
-0.40008851885795593,
0.5521594285964966,
... |
func (f CarbrandMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error {
if m, ok := m.(*ent.CarbrandMutation); ok {
return f(ctx, m)
}
return Denyf("ent/privacy: unexpected mutation type %T, expect *ent.CarbrandMutation", m)
} | [
-0.8770623207092285,
-0.25081831216812134,
-0.001870676758699119,
-0.11704366654157639,
-0.0014548491453751922,
0.06672227382659912,
-0.47716841101646423,
1.4665422439575195,
0.7409180402755737,
0.5071238279342651,
0.4933982491493225,
-0.17535342276096344,
-1.0082796812057495,
-0.115641944... |
func (f CarregisterQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error {
if q, ok := q.(*ent.CarregisterQuery); ok {
return f(ctx, q)
}
return Denyf("ent/privacy: unexpected query type %T, expect *ent.CarregisterQuery", q)
} | [
0.3460826277732849,
0.6543992161750793,
0.09052767604589462,
-0.36384639143943787,
0.7255080938339233,
0.390256404876709,
-0.8314011693000793,
0.35422372817993164,
0.8566232919692993,
0.1105763167142868,
0.646013617515564,
0.7297042608261108,
-0.04786539822816849,
0.5278210639953613,
0.1... |
func (f CarregisterMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error {
if m, ok := m.(*ent.CarregisterMutation); ok {
return f(ctx, m)
}
return Denyf("ent/privacy: unexpected mutation type %T, expect *ent.CarregisterMutation", m)
} | [
-0.6148911714553833,
0.40151238441467285,
0.09420289099216461,
0.0357605442404747,
0.2067151516675949,
0.09613627195358276,
0.0976354107260704,
0.915350615978241,
1.1167868375778198,
0.7701064944267273,
0.22092439234256744,
0.01437389850616455,
-0.5377223491668701,
0.12061049789190292,
1... |
func (f CarserviceQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error {
if q, ok := q.(*ent.CarserviceQuery); ok {
return f(ctx, q)
}
return Denyf("ent/privacy: unexpected query type %T, expect *ent.CarserviceQuery", q)
} | [
0.011854908429086208,
0.4355224668979645,
0.18926501274108887,
-0.5702633857727051,
0.4176184833049774,
0.4964815080165863,
-1.4698436260223389,
0.16757065057754517,
0.3176603317260742,
-0.267142653465271,
1.2469031810760498,
0.7040215134620667,
-0.059513162821531296,
0.5715144872665405,
... |
func (f CarserviceMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error {
if m, ok := m.(*ent.CarserviceMutation); ok {
return f(ctx, m)
}
return Denyf("ent/privacy: unexpected mutation type %T, expect *ent.CarserviceMutation", m)
} | [
-0.9064363241195679,
0.03245865926146507,
0.2809062600135803,
-0.11837014555931091,
0.09831976145505905,
0.5544511079788208,
-0.6163241267204285,
0.9920774102210999,
0.5276116728782654,
0.40363651514053345,
0.9424443244934082,
-0.03413701802492142,
-0.45253223180770874,
0.06396420300006866... |
func (f DeliverQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error {
if q, ok := q.(*ent.DeliverQuery); ok {
return f(ctx, q)
}
return Denyf("ent/privacy: unexpected query type %T, expect *ent.DeliverQuery", q)
} | [
0.10911420732736588,
0.4696531891822815,
0.34327763319015503,
-0.7082440853118896,
0.4962785840034485,
1.0107529163360596,
-1.1479041576385498,
0.0036832268815487623,
1.0532252788543701,
0.25042489171028137,
0.8655238151550293,
0.27755606174468994,
0.2670907974243164,
0.722143828868866,
... |
func (f DeliverMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error {
if m, ok := m.(*ent.DeliverMutation); ok {
return f(ctx, m)
}
return Denyf("ent/privacy: unexpected mutation type %T, expect *ent.DeliverMutation", m)
} | [
-1.0426706075668335,
0.14830096065998077,
0.3687713146209717,
-0.4699450135231018,
-0.13647808134555817,
0.8700780272483826,
-0.4342307448387146,
0.7141467928886414,
1.18508780002594,
0.9220333099365234,
0.586173951625824,
-0.4265175759792328,
-0.012476848438382149,
0.10116762667894363,
... |
func (f DistanceQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error {
if q, ok := q.(*ent.DistanceQuery); ok {
return f(ctx, q)
}
return Denyf("ent/privacy: unexpected query type %T, expect *ent.DistanceQuery", q)
} | [
0.17768877744674683,
0.4034081697463989,
0.29706791043281555,
-0.47520875930786133,
0.31575891375541687,
1.2166537046432495,
-1.0177396535873413,
-0.032866403460502625,
0.8431360721588135,
0.29555049538612366,
0.9745344519615173,
0.43237021565437317,
0.16886430978775024,
0.4063977897167206... |
func (f DistanceMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error {
if m, ok := m.(*ent.DistanceMutation); ok {
return f(ctx, m)
}
return Denyf("ent/privacy: unexpected mutation type %T, expect *ent.DistanceMutation", m)
} | [
-1.0373960733413696,
0.13294047117233276,
0.34043145179748535,
-0.07747208327054977,
-0.03295641019940376,
1.1816203594207764,
-0.2926994860172272,
0.8403440117835999,
1.1032902002334595,
1.0016226768493652,
0.7101064324378967,
-0.3851507902145386,
-0.2822694778442383,
-0.3087933659553528,... |
func (f HospitalQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error {
if q, ok := q.(*ent.HospitalQuery); ok {
return f(ctx, q)
}
return Denyf("ent/privacy: unexpected query type %T, expect *ent.HospitalQuery", q)
} | [
0.22810132801532745,
0.5825567245483398,
0.2696753144264221,
-0.12246356904506683,
0.9316713213920593,
0.9759119749069214,
-0.9900414943695068,
0.12002507597208023,
0.565488338470459,
-0.2703239917755127,
1.463032603263855,
0.692459225654602,
0.21025866270065308,
0.7560935616493225,
-0.3... |
func (f HospitalMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error {
if m, ok := m.(*ent.HospitalMutation); ok {
return f(ctx, m)
}
return Denyf("ent/privacy: unexpected mutation type %T, expect *ent.HospitalMutation", m)
} | [
-0.7815758585929871,
0.35832610726356506,
0.2841813564300537,
0.3165411651134491,
0.6896853446960449,
0.897251307964325,
-0.2492298036813736,
0.853799045085907,
0.6198459267616272,
0.3852705657482147,
1.0058223009109497,
-0.15745316445827484,
-0.3387235403060913,
0.29113197326660156,
0.4... |
func (f InspectionResultQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error {
if q, ok := q.(*ent.InspectionResultQuery); ok {
return f(ctx, q)
}
return Denyf("ent/privacy: unexpected query type %T, expect *ent.InspectionResultQuery", q)
} | [
0.003062624717131257,
0.6540019512176514,
0.2129560112953186,
-0.08729533851146698,
0.5731046795845032,
0.4501781761646271,
-0.510168194770813,
-0.10857801139354706,
0.6306957006454468,
-0.02519158646464348,
0.7816829085350037,
0.3280421197414398,
-0.17152999341487885,
0.31539636850357056,... |
func (f InspectionResultMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error {
if m, ok := m.(*ent.InspectionResultMutation); ok {
return f(ctx, m)
}
return Denyf("ent/privacy: unexpected mutation type %T, expect *ent.InspectionResultMutation", m)
} | [
-0.999229907989502,
0.25075429677963257,
0.1631757616996765,
0.3533359467983246,
0.25418809056282043,
0.3769960403442383,
0.41083380579948425,
0.3773564100265503,
0.7426347732543945,
0.6581270098686218,
0.5094470381736755,
-0.6780247688293457,
-0.6989621520042419,
-0.29658064246177673,
0... |
func (f InsuranceQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error {
if q, ok := q.(*ent.InsuranceQuery); ok {
return f(ctx, q)
}
return Denyf("ent/privacy: unexpected query type %T, expect *ent.InsuranceQuery", q)
} | [
0.1629677414894104,
0.3710114657878876,
0.31950491666793823,
-0.64429771900177,
0.8548063039779663,
0.8222769498825073,
-1.1840705871582031,
-0.06495341658592224,
0.8378995656967163,
0.13924989104270935,
1.2988792657852173,
0.7861578464508057,
0.08355815708637238,
0.08052458614110947,
-0... |
func (f InsuranceMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error {
if m, ok := m.(*ent.InsuranceMutation); ok {
return f(ctx, m)
}
return Denyf("ent/privacy: unexpected mutation type %T, expect *ent.InsuranceMutation", m)
} | [
-1.0054075717926025,
0.13382521271705627,
0.36259397864341736,
-0.15335534512996674,
0.6652073860168457,
0.7772411108016968,
-0.31800568103790283,
0.6026867032051086,
0.9116093516349792,
0.8873047828674316,
0.9793980717658997,
-0.050722621381282806,
-0.26977354288101196,
-0.514677345752716... |
func (f JobPositionQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error {
if q, ok := q.(*ent.JobPositionQuery); ok {
return f(ctx, q)
}
return Denyf("ent/privacy: unexpected query type %T, expect *ent.JobPositionQuery", q)
} | [
0.1396341472864151,
0.11867077648639679,
0.26022690534591675,
-0.5821571350097656,
0.42062756419181824,
0.7739717364311218,
-0.9810826778411865,
0.031149668619036674,
0.42984408140182495,
-0.04981956258416176,
1.0020145177841187,
-0.08435012400150299,
0.22828881442546844,
0.673036098480224... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.