text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func Handle(w http.ResponseWriter, r *http.Request) {
var err error
var txtsearch string
var ctx = context.Background()
var query *SearchQuery
var results []*models.User
api.OPENFAASGetBody(r, &query)
if goscrappy.Debug {
fmt.Printf("Query : %+v\n", query)
}
var DB = dbservice.Db
var qtemplate = `
FOR usr ... | [
-0.7219874858856201,
0.5045135617256165,
1.0035903453826904,
-0.06638594716787338,
-0.03322490677237511,
0.24729986488819122,
0.2607099115848541,
0.0011815427569672465,
-0.4933910667896271,
-0.1888495534658432,
0.47593358159065247,
-0.33779844641685486,
-0.674410879611969,
0.06268391013145... |
func sign(req *http.Request, accessKey, secretKey, signName string) {
if accessKey == "" {
return
}
toSign := req.Method + "\n"
for _, n := range HEADER_NAMES {
toSign += req.Header.Get(n) + "\n"
}
bucket := strings.Split(req.URL.Host, ".")[0]
toSign += "/" + bucket + req.URL.Path
h := hmac.New(sha1.New, []... | [
-0.9467552900314331,
-0.3560043275356293,
0.7129749655723572,
0.6829398274421692,
0.12778788805007935,
-0.5441945195198059,
-0.8200739026069641,
0.7211074829101562,
-0.9200754165649414,
0.34404656291007996,
-0.33011460304260254,
-0.12005775421857834,
0.4142812192440033,
-0.0339962989091873... |
func (g *Gravity) String() string {
// Iterate over the gravity types
for name, gravity := range GravityTypes {
// If the horizontal and vertical gravity is a match
if g.HorizGravity == gravity.HorizGravity &&
g.VertGravity == gravity.VertGravity {
return name
}
}
// Otherwise return an empty string
re... | [
0.1377532035112381,
-0.5394046902656555,
0.4286268949508667,
0.3296132981777191,
-0.2842823565006256,
0.7602809071540833,
0.1215890645980835,
-1.9098790884017944,
-1.4737387895584106,
0.7671940922737122,
0.8860223293304443,
0.2930629253387451,
-1.0897014141082764,
0.33560529351234436,
0.... |
func ParseGravity(value string, def Gravity) (Gravity, error) {
// Convert the string to lowercase
value = strings.ToLower(value)
// If the value isn't given, use the default
if value == "" {
return def, nil
}
// Try to get the gravity type from the map
gravity, ok := GravityTypes[value]
if ok {
return grav... | [
0.16429173946380615,
0.7349390387535095,
0.4316302537918091,
0.5087969303131104,
-0.48997974395751953,
-0.49139484763145447,
0.017962031066417694,
-0.17504319548606873,
-0.7818853855133057,
0.318342387676239,
0.3811364769935608,
0.47081634402275085,
-1.0922919511795044,
0.7284591197967529,... |
func newFilter() *tasks.DateFiltering {
return &tasks.DateFiltering{}
} | [
-0.22297720611095428,
0.8595434427261353,
0.49451014399528503,
1.330613374710083,
-1.4242380857467651,
-0.07373553514480591,
0.19643430411815643,
-0.17167814075946808,
-0.7461634874343872,
-0.36250510811805725,
-0.33535289764404297,
0.5123103857040405,
0.40463581681251526,
1.06672477722167... |
func (handler *Handlers)GetTasks(w http.ResponseWriter,req *http.Request) {
log.Println("getting task list of current user from startDate to endDate")
w.Header().Set("Content-Type", "application/json")
username := token.GetUserName(w, req)
filter := newFilter() //initialize dateFilter
err := jso... | [
-0.8202303647994995,
-0.1974361538887024,
0.832155168056488,
0.2624199688434601,
-0.2427920252084732,
0.6002755165100098,
0.4825659394264221,
-0.44274070858955383,
-1.0878900289535522,
0.32860639691352844,
0.04952513426542282,
0.8081768751144409,
0.4421284794807434,
0.961943507194519,
-0... |
func cargarPlantilla(w http.ResponseWriter, nombre_plantilla string, pagina *Pagina){
plantillas.ExecuteTemplate(w, nombre_plantilla + ".html", pagina)
} | [
-0.5058345794677734,
-0.26908618211746216,
0.36656254529953003,
0.4763804078102112,
-0.23792541027069092,
0.27095794677734375,
-0.5727681517601013,
0.6507272124290466,
-0.4010359048843384,
0.6233170628547668,
0.23816148936748505,
0.09934636205434799,
-0.33804890513420105,
-0.12816254794597... |
func GetConnectionDetails(datasetID string, req *modules.DataInfo, input *app.M4DApplication) error {
// Set up a connection to the data catalog interface server.
conn, err := grpc.Dial(utils.GetDataCatalogServiceAddress(), grpc.WithInsecure(), grpc.WithBlock())
if err != nil {
return err
}
defer conn.Close()
c... | [
-0.27374589443206787,
0.3600575923919678,
0.4400267004966736,
-0.22275178134441376,
0.15154781937599182,
0.04639529809355736,
-0.6213715672492981,
-0.2938796281814575,
-0.297736257314682,
-0.5649604797363281,
0.15389631688594818,
0.6652599573135376,
-0.20640023052692413,
0.2743869423866272... |
func GetCredentials(datasetID string, req *modules.DataInfo, input *app.M4DApplication) error {
// Set up a connection to the data catalog interface server.
conn, err := grpc.Dial(utils.GetCredentialsManagerServiceAddress(), grpc.WithInsecure(), grpc.WithBlock())
if err != nil {
return err
}
defer conn.Close()
... | [
-0.8810206055641174,
0.23755404353141785,
0.3539544641971588,
0.002062392421066761,
0.35505586862564087,
-0.04406958445906639,
-0.8117122054100037,
-0.2531823217868805,
-0.3921935260295868,
-0.42316338419914246,
-0.03552444279193878,
0.9993299841880798,
-0.42752110958099365,
0.081108972430... |
func GetCmd() (int){
url := "http://127.0.0.1:8080/"
resp, err := http.Get(url)
if err != nil {
//log.Fatalln(err)
return 0
}
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
//log.Fatalln(err)
return 0
}
re := regexp.MustCompile("\\(cmd\\).*?\\(cm... | [
-0.47560617327690125,
-0.3784095048904419,
1.3867456912994385,
-0.03118831291794777,
0.18464824557304382,
-0.38253486156463623,
0.37795761227607727,
0.5905168056488037,
0.3525254726409912,
-1.0104329586029053,
0.5070722103118896,
0.4870608150959015,
-0.6348128914833069,
1.4471908807754517,... |
func SendResponse(output string) (int){
// Flag to tell output to be directed to the Pastebin intergration
const pb_Flag bool = false
if pb_Flag{
SendtoPB(output)
}else{
url := "http://127.0.0.1:8080/" + url.PathEscape(output)
_, err := http.Get(url)
if err != nil {
... | [
-0.44670140743255615,
0.17877300083637238,
0.6516463160514832,
1.1293216943740845,
-0.35444894433021545,
0.5619192123413086,
0.7929175496101379,
0.3119899332523346,
-0.06492473930120468,
0.22268283367156982,
-0.08087756484746933,
-0.6783667206764221,
-1.2706471681594849,
0.3754421770572662... |
func SendtoPB(output string) (int){
values := url.Values{}
values.Set("api_dev_key", "")
values.Set("api_option", "paste")
values.Set("api_paste_code", output)
values.Set("api_paste_name", "TEST")
values.Set("api_paste_expire_date", "10M")
response, err := http.PostForm("http://pastebin.com/api/api_post.php",... | [
-0.9276818037033081,
0.079814612865448,
1.2384952306747437,
0.08553557842969894,
-0.6261367797851562,
0.4526418447494507,
0.14261697232723236,
-0.41420409083366394,
-0.4749886393547058,
0.3383490741252899,
-0.7535963654518127,
-0.07414400577545166,
-1.4423210620880127,
0.8812379240989685,
... |
func UseCount(s string) map[string]int {
xs := strings.Fields(s)
m := make(map[string]int)
for _, v := range xs {
m[v]++
}
return m
} | [
-0.13196928799152374,
-0.20614978671073914,
0.66892409324646,
-1.3540581464767456,
-0.5595341920852661,
-1.216864824295044,
0.9358058571815491,
0.10118018835783005,
-0.45925700664520264,
-0.16340255737304688,
-0.2629052400588989,
-0.8638566136360168,
0.6070115566253662,
-0.1117895320057869... |
func Count(s string) int {
xs := strings.Fields(s)
return len(xs)
} | [
0.6552201509475708,
-0.44972899556159973,
0.15321528911590576,
-0.9474129676818848,
-0.6745526194572449,
0.002303066197782755,
0.25081658363342285,
0.7375295162200928,
-0.34624651074409485,
0.2236640751361847,
-1.169380784034729,
-0.12539851665496826,
0.2239634394645691,
-0.410026282072067... |
func FormatDiscoveryMessage(summary *types.PlaylistTracksSummary) string {
builder := &strings.Builder{}
builder.WriteString(fmt.Sprintf("Playlist '%v' summary:\n", summary.Name))
for i, t := range summary.Tracks {
str := fmt.Sprintf("#%v. [%v - %v](%v)\n", i+1, t.Artist, t.Name, t.Link)
builder.WriteString(st... | [
-0.0023446918930858374,
0.0486927255988121,
0.46247977018356323,
-0.6942264437675476,
0.3051717281341553,
0.11910834908485413,
0.37705424427986145,
-0.5828374028205872,
-0.14746449887752533,
0.29284077882766724,
1.218810796737671,
0.2600618004798889,
-0.16182680428028107,
0.559020102024078... |
func Asset(name string) ([]byte, error) {
canonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[canonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
}
return a.bytes, nil
}
return nil, fmt.Errorf("Asset %s not found"... | [
-1.01177978515625,
-1.1598907709121704,
0.6830528378486633,
-0.6832781434059143,
-1.3779863119125366,
-0.04716429486870766,
0.32330307364463806,
-1.3871997594833374,
-1.1437948942184448,
0.4887520372867584,
0.5087051391601562,
0.4118390679359436,
-0.5561888217926025,
-0.27939432859420776,
... |
func AssetString(name string) (string, error) {
data, err := Asset(name)
return string(data), err
} | [
-1.247711420059204,
-0.7423804402351379,
0.39674192667007446,
-1.4730795621871948,
-1.8356839418411255,
0.45875734090805054,
-0.22362041473388672,
-1.3954719305038452,
-0.5910036563873291,
0.673730194568634,
0.5670546293258667,
0.45071396231651306,
0.12421981245279312,
-0.6748082637786865,... |
func MustAsset(name string) []byte {
a, err := Asset(name)
if err != nil {
panic("asset: Asset(" + name + "): " + err.Error())
}
return a
} | [
-0.012778956443071365,
0.11985661834478378,
0.4091298282146454,
-0.5268413424491882,
-0.8276715278625488,
0.4719155430793762,
-0.8186293840408325,
-1.5736604928970337,
0.16388541460037231,
0.6357062458992004,
-0.5354578495025635,
0.35693347454071045,
0.0057142809964716434,
-0.0248885955661... |
func MustAssetString(name string) string {
return string(MustAsset(name))
} | [
-0.7957004308700562,
-0.4993444085121155,
0.4154260754585266,
-0.059688813984394073,
-1.7780245542526245,
0.7658588886260986,
-0.5333529710769653,
-1.525808334350586,
-0.11369087547063828,
0.8382498025894165,
0.9579691290855408,
-0.4543590545654297,
0.2904685139656067,
0.30602753162384033,... |
func AssetInfo(name string) (os.FileInfo, error) {
canonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[canonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
}
return a.info, nil
}
return nil, fmt.Errorf("AssetIn... | [
0.19660422205924988,
-0.9794572591781616,
0.5885099768638611,
-0.9617617130279541,
-1.2945116758346558,
0.002169161569327116,
0.8489781618118286,
-0.8787259459495544,
-1.297000527381897,
0.3399394750595093,
0.4047483801841736,
0.3750705420970917,
0.0652620941400528,
-0.2895668148994446,
... |
func AssetDigest(name string) ([sha256.Size]byte, error) {
canonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[canonicalName]; ok {
a, err := f()
if err != nil {
return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s can't read by error: %v", name, err)
}
return a.digest, nil
}
ret... | [
-0.35919100046157837,
-0.6181964874267578,
0.7434927821159363,
-1.1689038276672363,
-1.1525448560714722,
-0.5195997357368469,
-0.24112997949123383,
-1.0479563474655151,
-0.5882828235626221,
0.3108210265636444,
0.08598543703556061,
-0.05696698650717735,
-0.29635119438171387,
0.0457898303866... |
func Digests() (map[string][sha256.Size]byte, error) {
mp := make(map[string][sha256.Size]byte, len(_bindata))
for name := range _bindata {
a, err := _bindata[name]()
if err != nil {
return nil, err
}
mp[name] = a.digest
}
return mp, nil
} | [
-0.8371766209602356,
-0.8630331754684448,
0.8149356245994568,
-0.20492881536483765,
-0.4950229823589325,
-0.7048230767250061,
-0.32209327816963196,
-0.4336606562137604,
-0.0704677402973175,
-0.3687077760696411,
-0.4737868309020996,
0.2274853140115738,
0.284575492143631,
0.8567589521408081,... |
func AssetNames() []string {
names := make([]string, 0, len(_bindata))
for name := range _bindata {
names = append(names, name)
}
return names
} | [
-0.7293784618377686,
-0.8460342288017273,
0.7321816682815552,
-0.39323121309280396,
-0.48951536417007446,
0.7661203145980835,
-0.5028699636459351,
-0.8655748963356018,
-0.4145073890686035,
0.8099913597106934,
0.16903363168239594,
1.163049578666687,
-0.028152840211987495,
0.0342608317732811... |
func RestoreAsset(dir, name string) error {
data, err := Asset(name)
if err != nil {
return err
}
info, err := AssetInfo(name)
if err != nil {
return err
}
err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
if err != nil {
return err
}
err = ioutil.WriteFile(_filePath(dir, name), d... | [
-0.049505945295095444,
-0.19623629748821259,
0.6907734274864197,
-1.356906533241272,
-0.2967053949832916,
-0.36119723320007324,
0.07744692265987396,
-0.4719574451446533,
-0.3116399347782135,
-0.0837966799736023,
-0.002143390476703644,
0.06316480040550232,
-0.34281453490257263,
-0.616301000... |
func RestoreAssets(dir, name string) error {
children, err := AssetDir(name)
// File
if err != nil {
return RestoreAsset(dir, name)
}
// Dir
for _, child := range children {
err = RestoreAssets(dir, filepath.Join(name, child))
if err != nil {
return err
}
}
return nil
} | [
0.4226192533969879,
0.3001989424228668,
0.5813396573066711,
-0.20641714334487915,
-0.23828980326652527,
-0.24414613842964172,
0.5739712119102478,
-0.029911452904343605,
0.061882976442575455,
-0.43923527002334595,
0.5113739371299744,
0.3275964856147766,
-0.612514853477478,
0.035165321081876... |
func (m *Module) GetCategory() string {
return "docker"
} | [
0.5073638558387756,
0.08749851584434509,
0.447312593460083,
0.7642446160316467,
0.6716476082801819,
0.48195967078208923,
0.6245782375335693,
-0.017815284430980682,
0.29212749004364014,
-0.4870389401912689,
0.6633252501487732,
0.843980073928833,
0.32522574067115784,
2.057861804962158,
-0.... |
func (op *OptIAAddress) Code() OptionCode {
return OptionIAAddr
} | [
-0.19497238099575043,
-0.621724545955658,
0.10728832334280014,
0.11842436343431473,
0.3314918577671051,
0.356818825006485,
1.3615424633026123,
0.6139251589775085,
2.1136014461517334,
0.29868918657302856,
0.9750372767448425,
0.8454623222351074,
0.021383540704846382,
-0.4827248752117157,
0... |
func (op *OptIAAddress) ToBytes() []byte {
buf := uio.NewBigEndianBuffer(nil)
buf.WriteBytes(op.IPv6Addr.To16())
buf.Write32(op.PreferredLifetime)
buf.Write32(op.ValidLifetime)
buf.WriteBytes(op.Options.ToBytes())
return buf.Data()
} | [
0.21242155134677887,
0.41560739278793335,
0.5345751643180847,
-1.2238234281539917,
0.9043983817100525,
-0.6620251536369324,
-0.45892512798309326,
-0.49533072113990784,
1.3542202711105347,
0.8165438771247864,
-0.46826010942459106,
1.0577995777130127,
-0.20800745487213135,
-0.479751229286193... |
func ParseOptIAAddress(data []byte) (*OptIAAddress, error) {
var opt OptIAAddress
buf := uio.NewBigEndianBuffer(data)
opt.IPv6Addr = net.IP(buf.CopyN(net.IPv6len))
opt.PreferredLifetime = buf.Read32()
opt.ValidLifetime = buf.Read32()
if err := opt.Options.FromBytes(buf.ReadAll()); err != nil {
return nil, err
... | [
0.4799690544605255,
-0.2629990577697754,
0.4283639192581177,
-0.6961256265640259,
0.18086719512939453,
-0.8569129705429077,
0.10770107805728912,
0.28076091408729553,
1.391575574874878,
0.9727303981781006,
-0.287613183259964,
0.43641939759254456,
-0.07563920319080353,
-0.30004870891571045,
... |
func myDefer() {
for i := 0; i < 5; i++ {
defer fmt.Print(i)
}
} | [
0.30829674005508423,
-0.505870521068573,
0.5256984829902649,
-0.3101847469806671,
0.00028710655169561505,
0.15931302309036255,
0.2555174231529236,
-0.6124014854431152,
-0.8347264528274536,
-1.1812529563903809,
-0.5401308536529541,
0.5929656028747559,
-0.2927876114845276,
1.6087100505828857... |
func CreateVersionCommand(name, prefix string) *cmdline.Command {
return &cmdline.Command{
Runner: RunnerFunc(func(_ *cmdline.Env, _ []string) error {
printVersion(prefix)
return nil
}),
Name: name,
Short: "Display version information",
}
} | [
0.10549398511648178,
-1.2726351022720337,
0.3528425693511963,
-0.017157040536403656,
0.27951210737228394,
0.7023485898971558,
-0.07853416353464127,
-0.06060464680194855,
-0.4177183508872986,
0.12492528557777405,
-0.5372831225395203,
0.6378235816955566,
0.6392618417739868,
0.543588161468505... |
func CreateInfoCommand(name, prefix string, info ...func(*context.T, *cmdline.Env, []string) error) *cmdline.Command {
return &cmdline.Command{
Runner: v23cmd.RunnerFunc(func(ctx *context.T, env *cmdline.Env, args []string) error {
printVersion(prefix)
for _, ifn := range info {
if err := ifn(ctx, env, arg... | [
-0.0665271207690239,
-0.8979616761207581,
0.6239064335823059,
0.10274577140808105,
1.0235735177993774,
0.24583923816680908,
-0.08379930257797241,
-0.2766152620315552,
-0.4628525972366333,
0.0750744566321373,
-0.40967458486557007,
0.6299487948417664,
0.5655021071434021,
0.49372920393943787,... |
func Prompt(stream io.Reader, message string, defaultIdx int, options ...string) (string, error) {
if len(options) < 1 {
return "", errors.New("no options specified")
}
validOptions := map[string]bool{}
var buf bytes.Buffer
buf.WriteString(message)
buf.WriteString(" (")
for i, o := range options {
validOp... | [
0.1528637558221817,
-0.25870847702026367,
0.7913007140159607,
-0.22607633471488953,
-0.1188410073518753,
-0.08429931104183197,
-0.1698777675628662,
-1.508089303970337,
-0.1845221221446991,
-0.276040256023407,
0.5648918747901917,
0.5325908064842224,
-1.2063170671463013,
-0.4813743829727173,... |
func newMap() map[interface{}]interface{} {
return map[interface{}]interface{}{}
} | [
-0.2888849675655365,
-0.5188156366348267,
0.7456436157226562,
0.76287442445755,
-0.7797450423240662,
0.7042220234870911,
0.7062823176383972,
-0.49338299036026,
0.6957643032073975,
-0.5649964809417725,
-0.009799600578844547,
0.38250720500946045,
0.7855386734008789,
-0.006564001552760601,
... |
func NewCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "archive-images",
Short: "Export Capact Docker images to a tar archive",
Long: "Subcommand for various manifest generation operations",
}
cmd.AddCommand(NewFromHelmCharts())
return cmd
} | [
1.0546998977661133,
-0.40957513451576233,
0.4817173480987549,
0.5522750020027161,
0.2448108196258545,
0.16062863171100616,
0.612764835357666,
0.5198745131492615,
0.12726791203022003,
-1.342323899269104,
0.7345244288444519,
0.8255281448364258,
1.1155256032943726,
0.7045184373855591,
1.037... |
func Dir(dir string) (queries map[string]QuerySet, err error) {
var files []File
if files, err = DirOrdered(dir); err != nil {
return
}
queries = make(map[string]QuerySet, len(files))
for _, f := range files {
queries[f.Name] = make(QuerySet, len(f.Items))
for _, i := range f.Items {
queries[f.Name][i.N... | [
-0.524088442325592,
-0.22092440724372864,
0.6011890172958374,
-0.5242265462875366,
-0.9510828852653503,
0.57854163646698,
0.6805733442306519,
-0.24539123475551605,
-0.1520811915397644,
-0.9559792280197144,
0.096427783370018,
0.14155186712741852,
0.7568837404251099,
0.267132431268692,
-0.... |
func DirOrdered(dir string) ([]File, error) {
if s, err := os.Stat(dir); err != nil || !s.IsDir() {
return nil, ErrDirSql
}
return readFiles(dir)
} | [
-0.5818284153938293,
-0.2798272967338562,
0.9406893849372864,
0.5892542004585266,
-0.0005612843087874353,
-0.16958081722259521,
-0.1420808881521225,
-0.15223699808120728,
0.7791160941123962,
-0.6553565263748169,
0.17591232061386108,
0.584177553653717,
-0.10921403765678406,
0.91213542222976... |
func NewCloudAwsVirtualMachineAllOf(classId string, objectType string) *CloudAwsVirtualMachineAllOf {
this := CloudAwsVirtualMachineAllOf{}
this.ClassId = classId
this.ObjectType = objectType
return &this
} | [
0.9017540216445923,
-1.059119701385498,
0.19377529621124268,
-0.15492476522922516,
-0.34126415848731995,
0.11772961169481277,
-0.3901543915271759,
-0.08192939311265945,
0.6599965691566467,
-0.0889037474989891,
-0.09465911239385605,
0.5684038400650024,
0.5117477774620056,
0.4988304674625397... |
func NewCloudAwsVirtualMachineAllOfWithDefaults() *CloudAwsVirtualMachineAllOf {
this := CloudAwsVirtualMachineAllOf{}
var classId string = "cloud.AwsVirtualMachine"
this.ClassId = classId
var objectType string = "cloud.AwsVirtualMachine"
this.ObjectType = objectType
return &this
} | [
0.9929829835891724,
-0.4425758421421051,
0.04205016791820526,
-0.2888941764831543,
0.606910228729248,
-0.02861415594816208,
-0.6554105877876282,
-0.1981705278158188,
0.6175132989883423,
-0.6820007562637329,
-0.17127978801727295,
-0.4787493348121643,
0.1796407401561737,
0.28365352749824524,... |
func (o *CloudAwsVirtualMachineAllOf) GetClassId() string {
if o == nil {
var ret string
return ret
}
return o.ClassId
} | [
0.7745971083641052,
-0.2708330750465393,
-0.11609979718923569,
0.8516668081283569,
0.37675225734710693,
0.8883377909660339,
0.34283265471458435,
0.19150365889072418,
1.2756856679916382,
-0.6685584187507629,
0.6811038255691528,
-0.2695261240005493,
-0.49487778544425964,
0.38460156321525574,... |
func (o *CloudAwsVirtualMachineAllOf) GetClassIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ClassId, true
} | [
-0.3328651487827301,
0.34064576029777527,
0.5718927979469299,
1.0593280792236328,
0.5358160734176636,
0.6446827054023743,
0.6059874296188354,
0.7200897336006165,
0.5077244639396667,
-0.13709142804145813,
-0.7952802777290344,
-0.4935736358165741,
-0.06665129959583282,
0.7384603023529053,
... |
func (o *CloudAwsVirtualMachineAllOf) SetClassId(v string) {
o.ClassId = v
} | [
0.637856125831604,
-0.5497808456420898,
-0.09630129486322403,
0.15741528570652008,
-0.26695239543914795,
0.5834195613861084,
-0.05767787992954254,
0.3760526478290558,
0.8656966686248779,
0.42117974162101746,
0.194206103682518,
0.6862698197364807,
-0.3431223928928375,
0.4610316753387451,
... |
func (o *CloudAwsVirtualMachineAllOf) GetObjectType() string {
if o == nil {
var ret string
return ret
}
return o.ObjectType
} | [
0.6096137166023254,
0.2847525477409363,
-0.09767300635576248,
0.01974932849407196,
0.7194467782974243,
0.5062885880470276,
0.03468324989080429,
-0.3238680958747864,
0.16431814432144165,
-0.05245164409279823,
0.16991086304187775,
-1.0208144187927246,
-0.8059073090553284,
-0.2536430060863495... |
func (o *CloudAwsVirtualMachineAllOf) GetObjectTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ObjectType, true
} | [
-0.2244502753019333,
0.1169000118970871,
0.5807822346687317,
-0.18667586147785187,
0.22742027044296265,
0.3460478186607361,
0.06232664734125137,
0.2048686146736145,
-0.2539057731628418,
1.8697218894958496,
-1.2314047813415527,
-1.6059236526489258,
0.2671755254268646,
-0.08051445335149765,
... |
func (o *CloudAwsVirtualMachineAllOf) SetObjectType(v string) {
o.ObjectType = v
} | [
0.49093344807624817,
-0.12326271086931229,
-0.01748400181531906,
-0.4926767349243164,
-0.0517403706908226,
0.6099789142608643,
-0.2910655736923218,
-0.5258466005325317,
-0.18256524205207825,
0.8144873380661011,
-0.3856962323188782,
-0.16977949440479279,
-0.4590507745742798,
-0.080291792750... |
func (o *CloudAwsVirtualMachineAllOf) GetAwsBillingUnit() CloudAwsBillingUnitRelationship {
if o == nil || o.AwsBillingUnit == nil {
var ret CloudAwsBillingUnitRelationship
return ret
}
return *o.AwsBillingUnit
} | [
0.30726999044418335,
1.0917385816574097,
0.483583003282547,
-0.7777281999588013,
-0.16364233195781708,
0.7925547957420349,
-0.012406717985868454,
-0.6626311540603638,
0.9388965964317322,
-0.6973557472229004,
0.20213136076927185,
-0.3744828402996063,
-0.35014808177948,
0.5844841599464417,
... |
func (o *CloudAwsVirtualMachineAllOf) GetAwsBillingUnitOk() (*CloudAwsBillingUnitRelationship, bool) {
if o == nil || o.AwsBillingUnit == nil {
return nil, false
}
return o.AwsBillingUnit, true
} | [
-0.26315104961395264,
1.2580608129501343,
0.5657405257225037,
-0.17908021807670593,
-0.2155390828847885,
0.721349835395813,
0.07021250575780869,
0.23199783265590668,
0.3556535243988037,
-0.17065845429897308,
-0.342874139547348,
-0.46930599212646484,
0.6538260579109192,
0.33149442076683044,... |
func (o *CloudAwsVirtualMachineAllOf) HasAwsBillingUnit() bool {
if o != nil && o.AwsBillingUnit != nil {
return true
}
return false
} | [
0.490898460149765,
1.0107117891311646,
0.4346492886543274,
-1.1250414848327637,
0.037421662360429764,
0.37943926453590393,
-0.5222246646881104,
-0.03651442751288414,
-0.1692531257867813,
-0.5733673572540283,
-0.6176394820213318,
-0.6445276141166687,
0.45381951332092285,
1.0385429859161377,... |
func (o *CloudAwsVirtualMachineAllOf) SetAwsBillingUnit(v CloudAwsBillingUnitRelationship) {
o.AwsBillingUnit = &v
} | [
0.39401957392692566,
1.0541203022003174,
0.24502500891685486,
-1.252967357635498,
0.07789589464664459,
0.961864709854126,
-0.3230458199977875,
-0.4920644164085388,
0.41254615783691406,
-0.35080403089523315,
0.04371724650263786,
0.4911230802536011,
0.244686096906662,
-0.04906114190816879,
... |
func (o *CloudAwsVirtualMachineAllOf) GetKeyPair() CloudAwsKeyPairRelationship {
if o == nil || o.KeyPair == nil {
var ret CloudAwsKeyPairRelationship
return ret
}
return *o.KeyPair
} | [
0.37212327122688293,
0.6167643070220947,
0.29923081398010254,
0.6238496899604797,
-0.5396406650543213,
0.19764497876167297,
-0.07217324525117874,
-0.6353825330734253,
0.6447563171386719,
-0.9285030364990234,
0.4689390957355499,
-1.0175459384918213,
-0.9244770407676697,
1.032438039779663,
... |
func (o *CloudAwsVirtualMachineAllOf) GetKeyPairOk() (*CloudAwsKeyPairRelationship, bool) {
if o == nil || o.KeyPair == nil {
return nil, false
}
return o.KeyPair, true
} | [
-0.15947967767715454,
0.32012051343917847,
0.4502967894077301,
0.782985508441925,
-0.4578492045402527,
0.09284775704145432,
0.0694345012307167,
0.7328394651412964,
-0.09212490916252136,
-0.408035546541214,
-0.5763425230979919,
-0.813410758972168,
-0.3615618348121643,
0.17405302822589874,
... |
func (o *CloudAwsVirtualMachineAllOf) HasKeyPair() bool {
if o != nil && o.KeyPair != nil {
return true
}
return false
} | [
0.6435967087745667,
0.10333993285894394,
0.34064218401908875,
0.31735724210739136,
-0.5754776000976562,
-0.22791621088981628,
-0.6670368313789368,
0.43122538924217224,
-0.1477658599615097,
-1.0233323574066162,
-0.09980761259794235,
-0.9317899346351624,
-0.5037763118743896,
1.08114230632781... |
func (o *CloudAwsVirtualMachineAllOf) SetKeyPair(v CloudAwsKeyPairRelationship) {
o.KeyPair = &v
} | [
0.6731216311454773,
0.18797455728054047,
0.09717074036598206,
0.00567580433562398,
-0.6854263544082642,
0.4025135338306427,
-0.8380336165428162,
-0.8968563079833984,
-0.2638774514198303,
-0.61359041929245,
0.948135256767273,
0.37409496307373047,
-0.27222445607185364,
0.4149542450904846,
... |
func (o *CloudAwsVirtualMachineAllOf) GetLocation() CloudAwsVpcRelationship {
if o == nil || o.Location == nil {
var ret CloudAwsVpcRelationship
return ret
}
return *o.Location
} | [
0.6670852899551392,
0.4677058458328247,
0.26644474267959595,
0.5994649529457092,
0.40264585614204407,
0.1603175401687622,
1.059086561203003,
-0.3794100880622864,
1.4933500289916992,
-0.16825607419013977,
0.5978921055793762,
-1.4296575784683228,
-0.8522043228149414,
-0.13883346319198608,
... |
func (o *CloudAwsVirtualMachineAllOf) GetLocationOk() (*CloudAwsVpcRelationship, bool) {
if o == nil || o.Location == nil {
return nil, false
}
return o.Location, true
} | [
0.2331055849790573,
-0.1465817391872406,
0.20152463018894196,
1.0814085006713867,
-0.14538052678108215,
0.5363169312477112,
1.3468546867370605,
0.874775767326355,
0.2649964988231659,
0.5332629084587097,
-0.03074866533279419,
-0.9764950275421143,
0.28916627168655396,
0.11110516637563705,
... |
func (o *CloudAwsVirtualMachineAllOf) HasLocation() bool {
if o != nil && o.Location != nil {
return true
}
return false
} | [
0.49523934721946716,
-0.09023120999336243,
0.15565107762813568,
0.4273087978363037,
0.5117293000221252,
-0.2231847494840622,
1.0651167631149292,
0.7963928580284119,
0.6137158870697021,
-0.5077981352806091,
-0.07287804037332535,
-1.5033318996429443,
0.11577314138412476,
0.023942429572343826... |
func (o *CloudAwsVirtualMachineAllOf) SetLocation(v CloudAwsVpcRelationship) {
o.Location = &v
} | [
0.9499005079269409,
-0.13275501132011414,
-0.02097872458398342,
-0.36584317684173584,
0.5132830142974854,
0.28975018858909607,
0.21069130301475525,
-0.8904198408126831,
0.6481378674507141,
0.1694953888654709,
0.8575895428657532,
-0.14806263148784637,
-0.1780533343553543,
-0.926634967327117... |
func (o *CloudAwsVirtualMachineAllOf) GetSecurityGroups() []CloudAwsSecurityGroupRelationship {
if o == nil {
var ret []CloudAwsSecurityGroupRelationship
return ret
}
return o.SecurityGroups
} | [
0.5352060198783875,
0.8858082294464111,
-0.06950681656599045,
0.8361615538597107,
0.4607570767402649,
-0.1379328966140747,
0.14190253615379333,
-0.9492300152778625,
0.963080644607544,
-1.1096266508102417,
-0.4750783443450928,
-0.25888338685035706,
-1.0181185007095337,
0.5174682140350342,
... |
func (o *CloudAwsVirtualMachineAllOf) GetSecurityGroupsOk() ([]CloudAwsSecurityGroupRelationship, bool) {
if o == nil || o.SecurityGroups == nil {
return nil, false
}
return o.SecurityGroups, true
} | [
-0.1071125939488411,
1.5573582649230957,
0.25503915548324585,
0.9717706441879272,
0.12633541226387024,
-0.689913272857666,
-0.0239724051207304,
-0.07086236774921417,
0.32561638951301575,
0.09502078592777252,
-1.2132723331451416,
-0.7600554823875427,
-0.54780113697052,
0.29018455743789673,
... |
func (o *CloudAwsVirtualMachineAllOf) HasSecurityGroups() bool {
if o != nil && o.SecurityGroups != nil {
return true
}
return false
} | [
0.8320203423500061,
1.180458664894104,
0.1948273628950119,
0.8782037496566772,
0.5631697177886963,
-0.7624076008796692,
-0.5017808079719543,
0.038991931825876236,
0.02624170482158661,
-0.2921806871891022,
-1.3301044702529907,
-0.9901843070983887,
-0.7629886865615845,
0.3070864677429199,
... |
func (o *CloudAwsVirtualMachineAllOf) SetSecurityGroups(v []CloudAwsSecurityGroupRelationship) {
o.SecurityGroups = v
} | [
0.3359091281890869,
0.8927756547927856,
0.03628087788820267,
0.481635719537735,
0.12309690564870834,
0.07058356702327728,
-0.2373756617307663,
-1.2386183738708496,
0.533200740814209,
-0.05480273440480232,
-0.7321518063545227,
-0.1798720806837082,
-0.8671338558197021,
0.31956711411476135,
... |
func newConfig(envParams envParams) error {
// Initialize server config.
srvCfg := newServerConfigV14()
// If env is set for a fresh start, save them to config file.
if globalIsEnvCreds {
srvCfg.SetCredential(envParams.creds)
}
if globalIsEnvBrowser {
srvCfg.SetBrowser(envParams.browser)
}
// Create conf... | [
-0.7319686412811279,
0.21546168625354767,
0.5254729986190796,
0.6211888194084167,
0.25710487365722656,
0.11731421947479248,
0.8361965417861938,
0.535099446773529,
-0.7265024185180664,
0.8355985879898071,
-0.5429415702819824,
0.4289652109146118,
-0.3898993730545044,
1.493099331855774,
0.5... |
func loadConfig(envParams envParams) error {
configFile := getConfigFile()
if _, err := os.Stat(configFile); err != nil {
return err
}
srvCfg := &serverConfigV14{}
qc, err := quick.New(srvCfg)
if err != nil {
return err
}
if err = qc.Load(configFile); err != nil {
return err
}
// If env is set overr... | [
-0.26846569776535034,
0.13382746279239655,
0.6067004203796387,
0.29497596621513367,
0.39899981021881104,
-0.05260665342211723,
0.2138526737689972,
0.6570262312889099,
-1.026012897491455,
0.987069845199585,
-0.4786195158958435,
0.5052122473716736,
-0.7442030310630798,
1.4888077974319458,
... |
func (s serverConfigV14) GetVersion() string {
serverConfigMu.RLock()
defer serverConfigMu.RUnlock()
return s.Version
} | [
-0.34931883215904236,
0.03234793618321419,
-0.006650271825492382,
1.2045046091079712,
0.29817405343055725,
-0.1020447239279747,
0.8744195103645325,
0.4691232144832611,
-0.244110107421875,
0.30653509497642517,
-0.9927323460578918,
0.045517537742853165,
-1.0519514083862305,
0.455646365880966... |
func (s *serverConfigV14) SetRegion(region string) {
serverConfigMu.Lock()
defer serverConfigMu.Unlock()
s.Region = region
} | [
-0.6228856444358826,
0.5772849321365356,
0.08385856449604034,
0.7013739943504333,
-0.3859751522541046,
-0.16918900609016418,
0.582513153553009,
0.823062002658844,
-0.098043292760849,
-0.15869411826133728,
-0.9191992878913879,
0.5986590385437012,
-0.9098541736602783,
0.6637294888496399,
0... |
func (s serverConfigV14) GetRegion() string {
serverConfigMu.RLock()
defer serverConfigMu.RUnlock()
return s.Region
} | [
-0.12079004943370819,
0.7984033226966858,
0.16422738134860992,
0.7000857591629028,
-0.16152776777744293,
-0.30062419176101685,
1.166894793510437,
0.22429507970809937,
-0.10750984400510788,
-0.2602733373641968,
0.055774182081222534,
1.156363606452942,
-1.0236700773239136,
0.2472235113382339... |
func (s *serverConfigV14) SetCredential(creds credential) {
serverConfigMu.Lock()
defer serverConfigMu.Unlock()
// Set updated credential.
s.Credential = newCredentialWithKeys(creds.AccessKey, creds.SecretKey)
} | [
-0.5927448868751526,
-0.4677484333515167,
0.271553635597229,
0.7074021697044373,
-0.0247906893491745,
-0.04998091608285904,
-0.21839824318885803,
0.9163107872009277,
0.204109787940979,
0.3447214663028717,
-1.2587871551513672,
1.4862158298492432,
-0.6030420064926147,
-0.03333458676934242,
... |
func (s serverConfigV14) GetCredential() credential {
serverConfigMu.RLock()
defer serverConfigMu.RUnlock()
return s.Credential
} | [
-0.02552887052297592,
0.12326820194721222,
0.304802805185318,
1.477489709854126,
0.20738887786865234,
-0.04972175508737564,
1.2227216958999634,
0.7272235155105591,
-0.28124454617500305,
-0.410075306892395,
-0.4602295458316803,
1.2199499607086182,
-1.6261571645736694,
-0.09336278587579727,
... |
func (s *serverConfigV14) SetBrowser(v string) {
serverConfigMu.Lock()
defer serverConfigMu.Unlock()
// Set browser param
s.Browser = v
} | [
-0.8258560299873352,
0.3667781949043274,
-0.012562557123601437,
1.1518608331680298,
-0.8487518429756165,
0.0931243821978569,
1.0416823625564575,
0.37515193223953247,
-0.49503061175346375,
-0.23667360842227936,
-0.5142297148704529,
-0.1391470581293106,
-0.9061002135276794,
1.855222582817077... |
func (s serverConfigV14) GetBrowser() string {
serverConfigMu.RLock()
defer serverConfigMu.RUnlock()
return s.Browser
} | [
-0.7241292595863342,
0.04419352114200592,
0.17061655223369598,
1.3797705173492432,
-0.6041260957717896,
-0.1814194768667221,
0.9356114864349365,
0.12884220480918884,
-0.32966476678848267,
-0.6604819297790527,
-0.09396931529045105,
0.3389764428138733,
-1.2438842058181763,
0.9802754521369934... |
func (c *FunctionController) Run(ctx context.Context) error {
fmt.Print("Watch Example objects\n")
// Watch Example objects
_, err := c.watchFunctions(ctx)
if err != nil {
fmt.Printf("Failed to register watch for Example resource: %v\n", err)
return err
}
<-ctx.Done()
return ctx.Err()
} | [
-0.058516960591077805,
0.1605762243270874,
0.6452429890632629,
-0.07749641686677933,
0.8060824871063232,
0.1865089386701584,
0.7066754698753357,
-0.0057368166744709015,
-0.7601246237754822,
-0.3498319089412689,
-1.3659520149230957,
0.5779543519020081,
0.35644447803497314,
0.691479980945587... |
func (a *Animal) Says() {
fmt.Printf("A %s says %s", a.Name, a.Sound)
} | [
0.11657137423753738,
-1.3094301223754883,
0.5361843109130859,
-1.6324101686477661,
0.14535139501094818,
0.34834861755371094,
-0.8645932674407959,
-0.8937800526618958,
0.05293630063533783,
-0.5387753248214722,
0.43842893838882446,
1.4261302947998047,
0.08903864026069641,
0.7071930766105652,... |
func (v machineVars) String() string {
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
g, ctx := errgroup.WithContext(ctx)
var (
mu sync.Mutex
vars = make(map[string]Expvars)
)
for _, m := range v.B.Machines() {
// Only propagate stats for machines we own, otherwise... | [
0.05032118782401085,
0.2315092235803604,
0.34277090430259705,
-0.9558679461479187,
-0.6897809505462646,
0.050083767622709274,
0.2209000587463379,
-1.412018895149231,
-1.0376322269439697,
0.4288565218448639,
0.3544163405895233,
1.2279577255249023,
-0.09389771521091461,
0.6104810237884521,
... |
func NewAdminSvc(db *orm.ORM, rdb *redis.Client) AdminService {
return &ORM{db, rdb}
} | [
0.08178853988647461,
-0.025278365239501,
0.17746202647686005,
-0.8305649161338806,
-1.1261695623397827,
-0.47380900382995605,
-1.771552324295044,
-1.7027084827423096,
0.2633739113807678,
-0.06514354795217514,
0.4071991443634033,
1.3753865957260132,
-0.366536945104599,
1.1344562768936157,
... |
func (orm *ORM) CreateAdmin(ctx context.Context, name string, email string, password string, role string, createdBy *string, phone *string) (*models.Admin, error) {
_Admin := models.Admin{
FullName: name,
Email: email,
Password: password,
Phone: phone,
Role: role,
CreatedByID: crea... | [
0.04192112386226654,
0.10913269221782684,
0.38544753193855286,
0.32620954513549805,
0.3948870003223419,
0.10957027226686478,
-0.8968407511711121,
-1.3406537771224976,
-0.02797841653227806,
0.020337561145424843,
-0.14287954568862915,
-0.46579524874687195,
-0.8284751772880554,
-0.14746789634... |
func (orm *ORM) LoginAdmin(ctx context.Context, email string, password string) (*LoginResult, error) {
var _Admin models.Admin
//check if email is in db
_Result := orm.DB.DB.Joins("CreatedBy").First(&_Admin, "admins.email = ?", email)
if errors.Is(_Result.Error, gorm.ErrRecordNotFound) {
return nil, errors.New("... | [
0.0058794948272407055,
0.05016758292913437,
0.5627272129058838,
-0.4590810239315033,
-0.6556998491287231,
-0.2484070062637329,
-1.289713740348816,
-1.0074725151062012,
0.29486972093582153,
0.3973524272441864,
-0.29238054156303406,
0.7670850157737732,
-0.8763020634651184,
0.0616176277399063... |
func (orm *ORM) UpdateAdminRole(ctx context.Context, adminID string, role string) (bool, error) {
var _Admin models.Admin
err := orm.DB.DB.First(&_Admin, "id = ?", adminID).Error
if errors.Is(err, gorm.ErrRecordNotFound) {
return false, errors.New("AdminNotFound")
}
_Admin.Role = role
orm.DB.DB.Save(&_Admin)
... | [
-0.1437191516160965,
0.07532919198274612,
0.26396116614341736,
-1.184712290763855,
-0.17844946682453156,
0.27355965971946716,
-1.5831687450408936,
-0.9548956751823425,
-0.5273645520210266,
1.7218574285507202,
-0.1188473105430603,
0.5553030967712402,
-1.3337054252624512,
0.5525217652320862,... |
func (orm *ORM) UpdateAdmin(ctx context.Context, adminID string, fullname *string, email *string, phone *string) (bool, error) {
var _Admin models.Admin
err := orm.DB.DB.First(&_Admin, "id = ?", adminID).Error
if errors.Is(err, gorm.ErrRecordNotFound) {
return false, errors.New("AdminNotFound")
}
if fullname !... | [
-0.6007982492446899,
0.20864778757095337,
0.5610156059265137,
-0.4689827263355255,
-0.3483433723449707,
0.2579183578491211,
-0.7841296792030334,
-0.4203103482723236,
-0.04081650450825691,
0.7543912529945374,
-0.5866035223007202,
0.11939071863889694,
-0.6559942364692688,
0.1473897248506546,... |
func (orm *ORM) UpdateAdminPassword(ctx context.Context, adminID string, oldPassword string, newPassword string) (bool, error) {
var _Admin models.Admin
err := orm.DB.DB.First(&_Admin, "id = ?", adminID).Error
if errors.Is(err, gorm.ErrRecordNotFound) {
return false, errors.New("AdminNotFound")
}
isSame := val... | [
0.16181842982769012,
-0.4167885184288025,
0.4536210000514984,
-0.0871254950761795,
-0.5274494886398315,
0.45064714550971985,
-1.0384504795074463,
-0.8314771056175232,
0.09810967743396759,
1.5260169506072998,
-0.14154934883117676,
1.1844662427902222,
-0.685559868812561,
0.8851758241653442,
... |
func (orm *ORM) DeleteAdmin(ctx context.Context, adminID string) (bool, error) {
var _Admin models.Admin
err := orm.DB.DB.Delete(&_Admin, "id = ?", adminID).Error
if errors.Is(err, gorm.ErrRecordNotFound) {
return false, errors.New("AdminNotFound")
}
return true, nil
} | [
-0.3157084286212921,
0.48342475295066833,
0.39139410853385925,
-0.38832780718803406,
-0.07727961987257004,
0.09631665050983429,
-0.6516113877296448,
-0.7431596517562866,
0.624330461025238,
0.28505557775497437,
0.04440746828913689,
0.5772390365600586,
-0.6359609961509705,
0.7405717968940735... |
func (orm *ORM) ForgotPasswordRequest(ctx context.Context, email string) (*models.Admin, error) {
var _Admin models.Admin
// check if admin exists
err := orm.DB.DB.First(&_Admin, "email = ?", email).Error
if errors.Is(err, gorm.ErrRecordNotFound) {
return nil, errors.New("AdminNotFound")
}
//generate code
co... | [
-0.8965985178947449,
0.9797781109809875,
0.7852529883384705,
-0.8366183042526245,
0.4695724546909332,
-0.6924933195114136,
-0.7795543074607849,
-0.5950387120246887,
0.13448570668697357,
0.6640928983688354,
-0.06780517846345901,
1.1276293992996216,
-0.7057535648345947,
1.2849080562591553,
... |
func (orm *ORM) ResendCode(ctx context.Context, adminID string) (*models.Admin, error) {
var _Admin models.Admin
// check if admin exists
err := orm.DB.DB.First(&_Admin, "id = ?", adminID).Error
if errors.Is(err, gorm.ErrRecordNotFound) {
return nil, errors.New("AdminNotFound")
}
//generate code
code := gene... | [
-0.13083268702030182,
0.6801987290382385,
0.7396607398986816,
-0.49648410081863403,
-0.15789543092250824,
-0.308603972196579,
-1.0227681398391724,
0.0026350021362304688,
0.27836623787879944,
0.9648732542991638,
-0.760759174823761,
0.48682254552841187,
-0.9115223288536072,
0.693442344665527... |
func (orm *ORM) CompareAdminCodes(ctx context.Context, adminID string, code string) (bool, error) {
//check in redis to see if its the same and not expired
value, err := orm.rdb.Get(ctx, fmt.Sprintf("%s", adminID)).Result()
if err == redis.Nil {
return false, errors.New("CodeHasExpired")
} else if err != nil {
... | [
0.16312164068222046,
-0.1842670440673828,
0.8257995247840881,
-0.8058539032936096,
-0.08562633395195007,
0.1373874992132187,
-1.742350697517395,
-0.7816426157951355,
0.18971818685531616,
0.9514961242675781,
0.2690037488937378,
0.6968317627906799,
-1.4115164279937744,
1.3302937746047974,
... |
func (orm *ORM) ResetPassword(ctx context.Context, adminID string, password string) (bool, error) {
var _Admin models.Admin
err := orm.DB.DB.First(&_Admin, "id = ?", adminID).Error
if errors.Is(err, gorm.ErrRecordNotFound) {
return false, errors.New("AdminNotFound")
}
//update password
_Admin.Password = passw... | [
-0.38635438680648804,
0.8679451942443848,
0.6692280769348145,
-0.4376978576183319,
0.30982595682144165,
-0.1206653043627739,
-0.7082467675209045,
0.17813098430633545,
0.01979091763496399,
1.599815845489502,
-0.24467773735523224,
0.9004164934158325,
-1.0443620681762695,
0.8370572328567505,
... |
func (ev *EventInfo) Value(log types.Log, typ ...reflect.Type) (res reflect.Value, err error) {
var ty reflect.Type
if len(typ) > 0 {
ty = typ[0]
}
for _, u := range ev.Types {
if ty != nil && ty != u.Type {
continue
}
event := reflect.New(u.Type.Elem())
err = u.BoundContract.UnpackLog(event.Interface(... | [
-0.11265751719474792,
-0.08362946659326553,
0.8720070719718933,
-0.08152472972869873,
0.35810551047325134,
0.04376531392335892,
0.25418561697006226,
-0.51918625831604,
0.13802655041217804,
0.5013244152069092,
0.3978429436683655,
0.45897823572158813,
-0.22313962876796722,
-0.200244322419166... |
func (o *ListGroupsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewListGroupsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 4... | [
-0.30566948652267456,
-0.5871752500534058,
0.9237335920333862,
0.39129504561424255,
-0.26786544919013977,
-1.3252516984939575,
-0.09027625620365143,
-0.8408675789833069,
0.2437642216682434,
0.0037085609510540962,
0.2507610023021698,
-0.452849805355072,
-1.2772939205169678,
0.13826873898506... |
func NewListGroupsOK() *ListGroupsOK {
return &ListGroupsOK{}
} | [
-0.5022000670433044,
0.038658782839775085,
0.2659398019313812,
1.1822643280029297,
-1.3847951889038086,
-1.4656519889831543,
-0.5591820478439331,
0.026422491297125816,
0.0166475772857666,
-0.6016947031021118,
-1.0193785429000854,
-0.18761025369167328,
0.1967046707868576,
-0.068418622016906... |
func NewListGroupsBadRequest() *ListGroupsBadRequest {
return &ListGroupsBadRequest{}
} | [
-0.9092496633529663,
-0.6433258652687073,
0.6139302849769592,
1.254273533821106,
-0.6300036311149597,
-0.7365485429763794,
-0.3858751356601715,
-0.7170828580856323,
-0.14770352840423584,
-0.11353998631238937,
0.2500552535057068,
0.8958101868629456,
-0.38596150279045105,
0.4017685055732727,... |
func NewListGroupsForbidden() *ListGroupsForbidden {
return &ListGroupsForbidden{}
} | [
0.1252666860818863,
-0.44322332739830017,
0.28421518206596375,
0.666939377784729,
-1.2144014835357666,
-0.6330587267875671,
-0.6038845181465149,
-0.6777309775352478,
-0.34238776564598083,
-0.8248937129974365,
-0.004180276766419411,
0.6092374920845032,
-0.37760457396507263,
-0.4391490817070... |
func NewListGroupsNotFound() *ListGroupsNotFound {
return &ListGroupsNotFound{}
} | [
-0.8062093257904053,
-1.2753777503967285,
0.012269411236047745,
0.16467750072479248,
-1.1028872728347778,
-0.37812647223472595,
-0.49077099561691284,
-0.3859473466873169,
0.18510708212852478,
-0.7598600387573242,
-0.9517070055007935,
0.618674635887146,
-0.42697006464004517,
0.1911784559488... |
func NewListGroupsDefault(code int) *ListGroupsDefault {
return &ListGroupsDefault{
_statusCode: code,
}
} | [
-0.04845584183931351,
-0.5020229816436768,
0.2296164333820343,
0.3051092028617859,
-0.15858794748783112,
-0.7439765930175781,
-0.717278003692627,
0.05701892450451851,
0.171519473195076,
-0.11683537811040878,
-1.3083159923553467,
-0.04507531225681305,
-1.1478925943374634,
-0.183000624179840... |
func (o *ListGroupsDefault) Code() int {
return o._statusCode
} | [
-0.35492947697639465,
0.7026506662368774,
0.14326056838035583,
0.7985158562660217,
0.3473780155181885,
-0.5126304626464844,
-0.10151505470275879,
0.2574394643306732,
-0.275358647108078,
-0.30436772108078003,
-0.27749258279800415,
0.0006763261626474559,
-0.6289359331130981,
0.93633389472961... |
func (c *Client) DescribeIdentityIdFormat(ctx context.Context, params *DescribeIdentityIdFormatInput, optFns ...func(*Options)) (*DescribeIdentityIdFormatOutput, error) {
if params == nil {
params = &DescribeIdentityIdFormatInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeIdentityIdFormat", para... | [
-0.8988654017448425,
-0.1207476481795311,
0.679945707321167,
-0.6753822565078735,
0.33881711959838867,
-0.8926923274993896,
-0.02439800091087818,
-1.4966484308242798,
0.4981745779514313,
-0.14830535650253296,
-0.0670606791973114,
1.6438068151474,
-0.48492029309272766,
0.017788415774703026,... |
func initStore(ctx context.Context, opts *Opts) (*sqlx.DB, scanner.Store, error) {
var store scanner.Store
switch opts.DataStore {
case Postgres:
// we are going to use pgx for more control over connection pool and
// and a cleaner api around bulk inserts
cfg, err := pgxpool.ParseConfig(opts.ConnString)
if e... | [
-0.4055745005607605,
-0.19708815217018127,
0.6111519932746887,
-0.3416638672351837,
-0.5187819600105286,
0.25238236784935,
-0.5510264039039612,
0.5358947515487671,
0.7117958068847656,
-0.5954872369766235,
0.026532894000411034,
0.14907747507095337,
-0.19859305024147034,
0.13882361352443695,... |
func GetConfig() (*Config, error) {
var err error
if _, err = os.Stat(".env"); !os.IsNotExist(err) {
err = godotenv.Load()
if err != nil {
return nil, err
}
}
var conf Config
err = envconfig.Process("", &conf)
if err != nil {
return nil, err
}
if utf8.RuneCountInString(conf.Delimiter) != 1 {
ret... | [
-0.1413053572177887,
0.08918815851211548,
0.7318995594978333,
0.10633061826229095,
-0.3215791583061218,
0.4110850393772125,
-0.2882625460624695,
0.642803966999054,
-0.8055801391601562,
0.9230698347091675,
-0.5968199372291565,
0.5553151369094849,
0.1073167473077774,
0.12246270477771759,
0... |
func Asset(name string) ([]byte, error) {
if f, ok := _bindata[name]; ok {
return f()
}
return nil, fmt.Errorf("Asset %s not found", name)
} | [
-0.859847903251648,
-1.1421297788619995,
0.39278310537338257,
-0.8468062877655029,
-1.293667197227478,
-0.4077804386615753,
0.16629952192306519,
-1.4303736686706543,
-0.7855451107025146,
0.32956573367118835,
0.19058221578598022,
0.4659145474433899,
-0.17379866540431976,
-0.3319896459579468... |
func (b *Bot) ReactionDelete(s *discordgo.Session, event *discordgo.MessageReactionRemove) {
if f, ok := b.Commands.ReactionRemoveCommands[event.Emoji.Name]; ok {
f(b, s, event)
}
} | [
1.3261204957962036,
-0.5922600626945496,
0.2920170724391937,
0.5913704633712769,
0.9456787109375,
-0.7427506446838379,
0.6135203242301941,
0.5528033971786499,
1.0918915271759033,
0.29666101932525635,
-0.427810937166214,
-0.07793351262807846,
-0.6889355182647705,
-0.5379965901374817,
-0.3... |
func (app *App) Initialize(user, password, dbname string) {
connectionString := fmt.Sprintf("user=%s password=%s dbname=%s", user, password, dbname)
var err error
app.DB, err = sql.Open("postgres", connectionString)
if err != nil {
log.Fatal(err)
}
app.Router = mux.NewRouter()
} | [
-0.15350328385829926,
0.7356752753257751,
0.7697369456291199,
1.0973495244979858,
0.392500102519989,
0.16933879256248474,
-0.8863566517829895,
0.913197934627533,
-0.8933643698692322,
0.679916262626648,
-0.004696880467236042,
0.5769903659820557,
-0.2777930796146393,
0.4074563682079315,
0.... |
func (app *App) Run(addr string) {} | [
-0.18302954733371735,
-0.9022480249404907,
0.292985200881958,
0.731113851070404,
-0.833307683467865,
0.6381793022155762,
0.5850375294685364,
0.2993541359901428,
0.9977038502693176,
0.3208591938018799,
-0.5173549652099609,
0.6067694425582886,
-0.022035187110304832,
0.0018796762451529503,
... |
func HookClientConfigForWebhook(w *v1beta1.Webhook) webhook.ClientConfig {
ret := webhook.ClientConfig{Name: w.Name, CABundle: w.ClientConfig.CABundle}
if w.ClientConfig.URL != nil {
ret.URL = *w.ClientConfig.URL
}
if w.ClientConfig.Service != nil {
ret.Service = &webhook.ClientConfigService{
Name: w.Cl... | [
0.3055552840232849,
-0.4296627640724182,
0.3833680748939514,
-0.6444116830825806,
-0.768453061580658,
-0.00753044942393899,
0.44003137946128845,
-0.0549960695207119,
-0.2998485863208771,
0.6396180391311646,
-0.48415854573249817,
-0.021071556955575943,
0.22977866232395172,
0.999794065952301... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.