query
stringlengths 7
3.85k
| document
stringlengths 11
430k
| metadata
dict | negatives
listlengths 0
101
| negative_scores
listlengths 0
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Delete returns a delete builder for UnsavedPostImage.
|
func (c *UnsavedPostImageClient) Delete() *UnsavedPostImageDelete {
mutation := newUnsavedPostImageMutation(c.config, OpDelete)
return &UnsavedPostImageDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *PostImageClient) Delete() *PostImageDelete {\n\tmutation := newPostImageMutation(c.config, OpDelete)\n\treturn &PostImageDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostAttachmentClient) Delete() *UnsavedPostAttachmentDelete {\n\tmutation := newUnsavedPostAttachmentMutation(c.config, OpDelete)\n\treturn &UnsavedPostAttachmentDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostClient) Delete() *UnsavedPostDelete {\n\tmutation := newUnsavedPostMutation(c.config, OpDelete)\n\treturn &UnsavedPostDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostThumbnailClient) Delete() *UnsavedPostThumbnailDelete {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpDelete)\n\treturn &UnsavedPostThumbnailDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostAttachmentClient) Delete() *PostAttachmentDelete {\n\tmutation := newPostAttachmentMutation(c.config, OpDelete)\n\treturn &PostAttachmentDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostClient) Delete() *PostDelete {\n\tmutation := newPostMutation(c.config, OpDelete)\n\treturn &PostDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (m *ItemPhotoRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemPhotoRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (c *PostThumbnailClient) Delete() *PostThumbnailDelete {\n\tmutation := newPostThumbnailMutation(c.config, OpDelete)\n\treturn &PostThumbnailDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostVideoClient) Delete() *UnsavedPostVideoDelete {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpDelete)\n\treturn &UnsavedPostVideoDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (p *postsQueryBuilder) Delete() (int64, error) {\n\tif p.err != nil {\n\t\treturn 0, p.err\n\t}\n\treturn p.builder.Delete()\n}",
"func NewUnsavedPostImageClient(c config) *UnsavedPostImageClient {\n\treturn &UnsavedPostImageClient{config: c}\n}",
"func (f *FakeImagesClient) Delete(ctx context.Context, deleteOpts *images.DeleteRequest, opts ...grpc.CallOption) (*googleprotobuf.Empty, error) {\n\tf.Lock()\n\tdefer f.Unlock()\n\tf.appendCalled(\"delete\", deleteOpts)\n\tif err := f.getError(\"delete\"); err != nil {\n\t\treturn nil, err\n\t}\n\t_, ok := f.ImageList[deleteOpts.Name]\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"image does not exist\")\n\t}\n\tdelete(f.ImageList, deleteOpts.Name)\n\treturn &googleprotobuf.Empty{}, nil\n}",
"func (c *BuildingClient) Delete() *BuildingDelete {\n\tmutation := newBuildingMutation(c.config, OpDelete)\n\treturn &BuildingDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ImageController) Delete(ctx *app.DeleteImageContext) error {\n\t// ImageController_Delete: start_implement\n\n\t// Put your logic here\n\n\t// ImageController_Delete: end_implement\n\treturn nil\n}",
"func (m *DeleteImageTagModel) Delete() (err error) {\n\n\t// check model validity\n\tif !m.IsValid() {\n\t\treturn errors.New(\"DeleteImageTagModel is not valid\")\n\t}\n\n\t// Get Database handle\n\tdbase, err := db.GetDb()\n\tif err != nil {\n\t\treturn\n\t}\n\n\tps1, err := dbase.Prepare(`DELETE tm FROM tagmap AS tm\n INNER JOIN tags ON tm.tag_id = tags.tag_id\n WHERE image_id = ? AND tm.tag_id = ? AND ib_id = ?`)\n\tif err != nil {\n\t\treturn\n\t}\n\tdefer ps1.Close()\n\n\t_, err = ps1.Exec(m.Image, m.Tag, m.Ib)\n\tif err != nil {\n\t\treturn\n\t}\n\n\treturn\n\n}",
"func (c *MediaClient) Delete() *MediaDelete {\n\tmutation := newMediaMutation(c.config, OpDelete)\n\treturn &MediaDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (mock *MockRepository) Delete(post *entity.Post) error {\n\treturn nil\n}",
"func Delete(c *gin.Context) {\r\n\tpost := getById(c)\r\n\tif post.ID == 0 {\r\n\t\treturn\r\n\t}\r\n\tdb.Unscoped().Delete(&post)\r\n\tc.JSON(http.StatusOK, gin.H{\r\n\t\t\"messege\": \"deleted successfuly\",\r\n\t\t\"data\": \"\",\r\n\t})\r\n}",
"func NewDeleteImageNoContent() *DeleteImageNoContent {\n\n\treturn &DeleteImageNoContent{}\n}",
"func (m *CompaniesItemSalesCreditMemosItemCustomerPicturePictureItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *CompaniesItemSalesCreditMemosItemCustomerPicturePictureItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (o *Picture) Delete(exec boil.Executor) error {\n\tif o == nil {\n\t\treturn errors.New(\"models: no Picture provided for delete\")\n\t}\n\n\tif err := o.doBeforeDeleteHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\targs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), picturePrimaryKeyMapping)\n\tsql := \"DELETE FROM `pictures` WHERE `id`=?\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, sql)\n\t\tfmt.Fprintln(boil.DebugWriter, args...)\n\t}\n\n\t_, err := exec.Exec(sql, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"models: unable to delete from pictures\")\n\t}\n\n\tif err := o.doAfterDeleteHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}",
"func (repo *PostAttributeRepository) Delete(identifier, tableName string) (*entity.PostAttribute, error) {\n\tattribute := new(entity.PostAttribute)\n\terr := repo.conn.Table(tableName).Where(\"id = ? || name = ?\", identifier, identifier).First(attribute).Error\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\trepo.conn.Table(tableName).Delete(attribute)\n\treturn attribute, nil\n}",
"func (b *QueryBuilder) Delete() {\n}",
"func (c *MedicineClient) Delete() *MedicineDelete {\n\tmutation := newMedicineMutation(c.config, OpDelete)\n\treturn &MedicineDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func DeleteImage(c * gin.Context){\n\tdb := database.DBConn()\n\tid:= c.Param(\"id\")\n\t_, err := db.Query(\"Delete FROM images WHERE id = \" + id)\n\tif err != nil{\n\t\tc.JSON(500, gin.H{\n\t\t\t\"messages\" : \"Story not found\",\n\t\t});\n\t\tpanic(\"error delte clothes\")\n\t}\n\tc.JSON(200, gin.H{\n\t\t\"messages\": \"deleted\",\n\t})\n\tdefer db.Close()\n}",
"func NewDeleteImageNoContent() *DeleteImageNoContent {\n\treturn &DeleteImageNoContent{}\n}",
"func (c *UnsavedPostImageClient) Get(ctx context.Context, id int) (*UnsavedPostImage, error) {\n\treturn c.Query().Where(unsavedpostimage.ID(id)).Only(ctx)\n}",
"func (c *PostVideoClient) Delete() *PostVideoDelete {\n\tmutation := newPostVideoMutation(c.config, OpDelete)\n\treturn &PostVideoDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (controller *WidgetController) Delete(context *qhttp.Context) {\n\tcontroller.storage.Delete(context.URIParameters[\"id\"])\n\tcontext.SetResponse(\"\", http.StatusNoContent)\n}",
"func (v *ImageClient) Delete(imageName string) error {\n\n\t//Construct the composite key to select the entry\n\tkey := ImageKey{\n\t\t// Owner:\townerName,\n\t\t// ClusterName:\tclusterName,\n\t\tImageName: imageName,\n\t}\n\terr := v.util.DBDelete(v.storeName, key, v.tagMeta)\n\n\t//Delete image from FS\n\tfilePath, _, err := v.GetDirPath(imageName)\n\tif err != nil {\n\t\treturn pkgerrors.Wrap(err, \"Get file path\")\n\t}\n\terr = os.Remove(filePath)\n if err != nil {\n return pkgerrors.Wrap(err, \"Delete image file\")\n }\n\n\treturn nil\n}",
"func (c *UnsavedPostImageClient) QueryUnsavedPost(upi *UnsavedPostImage) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upi.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostimage.Table, unsavedpostimage.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostimage.UnsavedPostTable, unsavedpostimage.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upi.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UploadController) Delete() {\n\timg := struct {\n\t\tFileName string `json:\"fileName\"`\n\t}{}\n\terr := json.Unmarshal(c.Ctx.Input.RequestBody, &img)\n\tif err != nil {\n\t\tlog.Println(err)\n\t}\n\n\t// remove thumbnail\n\terr = os.Remove(thumbnailsFolder + img.FileName)\n\tif err != nil {\n\t\tlog.Println(err)\n\t}\n\t// remove main image\n\terr = os.Remove(imagesFolder + img.FileName)\n\tif err != nil {\n\t\tlog.Println(err)\n\t}\n\tc.Data[\"json\"] = img\n\tc.ServeJSON()\n}",
"func (m *EmbeddedSIMActivationCodePoolsEmbeddedSIMActivationCodePoolItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *EmbeddedSIMActivationCodePoolsEmbeddedSIMActivationCodePoolItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (m *SignInItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *SignInItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (dsl *PutDSL) Delete() linux.DeleteDSL {\n\treturn &DeleteDSL{dsl.parent, dsl.vppPut.Delete()}\n}",
"func (dsl *PutDSL) Delete() linux.DeleteDSL {\n\treturn &DeleteDSL{dsl.parent, dsl.vppPut.Delete()}\n}",
"func (l *Like) Delete() error {\n\treturn nil\n}",
"func (u *App) Delete(c echo.Context, id string) error {\n\tif err := u.rbac.EnforceRole(c, model.AdminRole); err != nil {\n\t\treturn err\n\t}\n\n\tpost, err := u.udb.View(u.db, id)\n\tif err = zaplog.ZLog(err); err != nil {\n\t\treturn err\n\t}\n\n\tif post.Status != model.StatusDraft {\n\t\treturn zaplog.ZLog(errors.New(\"Apenas é possível eliminar artigos em rascunho\"))\n\t}\n\n\treturn u.udb.Delete(u.db, id)\n}",
"func (c *PharmacistClient) Delete() *PharmacistDelete {\n\tmutation := newPharmacistMutation(c.config, OpDelete)\n\treturn &PharmacistDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func DeleteImage(c *fiber.Ctx) {\n\tShopID := c.Params(\"shop_id\")\n\n\tvar DeleteImage DataDeleteImage\n\n\tif errorParse := c.BodyParser(&DeleteImage); errorParse != nil {\n\t\tfmt.Println(\"Error parsing data\", errorParse)\n\t\tc.JSON(ErrorResponse{MESSAGE: \"Error al parsear información\"})\n\t\tc.Status(400)\n\t\treturn\n\t}\n\n\t_, ErrorDelete := sq.Delete(\"images_shop\").\n\t\tWhere(\"url_image = ? AND shop_id = ?\", DeleteImage.URLImage, ShopID).\n\t\tRunWith(database).\n\t\tExec()\n\n\tif ErrorDelete != nil {\n\t\tfmt.Println(\"Error to delete image\", ErrorDelete)\n\t\tc.JSON(ErrorResponse{MESSAGE: \"Error to delete image\"})\n\t\tc.Status(400)\n\t}\n\n\tc.JSON(SuccessResponse{MESSAGE: \"Imagen eliminada\"})\n}",
"func (m *ThreatSubmissionEmailThreatsEmailThreatSubmissionItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ThreatSubmissionEmailThreatsEmailThreatSubmissionItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (o *DMessageEmbed) Delete(exec boil.Executor) error {\n\tif o == nil {\n\t\treturn errors.New(\"models: no DMessageEmbed provided for delete\")\n\t}\n\n\targs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), dMessageEmbedPrimaryKeyMapping)\n\tsql := \"DELETE FROM \\\"d_message_embeds\\\" WHERE \\\"id\\\"=$1\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, sql)\n\t\tfmt.Fprintln(boil.DebugWriter, args...)\n\t}\n\n\t_, err := exec.Exec(sql, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"models: unable to delete from d_message_embeds\")\n\t}\n\n\treturn nil\n}",
"func (c *MedicineTypeClient) Delete() *MedicineTypeDelete {\n\tmutation := newMedicineTypeMutation(c.config, OpDelete)\n\treturn &MedicineTypeDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (r *GroupPolicyPresentationRequest) Delete(ctx context.Context) error {\n\treturn r.JSONRequest(ctx, \"DELETE\", \"\", nil, nil)\n}",
"func (upu *UnsavedPostUpdate) ClearImages() *UnsavedPostUpdate {\n\tupu.mutation.ClearImages()\n\treturn upu\n}",
"func (c *UnsavedPostImageClient) DeleteOne(upi *UnsavedPostImage) *UnsavedPostImageDeleteOne {\n\treturn c.DeleteOneID(upi.ID)\n}",
"func Delete(g *types.Cmd) {\n\tg.AddOptions(\"--delete\")\n}",
"func (me imageStore) Delete(imageID uint) (bool, error) {\n\tif err := me.Db.Unscoped().Exec(\"DELETE FROM images WHERE id = ? \", imageID).Error; err != nil {\n\t\treturn false, err\n\t}\n\n\treturn true, nil\n}",
"func (m *ChatItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ChatItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func NewDeleteBuilder() *DeleteBuilder {\n\treturn &DeleteBuilder{}\n}",
"func deleteImage(t *testing.T, projectID string, imageName string) {\n\t// Load the Image ID saved by the earlier build_image stage\n\timage := gcp.FetchImage(t, projectID, imageName)\n\timage.DeleteImage(t)\n}",
"func (c *BedtypeClient) Delete() *BedtypeDelete {\n\tmutation := newBedtypeMutation(c.config, OpDelete)\n\treturn &BedtypeDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PartClient) Delete() *PartDelete {\n\tmutation := newPartMutation(c.config, OpDelete)\n\treturn &PartDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (m *PrivilegedSignupStatusItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *PrivilegedSignupStatusItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func NewDeleteImageDefault(code int) *DeleteImageDefault {\n\tif code <= 0 {\n\t\tcode = 500\n\t}\n\n\treturn &DeleteImageDefault{\n\t\t_statusCode: code,\n\t}\n}",
"func (c *BeerClient) Delete() *BeerDelete {\n\tmutation := newBeerMutation(c.config, OpDelete)\n\treturn &BeerDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ReviewClient) Delete() *ReviewDelete {\n\tmutation := newReviewMutation(c.config, OpDelete)\n\treturn &ReviewDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (repository Posts) Delete(postID uint64) error {\n\tdbStatement, err := repository.db.Prepare(\n\t\t\"DELETE FROM posts WHERE id = ?\",\n\t)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer dbStatement.Close()\n\n\tif _, err = dbStatement.Exec(postID); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}",
"func DeletePostController(c *gin.Context) {\n\n\t// Get parameters from validate middleware\n\tparams := c.MustGet(\"params\").([]uint)\n\n\t// get userdata from user middleware\n\tuserdata := c.MustGet(\"userdata\").(user.User)\n\n\tif !c.MustGet(\"protected\").(bool) {\n\t\tc.JSON(e.ErrorMessage(e.ErrInternalError))\n\t\tc.Error(e.ErrInternalError).SetMeta(\"DeletePostController.protected\")\n\t\treturn\n\t}\n\n\t// Initialize model struct\n\tm := &models.DeletePostModel{\n\t\tIb: params[0],\n\t\tThread: params[1],\n\t\tID: params[2],\n\t}\n\n\t// Check the record id and get further info\n\terr := m.Status()\n\tif err == e.ErrNotFound {\n\t\tc.JSON(e.ErrorMessage(e.ErrNotFound))\n\t\tc.Error(err).SetMeta(\"DeletePostController.Status\")\n\t\treturn\n\t} else if err != nil {\n\t\tc.JSON(e.ErrorMessage(e.ErrInternalError))\n\t\tc.Error(err).SetMeta(\"DeletePostController.Status\")\n\t\treturn\n\t}\n\n\t// Delete data\n\terr = m.Delete()\n\tif err != nil {\n\t\tc.JSON(e.ErrorMessage(e.ErrInternalError))\n\t\tc.Error(err).SetMeta(\"DeletePostController.Delete\")\n\t\treturn\n\t}\n\n\t// Delete redis stuff\n\tindexKey := fmt.Sprintf(\"%s:%d\", \"index\", m.Ib)\n\tdirectoryKey := fmt.Sprintf(\"%s:%d\", \"directory\", m.Ib)\n\tthreadKey := fmt.Sprintf(\"%s:%d:%d\", \"thread\", m.Ib, m.Thread)\n\tpostKey := fmt.Sprintf(\"%s:%d:%d\", \"post\", m.Ib, m.Thread)\n\ttagsKey := fmt.Sprintf(\"%s:%d\", \"tags\", m.Ib)\n\timageKey := fmt.Sprintf(\"%s:%d\", \"image\", m.Ib)\n\tnewKey := fmt.Sprintf(\"%s:%d\", \"new\", m.Ib)\n\tpopularKey := fmt.Sprintf(\"%s:%d\", \"popular\", m.Ib)\n\tfavoritedKey := fmt.Sprintf(\"%s:%d\", \"favorited\", m.Ib)\n\n\terr = redis.Cache.Delete(indexKey, directoryKey, threadKey, postKey, tagsKey, imageKey, newKey, popularKey, favoritedKey)\n\tif err != nil {\n\t\tc.JSON(e.ErrorMessage(e.ErrInternalError))\n\t\tc.Error(err).SetMeta(\"DeletePostController.redis.Cache.Delete\")\n\t\treturn\n\t}\n\n\t// response message\n\tc.JSON(http.StatusOK, gin.H{\"success_message\": audit.AuditDeletePost})\n\n\t// audit log\n\taudit := audit.Audit{\n\t\tUser: userdata.ID,\n\t\tIb: m.Ib,\n\t\tType: audit.ModLog,\n\t\tIP: c.ClientIP(),\n\t\tAction: audit.AuditDeletePost,\n\t\tInfo: fmt.Sprintf(\"%s/%d\", m.Name, m.ID),\n\t}\n\n\t// submit audit\n\terr = audit.Submit()\n\tif err != nil {\n\t\tc.Error(err).SetMeta(\"DeletePostController.audit.Submit\")\n\t}\n\n}",
"func (o *BraceletPhoto) Delete(exec boil.Executor) error {\n\tif o == nil {\n\t\treturn errors.New(\"models: no BraceletPhoto provided for delete\")\n\t}\n\n\targs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), braceletPhotoPrimaryKeyMapping)\n\tsql := \"DELETE FROM `bracelet_photo` WHERE `id`=?\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, sql)\n\t\tfmt.Fprintln(boil.DebugWriter, args...)\n\t}\n\n\t_, err := exec.Exec(sql, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"models: unable to delete from bracelet_photo\")\n\t}\n\n\treturn nil\n}",
"func (c *DispenseMedicineClient) Delete() *DispenseMedicineDelete {\n\tmutation := newDispenseMedicineMutation(c.config, OpDelete)\n\treturn &DispenseMedicineDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (m *ItemOnenoteNotebooksItemSectionsItemPagesOnenotePageItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemOnenoteNotebooksItemSectionsItemPagesOnenotePageItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (upuo *UnsavedPostUpdateOne) ClearImages() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearImages()\n\treturn upuo\n}",
"func (c *DentistClient) Delete() *DentistDelete {\n\tmutation := newDentistMutation(c.config, OpDelete)\n\treturn &DentistDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (pid *PostImageDelete) Where(ps ...predicate.PostImage) *PostImageDelete {\n\tpid.mutation.predicates = append(pid.mutation.predicates, ps...)\n\treturn pid\n}",
"func BuildDel(key string) *Cmd {\n\treturn Build(key, \"DEL\", key)\n}",
"func (c *Client) Delete() *Request {\n\treturn NewRequest(c.httpClient, c.base, \"DELETE\", c.version, c.authstring, c.userAgent)\n}",
"func (m *StoreItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *StoreItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (m *FileRequestBuilder) Delete(ctx context.Context, requestConfiguration *FileRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func DeletePost(shorturl string, s3Agent *upload.S3Agent) (interface{}, error) {\n\tdb := database.GetMySQLInstance()\n\tdefer db.Close()\n\n\tvar post types.Post\n\terr := db.Where(\"shorturl LIKE ?\", shorturl).First(&post).Error\n\n\tif err != nil && err == gorm.ErrRecordNotFound {\n\t\treturn nil, ErrPostNotFound\n\t}\n\n\tsuccessReturn := map[string]interface{}{\"msg\": \"success\", \"pid\": post.ID}\n\n\t_, err = s3Agent.DeleteFiles(s3Agent.BucketName, post.Images)\n\tif err != nil {\n\t\treturn nil, ErrResourceRemoveFailure\n\t}\n\n\terr = db.Unscoped().Delete(&post).Error\n\tif err != nil {\n\t\tlog.Debug(err)\n\t\treturn nil, ErrResourceRemoveFailure\n\t}\n\n\treturn successReturn, nil\n}",
"func (g Goba) DeleteImage(typ DatabaseType, name string) error {\n\tfor _, handler := range g.handlers {\n\t\tif handler.Type() == typ {\n\t\t\treturn handler.DeleteImage(name)\n\t\t}\n\t}\n\treturn ErrNoSuchHandler\n}",
"func (b *Builder) Delete(conds ...Cond) *Builder {\r\n\tb.cond = b.cond.And(conds...)\r\n\tb.optype = deleteType\r\n\treturn b\r\n}",
"func (c *BinaryFileClient) Delete() *BinaryFileDelete {\n\tmutation := newBinaryFileMutation(c.config, OpDelete)\n\treturn &BinaryFileDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (m *GroupPolicyDefinitionsItemNextVersionDefinitionPreviousVersionDefinitionRequestBuilder) Delete(ctx context.Context, requestConfiguration *GroupPolicyDefinitionsItemNextVersionDefinitionPreviousVersionDefinitionRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (b *Builder) Delete(url string) *Builder {\n\tb.Url = url\n\tb.Method = http.MethodDelete\n\treturn b\n}",
"func (m *ItemInstancesAccessReviewItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemInstancesAccessReviewItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func Delete(conds ...Cond) *Builder {\r\n\tbuilder := &Builder{cond: NewCond()}\r\n\treturn builder.Delete(conds...)\r\n}",
"func (c CRImage) DeleteImg() {\n\t_, err := dbmap.Delete(&c)\n\tif err != nil {\n\t\tlog.Println(\"Delete failed\", err)\n\t\treturn\n\t}\n\tcf := new(CRFork)\n\terr = dbmap.SelectOne(&cf, \"select fork_id from cr_fork where user_id = ? and image_id = ?\", c.UserId, c.ImageId)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, err = dbmap.Delete(&cf)\n\tif err != nil {\n\t\tlog.Println(\"Delete failed\", err)\n\t\treturn\n\t}\n}",
"func (c *commentsQueryBuilder) Delete() (int64, error) {\n\tif c.err != nil {\n\t\treturn 0, c.err\n\t}\n\treturn c.builder.Delete()\n}",
"func (r *Repository) Delete(db *gorm.DB, i interface{}) error {\n\treturn db.Omit(clause.Associations).Delete(i).Error\n}",
"func (b *Executor) Delete() (err error) {\n\tif b.builder != nil {\n\t\terr = b.builder.Delete()\n\t\tb.builder = nil\n\t}\n\treturn err\n}",
"func (c *TagClient) Delete() *TagDelete {\n\tmutation := newTagMutation(c.config, OpDelete)\n\treturn &TagDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostThumbnailClient) QueryUnsavedPost(upt *UnsavedPostThumbnail) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upt.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, true, unsavedpostthumbnail.UnsavedPostTable, unsavedpostthumbnail.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upt.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *Client) Delete(d core.Digest) error {\n\t_, err := httputil.Delete(fmt.Sprintf(\"http://%s/blobs/%s\", c.addr, d))\n\treturn err\n}",
"func (m *ApplicationSignInDetailedSummaryApplicationSignInDetailedSummaryItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ApplicationSignInDetailedSummaryApplicationSignInDetailedSummaryItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (m *TeamItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *TeamItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (b *DeleteBuilder) WithFlavor(flavor sql.DbFlavor) *DeleteBuilder {\n\tb.BaseSqlBuilder.WithFlavor(flavor)\n\treturn b\n}",
"func (m *GroupPolicyCategoriesGroupPolicyCategoryItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *GroupPolicyCategoriesGroupPolicyCategoryItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (t *PgAttributeType) Delete(c1 qb.Condition, c ...qb.Condition) qb.Query {\n\treturn t.table.Delete(c1, c...)\n}",
"func (c *UnitOfMedicineClient) Delete() *UnitOfMedicineDelete {\n\tmutation := newUnitOfMedicineMutation(c.config, OpDelete)\n\treturn &UnitOfMedicineDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func DeleteImage(w http.ResponseWriter, r *http.Request) {\n\n\t//Get current Session\n\tsession, _ := store.Get(r, \"session\")\n\tname := session.Values[\"username\"].(string)\n\n\t//Pathparameter\n\tvars := mux.Vars(r)\n\timageID := vars[\"imageID\"]\n\n\t//Get User Commenting Image\n\tuser, err := model.GetUserByUsername(name)\n\tif err != nil {\n\n\t\tw.WriteHeader(http.StatusConflict)\n\t\tw.Write([]byte(err.Error()))\n\t\treturn\n\n\t}\n\n\t//Delete Image from Database\n\tuser.DeleteImage(imageID)\n\n\t//Make Response JSON\n\tresponseModel := struct {\n\t\tMessage string\n\t}{Message: \"Image was deleted Sussesfully!\"}\n\tresponseJSON, err := json.Marshal(responseModel)\n\tif err != nil {\n\n\t\tw.WriteHeader(http.StatusInternalServerError)\n\t\tw.Write([]byte(err.Error()))\n\t\treturn\n\n\t}\n\n\t//Write response\n\tw.Header().Set(\"Content-Type\", \"application/json; charset=UTF-8\")\n\tw.WriteHeader(http.StatusAccepted)\n\tw.Write(responseJSON)\n}",
"func (m *ItemPendingAccessReviewInstancesAccessReviewInstanceItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemPendingAccessReviewInstancesAccessReviewInstanceItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (m *OperationsPrintOperationItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *OperationsPrintOperationItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (m *AccessReviewHistoryDefinitionItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *AccessReviewHistoryDefinitionItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (m *BrandingRequestBuilder) Delete(ctx context.Context, requestConfiguration *BrandingRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (c *UnsavedPostImageClient) Query() *UnsavedPostImageQuery {\n\treturn &UnsavedPostImageQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (m *ExactMatchDataStoresExactMatchDataStoreItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ExactMatchDataStoresExactMatchDataStoreItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (m *UserFlowLanguagePageItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *UserFlowLanguagePageItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (m *ItemSettingsRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemSettingsRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (m *TeamsAppItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *TeamsAppItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}"
] |
[
"0.6793739",
"0.66800255",
"0.66429025",
"0.64270365",
"0.6171299",
"0.6036434",
"0.5919667",
"0.58750343",
"0.56116426",
"0.5597149",
"0.5570824",
"0.5564819",
"0.5526371",
"0.544734",
"0.541331",
"0.53949404",
"0.53612703",
"0.5336876",
"0.5325457",
"0.5316507",
"0.53042424",
"0.53018445",
"0.5282117",
"0.5260625",
"0.525238",
"0.5247534",
"0.5220434",
"0.5220296",
"0.5209834",
"0.5181651",
"0.5174531",
"0.51744086",
"0.5155809",
"0.5150003",
"0.51493746",
"0.51493746",
"0.51383156",
"0.5135394",
"0.5130532",
"0.51233035",
"0.5101354",
"0.5089197",
"0.5079136",
"0.50788635",
"0.507682",
"0.50751233",
"0.5052674",
"0.5049394",
"0.5047548",
"0.50337046",
"0.5033133",
"0.5031618",
"0.50218415",
"0.5017126",
"0.50136614",
"0.5012069",
"0.5011907",
"0.50073814",
"0.5006276",
"0.50045997",
"0.49825495",
"0.4972444",
"0.49648046",
"0.4964157",
"0.49614838",
"0.49594247",
"0.495786",
"0.49549505",
"0.49527407",
"0.49506232",
"0.49431902",
"0.49229327",
"0.49223614",
"0.4902364",
"0.48995402",
"0.48947656",
"0.4893628",
"0.48909098",
"0.48908895",
"0.48852444",
"0.48828647",
"0.4867702",
"0.48640844",
"0.4859294",
"0.4856488",
"0.48562205",
"0.48522696",
"0.48497957",
"0.48475063",
"0.48442414",
"0.48436964",
"0.48435625",
"0.48422688",
"0.48358077",
"0.48248827",
"0.48239565",
"0.48171657",
"0.48147666",
"0.48105466",
"0.4802695"
] |
0.7462805
|
0
|
DeleteOne returns a delete builder for the given entity.
|
func (c *UnsavedPostImageClient) DeleteOne(upi *UnsavedPostImage) *UnsavedPostImageDeleteOne {
return c.DeleteOneID(upi.ID)
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *BuildingClient) DeleteOne(b *Building) *BuildingDeleteOne {\n\treturn c.DeleteOneID(b.ID)\n}",
"func (c *DeviceClient) DeleteOne(d *Device) *DeviceDeleteOne {\n\treturn c.DeleteOneID(d.ID)\n}",
"func (c *EmptyClient) DeleteOne(e *Empty) *EmptyDeleteOne {\n\treturn c.DeleteOneID(e.ID)\n}",
"func (c *DentistClient) DeleteOne(d *Dentist) *DentistDeleteOne {\n\treturn c.DeleteOneID(d.ID)\n}",
"func (c *BedtypeClient) DeleteOne(b *Bedtype) *BedtypeDeleteOne {\n\treturn c.DeleteOneID(b.ID)\n}",
"func (c *OperativerecordClient) DeleteOne(o *Operativerecord) *OperativerecordDeleteOne {\n\treturn c.DeleteOneID(o.ID)\n}",
"func (c *OperationClient) DeleteOne(o *Operation) *OperationDeleteOne {\n\treturn c.DeleteOneID(o.ID)\n}",
"func (c *DNSBLQueryClient) DeleteOne(dq *DNSBLQuery) *DNSBLQueryDeleteOne {\n\treturn c.DeleteOneID(dq.ID)\n}",
"func (c *DispenseMedicineClient) DeleteOne(dm *DispenseMedicine) *DispenseMedicineDeleteOne {\n\treturn c.DeleteOneID(dm.ID)\n}",
"func (c *Command) DeleteOne() (int64, error) {\n\tclient := c.set.gom.GetClient()\n\n\tcollection := client.Database(c.set.gom.GetDatabase()).Collection(c.set.tableName)\n\n\tif len(c.set.filter.(bson.M)) == 0 {\n\t\treturn 0, errors.New(\"filter can't be empty\")\n\t}\n\n\tctx, cancelFunc := c.set.GetContext()\n\tdefer cancelFunc()\n\n\tres, err := collection.DeleteOne(ctx, c.set.filter)\n\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn res.DeletedCount, nil\n}",
"func (c *DoctorClient) DeleteOne(d *Doctor) *DoctorDeleteOne {\n\treturn c.DeleteOneID(d.ID)\n}",
"func NewDeleteOneModel() *DeleteOneModel {\n\treturn &DeleteOneModel{}\n}",
"func (c *DrugAllergyClient) DeleteOne(da *DrugAllergy) *DrugAllergyDeleteOne {\n\treturn c.DeleteOneID(da.ID)\n}",
"func (c *BeerClient) DeleteOne(b *Beer) *BeerDeleteOne {\n\treturn c.DeleteOneID(b.ID)\n}",
"func (d *Demo) DeleteOne(g *gom.Gom) {\n\ttoolkit.Println(\"===== Delete One =====\")\n\n\tvar err error\n\tif d.useParams {\n\t\t_, err = g.Set(&gom.SetParams{\n\t\t\tTableName: \"hero\",\n\t\t\tFilter: gom.Eq(\"Name\", \"Batman\"),\n\t\t\tTimeout: 10,\n\t\t}).Cmd().DeleteOne()\n\t} else {\n\t\t_, err = g.Set(nil).Table(\"hero\").Timeout(10).Filter(gom.Eq(\"Name\", \"Batman\")).Cmd().DeleteOne()\n\t}\n\n\tif err != nil {\n\t\ttoolkit.Println(err.Error())\n\t\treturn\n\t}\n}",
"func (c *OrderClient) DeleteOne(o *Order) *OrderDeleteOne {\n\treturn c.DeleteOneID(o.ID)\n}",
"func (c *AdminClient) DeleteOne(a *Admin) *AdminDeleteOne {\n\treturn c.DeleteOneID(a.ID)\n}",
"func (c *PharmacistClient) DeleteOne(ph *Pharmacist) *PharmacistDeleteOne {\n\treturn c.DeleteOneID(ph.ID)\n}",
"func (c *FoodmenuClient) DeleteOne(f *Foodmenu) *FoodmenuDeleteOne {\n\treturn c.DeleteOneID(f.ID)\n}",
"func (c *CleaningroomClient) DeleteOne(cl *Cleaningroom) *CleaningroomDeleteOne {\n\treturn c.DeleteOneID(cl.ID)\n}",
"func (c *PatientClient) DeleteOne(pa *Patient) *PatientDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *PatientClient) DeleteOne(pa *Patient) *PatientDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *PatientClient) DeleteOne(pa *Patient) *PatientDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *PostClient) DeleteOne(po *Post) *PostDeleteOne {\n\treturn c.DeleteOneID(po.ID)\n}",
"func (c *CompanyClient) DeleteOne(co *Company) *CompanyDeleteOne {\n\treturn c.DeleteOneID(co.ID)\n}",
"func (c *CompanyClient) DeleteOne(co *Company) *CompanyDeleteOne {\n\treturn c.DeleteOneID(co.ID)\n}",
"func (c *DepositClient) DeleteOne(d *Deposit) *DepositDeleteOne {\n\treturn c.DeleteOneID(d.ID)\n}",
"func (c *OperativeClient) DeleteOne(o *Operative) *OperativeDeleteOne {\n\treturn c.DeleteOneID(o.ID)\n}",
"func (c *EventClient) DeleteOne(e *Event) *EventDeleteOne {\n\treturn c.DeleteOneID(e.ID)\n}",
"func (c *UnsavedPostClient) DeleteOne(up *UnsavedPost) *UnsavedPostDeleteOne {\n\treturn c.DeleteOneID(up.ID)\n}",
"func (c *BedtypeClient) DeleteOneID(id int) *BedtypeDeleteOne {\n\tbuilder := c.Delete().Where(bedtype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BedtypeDeleteOne{builder}\n}",
"func (c *MedicineClient) DeleteOne(m *Medicine) *MedicineDeleteOne {\n\treturn c.DeleteOneID(m.ID)\n}",
"func (c *OperativerecordClient) DeleteOneID(id int) *OperativerecordDeleteOne {\n\tbuilder := c.Delete().Where(operativerecord.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OperativerecordDeleteOne{builder}\n}",
"func (c *PatientofphysicianClient) DeleteOne(pa *Patientofphysician) *PatientofphysicianDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *PhysicianClient) DeleteOne(ph *Physician) *PhysicianDeleteOne {\n\treturn c.DeleteOneID(ph.ID)\n}",
"func (c *PhysicianClient) DeleteOne(ph *Physician) *PhysicianDeleteOne {\n\treturn c.DeleteOneID(ph.ID)\n}",
"func DeleteOne(ctx context.Context, tx pgx.Tx, sb sq.DeleteBuilder) error {\n\tq, vs, err := sb.ToSql()\n\tif err != nil {\n\t\treturn err\n\t}\n\ttag, err := tx.Exec(ctx, q, vs...)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif tag.RowsAffected() != 1 {\n\t\treturn ErrNoRowsAffected\n\t}\n\treturn nil\n}",
"func (c *TransactionClient) DeleteOne(t *Transaction) *TransactionDeleteOne {\n\treturn c.DeleteOneID(t.ID)\n}",
"func (c *LevelOfDangerousClient) DeleteOne(lod *LevelOfDangerous) *LevelOfDangerousDeleteOne {\n\treturn c.DeleteOneID(lod.ID)\n}",
"func (c *BillClient) DeleteOne(b *Bill) *BillDeleteOne {\n\treturn c.DeleteOneID(b.ID)\n}",
"func (c *BillClient) DeleteOne(b *Bill) *BillDeleteOne {\n\treturn c.DeleteOneID(b.ID)\n}",
"func (c *BillClient) DeleteOne(b *Bill) *BillDeleteOne {\n\treturn c.DeleteOneID(b.ID)\n}",
"func (c *PaymentClient) DeleteOne(pa *Payment) *PaymentDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *PaymentClient) DeleteOne(pa *Payment) *PaymentDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *CleanernameClient) DeleteOne(cl *Cleanername) *CleanernameDeleteOne {\n\treturn c.DeleteOneID(cl.ID)\n}",
"func (d *DBRepository) deleteOne(ctx context.Context, id string) error {\n\tobjectId, err := primitive.ObjectIDFromHex(id)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif _, err := d.Collection.DeleteOne(ctx, bson.M{\"_id\": objectId}); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func (c *MedicineTypeClient) DeleteOne(mt *MedicineType) *MedicineTypeDeleteOne {\n\treturn c.DeleteOneID(mt.ID)\n}",
"func (c *StatusdClient) DeleteOne(s *Statusd) *StatusdDeleteOne {\n\treturn c.DeleteOneID(s.ID)\n}",
"func (c *ToolClient) DeleteOne(t *Tool) *ToolDeleteOne {\n\treturn c.DeleteOneID(t.ID)\n}",
"func (c *ActivityTypeClient) DeleteOne(at *ActivityType) *ActivityTypeDeleteOne {\n\treturn c.DeleteOneID(at.ID)\n}",
"func (c *LevelOfDangerousClient) DeleteOneID(id int) *LevelOfDangerousDeleteOne {\n\tbuilder := c.Delete().Where(levelofdangerous.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &LevelOfDangerousDeleteOne{builder}\n}",
"func (c *OperationroomClient) DeleteOne(o *Operationroom) *OperationroomDeleteOne {\n\treturn c.DeleteOneID(o.ID)\n}",
"func (c *TagClient) DeleteOne(t *Tag) *TagDeleteOne {\n\treturn c.DeleteOneID(t.ID)\n}",
"func (c *DentistClient) DeleteOneID(id int) *DentistDeleteOne {\n\tbuilder := c.Delete().Where(dentist.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DentistDeleteOne{builder}\n}",
"func (c *OperativeClient) DeleteOneID(id int) *OperativeDeleteOne {\n\tbuilder := c.Delete().Where(operative.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OperativeDeleteOne{builder}\n}",
"func NewDeleteOneNoContent() *DeleteOneNoContent {\n\treturn &DeleteOneNoContent{}\n}",
"func (c *UnsavedPostClient) DeleteOneID(id int) *UnsavedPostDeleteOne {\n\tbuilder := c.Delete().Where(unsavedpost.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &UnsavedPostDeleteOne{builder}\n}",
"func (c *StaytypeClient) DeleteOne(s *Staytype) *StaytypeDeleteOne {\n\treturn c.DeleteOneID(s.ID)\n}",
"func (c *OrderClient) DeleteOneID(id int) *OrderDeleteOne {\n\tbuilder := c.Delete().Where(order.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OrderDeleteOne{builder}\n}",
"func (c *BuildingClient) DeleteOneID(id int) *BuildingDeleteOne {\n\tbuilder := c.Delete().Where(building.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BuildingDeleteOne{builder}\n}",
"func (c *PostClient) DeleteOneID(id int) *PostDeleteOne {\n\tbuilder := c.Delete().Where(post.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PostDeleteOne{builder}\n}",
"func (c *PatientroomClient) DeleteOne(pa *Patientroom) *PatientroomDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func NewDeleteOneDefault(code int) *DeleteOneDefault {\n\treturn &DeleteOneDefault{\n\t\t_statusCode: code,\n\t}\n}",
"func (c *EventClient) DeleteOneID(id int) *EventDeleteOne {\n\tbuilder := c.Delete().Where(event.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &EventDeleteOne{builder}\n}",
"func (c *UnsavedPostAttachmentClient) DeleteOne(upa *UnsavedPostAttachment) *UnsavedPostAttachmentDeleteOne {\n\treturn c.DeleteOneID(upa.ID)\n}",
"func (c *UnitOfMedicineClient) DeleteOne(uom *UnitOfMedicine) *UnitOfMedicineDeleteOne {\n\treturn c.DeleteOneID(uom.ID)\n}",
"func (c *FoodmenuClient) DeleteOneID(id int) *FoodmenuDeleteOne {\n\tbuilder := c.Delete().Where(foodmenu.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &FoodmenuDeleteOne{builder}\n}",
"func (c *PostAttachmentClient) DeleteOne(pa *PostAttachment) *PostAttachmentDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *DeviceClient) DeleteOneID(id int) *DeviceDeleteOne {\n\tbuilder := c.Delete().Where(device.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DeviceDeleteOne{builder}\n}",
"func (c *ToolClient) DeleteOneID(id int) *ToolDeleteOne {\n\tbuilder := c.Delete().Where(tool.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ToolDeleteOne{builder}\n}",
"func (c *AppointmentClient) DeleteOne(a *Appointment) *AppointmentDeleteOne {\n\treturn c.DeleteOneID(a.ID)\n}",
"func (c *EmptyClient) DeleteOneID(id int) *EmptyDeleteOne {\n\tbuilder := c.Delete().Where(empty.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &EmptyDeleteOne{builder}\n}",
"func (c *PurposeClient) DeleteOne(pu *Purpose) *PurposeDeleteOne {\n\treturn c.DeleteOneID(pu.ID)\n}",
"func (c *AdminClient) DeleteOneID(id int) *AdminDeleteOne {\n\tbuilder := c.Delete().Where(admin.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &AdminDeleteOne{builder}\n}",
"func (c *CleaningroomClient) DeleteOneID(id int) *CleaningroomDeleteOne {\n\tbuilder := c.Delete().Where(cleaningroom.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &CleaningroomDeleteOne{builder}\n}",
"func (c *LengthtimeClient) DeleteOneID(id int) *LengthtimeDeleteOne {\n\tbuilder := c.Delete().Where(lengthtime.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &LengthtimeDeleteOne{builder}\n}",
"func (c *DepartmentClient) DeleteOne(d *Department) *DepartmentDeleteOne {\n\treturn c.DeleteOneID(d.ID)\n}",
"func (c *PhysicianClient) DeleteOneID(id int) *PhysicianDeleteOne {\n\tbuilder := c.Delete().Where(physician.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PhysicianDeleteOne{builder}\n}",
"func (c *PhysicianClient) DeleteOneID(id int) *PhysicianDeleteOne {\n\tbuilder := c.Delete().Where(physician.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PhysicianDeleteOne{builder}\n}",
"func (c *UnsavedPostAttachmentClient) DeleteOneID(id int) *UnsavedPostAttachmentDeleteOne {\n\tbuilder := c.Delete().Where(unsavedpostattachment.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &UnsavedPostAttachmentDeleteOne{builder}\n}",
"func (c *DoctorClient) DeleteOneID(id int) *DoctorDeleteOne {\n\tbuilder := c.Delete().Where(doctor.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DoctorDeleteOne{builder}\n}",
"func (c *MealplanClient) DeleteOne(m *Mealplan) *MealplanDeleteOne {\n\treturn c.DeleteOneID(m.ID)\n}",
"func (c *CleanernameClient) DeleteOneID(id int) *CleanernameDeleteOne {\n\tbuilder := c.Delete().Where(cleanername.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &CleanernameDeleteOne{builder}\n}",
"func (c *ComplaintClient) DeleteOne(co *Complaint) *ComplaintDeleteOne {\n\treturn c.DeleteOneID(co.ID)\n}",
"func (c *StatustClient) DeleteOneID(id int) *StatustDeleteOne {\n\tbuilder := c.Delete().Where(statust.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &StatustDeleteOne{builder}\n}",
"func (c *PartorderClient) DeleteOne(pa *Partorder) *PartorderDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *StaytypeClient) DeleteOneID(id int) *StaytypeDeleteOne {\n\tbuilder := c.Delete().Where(staytype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &StaytypeDeleteOne{builder}\n}",
"func (c *PatientofphysicianClient) DeleteOneID(id int) *PatientofphysicianDeleteOne {\n\tbuilder := c.Delete().Where(patientofphysician.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PatientofphysicianDeleteOne{builder}\n}",
"func (c *BranchClient) DeleteOne(b *Branch) *BranchDeleteOne {\n\treturn c.DeleteOneID(b.ID)\n}",
"func (c *RoomdetailClient) DeleteOne(r *Roomdetail) *RoomdetailDeleteOne {\n\treturn c.DeleteOneID(r.ID)\n}",
"func (c *UnitOfMedicineClient) DeleteOneID(id int) *UnitOfMedicineDeleteOne {\n\tbuilder := c.Delete().Where(unitofmedicine.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &UnitOfMedicineDeleteOne{builder}\n}",
"func (c *TitleClient) DeleteOne(t *Title) *TitleDeleteOne {\n\treturn c.DeleteOneID(t.ID)\n}",
"func (c *WorkExperienceClient) DeleteOne(we *WorkExperience) *WorkExperienceDeleteOne {\n\treturn c.DeleteOneID(we.ID)\n}",
"func (c *AnnotationClient) DeleteOne(a *Annotation) *AnnotationDeleteOne {\n\treturn c.DeleteOneID(a.ID)\n}",
"func (c *DispenseMedicineClient) DeleteOneID(id int) *DispenseMedicineDeleteOne {\n\tbuilder := c.Delete().Where(dispensemedicine.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DispenseMedicineDeleteOne{builder}\n}",
"func (c *DepositClient) DeleteOneID(id int) *DepositDeleteOne {\n\tbuilder := c.Delete().Where(deposit.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DepositDeleteOne{builder}\n}",
"func (c *PharmacistClient) DeleteOneID(id int) *PharmacistDeleteOne {\n\tbuilder := c.Delete().Where(pharmacist.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PharmacistDeleteOne{builder}\n}",
"func (c *PositionassingmentClient) DeleteOne(po *Positionassingment) *PositionassingmentDeleteOne {\n\treturn c.DeleteOneID(po.ID)\n}",
"func (c *KeyStoreClient) DeleteOneID(id int32) *KeyStoreDeleteOne {\n\tbuilder := c.Delete().Where(keystore.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &KeyStoreDeleteOne{builder}\n}",
"func (c *PaymentClient) DeleteOneID(id int) *PaymentDeleteOne {\n\tbuilder := c.Delete().Where(payment.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PaymentDeleteOne{builder}\n}"
] |
[
"0.6756533",
"0.6710113",
"0.6703714",
"0.6703514",
"0.66556436",
"0.6615449",
"0.6572545",
"0.6558598",
"0.6553003",
"0.65242237",
"0.6506789",
"0.650082",
"0.64343107",
"0.6432041",
"0.6427475",
"0.64208084",
"0.63984746",
"0.63851905",
"0.6372787",
"0.6365922",
"0.6365412",
"0.6365412",
"0.6365412",
"0.6362836",
"0.6357466",
"0.6357466",
"0.6354213",
"0.6339892",
"0.63359505",
"0.6329707",
"0.6322332",
"0.6317853",
"0.6304687",
"0.62979144",
"0.62874234",
"0.62874234",
"0.6280046",
"0.627565",
"0.6270501",
"0.6269205",
"0.6269205",
"0.6269205",
"0.62634635",
"0.62634635",
"0.6262298",
"0.6250282",
"0.62493473",
"0.62487674",
"0.62357104",
"0.62334096",
"0.622705",
"0.62261426",
"0.6222367",
"0.6214015",
"0.6211911",
"0.62046635",
"0.6197203",
"0.6188878",
"0.61871135",
"0.6182599",
"0.6175533",
"0.61739093",
"0.61600137",
"0.61593497",
"0.61535835",
"0.6150276",
"0.61464787",
"0.6137366",
"0.6137138",
"0.6135646",
"0.6117473",
"0.6116271",
"0.61120003",
"0.6109717",
"0.61030763",
"0.61014754",
"0.60961837",
"0.609481",
"0.609481",
"0.60942376",
"0.6092312",
"0.6089714",
"0.6089314",
"0.60816336",
"0.60797775",
"0.6077807",
"0.60726416",
"0.6067511",
"0.6065489",
"0.60648984",
"0.6063493",
"0.6056677",
"0.6055226",
"0.6046651",
"0.6040051",
"0.60372514",
"0.6024419",
"0.60225457",
"0.60206443",
"0.6016589"
] |
0.6039176
|
95
|
DeleteOneID returns a delete builder for the given id.
|
func (c *UnsavedPostImageClient) DeleteOneID(id int) *UnsavedPostImageDeleteOne {
builder := c.Delete().Where(unsavedpostimage.ID(id))
builder.mutation.id = &id
builder.mutation.op = OpDeleteOne
return &UnsavedPostImageDeleteOne{builder}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *BedtypeClient) DeleteOneID(id int) *BedtypeDeleteOne {\n\tbuilder := c.Delete().Where(bedtype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BedtypeDeleteOne{builder}\n}",
"func (c *BuildingClient) DeleteOneID(id int) *BuildingDeleteOne {\n\tbuilder := c.Delete().Where(building.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BuildingDeleteOne{builder}\n}",
"func (c *LengthtimeClient) DeleteOneID(id int) *LengthtimeDeleteOne {\n\tbuilder := c.Delete().Where(lengthtime.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &LengthtimeDeleteOne{builder}\n}",
"func (c *CleanernameClient) DeleteOneID(id int) *CleanernameDeleteOne {\n\tbuilder := c.Delete().Where(cleanername.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &CleanernameDeleteOne{builder}\n}",
"func (c *ToolClient) DeleteOneID(id int) *ToolDeleteOne {\n\tbuilder := c.Delete().Where(tool.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ToolDeleteOne{builder}\n}",
"func (c *OperativeClient) DeleteOneID(id int) *OperativeDeleteOne {\n\tbuilder := c.Delete().Where(operative.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OperativeDeleteOne{builder}\n}",
"func (c *FoodmenuClient) DeleteOneID(id int) *FoodmenuDeleteOne {\n\tbuilder := c.Delete().Where(foodmenu.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &FoodmenuDeleteOne{builder}\n}",
"func (c *CleaningroomClient) DeleteOneID(id int) *CleaningroomDeleteOne {\n\tbuilder := c.Delete().Where(cleaningroom.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &CleaningroomDeleteOne{builder}\n}",
"func (c *DoctorClient) DeleteOneID(id int) *DoctorDeleteOne {\n\tbuilder := c.Delete().Where(doctor.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DoctorDeleteOne{builder}\n}",
"func (c *MealplanClient) DeleteOneID(id int) *MealplanDeleteOne {\n\tbuilder := c.Delete().Where(mealplan.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &MealplanDeleteOne{builder}\n}",
"func (c *DentistClient) DeleteOneID(id int) *DentistDeleteOne {\n\tbuilder := c.Delete().Where(dentist.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DentistDeleteOne{builder}\n}",
"func (c *OperativerecordClient) DeleteOneID(id int) *OperativerecordDeleteOne {\n\tbuilder := c.Delete().Where(operativerecord.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OperativerecordDeleteOne{builder}\n}",
"func (c *LevelOfDangerousClient) DeleteOneID(id int) *LevelOfDangerousDeleteOne {\n\tbuilder := c.Delete().Where(levelofdangerous.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &LevelOfDangerousDeleteOne{builder}\n}",
"func (c *PhysicianClient) DeleteOneID(id int) *PhysicianDeleteOne {\n\tbuilder := c.Delete().Where(physician.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PhysicianDeleteOne{builder}\n}",
"func (c *PhysicianClient) DeleteOneID(id int) *PhysicianDeleteOne {\n\tbuilder := c.Delete().Where(physician.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PhysicianDeleteOne{builder}\n}",
"func (c *BillClient) DeleteOneID(id int) *BillDeleteOne {\n\tbuilder := c.Delete().Where(bill.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BillDeleteOne{builder}\n}",
"func (c *BillClient) DeleteOneID(id int) *BillDeleteOne {\n\tbuilder := c.Delete().Where(bill.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BillDeleteOne{builder}\n}",
"func (c *BillClient) DeleteOneID(id int) *BillDeleteOne {\n\tbuilder := c.Delete().Where(bill.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BillDeleteOne{builder}\n}",
"func (c *DeviceClient) DeleteOneID(id int) *DeviceDeleteOne {\n\tbuilder := c.Delete().Where(device.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DeviceDeleteOne{builder}\n}",
"func (c *UnitOfMedicineClient) DeleteOneID(id int) *UnitOfMedicineDeleteOne {\n\tbuilder := c.Delete().Where(unitofmedicine.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &UnitOfMedicineDeleteOne{builder}\n}",
"func (c *AdminClient) DeleteOneID(id int) *AdminDeleteOne {\n\tbuilder := c.Delete().Where(admin.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &AdminDeleteOne{builder}\n}",
"func (c *DrugAllergyClient) DeleteOneID(id int) *DrugAllergyDeleteOne {\n\tbuilder := c.Delete().Where(drugallergy.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DrugAllergyDeleteOne{builder}\n}",
"func (c *RoomuseClient) DeleteOneID(id int) *RoomuseDeleteOne {\n\tbuilder := c.Delete().Where(roomuse.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &RoomuseDeleteOne{builder}\n}",
"func (c *PatientofphysicianClient) DeleteOneID(id int) *PatientofphysicianDeleteOne {\n\tbuilder := c.Delete().Where(patientofphysician.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PatientofphysicianDeleteOne{builder}\n}",
"func (c *OrderClient) DeleteOneID(id int) *OrderDeleteOne {\n\tbuilder := c.Delete().Where(order.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OrderDeleteOne{builder}\n}",
"func (c *MedicineClient) DeleteOneID(id int) *MedicineDeleteOne {\n\tbuilder := c.Delete().Where(medicine.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &MedicineDeleteOne{builder}\n}",
"func (c *EmptyClient) DeleteOneID(id int) *EmptyDeleteOne {\n\tbuilder := c.Delete().Where(empty.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &EmptyDeleteOne{builder}\n}",
"func (c *MedicineTypeClient) DeleteOneID(id int) *MedicineTypeDeleteOne {\n\tbuilder := c.Delete().Where(medicinetype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &MedicineTypeDeleteOne{builder}\n}",
"func (c *BeerClient) DeleteOneID(id int) *BeerDeleteOne {\n\tbuilder := c.Delete().Where(beer.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BeerDeleteOne{builder}\n}",
"func (c *RoomdetailClient) DeleteOneID(id int) *RoomdetailDeleteOne {\n\tbuilder := c.Delete().Where(roomdetail.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &RoomdetailDeleteOne{builder}\n}",
"func (c *StatustClient) DeleteOneID(id int) *StatustDeleteOne {\n\tbuilder := c.Delete().Where(statust.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &StatustDeleteOne{builder}\n}",
"func (c *BookingClient) DeleteOneID(id int) *BookingDeleteOne {\n\tbuilder := c.Delete().Where(booking.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BookingDeleteOne{builder}\n}",
"func (c *BinaryFileClient) DeleteOneID(id int) *BinaryFileDeleteOne {\n\tbuilder := c.Delete().Where(binaryfile.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BinaryFileDeleteOne{builder}\n}",
"func (c *PharmacistClient) DeleteOneID(id int) *PharmacistDeleteOne {\n\tbuilder := c.Delete().Where(pharmacist.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PharmacistDeleteOne{builder}\n}",
"func (c *KeyStoreClient) DeleteOneID(id int32) *KeyStoreDeleteOne {\n\tbuilder := c.Delete().Where(keystore.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &KeyStoreDeleteOne{builder}\n}",
"func (c *LeaseClient) DeleteOneID(id int) *LeaseDeleteOne {\n\tbuilder := c.Delete().Where(lease.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &LeaseDeleteOne{builder}\n}",
"func (c *PaymentClient) DeleteOneID(id int) *PaymentDeleteOne {\n\tbuilder := c.Delete().Where(payment.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PaymentDeleteOne{builder}\n}",
"func (c *PaymentClient) DeleteOneID(id int) *PaymentDeleteOne {\n\tbuilder := c.Delete().Where(payment.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PaymentDeleteOne{builder}\n}",
"func (c *DispenseMedicineClient) DeleteOneID(id int) *DispenseMedicineDeleteOne {\n\tbuilder := c.Delete().Where(dispensemedicine.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DispenseMedicineDeleteOne{builder}\n}",
"func (c *DepositClient) DeleteOneID(id int) *DepositDeleteOne {\n\tbuilder := c.Delete().Where(deposit.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DepositDeleteOne{builder}\n}",
"func (c *StaytypeClient) DeleteOneID(id int) *StaytypeDeleteOne {\n\tbuilder := c.Delete().Where(staytype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &StaytypeDeleteOne{builder}\n}",
"func (c *OperationroomClient) DeleteOneID(id int) *OperationroomDeleteOne {\n\tbuilder := c.Delete().Where(operationroom.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OperationroomDeleteOne{builder}\n}",
"func (c *NurseClient) DeleteOneID(id int) *NurseDeleteOne {\n\tbuilder := c.Delete().Where(nurse.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &NurseDeleteOne{builder}\n}",
"func (c *QueueClient) DeleteOneID(id int) *QueueDeleteOne {\n\tbuilder := c.Delete().Where(queue.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &QueueDeleteOne{builder}\n}",
"func (c *OperationClient) DeleteOneID(id uuid.UUID) *OperationDeleteOne {\n\tbuilder := c.Delete().Where(operation.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OperationDeleteOne{builder}\n}",
"func (c *PostClient) DeleteOneID(id int) *PostDeleteOne {\n\tbuilder := c.Delete().Where(post.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PostDeleteOne{builder}\n}",
"func (c *ComplaintClient) DeleteOneID(id int) *ComplaintDeleteOne {\n\tbuilder := c.Delete().Where(complaint.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ComplaintDeleteOne{builder}\n}",
"func (c *PatientroomClient) DeleteOneID(id int) *PatientroomDeleteOne {\n\tbuilder := c.Delete().Where(patientroom.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PatientroomDeleteOne{builder}\n}",
"func (c *ModuleClient) DeleteOneID(id int) *ModuleDeleteOne {\n\treturn &ModuleDeleteOne{c.Delete().Where(module.ID(id))}\n}",
"func (c *ComplaintTypeClient) DeleteOneID(id int) *ComplaintTypeDeleteOne {\n\tbuilder := c.Delete().Where(complainttype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ComplaintTypeDeleteOne{builder}\n}",
"func (c *PurposeClient) DeleteOneID(id int) *PurposeDeleteOne {\n\tbuilder := c.Delete().Where(purpose.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PurposeDeleteOne{builder}\n}",
"func (c *AdminSessionClient) DeleteOneID(id int) *AdminSessionDeleteOne {\n\tbuilder := c.Delete().Where(adminsession.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &AdminSessionDeleteOne{builder}\n}",
"func (c *DNSBLQueryClient) DeleteOneID(id uuid.UUID) *DNSBLQueryDeleteOne {\n\tbuilder := c.Delete().Where(dnsblquery.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DNSBLQueryDeleteOne{builder}\n}",
"func (c *StatusdClient) DeleteOneID(id int) *StatusdDeleteOne {\n\tbuilder := c.Delete().Where(statusd.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &StatusdDeleteOne{builder}\n}",
"func (c *PetruleClient) DeleteOneID(id int) *PetruleDeleteOne {\n\tbuilder := c.Delete().Where(petrule.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PetruleDeleteOne{builder}\n}",
"func (c *EventClient) DeleteOneID(id int) *EventDeleteOne {\n\tbuilder := c.Delete().Where(event.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &EventDeleteOne{builder}\n}",
"func (c *ClubapplicationClient) DeleteOneID(id int) *ClubapplicationDeleteOne {\n\tbuilder := c.Delete().Where(clubapplication.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ClubapplicationDeleteOne{builder}\n}",
"func (c *DisciplineClient) DeleteOneID(id int) *DisciplineDeleteOne {\n\tbuilder := c.Delete().Where(discipline.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DisciplineDeleteOne{builder}\n}",
"func (c *RoomClient) DeleteOneID(id int) *RoomDeleteOne {\n\tbuilder := c.Delete().Where(room.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &RoomDeleteOne{builder}\n}",
"func (c *RoomClient) DeleteOneID(id int) *RoomDeleteOne {\n\tbuilder := c.Delete().Where(room.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &RoomDeleteOne{builder}\n}",
"func (c *PledgeClient) DeleteOneID(id int) *PledgeDeleteOne {\n\tbuilder := c.Delete().Where(pledge.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PledgeDeleteOne{builder}\n}",
"func (c *CardClient) DeleteOneID(id int) *CardDeleteOne {\n\tbuilder := c.Delete().Where(card.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &CardDeleteOne{builder}\n}",
"func (c *BillingstatusClient) DeleteOneID(id int) *BillingstatusDeleteOne {\n\tbuilder := c.Delete().Where(billingstatus.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BillingstatusDeleteOne{builder}\n}",
"func (c *SymptomClient) DeleteOneID(id int) *SymptomDeleteOne {\n\tbuilder := c.Delete().Where(symptom.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &SymptomDeleteOne{builder}\n}",
"func (c *PatientClient) DeleteOneID(id int) *PatientDeleteOne {\n\tbuilder := c.Delete().Where(patient.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PatientDeleteOne{builder}\n}",
"func (c *PatientClient) DeleteOneID(id int) *PatientDeleteOne {\n\tbuilder := c.Delete().Where(patient.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PatientDeleteOne{builder}\n}",
"func (c *PatientClient) DeleteOneID(id int) *PatientDeleteOne {\n\tbuilder := c.Delete().Where(patient.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PatientDeleteOne{builder}\n}",
"func (c *TasteClient) DeleteOneID(id int) *TasteDeleteOne {\n\tbuilder := c.Delete().Where(taste.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &TasteDeleteOne{builder}\n}",
"func (c *UnsavedPostClient) DeleteOneID(id int) *UnsavedPostDeleteOne {\n\tbuilder := c.Delete().Where(unsavedpost.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &UnsavedPostDeleteOne{builder}\n}",
"func (c *JobClient) DeleteOneID(id int) *JobDeleteOne {\n\tbuilder := c.Delete().Where(job.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &JobDeleteOne{builder}\n}",
"func (c *ExaminationroomClient) DeleteOneID(id int) *ExaminationroomDeleteOne {\n\tbuilder := c.Delete().Where(examinationroom.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ExaminationroomDeleteOne{builder}\n}",
"func (c *PlanetClient) DeleteOneID(id int) *PlanetDeleteOne {\n\tbuilder := c.Delete().Where(planet.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PlanetDeleteOne{builder}\n}",
"func (c *PrescriptionClient) DeleteOneID(id int) *PrescriptionDeleteOne {\n\tbuilder := c.Delete().Where(prescription.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PrescriptionDeleteOne{builder}\n}",
"func (c *TransactionClient) DeleteOneID(id int32) *TransactionDeleteOne {\n\tbuilder := c.Delete().Where(transaction.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &TransactionDeleteOne{builder}\n}",
"func (c *SessionClient) DeleteOneID(id int) *SessionDeleteOne {\n\tbuilder := c.Delete().Where(session.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &SessionDeleteOne{builder}\n}",
"func (c *TitleClient) DeleteOneID(id int) *TitleDeleteOne {\n\tbuilder := c.Delete().Where(title.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &TitleDeleteOne{builder}\n}",
"func (c *PatientInfoClient) DeleteOneID(id int) *PatientInfoDeleteOne {\n\tbuilder := c.Delete().Where(patientinfo.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PatientInfoDeleteOne{builder}\n}",
"func (c *EatinghistoryClient) DeleteOneID(id int) *EatinghistoryDeleteOne {\n\tbuilder := c.Delete().Where(eatinghistory.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &EatinghistoryDeleteOne{builder}\n}",
"func (c *WifiClient) DeleteOneID(id int) *WifiDeleteOne {\n\tbuilder := c.Delete().Where(wifi.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &WifiDeleteOne{builder}\n}",
"func (c *FacultyClient) DeleteOneID(id int) *FacultyDeleteOne {\n\tbuilder := c.Delete().Where(faculty.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &FacultyDeleteOne{builder}\n}",
"func (c *WalletNodeClient) DeleteOneID(id int32) *WalletNodeDeleteOne {\n\tbuilder := c.Delete().Where(walletnode.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &WalletNodeDeleteOne{builder}\n}",
"func (c *ClubTypeClient) DeleteOneID(id int) *ClubTypeDeleteOne {\n\tbuilder := c.Delete().Where(clubtype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ClubTypeDeleteOne{builder}\n}",
"func (c *AppointmentClient) DeleteOneID(id uuid.UUID) *AppointmentDeleteOne {\n\tbuilder := c.Delete().Where(appointment.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &AppointmentDeleteOne{builder}\n}",
"func (c *PartorderClient) DeleteOneID(id int) *PartorderDeleteOne {\n\tbuilder := c.Delete().Where(partorder.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PartorderDeleteOne{builder}\n}",
"func (c *ClubClient) DeleteOneID(id int) *ClubDeleteOne {\n\tbuilder := c.Delete().Where(club.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ClubDeleteOne{builder}\n}",
"func (c *CoinInfoClient) DeleteOneID(id int32) *CoinInfoDeleteOne {\n\tbuilder := c.Delete().Where(coininfo.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &CoinInfoDeleteOne{builder}\n}",
"func (c *ClinicClient) DeleteOneID(id uuid.UUID) *ClinicDeleteOne {\n\tbuilder := c.Delete().Where(clinic.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ClinicDeleteOne{builder}\n}",
"func (c *TimerClient) DeleteOneID(id int) *TimerDeleteOne {\n\tbuilder := c.Delete().Where(timer.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &TimerDeleteOne{builder}\n}",
"func (c *ClubappStatusClient) DeleteOneID(id int) *ClubappStatusDeleteOne {\n\tbuilder := c.Delete().Where(clubappstatus.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ClubappStatusDeleteOne{builder}\n}",
"func (c *ActivityTypeClient) DeleteOneID(id int) *ActivityTypeDeleteOne {\n\tbuilder := c.Delete().Where(activitytype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ActivityTypeDeleteOne{builder}\n}",
"func (c *ModuleVersionClient) DeleteOneID(id int) *ModuleVersionDeleteOne {\n\treturn &ModuleVersionDeleteOne{c.Delete().Where(moduleversion.ID(id))}\n}",
"func (c *ActivitiesClient) DeleteOneID(id int) *ActivitiesDeleteOne {\n\tbuilder := c.Delete().Where(activities.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ActivitiesDeleteOne{builder}\n}",
"func (c *UsertypeClient) DeleteOneID(id int) *UsertypeDeleteOne {\n\tbuilder := c.Delete().Where(usertype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &UsertypeDeleteOne{builder}\n}",
"func (c *SituationClient) DeleteOneID(id int) *SituationDeleteOne {\n\tbuilder := c.Delete().Where(situation.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &SituationDeleteOne{builder}\n}",
"func (c *SkillClient) DeleteOneID(id int) *SkillDeleteOne {\n\tbuilder := c.Delete().Where(skill.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &SkillDeleteOne{builder}\n}",
"func (c *RentalstatusClient) DeleteOneID(id int) *RentalstatusDeleteOne {\n\tbuilder := c.Delete().Where(rentalstatus.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &RentalstatusDeleteOne{builder}\n}",
"func (c *BranchClient) DeleteOneID(id int) *BranchDeleteOne {\n\tbuilder := c.Delete().Where(branch.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BranchDeleteOne{builder}\n}",
"func (c *YearClient) DeleteOneID(id int) *YearDeleteOne {\n\tbuilder := c.Delete().Where(year.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &YearDeleteOne{builder}\n}",
"func (c *PartClient) DeleteOneID(id int) *PartDeleteOne {\n\tbuilder := c.Delete().Where(part.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PartDeleteOne{builder}\n}",
"func (c *TagClient) DeleteOneID(id int) *TagDeleteOne {\n\tbuilder := c.Delete().Where(tag.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &TagDeleteOne{builder}\n}",
"func (c *RepairinvoiceClient) DeleteOneID(id int) *RepairinvoiceDeleteOne {\n\tbuilder := c.Delete().Where(repairinvoice.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &RepairinvoiceDeleteOne{builder}\n}"
] |
[
"0.7677628",
"0.7597514",
"0.75511837",
"0.75414574",
"0.753929",
"0.7526108",
"0.7488258",
"0.7488204",
"0.7477027",
"0.74767286",
"0.74630946",
"0.7460312",
"0.7457488",
"0.74510956",
"0.74510956",
"0.744312",
"0.744312",
"0.744312",
"0.7433706",
"0.74256665",
"0.74229586",
"0.7419672",
"0.7418211",
"0.73994976",
"0.73966765",
"0.7385802",
"0.73841417",
"0.7375285",
"0.7357963",
"0.7356968",
"0.7349953",
"0.73468995",
"0.73460907",
"0.7345575",
"0.7342969",
"0.7341592",
"0.7339636",
"0.7339636",
"0.73326063",
"0.7330227",
"0.73288083",
"0.7325721",
"0.73230994",
"0.73135287",
"0.7307388",
"0.73040813",
"0.72890884",
"0.7282683",
"0.72802186",
"0.7279039",
"0.7278933",
"0.7277961",
"0.7277946",
"0.727708",
"0.7275958",
"0.72695947",
"0.7263833",
"0.7251049",
"0.72386605",
"0.72386605",
"0.7237515",
"0.72372603",
"0.72334313",
"0.72292984",
"0.72287786",
"0.72287786",
"0.72287786",
"0.72250265",
"0.7222527",
"0.72211695",
"0.7215218",
"0.72053075",
"0.72038317",
"0.72032344",
"0.7194723",
"0.7193388",
"0.7190754",
"0.71899164",
"0.71657026",
"0.7165183",
"0.7161229",
"0.716085",
"0.7160569",
"0.71558356",
"0.71476567",
"0.71447355",
"0.71437144",
"0.71383077",
"0.71312475",
"0.71267104",
"0.71251273",
"0.71228707",
"0.7122784",
"0.710945",
"0.7108942",
"0.71068424",
"0.7105613",
"0.71041524",
"0.7101552",
"0.7095063",
"0.7091202"
] |
0.0
|
-1
|
Query returns a query builder for UnsavedPostImage.
|
func (c *UnsavedPostImageClient) Query() *UnsavedPostImageQuery {
return &UnsavedPostImageQuery{
config: c.config,
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *UnsavedPostImageClient) QueryUnsavedPost(upi *UnsavedPostImage) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upi.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostimage.Table, unsavedpostimage.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostimage.UnsavedPostTable, unsavedpostimage.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upi.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostThumbnailClient) QueryUnsavedPost(upt *UnsavedPostThumbnail) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upt.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, true, unsavedpostthumbnail.UnsavedPostTable, unsavedpostthumbnail.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upt.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) QueryImages() *UnsavedPostImageQuery {\n\tquery := &UnsavedPostImageQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostimage.Table, unsavedpostimage.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.ImagesTable, unsavedpost.ImagesColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostAttachmentClient) Query() *UnsavedPostAttachmentQuery {\n\treturn &UnsavedPostAttachmentQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *UnsavedPostClient) QueryImages(up *UnsavedPost) *UnsavedPostImageQuery {\n\tquery := &UnsavedPostImageQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostimage.Table, unsavedpostimage.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.ImagesTable, unsavedpost.ImagesColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostAttachmentClient) QueryUnsavedPost(upa *UnsavedPostAttachment) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upa.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostattachment.Table, unsavedpostattachment.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostattachment.UnsavedPostTable, unsavedpostattachment.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upa.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostThumbnailClient) Query() *UnsavedPostThumbnailQuery {\n\treturn &UnsavedPostThumbnailQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *AdminClient) QueryUnsavedPosts(a *Admin) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := a.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(admin.Table, admin.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, admin.UnsavedPostsTable, admin.UnsavedPostsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(a.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostVideoClient) QueryUnsavedPost(upv *UnsavedPostVideo) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upv.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostvideo.Table, unsavedpostvideo.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostvideo.UnsavedPostTable, unsavedpostvideo.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upv.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostClient) Query() *UnsavedPostQuery {\n\treturn &UnsavedPostQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *CategoryClient) QueryUnsavedPosts(ca *Category) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := ca.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(category.Table, category.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, category.UnsavedPostsTable, category.UnsavedPostsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(ca.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) Clone() *UnsavedPostQuery {\n\tif upq == nil {\n\t\treturn nil\n\t}\n\treturn &UnsavedPostQuery{\n\t\tconfig: upq.config,\n\t\tlimit: upq.limit,\n\t\toffset: upq.offset,\n\t\torder: append([]OrderFunc{}, upq.order...),\n\t\tpredicates: append([]predicate.UnsavedPost{}, upq.predicates...),\n\t\twithAuthor: upq.withAuthor.Clone(),\n\t\twithCategory: upq.withCategory.Clone(),\n\t\twithThumbnail: upq.withThumbnail.Clone(),\n\t\twithImages: upq.withImages.Clone(),\n\t\twithVideos: upq.withVideos.Clone(),\n\t\twithAttachments: upq.withAttachments.Clone(),\n\t\t// clone intermediate query.\n\t\tsql: upq.sql.Clone(),\n\t\tpath: upq.path,\n\t}\n}",
"func (c *UnsavedPostImageClient) Get(ctx context.Context, id int) (*UnsavedPostImage, error) {\n\treturn c.Query().Where(unsavedpostimage.ID(id)).Only(ctx)\n}",
"func (c *Category) QueryUnsavedPosts() *UnsavedPostQuery {\n\treturn (&CategoryClient{config: c.config}).QueryUnsavedPosts(c)\n}",
"func (upq *UnsavedPostQuery) WithImages(opts ...func(*UnsavedPostImageQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostImageQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withImages = query\n\treturn upq\n}",
"func (c *PostImageClient) Query() *PostImageQuery {\n\treturn &PostImageQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (upq *UnsavedPostQuery) QueryAttachments() *UnsavedPostAttachmentQuery {\n\tquery := &UnsavedPostAttachmentQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostattachment.Table, unsavedpostattachment.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.AttachmentsTable, unsavedpost.AttachmentsColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostClient) QueryAttachments(up *UnsavedPost) *UnsavedPostAttachmentQuery {\n\tquery := &UnsavedPostAttachmentQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostattachment.Table, unsavedpostattachment.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.AttachmentsTable, unsavedpost.AttachmentsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *PostClient) QueryImages(po *Post) *PostImageQuery {\n\tquery := &PostImageQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := po.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(post.Table, post.FieldID, id),\n\t\t\tsqlgraph.To(postimage.Table, postimage.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, post.ImagesTable, post.ImagesColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(po.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upu *UnsavedPostUpdate) ClearImages() *UnsavedPostUpdate {\n\tupu.mutation.ClearImages()\n\treturn upu\n}",
"func (upq *UnsavedPostQuery) QueryThumbnail() *UnsavedPostThumbnailQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, unsavedpost.ThumbnailTable, unsavedpost.ThumbnailColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (c *PostImageClient) QueryPost(pi *PostImage) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pi.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postimage.Table, postimage.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, postimage.PostTable, postimage.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pi.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) All(ctx context.Context) ([]*UnsavedPost, error) {\n\tif err := upq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn upq.sqlAll(ctx)\n}",
"func (c *UnsavedPostClient) QueryThumbnail(up *UnsavedPost) *UnsavedPostThumbnailQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, unsavedpost.ThumbnailTable, unsavedpost.ThumbnailColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *PostAttachmentClient) Query() *PostAttachmentQuery {\n\treturn &PostAttachmentQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (upuo *UnsavedPostUpdateOne) ClearImages() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearImages()\n\treturn upuo\n}",
"func (c *UnsavedPostVideoClient) Query() *UnsavedPostVideoQuery {\n\treturn &UnsavedPostVideoQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (upq *UnsavedPostQuery) Where(ps ...predicate.UnsavedPost) *UnsavedPostQuery {\n\tupq.predicates = append(upq.predicates, ps...)\n\treturn upq\n}",
"func (c *UnsavedPostThumbnailClient) Get(ctx context.Context, id int) (*UnsavedPostThumbnail, error) {\n\treturn c.Query().Where(unsavedpostthumbnail.ID(id)).Only(ctx)\n}",
"func NewUnsavedPostImageClient(c config) *UnsavedPostImageClient {\n\treturn &UnsavedPostImageClient{config: c}\n}",
"func (c *PostThumbnailClient) QueryPost(pt *PostThumbnail) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pt.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postthumbnail.Table, postthumbnail.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, true, postthumbnail.PostTable, postthumbnail.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pt.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) WithAttachments(opts ...func(*UnsavedPostAttachmentQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostAttachmentQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withAttachments = query\n\treturn upq\n}",
"func (c *PostThumbnailClient) Query() *PostThumbnailQuery {\n\treturn &PostThumbnailQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *PostAttachmentClient) QueryPost(pa *PostAttachment) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pa.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postattachment.Table, postattachment.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, postattachment.PostTable, postattachment.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pa.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (t *Transaction) QueryImages() *BinaryItemQuery {\n\treturn (&TransactionClient{config: t.config}).QueryImages(t)\n}",
"func (c *UnsavedPostAttachmentClient) Get(ctx context.Context, id int) (*UnsavedPostAttachment, error) {\n\treturn c.Query().Where(unsavedpostattachment.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostClient) Get(ctx context.Context, id int) (*UnsavedPost, error) {\n\treturn c.Query().Where(unsavedpost.ID(id)).Only(ctx)\n}",
"func (pid *PostImageDelete) Where(ps ...predicate.PostImage) *PostImageDelete {\n\tpid.mutation.predicates = append(pid.mutation.predicates, ps...)\n\treturn pid\n}",
"func (p *_Posts) Query(db database.DB, models ...*Post) *postsQueryBuilder {\n\tvar queryModels []mapping.Model\n\tif len(models) > 0 {\n\t\tqueryModels = make([]mapping.Model, len(models))\n\t\tfor i, model := range models {\n\t\t\tqueryModels[i] = model\n\t\t}\n\t}\n\tbuilder := db.Query(p.Model, queryModels...)\n\treturn &postsQueryBuilder{builder: builder}\n}",
"func (r *PostReprGQL) IMG(ctx context.Context) *ImageReprGQL {\n\treturn &ImageReprGQL{}\n}",
"func NewSearchLogQueryUnprocessableEntity() *SearchLogQueryUnprocessableEntity {\n\treturn &SearchLogQueryUnprocessableEntity{}\n}",
"func (c *PostClient) QueryAttachments(po *Post) *PostAttachmentQuery {\n\tquery := &PostAttachmentQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := po.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(post.Table, post.FieldID, id),\n\t\t\tsqlgraph.To(postattachment.Table, postattachment.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, post.AttachmentsTable, post.AttachmentsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(po.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *PostClient) QueryThumbnail(po *Post) *PostThumbnailQuery {\n\tquery := &PostThumbnailQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := po.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(post.Table, post.FieldID, id),\n\t\t\tsqlgraph.To(postthumbnail.Table, postthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, post.ThumbnailTable, post.ThumbnailColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(po.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (query *Query) CleanQuery() *Query {\n\tquery.content = make(map[string]interface{})\n\treturn query\n}",
"func (c *UnsavedPostImageClient) Delete() *UnsavedPostImageDelete {\n\tmutation := newUnsavedPostImageMutation(c.config, OpDelete)\n\treturn &UnsavedPostImageDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upq *UnsavedPostQuery) WithThumbnail(opts ...func(*UnsavedPostThumbnailQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withThumbnail = query\n\treturn upq\n}",
"func (upu *UnsavedPostUpdate) Where(ps ...predicate.UnsavedPost) *UnsavedPostUpdate {\n\tupu.mutation.predicates = append(upu.mutation.predicates, ps...)\n\treturn upu\n}",
"func (c *PostImageClient) Get(ctx context.Context, id int) (*PostImage, error) {\n\treturn c.Query().Where(postimage.ID(id)).Only(ctx)\n}",
"func (d UserData) UnsetImage() m.UserData {\n\td.ModelData.Unset(models.NewFieldName(\"Image\", \"image\"))\n\treturn d\n}",
"func (builder *QueryBuilder[K, F]) Query() Query[K, F] {\n\tif len(builder.query.Conditions) == 0 {\n\t\tbuilder.Where(defaultFilter[K, F]{})\n\t}\n\tif len(builder.query.Aggregators) == 0 {\n\t\tbuilder.Aggregate(defaultAggregator[K, F]{})\n\t}\n\tbuilder.query.results = &Result[K, F]{\n\t\tentries: make(map[ResultKey]*ResultEntry[K, F]),\n\t}\n\treturn builder.query\n}",
"func (c *PostVideoClient) QueryPost(pv *PostVideo) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pv.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postvideo.Table, postvideo.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, postvideo.PostTable, postvideo.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pv.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func QueryImage(filename string) []string {\n\tres, err := db.Query(\"SELECT DISTINCT labels.description FROM labels, imagelabels where imagelabels.mid = labels.mid and imagelabels.filename = ?\", filename)\n\tdefer res.Close()\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\treturn getFilenamesFromRes(res)\n}",
"func (upu *UnsavedPostUpdate) ClearAttachments() *UnsavedPostUpdate {\n\tupu.mutation.ClearAttachments()\n\treturn upu\n}",
"func (c *UnsavedPostImageClient) Update() *UnsavedPostImageUpdate {\n\tmutation := newUnsavedPostImageMutation(c.config, OpUpdate)\n\treturn &UnsavedPostImageUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upq *UnsavedPostQuery) Count(ctx context.Context) (int, error) {\n\tif err := upq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn upq.sqlCount(ctx)\n}",
"func NewGraphqlPostUnprocessableEntity() *GraphqlPostUnprocessableEntity {\n\n\treturn &GraphqlPostUnprocessableEntity{}\n}",
"func (q pictureQuery) DeleteAll() error {\n\tif q.Query == nil {\n\t\treturn errors.New(\"models: no pictureQuery provided for delete all\")\n\t}\n\n\tqueries.SetDelete(q.Query)\n\n\t_, err := q.Query.Exec()\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"models: unable to delete all from pictures\")\n\t}\n\n\treturn nil\n}",
"func (c *PostClient) Query() *PostQuery {\n\treturn &PostQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (p *postsQueryBuilder) Err() error {\n\tif p.err != nil {\n\t\treturn p.err\n\t}\n\treturn p.builder.Err()\n}",
"func (r *Restaurant) QueryImages() *ImagePathQuery {\n\treturn (&RestaurantClient{config: r.config}).QueryImages(r)\n}",
"func (b Build) Query(c *gin.Context) *gorm.DB {\n\tuser := middleware.GetUser(c)\n\tjoined := db.Joins(\"join projects on projects.id = builds.project_id\").\n\t\tWhere(\"projects.user_id=?\", user.ID)\n\treturn b.Preload(joined)\n}",
"func (upq *UnsavedPostQuery) Unique(unique bool) *UnsavedPostQuery {\n\tupq.unique = &unique\n\treturn upq\n}",
"func (c *CRImage) Querylog(imageid int64) *CRImage {\n\tobj, err := dbmap.Get(CRImage{}, imageid)\n\tif err != nil {\n\t\tlog.Fatalln(\"Select log failed\", err)\n\t}\n\tc = obj.(*CRImage)\n\treturn obj.(*CRImage)\n}",
"func (g *BaseGenerator) GenerateEmptyQuery() query.Query {\n\treturn query.NewMysqlRequest()\n}",
"func (repository *GormRepository) GetAllUnscoped(uow *UnitOfWork, out interface{}, queryProcessors []QueryProcessor) microappError.DatabaseError {\n\tdb := uow.DB\n\n\tif queryProcessors != nil {\n\t\tvar err error\n\t\tfor _, queryProcessor := range queryProcessors {\n\t\t\tdb, err = queryProcessor(db, out)\n\t\t\tif err != nil {\n\t\t\t\treturn microappError.NewDatabaseError(err)\n\t\t\t}\n\t\t}\n\t}\n\tif err := db.Unscoped().Find(out).Error; err != nil {\n\t\treturn microappError.NewDatabaseError(err)\n\t}\n\treturn nil\n}",
"func (p *postsQueryBuilder) Filter(filter filter.Filter) *postsQueryBuilder {\n\tif p.err != nil {\n\t\treturn p\n\t}\n\tp.builder.Filter(filter)\n\treturn p\n}",
"func (t BlobsTable) Query() *BlobQuery {\n\treturn &BlobQuery{driver: t.driver}\n}",
"func (mq *MediaQuery) Clone() *MediaQuery {\n\tif mq == nil {\n\t\treturn nil\n\t}\n\treturn &MediaQuery{\n\t\tconfig: mq.config,\n\t\tctx: mq.ctx.Clone(),\n\t\torder: append([]OrderFunc{}, mq.order...),\n\t\tinters: append([]Interceptor{}, mq.inters...),\n\t\tpredicates: append([]predicate.Media{}, mq.predicates...),\n\t\t// clone intermediate query.\n\t\tsql: mq.sql.Clone(),\n\t\tpath: mq.path,\n\t}\n}",
"func (upuo *UnsavedPostUpdateOne) ClearAttachments() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearAttachments()\n\treturn upuo\n}",
"func NewKillQueryUnprocessableEntity() *KillQueryUnprocessableEntity {\n\treturn &KillQueryUnprocessableEntity{}\n}",
"func (q pictureQuery) All() (PictureSlice, error) {\n\tvar o []*Picture\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Picture slice\")\n\t}\n\n\tif len(pictureAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (c *AdminClient) QueryPosts(a *Admin) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := a.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(admin.Table, admin.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, admin.PostsTable, admin.PostsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(a.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (i InputInlineQueryResultPhoto) construct() InputInlineQueryResultClass { return &i }",
"func (c CRImage) QuerybyUser(uid int64) []CRImage {\n\tvar image []CRImage\n\t_, err := dbmap.Select(&image, \"select * from cr_image where User_id = ?\", uid)\n\tcheckErr(err, \"Select list failed\")\n\treturn image\n}",
"func (upq *UnsavedPostQuery) QueryAuthor() *AdminQuery {\n\tquery := &AdminQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(admin.Table, admin.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpost.AuthorTable, unsavedpost.AuthorColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func WhereDraft(q *query.Query) *query.Query {\n\treturn q.Where(\"status = ?\", Draft)\n}",
"func (o *Post) PostUploadFiles(mods ...qm.QueryMod) postUploadFileQuery {\n\tvar queryMods []qm.QueryMod\n\tif len(mods) != 0 {\n\t\tqueryMods = append(queryMods, mods...)\n\t}\n\n\tqueryMods = append(queryMods,\n\t\tqm.Where(\"\\\"post_upload_files\\\".\\\"post_id\\\"=?\", o.ID),\n\t)\n\n\tquery := PostUploadFiles(queryMods...)\n\tqueries.SetFrom(query.Query, \"\\\"post_upload_files\\\"\")\n\n\tif len(queries.GetSelect(query.Query)) == 0 {\n\t\tqueries.SetSelect(query.Query, []string{\"\\\"post_upload_files\\\".*\"})\n\t}\n\n\treturn query\n}",
"func (x UnavailableEntity) GetNRDBQuery() nrdb.NRDBResultContainer {\n\treturn x.NRDBQuery\n}",
"func Pictures(exec boil.Executor, mods ...qm.QueryMod) pictureQuery {\n\tmods = append(mods, qm.From(\"`pictures`\"))\n\treturn pictureQuery{NewQuery(exec, mods...)}\n}",
"func (upu *UnsavedPostUpdate) ClearThumbnail() *UnsavedPostUpdate {\n\tupu.mutation.ClearThumbnail()\n\treturn upu\n}",
"func PhotoNotIn(vs ...string) predicate.User {\n\tv := make([]interface{}, len(vs))\n\tfor i := range v {\n\t\tv[i] = vs[i]\n\t}\n\treturn predicate.User(func(s *sql.Selector) {\n\t\t// if not arguments were provided, append the FALSE constants,\n\t\t// since we can't apply \"IN ()\". This will make this predicate falsy.\n\t\tif len(v) == 0 {\n\t\t\ts.Where(sql.False())\n\t\t\treturn\n\t\t}\n\t\ts.Where(sql.NotIn(s.C(FieldPhoto), v...))\n\t})\n}",
"func (q pictureQuery) One() (*Picture, error) {\n\to := &Picture{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for pictures\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func PictureNEQ(v string) predicate.User {\n\treturn predicate.User(func(s *sql.Selector) {\n\t\ts.Where(sql.NEQ(s.C(FieldPicture), v))\n\t})\n}",
"func QueryForPictureByDate(begin time.Time, end time.Time, r *http.Request) ([]SpycamPicture, error) {\n ctx := appengine.NewContext(r)\n var pictures []SpycamPicture\n q := datastore.NewQuery(SpycamModelName).\n Filter(\"Timestamp <=\", end).\n Filter(\"Timestamp >=\", begin).\n Order(\"Timestamp\") // Order(\"-Timestamp\")\n _, err := q.GetAll(ctx, &pictures) // returns keys, and err.\n return pictures, err\n}",
"func (biq *BankItemQuery) Clone() *BankItemQuery {\n\treturn &BankItemQuery{\n\t\tconfig: biq.config,\n\t\tlimit: biq.limit,\n\t\toffset: biq.offset,\n\t\torder: append([]Order{}, biq.order...),\n\t\tunique: append([]string{}, biq.unique...),\n\t\tpredicates: append([]predicate.BankItem{}, biq.predicates...),\n\t\t// clone intermediate queries.\n\t\tsql: biq.sql.Clone(),\n\t}\n}",
"func (m *MenuMutation) ClearImages() {\n\tm.clearedimages = true\n}",
"func PictureNotIn(vs ...string) predicate.User {\n\tv := make([]interface{}, len(vs))\n\tfor i := range v {\n\t\tv[i] = vs[i]\n\t}\n\treturn predicate.User(func(s *sql.Selector) {\n\t\t// if not arguments were provided, append the FALSE constants,\n\t\t// since we can't apply \"IN ()\". This will make this predicate falsy.\n\t\tif len(v) == 0 {\n\t\t\ts.Where(sql.False())\n\t\t\treturn\n\t\t}\n\t\ts.Where(sql.NotIn(s.C(FieldPicture), v...))\n\t})\n}",
"func (upq *UnsavedPostQuery) QueryCategory() *CategoryQuery {\n\tquery := &CategoryQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(category.Table, category.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpost.CategoryTable, unsavedpost.CategoryColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (c *EmptyClient) Query() *EmptyQuery {\n\treturn &EmptyQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (upq *UnsavedPostQuery) AllX(ctx context.Context) []*UnsavedPost {\n\tnodes, err := upq.All(ctx)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn nodes\n}",
"func (q pictureQuery) DeleteAllP() {\n\tif err := q.DeleteAll(); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (b *_Blogs) Query(db database.DB, models ...*Blog) *blogsQueryBuilder {\n\tvar queryModels []mapping.Model\n\tif len(models) > 0 {\n\t\tqueryModels = make([]mapping.Model, len(models))\n\t\tfor i, model := range models {\n\t\t\tqueryModels[i] = model\n\t\t}\n\t}\n\tbuilder := db.Query(b.Model, queryModels...)\n\treturn &blogsQueryBuilder{builder: builder}\n}",
"func PictureIsNil() predicate.User {\n\treturn predicate.User(func(s *sql.Selector) {\n\t\ts.Where(sql.IsNull(s.C(FieldPicture)))\n\t})\n}",
"func (wq *WidgetQuery) Clone() *WidgetQuery {\n\tif wq == nil {\n\t\treturn nil\n\t}\n\treturn &WidgetQuery{\n\t\tconfig: wq.config,\n\t\tlimit: wq.limit,\n\t\toffset: wq.offset,\n\t\torder: append([]OrderFunc{}, wq.order...),\n\t\tpredicates: append([]predicate.Widget{}, wq.predicates...),\n\t\twithType: wq.withType.Clone(),\n\t\t// clone intermediate query.\n\t\tsql: wq.sql.Clone(),\n\t\tpath: wq.path,\n\t}\n}",
"func NewUnsavedPostAttachmentClient(c config) *UnsavedPostAttachmentClient {\n\treturn &UnsavedPostAttachmentClient{config: c}\n}",
"func (gq *GoodsQuery) Clone() *GoodsQuery {\n\tif gq == nil {\n\t\treturn nil\n\t}\n\treturn &GoodsQuery{\n\t\tconfig: gq.config,\n\t\tlimit: gq.limit,\n\t\toffset: gq.offset,\n\t\torder: append([]OrderFunc{}, gq.order...),\n\t\tunique: append([]string{}, gq.unique...),\n\t\tpredicates: append([]predicate.Goods{}, gq.predicates...),\n\t\t// clone intermediate query.\n\t\tgremlin: gq.gremlin.Clone(),\n\t\tpath: gq.path,\n\t}\n}",
"func (p *postsQueryBuilder) Refresh() error {\n\tif p.err != nil {\n\t\treturn p.err\n\t}\n\treturn p.builder.Refresh()\n}",
"func (bm *BingManager) queryNewImageUrl(query string) (string, error) {\n var Query *url.URL\n Query, err := url.Parse(\"https://api.datamarket.azure.com/Bing/Search/Image\")\n if err != nil {\n\t\treturn \"\", err\n }\n parameters := url.Values{}\n parameters.Add(\"ImageFilters\", \"'Aspect:Square'\")\n parameters.Add(\"$format\", \"json\")\n parameters.Add(\"Adult\", \"'Moderate'\")\n parameters.Add(\"$top\", \"1\")\n parameters.Add(\"Query\", fmt.Sprintf(\"'%s'\", query))\n \n Query.RawQuery = parameters.Encode()\n\n\n\treq, err := http.NewRequest(\"GET\", Query.String(), nil)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treq.SetBasicAuth(bm.AccountKey, bm.AccountKey)\n\n\tresp, err := bm.HTTPClient.Do(req)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tbody, err := ioutil.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n \n\tvar m struct {\n\t\tD struct {\n\t\t\tResults []struct {\n\t\t\t\tMediaUrl string `json:\"MediaUrl\"`\n Thumbnail struct {\n Url string `json:\"MediaUrl\"`\n } `json:\"Thumbnail\"`\n\t\t\t} `json:\"results\"`\n\t\t} `json:\"d\"`\n\t}\n\n\terr = json.Unmarshal(body, &m)\n\tif err != nil {\n\t\tfmt.Println(err)\n\t\treturn \"\", err\n\t}\n\treturn m.D.Results[0].Thumbnail.Url, err\n}",
"func (q pictureQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count pictures rows\")\n\t}\n\n\treturn count, nil\n}",
"func PhotoIsNil() predicate.User {\n\treturn predicate.User(func(s *sql.Selector) {\n\t\ts.Where(sql.IsNull(s.C(FieldPhoto)))\n\t})\n}"
] |
[
"0.74668384",
"0.7059989",
"0.70052344",
"0.69043076",
"0.68627226",
"0.6835493",
"0.6610944",
"0.6552651",
"0.64637816",
"0.63813895",
"0.62282056",
"0.62279075",
"0.61281425",
"0.6040343",
"0.58227",
"0.5810654",
"0.5793171",
"0.57741934",
"0.57167137",
"0.57128644",
"0.56374544",
"0.560582",
"0.56037426",
"0.5554658",
"0.5476017",
"0.5436383",
"0.5375585",
"0.52922237",
"0.52159846",
"0.5080291",
"0.50364333",
"0.50168747",
"0.5006832",
"0.49553037",
"0.49368304",
"0.4874389",
"0.48654264",
"0.48194936",
"0.47428578",
"0.47219887",
"0.4697063",
"0.46683076",
"0.4667799",
"0.46576995",
"0.46545726",
"0.4636737",
"0.46126983",
"0.4570251",
"0.45579165",
"0.45175683",
"0.45046628",
"0.45013744",
"0.44860518",
"0.44714752",
"0.44615373",
"0.4437012",
"0.4434337",
"0.4425573",
"0.44104978",
"0.44095656",
"0.43452513",
"0.43438333",
"0.43281412",
"0.43039355",
"0.43004608",
"0.42988086",
"0.42822918",
"0.42710406",
"0.4270031",
"0.42665792",
"0.426296",
"0.42482275",
"0.42114335",
"0.4210441",
"0.42021406",
"0.41983172",
"0.41900095",
"0.41872293",
"0.41861284",
"0.41639084",
"0.41282788",
"0.41234204",
"0.4121243",
"0.41205767",
"0.41092426",
"0.41045198",
"0.410423",
"0.409972",
"0.40965042",
"0.40824467",
"0.40774235",
"0.40711635",
"0.40705127",
"0.40628612",
"0.4059992",
"0.40567815",
"0.40459198",
"0.40399864",
"0.40394118",
"0.40351802"
] |
0.74853814
|
0
|
Get returns a UnsavedPostImage entity by its id.
|
func (c *UnsavedPostImageClient) Get(ctx context.Context, id int) (*UnsavedPostImage, error) {
return c.Query().Where(unsavedpostimage.ID(id)).Only(ctx)
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *UnsavedPostThumbnailClient) Get(ctx context.Context, id int) (*UnsavedPostThumbnail, error) {\n\treturn c.Query().Where(unsavedpostthumbnail.ID(id)).Only(ctx)\n}",
"func (c *PostImageClient) Get(ctx context.Context, id int) (*PostImage, error) {\n\treturn c.Query().Where(postimage.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostAttachmentClient) Get(ctx context.Context, id int) (*UnsavedPostAttachment, error) {\n\treturn c.Query().Where(unsavedpostattachment.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostClient) Get(ctx context.Context, id int) (*UnsavedPost, error) {\n\treturn c.Query().Where(unsavedpost.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostImageClient) GetX(ctx context.Context, id int) *UnsavedPostImage {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *UnsavedPostVideoClient) Get(ctx context.Context, id int) (*UnsavedPostVideo, error) {\n\treturn c.Query().Where(unsavedpostvideo.ID(id)).Only(ctx)\n}",
"func (c *PostThumbnailClient) Get(ctx context.Context, id int) (*PostThumbnail, error) {\n\treturn c.Query().Where(postthumbnail.ID(id)).Only(ctx)\n}",
"func GetImage(id uint, db *gorm.DB) *Image {\n\timage := new(Image)\n\tdb.Find(image, id)\n\tif image.ID == id {\n\t\treturn image\n\t}\n\treturn nil\n}",
"func GetPicture(id uint, db *gorm.DB) *Picture {\n\t//Preloaded needed to give us the image and its id\n\tpicture := new(Picture)\n\tdb.Find(picture, id)\n\tif picture.ImageID == id {\n\t\treturn picture\n\t}\n\treturn nil\n}",
"func (c *PostAttachmentClient) Get(ctx context.Context, id int) (*PostAttachment, error) {\n\treturn c.Query().Where(postattachment.ID(id)).Only(ctx)\n}",
"func (s *PicturesService) Get(ctx context.Context, id string) (*Picture, error) {\n\treq, err := s.client.NewGetRequest(fmt.Sprintf(\"%s/%s\", picturesPath, id))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tresp, err := s.client.Do(ctx, req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn nil, fmt.Errorf(\"status code not expected, got:%d\", resp.StatusCode)\n\t}\n\n\tpicture := &Picture{}\n\tif err := json.NewDecoder(resp.Body).Decode(picture); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn picture, nil\n}",
"func (c *UnsavedPostThumbnailClient) GetX(ctx context.Context, id int) *UnsavedPostThumbnail {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (pr *PhotosRepo) GetById(id int64) (entity.Photo, error) {\n\tvar imageUrl string\n\n\trow := pr.db.QueryRow(`SELECT image_url FROM photos WHERE id=?`, id)\n\tif err := row.Scan(&imageUrl); err != nil {\n\t\treturn entity.Photo{}, err\n\t}\n\n\treturn entity.Photo{\n\t\tId: id,\n\t\tUrl: imageUrl,\n\t}, nil\n}",
"func (s *Store) GetImage(id string) (io.Reader, error) {\n\t// We're going to be reading from our items slice - lock for reading.\n\ts.mutex.RLock()\n\n\t// Unlock once we're done.\n\tdefer s.mutex.RUnlock()\n\n\t// Return the image for the first item we find with a matching ID.\n\tfor i := range s.items {\n\t\tif s.items[i].id == id {\n\t\t\treturn bytes.NewReader(s.items[i].image), nil\n\t\t}\n\t}\n\n\treturn nil, moodboard.ErrNoSuchItem\n}",
"func (c *UnsavedPostAttachmentClient) GetX(ctx context.Context, id int) *UnsavedPostAttachment {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (r *REST) Get(ctx kapi.Context, id string) (runtime.Object, error) {\n\tname, tag, err := nameAndTag(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\trepo, err := r.imageRepositoryRegistry.GetImageRepository(ctx, name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tevent, err := api.LatestTaggedImage(repo, tag)\n\tif err != nil {\n\t\treturn nil, errors.NewNotFound(\"imageRepositoryTag\", tag)\n\t}\n\n\tif len(event.Image) != 0 {\n\t\timage, err := r.imageRegistry.GetImage(ctx, event.Image)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn api.ImageWithMetadata(*image)\n\t}\n\tif len(event.DockerImageReference) == 0 {\n\t\treturn nil, errors.NewNotFound(\"imageRepositoryTag\", tag)\n\t}\n\n\treturn &api.Image{\n\t\tObjectMeta: kapi.ObjectMeta{\n\t\t\tCreationTimestamp: event.Created,\n\t\t},\n\t\tDockerImageReference: event.DockerImageReference,\n\t}, nil\n}",
"func (c *PostImageClient) GetX(ctx context.Context, id int) *PostImage {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (client *Client) GetImage(id string) (*model.Image, error) {\n\treturn client.feclt.GetImage(id)\n}",
"func (c *PostClient) Get(ctx context.Context, id int) (*Post, error) {\n\treturn c.Query().Where(post.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostClient) GetX(ctx context.Context, id int) *UnsavedPost {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (s *AvatarsService) Get (ctx context.Context, entityType string, entityID string) (*Avatars, *http.Response, error) {\n\n\tendpoint := fmt.Sprintf(\"universal_avatar/type/%v/owner/%v\", entityType, entityID)\n\treq, err := s.client.NewRequest(\"GET\", endpoint, nil, nil)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tvar a *Avatars\n\tresp, err := s.client.Do(ctx, req, &a)\n\tif err != nil {\n\t\treturn nil, resp, err\n\t}\n\n\treturn a, resp, err\n}",
"func (in *Database) GetImage(id string) (*types.Image, error) {\n\ttxn := in.db.Txn(false)\n\tdefer txn.Abort()\n\tidx := \"id\"\n\tif stringid.IsShortID(id) {\n\t\tidx = \"shortid\"\n\t}\n\traw, err := txn.First(\"image\", idx, id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif raw == nil {\n\t\treturn nil, fmt.Errorf(\"image %s not found\", id)\n\t}\n\treturn raw.(*types.Image), nil\n}",
"func (client *Client) GetImage(id string) (*model.Image, error) {\n\treturn client.osclt.GetImage(id)\n}",
"func (s service) GetPost(id uint) (*Post, error) {\n\tp, err := (*s.repo).GetPost(id)\n\tif err != nil {\n\t\treturn nil, ErrPostNotFound\n\t}\n\n\treturn p, err\n}",
"func GetImage(c *gin.Context) {\n\tid := c.Params.ByName(\"id\")\n\tvar image []models.Image\n\tmodels.DB.First(&image, id)\n\tc.JSON(http.StatusOK, gin.H{\"data\": image})\n}",
"func (p *Pictures) GetPicture(id int) (string, error) {\n\tp.Logger.Debug().Msgf(\"Getting picture... forId: %v\", id)\n\n\tif len(p.Items) == 0 || p.IsExpired() {\n\t\tp.Update()\n\t\tif len(p.Items) == 0 {\n\t\t\tp.Logger.Error().Msg(\"No pictures after update()\")\n\t\t\treturn \"\", errors.New(\"Нет картинок почему то :/\")\n\t\t}\n\t}\n\n\tif urlHistory, ok := p.urlHistory[id]; ok {\n\t\tp.Logger.Debug().Msgf(\"Id: %v already stored\", id)\n\n\t\tfor _, pic := range p.Items {\n\t\t\tif contains(urlHistory, pic) {\n\t\t\t\tcontinue\n\t\t\t} else {\n\t\t\t\tp.urlHistory[id] = append(p.urlHistory[id], pic)\n\t\t\t\treturn pic, nil\n\t\t\t}\n\t\t}\n\n\t\tfor {\n\t\t\tnewPage := p.nextPage()\n\t\t\tfor _, pic := range newPage {\n\t\t\t\tif contains(urlHistory, pic) {\n\t\t\t\t\tcontinue\n\t\t\t\t} else {\n\t\t\t\t\tp.urlHistory[id] = append(p.urlHistory[id], pic)\n\t\t\t\t\treturn pic, nil\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tp.Logger.Debug().Msgf(\"Id: %v is new - store to history\", id)\n\tp.urlHistory[id] = append(p.urlHistory[id], p.Items[0])\n\treturn p.Items[0], nil\n}",
"func (c *UnsavedPostImageClient) QueryUnsavedPost(upi *UnsavedPostImage) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upi.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostimage.Table, unsavedpostimage.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostimage.UnsavedPostTable, unsavedpostimage.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upi.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (i *ImagesModel) GetImage(id string) (*images.SoftwareImage, error) {\n\n\timage, err := i.imagesStorage.FindByID(id)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Searching for image with specified ID\")\n\t}\n\n\tif image == nil {\n\t\treturn nil, nil\n\t}\n\n\treturn image, nil\n}",
"func (box *EntityBox) Get(id uint64) (*Entity, error) {\n\tobject, err := box.Box.Get(id)\n\tif err != nil {\n\t\treturn nil, err\n\t} else if object == nil {\n\t\treturn nil, nil\n\t}\n\treturn object.(*Entity), nil\n}",
"func GetImageByClothesId(c * gin.Context){\n\tdb := database.DBConn()\n\trows, err := db.Query(\"SELECT * FROM images where clothesId = \"+c.Param(\"id\"))\n\tif err != nil{\n\t\tc.JSON(500, gin.H{\n\t\t\t\"messages\" : \"Story not found\",\n\t\t});\n\t}\n\tpost := DTO.ImageDTO{}\n\tlist := [] DTO.ImageDTO{}\n\tfor rows.Next(){\n\t\tvar id, clothesId int\n\t\tvar link string\n\t\terr = rows.Scan(&id, &link, &clothesId)\n\t\tif err != nil {\n\t\t\tpanic(err.Error())\n\t\t}\n\t\tpost.Id = id\n\t\tpost.ClothesId = clothesId\n\t\tpost.Link = link\n\t\tlist = append(list,post)\n\t}\n\tc.JSON(200, list)\n\tdefer db.Close()\n}",
"func (c *UnsavedPostThumbnailClient) QueryUnsavedPost(upt *UnsavedPostThumbnail) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upt.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, true, unsavedpostthumbnail.UnsavedPostTable, unsavedpostthumbnail.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upt.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (ar AlbumDbRepository) Get(id int) (entity domain.Album, err error) {\n\tobject, err := ar.AppContext.DB.Get(domain.Album{}, id)\n\tif err == nil && object != nil {\n\t\tentity = *object.(*domain.Album)\n\t\tar.populateTracks(&entity)\n\t} else {\n\t\terr = errors.New(\"no album found\")\n\t}\n\n\treturn\n}",
"func (a *App) GetImage(id int64) (*model.ProductImage, *model.AppErr) {\n\treturn a.Srv().Store.ProductImage().Get(id)\n}",
"func NewUnsavedPostImageClient(c config) *UnsavedPostImageClient {\n\treturn &UnsavedPostImageClient{config: c}\n}",
"func (c *PostVideoClient) Get(ctx context.Context, id int) (*PostVideo, error) {\n\treturn c.Query().Where(postvideo.ID(id)).Only(ctx)\n}",
"func GetByID(ctx *routing.Context) error {\n\tlogger := logger.GetLogInstance(\"\", \"\")\n\tdb := ctx.Get(\"db\").(*gorm.DB)\n\n\timg := []models.ImageModel{}\n\n\tif err := db.Model(&dbmodels.Image{}).Where(\"id = ?\", ctx.Param(\"id\")).Scan(&img).Error; err != nil {\n\t\tlogger.Error(err)\n\t\tctx.Response.SetStatusCode(404)\n\t\tres := models.NewResponse(false, nil, \"not found\")\n\t\treturn ctx.WriteData(res.MustMarshal())\n\t}\n\tres := models.NewResponse(true, img, \"OK\")\n\treturn ctx.WriteData(res.MustMarshal())\n}",
"func (repo *Posts) Post(id graphql.ID) *models.Post {\n\treturn repo.posts[id]\n}",
"func getImage(ctx *fiber.Ctx) error {\n\t// check data\n\tid := ctx.Params(\"id\")\n\tif id == \"\" {\n\t\treturn utilities.Response(utilities.ResponseParams{\n\t\t\tCtx: ctx,\n\t\t\tInfo: configuration.ResponseMessages.MissingUserID,\n\t\t\tStatus: fiber.StatusBadRequest,\n\t\t})\n\t}\n\n\t// parse ID into an ObjectID\n\tparsedId, parsingError := primitive.ObjectIDFromHex(id)\n\tif parsingError != nil {\n\t\treturn utilities.Response(utilities.ResponseParams{\n\t\t\tCtx: ctx,\n\t\t\tInfo: configuration.ResponseMessages.InvalidData,\n\t\t\tStatus: fiber.StatusNotFound,\n\t\t})\n\t}\n\n\t// get User record\n\tUserCollection := Instance.Database.Collection(Collections.User)\n\trawUserRecord := UserCollection.FindOne(\n\t\tctx.Context(),\n\t\tbson.D{{Key: \"_id\", Value: parsedId}},\n\t)\n\tuserRecord := &User{}\n\trawUserRecord.Decode(userRecord)\n\tif userRecord.ID == \"\" {\n\t\treturn utilities.Response(utilities.ResponseParams{\n\t\t\tCtx: ctx,\n\t\t\tInfo: configuration.ResponseMessages.NotFound,\n\t\t\tStatus: fiber.StatusNotFound,\n\t\t})\n\t}\n\n\t// get Image record\n\tImageCollection := Instance.Database.Collection(Collections.Image)\n\trawImageRecord := ImageCollection.FindOne(\n\t\tctx.Context(),\n\t\tbson.D{{Key: \"userId\", Value: id}},\n\t)\n\timageRecord := &Image{}\n\trawImageRecord.Decode(imageRecord)\n\tif imageRecord.ID == \"\" {\n\t\treturn utilities.Response(utilities.ResponseParams{\n\t\t\tCtx: ctx,\n\t\t\tInfo: configuration.ResponseMessages.NotFound,\n\t\t\tStatus: fiber.StatusNotFound,\n\t\t})\n\t}\n\n\treturn utilities.Response(utilities.ResponseParams{\n\t\tCtx: ctx,\n\t\tData: fiber.Map{\n\t\t\t\"image\": imageRecord,\n\t\t},\n\t})\n}",
"func (c *UnsavedPostImageClient) Delete() *UnsavedPostImageDelete {\n\tmutation := newUnsavedPostImageMutation(c.config, OpDelete)\n\treturn &UnsavedPostImageDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func GetPost(w http.ResponseWriter, r *http.Request, app api.AppServicer) (interface{}, error) {\n\tenv := app.(api.AppService)\n\tvars := mux.Vars(r)\n\tid, _ := strconv.Atoi(vars[\"id\"])\n\tpost := &models.Post{ID: id}\n\n\terr := post.GetPost(env.DB)\n\treturn post, err\n}",
"func (s *MockStore) GetPost(id int) (p Post, err error) {\n\tp, ok := s.mem[id]\n\tif !ok {\n\t\terr = errors.New(\"Could not find a post with that id.\")\n\t}\n\treturn p, err\n}",
"func (c *MediaClient) Get(ctx context.Context, id int) (*Media, error) {\n\treturn c.Query().Where(media.ID(id)).Only(ctx)\n}",
"func (r *CompanyPictureCollectionRequest) Get(ctx context.Context) ([]Picture, error) {\n\treturn r.GetN(ctx, 0)\n}",
"func (c *UnsavedPostVideoClient) GetX(ctx context.Context, id int) *UnsavedPostVideo {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (m Model) GetImage() image.Image {\n\treturn m.Image\n}",
"func (c *UnsavedPostImageClient) Query() *UnsavedPostImageQuery {\n\treturn &UnsavedPostImageQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *PostThumbnailClient) GetX(ctx context.Context, id int) *PostThumbnail {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *PostAttachmentClient) GetX(ctx context.Context, id int) *PostAttachment {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func GetPost(id int) (post Post, err error) {\n\tpost = Post{}\n\terr = Db.QueryRow(\"select * from posts where id = $1\", id).Scan(&post.ID, &post.Title, &post.Body, &post.CreatedAt)\n\treturn\n}",
"func (m *defaultEntityManager) Get(id string) (entity *Entity) {\n\tfor _, e := range m.entities {\n\t\tif e.ID() == id {\n\t\t\treturn e\n\t\t}\n\t}\n\treturn\n}",
"func (p *PostsController) GetPost(id int, userId uint) (*models.Post, *echo.HTTPError) {\n\tvar post models.Post\n\tp.db.Raw(`\n\t\tSELECT p.*,\n\t\t(SELECT \"value\" from \"likes\" \n\t\tWHERE \"user_id\" = ? and \"post_id\" = p.id) as \"StateValue\",\n\t\t(SELECT username FROM \"profiles\"\n\t\tWHERE user_id = p.user_id) as \"Creator\"\n\t\tFROM posts p\n\t\tWHERE p.id = ?\n\t`, userId, id).Find(&post)\n\n\tif post.ID == 0 {\n\t\treturn nil, echo.NewHTTPError(404, \"post does not exist\")\n\t}\n\n\treturn &post, nil\n}",
"func (c *EntryController) Get(ctx *app.GetEntryContext) error {\n\tentry, err := c.entryRepo.FindByID(ctx.EntryID)\n\tif err != nil {\n\t\tif errors.Cause(sql.ErrNoRows) != nil {\n\t\t\treturn ctx.NotFound()\n\t\t}\n\n\t\treturn errors.Wrap(err, \"Un-expected error\")\n\t}\n\n\tres := entryModelToMediaFull(entry)\n\treturn ctx.OKFull(res)\n}",
"func (s *BlugService) GetPost(ctx context.Context, id int) (post *models.Post, err error) {\n\tdefer func(begin time.Time) {\n\t\ts.Logger.Info(\n\t\t\t\"blug\",\n\t\t\tzap.String(\"method\", \"getpost\"),\n\t\t\tzap.Int(\"id\", id),\n\t\t\tzap.NamedError(\"err\", err),\n\t\t\tzap.Duration(\"took\", time.Since(begin)),\n\t\t)\n\t}(time.Now())\n\n\tpost, err = s.DB.GetPost(id)\n\n\treturn post, err\n}",
"func (c *BinaryFileClient) Get(ctx context.Context, id int) (*BinaryFile, error) {\n\treturn c.Query().Where(binaryfile.ID(id)).Only(ctx)\n}",
"func (es *etcdStore) GetByID(imageID string) (*Image, error) {\n\timage := &Image{}\n\n\tmetadataKey := es.metadataKey(imageID)\n\tresp, err := es.client.Get(metadataKey, false, false)\n\tif err != nil {\n\t\tetcdErr := err.(*etcd.EtcdError)\n\t\tif etcdErr.ErrorCode == etcderr.EcodeKeyNotFound {\n\t\t\treturn nil, ErrNotFound\n\t\t}\n\n\t\tlog.WithFields(etcdLogFields).WithFields(log.Fields{\n\t\t\t\"error\": err,\n\t\t\t\"key\": metadataKey,\n\t\t}).Error(\"failed to look up image\")\n\t\treturn nil, err\n\t}\n\n\tif err := json.Unmarshal([]byte(resp.Node.Value), image); err != nil {\n\t\tlog.WithFields(etcdLogFields).WithFields(log.Fields{\n\t\t\t\"error\": err,\n\t\t\t\"key\": metadataKey,\n\t\t\t\"value\": resp.Node.Value,\n\t\t}).Error(\"invalid image json\")\n\t\treturn nil, err\n\t}\n\n\timage.Store = es\n\treturn image, nil\n}",
"func (c _StoreImpl) Photo_ByPostId(PostId int) (*Photo, bool) {\n\to, ok := RowCacheIndex.Get(\"Photo_PostId2:\" + fmt.Sprintf(\"%v\", PostId))\n\tif ok {\n\t\tif obj, ok := o.(*Photo); ok {\n\t\t\treturn obj, true\n\t\t}\n\t}\n\n\trow, err := NewPhoto_Selector().PostId_Eq(PostId).GetRow(base.DB)\n\tif err == nil {\n\t\tRowCacheIndex.Set(\"Photo_PostId2:\"+fmt.Sprintf(\"%v\", row.PostId), row, 0)\n\t\treturn row, true\n\t}\n\n\tXOLogErr(err)\n\treturn nil, false\n}",
"func (c BlogPostItem) Get(id int64) revel.Result {\n\tblogitem := new(models.BlogPost)\n\terr := c.Txn.SelectOne(blogitem,\n\t\t`SELECT * FROM BlogPost WHERE id = ?`, id)\n\tif err != nil {\n\t\treturn c.RenderText(\"Error. BlogPost probably doesn't exist.\")\n\t}\n\treturn c.RenderJson(blogitem)\n}",
"func (s *ImagesByRepositoryRegistryStorage) Get(id string) (interface{}, error) {\n\tresult := imageapi.ImageList{}\n\timageIDs, err := s.registry.ListImagesFromRepository(id, labels.Everything())\n\tif err != nil {\n\t\treturn result, err\n\t}\n\tfor _, imageID := range imageIDs {\n\t\tif image, err := s.imageRegistry.GetImage(imageID); err == nil {\n\t\t\tresult.Items = append(result.Items, *image)\n\t\t}\n\t}\n\treturn result, nil\n}",
"func (m *EntityManager) Get(id string) (entity *Entity) {\n\tfor _, e := range m.entities {\n\t\tif e.ID() == id {\n\t\t\treturn e\n\t\t}\n\t}\n\treturn\n}",
"func GetPostById(c *gin.Context) {\n\tpostID, err := strconv.ParseInt(c.Param(\"id\"), 10, 0)\n\tif err != nil {\n\t\tc.JSON(http.StatusBadRequest, gin.H{\"error\": err.Error()})\n\t\treturn\n\t}\n\n\tpost, err := postRepo.GetById(postID)\n\tif err != nil {\n\t\tc.JSON(http.StatusBadRequest, gin.H{\"error\": err.Error()})\n\t\treturn\n\t}\n\tc.JSON(http.StatusOK, PostModel{\n\t\tId: post.ID,\n\t\tLinks: halgo.Links{}.\n\t\t\tSelf(\"/posts/%d\", post.ID).\n\t\t\tLink(\"author\", \"%s/users/%d\", userServiceAddress, post.AuthorID).\n\t\t\tLink(\"ratings\", \"%s/ratings?postId=%d\", ratingServiceAddress, post.ID),\n\t\tHeadline: post.Headline,\n\t\tContent: post.Content,\n\t})\n}",
"func (e EntityRepository) GetEntity(id string) (models.Entity, error) {\n\treturn repositoryHandler.entityRepository.GetEntity(id)\n}",
"func (s MyEntityManager) Get(id uint64) ecs.Entity {\n\treturn *s.items[id].entity\n}",
"func Get(key string) (Entity, error) {\n\tconn := db.Pool.Get()\n\tdefer conn.Close()\n\n\trecord, err := db.Get(conn, key)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn Load(key, record), nil\n}",
"func NewGetDeltaUnprocessableEntity() *GetDeltaUnprocessableEntity {\n\treturn &GetDeltaUnprocessableEntity{}\n}",
"func (bl *postBusiness) GetByID(id uint64) (*models.Post, *apperror.AppError) {\n\treturn bl.service.GetByID(id)\n}",
"func (d *DynamoDB)GetPost(id string) (models.Post, error){\n\tfmt.Printf(logRoot + \"Searching %v table for post with id:%v\\n\", postTable, id)\n\tfmt.Println(\"UNIMPLEMENTED\")\n\treturn models.Post{}, nil\n}",
"func (c *UnsavedPostAttachmentClient) QueryUnsavedPost(upa *UnsavedPostAttachment) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upa.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostattachment.Table, unsavedpostattachment.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostattachment.UnsavedPostTable, unsavedpostattachment.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upa.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (p *postsQueryBuilder) Get() (*Post, error) {\n\tif p.err != nil {\n\t\treturn nil, p.err\n\t}\n\tmodel, err := p.builder.Get()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn model.(*Post), nil\n}",
"func (i Image) GetImage(c echo.Context) error {\n\tvar file *os.File\n\t// Get ID\n\tid := c.FormValue(\"id\")\n\n\t// Get image by id\n\tsrc, err := i.session.DB(\"test\").GridFS(\"fs\").OpenId(bson.ObjectIdHex(id))\n\tif err != nil {\n\t\tc.Logger().Error(err)\n\t\treturn err\n\t}\n\n\t// Create file to send it\n\tif file, err = os.Create(id); err != nil {\n\t\tc.Logger().Error(err)\n\t\treturn err\n\t}\n\tdefer file.Close()\n\t// delete file\n\tdefer deleteFile(id)\n\n\t// Write on the new file\n\tif _, err = io.Copy(file, src); err != nil {\n\t\tc.Logger().Error(err)\n\t\treturn err\n\t}\n\n\t// send it\n\treturn c.Attachment(id, src.Name())\n}",
"func (repo *GormRepository) GetPin(id uuid.UUID) (p *model.Pin, err error) {\n\tif id == uuid.Nil {\n\t\treturn nil, ErrNotFound\n\t}\n\tp = &model.Pin{}\n\terr = repo.db.Scopes(pinPreloads).Where(&model.Pin{ID: id}).Take(p).Error\n\tif err != nil {\n\t\treturn nil, convertError(err)\n\t}\n\treturn p, nil\n}",
"func NewGetDocumentUnprocessableEntity() *GetDocumentUnprocessableEntity {\n\n\treturn &GetDocumentUnprocessableEntity{}\n}",
"func (db *Database) GetPost(postID string) (models.Post, error) {\n\tpost := &models.Post{}\n\terr := db.DB.Model(post).\n\t\tWhere(\"post.post_id = ?\", postID).\n\t\tSelect()\n\tif err != nil {\n\t\treturn models.Post{}, err\n\t}\n\n\treturn *post, nil\n}",
"func (ps *PostStorage) Read(id string) (socialnet.Post, error) {\n\tfor _, p := range ps.posts {\n\t\tif p.ID == id {\n\t\t\treturn p, nil\n\t\t}\n\t}\n\treturn socialnet.Post{}, fmt.Errorf(\n\t\t\"could not find post with ID %s\",\n\t\tid,\n\t)\n}",
"func (r *sampleRepository) Get(id uuid.UUID) (*model.Sample, error) {\n\tvar sample model.Sample\n\n\terr := r.DB.Where(\"id = ?\", id).Take(&sample).Error\n\n\tif err == gorm.ErrRecordNotFound {\n\t\treturn nil, nil\n\t}\n\n\treturn &sample, err\n}",
"func (upu *UnsavedPostUpdate) ClearImages() *UnsavedPostUpdate {\n\tupu.mutation.ClearImages()\n\treturn upu\n}",
"func (r *Repository) Get(ctx context.Context, id digest.Digest) (io.ReadCloser, error) {\n\t_, path := r.Path(id)\n\trc, err := os.Open(path)\n\tif err != nil {\n\t\treturn nil, errors.E(\"get\", r.Root, id, err)\n\t}\n\treturn rc, nil\n}",
"func (upuo *UnsavedPostUpdateOne) ClearImages() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearImages()\n\treturn upuo\n}",
"func (m *ItemPhotoRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPhotoRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.ProfilePhotoable, error) {\n requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return nil, err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n }\n res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateProfilePhotoFromDiscriminatorValue, errorMapping)\n if err != nil {\n return nil, err\n }\n if res == nil {\n return nil, nil\n }\n return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.ProfilePhotoable), nil\n}",
"func (r *repository) Find(id uint) (*models.Upload, error) {\n\tupload := models.Upload{}\n\n\tif err := r.db.First(&upload, id).Error; err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &upload, nil\n}",
"func (s *MongoStore) GetEntity(name string, id string, result interface{}) error {\n\tif !bson.IsObjectIdHex(id) {\n\t\treturn fmt.Errorf(\"invalid object id %s.\", id)\n\t}\n\tentityId := bson.ObjectIdHex(id)\n\terr := s.db.C(name).FindId(entityId).One(result)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func (r *CustomerPictureCollectionRequest) Get(ctx context.Context) ([]Picture, error) {\n\treturn r.GetN(ctx, 0)\n}",
"func (driver *S3Driver) Get(id string) (*shared.Paste, error) {\n\t// Read the object\n\tobject, err := driver.client.GetObject(context.Background(), driver.bucket, id+\".json\", minio.GetObjectOptions{})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdata, err := ioutil.ReadAll(object)\n\tif err != nil {\n\t\tif minio.ToErrorResponse(err).Code == \"NoSuchKey\" {\n\t\t\treturn nil, nil\n\t\t}\n\t\treturn nil, err\n\t}\n\n\t// Unmarshal the object into a paste\n\tpaste := new(shared.Paste)\n\terr = json.Unmarshal(data, &paste)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn paste, nil\n}",
"func (v *ImageClient) Get(imageName string) (Image, error) {\n\n\t//Construct the composite key to select the entry\n\tkey := ImageKey{\n\t\t// Owner:\townerName,\n\t\t// ClusterName:\tclusterName,\n\t\tImageName: imageName,\n\t}\n\n\tvalue, err := v.util.DBRead(v.storeName, key, v.tagMeta)\n\tif err != nil {\n\t\treturn Image{}, pkgerrors.Wrap(err, \"Get Image\")\n\t}\n\n\t//value is a byte array\n\tif value != nil {\n\t\tc, err := v.util.DBUnmarshal(value)\n\t\tif err != nil {\n\t\t\treturn Image{}, pkgerrors.Wrap(err, \"Unmarshaling Value\")\n\t\t}\n\t\treturn c, nil\n\t}\n\n\treturn Image{}, pkgerrors.New(\"Error getting Connection\")\n}",
"func Retrieve(ctx context.Context, dbConn *db.DB, imageID string) (*Image, error) {\n\tif !IsValidUUID(imageID) {\n\t\treturn nil, errors.Wrapf(web.ErrInvalidID, \"IsValidUUID: %s\", imageID)\n\t}\n\trow, err := dbConn.PSQLQueryRawx(ctx, \"SELECT * from images where id=$1\", imageID)\n\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, fmt.Sprintf(\"db.images.find(%s)\", db.Query(imageID)))\n\t}\n\timage := Image{}\n\terr = row.StructScan(&image)\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &image, nil\n}",
"func (ps PostStorage) GetPost(ctx sdk.Context, permlink linotypes.Permlink) (*Post, sdk.Error) {\n\tstore := ctx.KVStore(ps.key)\n\tkey := GetPostInfoKey(permlink)\n\tinfoByte := store.Get(key)\n\tif infoByte == nil {\n\t\treturn nil, types.ErrPostNotFound(permlink)\n\t}\n\tpostInfo := new(Post)\n\tps.cdc.MustUnmarshalBinaryLengthPrefixed(infoByte, postInfo)\n\treturn postInfo, nil\n}",
"func GetPictures(db *gorm.DB) []Picture {\n\tvar pictures []Picture\n\tdb.Preload(\"Image\").Preload(\"User\").Order(\"created_at desc\").Find(&pictures)\n\treturn pictures\n}",
"func (a *Exp_photosHandler) GetByID(c echo.Context) error {\n\tid := c.Param(\"id\")\n\n\tctx := c.Request().Context()\n\tif ctx == nil {\n\t\tctx = context.Background()\n\t}\n\n\tart, err := a.Exp_photosUsecase.GetByExperienceID(ctx, id)\n\tif err != nil {\n\t\treturn c.JSON(getStatusCode(err), ResponseError{Message: err.Error()})\n\t}\n\treturn c.JSON(http.StatusOK, art)\n}",
"func (c *PostClient) GetX(ctx context.Context, id int) *Post {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (box *TestEntityRelatedBox) Get(id uint64) (*TestEntityRelated, error) {\n\tobject, err := box.Box.Get(id)\n\tif err != nil {\n\t\treturn nil, err\n\t} else if object == nil {\n\t\treturn nil, nil\n\t}\n\treturn object.(*TestEntityRelated), nil\n}",
"func (cs *CharacterMugshotService) Get(id int, opts ...Option) (*CharacterMugshot, error) {\n\tif id < 0 {\n\t\treturn nil, ErrNegativeID\n\t}\n\n\tvar mug []*CharacterMugshot\n\n\topts = append(opts, SetFilter(\"id\", OpEquals, strconv.Itoa(id)))\n\terr := cs.client.post(cs.end, &mug, opts...)\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"cannot get CharacterMugshot with ID %v\", id)\n\t}\n\n\treturn mug[0], nil\n}",
"func (list *List) Get(id ID) (*Entity, error) {\n\tif err := list.checkBoundaries(id); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn list.entities[id], nil\n}",
"func (server *Server) Get(params imageserver.Params) (*imageserver.Image, error) {\n\tsourceURL, err := getSourceURL(params)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tresponse, err := doRequest(sourceURL)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer response.Body.Close()\n\timage, err := parseResponse(response)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn image, nil\n}",
"func (c *UnsavedPostImageClient) Update() *UnsavedPostImageUpdate {\n\tmutation := newUnsavedPostImageMutation(c.config, OpUpdate)\n\treturn &UnsavedPostImageUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func GetImage(imageid string) Instance {\n\tpath := image_path(imageid)\n\treturn is_get(path)\n}",
"func NewGetTaskDetailsUnprocessableEntity() *GetTaskDetailsUnprocessableEntity {\n\n\treturn &GetTaskDetailsUnprocessableEntity{}\n}",
"func getImageItem(id string) (i *ImageItem) {\n\timageItemsMutex.Lock()\n\ti = imageItems[id]\n\timageItemsMutex.Unlock()\n\treturn\n}",
"func (d *Data) GetImage(v dvid.VersionID, vox *Labels, supervoxels bool, scale uint8, roiname dvid.InstanceName) (*dvid.Image, error) {\n\tr, err := imageblk.GetROI(v, roiname, vox)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif err := d.GetLabels(v, supervoxels, scale, vox, r); err != nil {\n\t\treturn nil, err\n\t}\n\treturn vox.GetImage2d()\n}",
"func GetImage(c echo.Context) error {\n\tidStr := c.Param(\"id\")\n\tid, _ := strconv.Atoi(idStr)\n\tfilepath := fmt.Sprintf(\"./img/storage/%d.jpg\", id)\n\treturn c.File(filepath)\n}",
"func GetAvatar(w http.ResponseWriter, r *http.Request) {\n\tID := r.URL.Query().Get(\"id\")\n\tif len(ID) < 1 {\n\t\thttp.Error(w, \"id key is required\", http.StatusUnprocessableEntity)\n\t\treturn\n\t}\n\n\tprofile, err := bd.SearchProfile(ID)\n\tif err != nil {\n\t\thttp.Error(w, \"User not found\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\topenFile, err := os.Open(\"uploads/avatars/\" + profile.Avatar)\n\tif err != nil {\n\t\thttp.Error(w, \"Avatar image not found\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t//Se copia la imagen al response writter en modo binario\n\t_, err = io.Copy(w, openFile)\n\tif err != nil {\n\t\thttp.Error(w, \"Error copying the avatar image\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n}",
"func (picHdlr *PictureHandler) GetSinglePicture(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {\n\tidRaw := ps.ByName(\"id\")\n\tid, err := strconv.Atoi(idRaw)\n\tif err != nil {\n\t\tw.Header().Set(\"Content-type\", \"application/json\")\n\t\thttp.Error(w, http.StatusText(http.StatusNotFound), http.StatusNotFound)\n\t\treturn\n\t}\n\n\tuser, err := picHdlr.picSrv.GetSinglePicture(id)\n\tif err != nil {\n\t\tw.Header().Set(\"Content-type\", \"application/json\")\n\t\thttp.Error(w, http.StatusText(http.StatusNotFound), http.StatusNotFound)\n\t\treturn\n\t}\n\toutput, err := json.MarshalIndent(user, \"\", \"\\t\\t\")\n\tif err != nil {\n\t\tw.Header().Set(\"Content-type\", \"application/json\")\n\t\thttp.Error(w, http.StatusText(http.StatusNotFound), http.StatusNotFound)\n\t\treturn\n\t}\n\tw.Header().Set(\"Content-type\", \"application/json\")\n\tw.Write(output)\n\treturn\n\n}"
] |
[
"0.7853896",
"0.7501814",
"0.7455191",
"0.71626353",
"0.6509343",
"0.63132685",
"0.6290422",
"0.6258868",
"0.6252521",
"0.61995834",
"0.615726",
"0.5836856",
"0.5783707",
"0.57702476",
"0.57103825",
"0.5692119",
"0.56288666",
"0.56283194",
"0.55912507",
"0.55855584",
"0.55587626",
"0.55206704",
"0.5511664",
"0.54815656",
"0.5424691",
"0.54143584",
"0.52060467",
"0.51964056",
"0.5168275",
"0.5152146",
"0.5115221",
"0.5114897",
"0.51094675",
"0.509868",
"0.50971055",
"0.50598586",
"0.50276005",
"0.50194156",
"0.49842176",
"0.4966905",
"0.49631655",
"0.49613228",
"0.4960363",
"0.49398732",
"0.4935336",
"0.4931026",
"0.49157727",
"0.49133652",
"0.4912426",
"0.49076304",
"0.48646745",
"0.48593017",
"0.4856872",
"0.48557597",
"0.4822367",
"0.48178235",
"0.4816722",
"0.48161903",
"0.48159114",
"0.48096177",
"0.47792214",
"0.477838",
"0.4777059",
"0.47745296",
"0.4752358",
"0.4750524",
"0.4746078",
"0.47456032",
"0.47306246",
"0.47013786",
"0.4677722",
"0.46404472",
"0.4637406",
"0.46116364",
"0.4608733",
"0.4594805",
"0.4590274",
"0.45869344",
"0.4586158",
"0.45856187",
"0.4585087",
"0.45782468",
"0.4575493",
"0.4566181",
"0.4566003",
"0.45545167",
"0.45518723",
"0.454514",
"0.45433742",
"0.4538169",
"0.45377284",
"0.45354363",
"0.45353085",
"0.45334613",
"0.45258108",
"0.4525077",
"0.45237517",
"0.45217454",
"0.45040092",
"0.4502536"
] |
0.8780113
|
0
|
GetX is like Get, but panics if an error occurs.
|
func (c *UnsavedPostImageClient) GetX(ctx context.Context, id int) *UnsavedPostImage {
obj, err := c.Get(ctx, id)
if err != nil {
panic(err)
}
return obj
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *StatustClient) GetX(ctx context.Context, id int) *Statust {\n\ts, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn s\n}",
"func (c *OperativeClient) GetX(ctx context.Context, id int) *Operative {\n\to, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn o\n}",
"func (c *StaytypeClient) GetX(ctx context.Context, id int) *Staytype {\n\ts, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn s\n}",
"func (c *LevelOfDangerousClient) GetX(ctx context.Context, id int) *LevelOfDangerous {\n\tlod, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn lod\n}",
"func (c *DentistClient) GetX(ctx context.Context, id int) *Dentist {\n\td, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn d\n}",
"func (c *ToolClient) GetX(ctx context.Context, id int) *Tool {\n\tt, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn t\n}",
"func (c *IPClient) GetX(ctx context.Context, id uuid.UUID) *IP {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *BeerClient) GetX(ctx context.Context, id int) *Beer {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *PhysicianClient) GetX(ctx context.Context, id int) *Physician {\n\tph, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn ph\n}",
"func (c *PhysicianClient) GetX(ctx context.Context, id int) *Physician {\n\tph, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn ph\n}",
"func (c *PharmacistClient) GetX(ctx context.Context, id int) *Pharmacist {\n\tph, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn ph\n}",
"func (c *EmptyClient) GetX(ctx context.Context, id int) *Empty {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *OperationClient) GetX(ctx context.Context, id uuid.UUID) *Operation {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *NurseClient) GetX(ctx context.Context, id int) *Nurse {\n\tn, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn n\n}",
"func (c *PatientInfoClient) GetX(ctx context.Context, id int) *PatientInfo {\n\tpi, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pi\n}",
"func (c *ClinicClient) GetX(ctx context.Context, id uuid.UUID) *Clinic {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *LeaseClient) GetX(ctx context.Context, id int) *Lease {\n\tl, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn l\n}",
"func (c *ModuleVersionClient) GetX(ctx context.Context, id int) *ModuleVersion {\n\tmv, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn mv\n}",
"func (c *PetruleClient) GetX(ctx context.Context, id int) *Petrule {\n\tpe, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pe\n}",
"func (c *KeyStoreClient) GetX(ctx context.Context, id int32) *KeyStore {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *SituationClient) GetX(ctx context.Context, id int) *Situation {\n\ts, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn s\n}",
"func (c *RepairinvoiceClient) GetX(ctx context.Context, id int) *Repairinvoice {\n\tr, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn r\n}",
"func (c *MedicineClient) GetX(ctx context.Context, id int) *Medicine {\n\tm, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn m\n}",
"func (c *BillClient) GetX(ctx context.Context, id int) *Bill {\n\tb, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn b\n}",
"func (c *BillClient) GetX(ctx context.Context, id int) *Bill {\n\tb, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn b\n}",
"func (c *BillClient) GetX(ctx context.Context, id int) *Bill {\n\tb, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn b\n}",
"func (c *OperativerecordClient) GetX(ctx context.Context, id int) *Operativerecord {\n\to, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn o\n}",
"func (c *ReturninvoiceClient) GetX(ctx context.Context, id int) *Returninvoice {\n\tr, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn r\n}",
"func (c *CleanernameClient) GetX(ctx context.Context, id int) *Cleanername {\n\tcl, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn cl\n}",
"func (c *AdminClient) GetX(ctx context.Context, id int) *Admin {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *ComplaintClient) GetX(ctx context.Context, id int) *Complaint {\n\tco, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn co\n}",
"func (c *RepairInvoiceClient) GetX(ctx context.Context, id int) *RepairInvoice {\n\tri, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn ri\n}",
"func (c *DNSBLQueryClient) GetX(ctx context.Context, id uuid.UUID) *DNSBLQuery {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *ModuleClient) GetX(ctx context.Context, id int) *Module {\n\tm, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn m\n}",
"func (c *MedicineTypeClient) GetX(ctx context.Context, id int) *MedicineType {\n\tmt, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn mt\n}",
"func (c *BuildingClient) GetX(ctx context.Context, id int) *Building {\n\tb, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn b\n}",
"func (c *DeviceClient) GetX(ctx context.Context, id int) *Device {\n\td, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn d\n}",
"func (c *PatientClient) GetX(ctx context.Context, id int) *Patient {\n\tpa, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pa\n}",
"func (c *PatientClient) GetX(ctx context.Context, id int) *Patient {\n\tpa, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pa\n}",
"func (c *PatientClient) GetX(ctx context.Context, id int) *Patient {\n\tpa, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pa\n}",
"func (c *RoomuseClient) GetX(ctx context.Context, id int) *Roomuse {\n\tr, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn r\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn u\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn u\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn u\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn u\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn u\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn u\n}",
"func (c *StatusdClient) GetX(ctx context.Context, id int) *Statusd {\n\ts, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn s\n}",
"func (c *UserClient) GetX(ctx context.Context, id int64) *User {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *PlanetClient) GetX(ctx context.Context, id int) *Planet {\n\tpl, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pl\n}",
"func (c *TransactionClient) GetX(ctx context.Context, id int32) *Transaction {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *PurposeClient) GetX(ctx context.Context, id int) *Purpose {\n\tpu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pu\n}",
"func (c *LengthtimeClient) GetX(ctx context.Context, id int) *Lengthtime {\n\tl, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn l\n}",
"func (c *VeterinarianClient) GetX(ctx context.Context, id uuid.UUID) *Veterinarian {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *UsertypeClient) GetX(ctx context.Context, id int) *Usertype {\n\tu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn u\n}",
"func (c *PrescriptionClient) GetX(ctx context.Context, id int) *Prescription {\n\tpr, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pr\n}",
"func (c *PaymentClient) GetX(ctx context.Context, id int) *Payment {\n\tpa, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pa\n}",
"func (c *PaymentClient) GetX(ctx context.Context, id int) *Payment {\n\tpa, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pa\n}",
"func (c *WorkExperienceClient) GetX(ctx context.Context, id int) *WorkExperience {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *DNSBLResponseClient) GetX(ctx context.Context, id uuid.UUID) *DNSBLResponse {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *OperationroomClient) GetX(ctx context.Context, id int) *Operationroom {\n\to, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn o\n}",
"func (c *PositionInPharmacistClient) GetX(ctx context.Context, id int) *PositionInPharmacist {\n\tpip, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pip\n}",
"func (c *PatientofphysicianClient) GetX(ctx context.Context, id int) *Patientofphysician {\n\tpa, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pa\n}",
"func (c *CleaningroomClient) GetX(ctx context.Context, id int) *Cleaningroom {\n\tcl, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn cl\n}",
"func (c *DoctorClient) GetX(ctx context.Context, id int) *Doctor {\n\td, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn d\n}",
"func (c *StatusRClient) GetX(ctx context.Context, id int) *StatusR {\n\ts, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn s\n}",
"func (c *SymptomClient) GetX(ctx context.Context, id int) *Symptom {\n\ts, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn s\n}",
"func (c *TagClient) GetX(ctx context.Context, id int) *Tag {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *CoinInfoClient) GetX(ctx context.Context, id int32) *CoinInfo {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *WifiClient) GetX(ctx context.Context, id int) *Wifi {\n\tw, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn w\n}",
"func (c *UnitOfMedicineClient) GetX(ctx context.Context, id int) *UnitOfMedicine {\n\tuom, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn uom\n}",
"func (c *EmployeeClient) GetX(ctx context.Context, id int) *Employee {\n\te, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn e\n}",
"func (c *EmployeeClient) GetX(ctx context.Context, id int) *Employee {\n\te, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn e\n}",
"func (c *EmployeeClient) GetX(ctx context.Context, id int) *Employee {\n\te, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn e\n}",
"func (c *YearClient) GetX(ctx context.Context, id int) *Year {\n\ty, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn y\n}",
"func (x *V) Get(params ...interface{}) (*V, error) {\n\tif false == x.initialized {\n\t\treturn nil, errNotInitialized\n\t}\n\tif 0 == len(params) {\n\t\treturn nil, errNilParameter\n\t}\n\treturn x.getOrCreate(false, params...)\n}",
"func (c *OrderClient) GetX(ctx context.Context, id int) *Order {\n\to, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn o\n}",
"func (c *FoodmenuClient) GetX(ctx context.Context, id int) *Foodmenu {\n\tf, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn f\n}",
"func (c *DispenseMedicineClient) GetX(ctx context.Context, id int) *DispenseMedicine {\n\tdm, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn dm\n}",
"func (c *SkillClient) GetX(ctx context.Context, id int) *Skill {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *TitleClient) GetX(ctx context.Context, id int) *Title {\n\tt, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn t\n}",
"func (c *CustomerClient) GetX(ctx context.Context, id uuid.UUID) *Customer {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func Get(ctx *grumble.Context) error {\n\tclient, execCtx, cancel := newClientAndCtx(ctx, 5*time.Second)\n\tdefer cancel()\n\tval, err := client.Get(execCtx, &ldProto.Key{Key: ctx.Args.String(\"key\")})\n\tif err != nil || val.Key == \"\" {\n\t\treturn err\n\t}\n\treturn exec(ctx, handleKeyValueReturned(val))\n}",
"func (_HelloWorld *HelloWorldCaller) Get(opts *bind.CallOpts) (string, error) {\n\tvar (\n\t\tret0 = new(string)\n\t)\n\tout := ret0\n\terr := _HelloWorld.contract.Call(opts, out, \"get\")\n\treturn *ret0, err\n}",
"func (c *PostClient) GetX(ctx context.Context, id int) *Post {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *BillingstatusClient) GetX(ctx context.Context, id int) *Billingstatus {\n\tb, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn b\n}",
"func (c *RentalstatusClient) GetX(ctx context.Context, id int) *Rentalstatus {\n\tr, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn r\n}",
"func (c *UserWalletClient) GetX(ctx context.Context, id int64) *UserWallet {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *SessionClient) GetX(ctx context.Context, id int) *Session {\n\ts, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn s\n}",
"func (c *ReviewClient) GetX(ctx context.Context, id int32) *Review {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *BookingClient) GetX(ctx context.Context, id int) *Booking {\n\tb, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn b\n}",
"func (c *RoomdetailClient) GetX(ctx context.Context, id int) *Roomdetail {\n\tr, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn r\n}",
"func (c *EventClient) GetX(ctx context.Context, id int) *Event {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *PositionassingmentClient) GetX(ctx context.Context, id int) *Positionassingment {\n\tpo, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn po\n}",
"func (c *PatientroomClient) GetX(ctx context.Context, id int) *Patientroom {\n\tpa, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pa\n}",
"func (c *PetClient) GetX(ctx context.Context, id uuid.UUID) *Pet {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *CompanyClient) GetX(ctx context.Context, id int) *Company {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}"
] |
[
"0.6649727",
"0.662447",
"0.66150993",
"0.65879333",
"0.6586034",
"0.65785575",
"0.65654576",
"0.6543478",
"0.6534259",
"0.6534259",
"0.6532013",
"0.6507683",
"0.6505571",
"0.6491577",
"0.6471141",
"0.6469424",
"0.6469033",
"0.6465855",
"0.6459526",
"0.64232713",
"0.6398713",
"0.6379028",
"0.63789004",
"0.636543",
"0.636543",
"0.636543",
"0.6364173",
"0.6344415",
"0.6338498",
"0.63153285",
"0.63152313",
"0.63147926",
"0.63066053",
"0.63030267",
"0.62910455",
"0.62879896",
"0.6282457",
"0.6282298",
"0.6282298",
"0.6282298",
"0.62796706",
"0.62781435",
"0.62781435",
"0.62781435",
"0.62781435",
"0.62781435",
"0.62781435",
"0.6260344",
"0.625836",
"0.62454736",
"0.62439936",
"0.6243883",
"0.6242427",
"0.6241539",
"0.62408704",
"0.62408704",
"0.6238701",
"0.62378746",
"0.62361133",
"0.62361133",
"0.62312984",
"0.62223834",
"0.62037",
"0.62037",
"0.62029815",
"0.6202797",
"0.62027687",
"0.62025774",
"0.61984533",
"0.619409",
"0.6191293",
"0.61882085",
"0.61749196",
"0.6165506",
"0.61644137",
"0.6161917",
"0.6161917",
"0.6161917",
"0.61561006",
"0.6146255",
"0.6130771",
"0.6129761",
"0.61265326",
"0.6123033",
"0.6113389",
"0.6097469",
"0.609713",
"0.60843694",
"0.6083562",
"0.60764784",
"0.6063873",
"0.60474354",
"0.60425794",
"0.6040736",
"0.6039065",
"0.60356534",
"0.60190916",
"0.6011504",
"0.60076684",
"0.600312",
"0.59978515"
] |
0.0
|
-1
|
QueryUnsavedPost queries the unsaved_post edge of a UnsavedPostImage.
|
func (c *UnsavedPostImageClient) QueryUnsavedPost(upi *UnsavedPostImage) *UnsavedPostQuery {
query := &UnsavedPostQuery{config: c.config}
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
id := upi.ID
step := sqlgraph.NewStep(
sqlgraph.From(unsavedpostimage.Table, unsavedpostimage.FieldID, id),
sqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, unsavedpostimage.UnsavedPostTable, unsavedpostimage.UnsavedPostColumn),
)
fromV = sqlgraph.Neighbors(upi.driver.Dialect(), step)
return fromV, nil
}
return query
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *UnsavedPostThumbnailClient) QueryUnsavedPost(upt *UnsavedPostThumbnail) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upt.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, true, unsavedpostthumbnail.UnsavedPostTable, unsavedpostthumbnail.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upt.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostAttachmentClient) QueryUnsavedPost(upa *UnsavedPostAttachment) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upa.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostattachment.Table, unsavedpostattachment.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostattachment.UnsavedPostTable, unsavedpostattachment.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upa.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostVideoClient) QueryUnsavedPost(upv *UnsavedPostVideo) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upv.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostvideo.Table, unsavedpostvideo.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostvideo.UnsavedPostTable, unsavedpostvideo.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upv.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *AdminClient) QueryUnsavedPosts(a *Admin) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := a.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(admin.Table, admin.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, admin.UnsavedPostsTable, admin.UnsavedPostsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(a.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *CategoryClient) QueryUnsavedPosts(ca *Category) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := ca.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(category.Table, category.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, category.UnsavedPostsTable, category.UnsavedPostsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(ca.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *Category) QueryUnsavedPosts() *UnsavedPostQuery {\n\treturn (&CategoryClient{config: c.config}).QueryUnsavedPosts(c)\n}",
"func (upq *UnsavedPostQuery) QueryImages() *UnsavedPostImageQuery {\n\tquery := &UnsavedPostImageQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostimage.Table, unsavedpostimage.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.ImagesTable, unsavedpost.ImagesColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostClient) QueryImages(up *UnsavedPost) *UnsavedPostImageQuery {\n\tquery := &UnsavedPostImageQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostimage.Table, unsavedpostimage.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.ImagesTable, unsavedpost.ImagesColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostImageClient) Get(ctx context.Context, id int) (*UnsavedPostImage, error) {\n\treturn c.Query().Where(unsavedpostimage.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostImageClient) Query() *UnsavedPostImageQuery {\n\treturn &UnsavedPostImageQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *UnsavedPostClient) Get(ctx context.Context, id int) (*UnsavedPost, error) {\n\treturn c.Query().Where(unsavedpost.ID(id)).Only(ctx)\n}",
"func (upvc *UnsavedPostVideoCreate) SetUnsavedPost(u *UnsavedPost) *UnsavedPostVideoCreate {\n\treturn upvc.SetUnsavedPostID(u.ID)\n}",
"func (c *UnsavedPostClient) Query() *UnsavedPostQuery {\n\treturn &UnsavedPostQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *UnsavedPostAttachmentClient) Query() *UnsavedPostAttachmentQuery {\n\treturn &UnsavedPostAttachmentQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (upq *UnsavedPostQuery) Clone() *UnsavedPostQuery {\n\tif upq == nil {\n\t\treturn nil\n\t}\n\treturn &UnsavedPostQuery{\n\t\tconfig: upq.config,\n\t\tlimit: upq.limit,\n\t\toffset: upq.offset,\n\t\torder: append([]OrderFunc{}, upq.order...),\n\t\tpredicates: append([]predicate.UnsavedPost{}, upq.predicates...),\n\t\twithAuthor: upq.withAuthor.Clone(),\n\t\twithCategory: upq.withCategory.Clone(),\n\t\twithThumbnail: upq.withThumbnail.Clone(),\n\t\twithImages: upq.withImages.Clone(),\n\t\twithVideos: upq.withVideos.Clone(),\n\t\twithAttachments: upq.withAttachments.Clone(),\n\t\t// clone intermediate query.\n\t\tsql: upq.sql.Clone(),\n\t\tpath: upq.path,\n\t}\n}",
"func (c *PostImageClient) QueryPost(pi *PostImage) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pi.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postimage.Table, postimage.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, postimage.PostTable, postimage.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pi.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostClient) QueryAttachments(up *UnsavedPost) *UnsavedPostAttachmentQuery {\n\tquery := &UnsavedPostAttachmentQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostattachment.Table, unsavedpostattachment.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.AttachmentsTable, unsavedpost.AttachmentsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upvc *UnsavedPostVideoCreate) SetUnsavedPostID(id int) *UnsavedPostVideoCreate {\n\tupvc.mutation.SetUnsavedPostID(id)\n\treturn upvc\n}",
"func (c *UnsavedPostClient) QueryThumbnail(up *UnsavedPost) *UnsavedPostThumbnailQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, unsavedpost.ThumbnailTable, unsavedpost.ThumbnailColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostThumbnailClient) Get(ctx context.Context, id int) (*UnsavedPostThumbnail, error) {\n\treturn c.Query().Where(unsavedpostthumbnail.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostAttachmentClient) Get(ctx context.Context, id int) (*UnsavedPostAttachment, error) {\n\treturn c.Query().Where(unsavedpostattachment.ID(id)).Only(ctx)\n}",
"func (upq *UnsavedPostQuery) All(ctx context.Context) ([]*UnsavedPost, error) {\n\tif err := upq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn upq.sqlAll(ctx)\n}",
"func (upq *UnsavedPostQuery) QueryAttachments() *UnsavedPostAttachmentQuery {\n\tquery := &UnsavedPostAttachmentQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostattachment.Table, unsavedpostattachment.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.AttachmentsTable, unsavedpost.AttachmentsColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func NewUnsavedPostImageClient(c config) *UnsavedPostImageClient {\n\treturn &UnsavedPostImageClient{config: c}\n}",
"func (upq *UnsavedPostQuery) QueryThumbnail() *UnsavedPostThumbnailQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, unsavedpost.ThumbnailTable, unsavedpost.ThumbnailColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (c *PostAttachmentClient) QueryPost(pa *PostAttachment) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pa.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postattachment.Table, postattachment.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, postattachment.PostTable, postattachment.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pa.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostThumbnailClient) Query() *UnsavedPostThumbnailQuery {\n\treturn &UnsavedPostThumbnailQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *PostThumbnailClient) QueryPost(pt *PostThumbnail) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pt.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postthumbnail.Table, postthumbnail.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, true, postthumbnail.PostTable, postthumbnail.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pt.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (e CategoryEdges) UnsavedPostsOrErr() ([]*UnsavedPost, error) {\n\tif e.loadedTypes[1] {\n\t\treturn e.UnsavedPosts, nil\n\t}\n\treturn nil, &NotLoadedError{edge: \"unsaved_posts\"}\n}",
"func (upu *UnsavedPostUpdate) ClearImages() *UnsavedPostUpdate {\n\tupu.mutation.ClearImages()\n\treturn upu\n}",
"func (upq *UnsavedPostQuery) WithImages(opts ...func(*UnsavedPostImageQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostImageQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withImages = query\n\treturn upq\n}",
"func (c *PostVideoClient) QueryPost(pv *PostVideo) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pv.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postvideo.Table, postvideo.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, postvideo.PostTable, postvideo.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pv.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostVideoClient) Get(ctx context.Context, id int) (*UnsavedPostVideo, error) {\n\treturn c.Query().Where(unsavedpostvideo.ID(id)).Only(ctx)\n}",
"func NewUnsavedPostClient(c config) *UnsavedPostClient {\n\treturn &UnsavedPostClient{config: c}\n}",
"func UnpublishPost(shorturl string) (types.Post, error) {\n\tdb := database.GetMySQLInstance()\n\tdefer db.Close()\n\tvar post types.Post\n\terr := db.Where(\"shorturl LIKE ?\", shorturl).First(&post).Error\n\tif err != nil && err == gorm.ErrRecordNotFound {\n\t\treturn post, errors.New(\"post not found\")\n\t}\n\n\terr = db.Model(&post).Updates(map[string]interface{}{\"published\": false}).Error\n\tif err != nil {\n\t\treturn post, err\n\t}\n\tpost.Published = false\n\treturn post, nil\n}",
"func (c *PostClient) QueryImages(po *Post) *PostImageQuery {\n\tquery := &PostImageQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := po.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(post.Table, post.FieldID, id),\n\t\t\tsqlgraph.To(postimage.Table, postimage.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, post.ImagesTable, post.ImagesColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(po.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) Where(ps ...predicate.UnsavedPost) *UnsavedPostQuery {\n\tupq.predicates = append(upq.predicates, ps...)\n\treturn upq\n}",
"func (upuo *UnsavedPostUpdateOne) Save(ctx context.Context) (*UnsavedPost, error) {\n\tvar (\n\t\terr error\n\t\tnode *UnsavedPost\n\t)\n\tupuo.defaults()\n\tif len(upuo.hooks) == 0 {\n\t\tif err = upuo.check(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tnode, err = upuo.sqlSave(ctx)\n\t} else {\n\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\tmutation, ok := m.(*UnsavedPostMutation)\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t}\n\t\t\tif err = upuo.check(); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tupuo.mutation = mutation\n\t\t\tnode, err = upuo.sqlSave(ctx)\n\t\t\tmutation.done = true\n\t\t\treturn node, err\n\t\t})\n\t\tfor i := len(upuo.hooks) - 1; i >= 0; i-- {\n\t\t\tmut = upuo.hooks[i](mut)\n\t\t}\n\t\tif _, err := mut.Mutate(ctx, upuo.mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn node, err\n}",
"func (upuo *UnsavedPostUpdateOne) ClearImages() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearImages()\n\treturn upuo\n}",
"func (c *UnsavedPostVideoClient) Query() *UnsavedPostVideoQuery {\n\treturn &UnsavedPostVideoQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (upq *UnsavedPostQuery) WithAttachments(opts ...func(*UnsavedPostAttachmentQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostAttachmentQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withAttachments = query\n\treturn upq\n}",
"func (upq *UnsavedPostQuery) AllX(ctx context.Context) []*UnsavedPost {\n\tnodes, err := upq.All(ctx)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn nodes\n}",
"func NewGraphqlPostUnprocessableEntity() *GraphqlPostUnprocessableEntity {\n\n\treturn &GraphqlPostUnprocessableEntity{}\n}",
"func NewUnsavedPostAttachmentClient(c config) *UnsavedPostAttachmentClient {\n\treturn &UnsavedPostAttachmentClient{config: c}\n}",
"func (upq *UnsavedPostQuery) Count(ctx context.Context) (int, error) {\n\tif err := upq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn upq.sqlCount(ctx)\n}",
"func (c *UnsavedPostClient) QueryCategory(up *UnsavedPost) *CategoryQuery {\n\tquery := &CategoryQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(category.Table, category.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpost.CategoryTable, unsavedpost.CategoryColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) WithThumbnail(opts ...func(*UnsavedPostThumbnailQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withThumbnail = query\n\treturn upq\n}",
"func (c *UnsavedPostImageClient) GetX(ctx context.Context, id int) *UnsavedPostImage {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func GetRecentPostMediaNoLogin(username string) (medias []IGMedia, err error) {\n\tui, err := GetUserInfoNoLogin(username)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tfor _, node := range ui.EdgeOwnerToTimelineMedia.Edges {\n\t\tmedias = append(medias, node.Node)\n\t}\n\treturn\n}",
"func (c *UnsavedPostImageClient) Delete() *UnsavedPostImageDelete {\n\tmutation := newUnsavedPostImageMutation(c.config, OpDelete)\n\treturn &UnsavedPostImageDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upq *UnsavedPostQuery) QueryCategory() *CategoryQuery {\n\tquery := &CategoryQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(category.Table, category.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpost.CategoryTable, unsavedpost.CategoryColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func NewPostFavoritesItemsUnprocessableEntity() *PostFavoritesItemsUnprocessableEntity {\n\treturn &PostFavoritesItemsUnprocessableEntity{}\n}",
"func (upq *UnsavedPostQuery) QueryVideos() *UnsavedPostVideoQuery {\n\tquery := &UnsavedPostVideoQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostvideo.Table, unsavedpostvideo.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.VideosTable, unsavedpost.VideosColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (c *AdminClient) QueryPosts(a *Admin) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := a.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(admin.Table, admin.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, admin.PostsTable, admin.PostsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(a.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) QueryAuthor() *AdminQuery {\n\tquery := &AdminQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(admin.Table, admin.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpost.AuthorTable, unsavedpost.AuthorColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostClient) GetX(ctx context.Context, id int) *UnsavedPost {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (upu *UnsavedPostUpdate) Mutation() *UnsavedPostMutation {\n\treturn upu.mutation\n}",
"func (item *Item) Unsave() error {\n\treturn item.changeSave(urlMediaUnsave)\n}",
"func (c *UnsavedPostClient) QueryAuthor(up *UnsavedPost) *AdminQuery {\n\tquery := &AdminQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(admin.Table, admin.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpost.AuthorTable, unsavedpost.AuthorColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostClient) QueryVideos(up *UnsavedPost) *UnsavedPostVideoQuery {\n\tquery := &UnsavedPostVideoQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostvideo.Table, unsavedpostvideo.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.VideosTable, unsavedpost.VideosColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (env *Env) GetUnpublishedPosts(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\tuser := ctx.Value(contextUser).(*models.User)\n\t// Just a double check - should we remove?\n\tif user.Role != \"ADMIN\" {\n\t\tw.WriteHeader(http.StatusForbidden)\n\t}\n\tp, err := env.DB.UnpublishedPosts()\n\tif err != nil {\n\t\tenv.log(r, err)\n\t\tw.WriteHeader(http.StatusNotFound)\n\t\treturn\n\t}\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tw.WriteHeader(http.StatusOK)\n\tjson.NewEncoder(w).Encode(p)\n}",
"func (postL) LoadPostHistories(ctx context.Context, e boil.ContextExecutor, singular bool, maybePost interface{}, mods queries.Applicator) error {\n\tvar slice []*Post\n\tvar object *Post\n\n\tif singular {\n\t\tobject = maybePost.(*Post)\n\t} else {\n\t\tslice = *maybePost.(*[]*Post)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &postR{}\n\t\t}\n\t\targs = append(args, object.ID)\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &postR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif a == obj.ID {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.ID)\n\t\t}\n\t}\n\n\tquery := NewQuery(qm.From(`post_histories`), qm.WhereIn(`post_id in ?`, args...))\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.QueryContext(ctx, e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load post_histories\")\n\t}\n\n\tvar resultSlice []*PostHistory\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice post_histories\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results in eager load on post_histories\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for post_histories\")\n\t}\n\n\tif len(postHistoryAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif singular {\n\t\tobject.R.PostHistories = resultSlice\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif foreign.R == nil {\n\t\t\t\tforeign.R = &postHistoryR{}\n\t\t\t}\n\t\t\tforeign.R.Post = object\n\t\t}\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif local.ID == foreign.PostID {\n\t\t\t\tlocal.R.PostHistories = append(local.R.PostHistories, foreign)\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &postHistoryR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.Post = local\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (upq *UnsavedPostQuery) OnlyX(ctx context.Context) *UnsavedPost {\n\tnode, err := upq.Only(ctx)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn node\n}",
"func NewPDFUnsavedSig() *PDFUnsavedSig {\n\treturn (*PDFUnsavedSig)(allocPDFUnsavedSigMemory(1))\n}",
"func (upu *UnsavedPostUpdate) Where(ps ...predicate.UnsavedPost) *UnsavedPostUpdate {\n\tupu.mutation.predicates = append(upu.mutation.predicates, ps...)\n\treturn upu\n}",
"func (upu *UnsavedPostUpdate) RemoveImages(u ...*UnsavedPostImage) *UnsavedPostUpdate {\n\tids := make([]int, len(u))\n\tfor i := range u {\n\t\tids[i] = u[i].ID\n\t}\n\treturn upu.RemoveImageIDs(ids...)\n}",
"func (c *PostClient) QueryThumbnail(po *Post) *PostThumbnailQuery {\n\tquery := &PostThumbnailQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := po.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(post.Table, post.FieldID, id),\n\t\t\tsqlgraph.To(postthumbnail.Table, postthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, post.ThumbnailTable, post.ThumbnailColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(po.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (s *MockStore) DelPost(id int) error {\n\t_, err := s.GetPost(id)\n\tdelete(s.mem, id)\n\n\treturn err\n}",
"func UnpublishBlogPost(ctx context.Context, id string) error {\n\tq := datastore.NewQuery(blogPostVersionKind).\n\t\tFilter(\"PostID=\", id).\n\t\tFilter(\"Published=\", true)\n\n\tvar posts []BlogPostVersion\n\tk, err := q.GetAll(ctx, &posts)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor i := range posts {\n\t\tposts[i].Published = false\n\t}\n\n\t_, err = datastore.PutMulti(ctx, k, posts)\n\treturn err\n}",
"func (m *IGApiManager) GetRecentPostMedia(username string) (medias []IGMedia, err error) {\n\tui, err := m.GetUserInfo(username)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tfor _, node := range ui.EdgeOwnerToTimelineMedia.Edges {\n\t\tmedias = append(medias, node.Node)\n\t}\n\treturn\n}",
"func (w *Window) PostEmpty() {\n\tglfw.PostEmptyEvent()\n}",
"func NewGraphqlPostUnauthorized() *GraphqlPostUnauthorized {\n\n\treturn &GraphqlPostUnauthorized{}\n}",
"func NewUnsavedPostThumbnailClient(c config) *UnsavedPostThumbnailClient {\n\treturn &UnsavedPostThumbnailClient{config: c}\n}",
"func NewUnsavedPostVideoClient(c config) *UnsavedPostVideoClient {\n\treturn &UnsavedPostVideoClient{config: c}\n}",
"func (upq *UnsavedPostQuery) Unique(unique bool) *UnsavedPostQuery {\n\tupq.unique = &unique\n\treturn upq\n}",
"func (upq *UnsavedPostQuery) FirstX(ctx context.Context) *UnsavedPost {\n\tnode, err := upq.First(ctx)\n\tif err != nil && !IsNotFound(err) {\n\t\tpanic(err)\n\t}\n\treturn node\n}",
"func (upu *UnsavedPostUpdate) ClearAttachments() *UnsavedPostUpdate {\n\tupu.mutation.ClearAttachments()\n\treturn upu\n}",
"func NewKillQueryUnprocessableEntity() *KillQueryUnprocessableEntity {\n\treturn &KillQueryUnprocessableEntity{}\n}",
"func NewPDFUnsavedSigRef(ref unsafe.Pointer) *PDFUnsavedSig {\n\treturn (*PDFUnsavedSig)(ref)\n}",
"func (upq *UnsavedPostQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := upq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn upq.sqlExist(ctx)\n}",
"func (m *IGApiManager) GetSavedPosts() (items []IGItem, err error) {\n\tb, err := getHTTPResponse(urlSaved, m.dsUserId, m.sessionid, m.csrftoken)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tspp := savedPostsResp{}\n\terr = json.Unmarshal(b, &spp)\n\tif err != nil {\n\t\treturn\n\t}\n\tfor _, item := range spp.Items {\n\t\titems = append(items, item.Item)\n\t}\n\n\tfor spp.MoreAvailable {\n\t\turl := urlSaved + \"?max_id=\" + spp.NextMaxId\n\t\tb, err = getHTTPResponse(url, m.dsUserId, m.sessionid, m.csrftoken)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tspp = savedPostsResp{}\n\t\terr = json.Unmarshal(b, &spp)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tfor _, item := range spp.Items {\n\t\t\titems = append(items, item.Item)\n\t\t}\n\t\tlog.Println(\"fetched\", len(items), \"items\")\n\t\t// sleep 500ms to prevent http 429\n\t\ttime.Sleep(500 * time.Millisecond)\n\t}\n\n\treturn\n}",
"func (c *PostClient) QueryAttachments(po *Post) *PostAttachmentQuery {\n\tquery := &PostAttachmentQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := po.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(post.Table, post.FieldID, id),\n\t\t\tsqlgraph.To(postattachment.Table, postattachment.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, post.AttachmentsTable, post.AttachmentsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(po.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (postL) LoadPostUploadFiles(ctx context.Context, e boil.ContextExecutor, singular bool, maybePost interface{}, mods queries.Applicator) error {\n\tvar slice []*Post\n\tvar object *Post\n\n\tif singular {\n\t\tobject = maybePost.(*Post)\n\t} else {\n\t\tslice = *maybePost.(*[]*Post)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &postR{}\n\t\t}\n\t\targs = append(args, object.ID)\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &postR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif a == obj.ID {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.ID)\n\t\t}\n\t}\n\n\tquery := NewQuery(qm.From(`post_upload_files`), qm.WhereIn(`post_id in ?`, args...))\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.QueryContext(ctx, e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load post_upload_files\")\n\t}\n\n\tvar resultSlice []*PostUploadFile\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice post_upload_files\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results in eager load on post_upload_files\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for post_upload_files\")\n\t}\n\n\tif len(postUploadFileAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif singular {\n\t\tobject.R.PostUploadFiles = resultSlice\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif foreign.R == nil {\n\t\t\t\tforeign.R = &postUploadFileR{}\n\t\t\t}\n\t\t\tforeign.R.Post = object\n\t\t}\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif local.ID == foreign.PostID {\n\t\t\t\tlocal.R.PostUploadFiles = append(local.R.PostUploadFiles, foreign)\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &postUploadFileR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.Post = local\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Post) PostHistories(mods ...qm.QueryMod) postHistoryQuery {\n\tvar queryMods []qm.QueryMod\n\tif len(mods) != 0 {\n\t\tqueryMods = append(queryMods, mods...)\n\t}\n\n\tqueryMods = append(queryMods,\n\t\tqm.Where(\"\\\"post_histories\\\".\\\"post_id\\\"=?\", o.ID),\n\t)\n\n\tquery := PostHistories(queryMods...)\n\tqueries.SetFrom(query.Query, \"\\\"post_histories\\\"\")\n\n\tif len(queries.GetSelect(query.Query)) == 0 {\n\t\tqueries.SetSelect(query.Query, []string{\"\\\"post_histories\\\".*\"})\n\t}\n\n\treturn query\n}",
"func (upuo *UnsavedPostUpdateOne) RemoveImages(u ...*UnsavedPostImage) *UnsavedPostUpdateOne {\n\tids := make([]int, len(u))\n\tfor i := range u {\n\t\tids[i] = u[i].ID\n\t}\n\treturn upuo.RemoveImageIDs(ids...)\n}",
"func (c *UnsavedPostClient) Delete() *UnsavedPostDelete {\n\tmutation := newUnsavedPostMutation(c.config, OpDelete)\n\treturn &UnsavedPostDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func NewSearchLogQueryUnprocessableEntity() *SearchLogQueryUnprocessableEntity {\n\treturn &SearchLogQueryUnprocessableEntity{}\n}",
"func (upq *UnsavedPostQuery) WithCategory(opts ...func(*CategoryQuery)) *UnsavedPostQuery {\n\tquery := &CategoryQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withCategory = query\n\treturn upq\n}",
"func (r *Resolver) PostQueryResolver(params graphql.ResolveParams) (interface{}, error) {\n\t// Strip the id from arguments and assert type\n\tid, ok := params.Args[\"id\"].(int)\n\tif ok {\n\t\tposts, err := r.Repository.GetByID(id)\n\t\treturn posts, err\n\t}\n\n\t// We didn't get a valid ID as a param, so we return all the posts\n\treturn r.Repository.GetAllPosts()\n}",
"func NewPostPunchInUnprocessableEntity() *PostPunchInUnprocessableEntity {\n\treturn &PostPunchInUnprocessableEntity{}\n}",
"func (upuo *UnsavedPostUpdateOne) Mutation() *UnsavedPostMutation {\n\treturn upuo.mutation\n}",
"func (repository Posts) Unlike(postID uint64) error {\n\tdbStatement, err := repository.db.Prepare(\n\t\t`UPDATE posts SET likes = \n\t\tCASE WHEN likes > 0 THEN likes - 1\n\t\tELSE likes END\t\n\t\tWHERE id = ?`,\n\t)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer dbStatement.Close()\n\n\tif _, err = dbStatement.Exec(postID); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}",
"func (c *PostImageClient) Get(ctx context.Context, id int) (*PostImage, error) {\n\treturn c.Query().Where(postimage.ID(id)).Only(ctx)\n}",
"func (s *userBatchInfoService) GetUnfinishBatch() (result *datamodels.DbResult) {\n\tbatchs := s.repo.GetUnfinishBatch()\n\tresult = datamodels.NewDbResult(batchs, 0, \"GetUnfinishBatch ok.\")\n\treturn\n}",
"func (c *commentsQueryBuilder) RemovePost() (int64, error) {\n\tif c.err != nil {\n\t\treturn 0, c.err\n\t}\n\trelation, err := NRN_Comments.Model.RelationByIndex(2)\n\tif err != nil {\n\t\treturn 0, errors.Wrapf(mapping.ErrInternal, \"getting 'Post' relation by index for model 'Comment' failed: %v\", err)\n\t}\n\treturn c.builder.RemoveRelations(relation)\n}",
"func (upvc *UnsavedPostVideoCreate) Save(ctx context.Context) (*UnsavedPostVideo, error) {\n\tvar (\n\t\terr error\n\t\tnode *UnsavedPostVideo\n\t)\n\tupvc.defaults()\n\tif len(upvc.hooks) == 0 {\n\t\tif err = upvc.check(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tnode, err = upvc.sqlSave(ctx)\n\t} else {\n\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\tmutation, ok := m.(*UnsavedPostVideoMutation)\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t}\n\t\t\tif err = upvc.check(); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tupvc.mutation = mutation\n\t\t\tnode, err = upvc.sqlSave(ctx)\n\t\t\tmutation.done = true\n\t\t\treturn node, err\n\t\t})\n\t\tfor i := len(upvc.hooks) - 1; i >= 0; i-- {\n\t\t\tmut = upvc.hooks[i](mut)\n\t\t}\n\t\tif _, err := mut.Mutate(ctx, upvc.mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn node, err\n}",
"func (c *UnsavedPostImageClient) Update() *UnsavedPostImageUpdate {\n\tmutation := newUnsavedPostImageMutation(c.config, OpUpdate)\n\treturn &UnsavedPostImageUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (x UnavailableEntity) GetNRDBQuery() nrdb.NRDBResultContainer {\n\treturn x.NRDBQuery\n}",
"func (upu *UnsavedPostUpdate) ClearThumbnail() *UnsavedPostUpdate {\n\tupu.mutation.ClearThumbnail()\n\treturn upu\n}",
"func (upu *UnsavedPostUpdate) ClearTitle() *UnsavedPostUpdate {\n\tupu.mutation.ClearTitle()\n\treturn upu\n}"
] |
[
"0.80704796",
"0.79457265",
"0.7593145",
"0.73064965",
"0.7040536",
"0.674887",
"0.62596077",
"0.61979467",
"0.616961",
"0.59124464",
"0.5847072",
"0.5775152",
"0.5637872",
"0.56228757",
"0.54993886",
"0.54607224",
"0.5451401",
"0.5402577",
"0.536483",
"0.5331986",
"0.5312741",
"0.5297771",
"0.5297162",
"0.5272359",
"0.5270947",
"0.52466327",
"0.5236554",
"0.5235869",
"0.52071315",
"0.5056952",
"0.5055982",
"0.4994379",
"0.4773973",
"0.47367495",
"0.47015432",
"0.47010288",
"0.46156868",
"0.45939457",
"0.4576553",
"0.45623183",
"0.4523916",
"0.45045948",
"0.44762436",
"0.44391894",
"0.43954077",
"0.4381891",
"0.4313968",
"0.4310573",
"0.42999288",
"0.4298862",
"0.4250953",
"0.42477217",
"0.4243225",
"0.4238769",
"0.42211622",
"0.4202864",
"0.42001396",
"0.4184774",
"0.417924",
"0.41758093",
"0.41580614",
"0.41428006",
"0.41344592",
"0.41307777",
"0.41232994",
"0.41134334",
"0.41028756",
"0.41022176",
"0.40942565",
"0.40929344",
"0.40796974",
"0.4078893",
"0.40578666",
"0.4043571",
"0.4034912",
"0.4016234",
"0.40154532",
"0.40013865",
"0.3996478",
"0.3992865",
"0.39888644",
"0.3970674",
"0.3963353",
"0.39564458",
"0.3956422",
"0.39433837",
"0.39416027",
"0.39400515",
"0.39208212",
"0.39072144",
"0.39001942",
"0.38954943",
"0.3887303",
"0.387503",
"0.38721034",
"0.38714755",
"0.38675743",
"0.3867252",
"0.38566735",
"0.38425943"
] |
0.82388717
|
0
|
Hooks returns the client hooks.
|
func (c *UnsavedPostImageClient) Hooks() []Hook {
return c.hooks.UnsavedPostImage
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *OperationClient) Hooks() []Hook {\n\treturn c.hooks.Operation\n}",
"func (c *ToolClient) Hooks() []Hook {\n\treturn c.hooks.Tool\n}",
"func (c *TagClient) Hooks() []Hook {\n\treturn c.hooks.Tag\n}",
"func (c *ComplaintClient) Hooks() []Hook {\n\treturn c.hooks.Complaint\n}",
"func (c *PostClient) Hooks() []Hook {\n\treturn c.hooks.Post\n}",
"func (c *ClubapplicationClient) Hooks() []Hook {\n\treturn c.hooks.Clubapplication\n}",
"func (c *ClinicClient) Hooks() []Hook {\n\treturn c.hooks.Clinic\n}",
"func (c *EventClient) Hooks() []Hook {\n\treturn c.hooks.Event\n}",
"func (c *BuildingClient) Hooks() []Hook {\n\treturn c.hooks.Building\n}",
"func (c *OperativeClient) Hooks() []Hook {\n\treturn c.hooks.Operative\n}",
"func (c *SituationClient) Hooks() []Hook {\n\treturn c.hooks.Situation\n}",
"func (c *AppointmentClient) Hooks() []Hook {\n\treturn c.hooks.Appointment\n}",
"func (c *RentalstatusClient) Hooks() []Hook {\n\treturn c.hooks.Rentalstatus\n}",
"func (c *LeaseClient) Hooks() []Hook {\n\treturn c.hooks.Lease\n}",
"func (c *ReturninvoiceClient) Hooks() []Hook {\n\treturn c.hooks.Returninvoice\n}",
"func (c *ClubappStatusClient) Hooks() []Hook {\n\treturn c.hooks.ClubappStatus\n}",
"func (c *ReviewClient) Hooks() []Hook {\n\treturn c.hooks.Review\n}",
"func (c *EmployeeClient) Hooks() []Hook {\n\treturn c.hooks.Employee\n}",
"func (c *EmployeeClient) Hooks() []Hook {\n\treturn c.hooks.Employee\n}",
"func (c *EmployeeClient) Hooks() []Hook {\n\treturn c.hooks.Employee\n}",
"func (c *WorkExperienceClient) Hooks() []Hook {\n\treturn c.hooks.WorkExperience\n}",
"func (c *PartClient) Hooks() []Hook {\n\treturn c.hooks.Part\n}",
"func (c *CleanernameClient) Hooks() []Hook {\n\treturn c.hooks.Cleanername\n}",
"func (c *BeerClient) Hooks() []Hook {\n\treturn c.hooks.Beer\n}",
"func (c *FoodmenuClient) Hooks() []Hook {\n\treturn c.hooks.Foodmenu\n}",
"func (c *RepairinvoiceClient) Hooks() []Hook {\n\treturn c.hooks.Repairinvoice\n}",
"func (c *StatusdClient) Hooks() []Hook {\n\treturn c.hooks.Statusd\n}",
"func (c *EmptyClient) Hooks() []Hook {\n\treturn c.hooks.Empty\n}",
"func (c *BillClient) Hooks() []Hook {\n\treturn c.hooks.Bill\n}",
"func (c *BillClient) Hooks() []Hook {\n\treturn c.hooks.Bill\n}",
"func (c *BillClient) Hooks() []Hook {\n\treturn c.hooks.Bill\n}",
"func (c *CompanyClient) Hooks() []Hook {\n\treturn c.hooks.Company\n}",
"func (c *CompanyClient) Hooks() []Hook {\n\treturn c.hooks.Company\n}",
"func (c *IPClient) Hooks() []Hook {\n\treturn c.hooks.IP\n}",
"func (c *VeterinarianClient) Hooks() []Hook {\n\treturn c.hooks.Veterinarian\n}",
"func (c *MedicineClient) Hooks() []Hook {\n\treturn c.hooks.Medicine\n}",
"func (c *PrescriptionClient) Hooks() []Hook {\n\treturn c.hooks.Prescription\n}",
"func (c *TransactionClient) Hooks() []Hook {\n\treturn c.hooks.Transaction\n}",
"func (c *CategoryClient) Hooks() []Hook {\n\treturn c.hooks.Category\n}",
"func (c *KeyStoreClient) Hooks() []Hook {\n\treturn c.hooks.KeyStore\n}",
"func (c *PetruleClient) Hooks() []Hook {\n\treturn c.hooks.Petrule\n}",
"func (c *LevelOfDangerousClient) Hooks() []Hook {\n\treturn c.hooks.LevelOfDangerous\n}",
"func (c *AdminClient) Hooks() []Hook {\n\treturn c.hooks.Admin\n}",
"func (c *JobClient) Hooks() []Hook {\n\treturn c.hooks.Job\n}",
"func (c *OrderClient) Hooks() []Hook {\n\treturn c.hooks.Order\n}",
"func (c *PetClient) Hooks() []Hook {\n\treturn c.hooks.Pet\n}",
"func (c *MealplanClient) Hooks() []Hook {\n\treturn c.hooks.Mealplan\n}",
"func (c *DNSBLResponseClient) Hooks() []Hook {\n\treturn c.hooks.DNSBLResponse\n}",
"func (c *RepairInvoiceClient) Hooks() []Hook {\n\treturn c.hooks.RepairInvoice\n}",
"func (c *DoctorClient) Hooks() []Hook {\n\treturn c.hooks.Doctor\n}",
"func (c *StatustClient) Hooks() []Hook {\n\treturn c.hooks.Statust\n}",
"func (c *EatinghistoryClient) Hooks() []Hook {\n\treturn c.hooks.Eatinghistory\n}",
"func (c *StaytypeClient) Hooks() []Hook {\n\treturn c.hooks.Staytype\n}",
"func (c *CustomerClient) Hooks() []Hook {\n\treturn c.hooks.Customer\n}",
"func (c *StatusRClient) Hooks() []Hook {\n\treturn c.hooks.StatusR\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UnitOfMedicineClient) Hooks() []Hook {\n\treturn c.hooks.UnitOfMedicine\n}",
"func (c *YearClient) Hooks() []Hook {\n\treturn c.hooks.Year\n}",
"func (c *ClubClient) Hooks() []Hook {\n\treturn c.hooks.Club\n}",
"func (c *PaymentClient) Hooks() []Hook {\n\treturn c.hooks.Payment\n}",
"func (c *PaymentClient) Hooks() []Hook {\n\treturn c.hooks.Payment\n}",
"func (c *DentistClient) Hooks() []Hook {\n\treturn c.hooks.Dentist\n}",
"func (c *BookingClient) Hooks() []Hook {\n\treturn c.hooks.Booking\n}",
"func (c *DisciplineClient) Hooks() []Hook {\n\treturn c.hooks.Discipline\n}",
"func (c *PlanetClient) Hooks() []Hook {\n\treturn c.hooks.Planet\n}",
"func (c *OperationroomClient) Hooks() []Hook {\n\treturn c.hooks.Operationroom\n}",
"func (c *LengthtimeClient) Hooks() []Hook {\n\treturn c.hooks.Lengthtime\n}",
"func (c *DispenseMedicineClient) Hooks() []Hook {\n\treturn c.hooks.DispenseMedicine\n}",
"func (c *PartorderClient) Hooks() []Hook {\n\treturn c.hooks.Partorder\n}",
"func (c *PatientInfoClient) Hooks() []Hook {\n\treturn c.hooks.PatientInfo\n}",
"func (c *SkillClient) Hooks() []Hook {\n\treturn c.hooks.Skill\n}",
"func (c *PharmacistClient) Hooks() []Hook {\n\treturn c.hooks.Pharmacist\n}",
"func (c *TitleClient) Hooks() []Hook {\n\treturn c.hooks.Title\n}",
"func (c *DepositClient) Hooks() []Hook {\n\treturn c.hooks.Deposit\n}",
"func (c *SessionClient) Hooks() []Hook {\n\treturn c.hooks.Session\n}",
"func (c *PostImageClient) Hooks() []Hook {\n\treturn c.hooks.PostImage\n}",
"func (c *DrugAllergyClient) Hooks() []Hook {\n\treturn c.hooks.DrugAllergy\n}",
"func (c *TimerClient) Hooks() []Hook {\n\treturn c.hooks.Timer\n}",
"func (c *PostAttachmentClient) Hooks() []Hook {\n\treturn c.hooks.PostAttachment\n}",
"func (c *PhysicianClient) Hooks() []Hook {\n\treturn c.hooks.Physician\n}",
"func (c *PhysicianClient) Hooks() []Hook {\n\treturn c.hooks.Physician\n}",
"func (c *PatientClient) Hooks() []Hook {\n\treturn c.hooks.Patient\n}",
"func (c *PatientClient) Hooks() []Hook {\n\treturn c.hooks.Patient\n}",
"func (c *PatientClient) Hooks() []Hook {\n\treturn c.hooks.Patient\n}",
"func (c *PostThumbnailClient) Hooks() []Hook {\n\treturn c.hooks.PostThumbnail\n}",
"func (c *BedtypeClient) Hooks() []Hook {\n\treturn c.hooks.Bedtype\n}",
"func (c *CoinInfoClient) Hooks() []Hook {\n\treturn c.hooks.CoinInfo\n}",
"func (c *OperativerecordClient) Hooks() []Hook {\n\treturn c.hooks.Operativerecord\n}",
"func (c *ActivitiesClient) Hooks() []Hook {\n\treturn c.hooks.Activities\n}",
"func (c *AdminSessionClient) Hooks() []Hook {\n\treturn c.hooks.AdminSession\n}",
"func (c *MedicineTypeClient) Hooks() []Hook {\n\treturn c.hooks.MedicineType\n}"
] |
[
"0.80325735",
"0.790398",
"0.78864676",
"0.78840053",
"0.78618014",
"0.78288174",
"0.7817571",
"0.7800003",
"0.77909994",
"0.77634746",
"0.7746418",
"0.77408934",
"0.7737971",
"0.77244073",
"0.77163273",
"0.771004",
"0.76985544",
"0.7696134",
"0.7696134",
"0.7696134",
"0.76921564",
"0.76725936",
"0.76697093",
"0.7666844",
"0.76660186",
"0.765927",
"0.7627814",
"0.7619907",
"0.7617588",
"0.7617588",
"0.7617588",
"0.7613897",
"0.7613897",
"0.76138216",
"0.760849",
"0.7607455",
"0.76074445",
"0.7601674",
"0.75984216",
"0.75958437",
"0.75944996",
"0.7589656",
"0.7585323",
"0.75841326",
"0.75812864",
"0.7569302",
"0.7560664",
"0.75604796",
"0.75519186",
"0.75509745",
"0.7532829",
"0.7532022",
"0.75310445",
"0.7526489",
"0.75222003",
"0.75040776",
"0.75040776",
"0.75040776",
"0.75040776",
"0.75040776",
"0.75040776",
"0.75040776",
"0.75040776",
"0.75040776",
"0.75040776",
"0.75040776",
"0.75038844",
"0.750118",
"0.74977213",
"0.7493581",
"0.7493581",
"0.7492812",
"0.7492088",
"0.7490202",
"0.7483538",
"0.7482547",
"0.74728894",
"0.7463062",
"0.74548906",
"0.74490273",
"0.7446456",
"0.74431694",
"0.74349844",
"0.7420574",
"0.7416939",
"0.74114937",
"0.74111134",
"0.7409104",
"0.7395227",
"0.7395143",
"0.7395143",
"0.73937327",
"0.73937327",
"0.73937327",
"0.73888427",
"0.7388035",
"0.73768663",
"0.7369236",
"0.7357418",
"0.73540497",
"0.7353824"
] |
0.0
|
-1
|
NewUnsavedPostThumbnailClient returns a client for the UnsavedPostThumbnail from the given config.
|
func NewUnsavedPostThumbnailClient(c config) *UnsavedPostThumbnailClient {
return &UnsavedPostThumbnailClient{config: c}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func NewUnsavedPostImageClient(c config) *UnsavedPostImageClient {\n\treturn &UnsavedPostImageClient{config: c}\n}",
"func (c *UnsavedPostThumbnailClient) Get(ctx context.Context, id int) (*UnsavedPostThumbnail, error) {\n\treturn c.Query().Where(unsavedpostthumbnail.ID(id)).Only(ctx)\n}",
"func NewUnsavedPostAttachmentClient(c config) *UnsavedPostAttachmentClient {\n\treturn &UnsavedPostAttachmentClient{config: c}\n}",
"func NewUnsavedPostClient(c config) *UnsavedPostClient {\n\treturn &UnsavedPostClient{config: c}\n}",
"func NewPostThumbnailClient(c config) *PostThumbnailClient {\n\treturn &PostThumbnailClient{config: c}\n}",
"func (c *UnsavedPostThumbnailClient) Delete() *UnsavedPostThumbnailDelete {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpDelete)\n\treturn &UnsavedPostThumbnailDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostThumbnailClient) Create() *UnsavedPostThumbnailCreate {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpCreate)\n\treturn &UnsavedPostThumbnailCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func NewUnsavedPostVideoClient(c config) *UnsavedPostVideoClient {\n\treturn &UnsavedPostVideoClient{config: c}\n}",
"func (c *UnsavedPostImageClient) Get(ctx context.Context, id int) (*UnsavedPostImage, error) {\n\treturn c.Query().Where(unsavedpostimage.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostThumbnailClient) Query() *UnsavedPostThumbnailQuery {\n\treturn &UnsavedPostThumbnailQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (upu *UnsavedPostUpdate) ClearThumbnail() *UnsavedPostUpdate {\n\tupu.mutation.ClearThumbnail()\n\treturn upu\n}",
"func (c *PostThumbnailClient) Delete() *PostThumbnailDelete {\n\tmutation := newPostThumbnailMutation(c.config, OpDelete)\n\treturn &PostThumbnailDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func NewPostImageClient(c config) *PostImageClient {\n\treturn &PostImageClient{config: c}\n}",
"func (upuo *UnsavedPostUpdateOne) ClearThumbnail() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearThumbnail()\n\treturn upuo\n}",
"func (c *PostThumbnailClient) Get(ctx context.Context, id int) (*PostThumbnail, error) {\n\treturn c.Query().Where(postthumbnail.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostThumbnailClient) Update() *UnsavedPostThumbnailUpdate {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpUpdate)\n\treturn &UnsavedPostThumbnailUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *Config) UnauthedClient() *github.Client {\n\tvar t http.RoundTripper = c.baseTransport()\n\tif c.Cache != nil {\n\t\tt = &httpcache.Transport{\n\t\t\tCache: c.Cache,\n\t\t\tTransport: t,\n\t\t\tMarkCachedResponses: true,\n\t\t}\n\t}\n\tt = NewGitHubCacheControlTransport(c.CacheControl, t)\n\tif c.OAuth.ClientID != \"\" {\n\t\tt = &github.UnauthenticatedRateLimitedTransport{\n\t\t\tClientID: c.OAuth.ClientID,\n\t\t\tClientSecret: c.OAuth.ClientSecret,\n\t\t\tTransport: t,\n\t\t}\n\t}\n\n\treturn c.client(&http.Client{Transport: t})\n}",
"func (c *UnsavedPostImageClient) Delete() *UnsavedPostImageDelete {\n\tmutation := newUnsavedPostImageMutation(c.config, OpDelete)\n\treturn &UnsavedPostImageDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upq *UnsavedPostQuery) WithThumbnail(opts ...func(*UnsavedPostThumbnailQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withThumbnail = query\n\treturn upq\n}",
"func (c *UnsavedPostClient) QueryThumbnail(up *UnsavedPost) *UnsavedPostThumbnailQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, unsavedpost.ThumbnailTable, unsavedpost.ThumbnailColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostThumbnailClient) Use(hooks ...Hook) {\n\tc.hooks.UnsavedPostThumbnail = append(c.hooks.UnsavedPostThumbnail, hooks...)\n}",
"func (c *UnsavedPostImageClient) Create() *UnsavedPostImageCreate {\n\tmutation := newUnsavedPostImageMutation(c.config, OpCreate)\n\treturn &UnsavedPostImageCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostThumbnailClient) GetX(ctx context.Context, id int) *UnsavedPostThumbnail {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *PostThumbnailClient) Create() *PostThumbnailCreate {\n\tmutation := newPostThumbnailMutation(c.config, OpCreate)\n\treturn &PostThumbnailCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostClient) Get(ctx context.Context, id int) (*UnsavedPost, error) {\n\treturn c.Query().Where(unsavedpost.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostAttachmentClient) Get(ctx context.Context, id int) (*UnsavedPostAttachment, error) {\n\treturn c.Query().Where(unsavedpostattachment.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostThumbnailClient) QueryUnsavedPost(upt *UnsavedPostThumbnail) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upt.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, true, unsavedpostthumbnail.UnsavedPostTable, unsavedpostthumbnail.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upt.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func NewPostAttachmentClient(c config) *PostAttachmentClient {\n\treturn &PostAttachmentClient{config: c}\n}",
"func (c *UnsavedPostClient) Delete() *UnsavedPostDelete {\n\tmutation := newUnsavedPostMutation(c.config, OpDelete)\n\treturn &UnsavedPostDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostImageClient) Query() *UnsavedPostImageQuery {\n\treturn &UnsavedPostImageQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func NewPostClient(c config) *PostClient {\n\treturn &PostClient{config: c}\n}",
"func (c *UnsavedPostAttachmentClient) Delete() *UnsavedPostAttachmentDelete {\n\tmutation := newUnsavedPostAttachmentMutation(c.config, OpDelete)\n\treturn &UnsavedPostAttachmentDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostThumbnailClient) Query() *PostThumbnailQuery {\n\treturn &PostThumbnailQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *PostImageClient) Delete() *PostImageDelete {\n\tmutation := newPostImageMutation(c.config, OpDelete)\n\treturn &PostImageDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func NewGetThumbnailInput() *GetThumbnailInput {\n\treturn &GetThumbnailInput{\n\t\tFormat: ThumbnailFormatJPEG,\n\t\tSize: ThumbnailSizeW64H64,\n\t\tMode: ThumbnailModeStrict,\n\t}\n}",
"func (upq *UnsavedPostQuery) QueryThumbnail() *UnsavedPostThumbnailQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, unsavedpost.ThumbnailTable, unsavedpost.ThumbnailColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostThumbnailClient) Hooks() []Hook {\n\treturn c.hooks.UnsavedPostThumbnail\n}",
"func (c *PostImageClient) Get(ctx context.Context, id int) (*PostImage, error) {\n\treturn c.Query().Where(postimage.ID(id)).Only(ctx)\n}",
"func (m *ChatMessageAttachment) GetThumbnailUrl()(*string) {\n val, err := m.GetBackingStore().Get(\"thumbnailUrl\")\n if err != nil {\n panic(err)\n }\n if val != nil {\n return val.(*string)\n }\n return nil\n}",
"func NewUnroutedHandler(config Config) (*unroutedHandler, error) {\n if handler != nil {\n return handler, nil\n }\n\n if err := config.validate(); err != nil {\n return nil, err\n }\n\n // Only promote extesions using the Tus-Extension header which are implemented\n extensions := \"creation,creation-with-upload\"\n if config.StoreComposer.UsesTerminater {\n extensions += \",termination\"\n }\n if config.StoreComposer.UsesConcater {\n extensions += \",concatenation\"\n }\n if config.StoreComposer.UsesLengthDeferrer {\n extensions += \",creation-defer-length\"\n }\n\n handler = &unroutedHandler{\n config: config,\n composer: config.StoreComposer,\n basePath: config.BasePath,\n isBasePathAbs: config.isAbs,\n CompleteUploads: make(chan tusd.FileInfo),\n TerminatedUploads: make(chan tusd.FileInfo),\n UploadProgress: make(chan tusd.FileInfo),\n CreatedUploads: make(chan tusd.FileInfo),\n logger: config.Logger,\n extensions: extensions,\n Metrics: newMetrics(),\n }\n\n return handler, nil\n}",
"func getClient(ctx context.Context, config *oauth2.Config) (*http.Client, error) {\n\ttokFile, err := xdg.CacheFile(\"gphotos-fb/token.json\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"xdg.CacheFile: %w\", err)\n\t}\n\n\ttok, err := tokenFromFile(tokFile)\n\tif err != nil {\n\t\ttok, err := getTokenFromWeb(ctx, config)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"getTokenFromWeb: %w\", err)\n\t\t}\n\n\t\tif err := saveToken(tokFile, tok); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"saveToken: %w\", err)\n\t\t}\n\t}\n\treturn config.Client(ctx, tok), nil\n}",
"func (c *UnsavedPostClient) Create() *UnsavedPostCreate {\n\tmutation := newUnsavedPostMutation(c.config, OpCreate)\n\treturn &UnsavedPostCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func New(config *model.NotifAmqp, app model.App) notifier.Notifier {\n\treturn notifier.Notifier{\n\t\tHandler: &Client{\n\t\t\tcfg: config,\n\t\t\tapp: app,\n\t\t},\n\t}\n}",
"func (c *UnsavedPostAttachmentClient) Create() *UnsavedPostAttachmentCreate {\n\tmutation := newUnsavedPostAttachmentMutation(c.config, OpCreate)\n\treturn &UnsavedPostAttachmentCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostAttachmentClient) Query() *UnsavedPostAttachmentQuery {\n\treturn &UnsavedPostAttachmentQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func UndecoratedStorage(\n\tconfig *storagebackend.ConfigForResource,\n\tresourcePrefix string,\n\tkeyFunc func(obj runtime.Object) (string, error),\n\tnewFunc func() runtime.Object,\n\tnewListFunc func() runtime.Object,\n\tgetAttrsFunc storage.AttrFunc,\n\ttrigger storage.IndexerFuncs,\n\tindexers *cache.Indexers) (storage.Interface, factory.DestroyFunc, error) {\n\treturn NewRawStorage(config, newFunc)\n}",
"func (a *UtilsApiService) CreateNotificationClientUsingPost(ctx context.Context, notificationClient NotificationClient) (NotificationClient, *http.Response, error) {\n\tvar (\n\t\tlocalVarHttpMethod = strings.ToUpper(\"Post\")\n\t\tlocalVarPostBody interface{}\n\t\tlocalVarFileName string\n\t\tlocalVarFileBytes []byte\n\t\tlocalVarReturnValue NotificationClient\n\t)\n\n\t// create path and map variables\n\ta.client = NewAPIClient(&Configuration{\n\t\tBasePath: ctx.Value(\"BasePath\").(string),\n\t\tDefaultHeader: make(map[string]string),\n\t\tUserAgent: \"Swagger-Codegen/1.0.0/go\",\n\t})\n\tlocalVarPath := a.client.cfg.BasePath + \"/nucleus/v1/notification_client\"\n\n\tlocalVarHeaderParams := make(map[string]string)\n\tlocalVarQueryParams := url.Values{}\n\tlocalVarFormParams := url.Values{}\n\n\t// to determine the Content-Type header\n\tlocalVarHttpContentTypes := []string{\"application/json\"}\n\n\t// set Content-Type header\n\tlocalVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)\n\tif localVarHttpContentType != \"\" {\n\t\tlocalVarHeaderParams[\"Content-Type\"] = localVarHttpContentType\n\t}\n\n\t// to determine the Accept header\n\tlocalVarHttpHeaderAccepts := []string{\"*/*\"}\n\n\t// set Accept header\n\tlocalVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)\n\tif localVarHttpHeaderAccept != \"\" {\n\t\tlocalVarHeaderParams[\"Accept\"] = localVarHttpHeaderAccept\n\t}\n\t// body params\n\tlocalVarPostBody = ¬ificationClient\n\tr, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, err\n\t}\n\n\tlocalVarHttpResponse, err := a.client.callAPI(r)\n\tif err != nil || localVarHttpResponse == nil {\n\t\treturn localVarReturnValue, localVarHttpResponse, err\n\t}\n\n\tlocalVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)\n\tlocalVarHttpResponse.Body.Close()\n\tif err != nil {\n\t\treturn localVarReturnValue, localVarHttpResponse, err\n\t}\n\n\tif localVarHttpResponse.StatusCode < 300 {\n\t\t// If we succeed, return the data, otherwise pass on to decode error.\n\t\terr = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get(\"Content-Type\"))\n\t\treturn localVarReturnValue, localVarHttpResponse, err\n\t}\n\n\tif localVarHttpResponse.StatusCode >= 300 {\n\t\tnewErr := GenericSwaggerError{\n\t\t\tbody: localVarBody,\n\t\t\terror: localVarHttpResponse.Status,\n\t\t}\n\n\t\tif localVarHttpResponse.StatusCode == 200 {\n\t\t\tvar v NotificationClient\n\t\t\terr = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get(\"Content-Type\"))\n\t\t\tif err != nil {\n\t\t\t\tnewErr.error = err.Error()\n\t\t\t\treturn localVarReturnValue, localVarHttpResponse, newErr\n\t\t\t}\n\t\t\tnewErr.model = v\n\t\t\treturn localVarReturnValue, localVarHttpResponse, newErr\n\t\t}\n\n\t\treturn localVarReturnValue, localVarHttpResponse, newErr\n\t}\n\n\treturn localVarReturnValue, localVarHttpResponse, nil\n}",
"func (c *PostThumbnailClient) Update() *PostThumbnailUpdate {\n\tmutation := newPostThumbnailMutation(c.config, OpUpdate)\n\treturn &PostThumbnailUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func New(config *ConnConfig, ntfnHandlers *NotificationHandlers) (*Client, error) {\n\t// Either open a websocket connection or create an HTTP client depending\n\t// on the HTTP POST mode. Also, set the notification handlers to nil\n\t// when running in HTTP POST mode.\n\tvar wsConn *websocket.Conn\n\tvar httpClient *http.Client\n\tconnEstablished := make(chan struct{})\n\tvar start bool\n\tif config.HTTPPostMode {\n\t\tntfnHandlers = nil\n\t\tstart = true\n\n\t\tvar err error\n\t\thttpClient, err = newHTTPClient(config)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t} else {\n\t\tif !config.DisableConnectOnNew {\n\t\t\tvar err error\n\t\t\twsConn, err = dial(config)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tstart = true\n\t\t}\n\t}\n\n\tclient := &Client{\n\t\tconfig: config,\n\t\twsConn: wsConn,\n\t\thttpClient: httpClient,\n\t\trequestMap: make(map[uint64]*list.Element),\n\t\trequestList: list.New(),\n\t\tntfnHandlers: ntfnHandlers,\n\t\tntfnState: newNotificationState(),\n\t\tsendChan: make(chan []byte, sendBufferSize),\n\t\tsendPostChan: make(chan *sendPostDetails, sendPostBufferSize),\n\t\tconnEstablished: connEstablished,\n\t\tdisconnect: make(chan struct{}),\n\t\tshutdown: make(chan struct{}),\n\t}\n\n\tif start {\n\t\tlog.Infof(\"Established connection to RPC server %s\",\n\t\t\tconfig.Host)\n\t\tclose(connEstablished)\n\t\tclient.start()\n\t\tif !client.config.HTTPPostMode && !client.config.DisableAutoReconnect {\n\t\t\tclient.wg.Add(1)\n\t\t\tgo client.wsReconnectHandler()\n\t\t}\n\t}\n\n\treturn client, nil\n}",
"func NewClient(store db.Store) *textileClient {\n\treturn &textileClient{\n\t\tstore: store,\n\t\tthreads: nil,\n\t\tbucketsClient: nil,\n\t\tnetc: nil,\n\t\tisRunning: false,\n\t\tReady: make(chan bool),\n\t\tisConnectedToHub: false,\n\t}\n}",
"func (c *UnsavedPostImageClient) GetX(ctx context.Context, id int) *UnsavedPostImage {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func NewPostVideoClient(c config) *PostVideoClient {\n\treturn &PostVideoClient{config: c}\n}",
"func (c *PostThumbnailClient) GetX(ctx context.Context, id int) *PostThumbnail {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func NewForConfig(c *rest.Config) (*KudzuV1alpha1Client, error) {\n\tconfig := *c\n\tif err := setConfigDefaults(&config); err != nil {\n\t\treturn nil, err\n\t}\n\tclient, err := rest.RESTClientFor(&config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &KudzuV1alpha1Client{client}, nil\n}",
"func (c *UnsavedPostVideoClient) Get(ctx context.Context, id int) (*UnsavedPostVideo, error) {\n\treturn c.Query().Where(unsavedpostvideo.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostImageClient) QueryUnsavedPost(upi *UnsavedPostImage) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upi.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostimage.Table, unsavedpostimage.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostimage.UnsavedPostTable, unsavedpostimage.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upi.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (s *StorageService) GetThumbnail(\n\tsize int,\n\tuserID *mytype.OID,\n\tkey string,\n) (*minio.Object, error) {\n\tsizeStr := strconv.FormatInt(int64(size), 10)\n\t// Thumbnail objects are identified with a -'size' at the end of the key\n\tthumbKey := key + \"--\" + sizeStr\n\tthumbLocal := \"./tmp/\" + thumbKey + \".jpg\"\n\n\tobjectName := fmt.Sprintf(\n\t\t\"%s/%s/%s/%s\",\n\t\tthumbKey[:2],\n\t\tthumbKey[3:5],\n\t\tthumbKey[6:8],\n\t\tthumbKey[9:],\n\t)\n\tobjectPath := strings.Join([]string{\n\t\tuserID.Short,\n\t\tobjectName,\n\t}, \"/\")\n\n\tobjInfo, err := s.svc.StatObject(\n\t\ts.bucket,\n\t\tobjectPath,\n\t\tminio.StatObjectOptions{},\n\t)\n\tif err != nil {\n\t\tminioError := minio.ToErrorResponse(err)\n\t\tif minioError.Code != \"NoSuchKey\" {\n\t\t\tmylog.Log.WithError(err).Error(util.Trace(\"\"))\n\t\t\treturn nil, err\n\t\t}\n\n\t\tmylog.Log.Info(\"generating new thumbnail...\")\n\n\t\tasset, err := s.Get(userID, key)\n\t\tif err != nil {\n\t\t\tmylog.Log.WithError(err).Error(util.Trace(\"\"))\n\t\t\treturn nil, err\n\t\t}\n\n\t\timg, err := imaging.Decode(asset)\n\t\tif err != nil {\n\t\t\tmylog.Log.WithError(err).Error(util.Trace(\"\"))\n\t\t\treturn nil, err\n\t\t}\n\t\tthumb := imaging.Thumbnail(img, size, size, imaging.CatmullRom)\n\n\t\t// create a new blank image\n\t\tdst := imaging.New(size, size, color.NRGBA{0, 0, 0, 0})\n\n\t\t// paste thumbnails into the new image\n\t\tdst = imaging.Paste(dst, thumb, image.Pt(0, 0))\n\n\t\t// ensure path is available\n\t\tdir := filepath.Dir(thumbLocal)\n\t\tif err := os.MkdirAll(dir, os.ModePerm); err != nil {\n\t\t\tmylog.Log.WithError(err).Error(util.Trace(\"\"))\n\t\t\treturn nil, err\n\t\t}\n\n\t\terr = imaging.Save(dst, thumbLocal)\n\t\tif err != nil {\n\t\t\tmylog.Log.WithError(err).Error(util.Trace(\"\"))\n\t\t\treturn nil, err\n\t\t}\n\n\t\tthumbFile, err := os.Open(thumbLocal)\n\t\tif err != nil {\n\t\t\tmylog.Log.WithError(err).Error(util.Trace(\"\"))\n\t\t\treturn nil, err\n\t\t}\n\n\t\tthumbStat, err := thumbFile.Stat()\n\t\tif err != nil {\n\t\t\tmylog.Log.WithError(err).Error(util.Trace(\"\"))\n\t\t\treturn nil, err\n\t\t}\n\n\t\t_, err = s.svc.PutObject(\n\t\t\ts.bucket,\n\t\t\tobjectPath,\n\t\t\tthumbFile,\n\t\t\tthumbStat.Size(),\n\t\t\tminio.PutObjectOptions{ContentType: objInfo.ContentType},\n\t\t)\n\t\tif err != nil {\n\t\t\tmylog.Log.WithError(err).Error(util.Trace(\"\"))\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tmylog.Log.WithFields(logrus.Fields{\n\t\t\"size\": size,\n\t\t\"user_id\": userID.String,\n\t\t\"key\": key,\n\t}).Info(util.Trace(\"thumbnail found\"))\n\treturn s.svc.GetObject(\n\t\ts.bucket,\n\t\tobjectPath,\n\t\tminio.GetObjectOptions{},\n\t)\n}",
"func NewThumbnailFromFile(file string, width, height int, crop Interesting) (*ImageRef, error) {\n\treturn LoadThumbnailFromFile(file, width, height, crop, SizeBoth, nil)\n}",
"func (c *UnsavedPostThumbnailClient) DeleteOne(upt *UnsavedPostThumbnail) *UnsavedPostThumbnailDeleteOne {\n\treturn c.DeleteOneID(upt.ID)\n}",
"func New(config *model.NotifMail, meta model.Meta) notifier.Notifier {\n\treturn notifier.Notifier{\n\t\tHandler: &Client{\n\t\t\tcfg: config,\n\t\t\tmeta: meta,\n\t\t},\n\t}\n}",
"func (c *PostClient) QueryThumbnail(po *Post) *PostThumbnailQuery {\n\tquery := &PostThumbnailQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := po.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(post.Table, post.FieldID, id),\n\t\t\tsqlgraph.To(postthumbnail.Table, postthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, post.ThumbnailTable, post.ThumbnailColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(po.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func New(config Config) (*ScreenlyClient, error) {\n\turl, err := url.Parse(config.ENDPOINT)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ttimeout := time.Duration(config.TIMEOUT) * time.Second\n\thttpClient := &http.Client{Timeout: timeout}\n\treturn &ScreenlyClient{httpClient: httpClient, BaseUrl: url}, nil\n}",
"func NewClient(config *triton.ClientConfig) (*StorageClient, error) {\n\t// TODO: Utilize config interface within the function itself\n\tclient, err := client.New(config.TritonURL, config.MantaURL, config.AccountName, config.Signers...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn newStorageClient(client), nil\n}",
"func NewClient(cfg *config.Configuration) (*Client, error) {\n\trc, err := rest.New(Url)\n\tif err != nil {\n\t\treturn &Client{}, err\n\t}\n\n\tclient := &Client{\n\t\tconfig: cfg,\n\t\tclient: rc,\n\t\tlimiter: rate.NewLimiter(30, 5),\n\t}\n\n\treturn client, nil\n}",
"func NewClient(conf config.RemoteWriteConfig) (*Client, error) {\n\ttlsConfig, err := httputil.NewTLSConfig(conf.TLSConfig)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// The only timeout we care about is the configured push timeout.\n\t// It is applied on request. So we leave out any timings here.\n\tvar rt http.RoundTripper = &http.Transport{\n\t\tProxy: http.ProxyURL(conf.ProxyURL.URL),\n\t\tTLSClientConfig: tlsConfig,\n\t}\n\n\tif conf.BasicAuth != nil {\n\t\trt = httputil.NewBasicAuthRoundTripper(conf.BasicAuth.Username, conf.BasicAuth.Password, rt)\n\t}\n\n\treturn &Client{\n\t\turl: *conf.URL,\n\t\tclient: httputil.NewClient(rt),\n\t\ttimeout: time.Duration(conf.RemoteTimeout),\n\t}, nil\n}",
"func (c *PostAttachmentClient) Delete() *PostAttachmentDelete {\n\tmutation := newPostAttachmentMutation(c.config, OpDelete)\n\treturn &PostAttachmentDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func NewClient(config *Config) (c *Client, err error) {\n\tif config == nil {\n\t\treturn nil, errClientConfigNil\n\t}\n\n\tc = &Client{\n\t\trevocationTransport: http.DefaultTransport,\n\t}\n\n\tif c.transport, err = ghinstallation.NewAppsTransport(\n\t\thttp.DefaultTransport,\n\t\tint64(config.AppID),\n\t\t[]byte(config.PrvKey),\n\t); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif c.url, err = url.ParseRequestURI(fmt.Sprintf(\n\t\t\"%s/app/installations/%v/access_tokens\",\n\t\tstrings.TrimSuffix(fmt.Sprint(config.BaseURL), \"/\"),\n\t\tconfig.InsID,\n\t)); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif c.revocationURL, err = url.ParseRequestURI(fmt.Sprintf(\n\t\t\"%s/installation/token\",\n\t\tstrings.TrimSuffix(fmt.Sprint(config.BaseURL), \"/\"),\n\t)); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn c, nil\n}",
"func New(httpClient *http.Client, opts *ClientOptions) (*Client, error) {\n\tif err := opts.Validate(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tbaseURL, err := url.Parse(opts.Host)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"error parsing host URL\")\n\t}\n\n\tclient := Client{\n\t\tbaseURL: baseURL,\n\t\tkey: opts.Key,\n\t\tversion: opts.Version,\n\t\tapiPath: opts.GhostPath,\n\t\thttpClient: httpClient,\n\t}\n\n\tclient.Posts = &PostResource{&client}\n\tclient.Pages = &PageResource{&client}\n\tclient.Authors = &AuthorResource{&client}\n\tclient.Tags = &TagResource{&client}\n\n\treturn &client, nil\n}",
"func New(config string, channels ...string) (*client, error) {\n\t// parse the url provided\n\toptions, err := redis.ParseURL(config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// create the Redis client from the parsed url\n\tqueue := redis.NewClient(options)\n\n\t// setup queue with proper configuration\n\terr = setupQueue(queue)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// create the client object\n\tclient := &client{\n\t\tQueue: queue,\n\t\tOptions: options,\n\t}\n\n\treturn client, nil\n}",
"func New(config *rest.Config) (Client, error) {\n\tkubeset, err := kubernetes.NewForConfig(config)\n\tif err != nil {\n\t\treturn Client{}, err\n\t}\n\treturn Client{\n\t\tkubeset: kubeset,\n\t}, nil\n}",
"func (c *UnsavedPostVideoClient) Delete() *UnsavedPostVideoDelete {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpDelete)\n\treturn &UnsavedPostVideoDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostClient) Query() *UnsavedPostQuery {\n\treturn &UnsavedPostQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func NewForConfig(c *rest.Config) (*ConfigV1Client, error) {\n\tconfig := *c\n\tif err := setConfigDefaults(&config); err != nil {\n\t\treturn nil, err\n\t}\n\thttpClient, err := rest.HTTPClientFor(&config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn NewForConfigAndClient(&config, httpClient)\n}",
"func NewWithoutDefaults(endpoint string) BaseClient {\n\treturn BaseClient{\n\t\tClient: autorest.NewClientWithUserAgent(UserAgent()),\n\t\tEndpoint: endpoint,\n\t}\n}",
"func (c *UnsavedPostAttachmentClient) QueryUnsavedPost(upa *UnsavedPostAttachment) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upa.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostattachment.Table, unsavedpostattachment.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostattachment.UnsavedPostTable, unsavedpostattachment.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upa.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (factory *secretClientFactory) NewSecretClient(ctx context.Context,\n\tconfig SecretConfig,\n\tlc loggingClient,\n\ttokenExpiredCallback tokenExpiredCallback) (pkg.SecretClient, error) {\n\tif ctx == nil {\n\t\treturn nil, pkg.NewErrSecretStore(\"background ctx is required and cannot be nil\")\n\t}\n\n\ttokenStr := config.Authentication.AuthToken\n\tif tokenStr == \"\" {\n\t\treturn nil, pkg.NewErrSecretStore(\"AuthToken is required in config\")\n\t}\n\n\thttpClient, err := createHTTPClient(config)\n\tif err != nil {\n\t\treturn Client{}, err\n\t}\n\n\tif config.RetryWaitPeriod != \"\" {\n\t\tretryTimeDuration, err := time.ParseDuration(config.RetryWaitPeriod)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tconfig.retryWaitPeriodTime = retryTimeDuration\n\t}\n\n\tsecretClient := Client{\n\t\tHttpConfig: config,\n\t\tHttpCaller: httpClient,\n\t\tlc: lc,\n\t}\n\n\tfactory.mapMutex.Lock()\n\t// if there is context already associated with the given token,\n\t// then we cancel it first\n\tif cancel, exists := factory.tokenCancelFunc[tokenStr]; exists {\n\t\tcancel()\n\t}\n\tfactory.mapMutex.Unlock()\n\n\tcCtx, cancel := context.WithCancel(ctx)\n\tif err = secretClient.refreshToken(cCtx, tokenExpiredCallback); err != nil {\n\t\tcancel()\n\t\tfactory.mapMutex.Lock()\n\t\tdelete(factory.tokenCancelFunc, tokenStr)\n\t\tfactory.mapMutex.Unlock()\n\t} else {\n\t\tfactory.mapMutex.Lock()\n\t\tfactory.tokenCancelFunc[tokenStr] = cancel\n\t\tfactory.mapMutex.Unlock()\n\t}\n\n\treturn secretClient, err\n}",
"func NewClient(config Config) Client {\n\ttyp := config.Type()\n\n\tswitch typ {\n\tcase Bolt:\n\t\tbe := NewBoltBackend(config.(*BoltConfig))\n\t\t// TODO: Return an error instead of panicking.\n\t\tif err := be.Open(); err != nil {\n\t\t\tpanic(fmt.Errorf(\"Opening bolt backend: %s\", err))\n\t\t}\n\t\tq := NewBoltQueue(be.db)\n\t\treturn newKVClient(be, q)\n\n\tcase Rocks:\n\t\t// MORE TEMPORARY UGLINESS TO MAKE IT WORK FOR NOW:\n\t\tif err := os.MkdirAll(config.(*RocksConfig).Dir, os.FileMode(int(0700))); err != nil {\n\t\t\tpanic(fmt.Errorf(\"Creating rocks directory %q: %s\", config.(*RocksConfig).Dir, err))\n\t\t}\n\t\tbe := NewRocksBackend(config.(*RocksConfig))\n\t\tqueueFile := filepath.Join(config.(*RocksConfig).Dir, DefaultBoltQueueFilename)\n\t\tdb, err := bolt.Open(queueFile, 0600, NewBoltConfig(\"\").BoltOptions)\n\t\tif err != nil {\n\t\t\tpanic(fmt.Errorf(\"Creating bolt queue: %s\", err))\n\t\t}\n\t\tq := NewBoltQueue(db)\n\t\treturn newKVClient(be, q)\n\n\tcase Postgres:\n\t\tbe := NewPostgresBackend(config.(*PostgresConfig))\n\t\tq := NewPostgresQueue(config.(*PostgresConfig))\n\t\treturn newKVClient(be, q)\n\n\tdefault:\n\t\tpanic(fmt.Errorf(\"no client constructor available for db configuration type: %v\", typ))\n\t}\n}",
"func NewClient(c *Config) (*Client, error) {\n\th := cleanhttp.DefaultClient()\n\n\tclient := &Client{\n\t\tconfig: *c,\n\t\thttpClient: h,\n\t}\n\treturn client, nil\n}",
"func (o *RevertProductSnapshotRequestUsingPOSTParams) WithHTTPClient(client *http.Client) *RevertProductSnapshotRequestUsingPOSTParams {\n\to.SetHTTPClient(client)\n\treturn o\n}",
"func newReconcilerWithoutAPIClient(mgr manager.Manager, apiClient *swagger.APIClient) reconcile.Reconciler {\n\treturn &ReconcileNotebookJob{\n\t\tClient: mgr.GetClient(),\n\t\tscheme: mgr.GetScheme(),\n\t\trecorder: mgr.GetRecorder(\"notebookjob-controller\"),\n\t\tapiClient: apiClient,\n\t}\n}",
"func NewHTTPClientFromConfig(cfg *config.Config) (*HTTPClient, error) {\n\t// get clients\n\tordererClients, err := getOrdererHTTPClients(cfg)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tpeerClients, err := getPeerHTTPClients(cfg)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &HTTPClient{\n\t\tordererHTTPClients: ordererClients,\n\t\tpeerHTTPClients: peerClients,\n\t\tprivKey: cfg.KeyStore.Privs[0],\n\t}, nil\n}",
"func New(config config.Config) Nrdb {\n\treturn Nrdb{\n\t\tclient: http.NewClient(config),\n\t\tlogger: config.GetLogger(),\n\t}\n}",
"func NewWithHTTPClient(sess *session.Session, client *http.Client, endpoint string) Client {\n\treturn Client{\n\t\tsession: sess,\n\t\tendpoint: endpoint,\n\t\thttpClient: client,\n\t}\n}",
"func NewClient(config ClientConfig) (*Client, error) {\n\tvar baseURLToUse *url.URL\n\tvar err error\n\tif config.BaseURL == \"\" {\n\t\tbaseURLToUse, err = url.Parse(defaultBaseURL)\n\t} else {\n\t\tbaseURLToUse, err = url.Parse(config.BaseURL)\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tc := &Client{\n\t\temail: config.Username,\n\t\tpassword: config.Password,\n\t\tbaseURL: baseURLToUse.String(),\n\t}\n\tc.client = http.DefaultClient\n\tc.InvitationService = &InvitationService{client: c}\n\tc.ActiveUserService = &ActiveUserService{client: c}\n\tc.UserService = &UserService{\n\t\tActiveUserService: c.ActiveUserService,\n\t\tInvitationService: c.InvitationService,\n\t}\n\treturn c, nil\n}",
"func New(cfg ConfigIface) *Client {\n\tc := &Client{\n\t\tReamlHostname: cfg.RealmHostname(),\n\t\tURL: \"https://api.quickbase.com/v1\",\n\t\tUserAgent: userAgent(),\n\t\tUserToken: cfg.UserToken(),\n\t}\n\n\t// Configure and set the retry handler.\n\trh := retryablehttp.NewClient()\n\trh.RetryMax = 2\n\trh.Logger = nil\n\trh.ErrorHandler = c.errorHandler\n\tc.HTTPClient = rh.StandardClient()\n\n\treturn c\n}",
"func (t tracing) GetThumbnail(ctx context.Context, req *v0proto.GetThumbnailRequest, rsp *v0proto.GetThumbnailResponse) error {\n\tvar span trace.Span\n\n\tif thumbnailsTracing.TraceProvider != nil {\n\t\ttracer := thumbnailsTracing.TraceProvider.Tracer(\"thumbnails\")\n\t\tctx, span = tracer.Start(ctx, \"Thumbnails.GetThumbnail\")\n\t\tdefer span.End()\n\n\t\tspan.SetAttributes(\n\t\t\tattribute.KeyValue{Key: \"filepath\", Value: attribute.StringValue(req.Filepath)},\n\t\t\tattribute.KeyValue{Key: \"thumbnail_type\", Value: attribute.StringValue(req.ThumbnailType.String())},\n\t\t\tattribute.KeyValue{Key: \"width\", Value: attribute.IntValue(int(req.Width))},\n\t\t\tattribute.KeyValue{Key: \"height\", Value: attribute.IntValue(int(req.Height))},\n\t\t)\n\t}\n\n\treturn t.next.GetThumbnail(ctx, req, rsp)\n}",
"func NewClient(config *config.Config) Client {\n\treturn &releaseClient{\n\t\tconfig: config,\n\t}\n}",
"func NewClient(config Config) ClientInterface {\n\tcontext := ctx.Background()\n\tif config.GitHubToken == \"\" {\n\t\treturn Client{\n\t\t\tClient: github.NewClient(nil),\n\t\t\tContext: context,\n\t\t\tConfig: config,\n\t\t}\n\t}\n\toauth2Client := oauth2.NewClient(context, oauth2.StaticTokenSource(\n\t\t&oauth2.Token{AccessToken: config.GitHubToken},\n\t))\n\treturn Client{\n\t\tClient: github.NewClient(oauth2Client),\n\t\tContext: context,\n\t\tConfig: config,\n\t}\n}",
"func NewRawStorage(config *storagebackend.ConfigForResource, newFunc func() runtime.Object) (storage.Interface, factory.DestroyFunc, error) {\n\treturn factory.Create(*config, newFunc)\n}",
"func NewFromConfig(ktClient pb.KeyTransparencyClient, config *pb.Domain) (*Client, error) {\n\tktVerifier, err := NewVerifierFromDomain(config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn New(ktClient, config.DomainId, ktVerifier), nil\n}",
"func NewForConfig(c *rest.Config) (*IamV1Client, error) {\n\tconfig := *c\n\tif err := setConfigDefaults(&config); err != nil {\n\t\treturn nil, err\n\t}\n\thttpClient, err := rest.HTTPClientFor(&config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn NewForConfigAndClient(&config, httpClient)\n}",
"func NewClient(clientID, rawURL, topic string, retain bool) (*Client, error) {\n\turi, _ := url.Parse(rawURL)\n\tusername := uri.User.Username()\n\tpassword, _ := uri.User.Password()\n\n\tconn, err := net.Dial(\"tcp\", uri.Host)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tclient := mqtt.NewClientConn(conn)\n\tif err := client.Connect(username, password); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &Client{client: client, topic: topic, retain: retain}, nil\n}",
"func NewPrescriptionClient(c config) *PrescriptionClient {\n\treturn &PrescriptionClient{config: c}\n}",
"func New(nodeName string, client ctrlruntimeclient.Client, kubeClient kubernetes.Interface) *NodeVolumeAttachmentsCleanup {\n\treturn &NodeVolumeAttachmentsCleanup{\n\t\tnodeManager: nodemanager.New(client, nodeName),\n\t\tnodeName: nodeName,\n\t\tkubeClient: kubeClient,\n\t}\n}",
"func NewClient(kubeconfig, configContext string) (*Client, error) {\n\tconfig, err := defaultRestConfig(kubeconfig, configContext)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\trestClient, err := rest.RESTClientFor(config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &Client{config, restClient}, nil\n}",
"func NewClient(kubeconfig, configContext string) (*Client, error) {\n\tconfig, err := defaultRestConfig(kubeconfig, configContext)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\trestClient, err := rest.RESTClientFor(config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &Client{config, restClient}, nil\n}",
"func NewClient(config *Config) *Client {\n\ttr := config.Transport()\n\n\treturn &Client{\n\t\tconfig: config.Clone(),\n\t\ttr: tr,\n\t\tclient: &http.Client{Transport: tr},\n\t}\n}",
"func NewClient(key string) (*Client, error) {\n\tif key == \"\" {\n\t\treturn nil, errors.New(\"missing picpurify_key\")\n\t}\n\tc := Client{}\n\tc.Client = &http.Client{\n\t\tTimeout: 240 * time.Second,\n\t}\n\tc.Tasks = \"porn_detection,gore_detection,drug_detection\"\n\tc.ImageURL = defaultImageURL\n\tc.VideoURL = defaultVideoURL\n\tc.Key = key\n\treturn &c, nil\n}",
"func New(config upspin.Config) upspin.Client {\n\treturn &Client{config: config}\n}",
"func NewHTTPClient(rawURL string) (Client, error) {\n\tURL, err := url.Parse(rawURL)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &HTTPClient{\n\t\tComponent: Component{Name: \"http-config-client-\" + URL.Host},\n\t\tURL: rawURL,\n\t}, nil\n}"
] |
[
"0.6896408",
"0.64835125",
"0.6465385",
"0.63960516",
"0.631518",
"0.6095373",
"0.6014473",
"0.576168",
"0.5595733",
"0.55881745",
"0.53876275",
"0.53767264",
"0.53136796",
"0.51367754",
"0.5116074",
"0.5096839",
"0.5057208",
"0.5027522",
"0.49718434",
"0.47755164",
"0.47373897",
"0.470712",
"0.46947938",
"0.4693148",
"0.4647359",
"0.46191445",
"0.46055794",
"0.46046853",
"0.45814073",
"0.45670536",
"0.4485743",
"0.44849798",
"0.44333947",
"0.4366836",
"0.43478718",
"0.43338194",
"0.43234032",
"0.43056262",
"0.4270608",
"0.42649046",
"0.42398643",
"0.41804653",
"0.41667652",
"0.4165943",
"0.41500723",
"0.41337344",
"0.4117292",
"0.40965393",
"0.40737388",
"0.40429386",
"0.40426382",
"0.4032043",
"0.40146896",
"0.40053853",
"0.39950436",
"0.39943674",
"0.3993424",
"0.39840093",
"0.39696458",
"0.39545664",
"0.3953566",
"0.39461264",
"0.39377186",
"0.3931827",
"0.39250803",
"0.3922333",
"0.39182392",
"0.39105868",
"0.38984904",
"0.38734967",
"0.3870239",
"0.3861858",
"0.3855729",
"0.38487372",
"0.38249585",
"0.38242266",
"0.3811059",
"0.3809956",
"0.37993196",
"0.37992093",
"0.3792164",
"0.3791661",
"0.3790008",
"0.37837923",
"0.3783649",
"0.3779996",
"0.3773117",
"0.3770645",
"0.37673888",
"0.37633553",
"0.37597135",
"0.37569082",
"0.37536818",
"0.37524924",
"0.37497985",
"0.37497985",
"0.37365043",
"0.37330386",
"0.37275562",
"0.37259752"
] |
0.8166081
|
0
|
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `unsavedpostthumbnail.Hooks(f(g(h())))`.
|
func (c *UnsavedPostThumbnailClient) Use(hooks ...Hook) {
c.hooks.UnsavedPostThumbnail = append(c.hooks.UnsavedPostThumbnail, hooks...)
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (em *entityManager) Use(mw ...MiddlewareFunc) {\n\tem.mwStack = append(em.mwStack, mw...)\n}",
"func (f *Flame) Use(handlers ...Handler) {\n\tvalidateAndWrapHandlers(handlers, nil)\n\tf.handlers = append(f.handlers, handlers...)\n}",
"func (c *PostThumbnailClient) Use(hooks ...Hook) {\n\tc.hooks.PostThumbnail = append(c.hooks.PostThumbnail, hooks...)\n}",
"func (c *UnsavedPostImageClient) Use(hooks ...Hook) {\n\tc.hooks.UnsavedPostImage = append(c.hooks.UnsavedPostImage, hooks...)\n}",
"func (c *UnsavedPostClient) Use(hooks ...Hook) {\n\tc.hooks.UnsavedPost = append(c.hooks.UnsavedPost, hooks...)\n}",
"func (c *TagClient) Use(hooks ...Hook) {\n\tc.hooks.Tag = append(c.hooks.Tag, hooks...)\n}",
"func (ms *MiddlewareStack) Use(mw ...MiddlewareFunc) {\n\tms.stack = append(ms.stack, mw...)\n}",
"func (ms *MiddlewareStack) Use(mw ...MiddlewareFunc) {\n\tms.stack = append(ms.stack, mw...)\n}",
"func (c *ReviewClient) Use(hooks ...Hook) {\n\tc.hooks.Review = append(c.hooks.Review, hooks...)\n}",
"func (c *PostClient) Use(hooks ...Hook) {\n\tc.hooks.Post = append(c.hooks.Post, hooks...)\n}",
"func (c *PostImageClient) Use(hooks ...Hook) {\n\tc.hooks.PostImage = append(c.hooks.PostImage, hooks...)\n}",
"func (c *AdminClient) Use(hooks ...Hook) {\n\tc.hooks.Admin = append(c.hooks.Admin, hooks...)\n}",
"func (c *WorkExperienceClient) Use(hooks ...Hook) {\n\tc.hooks.WorkExperience = append(c.hooks.WorkExperience, hooks...)\n}",
"func (c *EatinghistoryClient) Use(hooks ...Hook) {\n\tc.hooks.Eatinghistory = append(c.hooks.Eatinghistory, hooks...)\n}",
"func (c *UnsavedPostVideoClient) Use(hooks ...Hook) {\n\tc.hooks.UnsavedPostVideo = append(c.hooks.UnsavedPostVideo, hooks...)\n}",
"func (c *FoodmenuClient) Use(hooks ...Hook) {\n\tc.hooks.Foodmenu = append(c.hooks.Foodmenu, hooks...)\n}",
"func (c *PharmacistClient) Use(hooks ...Hook) {\n\tc.hooks.Pharmacist = append(c.hooks.Pharmacist, hooks...)\n}",
"func (c *BranchClient) Use(hooks ...Hook) {\n\tc.hooks.Branch = append(c.hooks.Branch, hooks...)\n}",
"func (c *StatustClient) Use(hooks ...Hook) {\n\tc.hooks.Statust = append(c.hooks.Statust, hooks...)\n}",
"func (c *TasteClient) Use(hooks ...Hook) {\n\tc.hooks.Taste = append(c.hooks.Taste, hooks...)\n}",
"func (c *MediaClient) Use(hooks ...Hook) {\n\tc.hooks.Media = append(c.hooks.Media, hooks...)\n}",
"func (c *EventClient) Use(hooks ...Hook) {\n\tc.hooks.Event = append(c.hooks.Event, hooks...)\n}",
"func (c *UnsavedPostAttachmentClient) Use(hooks ...Hook) {\n\tc.hooks.UnsavedPostAttachment = append(c.hooks.UnsavedPostAttachment, hooks...)\n}",
"func (c *PostVideoClient) Use(hooks ...Hook) {\n\tc.hooks.PostVideo = append(c.hooks.PostVideo, hooks...)\n}",
"func (c *MealplanClient) Use(hooks ...Hook) {\n\tc.hooks.Mealplan = append(c.hooks.Mealplan, hooks...)\n}",
"func (c *PositionClient) Use(hooks ...Hook) {\n\tc.hooks.Position = append(c.hooks.Position, hooks...)\n}",
"func (c *PositionClient) Use(hooks ...Hook) {\n\tc.hooks.Position = append(c.hooks.Position, hooks...)\n}",
"func (c *PositionClient) Use(hooks ...Hook) {\n\tc.hooks.Position = append(c.hooks.Position, hooks...)\n}",
"func (c *LevelOfDangerousClient) Use(hooks ...Hook) {\n\tc.hooks.LevelOfDangerous = append(c.hooks.LevelOfDangerous, hooks...)\n}",
"func (c *MedicineClient) Use(hooks ...Hook) {\n\tc.hooks.Medicine = append(c.hooks.Medicine, hooks...)\n}",
"func (c *ClubBranchClient) Use(hooks ...Hook) {\n\tc.hooks.ClubBranch = append(c.hooks.ClubBranch, hooks...)\n}",
"func (c *PositionInPharmacistClient) Use(hooks ...Hook) {\n\tc.hooks.PositionInPharmacist = append(c.hooks.PositionInPharmacist, hooks...)\n}",
"func (c *ClubClient) Use(hooks ...Hook) {\n\tc.hooks.Club = append(c.hooks.Club, hooks...)\n}",
"func (c *PetruleClient) Use(hooks ...Hook) {\n\tc.hooks.Petrule = append(c.hooks.Petrule, hooks...)\n}",
"func (c *PostAttachmentClient) Use(hooks ...Hook) {\n\tc.hooks.PostAttachment = append(c.hooks.PostAttachment, hooks...)\n}",
"func (c *PetClient) Use(hooks ...Hook) {\n\tc.hooks.Pet = append(c.hooks.Pet, hooks...)\n}",
"func (c *PartClient) Use(hooks ...Hook) {\n\tc.hooks.Part = append(c.hooks.Part, hooks...)\n}",
"func (c *ToolClient) Use(hooks ...Hook) {\n\tc.hooks.Tool = append(c.hooks.Tool, hooks...)\n}",
"func (c *WalletNodeClient) Use(hooks ...Hook) {\n\tc.hooks.WalletNode = append(c.hooks.WalletNode, hooks...)\n}",
"func (c *PlaylistClient) Use(hooks ...Hook) {\n\tc.hooks.Playlist = append(c.hooks.Playlist, hooks...)\n}",
"func (c *OperationClient) Use(hooks ...Hook) {\n\tc.hooks.Operation = append(c.hooks.Operation, hooks...)\n}",
"func (c *SituationClient) Use(hooks ...Hook) {\n\tc.hooks.Situation = append(c.hooks.Situation, hooks...)\n}",
"func (c *BillClient) Use(hooks ...Hook) {\n\tc.hooks.Bill = append(c.hooks.Bill, hooks...)\n}",
"func (c *BillClient) Use(hooks ...Hook) {\n\tc.hooks.Bill = append(c.hooks.Bill, hooks...)\n}",
"func (c *BillClient) Use(hooks ...Hook) {\n\tc.hooks.Bill = append(c.hooks.Bill, hooks...)\n}",
"func (c *ClubTypeClient) Use(hooks ...Hook) {\n\tc.hooks.ClubType = append(c.hooks.ClubType, hooks...)\n}",
"func (c *DentistClient) Use(hooks ...Hook) {\n\tc.hooks.Dentist = append(c.hooks.Dentist, hooks...)\n}",
"func (c *BinaryFileClient) Use(hooks ...Hook) {\n\tc.hooks.BinaryFile = append(c.hooks.BinaryFile, hooks...)\n}",
"func (c *PositionassingmentClient) Use(hooks ...Hook) {\n\tc.hooks.Positionassingment = append(c.hooks.Positionassingment, hooks...)\n}",
"func (c *MedicineTypeClient) Use(hooks ...Hook) {\n\tc.hooks.MedicineType = append(c.hooks.MedicineType, hooks...)\n}",
"func (c *CleanernameClient) Use(hooks ...Hook) {\n\tc.hooks.Cleanername = append(c.hooks.Cleanername, hooks...)\n}",
"func (c *BeerClient) Use(hooks ...Hook) {\n\tc.hooks.Beer = append(c.hooks.Beer, hooks...)\n}",
"func (c *UserClient) Use(hooks ...Hook) {\n\tc.hooks.User = append(c.hooks.User, hooks...)\n}",
"func (c *UserClient) Use(hooks ...Hook) {\n\tc.hooks.User = append(c.hooks.User, hooks...)\n}",
"func (c *UserClient) Use(hooks ...Hook) {\n\tc.hooks.User = append(c.hooks.User, hooks...)\n}",
"func (c *UserClient) Use(hooks ...Hook) {\n\tc.hooks.User = append(c.hooks.User, hooks...)\n}",
"func (c *UserClient) Use(hooks ...Hook) {\n\tc.hooks.User = append(c.hooks.User, hooks...)\n}",
"func (c *UserClient) Use(hooks ...Hook) {\n\tc.hooks.User = append(c.hooks.User, hooks...)\n}",
"func (c *UserClient) Use(hooks ...Hook) {\n\tc.hooks.User = append(c.hooks.User, hooks...)\n}",
"func (c *UserClient) Use(hooks ...Hook) {\n\tc.hooks.User = append(c.hooks.User, hooks...)\n}",
"func (c *UserClient) Use(hooks ...Hook) {\n\tc.hooks.User = append(c.hooks.User, hooks...)\n}",
"func (c *UserClient) Use(hooks ...Hook) {\n\tc.hooks.User = append(c.hooks.User, hooks...)\n}",
"func (c *UserClient) Use(hooks ...Hook) {\n\tc.hooks.User = append(c.hooks.User, hooks...)\n}",
"func (c *PurposeClient) Use(hooks ...Hook) {\n\tc.hooks.Purpose = append(c.hooks.Purpose, hooks...)\n}",
"func (c *ComplaintClient) Use(hooks ...Hook) {\n\tc.hooks.Complaint = append(c.hooks.Complaint, hooks...)\n}",
"func (c *PledgeClient) Use(hooks ...Hook) {\n\tc.hooks.Pledge = append(c.hooks.Pledge, hooks...)\n}",
"func (c *UserWalletClient) Use(hooks ...Hook) {\n\tc.hooks.UserWallet = append(c.hooks.UserWallet, hooks...)\n}",
"func (c *UnitOfMedicineClient) Use(hooks ...Hook) {\n\tc.hooks.UnitOfMedicine = append(c.hooks.UnitOfMedicine, hooks...)\n}",
"func (c *PlanetClient) Use(hooks ...Hook) {\n\tc.hooks.Planet = append(c.hooks.Planet, hooks...)\n}",
"func (c *QueueClient) Use(hooks ...Hook) {\n\tc.hooks.Queue = append(c.hooks.Queue, hooks...)\n}",
"func (c *Client) Use(hooks ...Hook) {\n\tc.Admin.Use(hooks...)\n\tc.AdminSession.Use(hooks...)\n\tc.Category.Use(hooks...)\n\tc.Post.Use(hooks...)\n\tc.PostAttachment.Use(hooks...)\n\tc.PostImage.Use(hooks...)\n\tc.PostThumbnail.Use(hooks...)\n\tc.PostVideo.Use(hooks...)\n\tc.UnsavedPost.Use(hooks...)\n\tc.UnsavedPostAttachment.Use(hooks...)\n\tc.UnsavedPostImage.Use(hooks...)\n\tc.UnsavedPostThumbnail.Use(hooks...)\n\tc.UnsavedPostVideo.Use(hooks...)\n}",
"func (c *BuildingClient) Use(hooks ...Hook) {\n\tc.hooks.Building = append(c.hooks.Building, hooks...)\n}",
"func (c *SkillClient) Use(hooks ...Hook) {\n\tc.hooks.Skill = append(c.hooks.Skill, hooks...)\n}",
"func (c *VeterinarianClient) Use(hooks ...Hook) {\n\tc.hooks.Veterinarian = append(c.hooks.Veterinarian, hooks...)\n}",
"func (c *OperativeClient) Use(hooks ...Hook) {\n\tc.hooks.Operative = append(c.hooks.Operative, hooks...)\n}",
"func (c *BedtypeClient) Use(hooks ...Hook) {\n\tc.hooks.Bedtype = append(c.hooks.Bedtype, hooks...)\n}",
"func (c *UsertypeClient) Use(hooks ...Hook) {\n\tc.hooks.Usertype = append(c.hooks.Usertype, hooks...)\n}",
"func (c *PaymentClient) Use(hooks ...Hook) {\n\tc.hooks.Payment = append(c.hooks.Payment, hooks...)\n}",
"func (c *PaymentClient) Use(hooks ...Hook) {\n\tc.hooks.Payment = append(c.hooks.Payment, hooks...)\n}",
"func (c *PhysicianClient) Use(hooks ...Hook) {\n\tc.hooks.Physician = append(c.hooks.Physician, hooks...)\n}",
"func (c *PhysicianClient) Use(hooks ...Hook) {\n\tc.hooks.Physician = append(c.hooks.Physician, hooks...)\n}",
"func (c *SymptomClient) Use(hooks ...Hook) {\n\tc.hooks.Symptom = append(c.hooks.Symptom, hooks...)\n}",
"func (c *PrescriptionClient) Use(hooks ...Hook) {\n\tc.hooks.Prescription = append(c.hooks.Prescription, hooks...)\n}",
"func (c *CategoryClient) Use(hooks ...Hook) {\n\tc.hooks.Category = append(c.hooks.Category, hooks...)\n}",
"func (c *ActivityTypeClient) Use(hooks ...Hook) {\n\tc.hooks.ActivityType = append(c.hooks.ActivityType, hooks...)\n}",
"func (c *StaytypeClient) Use(hooks ...Hook) {\n\tc.hooks.Staytype = append(c.hooks.Staytype, hooks...)\n}",
"func (c *Client) Use(hooks ...Hook) {\n\tc.Event.Use(hooks...)\n\tc.Tag.Use(hooks...)\n}",
"func Hook() ent.Hook {\n\topsProcessedTotal := initOpsProcessedTotal()\n\topsProcessedError := initOpsProcessedError()\n\topsDuration := initOpsDuration()\n\treturn func(next ent.Mutator) ent.Mutator {\n\t\treturn ent.MutateFunc(func(ctx context.Context, m ent.Mutation) (ent.Value, error) {\n\t\t\t// Before mutation, start measuring time.\n\t\t\tstart := time.Now()\n\t\t\t// Extract dynamic labels from mutation.\n\t\t\tlabels := prometheus.Labels{mutationType: m.Type(), mutationOp: m.Op().String()}\n\t\t\t// Increment total ops counter.\n\t\t\topsProcessedTotal.With(labels).Inc()\n\t\t\t// Execute mutation.\n\t\t\tv, err := next.Mutate(ctx, m)\n\t\t\tif err != nil {\n\t\t\t\t// In case of error increment error counter.\n\t\t\t\topsProcessedError.With(labels).Inc()\n\t\t\t}\n\t\t\t// Stop time measure.\n\t\t\tduration := time.Since(start)\n\t\t\t// Record duration in seconds.\n\t\t\topsDuration.With(labels).Observe(duration.Seconds())\n\t\t\treturn v, err\n\t\t})\n\t}\n}",
"func (c *JobpositionClient) Use(hooks ...Hook) {\n\tc.hooks.Jobposition = append(c.hooks.Jobposition, hooks...)\n}",
"func (c *FacultyClient) Use(hooks ...Hook) {\n\tc.hooks.Faculty = append(c.hooks.Faculty, hooks...)\n}",
"func (c *TransactionClient) Use(hooks ...Hook) {\n\tc.hooks.Transaction = append(c.hooks.Transaction, hooks...)\n}",
"func (c *GenderClient) Use(hooks ...Hook) {\n\tc.hooks.Gender = append(c.hooks.Gender, hooks...)\n}",
"func (c *GenderClient) Use(hooks ...Hook) {\n\tc.hooks.Gender = append(c.hooks.Gender, hooks...)\n}",
"func (c *TitleClient) Use(hooks ...Hook) {\n\tc.hooks.Title = append(c.hooks.Title, hooks...)\n}",
"func (c *UserStatusClient) Use(hooks ...Hook) {\n\tc.hooks.UserStatus = append(c.hooks.UserStatus, hooks...)\n}",
"func (c *ActivitiesClient) Use(hooks ...Hook) {\n\tc.hooks.Activities = append(c.hooks.Activities, hooks...)\n}",
"func (c *CoinInfoClient) Use(hooks ...Hook) {\n\tc.hooks.CoinInfo = append(c.hooks.CoinInfo, hooks...)\n}",
"func (c *AnnotationClient) Use(hooks ...Hook) {\n\tc.hooks.Annotation = append(c.hooks.Annotation, hooks...)\n}",
"func (c *ClubapplicationClient) Use(hooks ...Hook) {\n\tc.hooks.Clubapplication = append(c.hooks.Clubapplication, hooks...)\n}",
"func (c *CardClient) Use(hooks ...Hook) {\n\tc.hooks.Card = append(c.hooks.Card, hooks...)\n}"
] |
[
"0.6720816",
"0.66945857",
"0.6691379",
"0.6586919",
"0.656927",
"0.6558649",
"0.6456717",
"0.6456717",
"0.6441576",
"0.64413434",
"0.6430128",
"0.64221376",
"0.6414494",
"0.63792515",
"0.633824",
"0.633289",
"0.6306056",
"0.6268691",
"0.62580115",
"0.625124",
"0.6231367",
"0.6210399",
"0.6200161",
"0.6196311",
"0.61943233",
"0.61713743",
"0.61713743",
"0.61713743",
"0.6158239",
"0.61477995",
"0.6139842",
"0.6139472",
"0.6126623",
"0.6104941",
"0.6102806",
"0.6102433",
"0.60982317",
"0.60949993",
"0.60920924",
"0.60866797",
"0.6085263",
"0.60824704",
"0.60740846",
"0.60740846",
"0.60740846",
"0.607128",
"0.60683805",
"0.6054098",
"0.60461605",
"0.6037142",
"0.60281146",
"0.6025012",
"0.6020904",
"0.6020904",
"0.6020904",
"0.6020904",
"0.6020904",
"0.6020904",
"0.6020904",
"0.6020904",
"0.6020904",
"0.6020904",
"0.6020904",
"0.6018603",
"0.6006103",
"0.59892726",
"0.59887046",
"0.5985474",
"0.5976177",
"0.5972209",
"0.59658474",
"0.59628546",
"0.59537244",
"0.5949568",
"0.59375453",
"0.59286505",
"0.5926617",
"0.5900508",
"0.5900508",
"0.58966917",
"0.58966917",
"0.5893654",
"0.58861166",
"0.58767897",
"0.58740395",
"0.58727723",
"0.58694214",
"0.58572036",
"0.5854101",
"0.58531594",
"0.585143",
"0.58064264",
"0.58064264",
"0.5803317",
"0.57841694",
"0.5778091",
"0.57752275",
"0.57750094",
"0.5770822",
"0.5764809"
] |
0.67061377
|
1
|
Create returns a create builder for UnsavedPostThumbnail.
|
func (c *UnsavedPostThumbnailClient) Create() *UnsavedPostThumbnailCreate {
mutation := newUnsavedPostThumbnailMutation(c.config, OpCreate)
return &UnsavedPostThumbnailCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *PostThumbnailClient) Create() *PostThumbnailCreate {\n\tmutation := newPostThumbnailMutation(c.config, OpCreate)\n\treturn &PostThumbnailCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostImageClient) Create() *UnsavedPostImageCreate {\n\tmutation := newUnsavedPostImageMutation(c.config, OpCreate)\n\treturn &UnsavedPostImageCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upq *UnsavedPostQuery) WithThumbnail(opts ...func(*UnsavedPostThumbnailQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withThumbnail = query\n\treturn upq\n}",
"func (upu *UnsavedPostUpdate) ClearThumbnail() *UnsavedPostUpdate {\n\tupu.mutation.ClearThumbnail()\n\treturn upu\n}",
"func (c *UnsavedPostAttachmentClient) Create() *UnsavedPostAttachmentCreate {\n\tmutation := newUnsavedPostAttachmentMutation(c.config, OpCreate)\n\treturn &UnsavedPostAttachmentCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upuo *UnsavedPostUpdateOne) ClearThumbnail() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearThumbnail()\n\treturn upuo\n}",
"func NewUnsavedPostThumbnailClient(c config) *UnsavedPostThumbnailClient {\n\treturn &UnsavedPostThumbnailClient{config: c}\n}",
"func (c *UnsavedPostClient) Create() *UnsavedPostCreate {\n\tmutation := newUnsavedPostMutation(c.config, OpCreate)\n\treturn &UnsavedPostCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostThumbnailClient) Delete() *UnsavedPostThumbnailDelete {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpDelete)\n\treturn &UnsavedPostThumbnailDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostThumbnailClient) Get(ctx context.Context, id int) (*UnsavedPostThumbnail, error) {\n\treturn c.Query().Where(unsavedpostthumbnail.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostThumbnailClient) Query() *UnsavedPostThumbnailQuery {\n\treturn &UnsavedPostThumbnailQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *UnsavedPostVideoClient) Create() *UnsavedPostVideoCreate {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpCreate)\n\treturn &UnsavedPostVideoCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostThumbnailClient) Update() *UnsavedPostThumbnailUpdate {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpUpdate)\n\treturn &UnsavedPostThumbnailUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostAttachmentClient) Create() *PostAttachmentCreate {\n\tmutation := newPostAttachmentMutation(c.config, OpCreate)\n\treturn &PostAttachmentCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func NewCreateWidgetUnprocessableEntity() *CreateWidgetUnprocessableEntity {\n\treturn &CreateWidgetUnprocessableEntity{}\n}",
"func (c *PostImageClient) Create() *PostImageCreate {\n\tmutation := newPostImageMutation(c.config, OpCreate)\n\treturn &PostImageCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func NewPost(username string, imageURL string, thumbnailURL string, caption string, url string, messageBody string, mood MoodState, keywords []string, likers []string) *Post {\n\n\tauditableContent := AuditableContent{createdBy: username, createdTime: time.Now()}\n\n\treturn &Post{\n\t\tauditableContent: auditableContent,\n\t\tcaption: caption,\n\t\turl: url,\n\t\timageURL: imageURL,\n\t\tthumbnailURL: thumbnailURL,\n\t\tmessageBody: messageBody,\n\t\tauthorMood: mood,\n\t\tkeywords: keywords,\n\t\tlikers: likers,\n\t}\n}",
"func (c *PostThumbnailClient) Delete() *PostThumbnailDelete {\n\tmutation := newPostThumbnailMutation(c.config, OpDelete)\n\treturn &PostThumbnailDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostClient) QueryThumbnail(up *UnsavedPost) *UnsavedPostThumbnailQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, unsavedpost.ThumbnailTable, unsavedpost.ThumbnailColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) QueryThumbnail() *UnsavedPostThumbnailQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, unsavedpost.ThumbnailTable, unsavedpost.ThumbnailColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func NewPost(username string, mood MoodState, caption string, MessageBody string, url string, imageURL string, thumbnailURI string, keywords []string) *Post {\n\n\tauditableContent := AuditableContent{CreatedBy: username, TimeCreated: time.Now()}\n\treturn &Post{Caption: caption, MessageBody: MessageBody, URL: url, ImageURI: imageURL, ThumbnailURI: thumbnailURI, AuthorMood: mood, Keywords: keywords, AuditableContent: auditableContent}\n}",
"func NewThumbnail(hash string, image image.Image) Thumbnail {\n\treturn Thumbnail{hash: hash, image: image}\n}",
"func (upu *UnsavedPostUpdate) SetThumbnail(u *UnsavedPostThumbnail) *UnsavedPostUpdate {\n\treturn upu.SetThumbnailID(u.ID)\n}",
"func NewPost(username string, mood MoodState, caption string, messageBody string, url string, imageURI string, thumbnailURI string, keywords []string) *Post {\n\tauditableContent := AuditableContent{CreatedBy: username, TimeCreated: time.Now()}\n\treturn &Post{Caption: caption, MessageBody: messageBody, URL: url, ImageURI: imageURI, ThumbnailURI: thumbnailURI, AuthorMood: mood, Keywords: keywords, AuditableContent: auditableContent}\n}",
"func Create(ctx context.Context, dbConn *db.DB, rbmq *rabbitmq.RabbitMQ, cm *CreateImage) (*Image, error) {\n\tparams := []interface{}{cm.Title, cm.URL, cm.Slug, cm.Publisher}\n\tquery := \"INSERT INTO images(title, url, slug, publisher) VALUES($1,$2,$3,$4) RETURNING *\"\n\trow, err := dbConn.PSQLQueryRawx(ctx, query, params...)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, fmt.Sprintf(\"db.images.insert(%s)\", db.Query(query)))\n\t}\n\tvar img Image\n\tif err = row.StructScan(&img); err != nil {\n\t\treturn nil, errors.Wrap(err, fmt.Sprintf(\"db.images.insert(%s)StructScan\", db.Query(query)))\n\t}\n\tqn := \"image_created\"\n\timgJSON, err := json.Marshal(&img)\n\tif err != nil {\n\t\tlog.Warnf(\"RabbitMQ: failed to marshal obj %v for image creation: %v\", &img, err)\n\t}\n\trbmq.DeclareQueue(qn)\n\tif err != nil {\n\t\tlog.Warnf(\"RabbitMQ: cannot declare queue for image creation: %v\", err)\n\t}\n\terr = rbmq.Publish(&qn, imgJSON)\n\tif err != nil {\n\t\tlog.Warnf(\"RabbitMQ: failed to publish a message for image creation: %v\", err)\n\t}\n\treturn &img, nil\n}",
"func CreatePost(images []types.FileMetadata, author types.User, p types.RawPost, headerImage types.FileMetadata) (interface{}, error) {\n\tif p.ShortURL == \"new\" {\n\t\treturn nil, errors.New(\"the title `new` is reserved\")\n\t}\n\n\tvar post types.Post\n\tdb := database.GetMySQLInstance()\n\tdefer db.Close()\n\n\terr := db.Where(\"shorturl LIKE ?\", p.ShortURL).First(&post).Error\n\tif err != gorm.ErrRecordNotFound {\n\t\treturn nil, errors.New(\"post with similar title already exists..be unique\")\n\t}\n\n\tif p.HeaderImageIndex == nil {\n\t\tp.HeaderImageIndex = &EmptyHeaderIndex\n\t}\n\n\tpost = types.Post{\n\t\tAuthor: &author,\n\t\tTitle: p.Title,\n\t\tShortURL: p.ShortURL,\n\t\tType: p.Type,\n\t\tAbstract: p.Abstract,\n\t\tContent: p.Content,\n\t\tPubDate: p.PubDate,\n\t\tTags: CleanTags(p.Tags),\n\t\tHeaderImageIndex: p.HeaderImageIndex,\n\t\tReadNext: []string{p.ReadNext},\n\t\tIPOwner: p.IPOwner,\n\t}\n\n\t// headerImage was seperated from other images in handler earlier so we can\n\t// process headerImage differently later\n\t// @todo: func resolveHeaderImage\n\n\tpost, err = resolveAttachments(images, post, *post.HeaderImageIndex, headerImage, true)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\terr = createPost(&post, db)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn post, nil\n}",
"func (upuo *UnsavedPostUpdateOne) SetThumbnail(u *UnsavedPostThumbnail) *UnsavedPostUpdateOne {\n\treturn upuo.SetThumbnailID(u.ID)\n}",
"func (u *App) Create(c echo.Context, req *Create) (*model.Post, error) {\n\tid, err := util.GenerateUUID()\n\tif err = zaplog.ZLog(err); err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar operator model.User\n\tif err = u.db.Model(&model.User{}).Where(\"uuid = ?\", req.Author).First(&operator).Error; err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar dupe model.Post\n\tif err = u.db.Model(&model.Post{}).Where(\"slug = ?\", req.Slug).Order(\"id DESC\").First(&dupe).Error; err == nil {\n\t\tfragment := strings.TrimPrefix(dupe.Slug, req.Slug)\n\t\tif fragment == \"\" {\n\t\t\treq.Slug += \"-2\"\n\t\t}\n\n\t\tcounter, err := strconv.Atoi(strings.TrimPrefix(fragment, \"-\"))\n\t\tif err != nil {\n\t\t\treq.Slug += \"-2\"\n\t\t} else {\n\t\t\treq.Slug += fmt.Sprintf(\"-%d\", counter+1)\n\t\t}\n\t}\n\n\tif len(req.Excerpt) > 255 {\n\t\treq.Excerpt = req.Excerpt[:250] + \"...\"\n\t}\n\n\tpost := model.Post{\n\t\tBase: model.Base{ID: id},\n\t\tAuthor: req.Author,\n\t\tAuthorName: operator.Name,\n\t\tCategory: req.Category,\n\t\tTags: req.Tags,\n\t\tTitle: req.Title,\n\t\tSlug: req.Slug,\n\t\tContent: req.Content,\n\t\tExcerpt: req.Excerpt,\n\t\tStatus: req.Status,\n\t}\n\treturn u.udb.Create(u.db, post)\n}",
"func (s *WidgetStorage) Create(req *WidgetRequest) *Widget {\n\twidget := &Widget{\n\t\tID: generator.ID(\"wgt\"),\n\t\tSerialNumber: req.SerialNumber,\n\t\tDescription: req.Description,\n\t}\n\ts.mutex.Lock()\n\tdefer s.mutex.Unlock()\n\ts.widgets[widget.ID] = widget\n\treturn widget\n}",
"func (c *UnsavedPostThumbnailClient) CreateBulk(builders ...*UnsavedPostThumbnailCreate) *UnsavedPostThumbnailCreateBulk {\n\treturn &UnsavedPostThumbnailCreateBulk{config: c.config, builders: builders}\n}",
"func NewPost(\n\tsenderUsername string,\n\tmessage string,\n\timages []string,\n\trecipientsUsernames []string,\n) (*Post, error) {\n\t// Check that all data for the post is valid\n\tif len(recipientsUsernames) > common.MaxRecipients ||\n\t\tlen(recipientsUsernames) <= 0 || message == \"\" ||\n\t\tlen(message) > common.MaxMessageLength ||\n\t\tlen(images) > common.MaxImages {\n\t\treturn nil, errors.New(\"too much or not enough data to construct post\")\n\t}\n\n\t// Validate sender username\n\tsender, err := validateUsername(senderUsername)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// Validate all recipient usernames\n\tvar recipients []Username\n\tfor _, recipient := range recipientsUsernames {\n\t\tvalidRecipient, err := validateUsername(recipient)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\t// Add valid recipient to the slice of valid recipients\n\t\trecipients = append(recipients, validRecipient)\n\t}\n\n\t// Cast all base64 []string images to images\n\tvar byteImages []image\n\tfor _, base64Image := range images {\n\t\tbyteImage, err := base64.StdEncoding.DecodeString(base64Image)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tbyteImages = append(byteImages, image(byteImage))\n\t}\n\n\tpost := &Post{\n\t\tSender: sender,\n\t\tRecipients: recipients,\n\t\tMessage: message,\n\t\tImages: byteImages,\n\t}\n\tpost.PostID = crypto.Sha3String(post.String())\n\tpost.Timestamp = time.Now()\n\treturn post, nil\n\n}",
"func NewUnsavedPostImageClient(c config) *UnsavedPostImageClient {\n\treturn &UnsavedPostImageClient{config: c}\n}",
"func (img *Image) createThumbnail(opt parseOptions) *image.NRGBA {\n\treturn imaging.Thumbnail(img.Image, opt.width, opt.height, opt.filter)\n}",
"func NewPostThumbnailClient(c config) *PostThumbnailClient {\n\treturn &PostThumbnailClient{config: c}\n}",
"func (i *Image) CreatePreview() error {\r\n\t//max X and Y image dimension for previews\r\n\tconst maxX = 175\r\n\tconst maxY = 200\r\n\r\n\tprts := strings.SplitAfter(i.URL, \"/uploads/\")\r\n\tif len(prts) != 2 {\r\n\t\treturn fmt.Errorf(\"Wrong number of URL splits\")\r\n\t}\r\n\tparts := strings.Split(prts[1], \"/\")\r\n\trelPath := \"\"\r\n\tfor i := 0; i < len(parts)-1; i++ {\r\n\t\trelPath = path.Join(relPath, parts[i])\r\n\t}\r\n\t//filename\r\n\tfname := parts[len(parts)-1]\r\n\t//original image folder\r\n\tsrcPath := path.Join(config.UploadsPath(), relPath)\r\n\t//preview folder\r\n\tpreviewPath := path.Join(config.UploadsPath(), relPath, \"previews\")\r\n\tif err := os.MkdirAll(previewPath, 0755); err != nil {\r\n\t\treturn err\r\n\t}\r\n\tfile, err := os.Open(filepath.Join(srcPath, fname))\r\n\tif err != nil {\r\n\t\treturn err\r\n\t}\r\n\tdefer file.Close()\r\n\r\n\timg, err := decodeImage(file)\r\n\tif err != nil {\r\n\t\treturn err\r\n\t}\r\n\timg = resize.Thumbnail(maxX, maxY, img, resize.Lanczos3)\r\n\tbounds := img.Bounds()\r\n\toffset := image.Pt((maxX-bounds.Dx())/2, (maxY-bounds.Dy())/2)\r\n\tb := image.Rectangle{Min: image.Point{X: 0, Y: 0}, Max: image.Point{X: maxX, Y: maxY}}\r\n\tm := image.NewRGBA(b)\r\n\tdraw.Draw(m, b, image.NewUniform(color.RGBA{255, 255, 255, 255}), image.ZP, draw.Src)\r\n\tdraw.Draw(m, bounds.Add(offset), img, image.ZP, draw.Over)\r\n\r\n\tdst, err := os.Create(path.Join(previewPath, fname))\r\n\tif err != nil {\r\n\t\treturn err\r\n\t}\r\n\tdefer dst.Close()\r\n\tif err := jpeg.Encode(dst, m, &jpeg.Options{Quality: 80}); err != nil {\r\n\t\treturn err\r\n\t}\r\n\r\n\trelURL := strings.ReplaceAll(relPath, string(filepath.Separator), \"/\")\r\n\tif len(relURL) > 0 {\r\n\t\trelURL = fmt.Sprintf(\"%s/previews/%s\", relURL, fname)\r\n\t} else {\r\n\t\trelURL = fmt.Sprintf(\"previews/%s\", fname)\r\n\t}\r\n\ti.PreviewURL = fmt.Sprintf(\"/public/uploads/%s\", relURL)\r\n\treturn nil\r\n}",
"func (l *Like) Create() error {\n\treturn nil\n}",
"func (c *UnsavedPostImageClient) Get(ctx context.Context, id int) (*UnsavedPostImage, error) {\n\treturn c.Query().Where(unsavedpostimage.ID(id)).Only(ctx)\n}",
"func NewPost(creator *ID, text string, attachment *string) (*Post, error) {\n\tp := &Post{\n\t\tID: NewID(),\n\t\tCreator: creator,\n\t\tText: text,\n\t\tAttachment: attachment,\n\t\tCreatedAt: time.Now(),\n\t}\n\terr := p.Validate()\n\tif err != nil {\n\t\treturn nil, ErrInvalidEntity\n\t}\n\treturn p, nil\n}",
"func newImageWithoutInit(width, height int, volatile bool) *Image {\n\ti := &Image{\n\t\timage: graphics.NewImage(width, height),\n\t\tvolatile: volatile,\n\t}\n\ttheImages.add(i)\n\treturn i\n}",
"func New(ctx *sweetygo.Context) error {\n\ttitle := ctx.Param(\"title\")\n\tcat := ctx.Param(\"cat\")\n\thtml := ctx.Param(\"html\")\n\tmd := ctx.Param(\"md\")\n\tif title != \"\" && cat != \"\" && html != \"\" && md != \"\" {\n\t\terr := model.NewPost(title, cat, html, md)\n\t\tif err != nil {\n\t\t\treturn ctx.JSON(500, 0, \"create post error\", nil)\n\t\t}\n\t\treturn ctx.JSON(201, 1, \"success\", nil)\n\t}\n\treturn ctx.JSON(406, 0, \"I can't understand what u want\", nil)\n}",
"func (c *PostClient) Create() *PostCreate {\n\tmutation := newPostMutation(c.config, OpCreate)\n\treturn &PostCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upq *UnsavedPostQuery) WithImages(opts ...func(*UnsavedPostImageQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostImageQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withImages = query\n\treturn upq\n}",
"func (c *UnsavedPostThumbnailClient) Use(hooks ...Hook) {\n\tc.hooks.UnsavedPostThumbnail = append(c.hooks.UnsavedPostThumbnail, hooks...)\n}",
"func New(title string, path string, body string) *BlogPost {\n\treturn &BlogPost{Title: title,\n\t\tPath: path,\n\t\tBody: template.HTML(body),\n\t\tApproved: false,\n\t\tDeleted: false,\n\t\tPublished: false,\n\t\tCreatedDate: time.Now(),\n\t}\n}",
"func (build *signedBlockBuilder) Create() stored_blocks.SignedBlockBuilder {\n\tbuild.metaData = nil\n\tbuild.sig = nil\n\tbuild.blk = nil\n\treturn build\n}",
"func (c *UnsavedPostThumbnailClient) QueryUnsavedPost(upt *UnsavedPostThumbnail) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upt.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, true, unsavedpostthumbnail.UnsavedPostTable, unsavedpostthumbnail.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upt.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *MediaClient) Create() *MediaCreate {\n\tmutation := newMediaMutation(c.config, OpCreate)\n\treturn &MediaCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upq *UnsavedPostQuery) Clone() *UnsavedPostQuery {\n\tif upq == nil {\n\t\treturn nil\n\t}\n\treturn &UnsavedPostQuery{\n\t\tconfig: upq.config,\n\t\tlimit: upq.limit,\n\t\toffset: upq.offset,\n\t\torder: append([]OrderFunc{}, upq.order...),\n\t\tpredicates: append([]predicate.UnsavedPost{}, upq.predicates...),\n\t\twithAuthor: upq.withAuthor.Clone(),\n\t\twithCategory: upq.withCategory.Clone(),\n\t\twithThumbnail: upq.withThumbnail.Clone(),\n\t\twithImages: upq.withImages.Clone(),\n\t\twithVideos: upq.withVideos.Clone(),\n\t\twithAttachments: upq.withAttachments.Clone(),\n\t\t// clone intermediate query.\n\t\tsql: upq.sql.Clone(),\n\t\tpath: upq.path,\n\t}\n}",
"func newPicture(userID uint, imageID uint, title string, description *string, created time.Time, numLikes *uint, numComments *uint) *Picture {\n\treturn &Picture{\n\t\tUserID:\t\t\tuserID,\n\t\tImageID:\t\timageID,\n\t\tTitle:\t\t\ttitle,\n\t\tDescription:\tdescription,\n\t\tCreated:\t\tcreated,\n\t\tNumLikes:\t\tnumLikes,\n\t\tNumComments:\tnumComments,\n\t}\n}",
"func createThumbnail(\n\tctx context.Context,\n\tsrc types.Path,\n\timg image.Image,\n\tconfig types.ThumbnailSize,\n\tmediaMetadata *types.MediaMetadata,\n\tactiveThumbnailGeneration *types.ActiveThumbnailGeneration,\n\tmaxThumbnailGenerators int,\n\tdb storage.Database,\n\tlogger *log.Entry,\n) (busy bool, errorReturn error) {\n\tlogger = logger.WithFields(log.Fields{\n\t\t\"Width\": config.Width,\n\t\t\"Height\": config.Height,\n\t\t\"ResizeMethod\": config.ResizeMethod,\n\t})\n\n\t// Check if request is larger than original\n\tif config.Width >= img.Bounds().Dx() && config.Height >= img.Bounds().Dy() {\n\t\treturn false, nil\n\t}\n\n\tdst := GetThumbnailPath(src, config)\n\n\t// Note: getActiveThumbnailGeneration uses mutexes and conditions from activeThumbnailGeneration\n\tisActive, busy, err := getActiveThumbnailGeneration(dst, config, activeThumbnailGeneration, maxThumbnailGenerators, logger)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tif busy {\n\t\treturn true, nil\n\t}\n\n\tif isActive {\n\t\t// Note: This is an active request that MUST broadcastGeneration to wake up waiting goroutines!\n\t\t// Note: broadcastGeneration uses mutexes and conditions from activeThumbnailGeneration\n\t\tdefer func() {\n\t\t\t// Note: errorReturn is the named return variable so we wrap this in a closure to re-evaluate the arguments at defer-time\n\t\t\t// if err := recover(); err != nil {\n\t\t\t// \tbroadcastGeneration(dst, activeThumbnailGeneration, config, err.(error), logger)\n\t\t\t// \tpanic(err)\n\t\t\t// }\n\t\t\tbroadcastGeneration(dst, activeThumbnailGeneration, config, errorReturn, logger)\n\t\t}()\n\t}\n\n\texists, err := isThumbnailExists(ctx, dst, config, mediaMetadata, db, logger)\n\tif err != nil || exists {\n\t\treturn false, err\n\t}\n\n\tstart := time.Now()\n\twidth, height, err := adjustSize(dst, img, config.Width, config.Height, config.ResizeMethod == types.Crop, logger)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tlogger.WithFields(log.Fields{\n\t\t\"ActualWidth\": width,\n\t\t\"ActualHeight\": height,\n\t\t\"processTime\": time.Since(start),\n\t}).Info(\"Generated thumbnail\")\n\n\tstat, err := os.Stat(string(dst))\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\tthumbnailMetadata := &types.ThumbnailMetadata{\n\t\tMediaMetadata: &types.MediaMetadata{\n\t\t\tMediaID: mediaMetadata.MediaID,\n\t\t\tOrigin: mediaMetadata.Origin,\n\t\t\t// Note: the code currently always creates a JPEG thumbnail\n\t\t\tContentType: types.ContentType(\"image/jpeg\"),\n\t\t\tFileSizeBytes: types.FileSizeBytes(stat.Size()),\n\t\t},\n\t\tThumbnailSize: types.ThumbnailSize{\n\t\t\tWidth: config.Width,\n\t\t\tHeight: config.Height,\n\t\t\tResizeMethod: config.ResizeMethod,\n\t\t},\n\t}\n\n\terr = db.StoreThumbnail(ctx, thumbnailMetadata)\n\tif err != nil {\n\t\tlogger.WithError(err).WithFields(log.Fields{\n\t\t\t\"ActualWidth\": width,\n\t\t\t\"ActualHeight\": height,\n\t\t}).Error(\"Failed to store thumbnail metadata in database.\")\n\t\treturn false, err\n\t}\n\n\treturn false, nil\n}",
"func NewUnsavedPostAttachmentClient(c config) *UnsavedPostAttachmentClient {\n\treturn &UnsavedPostAttachmentClient{config: c}\n}",
"func createThumbs(file string) error {\n\timg, err := imaging.Open(file)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\text := filepath.Ext(file)\n\tbasePath := strings.TrimSuffix(file, ext)\n\n\tthumbSizes := app.Config.GetStringSlice(\"upload.thumbs\")\n\tfor _, size := range thumbSizes {\n\t\tparts := strings.SplitN(size, \"x\", 2)\n\t\tif len(parts) != 2 {\n\t\t\tcontinue\n\t\t}\n\n\t\tw, _ := strconv.Atoi(parts[0])\n\t\th, _ := strconv.Atoi(parts[1])\n\n\t\tthumb := imaging.Thumbnail(img, w, h, imaging.CatmullRom)\n\n\t\t// create a new blank image\n\t\tdst := imaging.New(w, h, color.NRGBA{0, 0, 0, 0})\n\n\t\t// paste thumbnail into the new image\n\t\tdst = imaging.Paste(dst, thumb, image.Pt(0, 0))\n\n\t\t// save to file\n\t\tif err := imaging.Save(dst, basePath+\"_\"+size+ext); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (c *PostThumbnailClient) Get(ctx context.Context, id int) (*PostThumbnail, error) {\n\treturn c.Query().Where(postthumbnail.ID(id)).Only(ctx)\n}",
"func (c *UPHostClient) NewCreatePHostImageRequest() *CreatePHostImageRequest {\n\treq := &CreatePHostImageRequest{}\n\n\t// setup request with client config\n\tc.Client.SetupRequest(req)\n\n\t// setup retryable with default retry policy (retry for non-create action and common error)\n\treq.SetRetryable(false)\n\treturn req\n}",
"func (c *UnsavedPostImageClient) Delete() *UnsavedPostImageDelete {\n\tmutation := newUnsavedPostImageMutation(c.config, OpDelete)\n\treturn &UnsavedPostImageDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func NewCreateLookmlModelUnprocessableEntity() *CreateLookmlModelUnprocessableEntity {\n\treturn &CreateLookmlModelUnprocessableEntity{}\n}",
"func newPost(fullPath string) (*Post, error) {\n\tf, err := os.Open(fullPath)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tdefer f.Close()\n\n\t// Load the HTML document\n\tdom, err := goquery.NewDocumentFromReader(f)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tp := &Post{\n\t\tDOM: dom,\n\t\tHTMLFileName: filepath.Base(f.Name()),\n\t\tImages: make([]*Image, 0),\n\t\tTags: make([]string, 0),\n\t\tLastmod: time.Now().Format(time.RFC3339),\n\t}\n\n\t// draft is prefixed in filename\n\tp.Draft = strings.HasPrefix(p.HTMLFileName, DraftPrefix)\n\n\treturn p, nil\n}",
"func New(fn string) (*Post, error) {\n\tb, err := ioutil.ReadFile(fn)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t//Check if document start with valid token\n\tif !bytes.HasPrefix(b, []byte(\"---\\n\")) {\n\t\treturn nil, errMissingFrontMatter\n\t}\n\tb = bytes.TrimPrefix(b, []byte(\"---\\n\"))\n\n\t//Split b to array, array[0] is front matter\n\t//array[1] is the rest of text (post's body)\n\tarr := bytes.SplitN(b, []byte(\"\\n---\\n\"), 2)\n\n\t//Generate meta from text\n\tm, err := newMeta(string(arr[0]))\n\n\t//Convert the rest of text to Markdown\n\tbody := blackfriday.MarkdownCommon(arr[1])\n\tp := &Post{\n\t\tm,\n\t\tslug.Make(m.Title),\n\t\ttemplate.HTML(body),\n\t}\n\treturn p, nil\n}",
"func (fs *FS) NewPost(id int64, parent int64, msg Message) error {\n\terr := fs.writePost(id, parent, msg)\n\tif err != nil { return err }\n\n\t// when id==parent, it's a thread\n\tif id == parent {\n\t\terr := fs.setThread(id, msg)\n\t\tfmt.Println(err)\n\t\tif err != nil { return err }\n\t}\n\treturn nil\n}",
"func NewCreateClaimUnprocessableEntity() *CreateClaimUnprocessableEntity {\n\treturn &CreateClaimUnprocessableEntity{}\n}",
"func (ps *PostStorage) Create(post socialnet.Post) (socialnet.Post, error) {\n\tps.posts = append(ps.posts, post)\n\treturn post, nil\n}",
"func (c *PostVideoClient) Create() *PostVideoCreate {\n\tmutation := newPostVideoMutation(c.config, OpCreate)\n\treturn &PostVideoCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (build *signedBlockBuilder) Create() validated.SignedBlockBuilder {\n\tbuild.id = nil\n\tbuild.met = nil\n\tbuild.blk = nil\n\tbuild.sig = nil\n\tbuild.crOn = nil\n\treturn build\n}",
"func NewCreateImageNoContent() *CreateImageNoContent {\n\treturn &CreateImageNoContent{}\n}",
"func NewGetThumbnailInput() *GetThumbnailInput {\n\treturn &GetThumbnailInput{\n\t\tFormat: ThumbnailFormatJPEG,\n\t\tSize: ThumbnailSizeW64H64,\n\t\tMode: ThumbnailModeStrict,\n\t}\n}",
"func (c *PostThumbnailClient) Update() *PostThumbnailUpdate {\n\tmutation := newPostThumbnailMutation(c.config, OpUpdate)\n\treturn &PostThumbnailUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (o *GraphqlPostUnprocessableEntity) WithPayload(payload *models.ErrorResponse) *GraphqlPostUnprocessableEntity {\n\to.Payload = payload\n\treturn o\n}",
"func (service *SQSService) CreateWithoutAttributes() (string, error) {\n\tinput := &sqs.CreateQueueInput{\n\t\tQueueName: &service.QueueName,\n\t}\n\toutput, err := service.CreateQueue(input)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"Unable to create queu: %s\", err)\n\t}\n\tif output.QueueUrl == nil {\n\t\treturn \"\", fmt.Errorf(\"QueueUrl is null\")\n\t}\n\n\treturn *output.QueueUrl, nil\n}",
"func NewUnsavedPostClient(c config) *UnsavedPostClient {\n\treturn &UnsavedPostClient{config: c}\n}",
"func (c *PostThumbnailClient) Query() *PostThumbnailQuery {\n\treturn &PostThumbnailQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *UnsavedPostImageClient) Query() *UnsavedPostImageQuery {\n\treturn &UnsavedPostImageQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *UnsavedPostAttachmentClient) Delete() *UnsavedPostAttachmentDelete {\n\tmutation := newUnsavedPostAttachmentMutation(c.config, OpDelete)\n\treturn &UnsavedPostAttachmentDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func NewPostWebhook(branchesToIgnore string, committersToIgnore string, enabled bool, id int32, title string, url string) *PostWebhook {\n\tthis := PostWebhook{}\n\tthis.BranchesToIgnore = branchesToIgnore\n\tthis.CommittersToIgnore = committersToIgnore\n\tthis.Enabled = enabled\n\tthis.Id = id\n\tthis.Title = title\n\tthis.Url = url\n\treturn &this\n}",
"func (c *StickersCreateStickerSetRequest) GetThumbAsNotEmpty() (*InputDocument, bool) {\n\tif value, ok := c.GetThumb(); ok {\n\t\treturn value.AsNotEmpty()\n\t}\n\treturn nil, false\n}",
"func New(top topics.Topic, p interface{}) Message {\n\tsafePayload := convertToSafePayload(p)\n\treturn &simple{category: top, payload: safePayload}\n}",
"func (controller *WidgetsController) Post(context *qhttp.Context) {\n\treq := &WidgetRequest{}\n\tif err := context.ReadObject(req); nil != err {\n\t\tcontext.SetError(&qerror.RestError{Code: qerror.ValidationError, Message: err.Error()}, http.StatusNotAcceptable)\n\t\treturn\n\t}\n\twidget := controller.storage.Create(req)\n\tcontext.SetResponse(widget, http.StatusCreated)\n}",
"func (u *App) Create(c echo.Context, req *Create) (*model.File, error) {\n\tau := u.rbac.User(c)\n\tid, err := util.GenerateUUID()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tstatus := model.StatusPending\n\tif au.Role <= model.SupportRole {\n\t\tstatus = model.StatusApproved\n\t}\n\n\tif req.Resource == \"\" {\n\t\treq.Resource = model.ResourceUser\n\t\treq.ResourceID = au.ID\n\t}\n\n\tif req.Type == \"\" {\n\t\treq.Type = model.GeneralFile\n\t}\n\n\tvar operator model.User\n\tif err = u.db.Model(&model.User{}).Where(\"uuid = ?\", au.ID).First(&operator).Error; err != nil {\n\t\treturn nil, err\n\t}\n\n\tmedia := model.File{\n\t\tBase: model.Base{ID: id},\n\t\tUserID: au.ID,\n\t\tUserName: operator.Name,\n\t\tName: req.Name,\n\t\tResource: req.Resource,\n\t\tResourceID: req.ResourceID,\n\t\tType: req.Type,\n\t\tURL: model.GetS3URLFromID(id, req.Public),\n\t\tStatus: status,\n\t\tPublic: req.Public,\n\t\tLocation: \"s3\",\n\t\tPath: req.Path,\n\t}\n\treturn u.udb.Create(u.db, media)\n}",
"func (c *UnsavedPostAttachmentClient) Query() *UnsavedPostAttachmentQuery {\n\treturn &UnsavedPostAttachmentQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *Consumer) CreatePost(ctx context.Context, m gosqs.Message) error {\n\tvar p Post\n\tif err := m.Decode(&p); err != nil {\n\t\treturn err\n\t}\n\n\t// send a message to the same queue\n\tc.MessageSelf(ctx, \"some_new_message\", &p)\n\n\t//forward the message to another queue\n\tc.Message(ctx, \"notification-worker\", \"some_new_message\", &p)\n\n\treturn nil\n}",
"func (c *PostClient) QueryThumbnail(po *Post) *PostThumbnailQuery {\n\tquery := &PostThumbnailQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := po.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(post.Table, post.FieldID, id),\n\t\t\tsqlgraph.To(postthumbnail.Table, postthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, post.ThumbnailTable, post.ThumbnailColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(po.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *Client) CreateWidget(widget *Widget) (createdWidget *Widget, err error) {\n\n\t// Basic requirements\n\tif len(widget.Label) == 0 {\n\t\terr = c.createError(fmt.Sprintf(\"missing required attribute: %s\", fieldLabel), http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Fire the Request\n\tvar response string\n\tif response, err = c.Request(modelWidget, http.MethodPost, widget); err != nil {\n\t\treturn\n\t}\n\n\t// Only a 201 is treated as a success\n\tif err = c.Error(http.StatusCreated, response); err != nil {\n\t\treturn\n\t}\n\n\t// Convert model response\n\tif err = json.Unmarshal([]byte(response), &createdWidget); err != nil {\n\t\terr = c.createError(fmt.Sprintf(\"failed unmarshaling data: %s\", \"widget\"), http.StatusExpectationFailed)\n\t}\n\treturn\n}",
"func CreateSwarmStackFileUploadBuilder(securityContext *security.RestrictedRequestContext,\n\tdataStore dataservices.DataStore,\n\tfileService portainer.FileService,\n\tstackDeployer deployments.StackDeployer) *SwarmStackFileUploadBuilder {\n\n\treturn &SwarmStackFileUploadBuilder{\n\t\tFileUploadMethodStackBuilder: FileUploadMethodStackBuilder{\n\t\t\tStackBuilder: CreateStackBuilder(dataStore, fileService, stackDeployer),\n\t\t},\n\t\tSecurityContext: securityContext,\n\t}\n}",
"func NewCreateThemeUnprocessableEntity() *CreateThemeUnprocessableEntity {\n\treturn &CreateThemeUnprocessableEntity{}\n}",
"func MakeThumbnail(encoded []byte, suffix, thumbnailSize string) []byte {\n\tsize := strings.Split(thumbnailSize, \"x\")\n\tif len(size) != 2 {\n\t\treturn nil\n\t}\n\tx, err1 := strconv.Atoi(size[0])\n\ty, err2 := strconv.Atoi(size[1])\n\tif err1 != nil || err2 != nil {\n\t\tlog.Println(thumbnailSize, \"is illegal format\")\n\t\treturn nil\n\t}\n\n\tfile := bytes.NewReader(encoded)\n\timg, _, err := image.Decode(file)\n\tif err != nil {\n\t\tlog.Println(err)\n\t\treturn nil\n\t}\n\tm := resize.Resize(uint(x), uint(y), img, resize.Lanczos3)\n\tvar out bytes.Buffer\n\tswitch suffix {\n\tcase \"jpg\", \"jpeg\":\n\t\terr = jpeg.Encode(&out, m, nil)\n\tcase \"png\":\n\t\terr = png.Encode(&out, m)\n\tcase \"gif\":\n\t\terr = gif.Encode(&out, m, nil)\n\tdefault:\n\t\tlog.Println(\"illegal format\", suffix)\n\t}\n\tif err != nil {\n\t\tlog.Println(err)\n\t}\n\treturn out.Bytes()\n}",
"func (upuo *UnsavedPostUpdateOne) SetThumbnailID(id int) *UnsavedPostUpdateOne {\n\tupuo.mutation.SetThumbnailID(id)\n\treturn upuo\n}",
"func (repo *PostAttributeRepository) Create(newAttribute *entity.PostAttribute, tableName string) error {\n\n\tvar prefix string\n\n\tswitch tableName {\n\tcase \"post_categories\":\n\t\tprefix = \"CATEGORY\"\n\t}\n\n\ttotalNumOfMembers := tools.CountMembers(tableName, repo.conn)\n\tnewAttribute.ID = fmt.Sprintf(prefix+\"-%s%d\", tools.GenerateRandomString(7), totalNumOfMembers+1)\n\n\tfor !tools.IsUnique(\"id\", newAttribute.ID, tableName, repo.conn) {\n\t\ttotalNumOfMembers++\n\t\tnewAttribute.ID = fmt.Sprintf(prefix+\"-%s%d\", tools.GenerateRandomString(7), totalNumOfMembers+1)\n\t}\n\n\terr := repo.conn.Table(tableName).Create(newAttribute).Error\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func (c *UnsavedPostAttachmentClient) Get(ctx context.Context, id int) (*UnsavedPostAttachment, error) {\n\treturn c.Query().Where(unsavedpostattachment.ID(id)).Only(ctx)\n}",
"func CreateBlankImage(dest string, size resource.Quantity, preallocate bool) error {\n\tklog.V(1).Infof(\"creating raw image with size %s, preallocation %v\", size.String(), preallocate)\n\treturn qemuIterface.CreateBlankImage(dest, size, preallocate)\n}",
"func (instance *Host) Create(inctx context.Context, hostReq abstract.HostRequest, hostDef abstract.HostSizingRequirements, extra interface{}) (_ *userdata.Content, ferr fail.Error) {\n\tdefer fail.OnPanic(&ferr)\n\n\t// NOTE: do not test IsNull() here, it's expected to be IsNull() actually\n\tif instance == nil {\n\t\treturn nil, fail.InvalidInstanceError()\n\t}\n\tif !valid.IsNil(instance.MetadataCore) {\n\t\tif instance.MetadataCore.IsTaken() {\n\t\t\treturn nil, fail.InconsistentError(\"already carrying information\")\n\t\t}\n\t}\n\tif inctx == nil {\n\t\treturn nil, fail.InvalidParameterCannotBeNilError(\"ctx\")\n\t}\n\n\tctx, cancel := context.WithCancel(inctx)\n\tdefer cancel()\n\n\ttype result struct {\n\t\tct *userdata.Content\n\t\terr fail.Error\n\t}\n\n\tchRes := make(chan result)\n\tgo func() {\n\t\tdefer close(chRes)\n\n\t\ta, err := instance.implCreate(ctx, hostReq, hostDef, extra)\n\t\tchRes <- result{\n\t\t\tct: a,\n\t\t\terr: err,\n\t\t}\n\t}()\n\n\tselect {\n\tcase res := <-chRes: // if it works return the result\n\t\tif res.ct == nil && res.err == nil {\n\t\t\treturn nil, fail.NewError(\"creation failed unexpectedly\")\n\t\t}\n\t\treturn res.ct, res.err\n\tcase <-ctx.Done():\n\t\t<-chRes // wait for cleanup\n\t\treturn nil, fail.ConvertError(ctx.Err())\n\tcase <-inctx.Done(): // if not because parent context was canceled\n\t\t<-chRes // wait for cleanup\n\t\treturn nil, fail.Wrap(inctx.Err(), \"canceled by parent\")\n\t}\n}",
"func (upq *UnsavedPostQuery) WithAttachments(opts ...func(*UnsavedPostAttachmentQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostAttachmentQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withAttachments = query\n\treturn upq\n}",
"func (o *CreatePackageUnprocessableEntity) WithPayload(payload *models.Error) *CreatePackageUnprocessableEntity {\n\to.Payload = payload\n\treturn o\n}",
"func (servAdmin *MediaService) Create(domain *Domain) (Domain, error) {\n\n\tmedia, err := servAdmin.repository.Create(domain)\n\tif err != nil {\n\t\treturn Domain{}, business.ErrInternalServer\n\t}\n\n\treturn media, nil\n}",
"func NewCreateCategoryUnprocessableEntity() *CreateCategoryUnprocessableEntity {\n\treturn &CreateCategoryUnprocessableEntity{}\n}",
"func (s *slugsService) Create(ctx context.Context, db *gorm.DB, img image.Image, w *DeploymentStream) (*Slug, error) {\n\treturn slugsCreateByImage(ctx, db, s.ImageRegistry, img, w)\n}",
"func (upu *UnsavedPostUpdate) SetNillableThumbnailID(id *int) *UnsavedPostUpdate {\n\tif id != nil {\n\t\tupu = upu.SetThumbnailID(*id)\n\t}\n\treturn upu\n}",
"func (c *UPHostClient) NewCreatePHostRequest() *CreatePHostRequest {\n\treq := &CreatePHostRequest{}\n\n\t// setup request with client config\n\tc.Client.SetupRequest(req)\n\n\t// setup retryable with default retry policy (retry for non-create action and common error)\n\treq.SetRetryable(false)\n\treturn req\n}",
"func (r *MonitorNoneResource) Create(item MonitorNone) error {\n\tif err := r.c.ModQuery(\"POST\", BasePath+MonitorNoneEndpoint, item); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func CreatePost(travelcapsule, title, message, imgloc string, hashtags []string, username string, session *r.Session) string {\n\tcapsule := travelcapsule\n\n\tif travelcapsule != \"\" {\n\t\tvar body ct.Body\n\t\tbody = ct.Body{\n\t\t\tMessage: message,\n\t\t}\n\t\t\n\t\tpost := ct.Post{\n\t\t\tTitle: title,\n\t\t\tCreatedOn: time.Now(),\n\t\t\tCreatedBy: username,\n\t\t\tPostBody: body,\n\t\t\tHashtags: hashtags,\n\t\t\tLikes: 0,\n\t\t}\n\t\tcreator := CheckTravelCapsuleExists(travelcapsule, session)\n\t\tfmt.Println(\"Creator: \" + creator + \" User: \" + username)\n\t\tif creator == username {\n\t\t\tgo addImageToPost(imgloc, travelcapsule, post, session)\n\t\t\tfmt.Println(\"Added image\")\n\t\t\treturn capsule\n\t\t}\n\t}\n\treturn \"\"\n}",
"func (c *UPHostClient) NewTerminatePHostImageRequest() *TerminatePHostImageRequest {\n\treq := &TerminatePHostImageRequest{}\n\n\t// setup request with client config\n\tc.Client.SetupRequest(req)\n\n\t// setup retryable with default retry policy (retry for non-create action and common error)\n\treq.SetRetryable(true)\n\treturn req\n}",
"func New(params Params) (*presignerT, error) {\n\treturn newPresigner(params)\n}"
] |
[
"0.6459506",
"0.63260597",
"0.60982233",
"0.60950893",
"0.60893095",
"0.5909794",
"0.58358765",
"0.57944477",
"0.5528459",
"0.5515848",
"0.5128759",
"0.5105317",
"0.5085749",
"0.50334",
"0.5007182",
"0.50057614",
"0.49534622",
"0.4823222",
"0.4773472",
"0.4738066",
"0.46965992",
"0.46656454",
"0.46623218",
"0.46433398",
"0.46426472",
"0.46404776",
"0.46328643",
"0.45776722",
"0.45554167",
"0.45301375",
"0.45225492",
"0.45083317",
"0.4492112",
"0.44874597",
"0.44822696",
"0.4476333",
"0.44458193",
"0.44364017",
"0.44342095",
"0.44207662",
"0.43908778",
"0.4388208",
"0.43727416",
"0.4372177",
"0.43584213",
"0.43498585",
"0.43293047",
"0.4271149",
"0.42602056",
"0.42459854",
"0.4236752",
"0.42364982",
"0.42341784",
"0.42223534",
"0.4187485",
"0.4179796",
"0.4173677",
"0.41603017",
"0.4146893",
"0.4135977",
"0.4133177",
"0.41330236",
"0.41297314",
"0.4106643",
"0.40715274",
"0.4062643",
"0.40534526",
"0.40479752",
"0.40393987",
"0.4026185",
"0.40124708",
"0.3993939",
"0.398439",
"0.39752203",
"0.39740315",
"0.3968442",
"0.39516276",
"0.39479443",
"0.39430135",
"0.39421132",
"0.3938116",
"0.3924696",
"0.39191365",
"0.390558",
"0.39042917",
"0.38998225",
"0.3894399",
"0.38912",
"0.38872808",
"0.3881935",
"0.38813967",
"0.3877286",
"0.38750303",
"0.38698846",
"0.38681892",
"0.3859457",
"0.38518506",
"0.38434148",
"0.38429117",
"0.38366473"
] |
0.77439266
|
0
|
CreateBulk returns a builder for creating a bulk of UnsavedPostThumbnail entities.
|
func (c *UnsavedPostThumbnailClient) CreateBulk(builders ...*UnsavedPostThumbnailCreate) *UnsavedPostThumbnailCreateBulk {
return &UnsavedPostThumbnailCreateBulk{config: c.config, builders: builders}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *PostThumbnailClient) CreateBulk(builders ...*PostThumbnailCreate) *PostThumbnailCreateBulk {\n\treturn &PostThumbnailCreateBulk{config: c.config, builders: builders}\n}",
"func (c *UnsavedPostImageClient) CreateBulk(builders ...*UnsavedPostImageCreate) *UnsavedPostImageCreateBulk {\n\treturn &UnsavedPostImageCreateBulk{config: c.config, builders: builders}\n}",
"func (c *UnsavedPostAttachmentClient) CreateBulk(builders ...*UnsavedPostAttachmentCreate) *UnsavedPostAttachmentCreateBulk {\n\treturn &UnsavedPostAttachmentCreateBulk{config: c.config, builders: builders}\n}",
"func (c *UnsavedPostClient) CreateBulk(builders ...*UnsavedPostCreate) *UnsavedPostCreateBulk {\n\treturn &UnsavedPostCreateBulk{config: c.config, builders: builders}\n}",
"func (c *PostImageClient) CreateBulk(builders ...*PostImageCreate) *PostImageCreateBulk {\n\treturn &PostImageCreateBulk{config: c.config, builders: builders}\n}",
"func (c *PostAttachmentClient) CreateBulk(builders ...*PostAttachmentCreate) *PostAttachmentCreateBulk {\n\treturn &PostAttachmentCreateBulk{config: c.config, builders: builders}\n}",
"func (c *UnsavedPostVideoClient) CreateBulk(builders ...*UnsavedPostVideoCreate) *UnsavedPostVideoCreateBulk {\n\treturn &UnsavedPostVideoCreateBulk{config: c.config, builders: builders}\n}",
"func (c *MediaClient) CreateBulk(builders ...*MediaCreate) *MediaCreateBulk {\n\treturn &MediaCreateBulk{config: c.config, builders: builders}\n}",
"func (c *PostClient) CreateBulk(builders ...*PostCreate) *PostCreateBulk {\n\treturn &PostCreateBulk{config: c.config, builders: builders}\n}",
"func (c *BinaryFileClient) CreateBulk(builders ...*BinaryFileCreate) *BinaryFileCreateBulk {\n\treturn &BinaryFileCreateBulk{config: c.config, builders: builders}\n}",
"func (c *PostVideoClient) CreateBulk(builders ...*PostVideoCreate) *PostVideoCreateBulk {\n\treturn &PostVideoCreateBulk{config: c.config, builders: builders}\n}",
"func (c *TagClient) CreateBulk(builders ...*TagCreate) *TagCreateBulk {\n\treturn &TagCreateBulk{config: c.config, builders: builders}\n}",
"func (c *DNSBLQueryClient) CreateBulk(builders ...*DNSBLQueryCreate) *DNSBLQueryCreateBulk {\n\treturn &DNSBLQueryCreateBulk{config: c.config, builders: builders}\n}",
"func (c *EmptyClient) CreateBulk(builders ...*EmptyCreate) *EmptyCreateBulk {\n\treturn &EmptyCreateBulk{config: c.config, builders: builders}\n}",
"func (c *BeerClient) CreateBulk(builders ...*BeerCreate) *BeerCreateBulk {\n\treturn &BeerCreateBulk{config: c.config, builders: builders}\n}",
"func (c *ReviewClient) CreateBulk(builders ...*ReviewCreate) *ReviewCreateBulk {\n\treturn &ReviewCreateBulk{config: c.config, builders: builders}\n}",
"func (c *IPClient) CreateBulk(builders ...*IPCreate) *IPCreateBulk {\n\treturn &IPCreateBulk{config: c.config, builders: builders}\n}",
"func (c *PlaylistClient) CreateBulk(builders ...*PlaylistCreate) *PlaylistCreateBulk {\n\treturn &PlaylistCreateBulk{config: c.config, builders: builders}\n}",
"func (c *SkillClient) CreateBulk(builders ...*SkillCreate) *SkillCreateBulk {\n\treturn &SkillCreateBulk{config: c.config, builders: builders}\n}",
"func (c *AdminClient) CreateBulk(builders ...*AdminCreate) *AdminCreateBulk {\n\treturn &AdminCreateBulk{config: c.config, builders: builders}\n}",
"func (c *WorkExperienceClient) CreateBulk(builders ...*WorkExperienceCreate) *WorkExperienceCreateBulk {\n\treturn &WorkExperienceCreateBulk{config: c.config, builders: builders}\n}",
"func (c *OperationClient) CreateBulk(builders ...*OperationCreate) *OperationCreateBulk {\n\treturn &OperationCreateBulk{config: c.config, builders: builders}\n}",
"func (c *VeterinarianClient) CreateBulk(builders ...*VeterinarianCreate) *VeterinarianCreateBulk {\n\treturn &VeterinarianCreateBulk{config: c.config, builders: builders}\n}",
"func (c *CategoryClient) CreateBulk(builders ...*CategoryCreate) *CategoryCreateBulk {\n\treturn &CategoryCreateBulk{config: c.config, builders: builders}\n}",
"func (c *UserCardClient) CreateBulk(builders ...*UserCardCreate) *UserCardCreateBulk {\n\treturn &UserCardCreateBulk{config: c.config, builders: builders}\n}",
"func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk {\n\treturn &UserCreateBulk{config: c.config, builders: builders}\n}",
"func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk {\n\treturn &UserCreateBulk{config: c.config, builders: builders}\n}",
"func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk {\n\treturn &UserCreateBulk{config: c.config, builders: builders}\n}",
"func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk {\n\treturn &UserCreateBulk{config: c.config, builders: builders}\n}",
"func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk {\n\treturn &UserCreateBulk{config: c.config, builders: builders}\n}",
"func (c *UserWalletClient) CreateBulk(builders ...*UserWalletCreate) *UserWalletCreateBulk {\n\treturn &UserWalletCreateBulk{config: c.config, builders: builders}\n}",
"func (c *PetClient) CreateBulk(builders ...*PetCreate) *PetCreateBulk {\n\treturn &PetCreateBulk{config: c.config, builders: builders}\n}",
"func (c *JobClient) CreateBulk(builders ...*JobCreate) *JobCreateBulk {\n\treturn &JobCreateBulk{config: c.config, builders: builders}\n}",
"func (c *DNSBLResponseClient) CreateBulk(builders ...*DNSBLResponseCreate) *DNSBLResponseCreateBulk {\n\treturn &DNSBLResponseCreateBulk{config: c.config, builders: builders}\n}",
"func (c *TransactionClient) CreateBulk(builders ...*TransactionCreate) *TransactionCreateBulk {\n\treturn &TransactionCreateBulk{config: c.config, builders: builders}\n}",
"func (c *WalletNodeClient) CreateBulk(builders ...*WalletNodeCreate) *WalletNodeCreateBulk {\n\treturn &WalletNodeCreateBulk{config: c.config, builders: builders}\n}",
"func (c *CardClient) CreateBulk(builders ...*CardCreate) *CardCreateBulk {\n\treturn &CardCreateBulk{config: c.config, builders: builders}\n}",
"func (c *EventClient) CreateBulk(builders ...*EventCreate) *EventCreateBulk {\n\treturn &EventCreateBulk{config: c.config, builders: builders}\n}",
"func (c *CardScanClient) CreateBulk(builders ...*CardScanCreate) *CardScanCreateBulk {\n\treturn &CardScanCreateBulk{config: c.config, builders: builders}\n}",
"func (c *KeyStoreClient) CreateBulk(builders ...*KeyStoreCreate) *KeyStoreCreateBulk {\n\treturn &KeyStoreCreateBulk{config: c.config, builders: builders}\n}",
"func (m *Manager) BulkCreate(obj interface{}) error {\n\treturn m.Query(m.Insert().Values(obj).Returning(), obj)\n}",
"func (c *ClinicClient) CreateBulk(builders ...*ClinicCreate) *ClinicCreateBulk {\n\treturn &ClinicCreateBulk{config: c.config, builders: builders}\n}",
"func (c *AppointmentClient) CreateBulk(builders ...*AppointmentCreate) *AppointmentCreateBulk {\n\treturn &AppointmentCreateBulk{config: c.config, builders: builders}\n}",
"func (c *CompanyClient) CreateBulk(builders ...*CompanyCreate) *CompanyCreateBulk {\n\treturn &CompanyCreateBulk{config: c.config, builders: builders}\n}",
"func (c *CoinInfoClient) CreateBulk(builders ...*CoinInfoCreate) *CoinInfoCreateBulk {\n\treturn &CoinInfoCreateBulk{config: c.config, builders: builders}\n}",
"func (r *AssetRepository) CreateBulk(assets []assetEntity.Asset) (int, error) {\n\terr := r.restore()\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\tn, err := r.repository.CreateBulk(assets)\n\tif err != nil {\n\t\treturn n, fmt.Errorf(\"assets bulk create failed: %w\", err)\n\t}\n\terr = r.dump()\n\treturn n, err\n}",
"func (c *AdminSessionClient) CreateBulk(builders ...*AdminSessionCreate) *AdminSessionCreateBulk {\n\treturn &AdminSessionCreateBulk{config: c.config, builders: builders}\n}",
"func (a *DefaultApiService) BulkCreate(ctx _context.Context) ApiBulkCreateRequest {\n\treturn ApiBulkCreateRequest{\n\t\tApiService: a,\n\t\tctx: ctx,\n\t}\n}",
"func (c *CustomerClient) CreateBulk(builders ...*CustomerCreate) *CustomerCreateBulk {\n\treturn &CustomerCreateBulk{config: c.config, builders: builders}\n}",
"func (m *MessagesController) CreateBulk(ctx *gin.Context) {\n\tmessagesIn := &tat.MessagesJSONIn{}\n\tctx.Bind(messagesIn)\n\tvar msgs []*tat.MessageJSONOut\n\tfor _, messageIn := range messagesIn.Messages {\n\t\tm, code, err := m.createSingle(ctx, messageIn)\n\t\tif err != nil {\n\t\t\tctx.JSON(code, gin.H{\"error\": err.Error()})\n\t\t\treturn\n\t\t}\n\t\tmsgs = append(msgs, m)\n\t}\n\tctx.JSON(http.StatusCreated, msgs)\n}",
"func (c *UnsavedPostThumbnailClient) Create() *UnsavedPostThumbnailCreate {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpCreate)\n\treturn &UnsavedPostThumbnailCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (a *BulkApiService) CreateBulkMoCloner(ctx context.Context) ApiCreateBulkMoClonerRequest {\n\treturn ApiCreateBulkMoClonerRequest{\n\t\tApiService: a,\n\t\tctx: ctx,\n\t}\n}",
"func (ftcb *FileTypeCreateBulk) Save(ctx context.Context) ([]*FileType, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(ftcb.builders))\n\tnodes := make([]*FileType, len(ftcb.builders))\n\tmutators := make([]Mutator, len(ftcb.builders))\n\tfor i := range ftcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := ftcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*FileTypeMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, ftcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\tspec := &sqlgraph.BatchCreateSpec{Nodes: specs}\n\t\t\t\t\tspec.OnConflict = ftcb.conflict\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, ftcb.driver, spec); err != nil {\n\t\t\t\t\t\tif sqlgraph.IsConstraintError(err) {\n\t\t\t\t\t\t\terr = &ConstraintError{msg: err.Error(), wrap: err}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation.id = &nodes[i].ID\n\t\t\t\tif specs[i].ID.Value != nil {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, ftcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (s *CampaignNegativeKeywordService) CreateBulk(ctx context.Context, campaignID int64, data []*NegativeKeyword) ([]*NegativeKeyword, *Response, error) {\n\tif campaignID == 0 {\n\t\treturn nil, nil, fmt.Errorf(\"campaignID can not be 0\")\n\t}\n\tu := fmt.Sprintf(\"campaigns/%d/negativekeywords/bulk\", campaignID)\n\treq, err := s.client.NewRequest(\"POST\", u, data)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tnegativekeywords := []*NegativeKeyword{}\n\tresp, err := s.client.Do(ctx, req, &negativekeywords)\n\tif err != nil {\n\t\treturn nil, resp, err\n\t}\n\treturn negativekeywords, resp, nil\n}",
"func NewBulk(data []byte) *EncodeData {\n\tans := &EncodeData{}\n\tans.Type = TypeBulk\n\tans.Value = data\n\treturn ans\n}",
"func (icb *InstanceCreateBulk) Save(ctx context.Context) ([]*Instance, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(icb.builders))\n\tnodes := make([]*Instance, len(icb.builders))\n\tmutators := make([]Mutator, len(icb.builders))\n\tfor i := range icb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := icb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*InstanceMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, icb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\tspec := &sqlgraph.BatchCreateSpec{Nodes: specs}\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, icb.driver, spec); err != nil {\n\t\t\t\t\t\tif sqlgraph.IsConstraintError(err) {\n\t\t\t\t\t\t\terr = &ConstraintError{err.Error(), err}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation.id = &nodes[i].ID\n\t\t\t\tmutation.done = true\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, icb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (bcb *BulkCreateBulk) Save(ctx context.Context) ([]*Bulk, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(bcb.builders))\n\tnodes := make([]*Bulk, len(bcb.builders))\n\tmutators := make([]Mutator, len(bcb.builders))\n\tfor i := range bcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := bcb.builders[i]\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*BulkMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, bcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, bcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tif nodes[i].ID == 0 {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\t}\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, bcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (hcb *HarborCreateBulk) Save(ctx context.Context) ([]*Harbor, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(hcb.builders))\n\tnodes := make([]*Harbor, len(hcb.builders))\n\tmutators := make([]Mutator, len(hcb.builders))\n\tfor i := range hcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := hcb.builders[i]\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*HarborMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, hcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, hcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, hcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (a *BulkApiService) CreateBulkMoDeepCloner(ctx context.Context) ApiCreateBulkMoDeepClonerRequest {\n\treturn ApiCreateBulkMoDeepClonerRequest{\n\t\tApiService: a,\n\t\tctx: ctx,\n\t}\n}",
"func createThumbs(file string) error {\n\timg, err := imaging.Open(file)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\text := filepath.Ext(file)\n\tbasePath := strings.TrimSuffix(file, ext)\n\n\tthumbSizes := app.Config.GetStringSlice(\"upload.thumbs\")\n\tfor _, size := range thumbSizes {\n\t\tparts := strings.SplitN(size, \"x\", 2)\n\t\tif len(parts) != 2 {\n\t\t\tcontinue\n\t\t}\n\n\t\tw, _ := strconv.Atoi(parts[0])\n\t\th, _ := strconv.Atoi(parts[1])\n\n\t\tthumb := imaging.Thumbnail(img, w, h, imaging.CatmullRom)\n\n\t\t// create a new blank image\n\t\tdst := imaging.New(w, h, color.NRGBA{0, 0, 0, 0})\n\n\t\t// paste thumbnail into the new image\n\t\tdst = imaging.Paste(dst, thumb, image.Pt(0, 0))\n\n\t\t// save to file\n\t\tif err := imaging.Save(dst, basePath+\"_\"+size+ext); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (upvcb *UnsavedPostVideoCreateBulk) Save(ctx context.Context) ([]*UnsavedPostVideo, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(upvcb.builders))\n\tnodes := make([]*UnsavedPostVideo, len(upvcb.builders))\n\tmutators := make([]Mutator, len(upvcb.builders))\n\tfor i := range upvcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := upvcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*UnsavedPostVideoMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, upvcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, upvcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, upvcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (s *AdGroupNegativeKeywordService) CreateBulk(ctx context.Context, campaignID int64, adGroupID int64, data []*NegativeKeyword) ([]*NegativeKeyword, *Response, error) {\n\tif campaignID == 0 {\n\t\treturn nil, nil, fmt.Errorf(\"campaignID can not be 0\")\n\t}\n\tif adGroupID == 0 {\n\t\treturn nil, nil, fmt.Errorf(\"adGroupID can not be 0\")\n\t}\n\tu := fmt.Sprintf(\"campaigns/%d/adgroups/%d/negativekeywords/bulk\", campaignID, adGroupID)\n\treq, err := s.client.NewRequest(\"POST\", u, data)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tnegativekeywords := []*NegativeKeyword{}\n\tresp, err := s.client.Do(ctx, req, &negativekeywords)\n\tif err != nil {\n\t\treturn nil, resp, err\n\t}\n\n\treturn negativekeywords, resp, nil\n}",
"func (bbcb *BasicBannerCreateBulk) Save(ctx context.Context) ([]*BasicBanner, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(bbcb.builders))\n\tnodes := make([]*BasicBanner, len(bbcb.builders))\n\tmutators := make([]Mutator, len(bbcb.builders))\n\tfor i := range bbcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := bbcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*BasicBannerMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, bbcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, bbcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, bbcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (bcb *BadgeCreateBulk) Save(ctx context.Context) ([]*Badge, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(bcb.builders))\n\tnodes := make([]*Badge, len(bcb.builders))\n\tmutators := make([]Mutator, len(bcb.builders))\n\tfor i := range bcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := bcb.builders[i]\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*BadgeMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, bcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\tspec := &sqlgraph.BatchCreateSpec{Nodes: specs}\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, bcb.driver, spec); err != nil {\n\t\t\t\t\t\tif sqlgraph.IsConstraintError(err) {\n\t\t\t\t\t\t\terr = &ConstraintError{err.Error(), err}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation.id = &nodes[i].ID\n\t\t\t\tmutation.done = true\n\t\t\t\tif specs[i].ID.Value != nil {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\t}\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, bcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (r *pgRepository) CreateMany(ctx context.Context, tenant string, items []*model.APIDefinition) error {\n\tfor index, item := range items {\n\t\tentity := r.conv.ToEntity(item)\n\n\t\terr := r.creator.Create(ctx, resource.API, tenant, entity)\n\t\tif err != nil {\n\t\t\treturn errors.Wrapf(err, \"while persisting %d item\", index)\n\t\t}\n\t}\n\n\treturn nil\n}",
"func NewMultiBulk(array []*EncodeData) *EncodeData {\n\tans := &EncodeData{}\n\tans.Type = TypeMultiBulk\n\tans.Array = array\n\treturn ans\n}",
"func BuildBulkPayload(collectionBulkBody string) (*collection.BulkPayload, error) {\n\tvar err error\n\tvar body BulkRequestBody\n\t{\n\t\terr = json.Unmarshal([]byte(collectionBulkBody), &body)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"invalid JSON for body, \\nerror: %s, \\nexample of valid JSON:\\n%s\", err, \"'{\\n \\\"operation\\\": \\\"cancel\\\",\\n \\\"size\\\": 1,\\n \\\"status\\\": \\\"in progress\\\"\\n }'\")\n\t\t}\n\t\tif !(body.Operation == \"retry\" || body.Operation == \"cancel\" || body.Operation == \"abandon\") {\n\t\t\terr = goa.MergeErrors(err, goa.InvalidEnumValueError(\"body.operation\", body.Operation, []any{\"retry\", \"cancel\", \"abandon\"}))\n\t\t}\n\t\tif !(body.Status == \"new\" || body.Status == \"in progress\" || body.Status == \"done\" || body.Status == \"error\" || body.Status == \"unknown\" || body.Status == \"queued\" || body.Status == \"pending\" || body.Status == \"abandoned\") {\n\t\t\terr = goa.MergeErrors(err, goa.InvalidEnumValueError(\"body.status\", body.Status, []any{\"new\", \"in progress\", \"done\", \"error\", \"unknown\", \"queued\", \"pending\", \"abandoned\"}))\n\t\t}\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tv := &collection.BulkPayload{\n\t\tOperation: body.Operation,\n\t\tStatus: body.Status,\n\t\tSize: body.Size,\n\t}\n\t{\n\t\tvar zero uint\n\t\tif v.Size == zero {\n\t\t\tv.Size = 100\n\t\t}\n\t}\n\n\treturn v, nil\n}",
"func (rcb *ResourceCreateBulk) Save(ctx context.Context) ([]*Resource, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(rcb.builders))\n\tnodes := make([]*Resource, len(rcb.builders))\n\tmutators := make([]Mutator, len(rcb.builders))\n\tfor i := range rcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := rcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*ResourceMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, rcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, rcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, rcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func MakeBulkMetrics(histogramWindow time.Duration) Metrics {\n\treturn Metrics{\n\t\tMaxBytesHist: metric.NewHistogram(metaMemMaxBytes, histogramWindow, log10int64times1000, 3),\n\t\tCurBytesCount: metric.NewGauge(metaMemCurBytes),\n\t}\n}",
"func CreateInBatch(vmSpecs []types.VMSpec, hostBus chan<- *types.Host) (err error) {\n\n\t// make working directory\n\n\tfor _, vm := range vmSpecs {\n\t\t// go create(vm, driverName, hostBus)\n\n\t\tdriverName := vm.CloudDriverName\n\t\tif driverName == \"\" {\n\t\t\treturn fmt.Errorf(\"driver name is not specified.\")\n\t\t}\n\t\tdriver, err := helpers.InitDrivers(driverName, vm, storePath)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\th := &HostHandler{\n\t\t\tName: vm.Name,\n\t\t\tDriver: driver,\n\t\t\tVMSpec: vm,\n\t\t\tcreateBus: hostBus,\n\t\t}\n\n\t\tgo h.createOrGet()\n\t}\n\n\treturn nil\n\n}",
"func (fpscb *FloorPlanScaleCreateBulk) Save(ctx context.Context) ([]*FloorPlanScale, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(fpscb.builders))\n\tnodes := make([]*FloorPlanScale, len(fpscb.builders))\n\tmutators := make([]Mutator, len(fpscb.builders))\n\tfor i := range fpscb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := fpscb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*FloorPlanScaleMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, fpscb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, fpscb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, fpscb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (icb *ItemCreateBulk) Save(ctx context.Context) ([]*Item, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(icb.builders))\n\tnodes := make([]*Item, len(icb.builders))\n\tmutators := make([]Mutator, len(icb.builders))\n\tfor i := range icb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := icb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*ItemMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, icb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\tspec := &sqlgraph.BatchCreateSpec{Nodes: specs}\n\t\t\t\t\tspec.OnConflict = icb.conflict\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, icb.driver, spec); err != nil {\n\t\t\t\t\t\tif sqlgraph.IsConstraintError(err) {\n\t\t\t\t\t\t\terr = &ConstraintError{msg: err.Error(), wrap: err}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation.id = &nodes[i].ID\n\t\t\t\tmutation.done = true\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, icb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (upq *UnsavedPostQuery) WithImages(opts ...func(*UnsavedPostImageQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostImageQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withImages = query\n\treturn upq\n}",
"func (c *BulkDeletesController) Create(ctx *gin.Context) {\n\trequest := models.BulkDeleteRunRequest{}\n\tif err := ctx.ShouldBindJSON(&request); err != nil {\n\t\tctx.AbortWithError(422, err)\n\t} else if task, err := models.NewBulkDeleteRunTask(request); err != nil {\n\t\tctx.AbortWithError(422, err)\n\t} else if err := c.App.GetStore().Save(task); err != nil {\n\t\tctx.AbortWithError(500, err)\n\t} else if doc, err := jsonapi.Marshal(task); err != nil {\n\t\tctx.AbortWithError(500, err)\n\t} else {\n\t\tc.App.WakeBulkRunDeleter()\n\t\tctx.Data(201, MediaType, doc)\n\t}\n}",
"func (bcb *BeerCreateBulk) Save(ctx context.Context) ([]*Beer, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(bcb.builders))\n\tnodes := make([]*Beer, len(bcb.builders))\n\tmutators := make([]Mutator, len(bcb.builders))\n\tfor i := range bcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := bcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*BeerMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, bcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, bcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tif nodes[i].ID == 0 {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int64(id)\n\t\t\t\t}\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, bcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (*SecretsManagerV2) NewCreateSecretLocksBulkOptions(id string, locks []SecretLockPrototype) *CreateSecretLocksBulkOptions {\n\treturn &CreateSecretLocksBulkOptions{\n\t\tID: core.StringPtr(id),\n\t\tLocks: locks,\n\t}\n}",
"func (fcb *FileCreateBulk) Save(ctx context.Context) ([]*File, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(fcb.builders))\n\tnodes := make([]*File, len(fcb.builders))\n\tmutators := make([]Mutator, len(fcb.builders))\n\tfor i := range fcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := fcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*FileMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, fcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, fcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, fcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func CreateBatchUnbindProjectProductsRequest() (request *BatchUnbindProjectProductsRequest) {\n\trequest = &BatchUnbindProjectProductsRequest{\n\t\tRpcRequest: &requests.RpcRequest{},\n\t}\n\trequest.InitWithApiInfo(\"Iot\", \"2018-01-20\", \"BatchUnbindProjectProducts\", \"\", \"\")\n\trequest.Method = requests.POST\n\treturn\n}",
"func (pcb *PageCreateBulk) Save(ctx context.Context) ([]*Page, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(pcb.builders))\n\tnodes := make([]*Page, len(pcb.builders))\n\tmutators := make([]Mutator, len(pcb.builders))\n\tfor i := range pcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := pcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*PageMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tvar err error\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, pcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\tspec := &sqlgraph.BatchCreateSpec{Nodes: specs}\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, pcb.driver, spec); err != nil {\n\t\t\t\t\t\tif sqlgraph.IsConstraintError(err) {\n\t\t\t\t\t\t\terr = &ConstraintError{msg: err.Error(), wrap: err}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation.id = &nodes[i].ID\n\t\t\t\tif specs[i].ID.Value != nil {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, pcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (ggcb *GithubGistCreateBulk) Save(ctx context.Context) ([]*GithubGist, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(ggcb.builders))\n\tnodes := make([]*GithubGist, len(ggcb.builders))\n\tmutators := make([]Mutator, len(ggcb.builders))\n\tfor i := range ggcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := ggcb.builders[i]\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*GithubGistMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tvar err error\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, ggcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\tspec := &sqlgraph.BatchCreateSpec{Nodes: specs}\n\t\t\t\t\tspec.OnConflict = ggcb.conflict\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, ggcb.driver, spec); err != nil {\n\t\t\t\t\t\tif sqlgraph.IsConstraintError(err) {\n\t\t\t\t\t\t\terr = &ConstraintError{msg: err.Error(), wrap: err}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation.id = &nodes[i].ID\n\t\t\t\tif specs[i].ID.Value != nil {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, ggcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (a *BulkApiService) CreateBulkRequest(ctx context.Context) ApiCreateBulkRequestRequest {\n\treturn ApiCreateBulkRequestRequest{\n\t\tApiService: a,\n\t\tctx: ctx,\n\t}\n}",
"func (bcb *BlockCreateBulk) Save(ctx context.Context) ([]*Block, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(bcb.builders))\n\tnodes := make([]*Block, len(bcb.builders))\n\tmutators := make([]Mutator, len(bcb.builders))\n\tfor i := range bcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := bcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*BlockMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, bcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, bcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, bcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (bcb *BouncerCreateBulk) Save(ctx context.Context) ([]*Bouncer, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(bcb.builders))\n\tnodes := make([]*Bouncer, len(bcb.builders))\n\tmutators := make([]Mutator, len(bcb.builders))\n\tfor i := range bcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := bcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*BouncerMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, bcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\tspec := &sqlgraph.BatchCreateSpec{Nodes: specs}\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, bcb.driver, spec); err != nil {\n\t\t\t\t\t\tif sqlgraph.IsConstraintError(err) {\n\t\t\t\t\t\t\terr = &ConstraintError{msg: err.Error(), wrap: err}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation.id = &nodes[i].ID\n\t\t\t\tif specs[i].ID.Value != nil {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, bcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (a *DefaultApiService) BulkCreateExecute(r ApiBulkCreateRequest) (BulkCreateResponse, *_nethttp.Response, GenericOpenAPIError) {\n\tvar (\n\t\tlocalVarHTTPMethod = _nethttp.MethodPost\n\t\tlocalVarPostBody interface{}\n\t\tlocalVarFormFileName string\n\t\tlocalVarFileName string\n\t\tlocalVarFileBytes []byte\n\t\texecutionError GenericOpenAPIError\n\t\tlocalVarReturnValue BulkCreateResponse\n\t)\n\n\tlocalBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, \"DefaultApiService.BulkCreate\")\n\tif err != nil {\n\t\texecutionError.error = err.Error()\n\t\treturn localVarReturnValue, nil, executionError\n\t}\n\n\tlocalVarPath := localBasePath + \"/bulk_create\"\n\n\tlocalVarHeaderParams := make(map[string]string)\n\tlocalVarQueryParams := _neturl.Values{}\n\tlocalVarFormParams := _neturl.Values{}\n\n\t// to determine the Content-Type header\n\tlocalVarHTTPContentTypes := []string{\"application/json\"}\n\n\t// set Content-Type header\n\tlocalVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)\n\tif localVarHTTPContentType != \"\" {\n\t\tlocalVarHeaderParams[\"Content-Type\"] = localVarHTTPContentType\n\t}\n\n\t// to determine the Accept header\n\tlocalVarHTTPHeaderAccepts := []string{\"application/json\"}\n\n\t// set Accept header\n\tlocalVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)\n\tif localVarHTTPHeaderAccept != \"\" {\n\t\tlocalVarHeaderParams[\"Accept\"] = localVarHTTPHeaderAccept\n\t}\n\t// body params\n\tlocalVarPostBody = r.bulkCreatePayload\n\treq, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)\n\tif err != nil {\n\t\texecutionError.error = err.Error()\n\t\treturn localVarReturnValue, nil, executionError\n\t}\n\n\tlocalVarHTTPResponse, err := a.client.callAPI(req)\n\tif err != nil || localVarHTTPResponse == nil {\n\t\texecutionError.error = err.Error()\n\t\treturn localVarReturnValue, localVarHTTPResponse, executionError\n\t}\n\n\tlocalVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)\n\tlocalVarHTTPResponse.Body.Close()\n\tlocalVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))\n\tif err != nil {\n\t\texecutionError.error = err.Error()\n\t\treturn localVarReturnValue, localVarHTTPResponse, executionError\n\t}\n\n\tif localVarHTTPResponse.StatusCode >= 300 {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: localVarHTTPResponse.Status,\n\t\t}\n\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t}\n\n\terr = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\tif err != nil {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: err.Error(),\n\t\t}\n\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t}\n\n\treturn localVarReturnValue, localVarHTTPResponse, executionError\n}",
"func (recb *RawEventCreateBulk) Save(ctx context.Context) ([]*RawEvent, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(recb.builders))\n\tnodes := make([]*RawEvent, len(recb.builders))\n\tmutators := make([]Mutator, len(recb.builders))\n\tfor i := range recb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := recb.builders[i]\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tif err := builder.preSave(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation, ok := m.(*RawEventMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, recb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, recb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, recb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (fcb *FeedCreateBulk) Save(ctx context.Context) ([]*Feed, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(fcb.builders))\n\tnodes := make([]*Feed, len(fcb.builders))\n\tmutators := make([]Mutator, len(fcb.builders))\n\tfor i := range fcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := fcb.builders[i]\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tif err := builder.preSave(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation, ok := m.(*FeedMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, fcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, fcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tif nodes[i].ID == 0 {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int64(id)\n\t\t\t\t}\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, fcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (upq *UnsavedPostQuery) WithThumbnail(opts ...func(*UnsavedPostThumbnailQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withThumbnail = query\n\treturn upq\n}",
"func (m *ItemItemsDriveItemItemRequestBuilder) Thumbnails()(*ItemItemsItemThumbnailsRequestBuilder) {\n return NewItemItemsItemThumbnailsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter)\n}",
"func (a *BulkApiService) CreateBulkExport(ctx context.Context) ApiCreateBulkExportRequest {\n\treturn ApiCreateBulkExportRequest{\n\t\tApiService: a,\n\t\tctx: ctx,\n\t}\n}",
"func (a *BulkApiService) CreateBulkMoMerger(ctx context.Context) ApiCreateBulkMoMergerRequest {\n\treturn ApiCreateBulkMoMergerRequest{\n\t\tApiService: a,\n\t\tctx: ctx,\n\t}\n}",
"func (wcb *WordCreateBulk) Save(ctx context.Context) ([]*Word, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(wcb.builders))\n\tnodes := make([]*Word, len(wcb.builders))\n\tmutators := make([]Mutator, len(wcb.builders))\n\tfor i := range wcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := wcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*WordMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, wcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, wcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, wcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (etcb *ExportTaskCreateBulk) Save(ctx context.Context) ([]*ExportTask, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(etcb.builders))\n\tnodes := make([]*ExportTask, len(etcb.builders))\n\tmutators := make([]Mutator, len(etcb.builders))\n\tfor i := range etcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := etcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*ExportTaskMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, etcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, etcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, etcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (r AttachmentRepository) CreateManyAttachments(ctx context.Context, attachments []models.Attachment, feedbackID uint) error {\n\tdb := getDB(ctx, r.database.DB)\n\tq := r.database.SB.Insert(\"attachments\").Columns(\"name\", \"path\", \"feedback_id\")\n\n\tfor _, a := range attachments {\n\t\tq = q.Values(a.Name, a.Path, feedbackID)\n\t}\n\tq = q.Suffix(\"RETURNING id, name, path, feedback_id\")\n\n\tsql, args, err := q.ToSql()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\trows, err := db.Query(ctx, sql, args...)\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tgot, err := r.scan(rows)\n\tif err != nil {\n\t\treturn err\n\t}\n\tcopy(attachments, got)\n\t//r.close(db)\n\treturn nil\n\n}",
"func (epcb *EntryPointCreateBulk) Save(ctx context.Context) ([]*EntryPoint, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(epcb.builders))\n\tnodes := make([]*EntryPoint, len(epcb.builders))\n\tmutators := make([]Mutator, len(epcb.builders))\n\tfor i := range epcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := epcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*EntryPointMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, epcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, epcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, epcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (c *UnsavedPostImageClient) Create() *UnsavedPostImageCreate {\n\tmutation := newUnsavedPostImageMutation(c.config, OpCreate)\n\treturn &UnsavedPostImageCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (ccb *CampaignCreateBulk) Save(ctx context.Context) ([]*Campaign, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(ccb.builders))\n\tnodes := make([]*Campaign, len(ccb.builders))\n\tmutators := make([]Mutator, len(ccb.builders))\n\tfor i := range ccb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := ccb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*CampaignMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, ccb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, ccb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, ccb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (client *Client) CreateBulkTransaction(txn []*CreateTransaction) (_ *Response, err error) {\n\tpath := \"/transaction_bulk\"\n\turi := fmt.Sprintf(\"%s%s\", client.apiBaseURL, path)\n\n\tif len(txn) > MaxBulkPutSize {\n\t\treturn nil, ErrMaxBulkSizeExceeded\n\t}\n\n\ttxnBytes, err := json.Marshal(txn)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treq, err := http.NewRequest(http.MethodPost, uri, bytes.NewBuffer(txnBytes))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tresp, err := client.performRequest(req, string(txnBytes))\n\treturn resp, err\n}",
"func (rcb *RestaurantCreateBulk) Save(ctx context.Context) ([]*Restaurant, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(rcb.builders))\n\tnodes := make([]*Restaurant, len(rcb.builders))\n\tmutators := make([]Mutator, len(rcb.builders))\n\tfor i := range rcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := rcb.builders[i]\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*RestaurantMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, rcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, rcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif sqlgraph.IsConstraintError(err) {\n\t\t\t\t\t\t\terr = &ConstraintError{err.Error(), err}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation.id = &nodes[i].ID\n\t\t\t\tmutation.done = true\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, rcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (secretsManager *SecretsManagerV2) CreateSecretLocksBulkWithContext(ctx context.Context, createSecretLocksBulkOptions *CreateSecretLocksBulkOptions) (result *SecretLocks, response *core.DetailedResponse, err error) {\n\terr = core.ValidateNotNil(createSecretLocksBulkOptions, \"createSecretLocksBulkOptions cannot be nil\")\n\tif err != nil {\n\t\treturn\n\t}\n\terr = core.ValidateStruct(createSecretLocksBulkOptions, \"createSecretLocksBulkOptions\")\n\tif err != nil {\n\t\treturn\n\t}\n\n\tpathParamsMap := map[string]string{\n\t\t\"id\": *createSecretLocksBulkOptions.ID,\n\t}\n\n\tbuilder := core.NewRequestBuilder(core.POST)\n\tbuilder = builder.WithContext(ctx)\n\tbuilder.EnableGzipCompression = secretsManager.GetEnableGzipCompression()\n\t_, err = builder.ResolveRequestURL(secretsManager.Service.Options.URL, `/api/v2/secrets/{id}/locks_bulk`, pathParamsMap)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tfor headerName, headerValue := range createSecretLocksBulkOptions.Headers {\n\t\tbuilder.AddHeader(headerName, headerValue)\n\t}\n\n\tsdkHeaders := common.GetSdkHeaders(\"secrets_manager\", \"V2\", \"CreateSecretLocksBulk\")\n\tfor headerName, headerValue := range sdkHeaders {\n\t\tbuilder.AddHeader(headerName, headerValue)\n\t}\n\tbuilder.AddHeader(\"Accept\", \"application/json\")\n\tbuilder.AddHeader(\"Content-Type\", \"application/json\")\n\n\tif createSecretLocksBulkOptions.Mode != nil {\n\t\tbuilder.AddQuery(\"mode\", fmt.Sprint(*createSecretLocksBulkOptions.Mode))\n\t}\n\n\tbody := make(map[string]interface{})\n\tif createSecretLocksBulkOptions.Locks != nil {\n\t\tbody[\"locks\"] = createSecretLocksBulkOptions.Locks\n\t}\n\t_, err = builder.SetBodyContentJSON(body)\n\tif err != nil {\n\t\treturn\n\t}\n\n\trequest, err := builder.Build()\n\tif err != nil {\n\t\treturn\n\t}\n\n\tvar rawResponse map[string]json.RawMessage\n\tresponse, err = secretsManager.Service.Request(request, &rawResponse)\n\tif err != nil {\n\t\treturn\n\t}\n\tif rawResponse != nil {\n\t\terr = core.UnmarshalModel(rawResponse, \"\", &result, UnmarshalSecretLocks)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tresponse.Result = result\n\t}\n\n\treturn\n}",
"func (r *Repository) CreateInBatch(db *gorm.DB, i interface{}, batchSize int) error {\n\treturn db.Omit(clause.Associations).CreateInBatches(i, batchSize).Error\n}"
] |
[
"0.72044677",
"0.71913993",
"0.6860299",
"0.6705235",
"0.66927564",
"0.63871664",
"0.62329817",
"0.6201947",
"0.6153455",
"0.59329766",
"0.5865311",
"0.58182496",
"0.56786186",
"0.5665332",
"0.5658838",
"0.5658549",
"0.5572338",
"0.55704474",
"0.5563945",
"0.5558023",
"0.5519906",
"0.549906",
"0.5473885",
"0.5456905",
"0.54277724",
"0.54063076",
"0.54063076",
"0.54063076",
"0.54063076",
"0.54063076",
"0.5399899",
"0.53986233",
"0.5389433",
"0.53535926",
"0.53524446",
"0.5341366",
"0.5277754",
"0.5244216",
"0.51925856",
"0.51780933",
"0.5144481",
"0.50985605",
"0.5078647",
"0.50746566",
"0.50122905",
"0.5008891",
"0.49740922",
"0.4896652",
"0.48555887",
"0.48042107",
"0.47859523",
"0.47502103",
"0.47425327",
"0.4706076",
"0.4688615",
"0.46483546",
"0.46267098",
"0.46173063",
"0.4615949",
"0.45941055",
"0.45823827",
"0.45729488",
"0.45452192",
"0.4543326",
"0.4539482",
"0.44936296",
"0.43996805",
"0.4388775",
"0.43788108",
"0.4377089",
"0.4355823",
"0.43326798",
"0.4321049",
"0.4286799",
"0.42722797",
"0.42669058",
"0.42546478",
"0.42480242",
"0.42445108",
"0.423224",
"0.42066902",
"0.41970238",
"0.41873178",
"0.41871226",
"0.4183373",
"0.4182434",
"0.4181911",
"0.41815394",
"0.41756332",
"0.41458905",
"0.41350564",
"0.41248977",
"0.4118248",
"0.41134065",
"0.410359",
"0.41035762",
"0.41015565",
"0.40632233",
"0.40580773",
"0.40544638"
] |
0.77238977
|
0
|
Update returns an update builder for UnsavedPostThumbnail.
|
func (c *UnsavedPostThumbnailClient) Update() *UnsavedPostThumbnailUpdate {
mutation := newUnsavedPostThumbnailMutation(c.config, OpUpdate)
return &UnsavedPostThumbnailUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (upu *UnsavedPostUpdate) ClearThumbnail() *UnsavedPostUpdate {\n\tupu.mutation.ClearThumbnail()\n\treturn upu\n}",
"func (c *PostThumbnailClient) Update() *PostThumbnailUpdate {\n\tmutation := newPostThumbnailMutation(c.config, OpUpdate)\n\treturn &PostThumbnailUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upuo *UnsavedPostUpdateOne) ClearThumbnail() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearThumbnail()\n\treturn upuo\n}",
"func (upq *UnsavedPostQuery) WithThumbnail(opts ...func(*UnsavedPostThumbnailQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withThumbnail = query\n\treturn upq\n}",
"func (c *UnsavedPostAttachmentClient) Update() *UnsavedPostAttachmentUpdate {\n\tmutation := newUnsavedPostAttachmentMutation(c.config, OpUpdate)\n\treturn &UnsavedPostAttachmentUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostImageClient) Update() *UnsavedPostImageUpdate {\n\tmutation := newUnsavedPostImageMutation(c.config, OpUpdate)\n\treturn &UnsavedPostImageUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostThumbnailClient) Get(ctx context.Context, id int) (*UnsavedPostThumbnail, error) {\n\treturn c.Query().Where(unsavedpostthumbnail.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostThumbnailClient) UpdateOne(upt *UnsavedPostThumbnail) *UnsavedPostThumbnailUpdateOne {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpUpdateOne, withUnsavedPostThumbnail(upt))\n\treturn &UnsavedPostThumbnailUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upq *UnsavedPostQuery) QueryThumbnail() *UnsavedPostThumbnailQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, unsavedpost.ThumbnailTable, unsavedpost.ThumbnailColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostClient) QueryThumbnail(up *UnsavedPost) *UnsavedPostThumbnailQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, unsavedpost.ThumbnailTable, unsavedpost.ThumbnailColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostThumbnailClient) Query() *UnsavedPostThumbnailQuery {\n\treturn &UnsavedPostThumbnailQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *UnsavedPostThumbnailClient) Create() *UnsavedPostThumbnailCreate {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpCreate)\n\treturn &UnsavedPostThumbnailCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostThumbnailClient) Delete() *UnsavedPostThumbnailDelete {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpDelete)\n\treturn &UnsavedPostThumbnailDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostThumbnailClient) UpdateOne(pt *PostThumbnail) *PostThumbnailUpdateOne {\n\tmutation := newPostThumbnailMutation(c.config, OpUpdateOne, withPostThumbnail(pt))\n\treturn &PostThumbnailUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostClient) Update() *UnsavedPostUpdate {\n\tmutation := newUnsavedPostMutation(c.config, OpUpdate)\n\treturn &UnsavedPostUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostAttachmentClient) Update() *PostAttachmentUpdate {\n\tmutation := newPostAttachmentMutation(c.config, OpUpdate)\n\treturn &PostAttachmentUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostThumbnailClient) QueryUnsavedPost(upt *UnsavedPostThumbnail) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upt.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, true, unsavedpostthumbnail.UnsavedPostTable, unsavedpostthumbnail.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upt.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func UpdatePost(shorturl string, images []types.FileMetadata, post types.Post, headerImage types.FileMetadata, s3Agent *upload.S3Agent) (interface{}, error) {\n\tvar postItem types.Post\n\n\tpost.ShortURL = \"\"\n\n\tdb := database.GetMySQLInstance()\n\tdefer db.Close()\n\n\terr := db.Where(\"shorturl LIKE ?\", shorturl).First(&postItem).Error\n\tif err == gorm.ErrRecordNotFound {\n\t\treturn nil, ErrPostNotFound\n\t}\n\n\tprevImages := postItem.Images\n\tinsert := func(s []types.FileMetadata, at int, val types.FileMetadata) []types.FileMetadata {\n\t\ts = append(s[:at+1], s[at:]...)\n\t\ts[at] = val\n\t\treturn s\n\t}\n\n\tvar imagesCombined []types.FileMetadata\n\n\tif len(images) > 0 {\n\t\timagesCombined = insert(images, *post.HeaderImageIndex, headerImage)\n\t} else {\n\t\timagesCombined = append(imagesCombined, headerImage)\n\t}\n\n\tvar imageSources []string\n\tvar imagesToClear []types.FileMetadata\n\tfor _, image := range imagesCombined {\n\t\timageSources = append(imageSources, image.Key)\n\t}\n\n\tfor _, image := range prevImages {\n\t\tvar found bool\n\t\tfor _, key := range imageSources {\n\t\t\tif key == image.Key {\n\t\t\t\tfound = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\tif !found {\n\t\t\timagesToClear = append(imagesToClear, image)\n\t\t}\n\t}\n\n\t// delete removed images\n\tif len(imagesToClear) > 0 {\n\t\t_, err = s3Agent.DeleteFiles(s3Agent.BucketName, imagesToClear)\n\t\tif err != nil {\n\t\t\treturn nil, ErrResourceRemoveFailure\n\t\t}\n\t}\n\n\tupdated, err := resolveAttachments(imagesCombined, post, *post.HeaderImageIndex, headerImage, false)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\terr = db.Model(&postItem).Updates(updated).Error\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn updated, nil\n}",
"func NewUnsavedPostThumbnailClient(c config) *UnsavedPostThumbnailClient {\n\treturn &UnsavedPostThumbnailClient{config: c}\n}",
"func (c *UnsavedPostImageClient) Get(ctx context.Context, id int) (*UnsavedPostImage, error) {\n\treturn c.Query().Where(unsavedpostimage.ID(id)).Only(ctx)\n}",
"func (upu *UnsavedPostUpdate) SetThumbnail(u *UnsavedPostThumbnail) *UnsavedPostUpdate {\n\treturn upu.SetThumbnailID(u.ID)\n}",
"func (upuo *UnsavedPostUpdateOne) SetThumbnail(u *UnsavedPostThumbnail) *UnsavedPostUpdateOne {\n\treturn upuo.SetThumbnailID(u.ID)\n}",
"func (c *PostImageClient) Update() *PostImageUpdate {\n\tmutation := newPostImageMutation(c.config, OpUpdate)\n\treturn &PostImageUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UPHostClient) NewModifyPHostImageInfoRequest() *ModifyPHostImageInfoRequest {\n\treq := &ModifyPHostImageInfoRequest{}\n\n\t// setup request with client config\n\tc.Client.SetupRequest(req)\n\n\t// setup retryable with default retry policy (retry for non-create action and common error)\n\treq.SetRetryable(true)\n\treturn req\n}",
"func (c *PostThumbnailClient) Delete() *PostThumbnailDelete {\n\tmutation := newPostThumbnailMutation(c.config, OpDelete)\n\treturn &PostThumbnailDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (u *App) Update(c echo.Context, r *Update) (result *model.Post, err error) {\n\tif err = u.rbac.EnforceRole(c, model.AdminRole); err != nil {\n\t\tzaplog.ZLog(err)\n\t\treturn\n\t}\n\n\tif len(r.Excerpt) > 255 {\n\t\tr.Excerpt = r.Excerpt[:250] + \"...\"\n\t}\n\n\told, err := u.udb.View(u.db, r.ID)\n\tif err = zaplog.ZLog(err); err != nil {\n\t\treturn\n\t}\n\n\tif r.Status != \"\" && old.Status != r.Status && !old.AllowedStatuses(r.Status) {\n\t\terr = zaplog.ZLog(fmt.Errorf(\"Não é possível passar de %s para %s\", old.Status, r.Status))\n\t\treturn\n\t}\n\n\tupdate := model.Post{\n\t\tBase: model.Base{ID: r.ID},\n\t\tAuthor: r.Author,\n\t\tCategory: r.Category,\n\t\tTags: r.Tags,\n\t\tTitle: r.Title,\n\t\tSlug: r.Slug,\n\t\tContent: r.Content,\n\t\tExcerpt: r.Excerpt,\n\t\tStatus: r.Status,\n\t}\n\n\tvar operator model.User\n\tif err = u.db.Model(&model.User{}).Where(\"uuid = ?\", r.Author).First(&operator).Error; err == nil {\n\t\tupdate.AuthorName = operator.Name\n\t}\n\n\tif err = zaplog.ZLog(u.udb.Update(u.db, &update)); err != nil {\n\t\treturn\n\t}\n\treturn u.udb.View(u.db, r.ID)\n}",
"func (c *PostClient) QueryThumbnail(po *Post) *PostThumbnailQuery {\n\tquery := &PostThumbnailQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := po.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(post.Table, post.FieldID, id),\n\t\t\tsqlgraph.To(postthumbnail.Table, postthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, post.ThumbnailTable, post.ThumbnailColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(po.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upu *UnsavedPostUpdate) ClearImages() *UnsavedPostUpdate {\n\tupu.mutation.ClearImages()\n\treturn upu\n}",
"func (c *UnsavedPostVideoClient) Update() *UnsavedPostVideoUpdate {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpUpdate)\n\treturn &UnsavedPostVideoUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (m *ChatMessageAttachment) SetThumbnailUrl(value *string)() {\n err := m.GetBackingStore().Set(\"thumbnailUrl\", value)\n if err != nil {\n panic(err)\n }\n}",
"func (upq *UnsavedPostQuery) WithImages(opts ...func(*UnsavedPostImageQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostImageQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withImages = query\n\treturn upq\n}",
"func (upq *UnsavedPostQuery) Clone() *UnsavedPostQuery {\n\tif upq == nil {\n\t\treturn nil\n\t}\n\treturn &UnsavedPostQuery{\n\t\tconfig: upq.config,\n\t\tlimit: upq.limit,\n\t\toffset: upq.offset,\n\t\torder: append([]OrderFunc{}, upq.order...),\n\t\tpredicates: append([]predicate.UnsavedPost{}, upq.predicates...),\n\t\twithAuthor: upq.withAuthor.Clone(),\n\t\twithCategory: upq.withCategory.Clone(),\n\t\twithThumbnail: upq.withThumbnail.Clone(),\n\t\twithImages: upq.withImages.Clone(),\n\t\twithVideos: upq.withVideos.Clone(),\n\t\twithAttachments: upq.withAttachments.Clone(),\n\t\t// clone intermediate query.\n\t\tsql: upq.sql.Clone(),\n\t\tpath: upq.path,\n\t}\n}",
"func (c *PostThumbnailClient) Get(ctx context.Context, id int) (*PostThumbnail, error) {\n\treturn c.Query().Where(postthumbnail.ID(id)).Only(ctx)\n}",
"func Update(table string) *UpdateBuilder {\n\treturn DefaultFlavor.NewUpdateBuilder().Update(table)\n}",
"func (c *UnsavedPostImageClient) Query() *UnsavedPostImageQuery {\n\treturn &UnsavedPostImageQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *UnsavedPostAttachmentClient) Get(ctx context.Context, id int) (*UnsavedPostAttachment, error) {\n\treturn c.Query().Where(unsavedpostattachment.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostAttachmentClient) Query() *UnsavedPostAttachmentQuery {\n\treturn &UnsavedPostAttachmentQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *UnsavedPostAttachmentClient) UpdateOne(upa *UnsavedPostAttachment) *UnsavedPostAttachmentUpdateOne {\n\tmutation := newUnsavedPostAttachmentMutation(c.config, OpUpdateOne, withUnsavedPostAttachment(upa))\n\treturn &UnsavedPostAttachmentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (self thread) Update(db Database) ThreadModel {\n root := self.posts[0].MessageID()\n reply_count := db.CountThreadReplies(root)\n\n if int(reply_count) + 1 != len(self.posts) {\n\n return thread{\n posts: append([]PostModel{self.posts[0]}, db.GetThreadReplyPostModels(self.prefix, root, 0)...),\n links: self.links,\n prefix: self.prefix,\n }\n }\n return self\n}",
"func (c *UnsavedPostImageClient) UpdateOne(upi *UnsavedPostImage) *UnsavedPostImageUpdateOne {\n\tmutation := newUnsavedPostImageMutation(c.config, OpUpdateOne, withUnsavedPostImage(upi))\n\treturn &UnsavedPostImageUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upuo *UnsavedPostUpdateOne) SetThumbnailID(id int) *UnsavedPostUpdateOne {\n\tupuo.mutation.SetThumbnailID(id)\n\treturn upuo\n}",
"func NewUpdateBuilder() *UpdateBuilder {\n\treturn DefaultFlavor.NewUpdateBuilder()\n}",
"func (upuo *UnsavedPostUpdateOne) ClearImages() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearImages()\n\treturn upuo\n}",
"func (o *Post) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error) {\n\tcurrTime := time.Now().In(boil.GetLocation())\n\n\to.UpdatedAt = currTime\n\n\tvar err error\n\tif err = o.doBeforeUpdateHooks(ctx, exec); err != nil {\n\t\treturn 0, err\n\t}\n\tkey := makeCacheKey(columns, nil)\n\tpostUpdateCacheMut.RLock()\n\tcache, cached := postUpdateCache[key]\n\tpostUpdateCacheMut.RUnlock()\n\n\tif !cached {\n\t\twl := columns.UpdateColumnSet(\n\t\t\tpostColumns,\n\t\t\tpostPrimaryKeyColumns,\n\t\t)\n\n\t\tif !columns.IsWhitelist() {\n\t\t\twl = strmangle.SetComplement(wl, []string{\"created_at\"})\n\t\t}\n\t\tif len(wl) == 0 {\n\t\t\treturn 0, errors.New(\"orm: unable to update posts, could not build whitelist\")\n\t\t}\n\n\t\tcache.query = fmt.Sprintf(\"UPDATE \\\"posts\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, wl),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", len(wl)+1, postPrimaryKeyColumns),\n\t\t)\n\t\tcache.valueMapping, err = queries.BindMapping(postType, postMapping, append(wl, postPrimaryKeyColumns...))\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t}\n\n\tvalues := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), cache.valueMapping)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, cache.query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tvar result sql.Result\n\tresult, err = exec.ExecContext(ctx, cache.query, values...)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"orm: unable to update posts row\")\n\t}\n\n\trowsAff, err := result.RowsAffected()\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"orm: failed to get rows affected by update for posts\")\n\t}\n\n\tif !cached {\n\t\tpostUpdateCacheMut.Lock()\n\t\tpostUpdateCache[key] = cache\n\t\tpostUpdateCacheMut.Unlock()\n\t}\n\n\treturn rowsAff, o.doAfterUpdateHooks(ctx, exec)\n}",
"func (o *Picture) Update(exec boil.Executor, whitelist ...string) error {\n\tvar err error\n\tif err = o.doBeforeUpdateHooks(exec); err != nil {\n\t\treturn err\n\t}\n\tkey := makeCacheKey(whitelist, nil)\n\tpictureUpdateCacheMut.RLock()\n\tcache, cached := pictureUpdateCache[key]\n\tpictureUpdateCacheMut.RUnlock()\n\n\tif !cached {\n\t\twl := strmangle.UpdateColumnSet(\n\t\t\tpictureColumns,\n\t\t\tpicturePrimaryKeyColumns,\n\t\t\twhitelist,\n\t\t)\n\n\t\tif len(whitelist) == 0 {\n\t\t\twl = strmangle.SetComplement(wl, []string{\"created_at\"})\n\t\t}\n\t\tif len(wl) == 0 {\n\t\t\treturn errors.New(\"models: unable to update pictures, could not build whitelist\")\n\t\t}\n\n\t\tcache.query = fmt.Sprintf(\"UPDATE `pictures` SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, wl),\n\t\t\tstrmangle.WhereClause(\"`\", \"`\", 0, picturePrimaryKeyColumns),\n\t\t)\n\t\tcache.valueMapping, err = queries.BindMapping(pictureType, pictureMapping, append(wl, picturePrimaryKeyColumns...))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tvalues := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), cache.valueMapping)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, cache.query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err = exec.Exec(cache.query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"models: unable to update pictures row\")\n\t}\n\n\tif !cached {\n\t\tpictureUpdateCacheMut.Lock()\n\t\tpictureUpdateCache[key] = cache\n\t\tpictureUpdateCacheMut.Unlock()\n\t}\n\n\treturn o.doAfterUpdateHooks(exec)\n}",
"func (c *UnsavedPostThumbnailClient) UpdateOneID(id int) *UnsavedPostThumbnailUpdateOne {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpUpdateOne, withUnsavedPostThumbnailID(id))\n\treturn &UnsavedPostThumbnailUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostImageClient) QueryUnsavedPost(upi *UnsavedPostImage) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upi.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostimage.Table, unsavedpostimage.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostimage.UnsavedPostTable, unsavedpostimage.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upi.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *PostThumbnailClient) Query() *PostThumbnailQuery {\n\treturn &PostThumbnailQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (upu *UnsavedPostUpdate) SetThumbnailID(id int) *UnsavedPostUpdate {\n\tupu.mutation.SetThumbnailID(id)\n\treturn upu\n}",
"func (repo *PostAttributeRepository) Update(attribute *entity.PostAttribute, tableName string) error {\n\n\tprevAttribute := new(entity.PostAttribute)\n\terr := repo.conn.Table(tableName).Where(\"id = ?\", attribute.ID).First(prevAttribute).Error\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = repo.conn.Table(tableName).Save(attribute).Error\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func (upuo *UnsavedPostUpdateOne) Save(ctx context.Context) (*UnsavedPost, error) {\n\tvar (\n\t\terr error\n\t\tnode *UnsavedPost\n\t)\n\tupuo.defaults()\n\tif len(upuo.hooks) == 0 {\n\t\tif err = upuo.check(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tnode, err = upuo.sqlSave(ctx)\n\t} else {\n\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\tmutation, ok := m.(*UnsavedPostMutation)\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t}\n\t\t\tif err = upuo.check(); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tupuo.mutation = mutation\n\t\t\tnode, err = upuo.sqlSave(ctx)\n\t\t\tmutation.done = true\n\t\t\treturn node, err\n\t\t})\n\t\tfor i := len(upuo.hooks) - 1; i >= 0; i-- {\n\t\t\tmut = upuo.hooks[i](mut)\n\t\t}\n\t\tif _, err := mut.Mutate(ctx, upuo.mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn node, err\n}",
"func (upu *UnsavedPostUpdate) ClearSlug() *UnsavedPostUpdate {\n\tupu.mutation.ClearSlug()\n\treturn upu\n}",
"func (po *Post) Update() *PostUpdateOne {\n\treturn NewPostClient(po.config).UpdateOne(po)\n}",
"func (c *UnsavedPostAttachmentClient) QueryUnsavedPost(upa *UnsavedPostAttachment) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upa.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostattachment.Table, unsavedpostattachment.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostattachment.UnsavedPostTable, unsavedpostattachment.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upa.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (p *postsQueryBuilder) Update() (int64, error) {\n\tif p.err != nil {\n\t\treturn 0, p.err\n\t}\n\treturn p.builder.Update()\n}",
"func (ub *UpdateBuilder) BuildWithFlavor(flavor Flavor, initialArg ...interface{}) (sql string, args []interface{}) {\n\tbuf := newStringBuilder()\n\tub.injection.WriteTo(buf, updateMarkerInit)\n\n\tif len(ub.table) > 0 {\n\t\tbuf.WriteLeadingString(\"UPDATE \")\n\t\tbuf.WriteString(ub.table)\n\t}\n\n\tub.injection.WriteTo(buf, updateMarkerAfterUpdate)\n\n\tif len(ub.assignments) > 0 {\n\t\tbuf.WriteLeadingString(\"SET \")\n\t\tbuf.WriteString(strings.Join(ub.assignments, \", \"))\n\t}\n\n\tub.injection.WriteTo(buf, updateMarkerAfterSet)\n\n\tif len(ub.whereExprs) > 0 {\n\t\tbuf.WriteLeadingString(\"WHERE \")\n\t\tbuf.WriteString(strings.Join(ub.whereExprs, \" AND \"))\n\t\tub.injection.WriteTo(buf, updateMarkerAfterWhere)\n\t}\n\n\tif len(ub.orderByCols) > 0 {\n\t\tbuf.WriteLeadingString(\"ORDER BY \")\n\t\tbuf.WriteString(strings.Join(ub.orderByCols, \", \"))\n\n\t\tif ub.order != \"\" {\n\t\t\tbuf.WriteLeadingString(ub.order)\n\t\t}\n\n\t\tub.injection.WriteTo(buf, updateMarkerAfterOrderBy)\n\t}\n\n\tif ub.limit >= 0 {\n\t\tbuf.WriteLeadingString(\"LIMIT \")\n\t\tbuf.WriteString(strconv.Itoa(ub.limit))\n\n\t\tub.injection.WriteTo(buf, updateMarkerAfterLimit)\n\t}\n\n\treturn ub.args.CompileWithFlavor(buf.String(), flavor, initialArg...)\n}",
"func (upu *UnsavedPostUpdate) Where(ps ...predicate.UnsavedPost) *UnsavedPostUpdate {\n\tupu.mutation.predicates = append(upu.mutation.predicates, ps...)\n\treturn upu\n}",
"func (upu *UnsavedPostUpdate) ClearAttachments() *UnsavedPostUpdate {\n\tupu.mutation.ClearAttachments()\n\treturn upu\n}",
"func (c *UnsavedPostThumbnailClient) Use(hooks ...Hook) {\n\tc.hooks.UnsavedPostThumbnail = append(c.hooks.UnsavedPostThumbnail, hooks...)\n}",
"func (upq *UnsavedPostQuery) WithAttachments(opts ...func(*UnsavedPostAttachmentQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostAttachmentQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withAttachments = query\n\treturn upq\n}",
"func (ub *UpdateBuilder) Build() (sql string, args []interface{}) {\n\treturn ub.BuildWithFlavor(ub.args.Flavor)\n}",
"func (qs InstantprofileQS) Update() InstantprofileUpdateQS {\n\treturn InstantprofileUpdateQS{condFragments: qs.condFragments}\n}",
"func (o *DMessageEmbed) Update(exec boil.Executor, whitelist ...string) error {\n\tvar err error\n\tkey := makeCacheKey(whitelist, nil)\n\tdMessageEmbedUpdateCacheMut.RLock()\n\tcache, cached := dMessageEmbedUpdateCache[key]\n\tdMessageEmbedUpdateCacheMut.RUnlock()\n\n\tif !cached {\n\t\twl := strmangle.UpdateColumnSet(dMessageEmbedColumns, dMessageEmbedPrimaryKeyColumns, whitelist)\n\t\tif len(wl) == 0 {\n\t\t\treturn errors.New(\"models: unable to update d_message_embeds, could not build whitelist\")\n\t\t}\n\n\t\tcache.query = fmt.Sprintf(\"UPDATE \\\"d_message_embeds\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, wl),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", len(wl)+1, dMessageEmbedPrimaryKeyColumns),\n\t\t)\n\t\tcache.valueMapping, err = queries.BindMapping(dMessageEmbedType, dMessageEmbedMapping, append(wl, dMessageEmbedPrimaryKeyColumns...))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tvalues := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), cache.valueMapping)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, cache.query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err = exec.Exec(cache.query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"models: unable to update d_message_embeds row\")\n\t}\n\n\tif !cached {\n\t\tdMessageEmbedUpdateCacheMut.Lock()\n\t\tdMessageEmbedUpdateCache[key] = cache\n\t\tdMessageEmbedUpdateCacheMut.Unlock()\n\t}\n\n\treturn nil\n}",
"func (p *Post) UpdateFromRequest(r *http.Request) {\n\tid := r.FormValue(\"id\")\n\tif bson.IsObjectIdHex(id) {\n\t\tp.Id = bson.ObjectIdHex(id)\n\t}\n\tp.Title = r.FormValue(\"title\")\n\tp.Image = r.FormValue(\"image\")\n\tp.Slug = r.FormValue(\"slug\")\n\tp.Markdown = r.FormValue(\"content\")\n\tp.Html = utils.Markdown2Html(p.Markdown)\n\tp.AllowComment = r.FormValue(\"comment\") == \"on\"\n\tp.Category = r.FormValue(\"category\")\n\tp.IsPublished = r.FormValue(\"status\") == \"on\"\n}",
"func (c *PostThumbnailClient) Create() *PostThumbnailCreate {\n\tmutation := newPostThumbnailMutation(c.config, OpCreate)\n\treturn &PostThumbnailCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostImageClient) Delete() *UnsavedPostImageDelete {\n\tmutation := newUnsavedPostImageMutation(c.config, OpDelete)\n\treturn &UnsavedPostImageDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *StickersCreateStickerSetRequest) GetThumbAsNotEmpty() (*InputDocument, bool) {\n\tif value, ok := c.GetThumb(); ok {\n\t\treturn value.AsNotEmpty()\n\t}\n\treturn nil, false\n}",
"func (c *UnsavedPostAttachmentClient) Create() *UnsavedPostAttachmentCreate {\n\tmutation := newUnsavedPostAttachmentMutation(c.config, OpCreate)\n\treturn &UnsavedPostAttachmentCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostImageClient) Create() *UnsavedPostImageCreate {\n\tmutation := newUnsavedPostImageMutation(c.config, OpCreate)\n\treturn &UnsavedPostImageCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (u *GithubGistUpsert) UpdateRawURL() *GithubGistUpsert {\n\tu.SetExcluded(githubgist.FieldRawURL)\n\treturn u\n}",
"func (c *UnsavedPostVideoClient) QueryUnsavedPost(upv *UnsavedPostVideo) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upv.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostvideo.Table, unsavedpostvideo.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostvideo.UnsavedPostTable, unsavedpostvideo.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upv.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *Client) BuildUpdateRequest(ctx context.Context, v interface{}) (*http.Request, error) {\n\tvar (\n\t\tid uint32\n\t)\n\t{\n\t\tp, ok := v.(*blog.UpdatePayload)\n\t\tif !ok {\n\t\t\treturn nil, goahttp.ErrInvalidType(\"blog\", \"update\", \"*blog.UpdatePayload\", v)\n\t\t}\n\t\tif p.ID != nil {\n\t\t\tid = *p.ID\n\t\t}\n\t}\n\tu := &url.URL{Scheme: c.scheme, Host: c.host, Path: UpdateBlogPath(id)}\n\treq, err := http.NewRequest(\"PATCH\", u.String(), nil)\n\tif err != nil {\n\t\treturn nil, goahttp.ErrInvalidURL(\"blog\", \"update\", u.String(), err)\n\t}\n\tif ctx != nil {\n\t\treq = req.WithContext(ctx)\n\t}\n\n\treturn req, nil\n}",
"func (o *Smallblog) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error) {\n\tvar err error\n\tif err = o.doBeforeUpdateHooks(ctx, exec); err != nil {\n\t\treturn 0, err\n\t}\n\tkey := makeCacheKey(columns, nil)\n\tsmallblogUpdateCacheMut.RLock()\n\tcache, cached := smallblogUpdateCache[key]\n\tsmallblogUpdateCacheMut.RUnlock()\n\n\tif !cached {\n\t\twl := columns.UpdateColumnSet(\n\t\t\tsmallblogAllColumns,\n\t\t\tsmallblogPrimaryKeyColumns,\n\t\t)\n\n\t\tif !columns.IsWhitelist() {\n\t\t\twl = strmangle.SetComplement(wl, []string{\"created_at\"})\n\t\t}\n\t\tif len(wl) == 0 {\n\t\t\treturn 0, errors.New(\"models: unable to update smallblog, could not build whitelist\")\n\t\t}\n\n\t\tcache.query = fmt.Sprintf(\"UPDATE `smallblog` SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, wl),\n\t\t\tstrmangle.WhereClause(\"`\", \"`\", 0, smallblogPrimaryKeyColumns),\n\t\t)\n\t\tcache.valueMapping, err = queries.BindMapping(smallblogType, smallblogMapping, append(wl, smallblogPrimaryKeyColumns...))\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t}\n\n\tvalues := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), cache.valueMapping)\n\n\tif boil.IsDebug(ctx) {\n\t\twriter := boil.DebugWriterFrom(ctx)\n\t\tfmt.Fprintln(writer, cache.query)\n\t\tfmt.Fprintln(writer, values)\n\t}\n\tvar result sql.Result\n\tresult, err = exec.ExecContext(ctx, cache.query, values...)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: unable to update smallblog row\")\n\t}\n\n\trowsAff, err := result.RowsAffected()\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to get rows affected by update for smallblog\")\n\t}\n\n\tif !cached {\n\t\tsmallblogUpdateCacheMut.Lock()\n\t\tsmallblogUpdateCache[key] = cache\n\t\tsmallblogUpdateCacheMut.Unlock()\n\t}\n\n\treturn rowsAff, o.doAfterUpdateHooks(ctx, exec)\n}",
"func (m *Media) Update() *MediaUpdateOne {\n\treturn (&MediaClient{config: m.config}).UpdateOne(m)\n}",
"func (upu *UnsavedPostUpdate) SetNillableThumbnailID(id *int) *UnsavedPostUpdate {\n\tif id != nil {\n\t\tupu = upu.SetThumbnailID(*id)\n\t}\n\treturn upu\n}",
"func Update(ctx *routing.Context) error {\n\tlogger := logger.GetLogInstance(\"\", \"\")\n\tdb := ctx.Get(\"db\").(*gorm.DB)\n\timageID := ctx.Param(\"id\")\n\n\timg := &dbmodels.Image{}\n\n\tif r := jsoniter.Unmarshal(ctx.Request.Body(), &img); r != nil {\n\t\tlogger.Error(r)\n\t\treturn r\n\t}\n\n\tif err := db.Where(\"id = ?\", imageID).First(&img).Error; err != nil {\n\t\tlogger.Error(err)\n\t\tctx.Response.SetStatusCode(404)\n\t\tr := models.NewResponse(false, nil, \"image not found\")\n\t\treturn ctx.WriteData(r.MustMarshal())\n\t}\n\n\tif err := jsoniter.Unmarshal(ctx.Request.Body(), &img); err != nil {\n\t\tctx.Response.SetStatusCode(400)\n\t\tlogger.Error(err)\n\t\tr := models.NewResponse(false, nil, \"unexpected error\")\n\n\t\treturn ctx.WriteData(r.MustMarshal())\n\n\t}\n\n\tdb.Save(&img)\n\tr := models.NewResponse(true, img, \"OK\")\n\treturn ctx.WriteData(r.MustMarshal())\n}",
"func (c *UnsavedPostAttachmentClient) Delete() *UnsavedPostAttachmentDelete {\n\tmutation := newUnsavedPostAttachmentMutation(c.config, OpDelete)\n\treturn &UnsavedPostAttachmentDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostAttachmentClient) UpdateOne(pa *PostAttachment) *PostAttachmentUpdateOne {\n\tmutation := newPostAttachmentMutation(c.config, OpUpdateOne, withPostAttachment(pa))\n\treturn &PostAttachmentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (p *Pictures) Update() {\n\tp.Logger.Debug().Msg(\"Pictures Updating...\")\n\tx, err := goquery.ParseUrl(domain + firstPageURL)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tp.Items = x.Find(\"#post_list .postContainer .article div.post_top div.post_content div.image img\").Attrs(\"src\")\n\tp.nextPageURL = x.Find(\"#Pagination .pagination_main a\").Attr(\"href\")\n\tp.ExpiresAt = time.Now().Add(1 * time.Hour)\n\tp.urlHistory = make(map[int][]string, 0)\n\n\tif len(p.Items) != 0 {\n\t\tp.Logger.Print(\"Pictures Updated successfully\")\n\t}\n}",
"func (upuo *UnsavedPostUpdateOne) ClearAttachments() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearAttachments()\n\treturn upuo\n}",
"func (upuo *UnsavedPostUpdateOne) SetNillableThumbnailID(id *int) *UnsavedPostUpdateOne {\n\tif id != nil {\n\t\tupuo = upuo.SetThumbnailID(*id)\n\t}\n\treturn upuo\n}",
"func HandlerUpdateArboard(w http.ResponseWriter, r *http.Request) {\n\tdb := models.DB\n\ti := Image{}\n\tslug := mux.Vars(r)[\"slug\"]\n\tjson.NewDecoder(r.Body).Decode(&i)\n\tres, err := services.Upload(slug, i.Image)\n\n\tif err != nil {\n\t\terrorResponse(r, w, err)\n\t\treturn\n\t}\n\n\tartborad, err := models.SelectArtboard(db, slug)\n\n\tif err != nil {\n\t\terrorResponse(r, w, err)\n\t\treturn\n\t}\n\n\tif artborad.Image == \"\" {\n\t\tartborad, err = models.UpdateArtboard(db, slug, res)\n\n\t\tif err != nil {\n\t\t\terrorResponse(r, w, err)\n\t\t\treturn\n\t\t}\n\t}\n\n\trespond(r, w, http.StatusOK, artborad)\n}",
"func (b *blogsQueryBuilder) Update() (int64, error) {\n\tif b.err != nil {\n\t\treturn 0, b.err\n\t}\n\treturn b.builder.Update()\n}",
"func (c *PostThumbnailClient) QueryPost(pt *PostThumbnail) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pt.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postthumbnail.Table, postthumbnail.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, true, postthumbnail.PostTable, postthumbnail.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pt.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (b *UpdateBuilder) WithFlavor(flavor sql.DbFlavor) *UpdateBuilder {\n\tb.BaseSqlBuilder.WithFlavor(flavor)\n\treturn b\n}",
"func (upuo *UnsavedPostUpdateOne) ClearSlug() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearSlug()\n\treturn upuo\n}",
"func (c *PostClient) Update() *PostUpdate {\n\tmutation := newPostMutation(c.config, OpUpdate)\n\treturn &PostUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *MediaClient) Update() *MediaUpdate {\n\tmutation := newMediaMutation(c.config, OpUpdate)\n\treturn &MediaUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *StickersCreateStickerSetRequest) SetThumb(value InputDocumentClass) {\n\tc.Flags.Set(2)\n\tc.Thumb = value\n}",
"func NewUnsavedPostImageClient(c config) *UnsavedPostImageClient {\n\treturn &UnsavedPostImageClient{config: c}\n}",
"func (o *Picture) Upsert(exec boil.Executor, updateColumns []string, whitelist ...string) error {\n\tif o == nil {\n\t\treturn errors.New(\"models: no pictures provided for upsert\")\n\t}\n\n\tif err := o.doBeforeUpsertHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\tnzDefaults := queries.NonZeroDefaultSet(pictureColumnsWithDefault, o)\n\n\t// Build cache key in-line uglily - mysql vs postgres problems\n\tbuf := strmangle.GetBuffer()\n\tfor _, c := range updateColumns {\n\t\tbuf.WriteString(c)\n\t}\n\tbuf.WriteByte('.')\n\tfor _, c := range whitelist {\n\t\tbuf.WriteString(c)\n\t}\n\tbuf.WriteByte('.')\n\tfor _, c := range nzDefaults {\n\t\tbuf.WriteString(c)\n\t}\n\tkey := buf.String()\n\tstrmangle.PutBuffer(buf)\n\n\tpictureUpsertCacheMut.RLock()\n\tcache, cached := pictureUpsertCache[key]\n\tpictureUpsertCacheMut.RUnlock()\n\n\tvar err error\n\n\tif !cached {\n\t\tinsert, ret := strmangle.InsertColumnSet(\n\t\t\tpictureColumns,\n\t\t\tpictureColumnsWithDefault,\n\t\t\tpictureColumnsWithoutDefault,\n\t\t\tnzDefaults,\n\t\t\twhitelist,\n\t\t)\n\n\t\tupdate := strmangle.UpdateColumnSet(\n\t\t\tpictureColumns,\n\t\t\tpicturePrimaryKeyColumns,\n\t\t\tupdateColumns,\n\t\t)\n\t\tif len(update) == 0 {\n\t\t\treturn errors.New(\"models: unable to upsert pictures, could not build update column list\")\n\t\t}\n\n\t\tcache.query = queries.BuildUpsertQueryMySQL(dialect, \"pictures\", update, insert)\n\t\tcache.retQuery = fmt.Sprintf(\n\t\t\t\"SELECT %s FROM `pictures` WHERE `id`=?\",\n\t\t\tstrings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, ret), \",\"),\n\t\t)\n\n\t\tcache.valueMapping, err = queries.BindMapping(pictureType, pictureMapping, insert)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif len(ret) != 0 {\n\t\t\tcache.retMapping, err = queries.BindMapping(pictureType, pictureMapping, ret)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tvalue := reflect.Indirect(reflect.ValueOf(o))\n\tvals := queries.ValuesFromMapping(value, cache.valueMapping)\n\tvar returns []interface{}\n\tif len(cache.retMapping) != 0 {\n\t\treturns = queries.PtrsFromMapping(value, cache.retMapping)\n\t}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, cache.query)\n\t\tfmt.Fprintln(boil.DebugWriter, vals)\n\t}\n\n\t_, err = exec.Exec(cache.query, vals...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"models: unable to upsert for pictures\")\n\t}\n\n\tvar identifierCols []interface{}\n\n\tif len(cache.retMapping) == 0 {\n\t\tgoto CacheNoHooks\n\t}\n\n\tidentifierCols = []interface{}{\n\t\to.ID,\n\t}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, cache.retQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, identifierCols...)\n\t}\n\n\terr = exec.QueryRow(cache.retQuery, identifierCols...).Scan(returns...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"models: unable to populate default values for pictures\")\n\t}\n\nCacheNoHooks:\n\tif !cached {\n\t\tpictureUpsertCacheMut.Lock()\n\t\tpictureUpsertCache[key] = cache\n\t\tpictureUpsertCacheMut.Unlock()\n\t}\n\n\treturn o.doAfterUpsertHooks(exec)\n}",
"func (o *Picture) UpdateP(exec boil.Executor, whitelist ...string) {\n\terr := o.Update(exec, whitelist...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (m *ChatMessageAttachment) GetThumbnailUrl()(*string) {\n val, err := m.GetBackingStore().Get(\"thumbnailUrl\")\n if err != nil {\n panic(err)\n }\n if val != nil {\n return val.(*string)\n }\n return nil\n}",
"func (hg *Hg) Update() error {\n\treturn nil\n}",
"func (c *delegatingScaleInterface) Update(kind string, scale *extensions.Scale) (result *extensions.Scale, err error) {\n\tswitch {\n\tcase kind == \"DeploymentConfig\":\n\t\treturn c.dcs.UpdateScale(scale)\n\tcase latest.OriginKind(kind, \"\"):\n\t\treturn nil, errors.NewBadRequest(fmt.Sprintf(\"Kind %s has no Scale subresource\", kind))\n\tdefault:\n\t\treturn c.scales.Update(kind, scale)\n\t}\n}",
"func (c *FakeIamUserPolicyAttachments) Update(iamUserPolicyAttachment *v1alpha1.IamUserPolicyAttachment) (result *v1alpha1.IamUserPolicyAttachment, err error) {\n\tobj, err := c.Fake.\n\t\tInvokes(testing.NewUpdateAction(iamuserpolicyattachmentsResource, c.ns, iamUserPolicyAttachment), &v1alpha1.IamUserPolicyAttachment{})\n\n\tif obj == nil {\n\t\treturn nil, err\n\t}\n\treturn obj.(*v1alpha1.IamUserPolicyAttachment), err\n}",
"func (cmd *UpdatePostCommand) Run(c *client.Client, args []string) error {\n\tvar path string\n\tif len(args) > 0 {\n\t\tpath = args[0]\n\t} else {\n\t\tpath = fmt.Sprintf(\"/posts/%v\", cmd.PostID)\n\t}\n\tvar payload client.UpdatePostPayload\n\tif cmd.Payload != \"\" {\n\t\terr := json.Unmarshal([]byte(cmd.Payload), &payload)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to deserialize payload: %s\", err)\n\t\t}\n\t}\n\tlogger := goa.NewLogger(log.New(os.Stderr, \"\", log.LstdFlags))\n\tctx := goa.WithLogger(context.Background(), logger)\n\tresp, err := c.UpdatePost(ctx, path, &payload)\n\tif err != nil {\n\t\tgoa.LogError(ctx, \"failed\", \"err\", err)\n\t\treturn err\n\t}\n\n\tgoaclient.HandleResponse(c.Client, resp, PrettyPrint)\n\treturn nil\n}",
"func UpdatePost(c buffalo.Context) error {\n\tauthUser := c.Value(\"authUser\").(models.User)\n\tpost := &models.Post{}\n\tdatabase := c.Value(\"tx\").(*pop.Connection)\n\t// retrieve the existing record\n\tif txErr := database.Find(post, c.Param(\"post_id\")); txErr != nil {\n\n\t\tnotFoundResponse := utils.NewErrorResponse(\n\t\t\thttp.StatusNotFound,\n\t\t\t\"post_id\",\n\t\t\tfmt.Sprintf(\"The requested post %s is removed or move to somewhere else.\", c.Param(\"post_id\")),\n\t\t)\n\t\treturn c.Render(http.StatusNotFound, r.JSON(notFoundResponse))\n\t}\n\t// bind the form input\n\tif bindErr := c.Bind(post); bindErr != nil {\n\t\temptyBodyResponse := utils.NewErrorResponse(\n\t\t\thttp.StatusUnprocessableEntity,\n\t\t\t\"body\",\n\t\t\t\"The request body cannot be empty\",\n\t\t)\n\t\treturn c.Render(http.StatusUnprocessableEntity, r.JSON(emptyBodyResponse))\n\t}\n\tpost.UserID = authUser.ID\n\tvalidationErrors, err := database.ValidateAndUpdate(post)\n\tif err != nil {\n\t\treturn errors.WithStack(err)\n\t}\n\n\tif validationErrors.HasAny() {\n\t\terrResponse := utils.NewValidationErrorResponse(\n\t\t\thttp.StatusUnprocessableEntity,\n\t\t\tvalidationErrors.Errors,\n\t\t)\n\t\treturn c.Render(http.StatusUnprocessableEntity, r.JSON(errResponse))\n\t}\n\n\tresponse := PostResponse{\n\t\tCode: fmt.Sprintf(\"%d\", http.StatusOK),\n\t\tData: post,\n\t}\n\n\treturn c.Render(http.StatusOK, r.JSON(response))\n}",
"func (factory ObjectFactoryImpl) UpdateWithTime(updatedInstance entity.Object, instance interface{}) entity.Object {\n\treflect.ValueOf(&updatedInstance).Elem().FieldByName(\"UpdatedAt\").SetString(generator.CurrentDateTime())\n\treflect.ValueOf(&updatedInstance).Elem().FieldByName(\"Extra\").Set(reflect.ValueOf(&instance))\n\treturn updatedInstance\n}",
"func (o *BraceletPhoto) Update(exec boil.Executor, whitelist ...string) error {\n\tvar err error\n\tkey := makeCacheKey(whitelist, nil)\n\tbraceletPhotoUpdateCacheMut.RLock()\n\tcache, cached := braceletPhotoUpdateCache[key]\n\tbraceletPhotoUpdateCacheMut.RUnlock()\n\n\tif !cached {\n\t\twl := strmangle.UpdateColumnSet(braceletPhotoColumns, braceletPhotoPrimaryKeyColumns, whitelist)\n\t\tif len(wl) == 0 {\n\t\t\treturn errors.New(\"models: unable to update bracelet_photo, could not build whitelist\")\n\t\t}\n\n\t\tcache.query = fmt.Sprintf(\"UPDATE `bracelet_photo` SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, wl),\n\t\t\tstrmangle.WhereClause(\"`\", \"`\", 0, braceletPhotoPrimaryKeyColumns),\n\t\t)\n\t\tcache.valueMapping, err = queries.BindMapping(braceletPhotoType, braceletPhotoMapping, append(wl, braceletPhotoPrimaryKeyColumns...))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tvalues := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), cache.valueMapping)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, cache.query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err = exec.Exec(cache.query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"models: unable to update bracelet_photo row\")\n\t}\n\n\tif !cached {\n\t\tbraceletPhotoUpdateCacheMut.Lock()\n\t\tbraceletPhotoUpdateCache[key] = cache\n\t\tbraceletPhotoUpdateCacheMut.Unlock()\n\t}\n\n\treturn nil\n}"
] |
[
"0.64909106",
"0.63071275",
"0.6230537",
"0.60620344",
"0.56923825",
"0.56661797",
"0.564479",
"0.5538369",
"0.532363",
"0.5289288",
"0.52750933",
"0.5243242",
"0.51039106",
"0.49888775",
"0.49626273",
"0.49033535",
"0.4855882",
"0.48038027",
"0.4803542",
"0.4793924",
"0.47689363",
"0.47441974",
"0.47057444",
"0.46082327",
"0.4534378",
"0.4483584",
"0.4447042",
"0.44392055",
"0.44260746",
"0.43985552",
"0.438747",
"0.4377053",
"0.43716317",
"0.43620062",
"0.43601128",
"0.4343675",
"0.4296511",
"0.42728707",
"0.42717",
"0.4261471",
"0.42586723",
"0.4252724",
"0.42461714",
"0.42326042",
"0.42292792",
"0.42131874",
"0.42072445",
"0.4193925",
"0.41707894",
"0.41658708",
"0.41494963",
"0.4105885",
"0.41032222",
"0.40984097",
"0.40956792",
"0.40903628",
"0.40830043",
"0.40645817",
"0.40539134",
"0.40208143",
"0.40102008",
"0.40082544",
"0.39898962",
"0.39858395",
"0.39817637",
"0.3980779",
"0.39779615",
"0.3972773",
"0.39684463",
"0.39598915",
"0.39422426",
"0.3923875",
"0.3921325",
"0.39054045",
"0.39006466",
"0.3899399",
"0.38992533",
"0.38705173",
"0.38668832",
"0.38649556",
"0.38469934",
"0.38395405",
"0.38391823",
"0.38313624",
"0.38149822",
"0.38111117",
"0.38073698",
"0.3803343",
"0.38010985",
"0.37897673",
"0.3788525",
"0.37805173",
"0.3769236",
"0.37593544",
"0.37587747",
"0.37468207",
"0.37463865",
"0.37444317",
"0.3737054",
"0.37357736"
] |
0.7201603
|
0
|
UpdateOne returns an update builder for the given entity.
|
func (c *UnsavedPostThumbnailClient) UpdateOne(upt *UnsavedPostThumbnail) *UnsavedPostThumbnailUpdateOne {
mutation := newUnsavedPostThumbnailMutation(c.config, OpUpdateOne, withUnsavedPostThumbnail(upt))
return &UnsavedPostThumbnailUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *BuildingClient) UpdateOne(b *Building) *BuildingUpdateOne {\n\tmutation := newBuildingMutation(c.config, OpUpdateOne, withBuilding(b))\n\treturn &BuildingUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BedtypeClient) UpdateOne(b *Bedtype) *BedtypeUpdateOne {\n\tmutation := newBedtypeMutation(c.config, OpUpdateOne, withBedtype(b))\n\treturn &BedtypeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *EmptyClient) UpdateOne(e *Empty) *EmptyUpdateOne {\n\tmutation := newEmptyMutation(c.config, OpUpdateOne, withEmpty(e))\n\treturn &EmptyUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DentistClient) UpdateOne(d *Dentist) *DentistUpdateOne {\n\tmutation := newDentistMutation(c.config, OpUpdateOne, withDentist(d))\n\treturn &DentistUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BeerClient) UpdateOne(b *Beer) *BeerUpdateOne {\n\tmutation := newBeerMutation(c.config, OpUpdateOne, withBeer(b))\n\treturn &BeerUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BillClient) UpdateOne(b *Bill) *BillUpdateOne {\n\tmutation := newBillMutation(c.config, OpUpdateOne, withBill(b))\n\treturn &BillUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BillClient) UpdateOne(b *Bill) *BillUpdateOne {\n\tmutation := newBillMutation(c.config, OpUpdateOne, withBill(b))\n\treturn &BillUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BillClient) UpdateOne(b *Bill) *BillUpdateOne {\n\tmutation := newBillMutation(c.config, OpUpdateOne, withBill(b))\n\treturn &BillUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *OperationClient) UpdateOne(o *Operation) *OperationUpdateOne {\n\tmutation := newOperationMutation(c.config, OpUpdateOne, withOperation(o))\n\treturn &OperationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostAttachmentClient) UpdateOne(pa *PostAttachment) *PostAttachmentUpdateOne {\n\tmutation := newPostAttachmentMutation(c.config, OpUpdateOne, withPostAttachment(pa))\n\treturn &PostAttachmentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *CleaningroomClient) UpdateOne(cl *Cleaningroom) *CleaningroomUpdateOne {\n\tmutation := newCleaningroomMutation(c.config, OpUpdateOne, withCleaningroom(cl))\n\treturn &CleaningroomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *CompanyClient) UpdateOne(co *Company) *CompanyUpdateOne {\n\tmutation := newCompanyMutation(c.config, OpUpdateOne, withCompany(co))\n\treturn &CompanyUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *CompanyClient) UpdateOne(co *Company) *CompanyUpdateOne {\n\tmutation := newCompanyMutation(c.config, OpUpdateOne, withCompany(co))\n\treturn &CompanyUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *EventClient) UpdateOne(e *Event) *EventUpdateOne {\n\tmutation := newEventMutation(c.config, OpUpdateOne, withEvent(e))\n\treturn &EventUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostClient) UpdateOne(po *Post) *PostUpdateOne {\n\tmutation := newPostMutation(c.config, OpUpdateOne, withPost(po))\n\treturn &PostUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DeviceClient) UpdateOne(d *Device) *DeviceUpdateOne {\n\tmutation := newDeviceMutation(c.config, OpUpdateOne, withDevice(d))\n\treturn &DeviceUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *OperationroomClient) UpdateOne(o *Operationroom) *OperationroomUpdateOne {\n\tmutation := newOperationroomMutation(c.config, OpUpdateOne, withOperationroom(o))\n\treturn &OperationroomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostAttachmentClient) UpdateOne(upa *UnsavedPostAttachment) *UnsavedPostAttachmentUpdateOne {\n\tmutation := newUnsavedPostAttachmentMutation(c.config, OpUpdateOne, withUnsavedPostAttachment(upa))\n\treturn &UnsavedPostAttachmentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DrugAllergyClient) UpdateOne(da *DrugAllergy) *DrugAllergyUpdateOne {\n\tmutation := newDrugAllergyMutation(c.config, OpUpdateOne, withDrugAllergy(da))\n\treturn &DrugAllergyUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *MealplanClient) UpdateOne(m *Mealplan) *MealplanUpdateOne {\n\tmutation := newMealplanMutation(c.config, OpUpdateOne, withMealplan(m))\n\treturn &MealplanUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RoomdetailClient) UpdateOne(r *Roomdetail) *RoomdetailUpdateOne {\n\tmutation := newRoomdetailMutation(c.config, OpUpdateOne, withRoomdetail(r))\n\treturn &RoomdetailUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PhysicianClient) UpdateOne(ph *Physician) *PhysicianUpdateOne {\n\tmutation := newPhysicianMutation(c.config, OpUpdateOne, withPhysician(ph))\n\treturn &PhysicianUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PhysicianClient) UpdateOne(ph *Physician) *PhysicianUpdateOne {\n\tmutation := newPhysicianMutation(c.config, OpUpdateOne, withPhysician(ph))\n\treturn &PhysicianUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *OperativerecordClient) UpdateOne(o *Operativerecord) *OperativerecordUpdateOne {\n\tmutation := newOperativerecordMutation(c.config, OpUpdateOne, withOperativerecord(o))\n\treturn &OperativerecordUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientroomClient) UpdateOne(pa *Patientroom) *PatientroomUpdateOne {\n\tmutation := newPatientroomMutation(c.config, OpUpdateOne, withPatientroom(pa))\n\treturn &PatientroomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *AppointmentClient) UpdateOne(a *Appointment) *AppointmentUpdateOne {\n\tmutation := newAppointmentMutation(c.config, OpUpdateOne, withAppointment(a))\n\treturn &AppointmentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ToolClient) UpdateOne(t *Tool) *ToolUpdateOne {\n\tmutation := newToolMutation(c.config, OpUpdateOne, withTool(t))\n\treturn &ToolUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostClient) UpdateOne(up *UnsavedPost) *UnsavedPostUpdateOne {\n\tmutation := newUnsavedPostMutation(c.config, OpUpdateOne, withUnsavedPost(up))\n\treturn &UnsavedPostUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *WorkExperienceClient) UpdateOne(we *WorkExperience) *WorkExperienceUpdateOne {\n\tmutation := newWorkExperienceMutation(c.config, OpUpdateOne, withWorkExperience(we))\n\treturn &WorkExperienceUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *TransactionClient) UpdateOne(t *Transaction) *TransactionUpdateOne {\n\tmutation := newTransactionMutation(c.config, OpUpdateOne, withTransaction(t))\n\treturn &TransactionUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RoomuseClient) UpdateOne(r *Roomuse) *RoomuseUpdateOne {\n\tmutation := newRoomuseMutation(c.config, OpUpdateOne, withRoomuse(r))\n\treturn &RoomuseUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DispenseMedicineClient) UpdateOne(dm *DispenseMedicine) *DispenseMedicineUpdateOne {\n\tmutation := newDispenseMedicineMutation(c.config, OpUpdateOne, withDispenseMedicine(dm))\n\treturn &DispenseMedicineUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *OrderClient) UpdateOne(o *Order) *OrderUpdateOne {\n\tmutation := newOrderMutation(c.config, OpUpdateOne, withOrder(o))\n\treturn &OrderUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PharmacistClient) UpdateOne(ph *Pharmacist) *PharmacistUpdateOne {\n\tmutation := newPharmacistMutation(c.config, OpUpdateOne, withPharmacist(ph))\n\treturn &PharmacistUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BookingClient) UpdateOne(b *Booking) *BookingUpdateOne {\n\tmutation := newBookingMutation(c.config, OpUpdateOne, withBooking(b))\n\treturn &BookingUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *AdminClient) UpdateOne(a *Admin) *AdminUpdateOne {\n\tmutation := newAdminMutation(c.config, OpUpdateOne, withAdmin(a))\n\treturn &AdminUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *MedicineClient) UpdateOne(m *Medicine) *MedicineUpdateOne {\n\tmutation := newMedicineMutation(c.config, OpUpdateOne, withMedicine(m))\n\treturn &MedicineUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *MedicineTypeClient) UpdateOne(mt *MedicineType) *MedicineTypeUpdateOne {\n\tmutation := newMedicineTypeMutation(c.config, OpUpdateOne, withMedicineType(mt))\n\treturn &MedicineTypeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DoctorClient) UpdateOne(d *Doctor) *DoctorUpdateOne {\n\tmutation := newDoctorMutation(c.config, OpUpdateOne, withDoctor(d))\n\treturn &DoctorUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientofphysicianClient) UpdateOne(pa *Patientofphysician) *PatientofphysicianUpdateOne {\n\tmutation := newPatientofphysicianMutation(c.config, OpUpdateOne, withPatientofphysician(pa))\n\treturn &PatientofphysicianUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ActivityTypeClient) UpdateOne(at *ActivityType) *ActivityTypeUpdateOne {\n\tmutation := newActivityTypeMutation(c.config, OpUpdateOne, withActivityType(at))\n\treturn &ActivityTypeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DNSBLQueryClient) UpdateOne(dq *DNSBLQuery) *DNSBLQueryUpdateOne {\n\tmutation := newDNSBLQueryMutation(c.config, OpUpdateOne, withDNSBLQuery(dq))\n\treturn &DNSBLQueryUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *OperativeClient) UpdateOne(o *Operative) *OperativeUpdateOne {\n\tmutation := newOperativeMutation(c.config, OpUpdateOne, withOperative(o))\n\treturn &OperativeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientClient) UpdateOne(pa *Patient) *PatientUpdateOne {\n\tmutation := newPatientMutation(c.config, OpUpdateOne, withPatient(pa))\n\treturn &PatientUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientClient) UpdateOne(pa *Patient) *PatientUpdateOne {\n\tmutation := newPatientMutation(c.config, OpUpdateOne, withPatient(pa))\n\treturn &PatientUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientClient) UpdateOne(pa *Patient) *PatientUpdateOne {\n\tmutation := newPatientMutation(c.config, OpUpdateOne, withPatient(pa))\n\treturn &PatientUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *FoodmenuClient) UpdateOne(f *Foodmenu) *FoodmenuUpdateOne {\n\tmutation := newFoodmenuMutation(c.config, OpUpdateOne, withFoodmenu(f))\n\treturn &FoodmenuUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *StaytypeClient) UpdateOne(s *Staytype) *StaytypeUpdateOne {\n\tmutation := newStaytypeMutation(c.config, OpUpdateOne, withStaytype(s))\n\treturn &StaytypeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *LevelOfDangerousClient) UpdateOne(lod *LevelOfDangerous) *LevelOfDangerousUpdateOne {\n\tmutation := newLevelOfDangerousMutation(c.config, OpUpdateOne, withLevelOfDangerous(lod))\n\treturn &LevelOfDangerousUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (su *PostUseCase) UpdateOne(id string, request data.Post) error {\n\tpost := &models.Post{ID: id}\n\terr := post.Get()\n\tif err != nil {\n\t\treturn err\n\t}\n\tpost.Post = request\n\terr = post.Update()\n\treturn err\n}",
"func UpdateOne(query interface{}, update interface{}) error {\n\treturn db.Update(Collection, query, update)\n}",
"func (c *PartorderClient) UpdateOne(pa *Partorder) *PartorderUpdateOne {\n\tmutation := newPartorderMutation(c.config, OpUpdateOne, withPartorder(pa))\n\treturn &PartorderUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnitOfMedicineClient) UpdateOne(uom *UnitOfMedicine) *UnitOfMedicineUpdateOne {\n\tmutation := newUnitOfMedicineMutation(c.config, OpUpdateOne, withUnitOfMedicine(uom))\n\treturn &UnitOfMedicineUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PurposeClient) UpdateOne(pu *Purpose) *PurposeUpdateOne {\n\tmutation := newPurposeMutation(c.config, OpUpdateOne, withPurpose(pu))\n\treturn &PurposeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ExaminationroomClient) UpdateOne(e *Examinationroom) *ExaminationroomUpdateOne {\n\tmutation := newExaminationroomMutation(c.config, OpUpdateOne, withExaminationroom(e))\n\treturn &ExaminationroomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PaymentClient) UpdateOne(pa *Payment) *PaymentUpdateOne {\n\tmutation := newPaymentMutation(c.config, OpUpdateOne, withPayment(pa))\n\treturn &PaymentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PaymentClient) UpdateOne(pa *Payment) *PaymentUpdateOne {\n\tmutation := newPaymentMutation(c.config, OpUpdateOne, withPayment(pa))\n\treturn &PaymentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *StatustClient) UpdateOne(s *Statust) *StatustUpdateOne {\n\tmutation := newStatustMutation(c.config, OpUpdateOne, withStatust(s))\n\treturn &StatustUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne {\n\tmutation := newTagMutation(c.config, OpUpdateOne, withTag(t))\n\treturn &TagUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RepairinvoiceClient) UpdateOne(r *Repairinvoice) *RepairinvoiceUpdateOne {\n\tmutation := newRepairinvoiceMutation(c.config, OpUpdateOne, withRepairinvoice(r))\n\treturn &RepairinvoiceUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DepositClient) UpdateOne(d *Deposit) *DepositUpdateOne {\n\tmutation := newDepositMutation(c.config, OpUpdateOne, withDeposit(d))\n\treturn &DepositUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *EmployeeClient) UpdateOne(e *Employee) *EmployeeUpdateOne {\n\tmutation := newEmployeeMutation(c.config, OpUpdateOne, withEmployee(e))\n\treturn &EmployeeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *EmployeeClient) UpdateOne(e *Employee) *EmployeeUpdateOne {\n\tmutation := newEmployeeMutation(c.config, OpUpdateOne, withEmployee(e))\n\treturn &EmployeeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *EmployeeClient) UpdateOne(e *Employee) *EmployeeUpdateOne {\n\tmutation := newEmployeeMutation(c.config, OpUpdateOne, withEmployee(e))\n\treturn &EmployeeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RoomClient) UpdateOne(r *Room) *RoomUpdateOne {\n\tmutation := newRoomMutation(c.config, OpUpdateOne, withRoom(r))\n\treturn &RoomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RoomClient) UpdateOne(r *Room) *RoomUpdateOne {\n\tmutation := newRoomMutation(c.config, OpUpdateOne, withRoom(r))\n\treturn &RoomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BillingstatusClient) UpdateOne(b *Billingstatus) *BillingstatusUpdateOne {\n\tmutation := newBillingstatusMutation(c.config, OpUpdateOne, withBillingstatus(b))\n\treturn &BillingstatusUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *EatinghistoryClient) UpdateOne(e *Eatinghistory) *EatinghistoryUpdateOne {\n\tmutation := newEatinghistoryMutation(c.config, OpUpdateOne, withEatinghistory(e))\n\treturn &EatinghistoryUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *StatusdClient) UpdateOne(s *Statusd) *StatusdUpdateOne {\n\tmutation := newStatusdMutation(c.config, OpUpdateOne, withStatusd(s))\n\treturn &StatusdUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (b *Bill) Update() *BillUpdateOne {\n\treturn (&BillClient{config: b.config}).UpdateOne(b)\n}",
"func (c *AnnotationClient) UpdateOne(a *Annotation) *AnnotationUpdateOne {\n\tmutation := newAnnotationMutation(c.config, OpUpdateOne, withAnnotation(a))\n\treturn &AnnotationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func UpdateOne(ctx context.Context, tx pgx.Tx, sb sq.UpdateBuilder) error {\n\tq, vs, err := sb.ToSql()\n\tif err != nil {\n\t\treturn err\n\t}\n\ttag, err := tx.Exec(ctx, q, vs...)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif tag.RowsAffected() != 1 {\n\t\treturn ErrNoRowsAffected\n\t}\n\treturn nil\n}",
"func (c *CleanernameClient) UpdateOne(cl *Cleanername) *CleanernameUpdateOne {\n\tmutation := newCleanernameMutation(c.config, OpUpdateOne, withCleanername(cl))\n\treturn &CleanernameUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *LeaseClient) UpdateOne(l *Lease) *LeaseUpdateOne {\n\tmutation := newLeaseMutation(c.config, OpUpdateOne, withLease(l))\n\treturn &LeaseUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BinaryFileClient) UpdateOne(bf *BinaryFile) *BinaryFileUpdateOne {\n\tmutation := newBinaryFileMutation(c.config, OpUpdateOne, withBinaryFile(bf))\n\treturn &BinaryFileUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *JobClient) UpdateOne(j *Job) *JobUpdateOne {\n\tmutation := newJobMutation(c.config, OpUpdateOne, withJob(j))\n\treturn &JobUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ActivitiesClient) UpdateOne(a *Activities) *ActivitiesUpdateOne {\n\tmutation := newActivitiesMutation(c.config, OpUpdateOne, withActivities(a))\n\treturn &ActivitiesUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostImageClient) UpdateOne(upi *UnsavedPostImage) *UnsavedPostImageUpdateOne {\n\tmutation := newUnsavedPostImageMutation(c.config, OpUpdateOne, withUnsavedPostImage(upi))\n\treturn &UnsavedPostImageUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ClubapplicationClient) UpdateOne(cl *Clubapplication) *ClubapplicationUpdateOne {\n\tmutation := newClubapplicationMutation(c.config, OpUpdateOne, withClubapplication(cl))\n\treturn &ClubapplicationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *SkillClient) UpdateOne(s *Skill) *SkillUpdateOne {\n\tmutation := newSkillMutation(c.config, OpUpdateOne, withSkill(s))\n\treturn &SkillUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RentalstatusClient) UpdateOne(r *Rentalstatus) *RentalstatusUpdateOne {\n\tmutation := newRentalstatusMutation(c.config, OpUpdateOne, withRentalstatus(r))\n\treturn &RentalstatusUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UsertypeClient) UpdateOne(u *Usertype) *UsertypeUpdateOne {\n\tmutation := newUsertypeMutation(c.config, OpUpdateOne, withUsertype(u))\n\treturn &UsertypeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *TasteClient) UpdateOne(t *Taste) *TasteUpdateOne {\n\tmutation := newTasteMutation(c.config, OpUpdateOne, withTaste(t))\n\treturn &TasteUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PositionassingmentClient) UpdateOne(po *Positionassingment) *PositionassingmentUpdateOne {\n\tmutation := newPositionassingmentMutation(c.config, OpUpdateOne, withPositionassingment(po))\n\treturn &PositionassingmentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *SymptomClient) UpdateOne(s *Symptom) *SymptomUpdateOne {\n\tmutation := newSymptomMutation(c.config, OpUpdateOne, withSymptom(s))\n\treturn &SymptomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PartClient) UpdateOne(pa *Part) *PartUpdateOne {\n\tmutation := newPartMutation(c.config, OpUpdateOne, withPart(pa))\n\treturn &PartUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func NewUpdateOneModel() *UpdateOneModel {\n\treturn &UpdateOneModel{}\n}",
"func (c *DepartmentClient) UpdateOne(d *Department) *DepartmentUpdateOne {\n\tmutation := newDepartmentMutation(c.config, OpUpdateOne, withDepartment(d))\n\treturn &DepartmentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *SituationClient) UpdateOne(s *Situation) *SituationUpdateOne {\n\tmutation := newSituationMutation(c.config, OpUpdateOne, withSituation(s))\n\treturn &SituationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ComplaintClient) UpdateOne(co *Complaint) *ComplaintUpdateOne {\n\tmutation := newComplaintMutation(c.config, OpUpdateOne, withComplaint(co))\n\treturn &ComplaintUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (t *Todo) Update() *TodoUpdateOne {\n\treturn (&TodoClient{t.config}).UpdateOne(t)\n}",
"func (c *QueueClient) UpdateOne(q *Queue) *QueueUpdateOne {\n\tmutation := newQueueMutation(c.config, OpUpdateOne, withQueue(q))\n\treturn &QueueUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserWalletClient) UpdateOne(uw *UserWallet) *UserWalletUpdateOne {\n\tmutation := newUserWalletMutation(c.config, OpUpdateOne, withUserWallet(uw))\n\treturn &UserWalletUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BranchClient) UpdateOne(b *Branch) *BranchUpdateOne {\n\tmutation := newBranchMutation(c.config, OpUpdateOne, withBranch(b))\n\treturn &BranchUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ReturninvoiceClient) UpdateOne(r *Returninvoice) *ReturninvoiceUpdateOne {\n\tmutation := newReturninvoiceMutation(c.config, OpUpdateOne, withReturninvoice(r))\n\treturn &ReturninvoiceUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientInfoClient) UpdateOne(pi *PatientInfo) *PatientInfoUpdateOne {\n\tmutation := newPatientInfoMutation(c.config, OpUpdateOne, withPatientInfo(pi))\n\treturn &PatientInfoUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOne(u *User) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUser(u))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOne(u *User) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUser(u))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOne(u *User) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUser(u))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOne(u *User) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUser(u))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOne(u *User) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUser(u))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}"
] |
[
"0.69786644",
"0.67019165",
"0.66994375",
"0.6677208",
"0.6672027",
"0.6589857",
"0.6589857",
"0.6589857",
"0.65300125",
"0.651995",
"0.65180564",
"0.6487825",
"0.6487825",
"0.6461592",
"0.6458183",
"0.6445357",
"0.64419955",
"0.64270043",
"0.6408027",
"0.6404823",
"0.64033616",
"0.64027244",
"0.64027244",
"0.6399975",
"0.6398446",
"0.6388568",
"0.63817286",
"0.63815707",
"0.63714737",
"0.6370943",
"0.6364749",
"0.636445",
"0.6348519",
"0.6335669",
"0.6331678",
"0.63273585",
"0.63270754",
"0.6321551",
"0.6320346",
"0.63193846",
"0.63167924",
"0.6288302",
"0.6282733",
"0.6271278",
"0.6271278",
"0.6271278",
"0.6258417",
"0.6255493",
"0.6244699",
"0.6216547",
"0.6216474",
"0.6215179",
"0.6212471",
"0.62071437",
"0.61885947",
"0.61861897",
"0.61861897",
"0.61843294",
"0.617865",
"0.61748034",
"0.61738974",
"0.61701363",
"0.61701363",
"0.61701363",
"0.6160163",
"0.6160163",
"0.6159146",
"0.6158268",
"0.61555153",
"0.61366314",
"0.61328363",
"0.6127493",
"0.6103925",
"0.6084294",
"0.60840255",
"0.60758436",
"0.60743153",
"0.60741395",
"0.60704",
"0.60453945",
"0.60414284",
"0.6038734",
"0.6034505",
"0.6029482",
"0.60202",
"0.6019316",
"0.60016745",
"0.5999599",
"0.5990041",
"0.5983864",
"0.59750897",
"0.5964728",
"0.5958236",
"0.59515697",
"0.5949414",
"0.59384996",
"0.5935383",
"0.5935383",
"0.5935383",
"0.5935383",
"0.5935383"
] |
0.0
|
-1
|
UpdateOneID returns an update builder for the given id.
|
func (c *UnsavedPostThumbnailClient) UpdateOneID(id int) *UnsavedPostThumbnailUpdateOne {
mutation := newUnsavedPostThumbnailMutation(c.config, OpUpdateOne, withUnsavedPostThumbnailID(id))
return &UnsavedPostThumbnailUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *BuildingClient) UpdateOneID(id int) *BuildingUpdateOne {\n\tmutation := newBuildingMutation(c.config, OpUpdateOne, withBuildingID(id))\n\treturn &BuildingUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BedtypeClient) UpdateOneID(id int) *BedtypeUpdateOne {\n\tmutation := newBedtypeMutation(c.config, OpUpdateOne, withBedtypeID(id))\n\treturn &BedtypeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ModuleClient) UpdateOneID(id int) *ModuleUpdateOne {\n\treturn &ModuleUpdateOne{config: c.config, id: id}\n}",
"func (c *ModuleVersionClient) UpdateOneID(id int) *ModuleVersionUpdateOne {\n\treturn &ModuleVersionUpdateOne{config: c.config, id: id}\n}",
"func (c *BillClient) UpdateOneID(id int) *BillUpdateOne {\n\tmutation := newBillMutation(c.config, OpUpdateOne, withBillID(id))\n\treturn &BillUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BillClient) UpdateOneID(id int) *BillUpdateOne {\n\tmutation := newBillMutation(c.config, OpUpdateOne, withBillID(id))\n\treturn &BillUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BillClient) UpdateOneID(id int) *BillUpdateOne {\n\tmutation := newBillMutation(c.config, OpUpdateOne, withBillID(id))\n\treturn &BillUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *MealplanClient) UpdateOneID(id int) *MealplanUpdateOne {\n\tmutation := newMealplanMutation(c.config, OpUpdateOne, withMealplanID(id))\n\treturn &MealplanUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BeerClient) UpdateOneID(id int) *BeerUpdateOne {\n\tmutation := newBeerMutation(c.config, OpUpdateOne, withBeerID(id))\n\treturn &BeerUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RoomuseClient) UpdateOneID(id int) *RoomuseUpdateOne {\n\tmutation := newRoomuseMutation(c.config, OpUpdateOne, withRoomuseID(id))\n\treturn &RoomuseUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BookingClient) UpdateOneID(id int) *BookingUpdateOne {\n\tmutation := newBookingMutation(c.config, OpUpdateOne, withBookingID(id))\n\treturn &BookingUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *CleaningroomClient) UpdateOneID(id int) *CleaningroomUpdateOne {\n\tmutation := newCleaningroomMutation(c.config, OpUpdateOne, withCleaningroomID(id))\n\treturn &CleaningroomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *LengthtimeClient) UpdateOneID(id int) *LengthtimeUpdateOne {\n\tmutation := newLengthtimeMutation(c.config, OpUpdateOne, withLengthtimeID(id))\n\treturn &LengthtimeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ToolClient) UpdateOneID(id int) *ToolUpdateOne {\n\tmutation := newToolMutation(c.config, OpUpdateOne, withToolID(id))\n\treturn &ToolUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *StatustClient) UpdateOneID(id int) *StatustUpdateOne {\n\tmutation := newStatustMutation(c.config, OpUpdateOne, withStatustID(id))\n\treturn &StatustUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DrugAllergyClient) UpdateOneID(id int) *DrugAllergyUpdateOne {\n\tmutation := newDrugAllergyMutation(c.config, OpUpdateOne, withDrugAllergyID(id))\n\treturn &DrugAllergyUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ClubapplicationClient) UpdateOneID(id int) *ClubapplicationUpdateOne {\n\tmutation := newClubapplicationMutation(c.config, OpUpdateOne, withClubapplicationID(id))\n\treturn &ClubapplicationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *AppointmentClient) UpdateOneID(id uuid.UUID) *AppointmentUpdateOne {\n\tmutation := newAppointmentMutation(c.config, OpUpdateOne, withAppointmentID(id))\n\treturn &AppointmentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *EmptyClient) UpdateOneID(id int) *EmptyUpdateOne {\n\tmutation := newEmptyMutation(c.config, OpUpdateOne, withEmptyID(id))\n\treturn &EmptyUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *AdminClient) UpdateOneID(id int) *AdminUpdateOne {\n\tmutation := newAdminMutation(c.config, OpUpdateOne, withAdminID(id))\n\treturn &AdminUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *OperationroomClient) UpdateOneID(id int) *OperationroomUpdateOne {\n\tmutation := newOperationroomMutation(c.config, OpUpdateOne, withOperationroomID(id))\n\treturn &OperationroomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BinaryFileClient) UpdateOneID(id int) *BinaryFileUpdateOne {\n\tmutation := newBinaryFileMutation(c.config, OpUpdateOne, withBinaryFileID(id))\n\treturn &BinaryFileUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PhysicianClient) UpdateOneID(id int) *PhysicianUpdateOne {\n\tmutation := newPhysicianMutation(c.config, OpUpdateOne, withPhysicianID(id))\n\treturn &PhysicianUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PhysicianClient) UpdateOneID(id int) *PhysicianUpdateOne {\n\tmutation := newPhysicianMutation(c.config, OpUpdateOne, withPhysicianID(id))\n\treturn &PhysicianUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RoomdetailClient) UpdateOneID(id int) *RoomdetailUpdateOne {\n\tmutation := newRoomdetailMutation(c.config, OpUpdateOne, withRoomdetailID(id))\n\treturn &RoomdetailUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *OperativeClient) UpdateOneID(id int) *OperativeUpdateOne {\n\tmutation := newOperativeMutation(c.config, OpUpdateOne, withOperativeID(id))\n\treturn &OperativeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DoctorClient) UpdateOneID(id int) *DoctorUpdateOne {\n\tmutation := newDoctorMutation(c.config, OpUpdateOne, withDoctorID(id))\n\treturn &DoctorUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DentistClient) UpdateOneID(id int) *DentistUpdateOne {\n\tmutation := newDentistMutation(c.config, OpUpdateOne, withDentistID(id))\n\treturn &DentistUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnitOfMedicineClient) UpdateOneID(id int) *UnitOfMedicineUpdateOne {\n\tmutation := newUnitOfMedicineMutation(c.config, OpUpdateOne, withUnitOfMedicineID(id))\n\treturn &UnitOfMedicineUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *LeaseClient) UpdateOneID(id int) *LeaseUpdateOne {\n\tmutation := newLeaseMutation(c.config, OpUpdateOne, withLeaseID(id))\n\treturn &LeaseUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientroomClient) UpdateOneID(id int) *PatientroomUpdateOne {\n\tmutation := newPatientroomMutation(c.config, OpUpdateOne, withPatientroomID(id))\n\treturn &PatientroomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RoomClient) UpdateOneID(id int) *RoomUpdateOne {\n\tmutation := newRoomMutation(c.config, OpUpdateOne, withRoomID(id))\n\treturn &RoomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RoomClient) UpdateOneID(id int) *RoomUpdateOne {\n\tmutation := newRoomMutation(c.config, OpUpdateOne, withRoomID(id))\n\treturn &RoomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *JobClient) UpdateOneID(id int) *JobUpdateOne {\n\tmutation := newJobMutation(c.config, OpUpdateOne, withJobID(id))\n\treturn &JobUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *StatusdClient) UpdateOneID(id int) *StatusdUpdateOne {\n\tmutation := newStatusdMutation(c.config, OpUpdateOne, withStatusdID(id))\n\treturn &StatusdUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *MedicineClient) UpdateOneID(id int) *MedicineUpdateOne {\n\tmutation := newMedicineMutation(c.config, OpUpdateOne, withMedicineID(id))\n\treturn &MedicineUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BuildingClient) UpdateOne(b *Building) *BuildingUpdateOne {\n\tmutation := newBuildingMutation(c.config, OpUpdateOne, withBuilding(b))\n\treturn &BuildingUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *CleanernameClient) UpdateOneID(id int) *CleanernameUpdateOne {\n\tmutation := newCleanernameMutation(c.config, OpUpdateOne, withCleanernameID(id))\n\treturn &CleanernameUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DeviceClient) UpdateOneID(id int) *DeviceUpdateOne {\n\tmutation := newDeviceMutation(c.config, OpUpdateOne, withDeviceID(id))\n\treturn &DeviceUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BillingstatusClient) UpdateOneID(id int) *BillingstatusUpdateOne {\n\tmutation := newBillingstatusMutation(c.config, OpUpdateOne, withBillingstatusID(id))\n\treturn &BillingstatusUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PaymentClient) UpdateOneID(id int) *PaymentUpdateOne {\n\tmutation := newPaymentMutation(c.config, OpUpdateOne, withPaymentID(id))\n\treturn &PaymentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PaymentClient) UpdateOneID(id int) *PaymentUpdateOne {\n\tmutation := newPaymentMutation(c.config, OpUpdateOne, withPaymentID(id))\n\treturn &PaymentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *LevelOfDangerousClient) UpdateOneID(id int) *LevelOfDangerousUpdateOne {\n\tmutation := newLevelOfDangerousMutation(c.config, OpUpdateOne, withLevelOfDangerousID(id))\n\treturn &LevelOfDangerousUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *FoodmenuClient) UpdateOneID(id int) *FoodmenuUpdateOne {\n\tmutation := newFoodmenuMutation(c.config, OpUpdateOne, withFoodmenuID(id))\n\treturn &FoodmenuUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostClient) UpdateOneID(id int) *PostUpdateOne {\n\tmutation := newPostMutation(c.config, OpUpdateOne, withPostID(id))\n\treturn &PostUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PharmacistClient) UpdateOneID(id int) *PharmacistUpdateOne {\n\tmutation := newPharmacistMutation(c.config, OpUpdateOne, withPharmacistID(id))\n\treturn &PharmacistUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ExaminationroomClient) UpdateOneID(id int) *ExaminationroomUpdateOne {\n\tmutation := newExaminationroomMutation(c.config, OpUpdateOne, withExaminationroomID(id))\n\treturn &ExaminationroomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *KeyStoreClient) UpdateOneID(id int32) *KeyStoreUpdateOne {\n\tmutation := newKeyStoreMutation(c.config, OpUpdateOne, withKeyStoreID(id))\n\treturn &KeyStoreUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ActivitiesClient) UpdateOneID(id int) *ActivitiesUpdateOne {\n\tmutation := newActivitiesMutation(c.config, OpUpdateOne, withActivitiesID(id))\n\treturn &ActivitiesUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientofphysicianClient) UpdateOneID(id int) *PatientofphysicianUpdateOne {\n\tmutation := newPatientofphysicianMutation(c.config, OpUpdateOne, withPatientofphysicianID(id))\n\treturn &PatientofphysicianUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostAttachmentClient) UpdateOneID(id int) *PostAttachmentUpdateOne {\n\tmutation := newPostAttachmentMutation(c.config, OpUpdateOne, withPostAttachmentID(id))\n\treturn &PostAttachmentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *SkillClient) UpdateOneID(id int) *SkillUpdateOne {\n\tmutation := newSkillMutation(c.config, OpUpdateOne, withSkillID(id))\n\treturn &SkillUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *QueueClient) UpdateOneID(id int) *QueueUpdateOne {\n\tmutation := newQueueMutation(c.config, OpUpdateOne, withQueueID(id))\n\treturn &QueueUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *EventClient) UpdateOneID(id int) *EventUpdateOne {\n\tmutation := newEventMutation(c.config, OpUpdateOne, withEventID(id))\n\treturn &EventUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DNSBLQueryClient) UpdateOneID(id uuid.UUID) *DNSBLQueryUpdateOne {\n\tmutation := newDNSBLQueryMutation(c.config, OpUpdateOne, withDNSBLQueryID(id))\n\treturn &DNSBLQueryUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *SymptomClient) UpdateOneID(id int) *SymptomUpdateOne {\n\tmutation := newSymptomMutation(c.config, OpUpdateOne, withSymptomID(id))\n\treturn &SymptomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientClient) UpdateOneID(id int) *PatientUpdateOne {\n\tmutation := newPatientMutation(c.config, OpUpdateOne, withPatientID(id))\n\treturn &PatientUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientClient) UpdateOneID(id int) *PatientUpdateOne {\n\tmutation := newPatientMutation(c.config, OpUpdateOne, withPatientID(id))\n\treturn &PatientUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientClient) UpdateOneID(id int) *PatientUpdateOne {\n\tmutation := newPatientMutation(c.config, OpUpdateOne, withPatientID(id))\n\treturn &PatientUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *NurseClient) UpdateOneID(id int) *NurseUpdateOne {\n\tmutation := newNurseMutation(c.config, OpUpdateOne, withNurseID(id))\n\treturn &NurseUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PurposeClient) UpdateOneID(id int) *PurposeUpdateOne {\n\tmutation := newPurposeMutation(c.config, OpUpdateOne, withPurposeID(id))\n\treturn &PurposeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *OrderClient) UpdateOneID(id int) *OrderUpdateOne {\n\tmutation := newOrderMutation(c.config, OpUpdateOne, withOrderID(id))\n\treturn &OrderUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DepositClient) UpdateOneID(id int) *DepositUpdateOne {\n\tmutation := newDepositMutation(c.config, OpUpdateOne, withDepositID(id))\n\treturn &DepositUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DispenseMedicineClient) UpdateOneID(id int) *DispenseMedicineUpdateOne {\n\tmutation := newDispenseMedicineMutation(c.config, OpUpdateOne, withDispenseMedicineID(id))\n\treturn &DispenseMedicineUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PartorderClient) UpdateOneID(id int) *PartorderUpdateOne {\n\tmutation := newPartorderMutation(c.config, OpUpdateOne, withPartorderID(id))\n\treturn &PartorderUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *StaytypeClient) UpdateOneID(id int) *StaytypeUpdateOne {\n\tmutation := newStaytypeMutation(c.config, OpUpdateOne, withStaytypeID(id))\n\treturn &StaytypeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PlanetClient) UpdateOneID(id int) *PlanetUpdateOne {\n\tmutation := newPlanetMutation(c.config, OpUpdateOne)\n\tmutation.id = &id\n\treturn &PlanetUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UsertypeClient) UpdateOneID(id int) *UsertypeUpdateOne {\n\tmutation := newUsertypeMutation(c.config, OpUpdateOne, withUsertypeID(id))\n\treturn &UsertypeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RentalstatusClient) UpdateOneID(id int) *RentalstatusUpdateOne {\n\tmutation := newRentalstatusMutation(c.config, OpUpdateOne, withRentalstatusID(id))\n\treturn &RentalstatusUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PetruleClient) UpdateOneID(id int) *PetruleUpdateOne {\n\tmutation := newPetruleMutation(c.config, OpUpdateOne, withPetruleID(id))\n\treturn &PetruleUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ActivityTypeClient) UpdateOneID(id int) *ActivityTypeUpdateOne {\n\tmutation := newActivityTypeMutation(c.config, OpUpdateOne, withActivityTypeID(id))\n\treturn &ActivityTypeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *WorkExperienceClient) UpdateOneID(id int) *WorkExperienceUpdateOne {\n\tmutation := newWorkExperienceMutation(c.config, OpUpdateOne, withWorkExperienceID(id))\n\treturn &WorkExperienceUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *TasteClient) UpdateOneID(id int) *TasteUpdateOne {\n\tmutation := newTasteMutation(c.config, OpUpdateOne, withTasteID(id))\n\treturn &TasteUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *OperativerecordClient) UpdateOneID(id int) *OperativerecordUpdateOne {\n\tmutation := newOperativerecordMutation(c.config, OpUpdateOne, withOperativerecordID(id))\n\treturn &OperativerecordUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *OperationClient) UpdateOneID(id uuid.UUID) *OperationUpdateOne {\n\tmutation := newOperationMutation(c.config, OpUpdateOne, withOperationID(id))\n\treturn &OperationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOneID(id int) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUserID(id))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOneID(id int) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUserID(id))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOneID(id int) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUserID(id))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOneID(id int) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUserID(id))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOneID(id int) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUserID(id))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOneID(id int) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUserID(id))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOneID(id int) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUserID(id))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *FacultyClient) UpdateOneID(id int) *FacultyUpdateOne {\n\tmutation := newFacultyMutation(c.config, OpUpdateOne, withFacultyID(id))\n\treturn &FacultyUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *MedicineTypeClient) UpdateOneID(id int) *MedicineTypeUpdateOne {\n\tmutation := newMedicineTypeMutation(c.config, OpUpdateOne, withMedicineTypeID(id))\n\treturn &MedicineTypeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *AdminSessionClient) UpdateOneID(id int) *AdminSessionUpdateOne {\n\tmutation := newAdminSessionMutation(c.config, OpUpdateOne, withAdminSessionID(id))\n\treturn &AdminSessionUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *TransactionClient) UpdateOneID(id int32) *TransactionUpdateOne {\n\tmutation := newTransactionMutation(c.config, OpUpdateOne, withTransactionID(id))\n\treturn &TransactionUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostAttachmentClient) UpdateOneID(id int) *UnsavedPostAttachmentUpdateOne {\n\tmutation := newUnsavedPostAttachmentMutation(c.config, OpUpdateOne, withUnsavedPostAttachmentID(id))\n\treturn &UnsavedPostAttachmentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *EatinghistoryClient) UpdateOneID(id int) *EatinghistoryUpdateOne {\n\tmutation := newEatinghistoryMutation(c.config, OpUpdateOne, withEatinghistoryID(id))\n\treturn &EatinghistoryUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostClient) UpdateOneID(id int) *UnsavedPostUpdateOne {\n\tmutation := newUnsavedPostMutation(c.config, OpUpdateOne, withUnsavedPostID(id))\n\treturn &UnsavedPostUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserWalletClient) UpdateOneID(id int64) *UserWalletUpdateOne {\n\tmutation := newUserWalletMutation(c.config, OpUpdateOne, withUserWalletID(id))\n\treturn &UserWalletUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RepairinvoiceClient) UpdateOneID(id int) *RepairinvoiceUpdateOne {\n\tmutation := newRepairinvoiceMutation(c.config, OpUpdateOne, withRepairinvoiceID(id))\n\treturn &RepairinvoiceUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ClubappStatusClient) UpdateOneID(id int) *ClubappStatusUpdateOne {\n\tmutation := newClubappStatusMutation(c.config, OpUpdateOne, withClubappStatusID(id))\n\treturn &ClubappStatusUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOneID(id int64) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUserID(id))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PledgeClient) UpdateOneID(id int) *PledgeUpdateOne {\n\tmutation := newPledgeMutation(c.config, OpUpdateOne, withPledgeID(id))\n\treturn &PledgeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *AnnotationClient) UpdateOneID(id int) *AnnotationUpdateOne {\n\tmutation := newAnnotationMutation(c.config, OpUpdateOne, withAnnotationID(id))\n\treturn &AnnotationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ComplaintClient) UpdateOneID(id int) *ComplaintUpdateOne {\n\tmutation := newComplaintMutation(c.config, OpUpdateOne, withComplaintID(id))\n\treturn &ComplaintUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientInfoClient) UpdateOneID(id int) *PatientInfoUpdateOne {\n\tmutation := newPatientInfoMutation(c.config, OpUpdateOne, withPatientInfoID(id))\n\treturn &PatientInfoUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BillClient) UpdateOne(b *Bill) *BillUpdateOne {\n\tmutation := newBillMutation(c.config, OpUpdateOne, withBill(b))\n\treturn &BillUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BillClient) UpdateOne(b *Bill) *BillUpdateOne {\n\tmutation := newBillMutation(c.config, OpUpdateOne, withBill(b))\n\treturn &BillUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BillClient) UpdateOne(b *Bill) *BillUpdateOne {\n\tmutation := newBillMutation(c.config, OpUpdateOne, withBill(b))\n\treturn &BillUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *WalletNodeClient) UpdateOneID(id int32) *WalletNodeUpdateOne {\n\tmutation := newWalletNodeMutation(c.config, OpUpdateOne, withWalletNodeID(id))\n\treturn &WalletNodeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}"
] |
[
"0.7161445",
"0.7022094",
"0.70118505",
"0.6988432",
"0.6972132",
"0.6972132",
"0.6972132",
"0.6955919",
"0.68936574",
"0.68733335",
"0.6870585",
"0.68678725",
"0.68326664",
"0.67681307",
"0.6760089",
"0.67584926",
"0.67324734",
"0.67318887",
"0.67293054",
"0.67258644",
"0.67242485",
"0.67213804",
"0.67198265",
"0.67198265",
"0.67103165",
"0.67073894",
"0.66984946",
"0.66913176",
"0.6683006",
"0.66774887",
"0.66756946",
"0.6674457",
"0.6674457",
"0.66643083",
"0.66631585",
"0.66582507",
"0.66566366",
"0.665588",
"0.6655856",
"0.66537756",
"0.6646425",
"0.6646425",
"0.6638017",
"0.6632119",
"0.66280824",
"0.66252446",
"0.66242236",
"0.6602178",
"0.6580235",
"0.65774715",
"0.65693206",
"0.6560518",
"0.65584415",
"0.6552529",
"0.65503097",
"0.6522521",
"0.65156066",
"0.65156066",
"0.65156066",
"0.6510951",
"0.65053946",
"0.6489746",
"0.6478886",
"0.64745235",
"0.6472036",
"0.6471138",
"0.64710075",
"0.64623",
"0.64582026",
"0.6454023",
"0.6448334",
"0.6447963",
"0.64414746",
"0.6436235",
"0.64297193",
"0.64284647",
"0.64284647",
"0.64284647",
"0.64284647",
"0.64284647",
"0.64284647",
"0.64284647",
"0.6427249",
"0.6426372",
"0.6425563",
"0.64250547",
"0.6422659",
"0.6420068",
"0.6417354",
"0.6414169",
"0.6411417",
"0.6407716",
"0.64027095",
"0.6397613",
"0.639633",
"0.6386613",
"0.63846487",
"0.63767534",
"0.63767534",
"0.63767534",
"0.6373375"
] |
0.0
|
-1
|
Delete returns a delete builder for UnsavedPostThumbnail.
|
func (c *UnsavedPostThumbnailClient) Delete() *UnsavedPostThumbnailDelete {
mutation := newUnsavedPostThumbnailMutation(c.config, OpDelete)
return &UnsavedPostThumbnailDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *PostThumbnailClient) Delete() *PostThumbnailDelete {\n\tmutation := newPostThumbnailMutation(c.config, OpDelete)\n\treturn &PostThumbnailDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostImageClient) Delete() *UnsavedPostImageDelete {\n\tmutation := newUnsavedPostImageMutation(c.config, OpDelete)\n\treturn &UnsavedPostImageDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostAttachmentClient) Delete() *UnsavedPostAttachmentDelete {\n\tmutation := newUnsavedPostAttachmentMutation(c.config, OpDelete)\n\treturn &UnsavedPostAttachmentDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostClient) Delete() *UnsavedPostDelete {\n\tmutation := newUnsavedPostMutation(c.config, OpDelete)\n\treturn &UnsavedPostDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostImageClient) Delete() *PostImageDelete {\n\tmutation := newPostImageMutation(c.config, OpDelete)\n\treturn &PostImageDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostAttachmentClient) Delete() *PostAttachmentDelete {\n\tmutation := newPostAttachmentMutation(c.config, OpDelete)\n\treturn &PostAttachmentDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upu *UnsavedPostUpdate) ClearThumbnail() *UnsavedPostUpdate {\n\tupu.mutation.ClearThumbnail()\n\treturn upu\n}",
"func (upuo *UnsavedPostUpdateOne) ClearThumbnail() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearThumbnail()\n\treturn upuo\n}",
"func (c *PostClient) Delete() *PostDelete {\n\tmutation := newPostMutation(c.config, OpDelete)\n\treturn &PostDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostVideoClient) Delete() *UnsavedPostVideoDelete {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpDelete)\n\treturn &UnsavedPostVideoDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *MediaClient) Delete() *MediaDelete {\n\tmutation := newMediaMutation(c.config, OpDelete)\n\treturn &MediaDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostThumbnailClient) Get(ctx context.Context, id int) (*UnsavedPostThumbnail, error) {\n\treturn c.Query().Where(unsavedpostthumbnail.ID(id)).Only(ctx)\n}",
"func (m *ItemPhotoRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemPhotoRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func NewUnsavedPostThumbnailClient(c config) *UnsavedPostThumbnailClient {\n\treturn &UnsavedPostThumbnailClient{config: c}\n}",
"func (c *UnsavedPostThumbnailClient) Create() *UnsavedPostThumbnailCreate {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpCreate)\n\treturn &UnsavedPostThumbnailCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func DeletePost(shorturl string, s3Agent *upload.S3Agent) (interface{}, error) {\n\tdb := database.GetMySQLInstance()\n\tdefer db.Close()\n\n\tvar post types.Post\n\terr := db.Where(\"shorturl LIKE ?\", shorturl).First(&post).Error\n\n\tif err != nil && err == gorm.ErrRecordNotFound {\n\t\treturn nil, ErrPostNotFound\n\t}\n\n\tsuccessReturn := map[string]interface{}{\"msg\": \"success\", \"pid\": post.ID}\n\n\t_, err = s3Agent.DeleteFiles(s3Agent.BucketName, post.Images)\n\tif err != nil {\n\t\treturn nil, ErrResourceRemoveFailure\n\t}\n\n\terr = db.Unscoped().Delete(&post).Error\n\tif err != nil {\n\t\tlog.Debug(err)\n\t\treturn nil, ErrResourceRemoveFailure\n\t}\n\n\treturn successReturn, nil\n}",
"func (c *PostVideoClient) Delete() *PostVideoDelete {\n\tmutation := newPostVideoMutation(c.config, OpDelete)\n\treturn &PostVideoDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostThumbnailClient) DeleteOne(upt *UnsavedPostThumbnail) *UnsavedPostThumbnailDeleteOne {\n\treturn c.DeleteOneID(upt.ID)\n}",
"func (controller *WidgetController) Delete(context *qhttp.Context) {\n\tcontroller.storage.Delete(context.URIParameters[\"id\"])\n\tcontext.SetResponse(\"\", http.StatusNoContent)\n}",
"func (l *Like) Delete() error {\n\treturn nil\n}",
"func (upq *UnsavedPostQuery) WithThumbnail(opts ...func(*UnsavedPostThumbnailQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withThumbnail = query\n\treturn upq\n}",
"func (p *postsQueryBuilder) Delete() (int64, error) {\n\tif p.err != nil {\n\t\treturn 0, p.err\n\t}\n\treturn p.builder.Delete()\n}",
"func (o *DMessageEmbed) Delete(exec boil.Executor) error {\n\tif o == nil {\n\t\treturn errors.New(\"models: no DMessageEmbed provided for delete\")\n\t}\n\n\targs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), dMessageEmbedPrimaryKeyMapping)\n\tsql := \"DELETE FROM \\\"d_message_embeds\\\" WHERE \\\"id\\\"=$1\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, sql)\n\t\tfmt.Fprintln(boil.DebugWriter, args...)\n\t}\n\n\t_, err := exec.Exec(sql, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"models: unable to delete from d_message_embeds\")\n\t}\n\n\treturn nil\n}",
"func (u *App) Delete(c echo.Context, id string) error {\n\tif err := u.rbac.EnforceRole(c, model.AdminRole); err != nil {\n\t\treturn err\n\t}\n\n\tpost, err := u.udb.View(u.db, id)\n\tif err = zaplog.ZLog(err); err != nil {\n\t\treturn err\n\t}\n\n\tif post.Status != model.StatusDraft {\n\t\treturn zaplog.ZLog(errors.New(\"Apenas é possível eliminar artigos em rascunho\"))\n\t}\n\n\treturn u.udb.Delete(u.db, id)\n}",
"func (c *UnsavedPostThumbnailClient) Query() *UnsavedPostThumbnailQuery {\n\treturn &UnsavedPostThumbnailQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *BuildingClient) Delete() *BuildingDelete {\n\tmutation := newBuildingMutation(c.config, OpDelete)\n\treturn &BuildingDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PartClient) Delete() *PartDelete {\n\tmutation := newPartMutation(c.config, OpDelete)\n\treturn &PartDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (mock *MockRepository) Delete(post *entity.Post) error {\n\treturn nil\n}",
"func (m *ThreatSubmissionEmailThreatsEmailThreatSubmissionItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ThreatSubmissionEmailThreatsEmailThreatSubmissionItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (repo *PostAttributeRepository) Delete(identifier, tableName string) (*entity.PostAttribute, error) {\n\tattribute := new(entity.PostAttribute)\n\terr := repo.conn.Table(tableName).Where(\"id = ? || name = ?\", identifier, identifier).First(attribute).Error\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\trepo.conn.Table(tableName).Delete(attribute)\n\treturn attribute, nil\n}",
"func (c *PharmacistClient) Delete() *PharmacistDelete {\n\tmutation := newPharmacistMutation(c.config, OpDelete)\n\treturn &PharmacistDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostThumbnailClient) QueryUnsavedPost(upt *UnsavedPostThumbnail) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upt.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, true, unsavedpostthumbnail.UnsavedPostTable, unsavedpostthumbnail.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upt.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *MedicineClient) Delete() *MedicineDelete {\n\tmutation := newMedicineMutation(c.config, OpDelete)\n\treturn &MedicineDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (o *Picture) Delete(exec boil.Executor) error {\n\tif o == nil {\n\t\treturn errors.New(\"models: no Picture provided for delete\")\n\t}\n\n\tif err := o.doBeforeDeleteHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\targs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), picturePrimaryKeyMapping)\n\tsql := \"DELETE FROM `pictures` WHERE `id`=?\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, sql)\n\t\tfmt.Fprintln(boil.DebugWriter, args...)\n\t}\n\n\t_, err := exec.Exec(sql, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"models: unable to delete from pictures\")\n\t}\n\n\tif err := o.doAfterDeleteHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}",
"func (b *QueryBuilder) Delete() {\n}",
"func (dsl *PutDSL) Delete() linux.DeleteDSL {\n\treturn &DeleteDSL{dsl.parent, dsl.vppPut.Delete()}\n}",
"func (dsl *PutDSL) Delete() linux.DeleteDSL {\n\treturn &DeleteDSL{dsl.parent, dsl.vppPut.Delete()}\n}",
"func (c *QueueClient) Delete() *QueueDelete {\n\tmutation := newQueueMutation(c.config, OpDelete)\n\treturn &QueueDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostThumbnailClient) Update() *UnsavedPostThumbnailUpdate {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpUpdate)\n\treturn &UnsavedPostThumbnailUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostClient) QueryThumbnail(up *UnsavedPost) *UnsavedPostThumbnailQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, unsavedpost.ThumbnailTable, unsavedpost.ThumbnailColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func Delete(c *gin.Context) {\r\n\tpost := getById(c)\r\n\tif post.ID == 0 {\r\n\t\treturn\r\n\t}\r\n\tdb.Unscoped().Delete(&post)\r\n\tc.JSON(http.StatusOK, gin.H{\r\n\t\t\"messege\": \"deleted successfuly\",\r\n\t\t\"data\": \"\",\r\n\t})\r\n}",
"func (c *UploadController) Delete() {\n\timg := struct {\n\t\tFileName string `json:\"fileName\"`\n\t}{}\n\terr := json.Unmarshal(c.Ctx.Input.RequestBody, &img)\n\tif err != nil {\n\t\tlog.Println(err)\n\t}\n\n\t// remove thumbnail\n\terr = os.Remove(thumbnailsFolder + img.FileName)\n\tif err != nil {\n\t\tlog.Println(err)\n\t}\n\t// remove main image\n\terr = os.Remove(imagesFolder + img.FileName)\n\tif err != nil {\n\t\tlog.Println(err)\n\t}\n\tc.Data[\"json\"] = img\n\tc.ServeJSON()\n}",
"func (upq *UnsavedPostQuery) QueryThumbnail() *UnsavedPostThumbnailQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, unsavedpost.ThumbnailTable, unsavedpost.ThumbnailColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (f *FakeImagesClient) Delete(ctx context.Context, deleteOpts *images.DeleteRequest, opts ...grpc.CallOption) (*googleprotobuf.Empty, error) {\n\tf.Lock()\n\tdefer f.Unlock()\n\tf.appendCalled(\"delete\", deleteOpts)\n\tif err := f.getError(\"delete\"); err != nil {\n\t\treturn nil, err\n\t}\n\t_, ok := f.ImageList[deleteOpts.Name]\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"image does not exist\")\n\t}\n\tdelete(f.ImageList, deleteOpts.Name)\n\treturn &googleprotobuf.Empty{}, nil\n}",
"func (repository Posts) Delete(postID uint64) error {\n\tdbStatement, err := repository.db.Prepare(\n\t\t\"DELETE FROM posts WHERE id = ?\",\n\t)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer dbStatement.Close()\n\n\tif _, err = dbStatement.Exec(postID); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}",
"func (c *PostThumbnailClient) DeleteOne(pt *PostThumbnail) *PostThumbnailDeleteOne {\n\treturn c.DeleteOneID(pt.ID)\n}",
"func NewDeleteBuilder() *DeleteBuilder {\n\treturn &DeleteBuilder{}\n}",
"func (c *MedicineTypeClient) Delete() *MedicineTypeDelete {\n\tmutation := newMedicineTypeMutation(c.config, OpDelete)\n\treturn &MedicineTypeDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BeerClient) Delete() *BeerDelete {\n\tmutation := newBeerMutation(c.config, OpDelete)\n\treturn &BeerDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ResourcesHandler) Delete(event.DeleteEvent, workqueue.RateLimitingInterface) {}",
"func (c *ReviewClient) Delete() *ReviewDelete {\n\tmutation := newReviewMutation(c.config, OpDelete)\n\treturn &ReviewDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func DeletePostController(c *gin.Context) {\n\n\t// Get parameters from validate middleware\n\tparams := c.MustGet(\"params\").([]uint)\n\n\t// get userdata from user middleware\n\tuserdata := c.MustGet(\"userdata\").(user.User)\n\n\tif !c.MustGet(\"protected\").(bool) {\n\t\tc.JSON(e.ErrorMessage(e.ErrInternalError))\n\t\tc.Error(e.ErrInternalError).SetMeta(\"DeletePostController.protected\")\n\t\treturn\n\t}\n\n\t// Initialize model struct\n\tm := &models.DeletePostModel{\n\t\tIb: params[0],\n\t\tThread: params[1],\n\t\tID: params[2],\n\t}\n\n\t// Check the record id and get further info\n\terr := m.Status()\n\tif err == e.ErrNotFound {\n\t\tc.JSON(e.ErrorMessage(e.ErrNotFound))\n\t\tc.Error(err).SetMeta(\"DeletePostController.Status\")\n\t\treturn\n\t} else if err != nil {\n\t\tc.JSON(e.ErrorMessage(e.ErrInternalError))\n\t\tc.Error(err).SetMeta(\"DeletePostController.Status\")\n\t\treturn\n\t}\n\n\t// Delete data\n\terr = m.Delete()\n\tif err != nil {\n\t\tc.JSON(e.ErrorMessage(e.ErrInternalError))\n\t\tc.Error(err).SetMeta(\"DeletePostController.Delete\")\n\t\treturn\n\t}\n\n\t// Delete redis stuff\n\tindexKey := fmt.Sprintf(\"%s:%d\", \"index\", m.Ib)\n\tdirectoryKey := fmt.Sprintf(\"%s:%d\", \"directory\", m.Ib)\n\tthreadKey := fmt.Sprintf(\"%s:%d:%d\", \"thread\", m.Ib, m.Thread)\n\tpostKey := fmt.Sprintf(\"%s:%d:%d\", \"post\", m.Ib, m.Thread)\n\ttagsKey := fmt.Sprintf(\"%s:%d\", \"tags\", m.Ib)\n\timageKey := fmt.Sprintf(\"%s:%d\", \"image\", m.Ib)\n\tnewKey := fmt.Sprintf(\"%s:%d\", \"new\", m.Ib)\n\tpopularKey := fmt.Sprintf(\"%s:%d\", \"popular\", m.Ib)\n\tfavoritedKey := fmt.Sprintf(\"%s:%d\", \"favorited\", m.Ib)\n\n\terr = redis.Cache.Delete(indexKey, directoryKey, threadKey, postKey, tagsKey, imageKey, newKey, popularKey, favoritedKey)\n\tif err != nil {\n\t\tc.JSON(e.ErrorMessage(e.ErrInternalError))\n\t\tc.Error(err).SetMeta(\"DeletePostController.redis.Cache.Delete\")\n\t\treturn\n\t}\n\n\t// response message\n\tc.JSON(http.StatusOK, gin.H{\"success_message\": audit.AuditDeletePost})\n\n\t// audit log\n\taudit := audit.Audit{\n\t\tUser: userdata.ID,\n\t\tIb: m.Ib,\n\t\tType: audit.ModLog,\n\t\tIP: c.ClientIP(),\n\t\tAction: audit.AuditDeletePost,\n\t\tInfo: fmt.Sprintf(\"%s/%d\", m.Name, m.ID),\n\t}\n\n\t// submit audit\n\terr = audit.Submit()\n\tif err != nil {\n\t\tc.Error(err).SetMeta(\"DeletePostController.audit.Submit\")\n\t}\n\n}",
"func (m *NotificationMessageTemplatesNotificationMessageTemplateItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *NotificationMessageTemplatesNotificationMessageTemplateItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (c *TagClient) Delete() *TagDelete {\n\tmutation := newTagMutation(c.config, OpDelete)\n\treturn &TagDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (m *EmbeddedSIMActivationCodePoolsEmbeddedSIMActivationCodePoolItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *EmbeddedSIMActivationCodePoolsEmbeddedSIMActivationCodePoolItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (c *DentistClient) Delete() *DentistDelete {\n\tmutation := newDentistMutation(c.config, OpDelete)\n\treturn &DentistDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func Delete(g *types.Cmd) {\n\tg.AddOptions(\"--delete\")\n}",
"func (c *PartorderClient) Delete() *PartorderDelete {\n\tmutation := newPartorderMutation(c.config, OpDelete)\n\treturn &PartorderDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ImageController) Delete(ctx *app.DeleteImageContext) error {\n\t// ImageController_Delete: start_implement\n\n\t// Put your logic here\n\n\t// ImageController_Delete: end_implement\n\treturn nil\n}",
"func (c *UnsavedPostImageClient) Get(ctx context.Context, id int) (*UnsavedPostImage, error) {\n\treturn c.Query().Where(unsavedpostimage.ID(id)).Only(ctx)\n}",
"func (c *Client) Delete(d core.Digest) error {\n\t_, err := httputil.Delete(fmt.Sprintf(\"http://%s/blobs/%s\", c.addr, d))\n\treturn err\n}",
"func (m *ManagedTenantsManagedTenantTicketingEndpointsManagedTenantTicketingEndpointItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ManagedTenantsManagedTenantTicketingEndpointsManagedTenantTicketingEndpointItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (b *DeleteBuilder) WithFlavor(flavor sql.DbFlavor) *DeleteBuilder {\n\tb.BaseSqlBuilder.WithFlavor(flavor)\n\treturn b\n}",
"func Delete(s *discordgo.Session, m *discordgo.MessageCreate) {\n}",
"func (c *BedtypeClient) Delete() *BedtypeDelete {\n\tmutation := newBedtypeMutation(c.config, OpDelete)\n\treturn &BedtypeDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (m *CompaniesItemSalesCreditMemosItemCustomerPicturePictureItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *CompaniesItemSalesCreditMemosItemCustomerPicturePictureItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (c *TitleClient) Delete() *TitleDelete {\n\tmutation := newTitleMutation(c.config, OpDelete)\n\treturn &TitleDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (m *LabelsCategoriesItemSubCategoriesSubCategoryTemplateItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *LabelsCategoriesItemSubCategoriesSubCategoryTemplateItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (pid *PostImageDelete) Where(ps ...predicate.PostImage) *PostImageDelete {\n\tpid.mutation.predicates = append(pid.mutation.predicates, ps...)\n\treturn pid\n}",
"func (b *DeleteBuilder) Build(opts ...interface{}) (string, []interface{}) {\n\tif b.Flavor == sql.FlavorCosmosDb {\n\t\topts = removeOptTableAlias(opts...)\n\t}\n\ttableAlias := extractOptTableAlias(opts...)\n\tif tableAlias != \"\" {\n\t\tif reTblNameWithAlias.MatchString(b.Table) {\n\t\t\ttableAlias = \"\"\n\t\t} else {\n\t\t\ttableAlias = \" \" + tableAlias[:len(tableAlias)-1]\n\t\t}\n\t}\n\tif b.Filter != nil {\n\t\tnewOpts := append([]interface{}{OptDbFlavor{Flavor: b.Flavor}}, opts...)\n\t\twhereClause, values := b.Filter.Build(b.PlaceholderGenerator, newOpts...)\n\t\tsql := fmt.Sprintf(\"DELETE FROM %s%s WHERE %s\", b.Table, tableAlias, whereClause)\n\t\treturn sql, values\n\t}\n\tsql := fmt.Sprintf(\"DELETE FROM %s%s\", b.Table, tableAlias)\n\treturn sql, make([]interface{}, 0)\n}",
"func (o *BraceletPhoto) Delete(exec boil.Executor) error {\n\tif o == nil {\n\t\treturn errors.New(\"models: no BraceletPhoto provided for delete\")\n\t}\n\n\targs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), braceletPhotoPrimaryKeyMapping)\n\tsql := \"DELETE FROM `bracelet_photo` WHERE `id`=?\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, sql)\n\t\tfmt.Fprintln(boil.DebugWriter, args...)\n\t}\n\n\t_, err := exec.Exec(sql, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"models: unable to delete from bracelet_photo\")\n\t}\n\n\treturn nil\n}",
"func (o *Smallblog) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tif o == nil {\n\t\treturn 0, errors.New(\"models: no Smallblog provided for delete\")\n\t}\n\n\tif err := o.doBeforeDeleteHooks(ctx, exec); err != nil {\n\t\treturn 0, err\n\t}\n\n\targs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), smallblogPrimaryKeyMapping)\n\tsql := \"DELETE FROM `smallblog` WHERE `id`=?\"\n\n\tif boil.IsDebug(ctx) {\n\t\twriter := boil.DebugWriterFrom(ctx)\n\t\tfmt.Fprintln(writer, sql)\n\t\tfmt.Fprintln(writer, args...)\n\t}\n\tresult, err := exec.ExecContext(ctx, sql, args...)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: unable to delete from smallblog\")\n\t}\n\n\trowsAff, err := result.RowsAffected()\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to get rows affected by delete for smallblog\")\n\t}\n\n\tif err := o.doAfterDeleteHooks(ctx, exec); err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn rowsAff, nil\n}",
"func (c *BinaryFileClient) Delete() *BinaryFileDelete {\n\tmutation := newBinaryFileMutation(c.config, OpDelete)\n\treturn &BinaryFileDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostImageClient) DeleteOne(upi *UnsavedPostImage) *UnsavedPostImageDeleteOne {\n\treturn c.DeleteOneID(upi.ID)\n}",
"func NewUnsavedPostImageClient(c config) *UnsavedPostImageClient {\n\treturn &UnsavedPostImageClient{config: c}\n}",
"func (m *SignInItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *SignInItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (m *PrivilegedSignupStatusItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *PrivilegedSignupStatusItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (m *GroupPolicyDefinitionsItemNextVersionDefinitionPreviousVersionDefinitionRequestBuilder) Delete(ctx context.Context, requestConfiguration *GroupPolicyDefinitionsItemNextVersionDefinitionPreviousVersionDefinitionRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (m *ItemSettingsRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemSettingsRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (m *TeamTemplateDefinitionItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *TeamTemplateDefinitionItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (m *FileRequestBuilder) Delete(ctx context.Context, requestConfiguration *FileRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (c *UnitOfMedicineClient) Delete() *UnitOfMedicineDelete {\n\tmutation := newUnitOfMedicineMutation(c.config, OpDelete)\n\treturn &UnitOfMedicineDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (m *ChatItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ChatItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (m *DeleteImageTagModel) Delete() (err error) {\n\n\t// check model validity\n\tif !m.IsValid() {\n\t\treturn errors.New(\"DeleteImageTagModel is not valid\")\n\t}\n\n\t// Get Database handle\n\tdbase, err := db.GetDb()\n\tif err != nil {\n\t\treturn\n\t}\n\n\tps1, err := dbase.Prepare(`DELETE tm FROM tagmap AS tm\n INNER JOIN tags ON tm.tag_id = tags.tag_id\n WHERE image_id = ? AND tm.tag_id = ? AND ib_id = ?`)\n\tif err != nil {\n\t\treturn\n\t}\n\tdefer ps1.Close()\n\n\t_, err = ps1.Exec(m.Image, m.Tag, m.Ib)\n\tif err != nil {\n\t\treturn\n\t}\n\n\treturn\n\n}",
"func (m *TermStoreRequestBuilder) Delete(ctx context.Context, requestConfiguration *TermStoreRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (c *PrescriptionClient) Delete() *PrescriptionDelete {\n\tmutation := newPrescriptionMutation(c.config, OpDelete)\n\treturn &PrescriptionDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func RawDelete(restClient *rest.RESTClient, streams genericiooptions.IOStreams, url, filename string) error {\n\treturn raw(restClient, streams, url, filename, \"DELETE\")\n}",
"func (c *UnsavedPostThumbnailClient) DeleteOneID(id int) *UnsavedPostThumbnailDeleteOne {\n\tbuilder := c.Delete().Where(unsavedpostthumbnail.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &UnsavedPostThumbnailDeleteOne{builder}\n}",
"func (c *commentsQueryBuilder) Delete() (int64, error) {\n\tif c.err != nil {\n\t\treturn 0, c.err\n\t}\n\treturn c.builder.Delete()\n}",
"func (c *AdminClient) Delete() *AdminDelete {\n\tmutation := newAdminMutation(c.config, OpDelete)\n\treturn &AdminDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *EmptyClient) Delete() *EmptyDelete {\n\tmutation := newEmptyMutation(c.config, OpDelete)\n\treturn &EmptyDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (m *StoreItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *StoreItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (b *blogsQueryBuilder) Delete() (int64, error) {\n\tif b.err != nil {\n\t\treturn 0, b.err\n\t}\n\treturn b.builder.Delete()\n}",
"func NewDeleteItemBuilder(t mockConstructorTestingTNewDeleteItemBuilder) *DeleteItemBuilder {\n\tmock := &DeleteItemBuilder{}\n\tmock.Mock.Test(t)\n\n\tt.Cleanup(func() { mock.AssertExpectations(t) })\n\n\treturn mock\n}",
"func (t *PgAttributeType) Delete(c1 qb.Condition, c ...qb.Condition) qb.Query {\n\treturn t.table.Delete(c1, c...)\n}",
"func (media *SavedMedia) Delete() error {\n\tfor _, i := range media.Items {\n\t\terr := i.Media.Unsave()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}",
"func Delete(ctx context.Context, client client.Client, namespace string, name string, secretNameWithPrefix bool) error {\n\tsecretName := SecretName(name, secretNameWithPrefix)\n\n\tif err := builder.NewManagedResource(client).\n\t\tWithNamespacedName(namespace, name).\n\t\tDelete(ctx); err != nil {\n\t\treturn fmt.Errorf(\"could not delete managed resource '%s/%s': %w\", namespace, name, err)\n\t}\n\n\tif err := builder.NewSecret(client).\n\t\tWithNamespacedName(namespace, secretName).\n\t\tDelete(ctx); err != nil {\n\t\treturn fmt.Errorf(\"could not delete secret '%s/%s' of managed resource: %w\", namespace, secretName, err)\n\t}\n\n\treturn nil\n}",
"func (m *ItemOnenoteNotebooksItemSectionsItemPagesOnenotePageItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemOnenoteNotebooksItemSectionsItemPagesOnenotePageItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (c *DispenseMedicineClient) Delete() *DispenseMedicineDelete {\n\tmutation := newDispenseMedicineMutation(c.config, OpDelete)\n\treturn &DispenseMedicineDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (m *OperationsPrintOperationItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *OperationsPrintOperationItemRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}"
] |
[
"0.69992185",
"0.6701381",
"0.6481093",
"0.62717235",
"0.61506003",
"0.60733",
"0.59151596",
"0.5750194",
"0.570263",
"0.56057507",
"0.5550497",
"0.5526621",
"0.5453074",
"0.54175633",
"0.5329003",
"0.5272652",
"0.5266842",
"0.52227545",
"0.5211689",
"0.5163914",
"0.5154742",
"0.5123496",
"0.51216596",
"0.51186657",
"0.5106145",
"0.50671995",
"0.5064439",
"0.50561607",
"0.5052997",
"0.504839",
"0.5043514",
"0.50336874",
"0.5002126",
"0.49740902",
"0.49688557",
"0.49579972",
"0.49579972",
"0.49340916",
"0.49298412",
"0.49277467",
"0.49102664",
"0.4864498",
"0.48587498",
"0.48572654",
"0.48518893",
"0.4839382",
"0.48003596",
"0.47882828",
"0.47848544",
"0.4775835",
"0.47575265",
"0.47499445",
"0.47354722",
"0.47325245",
"0.47314057",
"0.47294572",
"0.47294378",
"0.4716619",
"0.47156775",
"0.47144625",
"0.47131503",
"0.47046107",
"0.4697499",
"0.46918914",
"0.46856546",
"0.46724302",
"0.46717158",
"0.46692806",
"0.46620986",
"0.4657785",
"0.46522033",
"0.46322957",
"0.46306336",
"0.462629",
"0.462603",
"0.46252626",
"0.46223396",
"0.4619517",
"0.4618956",
"0.46142527",
"0.46111557",
"0.46088165",
"0.4601861",
"0.45968553",
"0.4594277",
"0.45908964",
"0.45884502",
"0.45806882",
"0.45796824",
"0.45781595",
"0.45772898",
"0.45766103",
"0.45649445",
"0.45637387",
"0.45624906",
"0.4561603",
"0.4551087",
"0.45498514",
"0.45421737",
"0.45416263"
] |
0.7508943
|
0
|
DeleteOne returns a delete builder for the given entity.
|
func (c *UnsavedPostThumbnailClient) DeleteOne(upt *UnsavedPostThumbnail) *UnsavedPostThumbnailDeleteOne {
return c.DeleteOneID(upt.ID)
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *BuildingClient) DeleteOne(b *Building) *BuildingDeleteOne {\n\treturn c.DeleteOneID(b.ID)\n}",
"func (c *DeviceClient) DeleteOne(d *Device) *DeviceDeleteOne {\n\treturn c.DeleteOneID(d.ID)\n}",
"func (c *EmptyClient) DeleteOne(e *Empty) *EmptyDeleteOne {\n\treturn c.DeleteOneID(e.ID)\n}",
"func (c *DentistClient) DeleteOne(d *Dentist) *DentistDeleteOne {\n\treturn c.DeleteOneID(d.ID)\n}",
"func (c *BedtypeClient) DeleteOne(b *Bedtype) *BedtypeDeleteOne {\n\treturn c.DeleteOneID(b.ID)\n}",
"func (c *OperativerecordClient) DeleteOne(o *Operativerecord) *OperativerecordDeleteOne {\n\treturn c.DeleteOneID(o.ID)\n}",
"func (c *OperationClient) DeleteOne(o *Operation) *OperationDeleteOne {\n\treturn c.DeleteOneID(o.ID)\n}",
"func (c *DNSBLQueryClient) DeleteOne(dq *DNSBLQuery) *DNSBLQueryDeleteOne {\n\treturn c.DeleteOneID(dq.ID)\n}",
"func (c *DispenseMedicineClient) DeleteOne(dm *DispenseMedicine) *DispenseMedicineDeleteOne {\n\treturn c.DeleteOneID(dm.ID)\n}",
"func (c *Command) DeleteOne() (int64, error) {\n\tclient := c.set.gom.GetClient()\n\n\tcollection := client.Database(c.set.gom.GetDatabase()).Collection(c.set.tableName)\n\n\tif len(c.set.filter.(bson.M)) == 0 {\n\t\treturn 0, errors.New(\"filter can't be empty\")\n\t}\n\n\tctx, cancelFunc := c.set.GetContext()\n\tdefer cancelFunc()\n\n\tres, err := collection.DeleteOne(ctx, c.set.filter)\n\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn res.DeletedCount, nil\n}",
"func (c *DoctorClient) DeleteOne(d *Doctor) *DoctorDeleteOne {\n\treturn c.DeleteOneID(d.ID)\n}",
"func NewDeleteOneModel() *DeleteOneModel {\n\treturn &DeleteOneModel{}\n}",
"func (c *DrugAllergyClient) DeleteOne(da *DrugAllergy) *DrugAllergyDeleteOne {\n\treturn c.DeleteOneID(da.ID)\n}",
"func (c *BeerClient) DeleteOne(b *Beer) *BeerDeleteOne {\n\treturn c.DeleteOneID(b.ID)\n}",
"func (d *Demo) DeleteOne(g *gom.Gom) {\n\ttoolkit.Println(\"===== Delete One =====\")\n\n\tvar err error\n\tif d.useParams {\n\t\t_, err = g.Set(&gom.SetParams{\n\t\t\tTableName: \"hero\",\n\t\t\tFilter: gom.Eq(\"Name\", \"Batman\"),\n\t\t\tTimeout: 10,\n\t\t}).Cmd().DeleteOne()\n\t} else {\n\t\t_, err = g.Set(nil).Table(\"hero\").Timeout(10).Filter(gom.Eq(\"Name\", \"Batman\")).Cmd().DeleteOne()\n\t}\n\n\tif err != nil {\n\t\ttoolkit.Println(err.Error())\n\t\treturn\n\t}\n}",
"func (c *OrderClient) DeleteOne(o *Order) *OrderDeleteOne {\n\treturn c.DeleteOneID(o.ID)\n}",
"func (c *AdminClient) DeleteOne(a *Admin) *AdminDeleteOne {\n\treturn c.DeleteOneID(a.ID)\n}",
"func (c *PharmacistClient) DeleteOne(ph *Pharmacist) *PharmacistDeleteOne {\n\treturn c.DeleteOneID(ph.ID)\n}",
"func (c *FoodmenuClient) DeleteOne(f *Foodmenu) *FoodmenuDeleteOne {\n\treturn c.DeleteOneID(f.ID)\n}",
"func (c *CleaningroomClient) DeleteOne(cl *Cleaningroom) *CleaningroomDeleteOne {\n\treturn c.DeleteOneID(cl.ID)\n}",
"func (c *PatientClient) DeleteOne(pa *Patient) *PatientDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *PatientClient) DeleteOne(pa *Patient) *PatientDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *PatientClient) DeleteOne(pa *Patient) *PatientDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *PostClient) DeleteOne(po *Post) *PostDeleteOne {\n\treturn c.DeleteOneID(po.ID)\n}",
"func (c *CompanyClient) DeleteOne(co *Company) *CompanyDeleteOne {\n\treturn c.DeleteOneID(co.ID)\n}",
"func (c *CompanyClient) DeleteOne(co *Company) *CompanyDeleteOne {\n\treturn c.DeleteOneID(co.ID)\n}",
"func (c *DepositClient) DeleteOne(d *Deposit) *DepositDeleteOne {\n\treturn c.DeleteOneID(d.ID)\n}",
"func (c *OperativeClient) DeleteOne(o *Operative) *OperativeDeleteOne {\n\treturn c.DeleteOneID(o.ID)\n}",
"func (c *EventClient) DeleteOne(e *Event) *EventDeleteOne {\n\treturn c.DeleteOneID(e.ID)\n}",
"func (c *UnsavedPostClient) DeleteOne(up *UnsavedPost) *UnsavedPostDeleteOne {\n\treturn c.DeleteOneID(up.ID)\n}",
"func (c *BedtypeClient) DeleteOneID(id int) *BedtypeDeleteOne {\n\tbuilder := c.Delete().Where(bedtype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BedtypeDeleteOne{builder}\n}",
"func (c *MedicineClient) DeleteOne(m *Medicine) *MedicineDeleteOne {\n\treturn c.DeleteOneID(m.ID)\n}",
"func (c *OperativerecordClient) DeleteOneID(id int) *OperativerecordDeleteOne {\n\tbuilder := c.Delete().Where(operativerecord.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OperativerecordDeleteOne{builder}\n}",
"func (c *PatientofphysicianClient) DeleteOne(pa *Patientofphysician) *PatientofphysicianDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *PhysicianClient) DeleteOne(ph *Physician) *PhysicianDeleteOne {\n\treturn c.DeleteOneID(ph.ID)\n}",
"func (c *PhysicianClient) DeleteOne(ph *Physician) *PhysicianDeleteOne {\n\treturn c.DeleteOneID(ph.ID)\n}",
"func DeleteOne(ctx context.Context, tx pgx.Tx, sb sq.DeleteBuilder) error {\n\tq, vs, err := sb.ToSql()\n\tif err != nil {\n\t\treturn err\n\t}\n\ttag, err := tx.Exec(ctx, q, vs...)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif tag.RowsAffected() != 1 {\n\t\treturn ErrNoRowsAffected\n\t}\n\treturn nil\n}",
"func (c *TransactionClient) DeleteOne(t *Transaction) *TransactionDeleteOne {\n\treturn c.DeleteOneID(t.ID)\n}",
"func (c *LevelOfDangerousClient) DeleteOne(lod *LevelOfDangerous) *LevelOfDangerousDeleteOne {\n\treturn c.DeleteOneID(lod.ID)\n}",
"func (c *BillClient) DeleteOne(b *Bill) *BillDeleteOne {\n\treturn c.DeleteOneID(b.ID)\n}",
"func (c *BillClient) DeleteOne(b *Bill) *BillDeleteOne {\n\treturn c.DeleteOneID(b.ID)\n}",
"func (c *BillClient) DeleteOne(b *Bill) *BillDeleteOne {\n\treturn c.DeleteOneID(b.ID)\n}",
"func (c *PaymentClient) DeleteOne(pa *Payment) *PaymentDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *PaymentClient) DeleteOne(pa *Payment) *PaymentDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *CleanernameClient) DeleteOne(cl *Cleanername) *CleanernameDeleteOne {\n\treturn c.DeleteOneID(cl.ID)\n}",
"func (d *DBRepository) deleteOne(ctx context.Context, id string) error {\n\tobjectId, err := primitive.ObjectIDFromHex(id)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif _, err := d.Collection.DeleteOne(ctx, bson.M{\"_id\": objectId}); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func (c *MedicineTypeClient) DeleteOne(mt *MedicineType) *MedicineTypeDeleteOne {\n\treturn c.DeleteOneID(mt.ID)\n}",
"func (c *StatusdClient) DeleteOne(s *Statusd) *StatusdDeleteOne {\n\treturn c.DeleteOneID(s.ID)\n}",
"func (c *ToolClient) DeleteOne(t *Tool) *ToolDeleteOne {\n\treturn c.DeleteOneID(t.ID)\n}",
"func (c *ActivityTypeClient) DeleteOne(at *ActivityType) *ActivityTypeDeleteOne {\n\treturn c.DeleteOneID(at.ID)\n}",
"func (c *LevelOfDangerousClient) DeleteOneID(id int) *LevelOfDangerousDeleteOne {\n\tbuilder := c.Delete().Where(levelofdangerous.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &LevelOfDangerousDeleteOne{builder}\n}",
"func (c *OperationroomClient) DeleteOne(o *Operationroom) *OperationroomDeleteOne {\n\treturn c.DeleteOneID(o.ID)\n}",
"func (c *TagClient) DeleteOne(t *Tag) *TagDeleteOne {\n\treturn c.DeleteOneID(t.ID)\n}",
"func (c *DentistClient) DeleteOneID(id int) *DentistDeleteOne {\n\tbuilder := c.Delete().Where(dentist.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DentistDeleteOne{builder}\n}",
"func (c *OperativeClient) DeleteOneID(id int) *OperativeDeleteOne {\n\tbuilder := c.Delete().Where(operative.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OperativeDeleteOne{builder}\n}",
"func NewDeleteOneNoContent() *DeleteOneNoContent {\n\treturn &DeleteOneNoContent{}\n}",
"func (c *UnsavedPostClient) DeleteOneID(id int) *UnsavedPostDeleteOne {\n\tbuilder := c.Delete().Where(unsavedpost.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &UnsavedPostDeleteOne{builder}\n}",
"func (c *StaytypeClient) DeleteOne(s *Staytype) *StaytypeDeleteOne {\n\treturn c.DeleteOneID(s.ID)\n}",
"func (c *OrderClient) DeleteOneID(id int) *OrderDeleteOne {\n\tbuilder := c.Delete().Where(order.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OrderDeleteOne{builder}\n}",
"func (c *BuildingClient) DeleteOneID(id int) *BuildingDeleteOne {\n\tbuilder := c.Delete().Where(building.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BuildingDeleteOne{builder}\n}",
"func (c *PostClient) DeleteOneID(id int) *PostDeleteOne {\n\tbuilder := c.Delete().Where(post.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PostDeleteOne{builder}\n}",
"func (c *PatientroomClient) DeleteOne(pa *Patientroom) *PatientroomDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *EventClient) DeleteOneID(id int) *EventDeleteOne {\n\tbuilder := c.Delete().Where(event.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &EventDeleteOne{builder}\n}",
"func NewDeleteOneDefault(code int) *DeleteOneDefault {\n\treturn &DeleteOneDefault{\n\t\t_statusCode: code,\n\t}\n}",
"func (c *UnsavedPostAttachmentClient) DeleteOne(upa *UnsavedPostAttachment) *UnsavedPostAttachmentDeleteOne {\n\treturn c.DeleteOneID(upa.ID)\n}",
"func (c *UnitOfMedicineClient) DeleteOne(uom *UnitOfMedicine) *UnitOfMedicineDeleteOne {\n\treturn c.DeleteOneID(uom.ID)\n}",
"func (c *FoodmenuClient) DeleteOneID(id int) *FoodmenuDeleteOne {\n\tbuilder := c.Delete().Where(foodmenu.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &FoodmenuDeleteOne{builder}\n}",
"func (c *PostAttachmentClient) DeleteOne(pa *PostAttachment) *PostAttachmentDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *DeviceClient) DeleteOneID(id int) *DeviceDeleteOne {\n\tbuilder := c.Delete().Where(device.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DeviceDeleteOne{builder}\n}",
"func (c *ToolClient) DeleteOneID(id int) *ToolDeleteOne {\n\tbuilder := c.Delete().Where(tool.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ToolDeleteOne{builder}\n}",
"func (c *AppointmentClient) DeleteOne(a *Appointment) *AppointmentDeleteOne {\n\treturn c.DeleteOneID(a.ID)\n}",
"func (c *EmptyClient) DeleteOneID(id int) *EmptyDeleteOne {\n\tbuilder := c.Delete().Where(empty.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &EmptyDeleteOne{builder}\n}",
"func (c *PurposeClient) DeleteOne(pu *Purpose) *PurposeDeleteOne {\n\treturn c.DeleteOneID(pu.ID)\n}",
"func (c *AdminClient) DeleteOneID(id int) *AdminDeleteOne {\n\tbuilder := c.Delete().Where(admin.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &AdminDeleteOne{builder}\n}",
"func (c *CleaningroomClient) DeleteOneID(id int) *CleaningroomDeleteOne {\n\tbuilder := c.Delete().Where(cleaningroom.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &CleaningroomDeleteOne{builder}\n}",
"func (c *LengthtimeClient) DeleteOneID(id int) *LengthtimeDeleteOne {\n\tbuilder := c.Delete().Where(lengthtime.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &LengthtimeDeleteOne{builder}\n}",
"func (c *DepartmentClient) DeleteOne(d *Department) *DepartmentDeleteOne {\n\treturn c.DeleteOneID(d.ID)\n}",
"func (c *UnsavedPostAttachmentClient) DeleteOneID(id int) *UnsavedPostAttachmentDeleteOne {\n\tbuilder := c.Delete().Where(unsavedpostattachment.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &UnsavedPostAttachmentDeleteOne{builder}\n}",
"func (c *PhysicianClient) DeleteOneID(id int) *PhysicianDeleteOne {\n\tbuilder := c.Delete().Where(physician.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PhysicianDeleteOne{builder}\n}",
"func (c *PhysicianClient) DeleteOneID(id int) *PhysicianDeleteOne {\n\tbuilder := c.Delete().Where(physician.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PhysicianDeleteOne{builder}\n}",
"func (c *DoctorClient) DeleteOneID(id int) *DoctorDeleteOne {\n\tbuilder := c.Delete().Where(doctor.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DoctorDeleteOne{builder}\n}",
"func (c *MealplanClient) DeleteOne(m *Mealplan) *MealplanDeleteOne {\n\treturn c.DeleteOneID(m.ID)\n}",
"func (c *CleanernameClient) DeleteOneID(id int) *CleanernameDeleteOne {\n\tbuilder := c.Delete().Where(cleanername.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &CleanernameDeleteOne{builder}\n}",
"func (c *ComplaintClient) DeleteOne(co *Complaint) *ComplaintDeleteOne {\n\treturn c.DeleteOneID(co.ID)\n}",
"func (c *StatustClient) DeleteOneID(id int) *StatustDeleteOne {\n\tbuilder := c.Delete().Where(statust.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &StatustDeleteOne{builder}\n}",
"func (c *PartorderClient) DeleteOne(pa *Partorder) *PartorderDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *StaytypeClient) DeleteOneID(id int) *StaytypeDeleteOne {\n\tbuilder := c.Delete().Where(staytype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &StaytypeDeleteOne{builder}\n}",
"func (c *PatientofphysicianClient) DeleteOneID(id int) *PatientofphysicianDeleteOne {\n\tbuilder := c.Delete().Where(patientofphysician.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PatientofphysicianDeleteOne{builder}\n}",
"func (c *RoomdetailClient) DeleteOne(r *Roomdetail) *RoomdetailDeleteOne {\n\treturn c.DeleteOneID(r.ID)\n}",
"func (c *BranchClient) DeleteOne(b *Branch) *BranchDeleteOne {\n\treturn c.DeleteOneID(b.ID)\n}",
"func (c *UnitOfMedicineClient) DeleteOneID(id int) *UnitOfMedicineDeleteOne {\n\tbuilder := c.Delete().Where(unitofmedicine.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &UnitOfMedicineDeleteOne{builder}\n}",
"func (c *TitleClient) DeleteOne(t *Title) *TitleDeleteOne {\n\treturn c.DeleteOneID(t.ID)\n}",
"func (c *WorkExperienceClient) DeleteOne(we *WorkExperience) *WorkExperienceDeleteOne {\n\treturn c.DeleteOneID(we.ID)\n}",
"func (c *AnnotationClient) DeleteOne(a *Annotation) *AnnotationDeleteOne {\n\treturn c.DeleteOneID(a.ID)\n}",
"func (c *UnsavedPostImageClient) DeleteOne(upi *UnsavedPostImage) *UnsavedPostImageDeleteOne {\n\treturn c.DeleteOneID(upi.ID)\n}",
"func (c *DispenseMedicineClient) DeleteOneID(id int) *DispenseMedicineDeleteOne {\n\tbuilder := c.Delete().Where(dispensemedicine.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DispenseMedicineDeleteOne{builder}\n}",
"func (c *DepositClient) DeleteOneID(id int) *DepositDeleteOne {\n\tbuilder := c.Delete().Where(deposit.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DepositDeleteOne{builder}\n}",
"func (c *PharmacistClient) DeleteOneID(id int) *PharmacistDeleteOne {\n\tbuilder := c.Delete().Where(pharmacist.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PharmacistDeleteOne{builder}\n}",
"func (c *PositionassingmentClient) DeleteOne(po *Positionassingment) *PositionassingmentDeleteOne {\n\treturn c.DeleteOneID(po.ID)\n}",
"func (c *KeyStoreClient) DeleteOneID(id int32) *KeyStoreDeleteOne {\n\tbuilder := c.Delete().Where(keystore.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &KeyStoreDeleteOne{builder}\n}",
"func (c *PaymentClient) DeleteOneID(id int) *PaymentDeleteOne {\n\tbuilder := c.Delete().Where(payment.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PaymentDeleteOne{builder}\n}"
] |
[
"0.6756587",
"0.6709248",
"0.6703961",
"0.670318",
"0.66553116",
"0.66148186",
"0.6572149",
"0.6557555",
"0.6552272",
"0.65237635",
"0.65061617",
"0.6499291",
"0.6434074",
"0.6432293",
"0.64267963",
"0.64205337",
"0.6398103",
"0.6385286",
"0.6372697",
"0.63663584",
"0.63654643",
"0.63654643",
"0.63654643",
"0.6362657",
"0.63574296",
"0.63574296",
"0.6353369",
"0.6339299",
"0.6336179",
"0.63301015",
"0.6321808",
"0.63174367",
"0.6303661",
"0.62972194",
"0.62863207",
"0.62863207",
"0.6279139",
"0.6275199",
"0.6270237",
"0.6268455",
"0.6268455",
"0.6268455",
"0.6263539",
"0.6263539",
"0.626228",
"0.62493193",
"0.62488425",
"0.6247898",
"0.6235509",
"0.62336886",
"0.62264526",
"0.622629",
"0.6222045",
"0.6213431",
"0.62110764",
"0.6203543",
"0.61965996",
"0.61887383",
"0.618642",
"0.6182131",
"0.617503",
"0.6174455",
"0.61586386",
"0.6158026",
"0.6154386",
"0.6149794",
"0.6145806",
"0.61379576",
"0.6136323",
"0.61348855",
"0.61171746",
"0.6115592",
"0.611266",
"0.61089367",
"0.61029077",
"0.6100578",
"0.6095522",
"0.6094066",
"0.60936314",
"0.60936314",
"0.6091636",
"0.60897076",
"0.6088863",
"0.60813314",
"0.60789454",
"0.60780084",
"0.60720104",
"0.6066409",
"0.606525",
"0.60645807",
"0.60624427",
"0.6055795",
"0.60554683",
"0.60463685",
"0.6039845",
"0.6039164",
"0.6036367",
"0.6023885",
"0.6022439",
"0.6019607",
"0.60158646"
] |
0.0
|
-1
|
DeleteOneID returns a delete builder for the given id.
|
func (c *UnsavedPostThumbnailClient) DeleteOneID(id int) *UnsavedPostThumbnailDeleteOne {
builder := c.Delete().Where(unsavedpostthumbnail.ID(id))
builder.mutation.id = &id
builder.mutation.op = OpDeleteOne
return &UnsavedPostThumbnailDeleteOne{builder}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *BedtypeClient) DeleteOneID(id int) *BedtypeDeleteOne {\n\tbuilder := c.Delete().Where(bedtype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BedtypeDeleteOne{builder}\n}",
"func (c *BuildingClient) DeleteOneID(id int) *BuildingDeleteOne {\n\tbuilder := c.Delete().Where(building.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BuildingDeleteOne{builder}\n}",
"func (c *LengthtimeClient) DeleteOneID(id int) *LengthtimeDeleteOne {\n\tbuilder := c.Delete().Where(lengthtime.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &LengthtimeDeleteOne{builder}\n}",
"func (c *CleanernameClient) DeleteOneID(id int) *CleanernameDeleteOne {\n\tbuilder := c.Delete().Where(cleanername.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &CleanernameDeleteOne{builder}\n}",
"func (c *ToolClient) DeleteOneID(id int) *ToolDeleteOne {\n\tbuilder := c.Delete().Where(tool.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ToolDeleteOne{builder}\n}",
"func (c *OperativeClient) DeleteOneID(id int) *OperativeDeleteOne {\n\tbuilder := c.Delete().Where(operative.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OperativeDeleteOne{builder}\n}",
"func (c *FoodmenuClient) DeleteOneID(id int) *FoodmenuDeleteOne {\n\tbuilder := c.Delete().Where(foodmenu.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &FoodmenuDeleteOne{builder}\n}",
"func (c *CleaningroomClient) DeleteOneID(id int) *CleaningroomDeleteOne {\n\tbuilder := c.Delete().Where(cleaningroom.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &CleaningroomDeleteOne{builder}\n}",
"func (c *MealplanClient) DeleteOneID(id int) *MealplanDeleteOne {\n\tbuilder := c.Delete().Where(mealplan.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &MealplanDeleteOne{builder}\n}",
"func (c *DoctorClient) DeleteOneID(id int) *DoctorDeleteOne {\n\tbuilder := c.Delete().Where(doctor.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DoctorDeleteOne{builder}\n}",
"func (c *DentistClient) DeleteOneID(id int) *DentistDeleteOne {\n\tbuilder := c.Delete().Where(dentist.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DentistDeleteOne{builder}\n}",
"func (c *OperativerecordClient) DeleteOneID(id int) *OperativerecordDeleteOne {\n\tbuilder := c.Delete().Where(operativerecord.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OperativerecordDeleteOne{builder}\n}",
"func (c *LevelOfDangerousClient) DeleteOneID(id int) *LevelOfDangerousDeleteOne {\n\tbuilder := c.Delete().Where(levelofdangerous.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &LevelOfDangerousDeleteOne{builder}\n}",
"func (c *PhysicianClient) DeleteOneID(id int) *PhysicianDeleteOne {\n\tbuilder := c.Delete().Where(physician.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PhysicianDeleteOne{builder}\n}",
"func (c *PhysicianClient) DeleteOneID(id int) *PhysicianDeleteOne {\n\tbuilder := c.Delete().Where(physician.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PhysicianDeleteOne{builder}\n}",
"func (c *BillClient) DeleteOneID(id int) *BillDeleteOne {\n\tbuilder := c.Delete().Where(bill.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BillDeleteOne{builder}\n}",
"func (c *BillClient) DeleteOneID(id int) *BillDeleteOne {\n\tbuilder := c.Delete().Where(bill.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BillDeleteOne{builder}\n}",
"func (c *BillClient) DeleteOneID(id int) *BillDeleteOne {\n\tbuilder := c.Delete().Where(bill.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BillDeleteOne{builder}\n}",
"func (c *DeviceClient) DeleteOneID(id int) *DeviceDeleteOne {\n\tbuilder := c.Delete().Where(device.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DeviceDeleteOne{builder}\n}",
"func (c *UnitOfMedicineClient) DeleteOneID(id int) *UnitOfMedicineDeleteOne {\n\tbuilder := c.Delete().Where(unitofmedicine.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &UnitOfMedicineDeleteOne{builder}\n}",
"func (c *AdminClient) DeleteOneID(id int) *AdminDeleteOne {\n\tbuilder := c.Delete().Where(admin.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &AdminDeleteOne{builder}\n}",
"func (c *DrugAllergyClient) DeleteOneID(id int) *DrugAllergyDeleteOne {\n\tbuilder := c.Delete().Where(drugallergy.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DrugAllergyDeleteOne{builder}\n}",
"func (c *RoomuseClient) DeleteOneID(id int) *RoomuseDeleteOne {\n\tbuilder := c.Delete().Where(roomuse.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &RoomuseDeleteOne{builder}\n}",
"func (c *PatientofphysicianClient) DeleteOneID(id int) *PatientofphysicianDeleteOne {\n\tbuilder := c.Delete().Where(patientofphysician.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PatientofphysicianDeleteOne{builder}\n}",
"func (c *OrderClient) DeleteOneID(id int) *OrderDeleteOne {\n\tbuilder := c.Delete().Where(order.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OrderDeleteOne{builder}\n}",
"func (c *MedicineClient) DeleteOneID(id int) *MedicineDeleteOne {\n\tbuilder := c.Delete().Where(medicine.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &MedicineDeleteOne{builder}\n}",
"func (c *EmptyClient) DeleteOneID(id int) *EmptyDeleteOne {\n\tbuilder := c.Delete().Where(empty.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &EmptyDeleteOne{builder}\n}",
"func (c *MedicineTypeClient) DeleteOneID(id int) *MedicineTypeDeleteOne {\n\tbuilder := c.Delete().Where(medicinetype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &MedicineTypeDeleteOne{builder}\n}",
"func (c *BeerClient) DeleteOneID(id int) *BeerDeleteOne {\n\tbuilder := c.Delete().Where(beer.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BeerDeleteOne{builder}\n}",
"func (c *RoomdetailClient) DeleteOneID(id int) *RoomdetailDeleteOne {\n\tbuilder := c.Delete().Where(roomdetail.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &RoomdetailDeleteOne{builder}\n}",
"func (c *StatustClient) DeleteOneID(id int) *StatustDeleteOne {\n\tbuilder := c.Delete().Where(statust.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &StatustDeleteOne{builder}\n}",
"func (c *BookingClient) DeleteOneID(id int) *BookingDeleteOne {\n\tbuilder := c.Delete().Where(booking.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BookingDeleteOne{builder}\n}",
"func (c *BinaryFileClient) DeleteOneID(id int) *BinaryFileDeleteOne {\n\tbuilder := c.Delete().Where(binaryfile.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BinaryFileDeleteOne{builder}\n}",
"func (c *PharmacistClient) DeleteOneID(id int) *PharmacistDeleteOne {\n\tbuilder := c.Delete().Where(pharmacist.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PharmacistDeleteOne{builder}\n}",
"func (c *KeyStoreClient) DeleteOneID(id int32) *KeyStoreDeleteOne {\n\tbuilder := c.Delete().Where(keystore.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &KeyStoreDeleteOne{builder}\n}",
"func (c *LeaseClient) DeleteOneID(id int) *LeaseDeleteOne {\n\tbuilder := c.Delete().Where(lease.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &LeaseDeleteOne{builder}\n}",
"func (c *PaymentClient) DeleteOneID(id int) *PaymentDeleteOne {\n\tbuilder := c.Delete().Where(payment.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PaymentDeleteOne{builder}\n}",
"func (c *PaymentClient) DeleteOneID(id int) *PaymentDeleteOne {\n\tbuilder := c.Delete().Where(payment.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PaymentDeleteOne{builder}\n}",
"func (c *DispenseMedicineClient) DeleteOneID(id int) *DispenseMedicineDeleteOne {\n\tbuilder := c.Delete().Where(dispensemedicine.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DispenseMedicineDeleteOne{builder}\n}",
"func (c *DepositClient) DeleteOneID(id int) *DepositDeleteOne {\n\tbuilder := c.Delete().Where(deposit.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DepositDeleteOne{builder}\n}",
"func (c *StaytypeClient) DeleteOneID(id int) *StaytypeDeleteOne {\n\tbuilder := c.Delete().Where(staytype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &StaytypeDeleteOne{builder}\n}",
"func (c *OperationroomClient) DeleteOneID(id int) *OperationroomDeleteOne {\n\tbuilder := c.Delete().Where(operationroom.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OperationroomDeleteOne{builder}\n}",
"func (c *NurseClient) DeleteOneID(id int) *NurseDeleteOne {\n\tbuilder := c.Delete().Where(nurse.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &NurseDeleteOne{builder}\n}",
"func (c *QueueClient) DeleteOneID(id int) *QueueDeleteOne {\n\tbuilder := c.Delete().Where(queue.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &QueueDeleteOne{builder}\n}",
"func (c *OperationClient) DeleteOneID(id uuid.UUID) *OperationDeleteOne {\n\tbuilder := c.Delete().Where(operation.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OperationDeleteOne{builder}\n}",
"func (c *PostClient) DeleteOneID(id int) *PostDeleteOne {\n\tbuilder := c.Delete().Where(post.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PostDeleteOne{builder}\n}",
"func (c *ComplaintClient) DeleteOneID(id int) *ComplaintDeleteOne {\n\tbuilder := c.Delete().Where(complaint.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ComplaintDeleteOne{builder}\n}",
"func (c *PatientroomClient) DeleteOneID(id int) *PatientroomDeleteOne {\n\tbuilder := c.Delete().Where(patientroom.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PatientroomDeleteOne{builder}\n}",
"func (c *ModuleClient) DeleteOneID(id int) *ModuleDeleteOne {\n\treturn &ModuleDeleteOne{c.Delete().Where(module.ID(id))}\n}",
"func (c *ComplaintTypeClient) DeleteOneID(id int) *ComplaintTypeDeleteOne {\n\tbuilder := c.Delete().Where(complainttype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ComplaintTypeDeleteOne{builder}\n}",
"func (c *PurposeClient) DeleteOneID(id int) *PurposeDeleteOne {\n\tbuilder := c.Delete().Where(purpose.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PurposeDeleteOne{builder}\n}",
"func (c *AdminSessionClient) DeleteOneID(id int) *AdminSessionDeleteOne {\n\tbuilder := c.Delete().Where(adminsession.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &AdminSessionDeleteOne{builder}\n}",
"func (c *StatusdClient) DeleteOneID(id int) *StatusdDeleteOne {\n\tbuilder := c.Delete().Where(statusd.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &StatusdDeleteOne{builder}\n}",
"func (c *DNSBLQueryClient) DeleteOneID(id uuid.UUID) *DNSBLQueryDeleteOne {\n\tbuilder := c.Delete().Where(dnsblquery.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DNSBLQueryDeleteOne{builder}\n}",
"func (c *PetruleClient) DeleteOneID(id int) *PetruleDeleteOne {\n\tbuilder := c.Delete().Where(petrule.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PetruleDeleteOne{builder}\n}",
"func (c *EventClient) DeleteOneID(id int) *EventDeleteOne {\n\tbuilder := c.Delete().Where(event.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &EventDeleteOne{builder}\n}",
"func (c *ClubapplicationClient) DeleteOneID(id int) *ClubapplicationDeleteOne {\n\tbuilder := c.Delete().Where(clubapplication.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ClubapplicationDeleteOne{builder}\n}",
"func (c *DisciplineClient) DeleteOneID(id int) *DisciplineDeleteOne {\n\tbuilder := c.Delete().Where(discipline.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DisciplineDeleteOne{builder}\n}",
"func (c *RoomClient) DeleteOneID(id int) *RoomDeleteOne {\n\tbuilder := c.Delete().Where(room.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &RoomDeleteOne{builder}\n}",
"func (c *RoomClient) DeleteOneID(id int) *RoomDeleteOne {\n\tbuilder := c.Delete().Where(room.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &RoomDeleteOne{builder}\n}",
"func (c *PledgeClient) DeleteOneID(id int) *PledgeDeleteOne {\n\tbuilder := c.Delete().Where(pledge.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PledgeDeleteOne{builder}\n}",
"func (c *CardClient) DeleteOneID(id int) *CardDeleteOne {\n\tbuilder := c.Delete().Where(card.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &CardDeleteOne{builder}\n}",
"func (c *BillingstatusClient) DeleteOneID(id int) *BillingstatusDeleteOne {\n\tbuilder := c.Delete().Where(billingstatus.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BillingstatusDeleteOne{builder}\n}",
"func (c *SymptomClient) DeleteOneID(id int) *SymptomDeleteOne {\n\tbuilder := c.Delete().Where(symptom.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &SymptomDeleteOne{builder}\n}",
"func (c *PatientClient) DeleteOneID(id int) *PatientDeleteOne {\n\tbuilder := c.Delete().Where(patient.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PatientDeleteOne{builder}\n}",
"func (c *PatientClient) DeleteOneID(id int) *PatientDeleteOne {\n\tbuilder := c.Delete().Where(patient.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PatientDeleteOne{builder}\n}",
"func (c *PatientClient) DeleteOneID(id int) *PatientDeleteOne {\n\tbuilder := c.Delete().Where(patient.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PatientDeleteOne{builder}\n}",
"func (c *TasteClient) DeleteOneID(id int) *TasteDeleteOne {\n\tbuilder := c.Delete().Where(taste.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &TasteDeleteOne{builder}\n}",
"func (c *UnsavedPostClient) DeleteOneID(id int) *UnsavedPostDeleteOne {\n\tbuilder := c.Delete().Where(unsavedpost.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &UnsavedPostDeleteOne{builder}\n}",
"func (c *JobClient) DeleteOneID(id int) *JobDeleteOne {\n\tbuilder := c.Delete().Where(job.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &JobDeleteOne{builder}\n}",
"func (c *ExaminationroomClient) DeleteOneID(id int) *ExaminationroomDeleteOne {\n\tbuilder := c.Delete().Where(examinationroom.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ExaminationroomDeleteOne{builder}\n}",
"func (c *PlanetClient) DeleteOneID(id int) *PlanetDeleteOne {\n\tbuilder := c.Delete().Where(planet.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PlanetDeleteOne{builder}\n}",
"func (c *PrescriptionClient) DeleteOneID(id int) *PrescriptionDeleteOne {\n\tbuilder := c.Delete().Where(prescription.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PrescriptionDeleteOne{builder}\n}",
"func (c *TransactionClient) DeleteOneID(id int32) *TransactionDeleteOne {\n\tbuilder := c.Delete().Where(transaction.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &TransactionDeleteOne{builder}\n}",
"func (c *SessionClient) DeleteOneID(id int) *SessionDeleteOne {\n\tbuilder := c.Delete().Where(session.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &SessionDeleteOne{builder}\n}",
"func (c *TitleClient) DeleteOneID(id int) *TitleDeleteOne {\n\tbuilder := c.Delete().Where(title.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &TitleDeleteOne{builder}\n}",
"func (c *PatientInfoClient) DeleteOneID(id int) *PatientInfoDeleteOne {\n\tbuilder := c.Delete().Where(patientinfo.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PatientInfoDeleteOne{builder}\n}",
"func (c *EatinghistoryClient) DeleteOneID(id int) *EatinghistoryDeleteOne {\n\tbuilder := c.Delete().Where(eatinghistory.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &EatinghistoryDeleteOne{builder}\n}",
"func (c *FacultyClient) DeleteOneID(id int) *FacultyDeleteOne {\n\tbuilder := c.Delete().Where(faculty.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &FacultyDeleteOne{builder}\n}",
"func (c *WifiClient) DeleteOneID(id int) *WifiDeleteOne {\n\tbuilder := c.Delete().Where(wifi.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &WifiDeleteOne{builder}\n}",
"func (c *WalletNodeClient) DeleteOneID(id int32) *WalletNodeDeleteOne {\n\tbuilder := c.Delete().Where(walletnode.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &WalletNodeDeleteOne{builder}\n}",
"func (c *ClubTypeClient) DeleteOneID(id int) *ClubTypeDeleteOne {\n\tbuilder := c.Delete().Where(clubtype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ClubTypeDeleteOne{builder}\n}",
"func (c *AppointmentClient) DeleteOneID(id uuid.UUID) *AppointmentDeleteOne {\n\tbuilder := c.Delete().Where(appointment.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &AppointmentDeleteOne{builder}\n}",
"func (c *PartorderClient) DeleteOneID(id int) *PartorderDeleteOne {\n\tbuilder := c.Delete().Where(partorder.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PartorderDeleteOne{builder}\n}",
"func (c *ClubClient) DeleteOneID(id int) *ClubDeleteOne {\n\tbuilder := c.Delete().Where(club.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ClubDeleteOne{builder}\n}",
"func (c *CoinInfoClient) DeleteOneID(id int32) *CoinInfoDeleteOne {\n\tbuilder := c.Delete().Where(coininfo.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &CoinInfoDeleteOne{builder}\n}",
"func (c *ClinicClient) DeleteOneID(id uuid.UUID) *ClinicDeleteOne {\n\tbuilder := c.Delete().Where(clinic.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ClinicDeleteOne{builder}\n}",
"func (c *TimerClient) DeleteOneID(id int) *TimerDeleteOne {\n\tbuilder := c.Delete().Where(timer.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &TimerDeleteOne{builder}\n}",
"func (c *ClubappStatusClient) DeleteOneID(id int) *ClubappStatusDeleteOne {\n\tbuilder := c.Delete().Where(clubappstatus.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ClubappStatusDeleteOne{builder}\n}",
"func (c *ActivityTypeClient) DeleteOneID(id int) *ActivityTypeDeleteOne {\n\tbuilder := c.Delete().Where(activitytype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ActivityTypeDeleteOne{builder}\n}",
"func (c *ModuleVersionClient) DeleteOneID(id int) *ModuleVersionDeleteOne {\n\treturn &ModuleVersionDeleteOne{c.Delete().Where(moduleversion.ID(id))}\n}",
"func (c *UsertypeClient) DeleteOneID(id int) *UsertypeDeleteOne {\n\tbuilder := c.Delete().Where(usertype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &UsertypeDeleteOne{builder}\n}",
"func (c *ActivitiesClient) DeleteOneID(id int) *ActivitiesDeleteOne {\n\tbuilder := c.Delete().Where(activities.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ActivitiesDeleteOne{builder}\n}",
"func (c *SituationClient) DeleteOneID(id int) *SituationDeleteOne {\n\tbuilder := c.Delete().Where(situation.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &SituationDeleteOne{builder}\n}",
"func (c *SkillClient) DeleteOneID(id int) *SkillDeleteOne {\n\tbuilder := c.Delete().Where(skill.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &SkillDeleteOne{builder}\n}",
"func (c *RentalstatusClient) DeleteOneID(id int) *RentalstatusDeleteOne {\n\tbuilder := c.Delete().Where(rentalstatus.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &RentalstatusDeleteOne{builder}\n}",
"func (c *BranchClient) DeleteOneID(id int) *BranchDeleteOne {\n\tbuilder := c.Delete().Where(branch.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BranchDeleteOne{builder}\n}",
"func (c *YearClient) DeleteOneID(id int) *YearDeleteOne {\n\tbuilder := c.Delete().Where(year.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &YearDeleteOne{builder}\n}",
"func (c *PartClient) DeleteOneID(id int) *PartDeleteOne {\n\tbuilder := c.Delete().Where(part.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PartDeleteOne{builder}\n}",
"func (c *TagClient) DeleteOneID(id int) *TagDeleteOne {\n\tbuilder := c.Delete().Where(tag.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &TagDeleteOne{builder}\n}",
"func (c *RepairinvoiceClient) DeleteOneID(id int) *RepairinvoiceDeleteOne {\n\tbuilder := c.Delete().Where(repairinvoice.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &RepairinvoiceDeleteOne{builder}\n}"
] |
[
"0.7676177",
"0.75953794",
"0.7549581",
"0.7539669",
"0.7537973",
"0.75247616",
"0.7486726",
"0.74862844",
"0.7475475",
"0.74753106",
"0.7461437",
"0.7459253",
"0.74565506",
"0.744945",
"0.744945",
"0.74411064",
"0.74411064",
"0.74411064",
"0.743172",
"0.7424158",
"0.74213266",
"0.74180794",
"0.74169",
"0.7397823",
"0.73948765",
"0.7384152",
"0.7382438",
"0.73738533",
"0.7356174",
"0.7355404",
"0.7349018",
"0.7345617",
"0.7345408",
"0.73438436",
"0.73416454",
"0.7339818",
"0.73384744",
"0.73384744",
"0.7331187",
"0.73284036",
"0.73275805",
"0.73241955",
"0.73216206",
"0.73119116",
"0.730584",
"0.73022926",
"0.72878665",
"0.7280826",
"0.7278857",
"0.72780514",
"0.72779465",
"0.72764724",
"0.72759223",
"0.72758466",
"0.72746974",
"0.7268097",
"0.72620285",
"0.7249178",
"0.723665",
"0.723665",
"0.72364014",
"0.7235776",
"0.7232357",
"0.7227627",
"0.7226937",
"0.7226937",
"0.7226937",
"0.7223222",
"0.7220899",
"0.7219248",
"0.7213633",
"0.7204269",
"0.72021705",
"0.7201779",
"0.7193315",
"0.7191665",
"0.71889573",
"0.71883595",
"0.71640146",
"0.7163925",
"0.7159524",
"0.7159105",
"0.71587974",
"0.71542454",
"0.7145873",
"0.71432394",
"0.7141894",
"0.71367717",
"0.7129985",
"0.7125336",
"0.712415",
"0.7121637",
"0.71212494",
"0.71080333",
"0.7107245",
"0.71059024",
"0.7103716",
"0.71031797",
"0.7100011",
"0.7093685",
"0.70898175"
] |
0.0
|
-1
|
Query returns a query builder for UnsavedPostThumbnail.
|
func (c *UnsavedPostThumbnailClient) Query() *UnsavedPostThumbnailQuery {
return &UnsavedPostThumbnailQuery{
config: c.config,
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (upq *UnsavedPostQuery) QueryThumbnail() *UnsavedPostThumbnailQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, unsavedpost.ThumbnailTable, unsavedpost.ThumbnailColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostClient) QueryThumbnail(up *UnsavedPost) *UnsavedPostThumbnailQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, unsavedpost.ThumbnailTable, unsavedpost.ThumbnailColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostThumbnailClient) QueryUnsavedPost(upt *UnsavedPostThumbnail) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upt.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, true, unsavedpostthumbnail.UnsavedPostTable, unsavedpostthumbnail.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upt.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostImageClient) Query() *UnsavedPostImageQuery {\n\treturn &UnsavedPostImageQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *UnsavedPostAttachmentClient) Query() *UnsavedPostAttachmentQuery {\n\treturn &UnsavedPostAttachmentQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *UnsavedPostImageClient) QueryUnsavedPost(upi *UnsavedPostImage) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upi.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostimage.Table, unsavedpostimage.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostimage.UnsavedPostTable, unsavedpostimage.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upi.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostAttachmentClient) QueryUnsavedPost(upa *UnsavedPostAttachment) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upa.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostattachment.Table, unsavedpostattachment.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostattachment.UnsavedPostTable, unsavedpostattachment.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upa.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) WithThumbnail(opts ...func(*UnsavedPostThumbnailQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withThumbnail = query\n\treturn upq\n}",
"func (c *PostClient) QueryThumbnail(po *Post) *PostThumbnailQuery {\n\tquery := &PostThumbnailQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := po.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(post.Table, post.FieldID, id),\n\t\t\tsqlgraph.To(postthumbnail.Table, postthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, post.ThumbnailTable, post.ThumbnailColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(po.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *AdminClient) QueryUnsavedPosts(a *Admin) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := a.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(admin.Table, admin.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, admin.UnsavedPostsTable, admin.UnsavedPostsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(a.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostThumbnailClient) Get(ctx context.Context, id int) (*UnsavedPostThumbnail, error) {\n\treturn c.Query().Where(unsavedpostthumbnail.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostVideoClient) QueryUnsavedPost(upv *UnsavedPostVideo) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upv.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostvideo.Table, unsavedpostvideo.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostvideo.UnsavedPostTable, unsavedpostvideo.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upv.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostClient) Query() *UnsavedPostQuery {\n\treturn &UnsavedPostQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (upq *UnsavedPostQuery) QueryImages() *UnsavedPostImageQuery {\n\tquery := &UnsavedPostImageQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostimage.Table, unsavedpostimage.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.ImagesTable, unsavedpost.ImagesColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (c *PostThumbnailClient) Query() *PostThumbnailQuery {\n\treturn &PostThumbnailQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *UnsavedPostClient) QueryImages(up *UnsavedPost) *UnsavedPostImageQuery {\n\tquery := &UnsavedPostImageQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostimage.Table, unsavedpostimage.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.ImagesTable, unsavedpost.ImagesColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upu *UnsavedPostUpdate) ClearThumbnail() *UnsavedPostUpdate {\n\tupu.mutation.ClearThumbnail()\n\treturn upu\n}",
"func (c *CategoryClient) QueryUnsavedPosts(ca *Category) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := ca.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(category.Table, category.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, category.UnsavedPostsTable, category.UnsavedPostsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(ca.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) Clone() *UnsavedPostQuery {\n\tif upq == nil {\n\t\treturn nil\n\t}\n\treturn &UnsavedPostQuery{\n\t\tconfig: upq.config,\n\t\tlimit: upq.limit,\n\t\toffset: upq.offset,\n\t\torder: append([]OrderFunc{}, upq.order...),\n\t\tpredicates: append([]predicate.UnsavedPost{}, upq.predicates...),\n\t\twithAuthor: upq.withAuthor.Clone(),\n\t\twithCategory: upq.withCategory.Clone(),\n\t\twithThumbnail: upq.withThumbnail.Clone(),\n\t\twithImages: upq.withImages.Clone(),\n\t\twithVideos: upq.withVideos.Clone(),\n\t\twithAttachments: upq.withAttachments.Clone(),\n\t\t// clone intermediate query.\n\t\tsql: upq.sql.Clone(),\n\t\tpath: upq.path,\n\t}\n}",
"func (c *Category) QueryUnsavedPosts() *UnsavedPostQuery {\n\treturn (&CategoryClient{config: c.config}).QueryUnsavedPosts(c)\n}",
"func (upq *UnsavedPostQuery) QueryAttachments() *UnsavedPostAttachmentQuery {\n\tquery := &UnsavedPostAttachmentQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostattachment.Table, unsavedpostattachment.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.AttachmentsTable, unsavedpost.AttachmentsColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostClient) QueryAttachments(up *UnsavedPost) *UnsavedPostAttachmentQuery {\n\tquery := &UnsavedPostAttachmentQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostattachment.Table, unsavedpostattachment.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.AttachmentsTable, unsavedpost.AttachmentsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upuo *UnsavedPostUpdateOne) ClearThumbnail() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearThumbnail()\n\treturn upuo\n}",
"func (c *PostThumbnailClient) QueryPost(pt *PostThumbnail) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pt.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postthumbnail.Table, postthumbnail.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, true, postthumbnail.PostTable, postthumbnail.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pt.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostImageClient) Get(ctx context.Context, id int) (*UnsavedPostImage, error) {\n\treturn c.Query().Where(unsavedpostimage.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostVideoClient) Query() *UnsavedPostVideoQuery {\n\treturn &UnsavedPostVideoQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *PostAttachmentClient) Query() *PostAttachmentQuery {\n\treturn &PostAttachmentQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (upq *UnsavedPostQuery) WithImages(opts ...func(*UnsavedPostImageQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostImageQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withImages = query\n\treturn upq\n}",
"func (c *PostImageClient) Query() *PostImageQuery {\n\treturn &PostImageQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (upq *UnsavedPostQuery) Where(ps ...predicate.UnsavedPost) *UnsavedPostQuery {\n\tupq.predicates = append(upq.predicates, ps...)\n\treturn upq\n}",
"func (upq *UnsavedPostQuery) All(ctx context.Context) ([]*UnsavedPost, error) {\n\tif err := upq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn upq.sqlAll(ctx)\n}",
"func (c *PostImageClient) QueryPost(pi *PostImage) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pi.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postimage.Table, postimage.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, postimage.PostTable, postimage.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pi.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func NewUnsavedPostThumbnailClient(c config) *UnsavedPostThumbnailClient {\n\treturn &UnsavedPostThumbnailClient{config: c}\n}",
"func (c *PostClient) QueryImages(po *Post) *PostImageQuery {\n\tquery := &PostImageQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := po.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(post.Table, post.FieldID, id),\n\t\t\tsqlgraph.To(postimage.Table, postimage.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, post.ImagesTable, post.ImagesColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(po.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) WithAttachments(opts ...func(*UnsavedPostAttachmentQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostAttachmentQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withAttachments = query\n\treturn upq\n}",
"func (c *UnsavedPostThumbnailClient) Delete() *UnsavedPostThumbnailDelete {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpDelete)\n\treturn &UnsavedPostThumbnailDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostAttachmentClient) QueryPost(pa *PostAttachment) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pa.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postattachment.Table, postattachment.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, postattachment.PostTable, postattachment.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pa.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upu *UnsavedPostUpdate) ClearImages() *UnsavedPostUpdate {\n\tupu.mutation.ClearImages()\n\treturn upu\n}",
"func (c *PostThumbnailClient) Get(ctx context.Context, id int) (*PostThumbnail, error) {\n\treturn c.Query().Where(postthumbnail.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostAttachmentClient) Get(ctx context.Context, id int) (*UnsavedPostAttachment, error) {\n\treturn c.Query().Where(unsavedpostattachment.ID(id)).Only(ctx)\n}",
"func (c *PostClient) QueryAttachments(po *Post) *PostAttachmentQuery {\n\tquery := &PostAttachmentQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := po.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(post.Table, post.FieldID, id),\n\t\t\tsqlgraph.To(postattachment.Table, postattachment.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, post.AttachmentsTable, post.AttachmentsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(po.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostClient) Get(ctx context.Context, id int) (*UnsavedPost, error) {\n\treturn c.Query().Where(unsavedpost.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostThumbnailClient) Update() *UnsavedPostThumbnailUpdate {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpUpdate)\n\treturn &UnsavedPostThumbnailUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (pid *PostImageDelete) Where(ps ...predicate.PostImage) *PostImageDelete {\n\tpid.mutation.predicates = append(pid.mutation.predicates, ps...)\n\treturn pid\n}",
"func (upuo *UnsavedPostUpdateOne) ClearImages() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearImages()\n\treturn upuo\n}",
"func (query *Query) CleanQuery() *Query {\n\tquery.content = make(map[string]interface{})\n\treturn query\n}",
"func (upu *UnsavedPostUpdate) Where(ps ...predicate.UnsavedPost) *UnsavedPostUpdate {\n\tupu.mutation.predicates = append(upu.mutation.predicates, ps...)\n\treturn upu\n}",
"func (c *PostVideoClient) QueryPost(pv *PostVideo) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pv.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postvideo.Table, postvideo.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, postvideo.PostTable, postvideo.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pv.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) Limit(limit int) *UnsavedPostQuery {\n\tupq.limit = &limit\n\treturn upq\n}",
"func (svc *ServiceContext) GetThumbs(c *gin.Context) {\n\tpageStr := c.Query(\"page\")\n\tconst pageSize = 50\n\tpage := 1\n\tif pageStr != \"\" {\n\t\tpageInt, err := strconv.Atoi(pageStr)\n\t\tif err == nil {\n\t\t\tpage = pageInt\n\t\t}\n\t}\n\tstart := (page - 1) * pageSize\n\n\ttype Thumb struct {\n\t\tSubmissionID int `json:\"submissionID\"`\n\t\tURL string `json:\"url\"`\n\t}\n\ttype RecentThumbs struct {\n\t\tTotal int `json:\"total\"`\n\t\tPage int `json:\"page\"`\n\t\tPageSize int `json:\"pageSize\"`\n\t\tThumbs []Thumb `json:\"thumbs\"`\n\t}\n\n\tout := RecentThumbs{Total: 0, Page: page, PageSize: pageSize}\n\n\tlog.Printf(\"INFO: get total submissions\")\n\ttq := svc.DB.NewQuery(\"select count(*) as total from submissions where public=1\")\n\ttq.One(&out)\n\n\tqs := fmt.Sprintf(`select s.id as sub_id,upload_id,submitted_at,filename from submissions s\n\t\t\tinner join submission_files f on f.submission_id = s.id where public = 1\n\t\t\tgroup by s.id order by s.id desc limit %d,%d`, start, pageSize)\n\tq := svc.DB.NewQuery(qs)\n\trows, err := q.Rows()\n\tif err != nil {\n\t\tlog.Printf(\"ERROR: Unable to get recent submissions %s\", err.Error())\n\t\tc.String(http.StatusInternalServerError, \"Unable to retrieve recent submissions\")\n\t\treturn\n\t}\n\tfor rows.Next() {\n\t\tvar fi struct {\n\t\t\tSubID int `db:\"sub_id\"`\n\t\t\tUploadID string `db:\"upload_id\"`\n\t\t\tFilename string `db:\"filename\"`\n\t\t\tSubmitted string `db:\"submitted_at\"`\n\t\t}\n\t\trows.ScanStruct(&fi)\n\t\turl := fmt.Sprintf(\"/uploads/%s\", getThumbFilename(fi.Filename))\n\t\tout.Thumbs = append(out.Thumbs, Thumb{SubmissionID: fi.SubID, URL: url})\n\t}\n\n\tc.JSON(http.StatusOK, out)\n}",
"func (c *StickersCreateStickerSetRequest) GetThumbAsNotEmpty() (*InputDocument, bool) {\n\tif value, ok := c.GetThumb(); ok {\n\t\treturn value.AsNotEmpty()\n\t}\n\treturn nil, false\n}",
"func (c *UnsavedPostThumbnailClient) Create() *UnsavedPostThumbnailCreate {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpCreate)\n\treturn &UnsavedPostThumbnailCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func GetRecentPostMediaNoLogin(username string) (medias []IGMedia, err error) {\n\tui, err := GetUserInfoNoLogin(username)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tfor _, node := range ui.EdgeOwnerToTimelineMedia.Edges {\n\t\tmedias = append(medias, node.Node)\n\t}\n\treturn\n}",
"func (p *_Posts) Query(db database.DB, models ...*Post) *postsQueryBuilder {\n\tvar queryModels []mapping.Model\n\tif len(models) > 0 {\n\t\tqueryModels = make([]mapping.Model, len(models))\n\t\tfor i, model := range models {\n\t\t\tqueryModels[i] = model\n\t\t}\n\t}\n\tbuilder := db.Query(p.Model, queryModels...)\n\treturn &postsQueryBuilder{builder: builder}\n}",
"func (t BlobsTable) Query() *BlobQuery {\n\treturn &BlobQuery{driver: t.driver}\n}",
"func (upu *UnsavedPostUpdate) ClearAttachments() *UnsavedPostUpdate {\n\tupu.mutation.ClearAttachments()\n\treturn upu\n}",
"func (c *AdminClient) QueryPosts(a *Admin) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := a.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(admin.Table, admin.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, admin.PostsTable, admin.PostsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(a.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) QueryAuthor() *AdminQuery {\n\tquery := &AdminQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(admin.Table, admin.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpost.AuthorTable, unsavedpost.AuthorColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (t *Transaction) QueryImages() *BinaryItemQuery {\n\treturn (&TransactionClient{config: t.config}).QueryImages(t)\n}",
"func (m *ItemItemsDriveItemItemRequestBuilder) Thumbnails()(*ItemItemsItemThumbnailsRequestBuilder) {\n return NewItemItemsItemThumbnailsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter)\n}",
"func (upq *UnsavedPostQuery) QueryVideos() *UnsavedPostVideoQuery {\n\tquery := &UnsavedPostVideoQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostvideo.Table, unsavedpostvideo.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.VideosTable, unsavedpost.VideosColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (wq *WidgetQuery) Clone() *WidgetQuery {\n\tif wq == nil {\n\t\treturn nil\n\t}\n\treturn &WidgetQuery{\n\t\tconfig: wq.config,\n\t\tlimit: wq.limit,\n\t\toffset: wq.offset,\n\t\torder: append([]OrderFunc{}, wq.order...),\n\t\tpredicates: append([]predicate.Widget{}, wq.predicates...),\n\t\twithType: wq.withType.Clone(),\n\t\t// clone intermediate query.\n\t\tsql: wq.sql.Clone(),\n\t\tpath: wq.path,\n\t}\n}",
"func (c *PostClient) Query() *PostQuery {\n\treturn &PostQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func WhereDraft(q *query.Query) *query.Query {\n\treturn q.Where(\"status = ?\", Draft)\n}",
"func (upu *UnsavedPostUpdate) ClearSlug() *UnsavedPostUpdate {\n\tupu.mutation.ClearSlug()\n\treturn upu\n}",
"func (c *PostImageClient) Get(ctx context.Context, id int) (*PostImage, error) {\n\treturn c.Query().Where(postimage.ID(id)).Only(ctx)\n}",
"func NewQueryForSubmission() *datastore.Query {\n\treturn datastore.NewQuery(\"Submission\")\n}",
"func (builder *QueryBuilder[K, F]) Query() Query[K, F] {\n\tif len(builder.query.Conditions) == 0 {\n\t\tbuilder.Where(defaultFilter[K, F]{})\n\t}\n\tif len(builder.query.Aggregators) == 0 {\n\t\tbuilder.Aggregate(defaultAggregator[K, F]{})\n\t}\n\tbuilder.query.results = &Result[K, F]{\n\t\tentries: make(map[ResultKey]*ResultEntry[K, F]),\n\t}\n\treturn builder.query\n}",
"func (r *PostReprGQL) IMG(ctx context.Context) *ImageReprGQL {\n\treturn &ImageReprGQL{}\n}",
"func (m *IGApiManager) GetRecentPostMedia(username string) (medias []IGMedia, err error) {\n\tui, err := m.GetUserInfo(username)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tfor _, node := range ui.EdgeOwnerToTimelineMedia.Edges {\n\t\tmedias = append(medias, node.Node)\n\t}\n\treturn\n}",
"func NewUnsavedPostImageClient(c config) *UnsavedPostImageClient {\n\treturn &UnsavedPostImageClient{config: c}\n}",
"func (c *UnsavedPostClient) QueryAuthor(up *UnsavedPost) *AdminQuery {\n\tquery := &AdminQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(admin.Table, admin.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpost.AuthorTable, unsavedpost.AuthorColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostThumbnailClient) GetX(ctx context.Context, id int) *UnsavedPostThumbnail {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (upq *UnsavedPostQuery) QueryCategory() *CategoryQuery {\n\tquery := &CategoryQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(category.Table, category.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpost.CategoryTable, unsavedpost.CategoryColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (upuo *UnsavedPostUpdateOne) ClearAttachments() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearAttachments()\n\treturn upuo\n}",
"func (mq *MediaQuery) Clone() *MediaQuery {\n\tif mq == nil {\n\t\treturn nil\n\t}\n\treturn &MediaQuery{\n\t\tconfig: mq.config,\n\t\tctx: mq.ctx.Clone(),\n\t\torder: append([]OrderFunc{}, mq.order...),\n\t\tinters: append([]Interceptor{}, mq.inters...),\n\t\tpredicates: append([]predicate.Media{}, mq.predicates...),\n\t\t// clone intermediate query.\n\t\tsql: mq.sql.Clone(),\n\t\tpath: mq.path,\n\t}\n}",
"func (c *UnsavedPostClient) QueryCategory(up *UnsavedPost) *CategoryQuery {\n\tquery := &CategoryQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(category.Table, category.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpost.CategoryTable, unsavedpost.CategoryColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func NewDropQuery() filters.Spec { return &modQuery{behavior: drop} }",
"func (bm *BingManager) queryNewImageUrl(query string) (string, error) {\n var Query *url.URL\n Query, err := url.Parse(\"https://api.datamarket.azure.com/Bing/Search/Image\")\n if err != nil {\n\t\treturn \"\", err\n }\n parameters := url.Values{}\n parameters.Add(\"ImageFilters\", \"'Aspect:Square'\")\n parameters.Add(\"$format\", \"json\")\n parameters.Add(\"Adult\", \"'Moderate'\")\n parameters.Add(\"$top\", \"1\")\n parameters.Add(\"Query\", fmt.Sprintf(\"'%s'\", query))\n \n Query.RawQuery = parameters.Encode()\n\n\n\treq, err := http.NewRequest(\"GET\", Query.String(), nil)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treq.SetBasicAuth(bm.AccountKey, bm.AccountKey)\n\n\tresp, err := bm.HTTPClient.Do(req)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tbody, err := ioutil.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n \n\tvar m struct {\n\t\tD struct {\n\t\t\tResults []struct {\n\t\t\t\tMediaUrl string `json:\"MediaUrl\"`\n Thumbnail struct {\n Url string `json:\"MediaUrl\"`\n } `json:\"Thumbnail\"`\n\t\t\t} `json:\"results\"`\n\t\t} `json:\"d\"`\n\t}\n\n\terr = json.Unmarshal(body, &m)\n\tif err != nil {\n\t\tfmt.Println(err)\n\t\treturn \"\", err\n\t}\n\treturn m.D.Results[0].Thumbnail.Url, err\n}",
"func (c *PostThumbnailClient) Delete() *PostThumbnailDelete {\n\tmutation := newPostThumbnailMutation(c.config, OpDelete)\n\treturn &PostThumbnailDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (b *_Blogs) Query(db database.DB, models ...*Blog) *blogsQueryBuilder {\n\tvar queryModels []mapping.Model\n\tif len(models) > 0 {\n\t\tqueryModels = make([]mapping.Model, len(models))\n\t\tfor i, model := range models {\n\t\t\tqueryModels[i] = model\n\t\t}\n\t}\n\tbuilder := db.Query(b.Model, queryModels...)\n\treturn &blogsQueryBuilder{builder: builder}\n}",
"func (g *BaseGenerator) GenerateEmptyQuery() query.Query {\n\treturn query.NewMysqlRequest()\n}",
"func WherePublished(q *query.Query) *query.Query {\n\treturn q.Where(\"status >= ?\", Published)\n}",
"func (q pictureQuery) DeleteAll() error {\n\tif q.Query == nil {\n\t\treturn errors.New(\"models: no pictureQuery provided for delete all\")\n\t}\n\n\tqueries.SetDelete(q.Query)\n\n\t_, err := q.Query.Exec()\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"models: unable to delete all from pictures\")\n\t}\n\n\treturn nil\n}",
"func (c *PostVideoClient) Query() *PostVideoQuery {\n\treturn &PostVideoQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *MediaClient) Query() *MediaQuery {\n\treturn &MediaQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *UnsavedPostClient) QueryVideos(up *UnsavedPost) *UnsavedPostVideoQuery {\n\tquery := &UnsavedPostVideoQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostvideo.Table, unsavedpostvideo.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.VideosTable, unsavedpost.VideosColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (p AttachmentParameters) ToQuery() string {\n\treturn paramsToQuery(p)\n}",
"func (c *UnsavedPostVideoClient) Get(ctx context.Context, id int) (*UnsavedPostVideo, error) {\n\treturn c.Query().Where(unsavedpostvideo.ID(id)).Only(ctx)\n}",
"func NewSearchLogQueryUnprocessableEntity() *SearchLogQueryUnprocessableEntity {\n\treturn &SearchLogQueryUnprocessableEntity{}\n}",
"func (c *UnsavedPostImageClient) Delete() *UnsavedPostImageDelete {\n\tmutation := newUnsavedPostImageMutation(c.config, OpDelete)\n\treturn &UnsavedPostImageDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (i InputInlineQueryResultPhoto) construct() InputInlineQueryResultClass { return &i }",
"func (s *Seeder) RawQuery() string {\n\tpanic(\"Please override RawQuery() method\")\n}",
"func (fq *ForumQuery) Clone() *ForumQuery {\n\treturn &ForumQuery{\n\t\tconfig: fq.config,\n\t\tlimit: fq.limit,\n\t\toffset: fq.offset,\n\t\torder: append([]OrderFunc{}, fq.order...),\n\t\tunique: append([]string{}, fq.unique...),\n\t\tpredicates: append([]predicate.Forum{}, fq.predicates...),\n\t\t// clone intermediate query.\n\t\tsql: fq.sql.Clone(),\n\t\tpath: fq.path,\n\t}\n}",
"func Pictures(exec boil.Executor, mods ...qm.QueryMod) pictureQuery {\n\tmods = append(mods, qm.From(\"`pictures`\"))\n\treturn pictureQuery{NewQuery(exec, mods...)}\n}",
"func QueryImage(filename string) []string {\n\tres, err := db.Query(\"SELECT DISTINCT labels.description FROM labels, imagelabels where imagelabels.mid = labels.mid and imagelabels.filename = ?\", filename)\n\tdefer res.Close()\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\treturn getFilenamesFromRes(res)\n}",
"func (q pictureQuery) All() (PictureSlice, error) {\n\tvar o []*Picture\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Picture slice\")\n\t}\n\n\tif len(pictureAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (h *datastoreHandler) NewQuery(kind string) PersistenceQuery {\n\treturn NewQuery(kind)\n}",
"func NewUnsavedPostAttachmentClient(c config) *UnsavedPostAttachmentClient {\n\treturn &UnsavedPostAttachmentClient{config: c}\n}",
"func (upq *UnsavedPostQuery) WithAuthor(opts ...func(*AdminQuery)) *UnsavedPostQuery {\n\tquery := &AdminQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withAuthor = query\n\treturn upq\n}"
] |
[
"0.73176426",
"0.72584736",
"0.71540505",
"0.67886806",
"0.6742487",
"0.66984254",
"0.6436262",
"0.63680947",
"0.6357818",
"0.63106096",
"0.62658376",
"0.61531967",
"0.6101418",
"0.6063447",
"0.60455686",
"0.599144",
"0.597657",
"0.5946796",
"0.58466756",
"0.57799834",
"0.56987405",
"0.56953955",
"0.5652917",
"0.5557252",
"0.5503072",
"0.54341066",
"0.5420048",
"0.52960205",
"0.52470523",
"0.51827276",
"0.5081214",
"0.5046736",
"0.50373626",
"0.49509573",
"0.49167022",
"0.48664692",
"0.485519",
"0.482542",
"0.4811717",
"0.47485805",
"0.46914476",
"0.46717224",
"0.45846087",
"0.4578506",
"0.4541164",
"0.45150456",
"0.45002717",
"0.44610903",
"0.4447101",
"0.44327354",
"0.44214243",
"0.43973216",
"0.4393629",
"0.43897796",
"0.43867713",
"0.43817896",
"0.4329036",
"0.4329015",
"0.42814112",
"0.42779464",
"0.4208946",
"0.42022488",
"0.4186773",
"0.4181354",
"0.41728315",
"0.4158607",
"0.41491282",
"0.41415602",
"0.41393313",
"0.41253015",
"0.41201344",
"0.41191915",
"0.4100429",
"0.40962848",
"0.409022",
"0.4087314",
"0.40862033",
"0.40806085",
"0.40801305",
"0.4064307",
"0.40558505",
"0.40495262",
"0.40486684",
"0.4039449",
"0.40385455",
"0.40339866",
"0.402956",
"0.4015449",
"0.40019083",
"0.39993843",
"0.39904064",
"0.39846262",
"0.39814594",
"0.3970969",
"0.39561912",
"0.3919231",
"0.39131045",
"0.38996795",
"0.38984472",
"0.38907412"
] |
0.7556993
|
0
|
Get returns a UnsavedPostThumbnail entity by its id.
|
func (c *UnsavedPostThumbnailClient) Get(ctx context.Context, id int) (*UnsavedPostThumbnail, error) {
return c.Query().Where(unsavedpostthumbnail.ID(id)).Only(ctx)
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *UnsavedPostImageClient) Get(ctx context.Context, id int) (*UnsavedPostImage, error) {\n\treturn c.Query().Where(unsavedpostimage.ID(id)).Only(ctx)\n}",
"func (c *PostThumbnailClient) Get(ctx context.Context, id int) (*PostThumbnail, error) {\n\treturn c.Query().Where(postthumbnail.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostAttachmentClient) Get(ctx context.Context, id int) (*UnsavedPostAttachment, error) {\n\treturn c.Query().Where(unsavedpostattachment.ID(id)).Only(ctx)\n}",
"func (c *PostImageClient) Get(ctx context.Context, id int) (*PostImage, error) {\n\treturn c.Query().Where(postimage.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostThumbnailClient) GetX(ctx context.Context, id int) *UnsavedPostThumbnail {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *UnsavedPostClient) Get(ctx context.Context, id int) (*UnsavedPost, error) {\n\treturn c.Query().Where(unsavedpost.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostVideoClient) Get(ctx context.Context, id int) (*UnsavedPostVideo, error) {\n\treturn c.Query().Where(unsavedpostvideo.ID(id)).Only(ctx)\n}",
"func (c *PostAttachmentClient) Get(ctx context.Context, id int) (*PostAttachment, error) {\n\treturn c.Query().Where(postattachment.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostImageClient) GetX(ctx context.Context, id int) *UnsavedPostImage {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func GetPicture(id uint, db *gorm.DB) *Picture {\n\t//Preloaded needed to give us the image and its id\n\tpicture := new(Picture)\n\tdb.Find(picture, id)\n\tif picture.ImageID == id {\n\t\treturn picture\n\t}\n\treturn nil\n}",
"func (c *PostThumbnailClient) GetX(ctx context.Context, id int) *PostThumbnail {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (s *PicturesService) Get(ctx context.Context, id string) (*Picture, error) {\n\treq, err := s.client.NewGetRequest(fmt.Sprintf(\"%s/%s\", picturesPath, id))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tresp, err := s.client.Do(ctx, req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn nil, fmt.Errorf(\"status code not expected, got:%d\", resp.StatusCode)\n\t}\n\n\tpicture := &Picture{}\n\tif err := json.NewDecoder(resp.Body).Decode(picture); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn picture, nil\n}",
"func (pr *PhotosRepo) GetById(id int64) (entity.Photo, error) {\n\tvar imageUrl string\n\n\trow := pr.db.QueryRow(`SELECT image_url FROM photos WHERE id=?`, id)\n\tif err := row.Scan(&imageUrl); err != nil {\n\t\treturn entity.Photo{}, err\n\t}\n\n\treturn entity.Photo{\n\t\tId: id,\n\t\tUrl: imageUrl,\n\t}, nil\n}",
"func (upu *UnsavedPostUpdate) ClearThumbnail() *UnsavedPostUpdate {\n\tupu.mutation.ClearThumbnail()\n\treturn upu\n}",
"func (c *UnsavedPostAttachmentClient) GetX(ctx context.Context, id int) *UnsavedPostAttachment {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (s *StickerSet) GetThumbnail() (value Thumbnail) {\n\tif s == nil {\n\t\treturn\n\t}\n\treturn s.Thumbnail\n}",
"func (m *ChatMessageAttachment) GetThumbnailUrl()(*string) {\n val, err := m.GetBackingStore().Get(\"thumbnailUrl\")\n if err != nil {\n panic(err)\n }\n if val != nil {\n return val.(*string)\n }\n return nil\n}",
"func (c *PostClient) Get(ctx context.Context, id int) (*Post, error) {\n\treturn c.Query().Where(post.ID(id)).Only(ctx)\n}",
"func (upuo *UnsavedPostUpdateOne) ClearThumbnail() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearThumbnail()\n\treturn upuo\n}",
"func (c *UnsavedPostClient) QueryThumbnail(up *UnsavedPost) *UnsavedPostThumbnailQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, unsavedpost.ThumbnailTable, unsavedpost.ThumbnailColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostThumbnailClient) Delete() *UnsavedPostThumbnailDelete {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpDelete)\n\treturn &UnsavedPostThumbnailDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (r *REST) Get(ctx kapi.Context, id string) (runtime.Object, error) {\n\tname, tag, err := nameAndTag(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\trepo, err := r.imageRepositoryRegistry.GetImageRepository(ctx, name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tevent, err := api.LatestTaggedImage(repo, tag)\n\tif err != nil {\n\t\treturn nil, errors.NewNotFound(\"imageRepositoryTag\", tag)\n\t}\n\n\tif len(event.Image) != 0 {\n\t\timage, err := r.imageRegistry.GetImage(ctx, event.Image)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn api.ImageWithMetadata(*image)\n\t}\n\tif len(event.DockerImageReference) == 0 {\n\t\treturn nil, errors.NewNotFound(\"imageRepositoryTag\", tag)\n\t}\n\n\treturn &api.Image{\n\t\tObjectMeta: kapi.ObjectMeta{\n\t\t\tCreationTimestamp: event.Created,\n\t\t},\n\t\tDockerImageReference: event.DockerImageReference,\n\t}, nil\n}",
"func (c *MediaClient) Get(ctx context.Context, id int) (*Media, error) {\n\treturn c.Query().Where(media.ID(id)).Only(ctx)\n}",
"func (c *PostVideoClient) Get(ctx context.Context, id int) (*PostVideo, error) {\n\treturn c.Query().Where(postvideo.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostThumbnailClient) Query() *UnsavedPostThumbnailQuery {\n\treturn &UnsavedPostThumbnailQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func GetImage(id uint, db *gorm.DB) *Image {\n\timage := new(Image)\n\tdb.Find(image, id)\n\tif image.ID == id {\n\t\treturn image\n\t}\n\treturn nil\n}",
"func (c *UnsavedPostClient) GetX(ctx context.Context, id int) *UnsavedPost {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func NewUnsavedPostThumbnailClient(c config) *UnsavedPostThumbnailClient {\n\treturn &UnsavedPostThumbnailClient{config: c}\n}",
"func (t tracing) GetThumbnail(ctx context.Context, req *v0proto.GetThumbnailRequest, rsp *v0proto.GetThumbnailResponse) error {\n\tvar span trace.Span\n\n\tif thumbnailsTracing.TraceProvider != nil {\n\t\ttracer := thumbnailsTracing.TraceProvider.Tracer(\"thumbnails\")\n\t\tctx, span = tracer.Start(ctx, \"Thumbnails.GetThumbnail\")\n\t\tdefer span.End()\n\n\t\tspan.SetAttributes(\n\t\t\tattribute.KeyValue{Key: \"filepath\", Value: attribute.StringValue(req.Filepath)},\n\t\t\tattribute.KeyValue{Key: \"thumbnail_type\", Value: attribute.StringValue(req.ThumbnailType.String())},\n\t\t\tattribute.KeyValue{Key: \"width\", Value: attribute.IntValue(int(req.Width))},\n\t\t\tattribute.KeyValue{Key: \"height\", Value: attribute.IntValue(int(req.Height))},\n\t\t)\n\t}\n\n\treturn t.next.GetThumbnail(ctx, req, rsp)\n}",
"func (model *SnippetModel) Get(id int) (*models.Snippet, error) {\n\tstmt := ` SELECT id, title, content, created, expires FROM snippets\n\tWHERE expires > UTC_TIMESTAMP() AND id = ?`\n\n\tsnippet := &models.Snippet{}\n\n\terr := model.DB.QueryRow(stmt, id).Scan(&snippet.ID, &snippet.Title, &snippet.Content, &snippet.Created, &snippet.Expires)\n\tif err != nil {\n\t\tif errors.Is(err, sql.ErrNoRows) {\n\t\t\treturn nil, models.ErrNoRecord\n\t\t}\n\n\t\treturn nil, err\n\t}\n\n\treturn snippet, nil\n}",
"func (c *PostImageClient) GetX(ctx context.Context, id int) *PostImage {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *UnsavedPostThumbnailClient) QueryUnsavedPost(upt *UnsavedPostThumbnail) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upt.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, true, unsavedpostthumbnail.UnsavedPostTable, unsavedpostthumbnail.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upt.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (s *Store) GetImage(id string) (io.Reader, error) {\n\t// We're going to be reading from our items slice - lock for reading.\n\ts.mutex.RLock()\n\n\t// Unlock once we're done.\n\tdefer s.mutex.RUnlock()\n\n\t// Return the image for the first item we find with a matching ID.\n\tfor i := range s.items {\n\t\tif s.items[i].id == id {\n\t\t\treturn bytes.NewReader(s.items[i].image), nil\n\t\t}\n\t}\n\n\treturn nil, moodboard.ErrNoSuchItem\n}",
"func (p *Pictures) GetPicture(id int) (string, error) {\n\tp.Logger.Debug().Msgf(\"Getting picture... forId: %v\", id)\n\n\tif len(p.Items) == 0 || p.IsExpired() {\n\t\tp.Update()\n\t\tif len(p.Items) == 0 {\n\t\t\tp.Logger.Error().Msg(\"No pictures after update()\")\n\t\t\treturn \"\", errors.New(\"Нет картинок почему то :/\")\n\t\t}\n\t}\n\n\tif urlHistory, ok := p.urlHistory[id]; ok {\n\t\tp.Logger.Debug().Msgf(\"Id: %v already stored\", id)\n\n\t\tfor _, pic := range p.Items {\n\t\t\tif contains(urlHistory, pic) {\n\t\t\t\tcontinue\n\t\t\t} else {\n\t\t\t\tp.urlHistory[id] = append(p.urlHistory[id], pic)\n\t\t\t\treturn pic, nil\n\t\t\t}\n\t\t}\n\n\t\tfor {\n\t\t\tnewPage := p.nextPage()\n\t\t\tfor _, pic := range newPage {\n\t\t\t\tif contains(urlHistory, pic) {\n\t\t\t\t\tcontinue\n\t\t\t\t} else {\n\t\t\t\t\tp.urlHistory[id] = append(p.urlHistory[id], pic)\n\t\t\t\t\treturn pic, nil\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tp.Logger.Debug().Msgf(\"Id: %v is new - store to history\", id)\n\tp.urlHistory[id] = append(p.urlHistory[id], p.Items[0])\n\treturn p.Items[0], nil\n}",
"func (upq *UnsavedPostQuery) QueryThumbnail() *UnsavedPostThumbnailQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, unsavedpost.ThumbnailTable, unsavedpost.ThumbnailColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (s *AvatarsService) Get (ctx context.Context, entityType string, entityID string) (*Avatars, *http.Response, error) {\n\n\tendpoint := fmt.Sprintf(\"universal_avatar/type/%v/owner/%v\", entityType, entityID)\n\treq, err := s.client.NewRequest(\"GET\", endpoint, nil, nil)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tvar a *Avatars\n\tresp, err := s.client.Do(ctx, req, &a)\n\tif err != nil {\n\t\treturn nil, resp, err\n\t}\n\n\treturn a, resp, err\n}",
"func (c *EntryController) Get(ctx *app.GetEntryContext) error {\n\tentry, err := c.entryRepo.FindByID(ctx.EntryID)\n\tif err != nil {\n\t\tif errors.Cause(sql.ErrNoRows) != nil {\n\t\t\treturn ctx.NotFound()\n\t\t}\n\n\t\treturn errors.Wrap(err, \"Un-expected error\")\n\t}\n\n\tres := entryModelToMediaFull(entry)\n\treturn ctx.OKFull(res)\n}",
"func (c *UnsavedPostVideoClient) GetX(ctx context.Context, id int) *UnsavedPostVideo {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (s *StorageService) GetThumbnail(\n\tsize int,\n\tuserID *mytype.OID,\n\tkey string,\n) (*minio.Object, error) {\n\tsizeStr := strconv.FormatInt(int64(size), 10)\n\t// Thumbnail objects are identified with a -'size' at the end of the key\n\tthumbKey := key + \"--\" + sizeStr\n\tthumbLocal := \"./tmp/\" + thumbKey + \".jpg\"\n\n\tobjectName := fmt.Sprintf(\n\t\t\"%s/%s/%s/%s\",\n\t\tthumbKey[:2],\n\t\tthumbKey[3:5],\n\t\tthumbKey[6:8],\n\t\tthumbKey[9:],\n\t)\n\tobjectPath := strings.Join([]string{\n\t\tuserID.Short,\n\t\tobjectName,\n\t}, \"/\")\n\n\tobjInfo, err := s.svc.StatObject(\n\t\ts.bucket,\n\t\tobjectPath,\n\t\tminio.StatObjectOptions{},\n\t)\n\tif err != nil {\n\t\tminioError := minio.ToErrorResponse(err)\n\t\tif minioError.Code != \"NoSuchKey\" {\n\t\t\tmylog.Log.WithError(err).Error(util.Trace(\"\"))\n\t\t\treturn nil, err\n\t\t}\n\n\t\tmylog.Log.Info(\"generating new thumbnail...\")\n\n\t\tasset, err := s.Get(userID, key)\n\t\tif err != nil {\n\t\t\tmylog.Log.WithError(err).Error(util.Trace(\"\"))\n\t\t\treturn nil, err\n\t\t}\n\n\t\timg, err := imaging.Decode(asset)\n\t\tif err != nil {\n\t\t\tmylog.Log.WithError(err).Error(util.Trace(\"\"))\n\t\t\treturn nil, err\n\t\t}\n\t\tthumb := imaging.Thumbnail(img, size, size, imaging.CatmullRom)\n\n\t\t// create a new blank image\n\t\tdst := imaging.New(size, size, color.NRGBA{0, 0, 0, 0})\n\n\t\t// paste thumbnails into the new image\n\t\tdst = imaging.Paste(dst, thumb, image.Pt(0, 0))\n\n\t\t// ensure path is available\n\t\tdir := filepath.Dir(thumbLocal)\n\t\tif err := os.MkdirAll(dir, os.ModePerm); err != nil {\n\t\t\tmylog.Log.WithError(err).Error(util.Trace(\"\"))\n\t\t\treturn nil, err\n\t\t}\n\n\t\terr = imaging.Save(dst, thumbLocal)\n\t\tif err != nil {\n\t\t\tmylog.Log.WithError(err).Error(util.Trace(\"\"))\n\t\t\treturn nil, err\n\t\t}\n\n\t\tthumbFile, err := os.Open(thumbLocal)\n\t\tif err != nil {\n\t\t\tmylog.Log.WithError(err).Error(util.Trace(\"\"))\n\t\t\treturn nil, err\n\t\t}\n\n\t\tthumbStat, err := thumbFile.Stat()\n\t\tif err != nil {\n\t\t\tmylog.Log.WithError(err).Error(util.Trace(\"\"))\n\t\t\treturn nil, err\n\t\t}\n\n\t\t_, err = s.svc.PutObject(\n\t\t\ts.bucket,\n\t\t\tobjectPath,\n\t\t\tthumbFile,\n\t\t\tthumbStat.Size(),\n\t\t\tminio.PutObjectOptions{ContentType: objInfo.ContentType},\n\t\t)\n\t\tif err != nil {\n\t\t\tmylog.Log.WithError(err).Error(util.Trace(\"\"))\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tmylog.Log.WithFields(logrus.Fields{\n\t\t\"size\": size,\n\t\t\"user_id\": userID.String,\n\t\t\"key\": key,\n\t}).Info(util.Trace(\"thumbnail found\"))\n\treturn s.svc.GetObject(\n\t\ts.bucket,\n\t\tobjectPath,\n\t\tminio.GetObjectOptions{},\n\t)\n}",
"func (m *SnippetModel) Get(id int) (*models.Snippet, error) {\n\ttx, err := m.DB.Begin()\n\tif err != nil {\n\t\ttx.Rollback()\n\t\treturn nil, err\n\t}\n\tstmt := `SELECT id, title, content, created, expires FROM snippets\n WHERE expires > UTC_TIMESTAMP() AND id = ?`\n\t// m.DB.QueryRow returns a pointer to a sql.Row object which holds the\n\t// result from the database\n\trow := tx.QueryRow(stmt, id)\n\n\t// Initialize a pointer to a new zeroed Snippet struct\n\ts := &models.Snippet{}\n\n\t// row.Scan() copies the values from each field to the Snippet struct s,\n\t// All the values passed are pointers to the place you want to copy the data\n\t// into, and the number of arguments must be exactly the same as the number\n\t// of columns returned by your statement\n\terr = row.Scan(&s.ID, &s.Title, &s.Content, &s.Created, &s.Expires)\n\tif err != nil {\n\t\t// If the query returns no rows then row.Scan() will return a\n\t\t// sql.ErrNoRows error.\n\t\t// errors.Is() is used to check if the error is a sql.ErrNoRows\n\t\tif errors.Is(err, sql.ErrNoRows) {\n\t\t\ttx.Rollback()\n\t\t\treturn nil, models.ErrNoRecord\n\t\t} else {\n\t\t\ttx.Rollback()\n\t\t\treturn nil, err\n\t\t}\n\t}\n\t// If everything is OK then return the Snippet object\n\terr = tx.Commit()\n\treturn s, err\n}",
"func (s Thumbnails) GetThumbnail(w http.ResponseWriter, r *http.Request) {\n\tlogger := s.logger.SubloggerWithRequestID(r.Context())\n\tkey := r.Context().Value(keyContextKey).(string)\n\n\tthumbnail, err := s.manager.GetThumbnail(key)\n\tif err != nil {\n\t\tlogger.Debug().\n\t\t\tErr(err).\n\t\t\tStr(\"key\", key).\n\t\t\tMsg(\"could not get the thumbnail\")\n\t\tw.WriteHeader(http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tw.WriteHeader(http.StatusOK)\n\tw.Header().Set(\"Content-Length\", strconv.Itoa(len(thumbnail)))\n\tif _, err = w.Write(thumbnail); err != nil {\n\t\tlogger.Error().\n\t\t\tErr(err).\n\t\t\tStr(\"key\", key).\n\t\t\tMsg(\"could not write the thumbnail response\")\n\t}\n}",
"func (in *Database) GetImage(id string) (*types.Image, error) {\n\ttxn := in.db.Txn(false)\n\tdefer txn.Abort()\n\tidx := \"id\"\n\tif stringid.IsShortID(id) {\n\t\tidx = \"shortid\"\n\t}\n\traw, err := txn.First(\"image\", idx, id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif raw == nil {\n\t\treturn nil, fmt.Errorf(\"image %s not found\", id)\n\t}\n\treturn raw.(*types.Image), nil\n}",
"func (box *EntityBox) Get(id uint64) (*Entity, error) {\n\tobject, err := box.Box.Get(id)\n\tif err != nil {\n\t\treturn nil, err\n\t} else if object == nil {\n\t\treturn nil, nil\n\t}\n\treturn object.(*Entity), nil\n}",
"func (c BlogPostItem) Get(id int64) revel.Result {\n\tblogitem := new(models.BlogPost)\n\terr := c.Txn.SelectOne(blogitem,\n\t\t`SELECT * FROM BlogPost WHERE id = ?`, id)\n\tif err != nil {\n\t\treturn c.RenderText(\"Error. BlogPost probably doesn't exist.\")\n\t}\n\treturn c.RenderJson(blogitem)\n}",
"func (s service) GetPost(id uint) (*Post, error) {\n\tp, err := (*s.repo).GetPost(id)\n\tif err != nil {\n\t\treturn nil, ErrPostNotFound\n\t}\n\n\treturn p, err\n}",
"func GetImageByClothesId(c * gin.Context){\n\tdb := database.DBConn()\n\trows, err := db.Query(\"SELECT * FROM images where clothesId = \"+c.Param(\"id\"))\n\tif err != nil{\n\t\tc.JSON(500, gin.H{\n\t\t\t\"messages\" : \"Story not found\",\n\t\t});\n\t}\n\tpost := DTO.ImageDTO{}\n\tlist := [] DTO.ImageDTO{}\n\tfor rows.Next(){\n\t\tvar id, clothesId int\n\t\tvar link string\n\t\terr = rows.Scan(&id, &link, &clothesId)\n\t\tif err != nil {\n\t\t\tpanic(err.Error())\n\t\t}\n\t\tpost.Id = id\n\t\tpost.ClothesId = clothesId\n\t\tpost.Link = link\n\t\tlist = append(list,post)\n\t}\n\tc.JSON(200, list)\n\tdefer db.Close()\n}",
"func (m *SnippetModel) Get(id int) (*models.Snippet, error) {\n\t// Create the SQL statement to execute\n\t// Split over 2 lines for readibility\n\tstmt := `SELECT id, title, content, created, expires FROM snippets \n\tWHERE expires > UTC_TIMESTAMP() AND id =?`\n\n\t// Use the QueryRow() method on the comnnection pool to execute our\n\t// SQL statement, passing in the untrusted id variable as the value for the\n\t// placeholder parameter. This returns a pointer to a sql.Row object which\n\t// holds the result set from the database.\n\trow := m.DB.QueryRow(stmt, id)\n\n\t// Initialize a pointer to a new zeroed Snippet struct.\n\ts := &models.Snippet{}\n\n\t// Use row.Scan() to copy the values from each field in the sql.Row to the\n\t// corresponding field in the Snippet struct. Notice that the arguments\n\t// to row.Scan are *pointers* to the place we want to copy the data into,\n\t// and the number of arguments must be exactly the same as the number of\n\t// columns returned by the statement. If the query returns no rows, then\n\t// row.Scan() will return a sql.ErrNoRows error. We check for that and return\n\t// our models.ErrNoRecord error instead of a Snippet object\n\terr := row.Scan(&s.ID, &s.Title, &s.Content, &s.Created, &s.Expires)\n\tif err == sql.ErrNoRows {\n\t\treturn nil, models.ErrNoRecord\n\t} else if err != nil {\n\t\treturn nil, err\n\t}\n\n\t// If everything went OK then return the Snippet object.\n\treturn s, nil\n\n\t// Version above is long hand.\n\t// As errors from DB.QueryRow() are deferred until Scan() is called, it can be shortened to:\n\t// --------------------------------------\n\t// s := &models.Snippet{}\n\t// err := m.DB.QueryRow(\"SELECT ...\", id).Scan(&s.ID, &s.Title, &s.Content, &s.Created, &s.Expires)\n\t// if err == sql.ErrNoRows {\n\t// return nil, models.ErrNoRecord }\n\t// else if err != nil {\n\t// return nil, err }\n\t// return s, nil\n}",
"func (x UnavailableEntity) GetPermalink() string {\n\treturn x.Permalink\n}",
"func (r *sampleRepository) Get(id uuid.UUID) (*model.Sample, error) {\n\tvar sample model.Sample\n\n\terr := r.DB.Where(\"id = ?\", id).Take(&sample).Error\n\n\tif err == gorm.ErrRecordNotFound {\n\t\treturn nil, nil\n\t}\n\n\treturn &sample, err\n}",
"func (c *PostAttachmentClient) GetX(ctx context.Context, id int) *PostAttachment {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (repo *Posts) Post(id graphql.ID) *models.Post {\n\treturn repo.posts[id]\n}",
"func (repo *GormRepository) GetPin(id uuid.UUID) (p *model.Pin, err error) {\n\tif id == uuid.Nil {\n\t\treturn nil, ErrNotFound\n\t}\n\tp = &model.Pin{}\n\terr = repo.db.Scopes(pinPreloads).Where(&model.Pin{ID: id}).Take(p).Error\n\tif err != nil {\n\t\treturn nil, convertError(err)\n\t}\n\treturn p, nil\n}",
"func (client *Client) GetImage(id string) (*model.Image, error) {\n\treturn client.osclt.GetImage(id)\n}",
"func GetPost(id int) (post Post, err error) {\n\tpost = Post{}\n\terr = Db.QueryRow(\"select * from posts where id = $1\", id).Scan(&post.ID, &post.Title, &post.Body, &post.CreatedAt)\n\treturn\n}",
"func (client *Client) GetImage(id string) (*model.Image, error) {\n\treturn client.feclt.GetImage(id)\n}",
"func (c *UnsavedPostThumbnailClient) Update() *UnsavedPostThumbnailUpdate {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpUpdate)\n\treturn &UnsavedPostThumbnailUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (s *MockStore) GetPost(id int) (p Post, err error) {\n\tp, ok := s.mem[id]\n\tif !ok {\n\t\terr = errors.New(\"Could not find a post with that id.\")\n\t}\n\treturn p, err\n}",
"func (c *PostClient) QueryThumbnail(po *Post) *PostThumbnailQuery {\n\tquery := &PostThumbnailQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := po.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(post.Table, post.FieldID, id),\n\t\t\tsqlgraph.To(postthumbnail.Table, postthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, post.ThumbnailTable, post.ThumbnailColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(po.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (box *TestEntityRelatedBox) Get(id uint64) (*TestEntityRelated, error) {\n\tobject, err := box.Box.Get(id)\n\tif err != nil {\n\t\treturn nil, err\n\t} else if object == nil {\n\t\treturn nil, nil\n\t}\n\treturn object.(*TestEntityRelated), nil\n}",
"func (db *Database) GetPost(postID string) (models.Post, error) {\n\tpost := &models.Post{}\n\terr := db.DB.Model(post).\n\t\tWhere(\"post.post_id = ?\", postID).\n\t\tSelect()\n\tif err != nil {\n\t\treturn models.Post{}, err\n\t}\n\n\treturn *post, nil\n}",
"func (s *BlugService) GetPost(ctx context.Context, id int) (post *models.Post, err error) {\n\tdefer func(begin time.Time) {\n\t\ts.Logger.Info(\n\t\t\t\"blug\",\n\t\t\tzap.String(\"method\", \"getpost\"),\n\t\t\tzap.Int(\"id\", id),\n\t\t\tzap.NamedError(\"err\", err),\n\t\t\tzap.Duration(\"took\", time.Since(begin)),\n\t\t)\n\t}(time.Now())\n\n\tpost, err = s.DB.GetPost(id)\n\n\treturn post, err\n}",
"func (m *defaultEntityManager) Get(id string) (entity *Entity) {\n\tfor _, e := range m.entities {\n\t\tif e.ID() == id {\n\t\t\treturn e\n\t\t}\n\t}\n\treturn\n}",
"func (box *TestEntityInlineBox) Get(id uint64) (*TestEntityInline, error) {\n\tobject, err := box.Box.Get(id)\n\tif err != nil {\n\t\treturn nil, err\n\t} else if object == nil {\n\t\treturn nil, nil\n\t}\n\treturn object.(*TestEntityInline), nil\n}",
"func (c *Files) GetThumbnail(in *GetThumbnailInput) (out *GetThumbnailOutput, err error) {\n\tbody, l, err := c.download(\"/files/get_thumbnail\", in, nil)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tout = &GetThumbnailOutput{body, l}\n\treturn\n}",
"func (t *Thumbnail) GetImage() image.Image {\n\treturn t.image\n}",
"func (s *fileStorage) Get(id string) (Metadata, io.ReadCloser, error) {\n\tmeta, err := s.Metadata(id)\n\tif err != nil {\n\t\treturn nil, nil, errors.Trace(err)\n\t}\n\tif meta.Stored() == nil {\n\t\treturn nil, nil, errors.NotFoundf(\"no file stored for %q\", id)\n\t}\n\tfile, err := s.rawStorage.File(id)\n\tif err != nil {\n\t\treturn nil, nil, errors.Trace(err)\n\t}\n\treturn meta, file, nil\n}",
"func (m *EntityManager) Get(id string) (entity *Entity) {\n\tfor _, e := range m.entities {\n\t\tif e.ID() == id {\n\t\t\treturn e\n\t\t}\n\t}\n\treturn\n}",
"func (s *GenericStorage) Get(gvk schema.GroupVersionKind, uid runtime.UID) (runtime.Object, error) {\n\tstorageKey := KeyForUID(gvk, uid)\n\tcontent, err := s.raw.Read(storageKey)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn s.decode(content, gvk)\n}",
"func (ar AlbumDbRepository) Get(id int) (entity domain.Album, err error) {\n\tobject, err := ar.AppContext.DB.Get(domain.Album{}, id)\n\tif err == nil && object != nil {\n\t\tentity = *object.(*domain.Album)\n\t\tar.populateTracks(&entity)\n\t} else {\n\t\terr = errors.New(\"no album found\")\n\t}\n\n\treturn\n}",
"func (x GenericEntity) GetPermalink() string {\n\treturn x.Permalink\n}",
"func GetPostById(c *gin.Context) {\n\tpostID, err := strconv.ParseInt(c.Param(\"id\"), 10, 0)\n\tif err != nil {\n\t\tc.JSON(http.StatusBadRequest, gin.H{\"error\": err.Error()})\n\t\treturn\n\t}\n\n\tpost, err := postRepo.GetById(postID)\n\tif err != nil {\n\t\tc.JSON(http.StatusBadRequest, gin.H{\"error\": err.Error()})\n\t\treturn\n\t}\n\tc.JSON(http.StatusOK, PostModel{\n\t\tId: post.ID,\n\t\tLinks: halgo.Links{}.\n\t\t\tSelf(\"/posts/%d\", post.ID).\n\t\t\tLink(\"author\", \"%s/users/%d\", userServiceAddress, post.AuthorID).\n\t\t\tLink(\"ratings\", \"%s/ratings?postId=%d\", ratingServiceAddress, post.ID),\n\t\tHeadline: post.Headline,\n\t\tContent: post.Content,\n\t})\n}",
"func GetByID(ctx *routing.Context) error {\n\tlogger := logger.GetLogInstance(\"\", \"\")\n\tdb := ctx.Get(\"db\").(*gorm.DB)\n\n\timg := []models.ImageModel{}\n\n\tif err := db.Model(&dbmodels.Image{}).Where(\"id = ?\", ctx.Param(\"id\")).Scan(&img).Error; err != nil {\n\t\tlogger.Error(err)\n\t\tctx.Response.SetStatusCode(404)\n\t\tres := models.NewResponse(false, nil, \"not found\")\n\t\treturn ctx.WriteData(res.MustMarshal())\n\t}\n\tres := models.NewResponse(true, img, \"OK\")\n\treturn ctx.WriteData(res.MustMarshal())\n}",
"func (cli *Client) GetThumbanilJob(jobId string) (*api.GetThumbnailJobResponse, error) {\n\treturn api.GetThumbanilJob(cli, jobId)\n}",
"func (p *PostsController) GetPost(id int, userId uint) (*models.Post, *echo.HTTPError) {\n\tvar post models.Post\n\tp.db.Raw(`\n\t\tSELECT p.*,\n\t\t(SELECT \"value\" from \"likes\" \n\t\tWHERE \"user_id\" = ? and \"post_id\" = p.id) as \"StateValue\",\n\t\t(SELECT username FROM \"profiles\"\n\t\tWHERE user_id = p.user_id) as \"Creator\"\n\t\tFROM posts p\n\t\tWHERE p.id = ?\n\t`, userId, id).Find(&post)\n\n\tif post.ID == 0 {\n\t\treturn nil, echo.NewHTTPError(404, \"post does not exist\")\n\t}\n\n\treturn &post, nil\n}",
"func (c *UnsavedPostThumbnailClient) Create() *UnsavedPostThumbnailCreate {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpCreate)\n\treturn &UnsavedPostThumbnailCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func retrieve(id int) (post Post, err error){\n\tpost = Post{}\n\terr = Db.QueryRow(\"select id, content, author from posts where id = $1\", id).Scan(&post.Id, &post.Content, &post.Author)\n\treturn\n}",
"func (bl *postBusiness) GetByID(id uint64) (*models.Post, *apperror.AppError) {\n\treturn bl.service.GetByID(id)\n}",
"func (driver *S3Driver) Get(id string) (*shared.Paste, error) {\n\t// Read the object\n\tobject, err := driver.client.GetObject(context.Background(), driver.bucket, id+\".json\", minio.GetObjectOptions{})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdata, err := ioutil.ReadAll(object)\n\tif err != nil {\n\t\tif minio.ToErrorResponse(err).Code == \"NoSuchKey\" {\n\t\t\treturn nil, nil\n\t\t}\n\t\treturn nil, err\n\t}\n\n\t// Unmarshal the object into a paste\n\tpaste := new(shared.Paste)\n\terr = json.Unmarshal(data, &paste)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn paste, nil\n}",
"func (c *PostThumbnailClient) Delete() *PostThumbnailDelete {\n\tmutation := newPostThumbnailMutation(c.config, OpDelete)\n\treturn &PostThumbnailDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func GetTile(id string, args map[string]interface{}) ([]byte, error) {\n\tpipeline, err := GetPipeline(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treq, err := pipeline.NewTileRequest(args)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn pipeline.Get(req)\n}",
"func (a *Exp_photosHandler) GetByID(c echo.Context) error {\n\tid := c.Param(\"id\")\n\n\tctx := c.Request().Context()\n\tif ctx == nil {\n\t\tctx = context.Background()\n\t}\n\n\tart, err := a.Exp_photosUsecase.GetByExperienceID(ctx, id)\n\tif err != nil {\n\t\treturn c.JSON(getStatusCode(err), ResponseError{Message: err.Error()})\n\t}\n\treturn c.JSON(http.StatusOK, art)\n}",
"func (c _StoreImpl) Photo_ByPostId(PostId int) (*Photo, bool) {\n\to, ok := RowCacheIndex.Get(\"Photo_PostId2:\" + fmt.Sprintf(\"%v\", PostId))\n\tif ok {\n\t\tif obj, ok := o.(*Photo); ok {\n\t\t\treturn obj, true\n\t\t}\n\t}\n\n\trow, err := NewPhoto_Selector().PostId_Eq(PostId).GetRow(base.DB)\n\tif err == nil {\n\t\tRowCacheIndex.Set(\"Photo_PostId2:\"+fmt.Sprintf(\"%v\", row.PostId), row, 0)\n\t\treturn row, true\n\t}\n\n\tXOLogErr(err)\n\treturn nil, false\n}",
"func (as *ArtworkService) Get(id int, opts ...Option) (*Artwork, error) {\n\tif id < 0 {\n\t\treturn nil, ErrNegativeID\n\t}\n\n\tvar art []*Artwork\n\n\topts = append(opts, SetFilter(\"id\", OpEquals, strconv.Itoa(id)))\n\terr := as.client.post(as.end, &art, opts...)\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"cannot get Artwork with ID %v\", id)\n\t}\n\n\treturn art[0], nil\n}",
"func (ps *PostStorage) Read(id string) (socialnet.Post, error) {\n\tfor _, p := range ps.posts {\n\t\tif p.ID == id {\n\t\t\treturn p, nil\n\t\t}\n\t}\n\treturn socialnet.Post{}, fmt.Errorf(\n\t\t\"could not find post with ID %s\",\n\t\tid,\n\t)\n}",
"func (time *Timeline) Get() *FeedMedia {\n\tinsta := time.inst\n\tmedia := &FeedMedia{}\n\tmedia.inst = insta\n\tmedia.endpoint = urlTimeline\n\treturn media\n}",
"func (a *API) GetSnapshot(id string) (*bytes.Buffer, error) {\r\n\treq, err := a.newAPIRequest(\"GET\", \"cameraThumbnail\")\r\n\tif err != nil {\r\n\t\treturn nil, fmt.Errorf(\"GetSnapshot failed: %v\", err)\r\n\t}\r\n\tq := req.URL.Query()\r\n\tq.Add(\"cameraId\", id)\r\n\treq.URL.RawQuery = q.Encode()\r\n\r\n\tclient := http.DefaultClient\r\n\tresp, err := client.Do(req)\r\n\tif err != nil {\r\n\t\treturn nil, fmt.Errorf(\"GetSnapshot failed: %v\", err)\r\n\t}\r\n\r\n\tvar buf bytes.Buffer\r\n\t_, err = buf.ReadFrom(resp.Body)\r\n\tif err != nil {\r\n\t\treturn nil, fmt.Errorf(\"GetSnapshot failed: %v\", err)\r\n\t}\r\n\tresp.Body.Close()\r\n\r\n\treturn &buf, nil\r\n}",
"func (c *BinaryFileClient) Get(ctx context.Context, id int) (*BinaryFile, error) {\n\treturn c.Query().Where(binaryfile.ID(id)).Only(ctx)\n}",
"func (x ApmDatabaseInstanceEntity) GetPermalink() string {\n\treturn x.Permalink\n}",
"func (cs *CharacterMugshotService) Get(id int, opts ...Option) (*CharacterMugshot, error) {\n\tif id < 0 {\n\t\treturn nil, ErrNegativeID\n\t}\n\n\tvar mug []*CharacterMugshot\n\n\topts = append(opts, SetFilter(\"id\", OpEquals, strconv.Itoa(id)))\n\terr := cs.client.post(cs.end, &mug, opts...)\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"cannot get CharacterMugshot with ID %v\", id)\n\t}\n\n\treturn mug[0], nil\n}",
"func (x WorkloadEntity) GetPermalink() string {\n\treturn x.Permalink\n}",
"func (es *etcdStore) GetByID(imageID string) (*Image, error) {\n\timage := &Image{}\n\n\tmetadataKey := es.metadataKey(imageID)\n\tresp, err := es.client.Get(metadataKey, false, false)\n\tif err != nil {\n\t\tetcdErr := err.(*etcd.EtcdError)\n\t\tif etcdErr.ErrorCode == etcderr.EcodeKeyNotFound {\n\t\t\treturn nil, ErrNotFound\n\t\t}\n\n\t\tlog.WithFields(etcdLogFields).WithFields(log.Fields{\n\t\t\t\"error\": err,\n\t\t\t\"key\": metadataKey,\n\t\t}).Error(\"failed to look up image\")\n\t\treturn nil, err\n\t}\n\n\tif err := json.Unmarshal([]byte(resp.Node.Value), image); err != nil {\n\t\tlog.WithFields(etcdLogFields).WithFields(log.Fields{\n\t\t\t\"error\": err,\n\t\t\t\"key\": metadataKey,\n\t\t\t\"value\": resp.Node.Value,\n\t\t}).Error(\"invalid image json\")\n\t\treturn nil, err\n\t}\n\n\timage.Store = es\n\treturn image, nil\n}",
"func (s *Store) GetInstance(id int64) (ins *Instance, err error) {\n\tsp, err := s.GetSnapshot().FastForward()\n\tif err != nil {\n\t\treturn\n\t}\n\treturn getInstance(id, sp)\n}",
"func (s MyEntityManager) Get(id uint64) ecs.Entity {\n\treturn *s.items[id].entity\n}",
"func (s *SnippetStore) Get(id int) (*models.Snippet, error) {\n\tswitch id {\n\tcase 1:\n\t\treturn mockSnippet, nil\n\tdefault:\n\t\treturn nil, models.ErrNoRecord\n\t}\n}",
"func (c *UnsavedPostThumbnailClient) DeleteOne(upt *UnsavedPostThumbnail) *UnsavedPostThumbnailDeleteOne {\n\treturn c.DeleteOneID(upt.ID)\n}",
"func (ps PostStorage) GetPost(ctx sdk.Context, permlink linotypes.Permlink) (*Post, sdk.Error) {\n\tstore := ctx.KVStore(ps.key)\n\tkey := GetPostInfoKey(permlink)\n\tinfoByte := store.Get(key)\n\tif infoByte == nil {\n\t\treturn nil, types.ErrPostNotFound(permlink)\n\t}\n\tpostInfo := new(Post)\n\tps.cdc.MustUnmarshalBinaryLengthPrefixed(infoByte, postInfo)\n\treturn postInfo, nil\n}",
"func (p *postsQueryBuilder) Get() (*Post, error) {\n\tif p.err != nil {\n\t\treturn nil, p.err\n\t}\n\tmodel, err := p.builder.Get()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn model.(*Post), nil\n}",
"func (c *PartClient) Get(ctx context.Context, id int) (*Part, error) {\n\treturn c.Query().Where(part.ID(id)).Only(ctx)\n}",
"func (db *Database) GetSnippet(id int) (*Snippet, error) {\n\t// if id == 123 {\n\t// \tsnippet := &Snippet{\n\t// \t\tId: id,\n\t// \t\tTitle: \"Example title\",\n\t// \t\tContent: \"Example content\",\n\t// \t\tCreated: time.Now(),\n\t// \t\tExpires: time.Now(),\n\t// \t}\n\t// \treturn snippet, nil\n\t// }\n\tstmt := `SELECT id, title, content, created, expires\n\tFROM SNIPPETS WHERE id =?`\n\n\trow := db.QueryRow(stmt, id)\n\n\ts := &Snippet{}\n\n\terr := row.Scan(&s.ID, &s.Title, &s.Content, &s.Created, &s.Expires)\n\n\tif err == sql.ErrNoRows {\n\t\treturn nil, nil\n\t} else if err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn s, nil\n}",
"func (store *FileTileStore) Get(scale, index int) (*tiling.Tile, error) {\n\tstore.lock.Lock()\n\tdefer store.lock.Unlock()\n\n\tkey := CacheKey{\n\t\tstartIndex: index,\n\t\tscale: scale,\n\t}\n\n\t// Retrieve the tile, if any, from the cache.\n\tvar tile *tiling.Tile\n\tvar cacheLastModified time.Time\n\tif val, ok := store.cache.Get(key); ok {\n\t\tcacheEntry := val.(*CacheEntry)\n\t\ttile = cacheEntry.tile\n\t\tcacheLastModified = cacheEntry.lastModified\n\t}\n\tif index == -1 {\n\t\tif tile == nil {\n\t\t\tvar err error\n\t\t\ttile, err = store.getLastTile(scale)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"Failed to Get the last tile: %s\", err)\n\t\t\t}\n\t\t}\n\t\treturn tile, nil\n\t}\n\n\t// Compare to the tile on disk.\n\tfilename, err := store.tileFilename(scale, index)\n\tfiledata, err := os.Stat(filename)\n\tif err != nil {\n\t\tif !os.IsNotExist(err) {\n\t\t\treturn nil, fmt.Errorf(\"Tile %d,%d retrieval caused error : %s.\", scale, index, err)\n\t\t} else {\n\t\t\treturn nil, nil\n\t\t}\n\t}\n\tfileLastModified := filedata.ModTime()\n\n\t// If the file on disk is newer, or there wasn't anything in the cache, read\n\t// the tile from disk.\n\tif tile == nil || fileLastModified.After(cacheLastModified) {\n\t\ttile, err = openTile(filename)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Failed to retrieve tile %s: %s\", filename, err)\n\t\t}\n\t\tentry := &CacheEntry{\n\t\t\ttile: tile,\n\t\t\tlastModified: fileLastModified,\n\t\t}\n\t\tstore.cache.Add(key, entry)\n\t}\n\n\treturn tile, nil\n}"
] |
[
"0.77718693",
"0.7666919",
"0.69751775",
"0.6845692",
"0.66636854",
"0.6617444",
"0.6243646",
"0.61186194",
"0.5948112",
"0.5919562",
"0.5916258",
"0.58917886",
"0.5695611",
"0.55794096",
"0.5533047",
"0.5501403",
"0.54877895",
"0.54770315",
"0.5448258",
"0.5439178",
"0.5417243",
"0.5412095",
"0.5357619",
"0.5353807",
"0.5338822",
"0.5330872",
"0.53157556",
"0.5297396",
"0.52561545",
"0.523676",
"0.5188024",
"0.51654327",
"0.5138748",
"0.5099119",
"0.5077336",
"0.50624007",
"0.5053706",
"0.5047834",
"0.5047276",
"0.50361514",
"0.5029098",
"0.50290227",
"0.5017",
"0.5002048",
"0.4994178",
"0.49511623",
"0.49070275",
"0.48973307",
"0.48942703",
"0.4892671",
"0.48615703",
"0.48603493",
"0.48544937",
"0.4840334",
"0.48296547",
"0.4816872",
"0.47881526",
"0.4783524",
"0.47734678",
"0.47545773",
"0.47537798",
"0.4747909",
"0.47287947",
"0.47221965",
"0.47117653",
"0.471147",
"0.4706152",
"0.470441",
"0.46997595",
"0.4690132",
"0.46846598",
"0.46595353",
"0.46453905",
"0.462382",
"0.46208715",
"0.4619065",
"0.46174377",
"0.4603102",
"0.45976803",
"0.45975775",
"0.45968944",
"0.45961276",
"0.45950657",
"0.4578576",
"0.45759678",
"0.45615074",
"0.4560357",
"0.45568106",
"0.45445716",
"0.45426542",
"0.4540928",
"0.4540771",
"0.45393723",
"0.45317936",
"0.452364",
"0.4523325",
"0.45210811",
"0.45148367",
"0.45104593",
"0.45027897"
] |
0.8705737
|
0
|
GetX is like Get, but panics if an error occurs.
|
func (c *UnsavedPostThumbnailClient) GetX(ctx context.Context, id int) *UnsavedPostThumbnail {
obj, err := c.Get(ctx, id)
if err != nil {
panic(err)
}
return obj
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *StatustClient) GetX(ctx context.Context, id int) *Statust {\n\ts, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn s\n}",
"func (c *OperativeClient) GetX(ctx context.Context, id int) *Operative {\n\to, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn o\n}",
"func (c *StaytypeClient) GetX(ctx context.Context, id int) *Staytype {\n\ts, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn s\n}",
"func (c *LevelOfDangerousClient) GetX(ctx context.Context, id int) *LevelOfDangerous {\n\tlod, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn lod\n}",
"func (c *DentistClient) GetX(ctx context.Context, id int) *Dentist {\n\td, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn d\n}",
"func (c *ToolClient) GetX(ctx context.Context, id int) *Tool {\n\tt, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn t\n}",
"func (c *IPClient) GetX(ctx context.Context, id uuid.UUID) *IP {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *BeerClient) GetX(ctx context.Context, id int) *Beer {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *PhysicianClient) GetX(ctx context.Context, id int) *Physician {\n\tph, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn ph\n}",
"func (c *PhysicianClient) GetX(ctx context.Context, id int) *Physician {\n\tph, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn ph\n}",
"func (c *PharmacistClient) GetX(ctx context.Context, id int) *Pharmacist {\n\tph, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn ph\n}",
"func (c *EmptyClient) GetX(ctx context.Context, id int) *Empty {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *OperationClient) GetX(ctx context.Context, id uuid.UUID) *Operation {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *NurseClient) GetX(ctx context.Context, id int) *Nurse {\n\tn, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn n\n}",
"func (c *PatientInfoClient) GetX(ctx context.Context, id int) *PatientInfo {\n\tpi, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pi\n}",
"func (c *ClinicClient) GetX(ctx context.Context, id uuid.UUID) *Clinic {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *LeaseClient) GetX(ctx context.Context, id int) *Lease {\n\tl, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn l\n}",
"func (c *ModuleVersionClient) GetX(ctx context.Context, id int) *ModuleVersion {\n\tmv, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn mv\n}",
"func (c *PetruleClient) GetX(ctx context.Context, id int) *Petrule {\n\tpe, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pe\n}",
"func (c *KeyStoreClient) GetX(ctx context.Context, id int32) *KeyStore {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *SituationClient) GetX(ctx context.Context, id int) *Situation {\n\ts, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn s\n}",
"func (c *RepairinvoiceClient) GetX(ctx context.Context, id int) *Repairinvoice {\n\tr, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn r\n}",
"func (c *MedicineClient) GetX(ctx context.Context, id int) *Medicine {\n\tm, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn m\n}",
"func (c *BillClient) GetX(ctx context.Context, id int) *Bill {\n\tb, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn b\n}",
"func (c *BillClient) GetX(ctx context.Context, id int) *Bill {\n\tb, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn b\n}",
"func (c *BillClient) GetX(ctx context.Context, id int) *Bill {\n\tb, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn b\n}",
"func (c *OperativerecordClient) GetX(ctx context.Context, id int) *Operativerecord {\n\to, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn o\n}",
"func (c *ReturninvoiceClient) GetX(ctx context.Context, id int) *Returninvoice {\n\tr, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn r\n}",
"func (c *CleanernameClient) GetX(ctx context.Context, id int) *Cleanername {\n\tcl, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn cl\n}",
"func (c *AdminClient) GetX(ctx context.Context, id int) *Admin {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *RepairInvoiceClient) GetX(ctx context.Context, id int) *RepairInvoice {\n\tri, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn ri\n}",
"func (c *ComplaintClient) GetX(ctx context.Context, id int) *Complaint {\n\tco, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn co\n}",
"func (c *DNSBLQueryClient) GetX(ctx context.Context, id uuid.UUID) *DNSBLQuery {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *ModuleClient) GetX(ctx context.Context, id int) *Module {\n\tm, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn m\n}",
"func (c *MedicineTypeClient) GetX(ctx context.Context, id int) *MedicineType {\n\tmt, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn mt\n}",
"func (c *BuildingClient) GetX(ctx context.Context, id int) *Building {\n\tb, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn b\n}",
"func (c *DeviceClient) GetX(ctx context.Context, id int) *Device {\n\td, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn d\n}",
"func (c *PatientClient) GetX(ctx context.Context, id int) *Patient {\n\tpa, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pa\n}",
"func (c *PatientClient) GetX(ctx context.Context, id int) *Patient {\n\tpa, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pa\n}",
"func (c *PatientClient) GetX(ctx context.Context, id int) *Patient {\n\tpa, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pa\n}",
"func (c *RoomuseClient) GetX(ctx context.Context, id int) *Roomuse {\n\tr, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn r\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn u\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn u\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn u\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn u\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn u\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn u\n}",
"func (c *StatusdClient) GetX(ctx context.Context, id int) *Statusd {\n\ts, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn s\n}",
"func (c *UserClient) GetX(ctx context.Context, id int64) *User {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *PlanetClient) GetX(ctx context.Context, id int) *Planet {\n\tpl, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pl\n}",
"func (c *TransactionClient) GetX(ctx context.Context, id int32) *Transaction {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *PurposeClient) GetX(ctx context.Context, id int) *Purpose {\n\tpu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pu\n}",
"func (c *LengthtimeClient) GetX(ctx context.Context, id int) *Lengthtime {\n\tl, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn l\n}",
"func (c *VeterinarianClient) GetX(ctx context.Context, id uuid.UUID) *Veterinarian {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *UsertypeClient) GetX(ctx context.Context, id int) *Usertype {\n\tu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn u\n}",
"func (c *PrescriptionClient) GetX(ctx context.Context, id int) *Prescription {\n\tpr, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pr\n}",
"func (c *PaymentClient) GetX(ctx context.Context, id int) *Payment {\n\tpa, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pa\n}",
"func (c *PaymentClient) GetX(ctx context.Context, id int) *Payment {\n\tpa, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pa\n}",
"func (c *WorkExperienceClient) GetX(ctx context.Context, id int) *WorkExperience {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *DNSBLResponseClient) GetX(ctx context.Context, id uuid.UUID) *DNSBLResponse {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *OperationroomClient) GetX(ctx context.Context, id int) *Operationroom {\n\to, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn o\n}",
"func (c *CleaningroomClient) GetX(ctx context.Context, id int) *Cleaningroom {\n\tcl, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn cl\n}",
"func (c *PatientofphysicianClient) GetX(ctx context.Context, id int) *Patientofphysician {\n\tpa, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pa\n}",
"func (c *PositionInPharmacistClient) GetX(ctx context.Context, id int) *PositionInPharmacist {\n\tpip, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pip\n}",
"func (c *DoctorClient) GetX(ctx context.Context, id int) *Doctor {\n\td, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn d\n}",
"func (c *StatusRClient) GetX(ctx context.Context, id int) *StatusR {\n\ts, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn s\n}",
"func (c *SymptomClient) GetX(ctx context.Context, id int) *Symptom {\n\ts, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn s\n}",
"func (c *TagClient) GetX(ctx context.Context, id int) *Tag {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *CoinInfoClient) GetX(ctx context.Context, id int32) *CoinInfo {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *WifiClient) GetX(ctx context.Context, id int) *Wifi {\n\tw, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn w\n}",
"func (c *UnitOfMedicineClient) GetX(ctx context.Context, id int) *UnitOfMedicine {\n\tuom, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn uom\n}",
"func (c *EmployeeClient) GetX(ctx context.Context, id int) *Employee {\n\te, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn e\n}",
"func (c *EmployeeClient) GetX(ctx context.Context, id int) *Employee {\n\te, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn e\n}",
"func (c *EmployeeClient) GetX(ctx context.Context, id int) *Employee {\n\te, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn e\n}",
"func (c *YearClient) GetX(ctx context.Context, id int) *Year {\n\ty, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn y\n}",
"func (x *V) Get(params ...interface{}) (*V, error) {\n\tif false == x.initialized {\n\t\treturn nil, errNotInitialized\n\t}\n\tif 0 == len(params) {\n\t\treturn nil, errNilParameter\n\t}\n\treturn x.getOrCreate(false, params...)\n}",
"func (c *OrderClient) GetX(ctx context.Context, id int) *Order {\n\to, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn o\n}",
"func (c *FoodmenuClient) GetX(ctx context.Context, id int) *Foodmenu {\n\tf, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn f\n}",
"func (c *DispenseMedicineClient) GetX(ctx context.Context, id int) *DispenseMedicine {\n\tdm, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn dm\n}",
"func (c *SkillClient) GetX(ctx context.Context, id int) *Skill {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *TitleClient) GetX(ctx context.Context, id int) *Title {\n\tt, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn t\n}",
"func Get(ctx *grumble.Context) error {\n\tclient, execCtx, cancel := newClientAndCtx(ctx, 5*time.Second)\n\tdefer cancel()\n\tval, err := client.Get(execCtx, &ldProto.Key{Key: ctx.Args.String(\"key\")})\n\tif err != nil || val.Key == \"\" {\n\t\treturn err\n\t}\n\treturn exec(ctx, handleKeyValueReturned(val))\n}",
"func (c *CustomerClient) GetX(ctx context.Context, id uuid.UUID) *Customer {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (_HelloWorld *HelloWorldCaller) Get(opts *bind.CallOpts) (string, error) {\n\tvar (\n\t\tret0 = new(string)\n\t)\n\tout := ret0\n\terr := _HelloWorld.contract.Call(opts, out, \"get\")\n\treturn *ret0, err\n}",
"func (c *PostClient) GetX(ctx context.Context, id int) *Post {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *BillingstatusClient) GetX(ctx context.Context, id int) *Billingstatus {\n\tb, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn b\n}",
"func (c *RentalstatusClient) GetX(ctx context.Context, id int) *Rentalstatus {\n\tr, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn r\n}",
"func (c *UserWalletClient) GetX(ctx context.Context, id int64) *UserWallet {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *SessionClient) GetX(ctx context.Context, id int) *Session {\n\ts, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn s\n}",
"func (c *ReviewClient) GetX(ctx context.Context, id int32) *Review {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *BookingClient) GetX(ctx context.Context, id int) *Booking {\n\tb, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn b\n}",
"func (c *RoomdetailClient) GetX(ctx context.Context, id int) *Roomdetail {\n\tr, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn r\n}",
"func (c *EventClient) GetX(ctx context.Context, id int) *Event {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *PositionassingmentClient) GetX(ctx context.Context, id int) *Positionassingment {\n\tpo, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn po\n}",
"func (c *PatientroomClient) GetX(ctx context.Context, id int) *Patientroom {\n\tpa, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pa\n}",
"func (c *PetClient) GetX(ctx context.Context, id uuid.UUID) *Pet {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *CompanyClient) GetX(ctx context.Context, id int) *Company {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}"
] |
[
"0.6648088",
"0.66232616",
"0.6614234",
"0.65871096",
"0.65850157",
"0.65770745",
"0.65643096",
"0.6542851",
"0.65330243",
"0.65330243",
"0.65308136",
"0.650719",
"0.6504791",
"0.6490283",
"0.646992",
"0.6468367",
"0.64682376",
"0.64650553",
"0.6458181",
"0.6422355",
"0.63974655",
"0.6378646",
"0.6378526",
"0.6364793",
"0.6364793",
"0.6364793",
"0.6363413",
"0.6343908",
"0.6337061",
"0.6314544",
"0.6314414",
"0.6313774",
"0.6306085",
"0.6301973",
"0.62907875",
"0.6286949",
"0.62817043",
"0.62810564",
"0.62810564",
"0.62810564",
"0.6278438",
"0.6277063",
"0.6277063",
"0.6277063",
"0.6277063",
"0.6277063",
"0.6277063",
"0.6259341",
"0.62574685",
"0.624377",
"0.6243153",
"0.62430567",
"0.62414294",
"0.624061",
"0.62399554",
"0.62399554",
"0.62374806",
"0.62366956",
"0.62356126",
"0.62356126",
"0.6230102",
"0.6222115",
"0.62028795",
"0.62028795",
"0.62019604",
"0.6201459",
"0.6201417",
"0.6201218",
"0.6197682",
"0.6193074",
"0.6190794",
"0.61871403",
"0.6174177",
"0.6164113",
"0.6163691",
"0.6160635",
"0.6160635",
"0.6160635",
"0.6154522",
"0.6145612",
"0.61301714",
"0.61289114",
"0.61262417",
"0.61218536",
"0.6111986",
"0.609726",
"0.60963184",
"0.6083303",
"0.60821086",
"0.6075694",
"0.60629153",
"0.6046808",
"0.60413235",
"0.60396445",
"0.60389733",
"0.6034747",
"0.601842",
"0.60099",
"0.60064715",
"0.60018194",
"0.5997112"
] |
0.0
|
-1
|
QueryUnsavedPost queries the unsaved_post edge of a UnsavedPostThumbnail.
|
func (c *UnsavedPostThumbnailClient) QueryUnsavedPost(upt *UnsavedPostThumbnail) *UnsavedPostQuery {
query := &UnsavedPostQuery{config: c.config}
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
id := upt.ID
step := sqlgraph.NewStep(
sqlgraph.From(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID, id),
sqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),
sqlgraph.Edge(sqlgraph.O2O, true, unsavedpostthumbnail.UnsavedPostTable, unsavedpostthumbnail.UnsavedPostColumn),
)
fromV = sqlgraph.Neighbors(upt.driver.Dialect(), step)
return fromV, nil
}
return query
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *UnsavedPostAttachmentClient) QueryUnsavedPost(upa *UnsavedPostAttachment) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upa.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostattachment.Table, unsavedpostattachment.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostattachment.UnsavedPostTable, unsavedpostattachment.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upa.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostImageClient) QueryUnsavedPost(upi *UnsavedPostImage) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upi.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostimage.Table, unsavedpostimage.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostimage.UnsavedPostTable, unsavedpostimage.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upi.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostVideoClient) QueryUnsavedPost(upv *UnsavedPostVideo) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upv.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostvideo.Table, unsavedpostvideo.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostvideo.UnsavedPostTable, unsavedpostvideo.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upv.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *AdminClient) QueryUnsavedPosts(a *Admin) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := a.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(admin.Table, admin.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, admin.UnsavedPostsTable, admin.UnsavedPostsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(a.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *CategoryClient) QueryUnsavedPosts(ca *Category) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := ca.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(category.Table, category.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, category.UnsavedPostsTable, category.UnsavedPostsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(ca.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostClient) QueryThumbnail(up *UnsavedPost) *UnsavedPostThumbnailQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, unsavedpost.ThumbnailTable, unsavedpost.ThumbnailColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *Category) QueryUnsavedPosts() *UnsavedPostQuery {\n\treturn (&CategoryClient{config: c.config}).QueryUnsavedPosts(c)\n}",
"func (upq *UnsavedPostQuery) QueryThumbnail() *UnsavedPostThumbnailQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, unsavedpost.ThumbnailTable, unsavedpost.ThumbnailColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostThumbnailClient) Get(ctx context.Context, id int) (*UnsavedPostThumbnail, error) {\n\treturn c.Query().Where(unsavedpostthumbnail.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostThumbnailClient) Query() *UnsavedPostThumbnailQuery {\n\treturn &UnsavedPostThumbnailQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *UnsavedPostImageClient) Get(ctx context.Context, id int) (*UnsavedPostImage, error) {\n\treturn c.Query().Where(unsavedpostimage.ID(id)).Only(ctx)\n}",
"func (upvc *UnsavedPostVideoCreate) SetUnsavedPost(u *UnsavedPost) *UnsavedPostVideoCreate {\n\treturn upvc.SetUnsavedPostID(u.ID)\n}",
"func (upq *UnsavedPostQuery) QueryImages() *UnsavedPostImageQuery {\n\tquery := &UnsavedPostImageQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostimage.Table, unsavedpostimage.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.ImagesTable, unsavedpost.ImagesColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostClient) Get(ctx context.Context, id int) (*UnsavedPost, error) {\n\treturn c.Query().Where(unsavedpost.ID(id)).Only(ctx)\n}",
"func (c *PostThumbnailClient) QueryPost(pt *PostThumbnail) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pt.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postthumbnail.Table, postthumbnail.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, true, postthumbnail.PostTable, postthumbnail.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pt.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostClient) QueryImages(up *UnsavedPost) *UnsavedPostImageQuery {\n\tquery := &UnsavedPostImageQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostimage.Table, unsavedpostimage.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.ImagesTable, unsavedpost.ImagesColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostAttachmentClient) Query() *UnsavedPostAttachmentQuery {\n\treturn &UnsavedPostAttachmentQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (upq *UnsavedPostQuery) WithThumbnail(opts ...func(*UnsavedPostThumbnailQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withThumbnail = query\n\treturn upq\n}",
"func (c *UnsavedPostClient) QueryAttachments(up *UnsavedPost) *UnsavedPostAttachmentQuery {\n\tquery := &UnsavedPostAttachmentQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostattachment.Table, unsavedpostattachment.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.AttachmentsTable, unsavedpost.AttachmentsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostImageClient) Query() *UnsavedPostImageQuery {\n\treturn &UnsavedPostImageQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *UnsavedPostClient) Query() *UnsavedPostQuery {\n\treturn &UnsavedPostQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (upq *UnsavedPostQuery) QueryAttachments() *UnsavedPostAttachmentQuery {\n\tquery := &UnsavedPostAttachmentQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostattachment.Table, unsavedpostattachment.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.AttachmentsTable, unsavedpost.AttachmentsColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostAttachmentClient) Get(ctx context.Context, id int) (*UnsavedPostAttachment, error) {\n\treturn c.Query().Where(unsavedpostattachment.ID(id)).Only(ctx)\n}",
"func (c *PostAttachmentClient) QueryPost(pa *PostAttachment) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pa.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postattachment.Table, postattachment.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, postattachment.PostTable, postattachment.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pa.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) Clone() *UnsavedPostQuery {\n\tif upq == nil {\n\t\treturn nil\n\t}\n\treturn &UnsavedPostQuery{\n\t\tconfig: upq.config,\n\t\tlimit: upq.limit,\n\t\toffset: upq.offset,\n\t\torder: append([]OrderFunc{}, upq.order...),\n\t\tpredicates: append([]predicate.UnsavedPost{}, upq.predicates...),\n\t\twithAuthor: upq.withAuthor.Clone(),\n\t\twithCategory: upq.withCategory.Clone(),\n\t\twithThumbnail: upq.withThumbnail.Clone(),\n\t\twithImages: upq.withImages.Clone(),\n\t\twithVideos: upq.withVideos.Clone(),\n\t\twithAttachments: upq.withAttachments.Clone(),\n\t\t// clone intermediate query.\n\t\tsql: upq.sql.Clone(),\n\t\tpath: upq.path,\n\t}\n}",
"func (c *PostClient) QueryThumbnail(po *Post) *PostThumbnailQuery {\n\tquery := &PostThumbnailQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := po.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(post.Table, post.FieldID, id),\n\t\t\tsqlgraph.To(postthumbnail.Table, postthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, post.ThumbnailTable, post.ThumbnailColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(po.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upvc *UnsavedPostVideoCreate) SetUnsavedPostID(id int) *UnsavedPostVideoCreate {\n\tupvc.mutation.SetUnsavedPostID(id)\n\treturn upvc\n}",
"func (upu *UnsavedPostUpdate) ClearThumbnail() *UnsavedPostUpdate {\n\tupu.mutation.ClearThumbnail()\n\treturn upu\n}",
"func (c *PostImageClient) QueryPost(pi *PostImage) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pi.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postimage.Table, postimage.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, postimage.PostTable, postimage.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pi.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *PostVideoClient) QueryPost(pv *PostVideo) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pv.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postvideo.Table, postvideo.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, postvideo.PostTable, postvideo.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pv.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) All(ctx context.Context) ([]*UnsavedPost, error) {\n\tif err := upq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn upq.sqlAll(ctx)\n}",
"func (c *UnsavedPostVideoClient) Get(ctx context.Context, id int) (*UnsavedPostVideo, error) {\n\treturn c.Query().Where(unsavedpostvideo.ID(id)).Only(ctx)\n}",
"func NewUnsavedPostThumbnailClient(c config) *UnsavedPostThumbnailClient {\n\treturn &UnsavedPostThumbnailClient{config: c}\n}",
"func (e CategoryEdges) UnsavedPostsOrErr() ([]*UnsavedPost, error) {\n\tif e.loadedTypes[1] {\n\t\treturn e.UnsavedPosts, nil\n\t}\n\treturn nil, &NotLoadedError{edge: \"unsaved_posts\"}\n}",
"func UnpublishPost(shorturl string) (types.Post, error) {\n\tdb := database.GetMySQLInstance()\n\tdefer db.Close()\n\tvar post types.Post\n\terr := db.Where(\"shorturl LIKE ?\", shorturl).First(&post).Error\n\tif err != nil && err == gorm.ErrRecordNotFound {\n\t\treturn post, errors.New(\"post not found\")\n\t}\n\n\terr = db.Model(&post).Updates(map[string]interface{}{\"published\": false}).Error\n\tif err != nil {\n\t\treturn post, err\n\t}\n\tpost.Published = false\n\treturn post, nil\n}",
"func (upq *UnsavedPostQuery) WithImages(opts ...func(*UnsavedPostImageQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostImageQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withImages = query\n\treturn upq\n}",
"func (upuo *UnsavedPostUpdateOne) ClearThumbnail() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearThumbnail()\n\treturn upuo\n}",
"func (c *UnsavedPostVideoClient) Query() *UnsavedPostVideoQuery {\n\treturn &UnsavedPostVideoQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (upq *UnsavedPostQuery) Where(ps ...predicate.UnsavedPost) *UnsavedPostQuery {\n\tupq.predicates = append(upq.predicates, ps...)\n\treturn upq\n}",
"func GetRecentPostMediaNoLogin(username string) (medias []IGMedia, err error) {\n\tui, err := GetUserInfoNoLogin(username)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tfor _, node := range ui.EdgeOwnerToTimelineMedia.Edges {\n\t\tmedias = append(medias, node.Node)\n\t}\n\treturn\n}",
"func NewUnsavedPostImageClient(c config) *UnsavedPostImageClient {\n\treturn &UnsavedPostImageClient{config: c}\n}",
"func (upq *UnsavedPostQuery) WithAttachments(opts ...func(*UnsavedPostAttachmentQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostAttachmentQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withAttachments = query\n\treturn upq\n}",
"func (upu *UnsavedPostUpdate) ClearImages() *UnsavedPostUpdate {\n\tupu.mutation.ClearImages()\n\treturn upu\n}",
"func (m *IGApiManager) GetRecentPostMedia(username string) (medias []IGMedia, err error) {\n\tui, err := m.GetUserInfo(username)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tfor _, node := range ui.EdgeOwnerToTimelineMedia.Edges {\n\t\tmedias = append(medias, node.Node)\n\t}\n\treturn\n}",
"func (upq *UnsavedPostQuery) QueryVideos() *UnsavedPostVideoQuery {\n\tquery := &UnsavedPostVideoQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostvideo.Table, unsavedpostvideo.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.VideosTable, unsavedpost.VideosColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func NewUnsavedPostClient(c config) *UnsavedPostClient {\n\treturn &UnsavedPostClient{config: c}\n}",
"func (c *UnsavedPostClient) QueryCategory(up *UnsavedPost) *CategoryQuery {\n\tquery := &CategoryQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(category.Table, category.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpost.CategoryTable, unsavedpost.CategoryColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) QueryAuthor() *AdminQuery {\n\tquery := &AdminQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(admin.Table, admin.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpost.AuthorTable, unsavedpost.AuthorColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostThumbnailClient) GetX(ctx context.Context, id int) *UnsavedPostThumbnail {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *UnsavedPostClient) QueryAuthor(up *UnsavedPost) *AdminQuery {\n\tquery := &AdminQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(admin.Table, admin.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpost.AuthorTable, unsavedpost.AuthorColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func NewUnsavedPostAttachmentClient(c config) *UnsavedPostAttachmentClient {\n\treturn &UnsavedPostAttachmentClient{config: c}\n}",
"func (c *UnsavedPostClient) QueryVideos(up *UnsavedPost) *UnsavedPostVideoQuery {\n\tquery := &UnsavedPostVideoQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostvideo.Table, unsavedpostvideo.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.VideosTable, unsavedpost.VideosColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upuo *UnsavedPostUpdateOne) Save(ctx context.Context) (*UnsavedPost, error) {\n\tvar (\n\t\terr error\n\t\tnode *UnsavedPost\n\t)\n\tupuo.defaults()\n\tif len(upuo.hooks) == 0 {\n\t\tif err = upuo.check(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tnode, err = upuo.sqlSave(ctx)\n\t} else {\n\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\tmutation, ok := m.(*UnsavedPostMutation)\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t}\n\t\t\tif err = upuo.check(); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tupuo.mutation = mutation\n\t\t\tnode, err = upuo.sqlSave(ctx)\n\t\t\tmutation.done = true\n\t\t\treturn node, err\n\t\t})\n\t\tfor i := len(upuo.hooks) - 1; i >= 0; i-- {\n\t\t\tmut = upuo.hooks[i](mut)\n\t\t}\n\t\tif _, err := mut.Mutate(ctx, upuo.mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn node, err\n}",
"func (upq *UnsavedPostQuery) AllX(ctx context.Context) []*UnsavedPost {\n\tnodes, err := upq.All(ctx)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn nodes\n}",
"func (upq *UnsavedPostQuery) QueryCategory() *CategoryQuery {\n\tquery := &CategoryQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(category.Table, category.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpost.CategoryTable, unsavedpost.CategoryColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (item *Item) Unsave() error {\n\treturn item.changeSave(urlMediaUnsave)\n}",
"func (upu *UnsavedPostUpdate) ClearSlug() *UnsavedPostUpdate {\n\tupu.mutation.ClearSlug()\n\treturn upu\n}",
"func (c *PostClient) QueryImages(po *Post) *PostImageQuery {\n\tquery := &PostImageQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := po.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(post.Table, post.FieldID, id),\n\t\t\tsqlgraph.To(postimage.Table, postimage.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, post.ImagesTable, post.ImagesColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(po.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostThumbnailClient) Delete() *UnsavedPostThumbnailDelete {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpDelete)\n\treturn &UnsavedPostThumbnailDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *AdminClient) QueryPosts(a *Admin) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := a.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(admin.Table, admin.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, admin.PostsTable, admin.PostsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(a.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) FirstX(ctx context.Context) *UnsavedPost {\n\tnode, err := upq.First(ctx)\n\tif err != nil && !IsNotFound(err) {\n\t\tpanic(err)\n\t}\n\treturn node\n}",
"func (c *UnsavedPostClient) GetX(ctx context.Context, id int) *UnsavedPost {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func NewUnsavedPostVideoClient(c config) *UnsavedPostVideoClient {\n\treturn &UnsavedPostVideoClient{config: c}\n}",
"func (postL) LoadPostHistories(ctx context.Context, e boil.ContextExecutor, singular bool, maybePost interface{}, mods queries.Applicator) error {\n\tvar slice []*Post\n\tvar object *Post\n\n\tif singular {\n\t\tobject = maybePost.(*Post)\n\t} else {\n\t\tslice = *maybePost.(*[]*Post)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &postR{}\n\t\t}\n\t\targs = append(args, object.ID)\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &postR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif a == obj.ID {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.ID)\n\t\t}\n\t}\n\n\tquery := NewQuery(qm.From(`post_histories`), qm.WhereIn(`post_id in ?`, args...))\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.QueryContext(ctx, e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load post_histories\")\n\t}\n\n\tvar resultSlice []*PostHistory\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice post_histories\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results in eager load on post_histories\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for post_histories\")\n\t}\n\n\tif len(postHistoryAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif singular {\n\t\tobject.R.PostHistories = resultSlice\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif foreign.R == nil {\n\t\t\t\tforeign.R = &postHistoryR{}\n\t\t\t}\n\t\t\tforeign.R.Post = object\n\t\t}\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif local.ID == foreign.PostID {\n\t\t\t\tlocal.R.PostHistories = append(local.R.PostHistories, foreign)\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &postHistoryR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.Post = local\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (c *UnsavedPostImageClient) GetX(ctx context.Context, id int) *UnsavedPostImage {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func UnpublishBlogPost(ctx context.Context, id string) error {\n\tq := datastore.NewQuery(blogPostVersionKind).\n\t\tFilter(\"PostID=\", id).\n\t\tFilter(\"Published=\", true)\n\n\tvar posts []BlogPostVersion\n\tk, err := q.GetAll(ctx, &posts)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor i := range posts {\n\t\tposts[i].Published = false\n\t}\n\n\t_, err = datastore.PutMulti(ctx, k, posts)\n\treturn err\n}",
"func (upu *UnsavedPostUpdate) Where(ps ...predicate.UnsavedPost) *UnsavedPostUpdate {\n\tupu.mutation.predicates = append(upu.mutation.predicates, ps...)\n\treturn upu\n}",
"func (c *PostClient) QueryAttachments(po *Post) *PostAttachmentQuery {\n\tquery := &PostAttachmentQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := po.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(post.Table, post.FieldID, id),\n\t\t\tsqlgraph.To(postattachment.Table, postattachment.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, post.AttachmentsTable, post.AttachmentsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(po.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func NewPDFUnsavedSig() *PDFUnsavedSig {\n\treturn (*PDFUnsavedSig)(allocPDFUnsavedSigMemory(1))\n}",
"func (upq *UnsavedPostQuery) OnlyX(ctx context.Context) *UnsavedPost {\n\tnode, err := upq.Only(ctx)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn node\n}",
"func (upvc *UnsavedPostVideoCreate) Save(ctx context.Context) (*UnsavedPostVideo, error) {\n\tvar (\n\t\terr error\n\t\tnode *UnsavedPostVideo\n\t)\n\tupvc.defaults()\n\tif len(upvc.hooks) == 0 {\n\t\tif err = upvc.check(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tnode, err = upvc.sqlSave(ctx)\n\t} else {\n\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\tmutation, ok := m.(*UnsavedPostVideoMutation)\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t}\n\t\t\tif err = upvc.check(); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tupvc.mutation = mutation\n\t\t\tnode, err = upvc.sqlSave(ctx)\n\t\t\tmutation.done = true\n\t\t\treturn node, err\n\t\t})\n\t\tfor i := len(upvc.hooks) - 1; i >= 0; i-- {\n\t\t\tmut = upvc.hooks[i](mut)\n\t\t}\n\t\tif _, err := mut.Mutate(ctx, upvc.mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn node, err\n}",
"func (upu *UnsavedPostUpdate) ClearAttachments() *UnsavedPostUpdate {\n\tupu.mutation.ClearAttachments()\n\treturn upu\n}",
"func (postL) LoadPostUploadFiles(ctx context.Context, e boil.ContextExecutor, singular bool, maybePost interface{}, mods queries.Applicator) error {\n\tvar slice []*Post\n\tvar object *Post\n\n\tif singular {\n\t\tobject = maybePost.(*Post)\n\t} else {\n\t\tslice = *maybePost.(*[]*Post)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &postR{}\n\t\t}\n\t\targs = append(args, object.ID)\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &postR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif a == obj.ID {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.ID)\n\t\t}\n\t}\n\n\tquery := NewQuery(qm.From(`post_upload_files`), qm.WhereIn(`post_id in ?`, args...))\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.QueryContext(ctx, e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load post_upload_files\")\n\t}\n\n\tvar resultSlice []*PostUploadFile\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice post_upload_files\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results in eager load on post_upload_files\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for post_upload_files\")\n\t}\n\n\tif len(postUploadFileAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif singular {\n\t\tobject.R.PostUploadFiles = resultSlice\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif foreign.R == nil {\n\t\t\t\tforeign.R = &postUploadFileR{}\n\t\t\t}\n\t\t\tforeign.R.Post = object\n\t\t}\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif local.ID == foreign.PostID {\n\t\t\t\tlocal.R.PostUploadFiles = append(local.R.PostUploadFiles, foreign)\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &postUploadFileR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.Post = local\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (upq *UnsavedPostQuery) WithAuthor(opts ...func(*AdminQuery)) *UnsavedPostQuery {\n\tquery := &AdminQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withAuthor = query\n\treturn upq\n}",
"func NewGraphqlPostUnprocessableEntity() *GraphqlPostUnprocessableEntity {\n\n\treturn &GraphqlPostUnprocessableEntity{}\n}",
"func (upuo *UnsavedPostUpdateOne) ClearImages() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearImages()\n\treturn upuo\n}",
"func (s *MockStore) DelPost(id int) error {\n\t_, err := s.GetPost(id)\n\tdelete(s.mem, id)\n\n\treturn err\n}",
"func (env *Env) GetUnpublishedPosts(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\tuser := ctx.Value(contextUser).(*models.User)\n\t// Just a double check - should we remove?\n\tif user.Role != \"ADMIN\" {\n\t\tw.WriteHeader(http.StatusForbidden)\n\t}\n\tp, err := env.DB.UnpublishedPosts()\n\tif err != nil {\n\t\tenv.log(r, err)\n\t\tw.WriteHeader(http.StatusNotFound)\n\t\treturn\n\t}\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tw.WriteHeader(http.StatusOK)\n\tjson.NewEncoder(w).Encode(p)\n}",
"func (w *Window) PostEmpty() {\n\tglfw.PostEmptyEvent()\n}",
"func (c *PostThumbnailClient) Query() *PostThumbnailQuery {\n\treturn &PostThumbnailQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func NewPDFUnsavedSigRef(ref unsafe.Pointer) *PDFUnsavedSig {\n\treturn (*PDFUnsavedSig)(ref)\n}",
"func (c *PostThumbnailClient) Get(ctx context.Context, id int) (*PostThumbnail, error) {\n\treturn c.Query().Where(postthumbnail.ID(id)).Only(ctx)\n}",
"func (upq *UnsavedPostQuery) WithCategory(opts ...func(*CategoryQuery)) *UnsavedPostQuery {\n\tquery := &CategoryQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withCategory = query\n\treturn upq\n}",
"func (c *commentsQueryBuilder) RemovePost() (int64, error) {\n\tif c.err != nil {\n\t\treturn 0, c.err\n\t}\n\trelation, err := NRN_Comments.Model.RelationByIndex(2)\n\tif err != nil {\n\t\treturn 0, errors.Wrapf(mapping.ErrInternal, \"getting 'Post' relation by index for model 'Comment' failed: %v\", err)\n\t}\n\treturn c.builder.RemoveRelations(relation)\n}",
"func NewGraphqlPostUnauthorized() *GraphqlPostUnauthorized {\n\n\treturn &GraphqlPostUnauthorized{}\n}",
"func (c *UnsavedPostAttachmentClient) GetX(ctx context.Context, id int) *UnsavedPostAttachment {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (upu *UnsavedPostUpdate) Mutation() *UnsavedPostMutation {\n\treturn upu.mutation\n}",
"func (b *GroupsSetLongPollSettingsBuilder) BoardPostRestore(v bool) *GroupsSetLongPollSettingsBuilder {\n\tb.Params[\"board_post_restore\"] = v\n\treturn b\n}",
"func (upu *UnsavedPostUpdate) ClearTitle() *UnsavedPostUpdate {\n\tupu.mutation.ClearTitle()\n\treturn upu\n}",
"func DeletePost(shorturl string, s3Agent *upload.S3Agent) (interface{}, error) {\n\tdb := database.GetMySQLInstance()\n\tdefer db.Close()\n\n\tvar post types.Post\n\terr := db.Where(\"shorturl LIKE ?\", shorturl).First(&post).Error\n\n\tif err != nil && err == gorm.ErrRecordNotFound {\n\t\treturn nil, ErrPostNotFound\n\t}\n\n\tsuccessReturn := map[string]interface{}{\"msg\": \"success\", \"pid\": post.ID}\n\n\t_, err = s3Agent.DeleteFiles(s3Agent.BucketName, post.Images)\n\tif err != nil {\n\t\treturn nil, ErrResourceRemoveFailure\n\t}\n\n\terr = db.Unscoped().Delete(&post).Error\n\tif err != nil {\n\t\tlog.Debug(err)\n\t\treturn nil, ErrResourceRemoveFailure\n\t}\n\n\treturn successReturn, nil\n}",
"func (r *Resolver) PostQueryResolver(params graphql.ResolveParams) (interface{}, error) {\n\t// Strip the id from arguments and assert type\n\tid, ok := params.Args[\"id\"].(int)\n\tif ok {\n\t\tposts, err := r.Repository.GetByID(id)\n\t\treturn posts, err\n\t}\n\n\t// We didn't get a valid ID as a param, so we return all the posts\n\treturn r.Repository.GetAllPosts()\n}",
"func (upq *UnsavedPostQuery) Count(ctx context.Context) (int, error) {\n\tif err := upq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn upq.sqlCount(ctx)\n}",
"func (c *UnsavedPostImageClient) Delete() *UnsavedPostImageDelete {\n\tmutation := newUnsavedPostImageMutation(c.config, OpDelete)\n\treturn &UnsavedPostImageDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upq *UnsavedPostQuery) WithVideos(opts ...func(*UnsavedPostVideoQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostVideoQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withVideos = query\n\treturn upq\n}",
"func (b *GroupsSetCallbackSettingsBuilder) BoardPostRestore(v bool) *GroupsSetCallbackSettingsBuilder {\n\tb.Params[\"board_post_restore\"] = v\n\treturn b\n}",
"func NewPostFavoritesItemsUnprocessableEntity() *PostFavoritesItemsUnprocessableEntity {\n\treturn &PostFavoritesItemsUnprocessableEntity{}\n}",
"func (ps PostStorage) GetPost(ctx sdk.Context, permlink linotypes.Permlink) (*Post, sdk.Error) {\n\tstore := ctx.KVStore(ps.key)\n\tkey := GetPostInfoKey(permlink)\n\tinfoByte := store.Get(key)\n\tif infoByte == nil {\n\t\treturn nil, types.ErrPostNotFound(permlink)\n\t}\n\tpostInfo := new(Post)\n\tps.cdc.MustUnmarshalBinaryLengthPrefixed(infoByte, postInfo)\n\treturn postInfo, nil\n}",
"func (c *UnsavedPostThumbnailClient) Update() *UnsavedPostThumbnailUpdate {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpUpdate)\n\treturn &UnsavedPostThumbnailUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upuo *UnsavedPostUpdateOne) SaveX(ctx context.Context) *UnsavedPost {\n\tnode, err := upuo.Save(ctx)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn node\n}",
"func (c *UnsavedPostClient) Delete() *UnsavedPostDelete {\n\tmutation := newUnsavedPostMutation(c.config, OpDelete)\n\treturn &UnsavedPostDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}"
] |
[
"0.77391493",
"0.7710356",
"0.73840326",
"0.7054647",
"0.67580664",
"0.6514923",
"0.64483786",
"0.64457995",
"0.5995168",
"0.580462",
"0.57371396",
"0.5665279",
"0.5639509",
"0.5636834",
"0.56267315",
"0.5585776",
"0.555773",
"0.54915375",
"0.54293525",
"0.541497",
"0.536486",
"0.5292378",
"0.5287175",
"0.5275748",
"0.5258336",
"0.5251181",
"0.5193467",
"0.50985336",
"0.5095856",
"0.49739912",
"0.4923637",
"0.49001458",
"0.48553827",
"0.48506275",
"0.47570848",
"0.4661156",
"0.4631073",
"0.45835882",
"0.45414996",
"0.45224434",
"0.44753745",
"0.4458777",
"0.4408442",
"0.43900418",
"0.4379397",
"0.43759537",
"0.43714088",
"0.43663916",
"0.43489584",
"0.43074277",
"0.4298079",
"0.4295653",
"0.4277104",
"0.42730168",
"0.42405993",
"0.42328814",
"0.4209216",
"0.41665775",
"0.41627938",
"0.41593558",
"0.41274518",
"0.4113047",
"0.40689272",
"0.40631324",
"0.40555736",
"0.4053589",
"0.40489867",
"0.4036346",
"0.39901903",
"0.3980115",
"0.39677507",
"0.39625302",
"0.39588714",
"0.39465255",
"0.39418587",
"0.39366728",
"0.39139736",
"0.38911524",
"0.38731438",
"0.38680574",
"0.3851979",
"0.38501662",
"0.38451946",
"0.38420516",
"0.38332835",
"0.38239044",
"0.3821341",
"0.3813625",
"0.38113877",
"0.3808885",
"0.38003847",
"0.3785632",
"0.3784815",
"0.3781306",
"0.37690404",
"0.37491283",
"0.37378448",
"0.3735899",
"0.3734951",
"0.3730349"
] |
0.81769496
|
0
|
Hooks returns the client hooks.
|
func (c *UnsavedPostThumbnailClient) Hooks() []Hook {
return c.hooks.UnsavedPostThumbnail
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *OperationClient) Hooks() []Hook {\n\treturn c.hooks.Operation\n}",
"func (c *ToolClient) Hooks() []Hook {\n\treturn c.hooks.Tool\n}",
"func (c *TagClient) Hooks() []Hook {\n\treturn c.hooks.Tag\n}",
"func (c *ComplaintClient) Hooks() []Hook {\n\treturn c.hooks.Complaint\n}",
"func (c *PostClient) Hooks() []Hook {\n\treturn c.hooks.Post\n}",
"func (c *ClubapplicationClient) Hooks() []Hook {\n\treturn c.hooks.Clubapplication\n}",
"func (c *ClinicClient) Hooks() []Hook {\n\treturn c.hooks.Clinic\n}",
"func (c *EventClient) Hooks() []Hook {\n\treturn c.hooks.Event\n}",
"func (c *BuildingClient) Hooks() []Hook {\n\treturn c.hooks.Building\n}",
"func (c *OperativeClient) Hooks() []Hook {\n\treturn c.hooks.Operative\n}",
"func (c *SituationClient) Hooks() []Hook {\n\treturn c.hooks.Situation\n}",
"func (c *AppointmentClient) Hooks() []Hook {\n\treturn c.hooks.Appointment\n}",
"func (c *RentalstatusClient) Hooks() []Hook {\n\treturn c.hooks.Rentalstatus\n}",
"func (c *LeaseClient) Hooks() []Hook {\n\treturn c.hooks.Lease\n}",
"func (c *ReturninvoiceClient) Hooks() []Hook {\n\treturn c.hooks.Returninvoice\n}",
"func (c *ClubappStatusClient) Hooks() []Hook {\n\treturn c.hooks.ClubappStatus\n}",
"func (c *ReviewClient) Hooks() []Hook {\n\treturn c.hooks.Review\n}",
"func (c *EmployeeClient) Hooks() []Hook {\n\treturn c.hooks.Employee\n}",
"func (c *EmployeeClient) Hooks() []Hook {\n\treturn c.hooks.Employee\n}",
"func (c *EmployeeClient) Hooks() []Hook {\n\treturn c.hooks.Employee\n}",
"func (c *WorkExperienceClient) Hooks() []Hook {\n\treturn c.hooks.WorkExperience\n}",
"func (c *PartClient) Hooks() []Hook {\n\treturn c.hooks.Part\n}",
"func (c *CleanernameClient) Hooks() []Hook {\n\treturn c.hooks.Cleanername\n}",
"func (c *BeerClient) Hooks() []Hook {\n\treturn c.hooks.Beer\n}",
"func (c *FoodmenuClient) Hooks() []Hook {\n\treturn c.hooks.Foodmenu\n}",
"func (c *RepairinvoiceClient) Hooks() []Hook {\n\treturn c.hooks.Repairinvoice\n}",
"func (c *StatusdClient) Hooks() []Hook {\n\treturn c.hooks.Statusd\n}",
"func (c *EmptyClient) Hooks() []Hook {\n\treturn c.hooks.Empty\n}",
"func (c *BillClient) Hooks() []Hook {\n\treturn c.hooks.Bill\n}",
"func (c *BillClient) Hooks() []Hook {\n\treturn c.hooks.Bill\n}",
"func (c *BillClient) Hooks() []Hook {\n\treturn c.hooks.Bill\n}",
"func (c *CompanyClient) Hooks() []Hook {\n\treturn c.hooks.Company\n}",
"func (c *CompanyClient) Hooks() []Hook {\n\treturn c.hooks.Company\n}",
"func (c *IPClient) Hooks() []Hook {\n\treturn c.hooks.IP\n}",
"func (c *VeterinarianClient) Hooks() []Hook {\n\treturn c.hooks.Veterinarian\n}",
"func (c *MedicineClient) Hooks() []Hook {\n\treturn c.hooks.Medicine\n}",
"func (c *PrescriptionClient) Hooks() []Hook {\n\treturn c.hooks.Prescription\n}",
"func (c *TransactionClient) Hooks() []Hook {\n\treturn c.hooks.Transaction\n}",
"func (c *CategoryClient) Hooks() []Hook {\n\treturn c.hooks.Category\n}",
"func (c *KeyStoreClient) Hooks() []Hook {\n\treturn c.hooks.KeyStore\n}",
"func (c *PetruleClient) Hooks() []Hook {\n\treturn c.hooks.Petrule\n}",
"func (c *LevelOfDangerousClient) Hooks() []Hook {\n\treturn c.hooks.LevelOfDangerous\n}",
"func (c *AdminClient) Hooks() []Hook {\n\treturn c.hooks.Admin\n}",
"func (c *JobClient) Hooks() []Hook {\n\treturn c.hooks.Job\n}",
"func (c *OrderClient) Hooks() []Hook {\n\treturn c.hooks.Order\n}",
"func (c *PetClient) Hooks() []Hook {\n\treturn c.hooks.Pet\n}",
"func (c *MealplanClient) Hooks() []Hook {\n\treturn c.hooks.Mealplan\n}",
"func (c *DNSBLResponseClient) Hooks() []Hook {\n\treturn c.hooks.DNSBLResponse\n}",
"func (c *RepairInvoiceClient) Hooks() []Hook {\n\treturn c.hooks.RepairInvoice\n}",
"func (c *DoctorClient) Hooks() []Hook {\n\treturn c.hooks.Doctor\n}",
"func (c *StatustClient) Hooks() []Hook {\n\treturn c.hooks.Statust\n}",
"func (c *EatinghistoryClient) Hooks() []Hook {\n\treturn c.hooks.Eatinghistory\n}",
"func (c *StaytypeClient) Hooks() []Hook {\n\treturn c.hooks.Staytype\n}",
"func (c *CustomerClient) Hooks() []Hook {\n\treturn c.hooks.Customer\n}",
"func (c *StatusRClient) Hooks() []Hook {\n\treturn c.hooks.StatusR\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UnitOfMedicineClient) Hooks() []Hook {\n\treturn c.hooks.UnitOfMedicine\n}",
"func (c *YearClient) Hooks() []Hook {\n\treturn c.hooks.Year\n}",
"func (c *ClubClient) Hooks() []Hook {\n\treturn c.hooks.Club\n}",
"func (c *PaymentClient) Hooks() []Hook {\n\treturn c.hooks.Payment\n}",
"func (c *PaymentClient) Hooks() []Hook {\n\treturn c.hooks.Payment\n}",
"func (c *DentistClient) Hooks() []Hook {\n\treturn c.hooks.Dentist\n}",
"func (c *BookingClient) Hooks() []Hook {\n\treturn c.hooks.Booking\n}",
"func (c *DisciplineClient) Hooks() []Hook {\n\treturn c.hooks.Discipline\n}",
"func (c *PlanetClient) Hooks() []Hook {\n\treturn c.hooks.Planet\n}",
"func (c *OperationroomClient) Hooks() []Hook {\n\treturn c.hooks.Operationroom\n}",
"func (c *LengthtimeClient) Hooks() []Hook {\n\treturn c.hooks.Lengthtime\n}",
"func (c *DispenseMedicineClient) Hooks() []Hook {\n\treturn c.hooks.DispenseMedicine\n}",
"func (c *PartorderClient) Hooks() []Hook {\n\treturn c.hooks.Partorder\n}",
"func (c *PatientInfoClient) Hooks() []Hook {\n\treturn c.hooks.PatientInfo\n}",
"func (c *SkillClient) Hooks() []Hook {\n\treturn c.hooks.Skill\n}",
"func (c *PharmacistClient) Hooks() []Hook {\n\treturn c.hooks.Pharmacist\n}",
"func (c *TitleClient) Hooks() []Hook {\n\treturn c.hooks.Title\n}",
"func (c *DepositClient) Hooks() []Hook {\n\treturn c.hooks.Deposit\n}",
"func (c *SessionClient) Hooks() []Hook {\n\treturn c.hooks.Session\n}",
"func (c *PostImageClient) Hooks() []Hook {\n\treturn c.hooks.PostImage\n}",
"func (c *DrugAllergyClient) Hooks() []Hook {\n\treturn c.hooks.DrugAllergy\n}",
"func (c *TimerClient) Hooks() []Hook {\n\treturn c.hooks.Timer\n}",
"func (c *PostAttachmentClient) Hooks() []Hook {\n\treturn c.hooks.PostAttachment\n}",
"func (c *PhysicianClient) Hooks() []Hook {\n\treturn c.hooks.Physician\n}",
"func (c *PhysicianClient) Hooks() []Hook {\n\treturn c.hooks.Physician\n}",
"func (c *PatientClient) Hooks() []Hook {\n\treturn c.hooks.Patient\n}",
"func (c *PatientClient) Hooks() []Hook {\n\treturn c.hooks.Patient\n}",
"func (c *PatientClient) Hooks() []Hook {\n\treturn c.hooks.Patient\n}",
"func (c *PostThumbnailClient) Hooks() []Hook {\n\treturn c.hooks.PostThumbnail\n}",
"func (c *BedtypeClient) Hooks() []Hook {\n\treturn c.hooks.Bedtype\n}",
"func (c *CoinInfoClient) Hooks() []Hook {\n\treturn c.hooks.CoinInfo\n}",
"func (c *OperativerecordClient) Hooks() []Hook {\n\treturn c.hooks.Operativerecord\n}",
"func (c *ActivitiesClient) Hooks() []Hook {\n\treturn c.hooks.Activities\n}",
"func (c *AdminSessionClient) Hooks() []Hook {\n\treturn c.hooks.AdminSession\n}",
"func (c *MedicineTypeClient) Hooks() []Hook {\n\treturn c.hooks.MedicineType\n}"
] |
[
"0.80325735",
"0.790398",
"0.78864676",
"0.78840053",
"0.78618014",
"0.78288174",
"0.7817571",
"0.7800003",
"0.77909994",
"0.77634746",
"0.7746418",
"0.77408934",
"0.7737971",
"0.77244073",
"0.77163273",
"0.771004",
"0.76985544",
"0.7696134",
"0.7696134",
"0.7696134",
"0.76921564",
"0.76725936",
"0.76697093",
"0.7666844",
"0.76660186",
"0.765927",
"0.7627814",
"0.7619907",
"0.7617588",
"0.7617588",
"0.7617588",
"0.7613897",
"0.7613897",
"0.76138216",
"0.760849",
"0.7607455",
"0.76074445",
"0.7601674",
"0.75984216",
"0.75958437",
"0.75944996",
"0.7589656",
"0.7585323",
"0.75841326",
"0.75812864",
"0.7569302",
"0.7560664",
"0.75604796",
"0.75519186",
"0.75509745",
"0.7532829",
"0.7532022",
"0.75310445",
"0.7526489",
"0.75222003",
"0.75040776",
"0.75040776",
"0.75040776",
"0.75040776",
"0.75040776",
"0.75040776",
"0.75040776",
"0.75040776",
"0.75040776",
"0.75040776",
"0.75040776",
"0.75038844",
"0.750118",
"0.74977213",
"0.7493581",
"0.7493581",
"0.7492812",
"0.7492088",
"0.7490202",
"0.7483538",
"0.7482547",
"0.74728894",
"0.7463062",
"0.74548906",
"0.74490273",
"0.7446456",
"0.74431694",
"0.74349844",
"0.7420574",
"0.7416939",
"0.74114937",
"0.74111134",
"0.7409104",
"0.7395227",
"0.7395143",
"0.7395143",
"0.73937327",
"0.73937327",
"0.73937327",
"0.73888427",
"0.7388035",
"0.73768663",
"0.7369236",
"0.7357418",
"0.73540497",
"0.7353824"
] |
0.0
|
-1
|
NewUnsavedPostVideoClient returns a client for the UnsavedPostVideo from the given config.
|
func NewUnsavedPostVideoClient(c config) *UnsavedPostVideoClient {
return &UnsavedPostVideoClient{config: c}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func NewPostVideoClient(c config) *PostVideoClient {\n\treturn &PostVideoClient{config: c}\n}",
"func NewUnsavedPostClient(c config) *UnsavedPostClient {\n\treturn &UnsavedPostClient{config: c}\n}",
"func (c *UnsavedPostVideoClient) Delete() *UnsavedPostVideoDelete {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpDelete)\n\treturn &UnsavedPostVideoDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostVideoClient) Get(ctx context.Context, id int) (*UnsavedPostVideo, error) {\n\treturn c.Query().Where(unsavedpostvideo.ID(id)).Only(ctx)\n}",
"func NewUnsavedPostAttachmentClient(c config) *UnsavedPostAttachmentClient {\n\treturn &UnsavedPostAttachmentClient{config: c}\n}",
"func (c *UnsavedPostVideoClient) Create() *UnsavedPostVideoCreate {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpCreate)\n\treturn &UnsavedPostVideoCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func NewUnsavedPostImageClient(c config) *UnsavedPostImageClient {\n\treturn &UnsavedPostImageClient{config: c}\n}",
"func NewUnsavedPostThumbnailClient(c config) *UnsavedPostThumbnailClient {\n\treturn &UnsavedPostThumbnailClient{config: c}\n}",
"func (c *PostVideoClient) Delete() *PostVideoDelete {\n\tmutation := newPostVideoMutation(c.config, OpDelete)\n\treturn &PostVideoDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostVideoClient) Get(ctx context.Context, id int) (*PostVideo, error) {\n\treturn c.Query().Where(postvideo.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostVideoClient) Query() *UnsavedPostVideoQuery {\n\treturn &UnsavedPostVideoQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *UnsavedPostVideoClient) Update() *UnsavedPostVideoUpdate {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpUpdate)\n\treturn &UnsavedPostVideoUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upu *UnsavedPostUpdate) ClearVideos() *UnsavedPostUpdate {\n\tupu.mutation.ClearVideos()\n\treturn upu\n}",
"func (c *PostVideoClient) Create() *PostVideoCreate {\n\tmutation := newPostVideoMutation(c.config, OpCreate)\n\treturn &PostVideoCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostVideoClient) QueryUnsavedPost(upv *UnsavedPostVideo) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upv.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostvideo.Table, unsavedpostvideo.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostvideo.UnsavedPostTable, unsavedpostvideo.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upv.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upvc *UnsavedPostVideoCreate) Save(ctx context.Context) (*UnsavedPostVideo, error) {\n\tvar (\n\t\terr error\n\t\tnode *UnsavedPostVideo\n\t)\n\tupvc.defaults()\n\tif len(upvc.hooks) == 0 {\n\t\tif err = upvc.check(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tnode, err = upvc.sqlSave(ctx)\n\t} else {\n\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\tmutation, ok := m.(*UnsavedPostVideoMutation)\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t}\n\t\t\tif err = upvc.check(); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tupvc.mutation = mutation\n\t\t\tnode, err = upvc.sqlSave(ctx)\n\t\t\tmutation.done = true\n\t\t\treturn node, err\n\t\t})\n\t\tfor i := len(upvc.hooks) - 1; i >= 0; i-- {\n\t\t\tmut = upvc.hooks[i](mut)\n\t\t}\n\t\tif _, err := mut.Mutate(ctx, upvc.mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn node, err\n}",
"func (c *UnsavedPostClient) Get(ctx context.Context, id int) (*UnsavedPost, error) {\n\treturn c.Query().Where(unsavedpost.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostClient) Delete() *UnsavedPostDelete {\n\tmutation := newUnsavedPostMutation(c.config, OpDelete)\n\treturn &UnsavedPostDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upq *UnsavedPostQuery) WithVideos(opts ...func(*UnsavedPostVideoQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostVideoQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withVideos = query\n\treturn upq\n}",
"func (upuo *UnsavedPostUpdateOne) ClearVideos() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearVideos()\n\treturn upuo\n}",
"func NewPostClient(c config) *PostClient {\n\treturn &PostClient{config: c}\n}",
"func NewCreateVideoUploadTaskRequestWithoutParam() *CreateVideoUploadTaskRequest {\n\n return &CreateVideoUploadTaskRequest{\n JDCloudRequest: core.JDCloudRequest{\n URL: \"/videoUploadTask\",\n Method: \"POST\",\n Header: nil,\n Version: \"v1\",\n },\n }\n}",
"func (upvc *UnsavedPostVideoCreate) SetUnsavedPostID(id int) *UnsavedPostVideoCreate {\n\tupvc.mutation.SetUnsavedPostID(id)\n\treturn upvc\n}",
"func NewVideosClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VideosClient, error) {\n\tif options == nil {\n\t\toptions = &arm.ClientOptions{}\n\t}\n\tep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint\n\tif c, ok := options.Cloud.Services[cloud.ResourceManager]; ok {\n\t\tep = c.Endpoint\n\t}\n\tpl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tclient := &VideosClient{\n\t\tsubscriptionID: subscriptionID,\n\t\thost: ep,\n\t\tpl: pl,\n\t}\n\treturn client, nil\n}",
"func (c *UnsavedPostImageClient) Get(ctx context.Context, id int) (*UnsavedPostImage, error) {\n\treturn c.Query().Where(unsavedpostimage.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostThumbnailClient) Get(ctx context.Context, id int) (*UnsavedPostThumbnail, error) {\n\treturn c.Query().Where(unsavedpostthumbnail.ID(id)).Only(ctx)\n}",
"func (upvc *UnsavedPostVideoCreate) SetUnsavedPost(u *UnsavedPost) *UnsavedPostVideoCreate {\n\treturn upvc.SetUnsavedPostID(u.ID)\n}",
"func New(c Config) Client {\n\t// Generate secret proof. See https://developers.facebook.com/docs/graph-api/securing-requests/#appsecret_proof\n\tmac := hmac.New(sha256.New, []byte(c.Secret))\n\tmac.Write([]byte(c.Token))\n\n\tapi := strings.TrimSuffix(c.API, \"/\")\n\tif api == \"\" {\n\t\tapi = defaultAPI\n\t}\n\n\treturn Client{\n\t\ttoken: c.Token,\n\t\tsecretProof: hex.EncodeToString(mac.Sum(nil)),\n\t\tapi: api,\n\t}\n}",
"func (c *UnsavedPostClient) Create() *UnsavedPostCreate {\n\tmutation := newUnsavedPostMutation(c.config, OpCreate)\n\treturn &UnsavedPostCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostVideoClient) GetX(ctx context.Context, id int) *UnsavedPostVideo {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *UnsavedPostVideoClient) Use(hooks ...Hook) {\n\tc.hooks.UnsavedPostVideo = append(c.hooks.UnsavedPostVideo, hooks...)\n}",
"func (c *PostVideoClient) Query() *PostVideoQuery {\n\treturn &PostVideoQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func NewPostImageClient(c config) *PostImageClient {\n\treturn &PostImageClient{config: c}\n}",
"func (upu *UnsavedPostUpdate) RemoveVideoIDs(ids ...int) *UnsavedPostUpdate {\n\tupu.mutation.RemoveVideoIDs(ids...)\n\treturn upu\n}",
"func NewVideo(title, fileName string, id int64, createdBy *Profile) *Video {\n\tv := &Video{\n\t\tTitle: title,\n\t\tFileName: fileName,\n\t\tID: id,\n\t\tCreated: time.Now(),\n\t\tCreatedByID: createdBy.ID,\n\t}\n\n\treturn v\n}",
"func NewClient(config Config) VTM {\n\t// if no http client, set to default\n\tif config.HTTPClient == nil {\n\t\tconfig.HTTPClient = http.DefaultClient\n\t}\n\n\tdebugLogOutput := config.LogOutput\n\tif debugLogOutput == nil {\n\t\tdebugLogOutput = ioutil.Discard\n\t}\n\n\treturn &vtmClient{\n\t\tconfig: config,\n\t\thttpClient: config.HTTPClient,\n\t\tdebugLog: log.New(debugLogOutput, \"\", 0),\n\t}\n}",
"func (c *UnsavedPostAttachmentClient) Delete() *UnsavedPostAttachmentDelete {\n\tmutation := newUnsavedPostAttachmentMutation(c.config, OpDelete)\n\treturn &UnsavedPostAttachmentDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostVideoClient) Update() *PostVideoUpdate {\n\tmutation := newPostVideoMutation(c.config, OpUpdate)\n\treturn &PostVideoUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostAttachmentClient) Get(ctx context.Context, id int) (*UnsavedPostAttachment, error) {\n\treturn c.Query().Where(unsavedpostattachment.ID(id)).Only(ctx)\n}",
"func NewMediaClient(c config) *MediaClient {\n\treturn &MediaClient{config: c}\n}",
"func NewUnsecured(claims interface{}, headers jose.Headers) (*JSONWebToken, error) {\n\treturn jwt.NewUnsecured(claims, headers)\n}",
"func (upuo *UnsavedPostUpdateOne) RemoveVideoIDs(ids ...int) *UnsavedPostUpdateOne {\n\tupuo.mutation.RemoveVideoIDs(ids...)\n\treturn upuo\n}",
"func NewPostAttachmentClient(c config) *PostAttachmentClient {\n\treturn &PostAttachmentClient{config: c}\n}",
"func (d *Dao) NewVideo(c context.Context, filename string) (v *archive.Video, err error) {\n\thash64 := int64(farm.Hash64([]byte(filename)))\n\trow := d.db.QueryRow(c, _newVideoByFnSQL, hash64, filename)\n\tv = &archive.Video{}\n\tvar avrState, vState int16\n\tif err = row.Scan(&v.ID, &v.Filename, &v.Cid, &v.Aid, &v.Title, &v.Desc, &v.SrcType, &v.Duration, &v.Filesize, &v.Resolutions,\n\t\t&v.Playurl, &v.FailCode, &v.Index, &v.Attribute, &v.XcodeState, &avrState, &vState, &v.CTime, &v.MTime); err != nil {\n\t\tif err == sql.ErrNoRows {\n\t\t\tv = nil\n\t\t\terr = nil\n\t\t} else {\n\t\t\tlog.Error(\"row.Scan error(%v)\", err)\n\t\t}\n\t\treturn\n\t}\n\t// 2 state map to 1\n\tif avrState == archive.VideoStatusDelete {\n\t\tv.Status = archive.VideoStatusDelete\n\t} else {\n\t\tv.Status = vState\n\t}\n\treturn\n}",
"func (upvcb *UnsavedPostVideoCreateBulk) Save(ctx context.Context) ([]*UnsavedPostVideo, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(upvcb.builders))\n\tnodes := make([]*UnsavedPostVideo, len(upvcb.builders))\n\tmutators := make([]Mutator, len(upvcb.builders))\n\tfor i := range upvcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := upvcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*UnsavedPostVideoMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, upvcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, upvcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, upvcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (c *UnsavedPostImageClient) Delete() *UnsavedPostImageDelete {\n\tmutation := newUnsavedPostImageMutation(c.config, OpDelete)\n\treturn &UnsavedPostImageDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (video *FakeVideo) DeleteVideo() (err error) {\n\n\terr = nil\n\n\treturn\n}",
"func (b *GroupsSetLongPollSettingsBuilder) VideoNew(v bool) *GroupsSetLongPollSettingsBuilder {\n\tb.Params[\"video_new\"] = v\n\treturn b\n}",
"func NewUnroutedHandler(config Config) (*unroutedHandler, error) {\n if handler != nil {\n return handler, nil\n }\n\n if err := config.validate(); err != nil {\n return nil, err\n }\n\n // Only promote extesions using the Tus-Extension header which are implemented\n extensions := \"creation,creation-with-upload\"\n if config.StoreComposer.UsesTerminater {\n extensions += \",termination\"\n }\n if config.StoreComposer.UsesConcater {\n extensions += \",concatenation\"\n }\n if config.StoreComposer.UsesLengthDeferrer {\n extensions += \",creation-defer-length\"\n }\n\n handler = &unroutedHandler{\n config: config,\n composer: config.StoreComposer,\n basePath: config.BasePath,\n isBasePathAbs: config.isAbs,\n CompleteUploads: make(chan tusd.FileInfo),\n TerminatedUploads: make(chan tusd.FileInfo),\n UploadProgress: make(chan tusd.FileInfo),\n CreatedUploads: make(chan tusd.FileInfo),\n logger: config.Logger,\n extensions: extensions,\n Metrics: newMetrics(),\n }\n\n return handler, nil\n}",
"func (upvc *UnsavedPostVideoCreate) Mutation() *UnsavedPostVideoMutation {\n\treturn upvc.mutation\n}",
"func NewVideo(logger *logger.Logger, path string) *Video {\n\tv := &Video{\n\t\tl: logger,\n\t\tpath: path,\n\t}\n\treturn v\n}",
"func (c *UnsavedPostThumbnailClient) Delete() *UnsavedPostThumbnailDelete {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpDelete)\n\treturn &UnsavedPostThumbnailDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func New(config Config) (*ScreenlyClient, error) {\n\turl, err := url.Parse(config.ENDPOINT)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ttimeout := time.Duration(config.TIMEOUT) * time.Second\n\thttpClient := &http.Client{Timeout: timeout}\n\treturn &ScreenlyClient{httpClient: httpClient, BaseUrl: url}, nil\n}",
"func (video *FakeVideo) GetVideo(userID string, id int) (err error) {\n\tjsonFile, err := os.Open(\"testdata/fake_videos.json\")\n\n\tif err != nil {\n\t\treturn\n\t}\n\n\tdefer jsonFile.Close()\n\n\tjsonData, err := ioutil.ReadAll(jsonFile)\n\n\tif err != nil {\n\t\treturn\n\t}\n\n\tvar fakeVideos []FakeVideo\n\tjson.Unmarshal(jsonData, &fakeVideos)\n\n\tfor _, fakeVideo := range fakeVideos {\n\t\tif fakeVideo.ID == id && fakeVideo.CreatedBy == userID {\n\n\t\t\tvideo.ID = fakeVideo.ID\n\t\t\tvideo.Name = fakeVideo.Name\n\t\t\tvideo.URL = fakeVideo.URL\n\t\t\tvideo.YoutubeVideoID = fakeVideo.YoutubeVideoID\n\n\t\t\treturn\n\t\t}\n\t}\n\n\terr = errors.New(\"no corresponding video found\")\n\n\treturn\n}",
"func newClient(ctx context.Context, cfg vcConfig) (*vsClient, error) {\n\tu := url.URL{\n\t\tScheme: \"https\",\n\t\tHost: cfg.server,\n\t\tPath: \"sdk\",\n\t}\n\n\tu.User = url.UserPassword(cfg.user, cfg.password)\n\tinsecure := cfg.insecure\n\n\tgc, err := govmomi.NewClient(ctx, &u, insecure)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"connecting to vSphere API: %w\", err)\n\t}\n\n\trc := rest.NewClient(gc.Client)\n\ttm := tags.NewManager(rc)\n\n\tvsc := vsClient{\n\t\tgovmomi: gc,\n\t\trest: rc,\n\t\ttagManager: tm,\n\t}\n\n\terr = vsc.rest.Login(ctx, u.User)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"logging into rest api: %w\", err)\n\t}\n\n\treturn &vsc, nil\n}",
"func (upu *UnsavedPostUpdate) RemoveVideos(u ...*UnsavedPostVideo) *UnsavedPostUpdate {\n\tids := make([]int, len(u))\n\tfor i := range u {\n\t\tids[i] = u[i].ID\n\t}\n\treturn upu.RemoveVideoIDs(ids...)\n}",
"func (c *UnsavedPostClient) QueryVideos(up *UnsavedPost) *UnsavedPostVideoQuery {\n\tquery := &UnsavedPostVideoQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostvideo.Table, unsavedpostvideo.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.VideosTable, unsavedpost.VideosColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostVideoClient) DeleteOne(upv *UnsavedPostVideo) *UnsavedPostVideoDeleteOne {\n\treturn c.DeleteOneID(upv.ID)\n}",
"func (upu *UnsavedPostUpdate) AddVideoIDs(ids ...int) *UnsavedPostUpdate {\n\tupu.mutation.AddVideoIDs(ids...)\n\treturn upu\n}",
"func (c *Client) DeleteVideo(lib, source string) (*api.BaseResponse, error) {\n\treturn api.DeleteVideo(c, lib, source)\n}",
"func NewVk(cfg config.VkAuth) *VkClient {\n\treturn &VkClient{\n\t\tClient: &http.Client{},\n\t\tAppID: cfg.AppID,\n\t\tAppSecret: cfg.ClientSecret,\n\t\tRedirectURI: cfg.RedirectURI,\n\t}\n}",
"func (client *Client) CreateUploadVideoWithOptions(request *CreateUploadVideoRequest, runtime *util.RuntimeOptions) (_result *CreateUploadVideoResponse, _err error) {\n\t_err = util.ValidateModel(request)\n\tif _err != nil {\n\t\treturn _result, _err\n\t}\n\tquery := map[string]interface{}{}\n\tif !tea.BoolValue(util.IsUnset(request.AppId)) {\n\t\tquery[\"AppId\"] = request.AppId\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.CateId)) {\n\t\tquery[\"CateId\"] = request.CateId\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.CoverURL)) {\n\t\tquery[\"CoverURL\"] = request.CoverURL\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.Description)) {\n\t\tquery[\"Description\"] = request.Description\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.FileName)) {\n\t\tquery[\"FileName\"] = request.FileName\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.FileSize)) {\n\t\tquery[\"FileSize\"] = request.FileSize\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.StorageLocation)) {\n\t\tquery[\"StorageLocation\"] = request.StorageLocation\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.Tags)) {\n\t\tquery[\"Tags\"] = request.Tags\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.TemplateGroupId)) {\n\t\tquery[\"TemplateGroupId\"] = request.TemplateGroupId\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.Title)) {\n\t\tquery[\"Title\"] = request.Title\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.UserData)) {\n\t\tquery[\"UserData\"] = request.UserData\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.WorkflowId)) {\n\t\tquery[\"WorkflowId\"] = request.WorkflowId\n\t}\n\n\treq := &openapi.OpenApiRequest{\n\t\tQuery: openapiutil.Query(query),\n\t}\n\tparams := &openapi.Params{\n\t\tAction: tea.String(\"CreateUploadVideo\"),\n\t\tVersion: tea.String(\"2017-03-21\"),\n\t\tProtocol: tea.String(\"HTTPS\"),\n\t\tPathname: tea.String(\"/\"),\n\t\tMethod: tea.String(\"POST\"),\n\t\tAuthType: tea.String(\"AK\"),\n\t\tStyle: tea.String(\"RPC\"),\n\t\tReqBodyType: tea.String(\"formData\"),\n\t\tBodyType: tea.String(\"json\"),\n\t}\n\t_result = &CreateUploadVideoResponse{}\n\t_body, _err := client.CallApi(params, req, runtime)\n\tif _err != nil {\n\t\treturn _result, _err\n\t}\n\t_err = tea.Convert(_body, &_result)\n\treturn _result, _err\n}",
"func (uu *UserUpdate) ClearVideos() *UserUpdate {\n\tuu.mutation.ClearVideos()\n\treturn uu\n}",
"func New(db db.Store, r *gin.Engine) {\n\tinitEndpointUser(db, r)\n\tinitEndpointVideoGame(db, r)\n}",
"func videoFromForm(r *http.Request) (*bittube.Video, error) {\n\tvideoURL, err := uploadFileFromForm(r)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"could not upload file: %v\", err)\n\t}\n\tif videoURL == \"\" {\n\t\tvideoURL = r.FormValue(\"videoURL\")\n\t}\n\n\tvideo := &bittube.Video{\n\t\tTitle: r.FormValue(\"title\"),\n\t\tAuthor: r.FormValue(\"author\"),\n\t\tPublishedDate: r.FormValue(\"publishedDate\"),\n\t\tVideoURL: videoURL,\n\t\tDescription: r.FormValue(\"description\"),\n\t\tCreatedBy: r.FormValue(\"createbittube.DBy\"),\n\t\tCreatedByID: r.FormValue(\"createbittube.DByID\"),\n\t}\n\n\t// If the form didn't carry the user information for the creator, populate it\n\t// from the currently logged in user (or mark as anonymous).\n\tif video.CreatedByID == \"\" {\n\t\tuser := profileFromSession(r)\n\t\tif user != nil {\n\t\t\t// Logged in.\n\t\t\tvideo.CreatedBy = user.DisplayName\n\t\t\tvideo.CreatedByID = user.ID\n\t\t} else {\n\t\t\t// Not logged in.\n\t\t\tvideo.SetCreatorAnonymous()\n\t\t}\n\t}\n\n\treturn video, nil\n}",
"func getClient(ctx context.Context, config *oauth2.Config) (*http.Client, error) {\n\ttokFile, err := xdg.CacheFile(\"gphotos-fb/token.json\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"xdg.CacheFile: %w\", err)\n\t}\n\n\ttok, err := tokenFromFile(tokFile)\n\tif err != nil {\n\t\ttok, err := getTokenFromWeb(ctx, config)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"getTokenFromWeb: %w\", err)\n\t\t}\n\n\t\tif err := saveToken(tokFile, tok); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"saveToken: %w\", err)\n\t\t}\n\t}\n\treturn config.Client(ctx, tok), nil\n}",
"func (c *UnsavedPostThumbnailClient) QueryUnsavedPost(upt *UnsavedPostThumbnail) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upt.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, true, unsavedpostthumbnail.UnsavedPostTable, unsavedpostthumbnail.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upt.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (b *GroupsSetCallbackSettingsBuilder) VideoNew(v bool) *GroupsSetCallbackSettingsBuilder {\n\tb.Params[\"video_new\"] = v\n\treturn b\n}",
"func (c *Config) UnauthedClient() *github.Client {\n\tvar t http.RoundTripper = c.baseTransport()\n\tif c.Cache != nil {\n\t\tt = &httpcache.Transport{\n\t\t\tCache: c.Cache,\n\t\t\tTransport: t,\n\t\t\tMarkCachedResponses: true,\n\t\t}\n\t}\n\tt = NewGitHubCacheControlTransport(c.CacheControl, t)\n\tif c.OAuth.ClientID != \"\" {\n\t\tt = &github.UnauthenticatedRateLimitedTransport{\n\t\t\tClientID: c.OAuth.ClientID,\n\t\t\tClientSecret: c.OAuth.ClientSecret,\n\t\t\tTransport: t,\n\t\t}\n\t}\n\n\treturn c.client(&http.Client{Transport: t})\n}",
"func (upuo *UnsavedPostUpdateOne) RemoveVideos(u ...*UnsavedPostVideo) *UnsavedPostUpdateOne {\n\tids := make([]int, len(u))\n\tfor i := range u {\n\t\tids[i] = u[i].ID\n\t}\n\treturn upuo.RemoveVideoIDs(ids...)\n}",
"func newVideoTrackFromDriver(d driver.Driver, recorder driver.VideoRecorder, constraints MediaTrackConstraints, selector *CodecSelector) (Track, error) {\n\treader, err := recorder.VideoRecord(constraints.selectedMedia)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn newVideoTrackFromReader(d, reader, selector), nil\n}",
"func (c *UnsavedPostVideoClient) Hooks() []Hook {\n\treturn c.hooks.UnsavedPostVideo\n}",
"func NewPostThumbnailClient(c config) *PostThumbnailClient {\n\treturn &PostThumbnailClient{config: c}\n}",
"func NewClient(c drive.Config) (drive.Client, error) {\n\treturn &Drive{config: c}, nil\n}",
"func makePost(client *mm.Client, channelId string, message string) *mm.Post {\n\tpost := &mm.Post{}\n\tpost.ChannelId = channelId\n\tpost.Message = message\n\treturn post\n}",
"func (m *VideoManager) GetVideoOrCreateTask(uri, kind string) (Video, error) {\n\tclaim, err := claim.Resolve(uri)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tv, err := m.library.Get(claim.SDHash)\n\tif v == nil || err == sql.ErrNoRows {\n\t\terr := video.ValidateByClaim(claim)\n\t\tif err != nil {\n\t\t\tif errors.Is(err, video.ErrChannelNotEnabled) {\n\t\t\t\tm.library.IncViews(claim.PermanentURL, claim.SDHash)\n\t\t\t}\n\t\t\treturn nil, err\n\t\t}\n\n\t\tt, err := m.queue.GetBySDHash(claim.SDHash)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif t != nil {\n\t\t\treturn nil, video.ErrTranscodingUnderway\n\t\t}\n\t\t_, err = m.queue.Add(uri, claim.SDHash, kind)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn nil, video.ErrTranscodingUnderway\n\t}\n\treturn *v, nil\n}",
"func NewClient(config *config.Config) Client {\n\treturn &releaseClient{\n\t\tconfig: config,\n\t}\n}",
"func (c *PostClient) Delete() *PostDelete {\n\tmutation := newPostMutation(c.config, OpDelete)\n\treturn &PostDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func NewFromConfig(ktClient pb.KeyTransparencyClient, config *pb.Domain) (*Client, error) {\n\tktVerifier, err := NewVerifierFromDomain(config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn New(ktClient, config.DomainId, ktVerifier), nil\n}",
"func NewRemoteClient(config *Config) *Client {\n\tif config == nil {\n\t\tconfig = &Config{}\n\t}\n\n\tclient := api.NewShell(config.Host)\n\thost := config.Host\n\tif host == \"\" {\n\t\tvar err error\n\t\thost, err = getIpfsAPIURL()\n\t\tif err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\t}\n\n\treturn &Client{\n\t\tclient: client,\n\t\tisRemote: true,\n\t\thost: host,\n\t\tgatewayURL: config.GatewayURL,\n\t}\n}",
"func (c *Client) InsertVideo(lib string, args *api.BaseRequest) (*api.BaseResponse, error) {\n\treturn api.InsertVideo(c, lib, args)\n}",
"func New(client, secret string) remote.Remote {\n\treturn &config{\n\t\tAPI: DefaultAPI,\n\t\tURL: DefaultURL,\n\t\tClient: client,\n\t\tSecret: secret,\n\t}\n}",
"func NewClient(cfg *rest.Config) (versioned.Interface, error) {\n\tglog.Info(\"NewClient()\")\n\tscheme := runtime.NewScheme()\n\tif err := v1.AddToScheme(scheme); err != nil {\n\t\treturn nil, err\n\t}\n\n\tconfig := *cfg\n\tconfig.GroupVersion = &v1.SchemeGroupVersion\n\tconfig.APIPath = \"/apis\"\n\tconfig.ContentType = runtime.ContentTypeJSON\n\tconfig.NegotiatedSerializer = serializer.WithoutConversionCodecFactory{CodecFactory: serializer.NewCodecFactory(scheme)}\n\n\tcs, err := versioned.NewForConfig(&config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn cs, nil\n}",
"func NewClient(config Config) Client {\n\ttyp := config.Type()\n\n\tswitch typ {\n\tcase Bolt:\n\t\tbe := NewBoltBackend(config.(*BoltConfig))\n\t\t// TODO: Return an error instead of panicking.\n\t\tif err := be.Open(); err != nil {\n\t\t\tpanic(fmt.Errorf(\"Opening bolt backend: %s\", err))\n\t\t}\n\t\tq := NewBoltQueue(be.db)\n\t\treturn newKVClient(be, q)\n\n\tcase Rocks:\n\t\t// MORE TEMPORARY UGLINESS TO MAKE IT WORK FOR NOW:\n\t\tif err := os.MkdirAll(config.(*RocksConfig).Dir, os.FileMode(int(0700))); err != nil {\n\t\t\tpanic(fmt.Errorf(\"Creating rocks directory %q: %s\", config.(*RocksConfig).Dir, err))\n\t\t}\n\t\tbe := NewRocksBackend(config.(*RocksConfig))\n\t\tqueueFile := filepath.Join(config.(*RocksConfig).Dir, DefaultBoltQueueFilename)\n\t\tdb, err := bolt.Open(queueFile, 0600, NewBoltConfig(\"\").BoltOptions)\n\t\tif err != nil {\n\t\t\tpanic(fmt.Errorf(\"Creating bolt queue: %s\", err))\n\t\t}\n\t\tq := NewBoltQueue(db)\n\t\treturn newKVClient(be, q)\n\n\tcase Postgres:\n\t\tbe := NewPostgresBackend(config.(*PostgresConfig))\n\t\tq := NewPostgresQueue(config.(*PostgresConfig))\n\t\treturn newKVClient(be, q)\n\n\tdefault:\n\t\tpanic(fmt.Errorf(\"no client constructor available for db configuration type: %v\", typ))\n\t}\n}",
"func (upuo *UnsavedPostUpdateOne) AddVideoIDs(ids ...int) *UnsavedPostUpdateOne {\n\tupuo.mutation.AddVideoIDs(ids...)\n\treturn upuo\n}",
"func NewTest() (*client, error) {\n\tconfig := os.Getenv(\"VELA_QUEUE_CONFIG\")\n\tif len(config) == 0 {\n\t\tconfig = \"localhost:6379\"\n\t}\n\n\t// parse the url provided\n\toptions, err := redis.ParseURL(config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// create the Redis client from the parsed url\n\tqueue := redis.NewClient(options)\n\n\t// create the client object\n\tclient := &client{\n\t\tQueue: queue,\n\t\tOptions: options,\n\t}\n\n\treturn client, nil\n}",
"func NewGCPPubSubConfig() GCPPubSubConfig {\n\treturn GCPPubSubConfig{\n\t\tProjectID: \"\",\n\t\tTopicID: \"\",\n\t\tMaxInFlight: 64,\n\t\tPublishTimeout: \"60s\",\n\t\tMetadata: metadata.NewExcludeFilterConfig(),\n\t\tOrderingKey: \"\",\n\t\tEndpoint: \"\",\n\t\tFlowControl: NewGCPPubSubFlowControlConfig(),\n\t}\n}",
"func (c *UnsavedPostAttachmentClient) QueryUnsavedPost(upa *UnsavedPostAttachment) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upa.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostattachment.Table, unsavedpostattachment.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostattachment.UnsavedPostTable, unsavedpostattachment.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upa.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (api *TelegramBotAPI) NewOutgoingVideo(recipient Recipient, fileName string, reader io.Reader) *OutgoingVideo {\n\treturn &OutgoingVideo{\n\t\toutgoingMessageBase: outgoingMessageBase{\n\t\t\toutgoingBase: outgoingBase{\n\t\t\t\tapi: api,\n\t\t\t\tRecipient: recipient,\n\t\t\t},\n\t\t},\n\t\toutgoingFileBase: outgoingFileBase{\n\t\t\tfileName: fileName,\n\t\t\tr: reader,\n\t\t},\n\t}\n}",
"func (factory *secretClientFactory) NewSecretClient(ctx context.Context,\n\tconfig SecretConfig,\n\tlc loggingClient,\n\ttokenExpiredCallback tokenExpiredCallback) (pkg.SecretClient, error) {\n\tif ctx == nil {\n\t\treturn nil, pkg.NewErrSecretStore(\"background ctx is required and cannot be nil\")\n\t}\n\n\ttokenStr := config.Authentication.AuthToken\n\tif tokenStr == \"\" {\n\t\treturn nil, pkg.NewErrSecretStore(\"AuthToken is required in config\")\n\t}\n\n\thttpClient, err := createHTTPClient(config)\n\tif err != nil {\n\t\treturn Client{}, err\n\t}\n\n\tif config.RetryWaitPeriod != \"\" {\n\t\tretryTimeDuration, err := time.ParseDuration(config.RetryWaitPeriod)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tconfig.retryWaitPeriodTime = retryTimeDuration\n\t}\n\n\tsecretClient := Client{\n\t\tHttpConfig: config,\n\t\tHttpCaller: httpClient,\n\t\tlc: lc,\n\t}\n\n\tfactory.mapMutex.Lock()\n\t// if there is context already associated with the given token,\n\t// then we cancel it first\n\tif cancel, exists := factory.tokenCancelFunc[tokenStr]; exists {\n\t\tcancel()\n\t}\n\tfactory.mapMutex.Unlock()\n\n\tcCtx, cancel := context.WithCancel(ctx)\n\tif err = secretClient.refreshToken(cCtx, tokenExpiredCallback); err != nil {\n\t\tcancel()\n\t\tfactory.mapMutex.Lock()\n\t\tdelete(factory.tokenCancelFunc, tokenStr)\n\t\tfactory.mapMutex.Unlock()\n\t} else {\n\t\tfactory.mapMutex.Lock()\n\t\tfactory.tokenCancelFunc[tokenStr] = cancel\n\t\tfactory.mapMutex.Unlock()\n\t}\n\n\treturn secretClient, err\n}",
"func (c *MediaClient) Delete() *MediaDelete {\n\tmutation := newMediaMutation(c.config, OpDelete)\n\treturn &MediaDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func New(endpoint, consumerKey, consumerSecret, accessToken, accessTokenSecret string, params map[string]string) *Timeline {\n\n\treturn &Timeline{\n\t\tclient: initAPI(\n\t\t\tconsumerKey,\n\t\t\tconsumerSecret,\n\t\t\taccessToken,\n\t\t\taccessTokenSecret,\n\t\t),\n\t\tendpoint: endpoint,\n\t\tparams: params,\n\t\tReconnect: false,\n\t}\n}",
"func NewPostUnAuth(body *PostUnAuthResponseBody) *goa.ServiceError {\n\tv := &goa.ServiceError{\n\t\tName: *body.Name,\n\t\tID: *body.ID,\n\t\tMessage: *body.Message,\n\t\tTemporary: *body.Temporary,\n\t\tTimeout: *body.Timeout,\n\t\tFault: *body.Fault,\n\t}\n\n\treturn v\n}",
"func NewClient(config Config) ClientInterface {\n\tcontext := ctx.Background()\n\tif config.GitHubToken == \"\" {\n\t\treturn Client{\n\t\t\tClient: github.NewClient(nil),\n\t\t\tContext: context,\n\t\t\tConfig: config,\n\t\t}\n\t}\n\toauth2Client := oauth2.NewClient(context, oauth2.StaticTokenSource(\n\t\t&oauth2.Token{AccessToken: config.GitHubToken},\n\t))\n\treturn Client{\n\t\tClient: github.NewClient(oauth2Client),\n\t\tContext: context,\n\t\tConfig: config,\n\t}\n}",
"func FromJSON(data []byte) (*VideoConfig, error) {\n\tvar videoConfig VideoConfig\n\tif err := json.Unmarshal(data, &videoConfig); err != nil {\n\t\treturn nil, fmt.Errorf(\"could not unmarshal data %v; err: %v\", data, err)\n\t}\n\tif videoConfig.VideoName == \"\" {\n\t\tvideoConfig.VideoName = \"vidtern_finished_video\"\n\t}\n\treturn &videoConfig, nil\n}",
"func (video *FakeVideo) CreateVideo(userID string) (err error) {\n\tif video.Name == \"\" {\n\t\terr = errors.New(\"the video name cannot be empty\")\n\n\t\treturn\n\t} else if video.URL == \"\" {\n\t\terr = errors.New(\"the video URL cannot be empty\")\n\n\t\treturn\n\t}\n\n\terr = nil\n\n\treturn\n}",
"func (a PromptsApi) CreateVideoEmailPrompt(prompt VideoEmailPrompt) (*VideoEmailPrompt, *APIResponse, error) {\n\n\tvar httpMethod = \"Post\"\n\t// create path and map variables\n\tpath := a.Configuration.BasePath + \"/prompt\"\n\n\n\theaderParams := make(map[string]string)\n\tqueryParams := url.Values{}\n\tformParams := make(map[string]string)\n\tvar postBody interface{}\n\tvar fileName string\n\tvar fileBytes []byte\n\t// authentication '(BBOAuth2)' required\n\t// oauth required\n\tif a.Configuration.AccessToken != \"\"{\n\t\theaderParams[\"Authorization\"] = \"Bearer \" + a.Configuration.AccessToken\n\t}\n\t// add default headers if any\n\tfor key := range a.Configuration.DefaultHeader {\n\t\theaderParams[key] = a.Configuration.DefaultHeader[key]\n\t}\n\n\n\t// to determine the Content-Type header\n\tlocalVarHttpContentTypes := []string{ \"application/json\", }\n\n\t// set Content-Type header\n\tlocalVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)\n\tif localVarHttpContentType != \"\" {\n\t\theaderParams[\"Content-Type\"] = localVarHttpContentType\n\t}\n\t// to determine the Accept header\n\tlocalVarHttpHeaderAccepts := []string{\n\t\t\"application/json\",\n\t}\n\n\t// set Accept header\n\tlocalVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)\n\tif localVarHttpHeaderAccept != \"\" {\n\t\theaderParams[\"Accept\"] = localVarHttpHeaderAccept\n\t}\n\t// body params\n\tpostBody = &prompt\n\n\tvar successPayload = new(VideoEmailPrompt)\n\thttpResponse, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, fileName, fileBytes)\n\tif err != nil {\n\t\treturn successPayload, NewAPIResponse(httpResponse.RawResponse), err\n\t}\n\terr = json.Unmarshal(httpResponse.Body(), &successPayload)\n\treturn successPayload, NewAPIResponse(httpResponse.RawResponse), err\n}",
"func NewDecoder(provider ConfigProvider) *Decoder {\n\td := &Decoder{\n\t\tprovider: provider,\n\t}\n\treturn d\n}",
"func (api *TelegramBotAPI) NewOutgoingVideoResend(recipient Recipient, fileID string) *OutgoingVideo {\n\treturn &OutgoingVideo{\n\t\toutgoingMessageBase: outgoingMessageBase{\n\t\t\toutgoingBase: outgoingBase{\n\t\t\t\tapi: api,\n\t\t\t\tRecipient: recipient,\n\t\t\t},\n\t\t},\n\t\toutgoingFileBase: outgoingFileBase{\n\t\t\tfileID: fileID,\n\t\t},\n\t}\n}",
"func NewPlaylistVideoController(router gin.IRouter, client *ent.Client) *PlaylistVideoController {\n\tpvc := &PlaylistVideoController{\n\t\tclient: client,\n\t\trouter: router,\n\t}\n\n\tpvc.register()\n\n\treturn pvc\n\n}"
] |
[
"0.6774787",
"0.6438168",
"0.62481064",
"0.6234513",
"0.60024554",
"0.59835786",
"0.58678997",
"0.57129395",
"0.56363523",
"0.5121824",
"0.5094426",
"0.5063273",
"0.4776085",
"0.47740883",
"0.46387",
"0.46199957",
"0.46037874",
"0.45593628",
"0.44349775",
"0.43993834",
"0.43831384",
"0.43618074",
"0.43336442",
"0.43067572",
"0.42645553",
"0.42534283",
"0.42164782",
"0.42059717",
"0.41977027",
"0.41629556",
"0.41175434",
"0.40930906",
"0.40839043",
"0.40807518",
"0.40724027",
"0.4041193",
"0.4025049",
"0.40206978",
"0.40162823",
"0.4016176",
"0.40049034",
"0.39840272",
"0.39825517",
"0.39518577",
"0.39361504",
"0.39317703",
"0.39039707",
"0.3896391",
"0.38878337",
"0.388169",
"0.3861116",
"0.38550708",
"0.38524726",
"0.38442406",
"0.384278",
"0.3832043",
"0.38126096",
"0.3804275",
"0.38026643",
"0.3802635",
"0.3793365",
"0.37758872",
"0.37666705",
"0.37613875",
"0.37530437",
"0.37526998",
"0.37515822",
"0.37348697",
"0.3727278",
"0.37268677",
"0.37251195",
"0.37201235",
"0.3696997",
"0.36955008",
"0.36774793",
"0.3672667",
"0.36697748",
"0.36677852",
"0.36670184",
"0.36639258",
"0.36602622",
"0.36580202",
"0.36525384",
"0.36490944",
"0.36439085",
"0.36356547",
"0.36223838",
"0.3618862",
"0.36092508",
"0.3606362",
"0.3596557",
"0.35938394",
"0.35878107",
"0.35862434",
"0.35860062",
"0.35856834",
"0.35791484",
"0.35789028",
"0.35786062",
"0.35762534"
] |
0.82912016
|
0
|
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `unsavedpostvideo.Hooks(f(g(h())))`.
|
func (c *UnsavedPostVideoClient) Use(hooks ...Hook) {
c.hooks.UnsavedPostVideo = append(c.hooks.UnsavedPostVideo, hooks...)
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (em *entityManager) Use(mw ...MiddlewareFunc) {\n\tem.mwStack = append(em.mwStack, mw...)\n}",
"func (f *Flame) Use(handlers ...Handler) {\n\tvalidateAndWrapHandlers(handlers, nil)\n\tf.handlers = append(f.handlers, handlers...)\n}",
"func (c *TagClient) Use(hooks ...Hook) {\n\tc.hooks.Tag = append(c.hooks.Tag, hooks...)\n}",
"func (ms *MiddlewareStack) Use(mw ...MiddlewareFunc) {\n\tms.stack = append(ms.stack, mw...)\n}",
"func (ms *MiddlewareStack) Use(mw ...MiddlewareFunc) {\n\tms.stack = append(ms.stack, mw...)\n}",
"func (c *PostVideoClient) Use(hooks ...Hook) {\n\tc.hooks.PostVideo = append(c.hooks.PostVideo, hooks...)\n}",
"func (c *EatinghistoryClient) Use(hooks ...Hook) {\n\tc.hooks.Eatinghistory = append(c.hooks.Eatinghistory, hooks...)\n}",
"func (c *WorkExperienceClient) Use(hooks ...Hook) {\n\tc.hooks.WorkExperience = append(c.hooks.WorkExperience, hooks...)\n}",
"func (c *ReviewClient) Use(hooks ...Hook) {\n\tc.hooks.Review = append(c.hooks.Review, hooks...)\n}",
"func (c *AdminClient) Use(hooks ...Hook) {\n\tc.hooks.Admin = append(c.hooks.Admin, hooks...)\n}",
"func (c *PostClient) Use(hooks ...Hook) {\n\tc.hooks.Post = append(c.hooks.Post, hooks...)\n}",
"func (c *PharmacistClient) Use(hooks ...Hook) {\n\tc.hooks.Pharmacist = append(c.hooks.Pharmacist, hooks...)\n}",
"func (c *EventClient) Use(hooks ...Hook) {\n\tc.hooks.Event = append(c.hooks.Event, hooks...)\n}",
"func (c *StatustClient) Use(hooks ...Hook) {\n\tc.hooks.Statust = append(c.hooks.Statust, hooks...)\n}",
"func (c *BranchClient) Use(hooks ...Hook) {\n\tc.hooks.Branch = append(c.hooks.Branch, hooks...)\n}",
"func (c *FoodmenuClient) Use(hooks ...Hook) {\n\tc.hooks.Foodmenu = append(c.hooks.Foodmenu, hooks...)\n}",
"func (c *UnsavedPostClient) Use(hooks ...Hook) {\n\tc.hooks.UnsavedPost = append(c.hooks.UnsavedPost, hooks...)\n}",
"func (c *ClubClient) Use(hooks ...Hook) {\n\tc.hooks.Club = append(c.hooks.Club, hooks...)\n}",
"func (c *PetruleClient) Use(hooks ...Hook) {\n\tc.hooks.Petrule = append(c.hooks.Petrule, hooks...)\n}",
"func (c *WalletNodeClient) Use(hooks ...Hook) {\n\tc.hooks.WalletNode = append(c.hooks.WalletNode, hooks...)\n}",
"func (c *SituationClient) Use(hooks ...Hook) {\n\tc.hooks.Situation = append(c.hooks.Situation, hooks...)\n}",
"func (c *TasteClient) Use(hooks ...Hook) {\n\tc.hooks.Taste = append(c.hooks.Taste, hooks...)\n}",
"func (c *PlaylistClient) Use(hooks ...Hook) {\n\tc.hooks.Playlist = append(c.hooks.Playlist, hooks...)\n}",
"func (c *MealplanClient) Use(hooks ...Hook) {\n\tc.hooks.Mealplan = append(c.hooks.Mealplan, hooks...)\n}",
"func (c *ClubBranchClient) Use(hooks ...Hook) {\n\tc.hooks.ClubBranch = append(c.hooks.ClubBranch, hooks...)\n}",
"func (c *PlanetClient) Use(hooks ...Hook) {\n\tc.hooks.Planet = append(c.hooks.Planet, hooks...)\n}",
"func (c *ToolClient) Use(hooks ...Hook) {\n\tc.hooks.Tool = append(c.hooks.Tool, hooks...)\n}",
"func (c *SymptomClient) Use(hooks ...Hook) {\n\tc.hooks.Symptom = append(c.hooks.Symptom, hooks...)\n}",
"func (c *LevelOfDangerousClient) Use(hooks ...Hook) {\n\tc.hooks.LevelOfDangerous = append(c.hooks.LevelOfDangerous, hooks...)\n}",
"func (c *PositionClient) Use(hooks ...Hook) {\n\tc.hooks.Position = append(c.hooks.Position, hooks...)\n}",
"func (c *PositionClient) Use(hooks ...Hook) {\n\tc.hooks.Position = append(c.hooks.Position, hooks...)\n}",
"func (c *PositionClient) Use(hooks ...Hook) {\n\tc.hooks.Position = append(c.hooks.Position, hooks...)\n}",
"func (c *VeterinarianClient) Use(hooks ...Hook) {\n\tc.hooks.Veterinarian = append(c.hooks.Veterinarian, hooks...)\n}",
"func (c *BeerClient) Use(hooks ...Hook) {\n\tc.hooks.Beer = append(c.hooks.Beer, hooks...)\n}",
"func (c *PetClient) Use(hooks ...Hook) {\n\tc.hooks.Pet = append(c.hooks.Pet, hooks...)\n}",
"func (c *PositionassingmentClient) Use(hooks ...Hook) {\n\tc.hooks.Positionassingment = append(c.hooks.Positionassingment, hooks...)\n}",
"func (c *ClubTypeClient) Use(hooks ...Hook) {\n\tc.hooks.ClubType = append(c.hooks.ClubType, hooks...)\n}",
"func (c *PositionInPharmacistClient) Use(hooks ...Hook) {\n\tc.hooks.PositionInPharmacist = append(c.hooks.PositionInPharmacist, hooks...)\n}",
"func (c *DentistClient) Use(hooks ...Hook) {\n\tc.hooks.Dentist = append(c.hooks.Dentist, hooks...)\n}",
"func (c *ComplaintClient) Use(hooks ...Hook) {\n\tc.hooks.Complaint = append(c.hooks.Complaint, hooks...)\n}",
"func (c *PhysicianClient) Use(hooks ...Hook) {\n\tc.hooks.Physician = append(c.hooks.Physician, hooks...)\n}",
"func (c *PhysicianClient) Use(hooks ...Hook) {\n\tc.hooks.Physician = append(c.hooks.Physician, hooks...)\n}",
"func (c *UserWalletClient) Use(hooks ...Hook) {\n\tc.hooks.UserWallet = append(c.hooks.UserWallet, hooks...)\n}",
"func (c *SkillClient) Use(hooks ...Hook) {\n\tc.hooks.Skill = append(c.hooks.Skill, hooks...)\n}",
"func (c *FacultyClient) Use(hooks ...Hook) {\n\tc.hooks.Faculty = append(c.hooks.Faculty, hooks...)\n}",
"func (c *MedicineClient) Use(hooks ...Hook) {\n\tc.hooks.Medicine = append(c.hooks.Medicine, hooks...)\n}",
"func (c *MediaClient) Use(hooks ...Hook) {\n\tc.hooks.Media = append(c.hooks.Media, hooks...)\n}",
"func (c *OperativeClient) Use(hooks ...Hook) {\n\tc.hooks.Operative = append(c.hooks.Operative, hooks...)\n}",
"func (c *OperationClient) Use(hooks ...Hook) {\n\tc.hooks.Operation = append(c.hooks.Operation, hooks...)\n}",
"func (c *BedtypeClient) Use(hooks ...Hook) {\n\tc.hooks.Bedtype = append(c.hooks.Bedtype, hooks...)\n}",
"func (c *UserClient) Use(hooks ...Hook) {\n\tc.hooks.User = append(c.hooks.User, hooks...)\n}",
"func (c *UserClient) Use(hooks ...Hook) {\n\tc.hooks.User = append(c.hooks.User, hooks...)\n}",
"func (c *UserClient) Use(hooks ...Hook) {\n\tc.hooks.User = append(c.hooks.User, hooks...)\n}",
"func (c *UserClient) Use(hooks ...Hook) {\n\tc.hooks.User = append(c.hooks.User, hooks...)\n}",
"func (c *UserClient) Use(hooks ...Hook) {\n\tc.hooks.User = append(c.hooks.User, hooks...)\n}",
"func (c *UserClient) Use(hooks ...Hook) {\n\tc.hooks.User = append(c.hooks.User, hooks...)\n}",
"func (c *UserClient) Use(hooks ...Hook) {\n\tc.hooks.User = append(c.hooks.User, hooks...)\n}",
"func (c *UserClient) Use(hooks ...Hook) {\n\tc.hooks.User = append(c.hooks.User, hooks...)\n}",
"func (c *UserClient) Use(hooks ...Hook) {\n\tc.hooks.User = append(c.hooks.User, hooks...)\n}",
"func (c *UserClient) Use(hooks ...Hook) {\n\tc.hooks.User = append(c.hooks.User, hooks...)\n}",
"func (c *UserClient) Use(hooks ...Hook) {\n\tc.hooks.User = append(c.hooks.User, hooks...)\n}",
"func (c *ActivityTypeClient) Use(hooks ...Hook) {\n\tc.hooks.ActivityType = append(c.hooks.ActivityType, hooks...)\n}",
"func (c *TransactionClient) Use(hooks ...Hook) {\n\tc.hooks.Transaction = append(c.hooks.Transaction, hooks...)\n}",
"func withHooks[V Value, M any, PM interface {\n\t*M\n\tMutation\n}](ctx context.Context, exec func(context.Context) (V, error), mutation PM, hooks []Hook) (value V, err error) {\n\tif len(hooks) == 0 {\n\t\treturn exec(ctx)\n\t}\n\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\tmutationT, ok := m.(PM)\n\t\tif !ok {\n\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t}\n\t\t// Set the mutation to the builder.\n\t\t*mutation = *mutationT\n\t\treturn exec(ctx)\n\t})\n\tfor i := len(hooks) - 1; i >= 0; i-- {\n\t\tif hooks[i] == nil {\n\t\t\treturn value, fmt.Errorf(\"ent: uninitialized hook (forgotten import ent/runtime?)\")\n\t\t}\n\t\tmut = hooks[i](mut)\n\t}\n\tv, err := mut.Mutate(ctx, mutation)\n\tif err != nil {\n\t\treturn value, err\n\t}\n\tnv, ok := v.(V)\n\tif !ok {\n\t\treturn value, fmt.Errorf(\"unexpected node type %T returned from %T\", v, mutation)\n\t}\n\treturn nv, nil\n}",
"func (c *PartClient) Use(hooks ...Hook) {\n\tc.hooks.Part = append(c.hooks.Part, hooks...)\n}",
"func (c *BillClient) Use(hooks ...Hook) {\n\tc.hooks.Bill = append(c.hooks.Bill, hooks...)\n}",
"func (c *BillClient) Use(hooks ...Hook) {\n\tc.hooks.Bill = append(c.hooks.Bill, hooks...)\n}",
"func (c *BillClient) Use(hooks ...Hook) {\n\tc.hooks.Bill = append(c.hooks.Bill, hooks...)\n}",
"func (c *PaymentClient) Use(hooks ...Hook) {\n\tc.hooks.Payment = append(c.hooks.Payment, hooks...)\n}",
"func (c *PaymentClient) Use(hooks ...Hook) {\n\tc.hooks.Payment = append(c.hooks.Payment, hooks...)\n}",
"func (c *CleanernameClient) Use(hooks ...Hook) {\n\tc.hooks.Cleanername = append(c.hooks.Cleanername, hooks...)\n}",
"func (c *PledgeClient) Use(hooks ...Hook) {\n\tc.hooks.Pledge = append(c.hooks.Pledge, hooks...)\n}",
"func (c *PurposeClient) Use(hooks ...Hook) {\n\tc.hooks.Purpose = append(c.hooks.Purpose, hooks...)\n}",
"func (c *ClubapplicationClient) Use(hooks ...Hook) {\n\tc.hooks.Clubapplication = append(c.hooks.Clubapplication, hooks...)\n}",
"func (c *UnitOfMedicineClient) Use(hooks ...Hook) {\n\tc.hooks.UnitOfMedicine = append(c.hooks.UnitOfMedicine, hooks...)\n}",
"func (c *BuildingClient) Use(hooks ...Hook) {\n\tc.hooks.Building = append(c.hooks.Building, hooks...)\n}",
"func (c *ActivitiesClient) Use(hooks ...Hook) {\n\tc.hooks.Activities = append(c.hooks.Activities, hooks...)\n}",
"func (c *PrescriptionClient) Use(hooks ...Hook) {\n\tc.hooks.Prescription = append(c.hooks.Prescription, hooks...)\n}",
"func (c *BinaryFileClient) Use(hooks ...Hook) {\n\tc.hooks.BinaryFile = append(c.hooks.BinaryFile, hooks...)\n}",
"func (c *Client) Use(hooks ...Hook) {\n\tc.Event.Use(hooks...)\n\tc.Tag.Use(hooks...)\n}",
"func (c *GenderClient) Use(hooks ...Hook) {\n\tc.hooks.Gender = append(c.hooks.Gender, hooks...)\n}",
"func (c *GenderClient) Use(hooks ...Hook) {\n\tc.hooks.Gender = append(c.hooks.Gender, hooks...)\n}",
"func (c *PatientClient) Use(hooks ...Hook) {\n\tc.hooks.Patient = append(c.hooks.Patient, hooks...)\n}",
"func (c *PatientClient) Use(hooks ...Hook) {\n\tc.hooks.Patient = append(c.hooks.Patient, hooks...)\n}",
"func (c *PatientClient) Use(hooks ...Hook) {\n\tc.hooks.Patient = append(c.hooks.Patient, hooks...)\n}",
"func (c *MedicineTypeClient) Use(hooks ...Hook) {\n\tc.hooks.MedicineType = append(c.hooks.MedicineType, hooks...)\n}",
"func (c *QueueClient) Use(hooks ...Hook) {\n\tc.hooks.Queue = append(c.hooks.Queue, hooks...)\n}",
"func (c *UsertypeClient) Use(hooks ...Hook) {\n\tc.hooks.Usertype = append(c.hooks.Usertype, hooks...)\n}",
"func (c *JobpositionClient) Use(hooks ...Hook) {\n\tc.hooks.Jobposition = append(c.hooks.Jobposition, hooks...)\n}",
"func (c *Client) Use(hooks ...Hook) {\n\tc.Admin.Use(hooks...)\n\tc.AdminSession.Use(hooks...)\n\tc.Category.Use(hooks...)\n\tc.Post.Use(hooks...)\n\tc.PostAttachment.Use(hooks...)\n\tc.PostImage.Use(hooks...)\n\tc.PostThumbnail.Use(hooks...)\n\tc.PostVideo.Use(hooks...)\n\tc.UnsavedPost.Use(hooks...)\n\tc.UnsavedPostAttachment.Use(hooks...)\n\tc.UnsavedPostImage.Use(hooks...)\n\tc.UnsavedPostThumbnail.Use(hooks...)\n\tc.UnsavedPostVideo.Use(hooks...)\n}",
"func (c *StaytypeClient) Use(hooks ...Hook) {\n\tc.hooks.Staytype = append(c.hooks.Staytype, hooks...)\n}",
"func (c *ClubappStatusClient) Use(hooks ...Hook) {\n\tc.hooks.ClubappStatus = append(c.hooks.ClubappStatus, hooks...)\n}",
"func (c *EmployeeClient) Use(hooks ...Hook) {\n\tc.hooks.Employee = append(c.hooks.Employee, hooks...)\n}",
"func (c *EmployeeClient) Use(hooks ...Hook) {\n\tc.hooks.Employee = append(c.hooks.Employee, hooks...)\n}",
"func (c *EmployeeClient) Use(hooks ...Hook) {\n\tc.hooks.Employee = append(c.hooks.Employee, hooks...)\n}",
"func (c *PostThumbnailClient) Use(hooks ...Hook) {\n\tc.hooks.PostThumbnail = append(c.hooks.PostThumbnail, hooks...)\n}",
"func (c *CategoryClient) Use(hooks ...Hook) {\n\tc.hooks.Category = append(c.hooks.Category, hooks...)\n}",
"func (c *ComplaintTypeClient) Use(hooks ...Hook) {\n\tc.hooks.ComplaintType = append(c.hooks.ComplaintType, hooks...)\n}",
"func (c *UnsavedPostImageClient) Use(hooks ...Hook) {\n\tc.hooks.UnsavedPostImage = append(c.hooks.UnsavedPostImage, hooks...)\n}",
"func (c *PartorderClient) Use(hooks ...Hook) {\n\tc.hooks.Partorder = append(c.hooks.Partorder, hooks...)\n}"
] |
[
"0.6796464",
"0.66957283",
"0.6653118",
"0.65774274",
"0.65774274",
"0.6572306",
"0.65687555",
"0.65336865",
"0.6497727",
"0.64947987",
"0.64811444",
"0.64671475",
"0.6440133",
"0.6424327",
"0.64152217",
"0.6411765",
"0.6409184",
"0.63899976",
"0.63851744",
"0.63505346",
"0.634656",
"0.63459116",
"0.63451207",
"0.6342438",
"0.63237566",
"0.63164604",
"0.6315569",
"0.6293108",
"0.6289729",
"0.62855524",
"0.62855524",
"0.62855524",
"0.6279664",
"0.6268996",
"0.6267866",
"0.62563324",
"0.624211",
"0.62405825",
"0.6239608",
"0.623336",
"0.6225799",
"0.6225799",
"0.6214882",
"0.6195864",
"0.61956745",
"0.61872935",
"0.61831427",
"0.6146602",
"0.6145558",
"0.61449003",
"0.6141901",
"0.6141901",
"0.6141901",
"0.6141901",
"0.6141901",
"0.6141901",
"0.6141901",
"0.6141901",
"0.6141901",
"0.6141901",
"0.6141901",
"0.61373544",
"0.61244154",
"0.61182487",
"0.6117665",
"0.6117452",
"0.6117452",
"0.6117452",
"0.6116562",
"0.6116562",
"0.6108712",
"0.6098726",
"0.60871756",
"0.60818905",
"0.607298",
"0.60696614",
"0.60594344",
"0.6058244",
"0.60540885",
"0.60521674",
"0.6047488",
"0.6047488",
"0.6037786",
"0.6037786",
"0.6037786",
"0.6033584",
"0.6033251",
"0.60095483",
"0.6002962",
"0.5977843",
"0.59757",
"0.5970224",
"0.5960865",
"0.5960865",
"0.5960865",
"0.5947667",
"0.592967",
"0.59270203",
"0.5915628",
"0.59150934"
] |
0.6534369
|
7
|
Create returns a create builder for UnsavedPostVideo.
|
func (c *UnsavedPostVideoClient) Create() *UnsavedPostVideoCreate {
mutation := newUnsavedPostVideoMutation(c.config, OpCreate)
return &UnsavedPostVideoCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *PostVideoClient) Create() *PostVideoCreate {\n\tmutation := newPostVideoMutation(c.config, OpCreate)\n\treturn &PostVideoCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upvc *UnsavedPostVideoCreate) Save(ctx context.Context) (*UnsavedPostVideo, error) {\n\tvar (\n\t\terr error\n\t\tnode *UnsavedPostVideo\n\t)\n\tupvc.defaults()\n\tif len(upvc.hooks) == 0 {\n\t\tif err = upvc.check(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tnode, err = upvc.sqlSave(ctx)\n\t} else {\n\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\tmutation, ok := m.(*UnsavedPostVideoMutation)\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t}\n\t\t\tif err = upvc.check(); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tupvc.mutation = mutation\n\t\t\tnode, err = upvc.sqlSave(ctx)\n\t\t\tmutation.done = true\n\t\t\treturn node, err\n\t\t})\n\t\tfor i := len(upvc.hooks) - 1; i >= 0; i-- {\n\t\t\tmut = upvc.hooks[i](mut)\n\t\t}\n\t\tif _, err := mut.Mutate(ctx, upvc.mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn node, err\n}",
"func NewUnsavedPostVideoClient(c config) *UnsavedPostVideoClient {\n\treturn &UnsavedPostVideoClient{config: c}\n}",
"func (c *UnsavedPostClient) Create() *UnsavedPostCreate {\n\tmutation := newUnsavedPostMutation(c.config, OpCreate)\n\treturn &UnsavedPostCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (video *FakeVideo) CreateVideo(userID string) (err error) {\n\tif video.Name == \"\" {\n\t\terr = errors.New(\"the video name cannot be empty\")\n\n\t\treturn\n\t} else if video.URL == \"\" {\n\t\terr = errors.New(\"the video URL cannot be empty\")\n\n\t\treturn\n\t}\n\n\terr = nil\n\n\treturn\n}",
"func (c *UnsavedPostVideoClient) Delete() *UnsavedPostVideoDelete {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpDelete)\n\treturn &UnsavedPostVideoDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostVideoClient) Get(ctx context.Context, id int) (*UnsavedPostVideo, error) {\n\treturn c.Query().Where(unsavedpostvideo.ID(id)).Only(ctx)\n}",
"func NewVideo(title, fileName string, id int64, createdBy *Profile) *Video {\n\tv := &Video{\n\t\tTitle: title,\n\t\tFileName: fileName,\n\t\tID: id,\n\t\tCreated: time.Now(),\n\t\tCreatedByID: createdBy.ID,\n\t}\n\n\treturn v\n}",
"func NewPostVideoClient(c config) *PostVideoClient {\n\treturn &PostVideoClient{config: c}\n}",
"func (upvcb *UnsavedPostVideoCreateBulk) Save(ctx context.Context) ([]*UnsavedPostVideo, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(upvcb.builders))\n\tnodes := make([]*UnsavedPostVideo, len(upvcb.builders))\n\tmutators := make([]Mutator, len(upvcb.builders))\n\tfor i := range upvcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := upvcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*UnsavedPostVideoMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, upvcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, upvcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, upvcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (upq *UnsavedPostQuery) WithVideos(opts ...func(*UnsavedPostVideoQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostVideoQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withVideos = query\n\treturn upq\n}",
"func NewCreateVideoUploadTaskRequestWithoutParam() *CreateVideoUploadTaskRequest {\n\n return &CreateVideoUploadTaskRequest{\n JDCloudRequest: core.JDCloudRequest{\n URL: \"/videoUploadTask\",\n Method: \"POST\",\n Header: nil,\n Version: \"v1\",\n },\n }\n}",
"func (c *UnsavedPostAttachmentClient) Create() *UnsavedPostAttachmentCreate {\n\tmutation := newUnsavedPostAttachmentMutation(c.config, OpCreate)\n\treturn &UnsavedPostAttachmentCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upvc *UnsavedPostVideoCreate) Mutation() *UnsavedPostVideoMutation {\n\treturn upvc.mutation\n}",
"func (upvc *UnsavedPostVideoCreate) check() error {\n\tif _, ok := upvc.mutation.UUID(); !ok {\n\t\treturn &ValidationError{Name: \"uuid\", err: errors.New(\"ent: missing required field \\\"uuid\\\"\")}\n\t}\n\tif v, ok := upvc.mutation.UUID(); ok {\n\t\tif err := unsavedpostvideo.UUIDValidator(v); err != nil {\n\t\t\treturn &ValidationError{Name: \"uuid\", err: fmt.Errorf(\"ent: validator failed for field \\\"uuid\\\": %w\", err)}\n\t\t}\n\t}\n\tif _, ok := upvc.mutation.Validity(); !ok {\n\t\treturn &ValidationError{Name: \"validity\", err: errors.New(\"ent: missing required field \\\"validity\\\"\")}\n\t}\n\tif v, ok := upvc.mutation.Validity(); ok {\n\t\tif err := unsavedpostvideo.ValidityValidator(v); err != nil {\n\t\t\treturn &ValidationError{Name: \"validity\", err: fmt.Errorf(\"ent: validator failed for field \\\"validity\\\": %w\", err)}\n\t\t}\n\t}\n\tif v, ok := upvc.mutation.Title(); ok {\n\t\tif err := unsavedpostvideo.TitleValidator(v); err != nil {\n\t\t\treturn &ValidationError{Name: \"title\", err: fmt.Errorf(\"ent: validator failed for field \\\"title\\\": %w\", err)}\n\t\t}\n\t}\n\tif v, ok := upvc.mutation.URL(); ok {\n\t\tif err := unsavedpostvideo.URLValidator(v); err != nil {\n\t\t\treturn &ValidationError{Name: \"url\", err: fmt.Errorf(\"ent: validator failed for field \\\"url\\\": %w\", err)}\n\t\t}\n\t}\n\tif _, ok := upvc.mutation.CreatedAt(); !ok {\n\t\treturn &ValidationError{Name: \"created_at\", err: errors.New(\"ent: missing required field \\\"created_at\\\"\")}\n\t}\n\tif _, ok := upvc.mutation.UnsavedPostID(); !ok {\n\t\treturn &ValidationError{Name: \"unsaved_post\", err: errors.New(\"ent: missing required edge \\\"unsaved_post\\\"\")}\n\t}\n\treturn nil\n}",
"func (c *UnsavedPostVideoClient) Update() *UnsavedPostVideoUpdate {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpUpdate)\n\treturn &UnsavedPostVideoUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upvc *UnsavedPostVideoCreate) SetUnsavedPost(u *UnsavedPost) *UnsavedPostVideoCreate {\n\treturn upvc.SetUnsavedPostID(u.ID)\n}",
"func (upu *UnsavedPostUpdate) ClearVideos() *UnsavedPostUpdate {\n\tupu.mutation.ClearVideos()\n\treturn upu\n}",
"func (b *GroupsSetLongPollSettingsBuilder) VideoNew(v bool) *GroupsSetLongPollSettingsBuilder {\n\tb.Params[\"video_new\"] = v\n\treturn b\n}",
"func (v *videoService) Create(ctx context.Context, req *pbVideo.CreateVideoRequest, res *pbVideo.CreateVideoResponse) error {\n\n\t// Fetch token\n\tmd, _ := metadata.FromContext(ctx)\n\ttoken, err := v.jwtHandler.GetBearerToken(md)\n\tif err != nil {\n\t\treturn merr.Unauthorized(config.ServiceName, \"%s\", err.Error())\n\t}\n\t// Decode jwt and extract user\n\tclaims, err := v.jwtHandler.Decode(token)\n\tif err != nil {\n\t\tlog.Debug().Interface(\"error\", err).Msg(\"unable to decode jwt token\")\n\t\treturn merr.Unauthorized(config.ServiceName, \"%s\", err.Error())\n\t}\n\tuser := claims.User\n\n\t// TODO: Authorization: create:video\n\n\t// Check if raw file does already exist\n\texistingVideo, _ := v.videoRepository.FindByRawStorageKey(req.Video.Storage.RawKey)\n\tif existingVideo != nil {\n\t\tlog.Warn().Str(\"file_key\", existingVideo.Storage.RawKey).Msg(\"a source video with that key already exists\")\n\t\treturn errors.RawVideoAlreadyExists\n\t}\n\n\t// Check if file actually exists in S3\n\tfileKey := req.Video.Storage.RawKey\n\terr = v.s3Bucket.CheckFileExists(fileKey, config.AwsS3VideoBucket)\n\tif err != nil {\n\t\tlog.Warn().Str(\"key\", fileKey).Err(err).Msg(\"key does not exist in bucket\")\n\t\tres.Errors = append(res.Errors, &pbVideo.Error{\n\t\t\tDescription: errors.RawVideoFileS3NotFound.Error(),\n\t\t\tCode: 404,\n\t\t})\n\t\treturn merr.NotFound(config.ServiceName, \"%s\", errors.RawVideoFileS3NotFound)\n\t}\n\tlog.Info().Str(\"key\", fileKey).Str(\"bucket\", config.AwsS3VideoBucket).Msg(\"key found in bucket\")\n\n\t// Insert video into DB\n\tvideo, err := v.videoRepository.CreateVideo(mongodb.UnmarshalProtobuf(req.Video, user.Id))\n\tif err != nil {\n\t\tlog.Warn().Interface(\"error\", err).Msg(\"unable to create video in database\")\n\t\treturn err\n\t}\n\tlog.Info().Str(\"video_id\", video.ID.Hex()).Msg(\"created video\")\n\treq.Video.Id = video.ID.Hex()\n\n\t// Publish event\n\tv.videoPublisher.PublishVideoCreated(&pbVideo.VideoCreatedEvent{\n\t\tVideo: req.Video,\n\t\tUserId: user.Id,\n\t})\n\n\tres.Video = req.Video\n\n\treturn nil\n}",
"func (c *PostVideoClient) Delete() *PostVideoDelete {\n\tmutation := newPostVideoMutation(c.config, OpDelete)\n\treturn &PostVideoDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func New(ctx *sweetygo.Context) error {\n\ttitle := ctx.Param(\"title\")\n\tcat := ctx.Param(\"cat\")\n\thtml := ctx.Param(\"html\")\n\tmd := ctx.Param(\"md\")\n\tif title != \"\" && cat != \"\" && html != \"\" && md != \"\" {\n\t\terr := model.NewPost(title, cat, html, md)\n\t\tif err != nil {\n\t\t\treturn ctx.JSON(500, 0, \"create post error\", nil)\n\t\t}\n\t\treturn ctx.JSON(201, 1, \"success\", nil)\n\t}\n\treturn ctx.JSON(406, 0, \"I can't understand what u want\", nil)\n}",
"func (d *Dao) NewVideo(c context.Context, filename string) (v *archive.Video, err error) {\n\thash64 := int64(farm.Hash64([]byte(filename)))\n\trow := d.db.QueryRow(c, _newVideoByFnSQL, hash64, filename)\n\tv = &archive.Video{}\n\tvar avrState, vState int16\n\tif err = row.Scan(&v.ID, &v.Filename, &v.Cid, &v.Aid, &v.Title, &v.Desc, &v.SrcType, &v.Duration, &v.Filesize, &v.Resolutions,\n\t\t&v.Playurl, &v.FailCode, &v.Index, &v.Attribute, &v.XcodeState, &avrState, &vState, &v.CTime, &v.MTime); err != nil {\n\t\tif err == sql.ErrNoRows {\n\t\t\tv = nil\n\t\t\terr = nil\n\t\t} else {\n\t\t\tlog.Error(\"row.Scan error(%v)\", err)\n\t\t}\n\t\treturn\n\t}\n\t// 2 state map to 1\n\tif avrState == archive.VideoStatusDelete {\n\t\tv.Status = archive.VideoStatusDelete\n\t} else {\n\t\tv.Status = vState\n\t}\n\treturn\n}",
"func (upvc *UnsavedPostVideoCreate) SetUnsavedPostID(id int) *UnsavedPostVideoCreate {\n\tupvc.mutation.SetUnsavedPostID(id)\n\treturn upvc\n}",
"func (b *GroupsSetCallbackSettingsBuilder) VideoNew(v bool) *GroupsSetCallbackSettingsBuilder {\n\tb.Params[\"video_new\"] = v\n\treturn b\n}",
"func (c *UnsavedPostThumbnailClient) Create() *UnsavedPostThumbnailCreate {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpCreate)\n\treturn &UnsavedPostThumbnailCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (client *Client) CreateUploadVideoWithOptions(request *CreateUploadVideoRequest, runtime *util.RuntimeOptions) (_result *CreateUploadVideoResponse, _err error) {\n\t_err = util.ValidateModel(request)\n\tif _err != nil {\n\t\treturn _result, _err\n\t}\n\tquery := map[string]interface{}{}\n\tif !tea.BoolValue(util.IsUnset(request.AppId)) {\n\t\tquery[\"AppId\"] = request.AppId\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.CateId)) {\n\t\tquery[\"CateId\"] = request.CateId\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.CoverURL)) {\n\t\tquery[\"CoverURL\"] = request.CoverURL\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.Description)) {\n\t\tquery[\"Description\"] = request.Description\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.FileName)) {\n\t\tquery[\"FileName\"] = request.FileName\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.FileSize)) {\n\t\tquery[\"FileSize\"] = request.FileSize\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.StorageLocation)) {\n\t\tquery[\"StorageLocation\"] = request.StorageLocation\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.Tags)) {\n\t\tquery[\"Tags\"] = request.Tags\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.TemplateGroupId)) {\n\t\tquery[\"TemplateGroupId\"] = request.TemplateGroupId\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.Title)) {\n\t\tquery[\"Title\"] = request.Title\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.UserData)) {\n\t\tquery[\"UserData\"] = request.UserData\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.WorkflowId)) {\n\t\tquery[\"WorkflowId\"] = request.WorkflowId\n\t}\n\n\treq := &openapi.OpenApiRequest{\n\t\tQuery: openapiutil.Query(query),\n\t}\n\tparams := &openapi.Params{\n\t\tAction: tea.String(\"CreateUploadVideo\"),\n\t\tVersion: tea.String(\"2017-03-21\"),\n\t\tProtocol: tea.String(\"HTTPS\"),\n\t\tPathname: tea.String(\"/\"),\n\t\tMethod: tea.String(\"POST\"),\n\t\tAuthType: tea.String(\"AK\"),\n\t\tStyle: tea.String(\"RPC\"),\n\t\tReqBodyType: tea.String(\"formData\"),\n\t\tBodyType: tea.String(\"json\"),\n\t}\n\t_result = &CreateUploadVideoResponse{}\n\t_body, _err := client.CallApi(params, req, runtime)\n\tif _err != nil {\n\t\treturn _result, _err\n\t}\n\t_err = tea.Convert(_body, &_result)\n\treturn _result, _err\n}",
"func (upuo *UnsavedPostUpdateOne) ClearVideos() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearVideos()\n\treturn upuo\n}",
"func NewPost(username string, imageURL string, thumbnailURL string, caption string, url string, messageBody string, mood MoodState, keywords []string, likers []string) *Post {\n\n\tauditableContent := AuditableContent{createdBy: username, createdTime: time.Now()}\n\n\treturn &Post{\n\t\tauditableContent: auditableContent,\n\t\tcaption: caption,\n\t\turl: url,\n\t\timageURL: imageURL,\n\t\tthumbnailURL: thumbnailURL,\n\t\tmessageBody: messageBody,\n\t\tauthorMood: mood,\n\t\tkeywords: keywords,\n\t\tlikers: likers,\n\t}\n}",
"func (c *UnsavedPostImageClient) Create() *UnsavedPostImageCreate {\n\tmutation := newUnsavedPostImageMutation(c.config, OpCreate)\n\treturn &UnsavedPostImageCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func NewVideo(logger *logger.Logger, path string) *Video {\n\tv := &Video{\n\t\tl: logger,\n\t\tpath: path,\n\t}\n\treturn v\n}",
"func (c *UnsavedPostVideoClient) Query() *UnsavedPostVideoQuery {\n\treturn &UnsavedPostVideoQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func NewPost(username string, mood MoodState, caption string, MessageBody string, url string, imageURL string, thumbnailURI string, keywords []string) *Post {\n\n\tauditableContent := AuditableContent{CreatedBy: username, TimeCreated: time.Now()}\n\treturn &Post{Caption: caption, MessageBody: MessageBody, URL: url, ImageURI: imageURL, ThumbnailURI: thumbnailURI, AuthorMood: mood, Keywords: keywords, AuditableContent: auditableContent}\n}",
"func NewPost(username string, mood MoodState, caption string, messageBody string, url string, imageURI string, thumbnailURI string, keywords []string) *Post {\n\tauditableContent := AuditableContent{CreatedBy: username, TimeCreated: time.Now()}\n\treturn &Post{Caption: caption, MessageBody: messageBody, URL: url, ImageURI: imageURI, ThumbnailURI: thumbnailURI, AuthorMood: mood, Keywords: keywords, AuditableContent: auditableContent}\n}",
"func (u *App) Create(c echo.Context, req *Create) (*model.Post, error) {\n\tid, err := util.GenerateUUID()\n\tif err = zaplog.ZLog(err); err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar operator model.User\n\tif err = u.db.Model(&model.User{}).Where(\"uuid = ?\", req.Author).First(&operator).Error; err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar dupe model.Post\n\tif err = u.db.Model(&model.Post{}).Where(\"slug = ?\", req.Slug).Order(\"id DESC\").First(&dupe).Error; err == nil {\n\t\tfragment := strings.TrimPrefix(dupe.Slug, req.Slug)\n\t\tif fragment == \"\" {\n\t\t\treq.Slug += \"-2\"\n\t\t}\n\n\t\tcounter, err := strconv.Atoi(strings.TrimPrefix(fragment, \"-\"))\n\t\tif err != nil {\n\t\t\treq.Slug += \"-2\"\n\t\t} else {\n\t\t\treq.Slug += fmt.Sprintf(\"-%d\", counter+1)\n\t\t}\n\t}\n\n\tif len(req.Excerpt) > 255 {\n\t\treq.Excerpt = req.Excerpt[:250] + \"...\"\n\t}\n\n\tpost := model.Post{\n\t\tBase: model.Base{ID: id},\n\t\tAuthor: req.Author,\n\t\tAuthorName: operator.Name,\n\t\tCategory: req.Category,\n\t\tTags: req.Tags,\n\t\tTitle: req.Title,\n\t\tSlug: req.Slug,\n\t\tContent: req.Content,\n\t\tExcerpt: req.Excerpt,\n\t\tStatus: req.Status,\n\t}\n\treturn u.udb.Create(u.db, post)\n}",
"func (client *Client) CreateUploadVideo(request *CreateUploadVideoRequest) (_result *CreateUploadVideoResponse, _err error) {\n\truntime := &util.RuntimeOptions{}\n\t_result = &CreateUploadVideoResponse{}\n\t_body, _err := client.CreateUploadVideoWithOptions(request, runtime)\n\tif _err != nil {\n\t\treturn _result, _err\n\t}\n\t_result = _body\n\treturn _result, _err\n}",
"func (upvc *UnsavedPostVideoCreate) defaults() {\n\tif _, ok := upvc.mutation.Validity(); !ok {\n\t\tv := unsavedpostvideo.DefaultValidity\n\t\tupvc.mutation.SetValidity(v)\n\t}\n\tif _, ok := upvc.mutation.CreatedAt(); !ok {\n\t\tv := unsavedpostvideo.DefaultCreatedAt()\n\t\tupvc.mutation.SetCreatedAt(v)\n\t}\n}",
"func (c *UnsavedPostVideoClient) CreateBulk(builders ...*UnsavedPostVideoCreate) *UnsavedPostVideoCreateBulk {\n\treturn &UnsavedPostVideoCreateBulk{config: c.config, builders: builders}\n}",
"func NewCreateWidgetUnprocessableEntity() *CreateWidgetUnprocessableEntity {\n\treturn &CreateWidgetUnprocessableEntity{}\n}",
"func (upvc *UnsavedPostVideoCreate) SaveX(ctx context.Context) *UnsavedPostVideo {\n\tv, err := upvc.Save(ctx)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn v\n}",
"func (c *PostVideoClient) Get(ctx context.Context, id int) (*PostVideo, error) {\n\treturn c.Query().Where(postvideo.ID(id)).Only(ctx)\n}",
"func (m *VideoManager) GetVideoOrCreateTask(uri, kind string) (Video, error) {\n\tclaim, err := claim.Resolve(uri)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tv, err := m.library.Get(claim.SDHash)\n\tif v == nil || err == sql.ErrNoRows {\n\t\terr := video.ValidateByClaim(claim)\n\t\tif err != nil {\n\t\t\tif errors.Is(err, video.ErrChannelNotEnabled) {\n\t\t\t\tm.library.IncViews(claim.PermanentURL, claim.SDHash)\n\t\t\t}\n\t\t\treturn nil, err\n\t\t}\n\n\t\tt, err := m.queue.GetBySDHash(claim.SDHash)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif t != nil {\n\t\t\treturn nil, video.ErrTranscodingUnderway\n\t\t}\n\t\t_, err = m.queue.Add(uri, claim.SDHash, kind)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn nil, video.ErrTranscodingUnderway\n\t}\n\treturn *v, nil\n}",
"func (api *TelegramBotAPI) NewOutgoingVideo(recipient Recipient, fileName string, reader io.Reader) *OutgoingVideo {\n\treturn &OutgoingVideo{\n\t\toutgoingMessageBase: outgoingMessageBase{\n\t\t\toutgoingBase: outgoingBase{\n\t\t\t\tapi: api,\n\t\t\t\tRecipient: recipient,\n\t\t\t},\n\t\t},\n\t\toutgoingFileBase: outgoingFileBase{\n\t\t\tfileName: fileName,\n\t\t\tr: reader,\n\t\t},\n\t}\n}",
"func (a PromptsApi) CreateVideoEmailPrompt(prompt VideoEmailPrompt) (*VideoEmailPrompt, *APIResponse, error) {\n\n\tvar httpMethod = \"Post\"\n\t// create path and map variables\n\tpath := a.Configuration.BasePath + \"/prompt\"\n\n\n\theaderParams := make(map[string]string)\n\tqueryParams := url.Values{}\n\tformParams := make(map[string]string)\n\tvar postBody interface{}\n\tvar fileName string\n\tvar fileBytes []byte\n\t// authentication '(BBOAuth2)' required\n\t// oauth required\n\tif a.Configuration.AccessToken != \"\"{\n\t\theaderParams[\"Authorization\"] = \"Bearer \" + a.Configuration.AccessToken\n\t}\n\t// add default headers if any\n\tfor key := range a.Configuration.DefaultHeader {\n\t\theaderParams[key] = a.Configuration.DefaultHeader[key]\n\t}\n\n\n\t// to determine the Content-Type header\n\tlocalVarHttpContentTypes := []string{ \"application/json\", }\n\n\t// set Content-Type header\n\tlocalVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)\n\tif localVarHttpContentType != \"\" {\n\t\theaderParams[\"Content-Type\"] = localVarHttpContentType\n\t}\n\t// to determine the Accept header\n\tlocalVarHttpHeaderAccepts := []string{\n\t\t\"application/json\",\n\t}\n\n\t// set Accept header\n\tlocalVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)\n\tif localVarHttpHeaderAccept != \"\" {\n\t\theaderParams[\"Accept\"] = localVarHttpHeaderAccept\n\t}\n\t// body params\n\tpostBody = &prompt\n\n\tvar successPayload = new(VideoEmailPrompt)\n\thttpResponse, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, fileName, fileBytes)\n\tif err != nil {\n\t\treturn successPayload, NewAPIResponse(httpResponse.RawResponse), err\n\t}\n\terr = json.Unmarshal(httpResponse.Body(), &successPayload)\n\treturn successPayload, NewAPIResponse(httpResponse.RawResponse), err\n}",
"func (c *UnsavedPostVideoClient) QueryUnsavedPost(upv *UnsavedPostVideo) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upv.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostvideo.Table, unsavedpostvideo.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostvideo.UnsavedPostTable, unsavedpostvideo.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upv.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func NewPost(creator *ID, text string, attachment *string) (*Post, error) {\n\tp := &Post{\n\t\tID: NewID(),\n\t\tCreator: creator,\n\t\tText: text,\n\t\tAttachment: attachment,\n\t\tCreatedAt: time.Now(),\n\t}\n\terr := p.Validate()\n\tif err != nil {\n\t\treturn nil, ErrInvalidEntity\n\t}\n\treturn p, nil\n}",
"func videoFromForm(r *http.Request) (*bittube.Video, error) {\n\tvideoURL, err := uploadFileFromForm(r)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"could not upload file: %v\", err)\n\t}\n\tif videoURL == \"\" {\n\t\tvideoURL = r.FormValue(\"videoURL\")\n\t}\n\n\tvideo := &bittube.Video{\n\t\tTitle: r.FormValue(\"title\"),\n\t\tAuthor: r.FormValue(\"author\"),\n\t\tPublishedDate: r.FormValue(\"publishedDate\"),\n\t\tVideoURL: videoURL,\n\t\tDescription: r.FormValue(\"description\"),\n\t\tCreatedBy: r.FormValue(\"createbittube.DBy\"),\n\t\tCreatedByID: r.FormValue(\"createbittube.DByID\"),\n\t}\n\n\t// If the form didn't carry the user information for the creator, populate it\n\t// from the currently logged in user (or mark as anonymous).\n\tif video.CreatedByID == \"\" {\n\t\tuser := profileFromSession(r)\n\t\tif user != nil {\n\t\t\t// Logged in.\n\t\t\tvideo.CreatedBy = user.DisplayName\n\t\t\tvideo.CreatedByID = user.ID\n\t\t} else {\n\t\t\t// Not logged in.\n\t\t\tvideo.SetCreatorAnonymous()\n\t\t}\n\t}\n\n\treturn video, nil\n}",
"func (r *PostingBot) Post(p *reddit.Post) error {\n\tswitch {\n\tcase p.NSFW:\n\t\t// We hide NSFW content\n\t\tmsg := tgbotapi.NewMessage(r.Config.ChatID, fmt.Sprintf(\"Uh oh, nsfw content! 🔞\\n%s\", p.URL))\n\t\tmsg.DisableWebPagePreview = true\n\t\tmsg.ReplyMarkup = utility.SetupInlineKeyboard(p.Subreddit, p.Permalink)\n\t\tr.TBot.Send(msg)\n\tcase p.Media.RedditVideo.IsGIF:\n\t\tmsg := tgbotapi.NewDocumentUpload(r.Config.ChatID, p.URL)\n\t\tmsg.ReplyMarkup = utility.SetupInlineKeyboard(p.Subreddit, p.Permalink)\n\t\tr.TBot.Send(msg)\n\tcase strings.Contains(p.URL, \".jpg\") || strings.Contains(p.URL, \".png\"):\n\t\tmsg := tgbotapi.NewPhotoUpload(r.Config.ChatID, \"\")\n\t\tmsg.FileID = p.URL\n\t\tmsg.UseExisting = true\n\t\tmsg.ReplyMarkup = utility.SetupInlineKeyboard(p.Subreddit, p.Permalink)\n\t\tr.TBot.Send(msg)\n\tdefault:\n\t\tif r.Config.VideoDownload {\n\t\t\tfileName, err := video.GetVideo(p.URL)\n\t\t\tif err != nil {\n\t\t\t\tfmt.Println(err)\n\t\t\t}\n\t\t\tvideoPath := r.Config.DownloadPath + fileName\n\n\t\t\tmsg := tgbotapi.NewVideoUpload(r.Config.ChatID, videoPath)\n\t\t\tmsg.ReplyMarkup = utility.SetupInlineKeyboard(p.Subreddit, p.Permalink)\n\n\t\t\tr.TBot.Send(msg)\n\t\t\tos.Remove(videoPath)\n\t\t} else {\n\t\t\tmsg := tgbotapi.NewMessage(r.Config.ChatID, p.URL)\n\t\t\tr.TBot.Send(msg)\n\t\t}\n\t}\n\treturn nil\n}",
"func (env *Env) CreatePost(w http.ResponseWriter, r *http.Request) {\n\t// Grab the context to get the user\n\tctx := r.Context()\n\t// Clean everything\n\ts := bluemonday.UGCPolicy()\n\tuser := ctx.Value(contextUser).(*models.User)\n\ttitle := s.Sanitize(r.FormValue(\"title\"))\n\tslug := s.Sanitize(r.FormValue(\"slug\"))\n\tsubtitle := s.Sanitize(r.FormValue(\"subtitle\"))\n\tshort := s.Sanitize(r.FormValue(\"short\"))\n\tcontent := s.Sanitize(r.FormValue(\"content\"))\n\tdigest := s.Sanitize(r.FormValue(\"digest\"))\n\t// published must be parsed into a bool\n\tpublished, err := strconv.ParseBool(s.Sanitize(r.FormValue(\"published\")))\n\tif err != nil {\n\t\tenv.log(r, err)\n\t\tw.WriteHeader(http.StatusBadRequest)\n\t\treturn\n\t}\n\tp, err := env.DB.InsertPost(user.ID, title, slug, subtitle, short, content, digest, published)\n\tif err != nil {\n\t\tenv.log(r, err)\n\t\tw.WriteHeader(http.StatusInternalServerError)\n\t\treturn\n\t}\n\t// Send out created post\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tw.WriteHeader(http.StatusOK)\n\tjson.NewEncoder(w).Encode(p)\n}",
"func (upvc *UnsavedPostVideoCreate) SetValidity(u unsavedpostvideo.Validity) *UnsavedPostVideoCreate {\n\tupvc.mutation.SetValidity(u)\n\treturn upvc\n}",
"func NewPost(author, vehicle, title, excerpt, body string) *Post {\n\treturn &Post{\n\t\tID: PostID(utils.NewPostID()),\n\t\tAuthor: author,\n\t\tVehicle: vehicle,\n\t\tTitle: title,\n\t\tExcerpt: excerpt,\n\t\tBody: body,\n\t}\n}",
"func (a *StreamsApiService) CreateBigBlueButtonVideoCall(ctx _context.Context) ApiCreateBigBlueButtonVideoCallRequest {\n\treturn ApiCreateBigBlueButtonVideoCallRequest{\n\t\tApiService: a,\n\t\tctx: ctx,\n\t}\n}",
"func NewPost() *Post {\n\treturn &Post{\n\t\tId: bson.NewObjectId(),\n\t\tCreatedAt: utils.Now(),\n\t}\n}",
"func (*postR) NewStruct() *postR {\n\treturn &postR{}\n}",
"func (c *PostClient) Create() *PostCreate {\n\tmutation := newPostMutation(c.config, OpCreate)\n\treturn &PostCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upvc *UnsavedPostVideoCreate) SetCreatedAt(t time.Time) *UnsavedPostVideoCreate {\n\tupvc.mutation.SetCreatedAt(t)\n\treturn upvc\n}",
"func New(title string, path string, body string) *BlogPost {\n\treturn &BlogPost{Title: title,\n\t\tPath: path,\n\t\tBody: template.HTML(body),\n\t\tApproved: false,\n\t\tDeleted: false,\n\t\tPublished: false,\n\t\tCreatedDate: time.Now(),\n\t}\n}",
"func makePost(client *mm.Client, channelId string, message string) *mm.Post {\n\tpost := &mm.Post{}\n\tpost.ChannelId = channelId\n\tpost.Message = message\n\treturn post\n}",
"func (c *MediaClient) Create() *MediaCreate {\n\tmutation := newMediaMutation(c.config, OpCreate)\n\treturn &MediaCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (fs *FS) NewPost(id int64, parent int64, msg Message) error {\n\terr := fs.writePost(id, parent, msg)\n\tif err != nil { return err }\n\n\t// when id==parent, it's a thread\n\tif id == parent {\n\t\terr := fs.setThread(id, msg)\n\t\tfmt.Println(err)\n\t\tif err != nil { return err }\n\t}\n\treturn nil\n}",
"func createHandler(w http.ResponseWriter, r *http.Request) *appError {\n\tvideo, err := videoFromForm(r)\n\tif err != nil {\n\t\treturn appErrorf(err, \"could not parse video from form: %v\", err)\n\t}\n\tid, err := bittube.DB.AddVideo(video)\n\tif err != nil {\n\t\treturn appErrorf(err, \"could not save video: %v\", err)\n\t}\n\t// go publishUpdate(id)\n\thttp.Redirect(w, r, fmt.Sprintf(\"/videos/%d\", id), http.StatusFound)\n\treturn nil\n}",
"func (upu *UnsavedPostUpdate) AddVideoIDs(ids ...int) *UnsavedPostUpdate {\n\tupu.mutation.AddVideoIDs(ids...)\n\treturn upu\n}",
"func (c *PostVideoClient) Update() *PostVideoUpdate {\n\tmutation := newPostVideoMutation(c.config, OpUpdate)\n\treturn &PostVideoUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostAttachmentClient) Create() *PostAttachmentCreate {\n\tmutation := newPostAttachmentMutation(c.config, OpCreate)\n\treturn &PostAttachmentCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func createPost(w http.ResponseWriter, r *http.Request) {\n\n\tsession := sessions.Start(w, r)\n\n\tuser_id := session.GetString(\"user_id\")\n\tcommunity_id := r.FormValue(\"community\")\n\tbody := r.FormValue(\"body\")\n\timage := r.FormValue(\"image\")\n\turl := r.FormValue(\"url\")\n\n\tif len(body) > 2000 {\n\t\thttp.Error(w, \"Your post is too long. (2000 characters maximum)\", http.StatusBadRequest)\n\t\treturn\n\t}\n\tif len(body) == 0 && len(image) == 0 {\n\t\thttp.Error(w, \"Your post is empty.\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tstmt, err := db.Prepare(\"INSERT posts SET created_by=?, community_id=?, body=?, image=?, url=?\")\n\tif err == nil {\n\n\t\t// If there's no errors, we can go ahead and execute the statement.\n\t\t_, err := stmt.Exec(&user_id, &community_id, &body, &image, &url)\n\t\tif err != nil {\n\n\t\t\thttp.Error(w, err.Error(), http.StatusInternalServerError)\n\t\t\treturn\n\n\t\t}\n\n\t\tvar posts = post{}\n\t\tvar timestamp time.Time\n\n\t\tdb.QueryRow(\"SELECT posts.id, created_by, created_at, body, image, username, nickname, avatar FROM posts LEFT JOIN users ON users.id = created_by WHERE created_by = ? ORDER BY created_at DESC LIMIT 1\", user_id).\n\t\t\tScan(&posts.ID, &posts.CreatedBy, ×tamp, &posts.Body, &posts.Image, &posts.PosterUsername, &posts.PosterNickname, &posts.PosterIcon)\n\t\tposts.CreatedAt = humanTiming(timestamp)\n\n\t\tvar data = map[string]interface{}{\n\t\t\t// This is sent to the user who created the post so they can't yeah it.\n\t\t\t\"CanYeah\": false,\n\t\t\t\"Post\": posts,\n\t\t}\n\n\t\terr = templates.ExecuteTemplate(w, \"create_post.html\", data)\n\n\t\tif err != nil {\n\n\t\t\thttp.Error(w, err.Error(), http.StatusInternalServerError)\n\n\t\t}\n\n\t\tvar postTpl bytes.Buffer\n\n\t\t// This will be sent other users so they can yeah it.\n\t\tdata[\"CanYeah\"] = true\n\n\t\ttemplates.ExecuteTemplate(&postTpl, \"create_post.html\", data)\n\n\t\tvar msg wsMessage\n\n\t\tmsg.Type = \"post\"\n\t\tmsg.Content = postTpl.String()\n\n\t\tfor client := range clients {\n\t\t\tif clients[client].OnPage == \"/communities/\"+community_id && clients[client].UserID != strconv.Itoa(posts.CreatedBy) {\n\t\t\t\terr := client.WriteJSON(msg)\n\t\t\t\tif err != nil {\n\t\t\t\t\tfmt.Println(err)\n\t\t\t\t\tclient.Close()\n\t\t\t\t\tdelete(clients, client)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn\n\n\t}\n\n}",
"func (s *WidgetStorage) Create(req *WidgetRequest) *Widget {\n\twidget := &Widget{\n\t\tID: generator.ID(\"wgt\"),\n\t\tSerialNumber: req.SerialNumber,\n\t\tDescription: req.Description,\n\t}\n\ts.mutex.Lock()\n\tdefer s.mutex.Unlock()\n\ts.widgets[widget.ID] = widget\n\treturn widget\n}",
"func (upuo *UnsavedPostUpdateOne) AddVideoIDs(ids ...int) *UnsavedPostUpdateOne {\n\tupuo.mutation.AddVideoIDs(ids...)\n\treturn upuo\n}",
"func (client *VideosClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, videoName string, parameters VideoEntity, options *VideosClientCreateOrUpdateOptions) (*policy.Request, error) {\n\turlPath := \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}\"\n\tif client.subscriptionID == \"\" {\n\t\treturn nil, errors.New(\"parameter client.subscriptionID cannot be empty\")\n\t}\n\turlPath = strings.ReplaceAll(urlPath, \"{subscriptionId}\", url.PathEscape(client.subscriptionID))\n\tif resourceGroupName == \"\" {\n\t\treturn nil, errors.New(\"parameter resourceGroupName cannot be empty\")\n\t}\n\turlPath = strings.ReplaceAll(urlPath, \"{resourceGroupName}\", url.PathEscape(resourceGroupName))\n\tif accountName == \"\" {\n\t\treturn nil, errors.New(\"parameter accountName cannot be empty\")\n\t}\n\turlPath = strings.ReplaceAll(urlPath, \"{accountName}\", url.PathEscape(accountName))\n\tif videoName == \"\" {\n\t\treturn nil, errors.New(\"parameter videoName cannot be empty\")\n\t}\n\turlPath = strings.ReplaceAll(urlPath, \"{videoName}\", url.PathEscape(videoName))\n\treq, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treqQP := req.Raw().URL.Query()\n\treqQP.Set(\"api-version\", \"2021-11-01-preview\")\n\treq.Raw().URL.RawQuery = reqQP.Encode()\n\treq.Raw().Header[\"Accept\"] = []string{\"application/json\"}\n\treturn req, runtime.MarshalAsJSON(req, parameters)\n}",
"func CreatePost(images []types.FileMetadata, author types.User, p types.RawPost, headerImage types.FileMetadata) (interface{}, error) {\n\tif p.ShortURL == \"new\" {\n\t\treturn nil, errors.New(\"the title `new` is reserved\")\n\t}\n\n\tvar post types.Post\n\tdb := database.GetMySQLInstance()\n\tdefer db.Close()\n\n\terr := db.Where(\"shorturl LIKE ?\", p.ShortURL).First(&post).Error\n\tif err != gorm.ErrRecordNotFound {\n\t\treturn nil, errors.New(\"post with similar title already exists..be unique\")\n\t}\n\n\tif p.HeaderImageIndex == nil {\n\t\tp.HeaderImageIndex = &EmptyHeaderIndex\n\t}\n\n\tpost = types.Post{\n\t\tAuthor: &author,\n\t\tTitle: p.Title,\n\t\tShortURL: p.ShortURL,\n\t\tType: p.Type,\n\t\tAbstract: p.Abstract,\n\t\tContent: p.Content,\n\t\tPubDate: p.PubDate,\n\t\tTags: CleanTags(p.Tags),\n\t\tHeaderImageIndex: p.HeaderImageIndex,\n\t\tReadNext: []string{p.ReadNext},\n\t\tIPOwner: p.IPOwner,\n\t}\n\n\t// headerImage was seperated from other images in handler earlier so we can\n\t// process headerImage differently later\n\t// @todo: func resolveHeaderImage\n\n\tpost, err = resolveAttachments(images, post, *post.HeaderImageIndex, headerImage, true)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\terr = createPost(&post, db)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn post, nil\n}",
"func (upq *UnsavedPostQuery) Clone() *UnsavedPostQuery {\n\tif upq == nil {\n\t\treturn nil\n\t}\n\treturn &UnsavedPostQuery{\n\t\tconfig: upq.config,\n\t\tlimit: upq.limit,\n\t\toffset: upq.offset,\n\t\torder: append([]OrderFunc{}, upq.order...),\n\t\tpredicates: append([]predicate.UnsavedPost{}, upq.predicates...),\n\t\twithAuthor: upq.withAuthor.Clone(),\n\t\twithCategory: upq.withCategory.Clone(),\n\t\twithThumbnail: upq.withThumbnail.Clone(),\n\t\twithImages: upq.withImages.Clone(),\n\t\twithVideos: upq.withVideos.Clone(),\n\t\twithAttachments: upq.withAttachments.Clone(),\n\t\t// clone intermediate query.\n\t\tsql: upq.sql.Clone(),\n\t\tpath: upq.path,\n\t}\n}",
"func (api *TelegramBotAPI) NewOutgoingVideoResend(recipient Recipient, fileID string) *OutgoingVideo {\n\treturn &OutgoingVideo{\n\t\toutgoingMessageBase: outgoingMessageBase{\n\t\t\toutgoingBase: outgoingBase{\n\t\t\t\tapi: api,\n\t\t\t\tRecipient: recipient,\n\t\t\t},\n\t\t},\n\t\toutgoingFileBase: outgoingFileBase{\n\t\t\tfileID: fileID,\n\t\t},\n\t}\n}",
"func NewSaveNoContent() *SaveNoContent {\n\treturn &SaveNoContent{}\n}",
"func (p *PhoneCallDiscarded) SetVideo(value bool) {\n\tif value {\n\t\tp.Flags.Set(6)\n\t\tp.Video = true\n\t} else {\n\t\tp.Flags.Unset(6)\n\t\tp.Video = false\n\t}\n}",
"func New(fn string) (*Post, error) {\n\tb, err := ioutil.ReadFile(fn)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t//Check if document start with valid token\n\tif !bytes.HasPrefix(b, []byte(\"---\\n\")) {\n\t\treturn nil, errMissingFrontMatter\n\t}\n\tb = bytes.TrimPrefix(b, []byte(\"---\\n\"))\n\n\t//Split b to array, array[0] is front matter\n\t//array[1] is the rest of text (post's body)\n\tarr := bytes.SplitN(b, []byte(\"\\n---\\n\"), 2)\n\n\t//Generate meta from text\n\tm, err := newMeta(string(arr[0]))\n\n\t//Convert the rest of text to Markdown\n\tbody := blackfriday.MarkdownCommon(arr[1])\n\tp := &Post{\n\t\tm,\n\t\tslug.Make(m.Title),\n\t\ttemplate.HTML(body),\n\t}\n\treturn p, nil\n}",
"func (s *MockStore) CreatePost(b Post) (p Post, err error) {\n\tp.Date = time.Now()\n\tp.ID = s.serial\n\ts.serial++\n\n\ts.mem[p.ID] = p\n\treturn p, err\n}",
"func NewVideoProcessor(tempDir string) *VideoProcessor {\n\treturn &VideoProcessor{tempDir: tempDir}\n}",
"func (broadcast *Broadcast) CreatePost(ctx context.Context, author, postID, title, content,\n\tparentAuthor, parentPostID, sourceAuthor, sourcePostID, redistributionSplitRate string,\n\tlinks map[string]string, privKeyHex string, seq int64) (*model.BroadcastResponse, error) {\n\tvar mLinks []model.IDToURLMapping\n\tif links == nil || len(links) == 0 {\n\t\tmLinks = nil\n\t} else {\n\t\tfor k, v := range links {\n\t\t\tmLinks = append(mLinks, model.IDToURLMapping{k, v})\n\t\t}\n\t}\n\n\tmsg := model.CreatePostMsg{\n\t\tAuthor: author,\n\t\tPostID: postID,\n\t\tTitle: title,\n\t\tContent: content,\n\t\tParentAuthor: parentAuthor,\n\t\tParentPostID: parentPostID,\n\t\tSourceAuthor: sourceAuthor,\n\t\tSourcePostID: sourcePostID,\n\t\tLinks: mLinks,\n\t\tRedistributionSplitRate: redistributionSplitRate,\n\t}\n\treturn broadcast.broadcastTransaction(ctx, msg, privKeyHex, seq, \"\", false)\n}",
"func (upu *UnsavedPostUpdate) RemoveVideoIDs(ids ...int) *UnsavedPostUpdate {\n\tupu.mutation.RemoveVideoIDs(ids...)\n\treturn upu\n}",
"func (i InputInlineQueryResultVideo) construct() InputInlineQueryResultClass { return &i }",
"func NewCreatePostRequestBody()(*CreatePostRequestBody) {\n m := &CreatePostRequestBody{\n }\n m.SetAdditionalData(make(map[string]interface{}));\n return m\n}",
"func NewUnsavedPostClient(c config) *UnsavedPostClient {\n\treturn &UnsavedPostClient{config: c}\n}",
"func (upuo *UnsavedPostUpdateOne) RemoveVideoIDs(ids ...int) *UnsavedPostUpdateOne {\n\tupuo.mutation.RemoveVideoIDs(ids...)\n\treturn upuo\n}",
"func CreatePost(travelcapsule, title, message, imgloc string, hashtags []string, username string, session *r.Session) string {\n\tcapsule := travelcapsule\n\n\tif travelcapsule != \"\" {\n\t\tvar body ct.Body\n\t\tbody = ct.Body{\n\t\t\tMessage: message,\n\t\t}\n\t\t\n\t\tpost := ct.Post{\n\t\t\tTitle: title,\n\t\t\tCreatedOn: time.Now(),\n\t\t\tCreatedBy: username,\n\t\t\tPostBody: body,\n\t\t\tHashtags: hashtags,\n\t\t\tLikes: 0,\n\t\t}\n\t\tcreator := CheckTravelCapsuleExists(travelcapsule, session)\n\t\tfmt.Println(\"Creator: \" + creator + \" User: \" + username)\n\t\tif creator == username {\n\t\t\tgo addImageToPost(imgloc, travelcapsule, post, session)\n\t\t\tfmt.Println(\"Added image\")\n\t\t\treturn capsule\n\t\t}\n\t}\n\treturn \"\"\n}",
"func NewPostAPIV2EventsNoContent() *PostAPIV2EventsNoContent {\n\treturn &PostAPIV2EventsNoContent{}\n}",
"func unmarshalNewPostRequestBodyToDiscussionNewPost(v *NewPostRequestBody) *discussion.NewPost {\n\tres := &discussion.NewPost{\n\t\tThreadID: v.ThreadID,\n\t\tBody: *v.Body,\n\t\tProjectID: v.ProjectID,\n\t\tBookmark: v.Bookmark,\n\t}\n\n\treturn res\n}",
"func CreatePost(c buffalo.Context) error {\n\tauthUser := c.Value(\"authUser\").(models.User)\n\tpost := &models.Post{}\n\tif err := c.Bind(post); err != nil {\n\t\treturn errors.WithStack(err)\n\t}\n\tdb := c.Value(\"tx\").(*pop.Connection)\n\tpost.UserID = authUser.ID\n\tpost.User = &authUser\n\tvalidationErrors, err := db.Eager().ValidateAndCreate(post)\n\tif err != nil {\n\t\treturn errors.WithStack(err)\n\t}\n\n\tif validationErrors.HasAny() {\n\n\t\terrResponse := utils.NewValidationErrorResponse(\n\t\t\thttp.StatusUnprocessableEntity, validationErrors.Errors,\n\t\t)\n\t\treturn c.Render(http.StatusUnprocessableEntity, r.JSON(errResponse))\n\t}\n\n\tpostResponse := PostResponse{\n\t\tCode: fmt.Sprintf(\"%d\", http.StatusCreated),\n\t\tData: post,\n\t}\n\treturn c.Render(http.StatusCreated, r.JSON(postResponse))\n}",
"func (s *BlugService) CreatePost(ctx context.Context, post *models.Post) (err error) {\n\tdefer func(begin time.Time) {\n\t\ts.Logger.Info(\n\t\t\t\"blug\",\n\t\t\tzap.String(\"method\", \"createpost\"),\n\t\t\tzap.Int(\"id\", post.ID),\n\t\t\tzap.NamedError(\"err\", err),\n\t\t\tzap.Duration(\"took\", time.Since(begin)),\n\t\t)\n\t}(time.Now())\n\n\tunsafe := blackfriday.Run(\n\t\t[]byte(post.Markdown),\n\t\tblackfriday.WithNoExtensions(),\n\t)\n\tpost.HTML = string(bluemonday.UGCPolicy().SanitizeBytes(unsafe))\n\n\terr = s.DB.CreatePost(post)\n\n\treturn err\n}",
"func NewPostWebhook(branchesToIgnore string, committersToIgnore string, enabled bool, id int32, title string, url string) *PostWebhook {\n\tthis := PostWebhook{}\n\tthis.BranchesToIgnore = branchesToIgnore\n\tthis.CommittersToIgnore = committersToIgnore\n\tthis.Enabled = enabled\n\tthis.Id = id\n\tthis.Title = title\n\tthis.Url = url\n\treturn &this\n}",
"func (p *PhoneCallWaiting) SetVideo(value bool) {\n\tif value {\n\t\tp.Flags.Set(6)\n\t\tp.Video = true\n\t} else {\n\t\tp.Flags.Unset(6)\n\t\tp.Video = false\n\t}\n}",
"func (a *attachUp) AddVideo(p, n string) AttachmentUploader {\n\ta.v = append(a.v, p)\n\tif n == \"\" {\n\t\tn = filepath.Base(p)\n\t}\n\ta.vn = append(a.vn, n)\n\treturn a\n}",
"func Video(props *VideoProps, children ...Element) *VideoElem {\n\trProps := &_VideoProps{\n\t\tBasicHTMLElement: newBasicHTMLElement(),\n\t}\n\n\tif props != nil {\n\t\tprops.assign(rProps)\n\t}\n\n\treturn &VideoElem{\n\t\tElement: createElement(\"video\", rProps, children...),\n\t}\n}",
"func newPost(body string, timestamp int64, next *post) *post {\n\treturn &post{body, timestamp, next}\n}",
"func CreateTimeNotIn(vs ...time.Time) predicate.FlowInstance {\n\tv := make([]interface{}, len(vs))\n\tfor i := range v {\n\t\tv[i] = vs[i]\n\t}\n\treturn predicate.FlowInstance(func(s *sql.Selector) {\n\t\t// if not arguments were provided, append the FALSE constants,\n\t\t// since we can't apply \"IN ()\". This will make this predicate falsy.\n\t\tif len(v) == 0 {\n\t\t\ts.Where(sql.False())\n\t\t\treturn\n\t\t}\n\t\ts.Where(sql.NotIn(s.C(FieldCreateTime), v...))\n\t})\n}",
"func CreateMovieEndPoint(w http.ResponseWriter, r *http.Request) {\n\tdefer r.Body.Close()\n\tvar movie models.Movie\n\n\tif err := json.NewDecoder(r.Body).Decode(&movie); err != nil {\n\t\trespondWithError(w, http.StatusBadRequest, \"Invalid request payload\")\n\t\treturn\n\t}\n\n\tmovie.ID = bson.NewObjectId()\n\n\tif err := movieRepository.Insert(movie); err != nil {\n\t\trespondWithError(w, http.StatusInternalServerError, err.Error())\n\t\treturn\n\t}\n\n\trespondWithJSON(w, http.StatusCreated, movie)\n}",
"func (c *UPHostClient) NewStopPHostRequest() *StopPHostRequest {\n\treq := &StopPHostRequest{}\n\n\t// setup request with client config\n\tc.Client.SetupRequest(req)\n\n\t// setup retryable with default retry policy (retry for non-create action and common error)\n\treq.SetRetryable(true)\n\treturn req\n}",
"func (video *FakeVideo) CreateVideoWithNameAndURL(userID string, Name string, URL string) (err error) {\n\tif Name == \"\" {\n\t\terr = errors.New(\"the video name cannot be empty\")\n\n\t\treturn\n\t} else if URL == \"\" {\n\t\terr = errors.New(\"the video URL cannot be empty\")\n\n\t\treturn\n\t}\n\n\terr = nil\n\n\treturn\n}",
"func NewDeployRequestWithoutParam() *DeployRequest {\n\n return &DeployRequest{\n JDCloudRequest: core.JDCloudRequest{\n URL: \"/scenes/{sceneId}/deployments\",\n Method: \"POST\",\n Header: nil,\n Version: \"v1\",\n },\n }\n}",
"func (store MySQL) CreatePost(post *Post) error {\n\tif post == nil {\n\t\treturn ErrCreatePostIsNil\n\t}\n\n\tlog.Debug().Interface(\"post\", post).Msg(\"CreatePost\")\n\n\tif post.ID > 0 {\n\t\treturn ErrCreatePostIDPresent\n\t}\n\n\tpost.Title = strings.Trim(post.Title, \" \")\n\n\tif post.Title == \"\" {\n\t\treturn ErrCreatePostTitleMissing\n\t}\n\n\tif post.Content == \"\" {\n\t\treturn ErrCreatePostContentMissing\n\t}\n\n\tconn := db.Connx(mysqlDbID)\n\n\tresult, err := conn.Exec(`\n INSERT INTO `+postsTableName+` SET\n title = ?,\n content = ?,\n private = ?,\n created_by = ?,\n created_at = NOW(6)\n `,\n\t\tpost.Title,\n\t\tpost.Content,\n\t\tpost.Private,\n\t\tpost.CreatedByID,\n\t)\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvar id int64\n\tid, err = result.LastInsertId()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tu, err := store.GetPostByID(int(id))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif u.ID > 0 {\n\t\t*post = u\n\t}\n\n\t// Emit event for post created here\n\n\treturn err\n\n}",
"func (ff *fftag) Create(eng vu.Eng, s *vu.State) {\n\trand.Seed(time.Now().UTC().UnixNano())\n\n\t// create the overlay\n\tff.top = eng.Root().NewPov()\n\tview := ff.top.NewView()\n\tview.SetUI()\n\tff.cam = view.Cam()\n\tff.mmap = ff.top.NewPov().SetScale(10, 10, 0)\n\tff.mmap.SetLocation(30, 30, 0)\n\n\t// populate the map\n\tff.msize = 69\n\tff.plan = grid.New(grid.ROOMS_SKIRMISH)\n\tff.plan.Generate(ff.msize, ff.msize)\n\twidth, height := ff.plan.Size()\n\tfor x := 0; x < width; x++ {\n\t\tfor y := 0; y < height; y++ {\n\t\t\tif ff.plan.IsOpen(x, y) {\n\t\t\t\tblock := ff.mmap.NewPov()\n\t\t\t\tblock.SetLocation(float64(x), float64(y), 0)\n\t\t\t\tblock.NewModel(\"uv\").LoadMesh(\"icon\").AddTex(\"wall\")\n\t\t\t\tff.spots = append(ff.spots, ff.id(x, y))\n\t\t\t}\n\t\t}\n\t}\n\n\t// populate chasers and a goal.\n\tnumChasers := 30\n\tfor cnt := 0; cnt < numChasers; cnt++ {\n\t\tchaser := ff.mmap.NewPov()\n\t\tchaser.NewModel(\"uv\").LoadMesh(\"icon\").AddTex(\"token\")\n\t\tff.chasers = append(ff.chasers, chaser)\n\t}\n\tff.goal = ff.mmap.NewPov()\n\tff.goal.NewModel(\"uv\").LoadMesh(\"icon\").AddTex(\"goal\")\n\tff.flow = grid.NewFlow(ff.plan) // flow field for the given plan.\n\tff.resetLocations()\n\n\t// set non default engine state.\n\teng.SetColor(0.15, 0.15, 0.15, 1)\n\tff.resize(s.W, s.H)\n}",
"func NewRemoveTeamToPublishedTestForbidden() *RemoveTeamToPublishedTestForbidden {\n\n\treturn &RemoveTeamToPublishedTestForbidden{}\n}"
] |
[
"0.65463793",
"0.6370527",
"0.61524403",
"0.5694613",
"0.5619163",
"0.5601113",
"0.55350727",
"0.5415445",
"0.53190386",
"0.5314457",
"0.53020096",
"0.5280189",
"0.52471197",
"0.52346265",
"0.5230018",
"0.5218761",
"0.5137209",
"0.51043886",
"0.50862014",
"0.50693375",
"0.50401783",
"0.49924698",
"0.4987742",
"0.49739146",
"0.4922118",
"0.48679504",
"0.48645106",
"0.48571542",
"0.4818996",
"0.47583467",
"0.47393763",
"0.47111276",
"0.47044078",
"0.46602383",
"0.46482286",
"0.46346202",
"0.4602188",
"0.45896652",
"0.45720136",
"0.45709598",
"0.45292184",
"0.4467531",
"0.4391607",
"0.4390193",
"0.43893722",
"0.4385826",
"0.43813875",
"0.4376134",
"0.4368816",
"0.43685475",
"0.43631926",
"0.43437698",
"0.43352693",
"0.43030122",
"0.43011436",
"0.428633",
"0.42807248",
"0.42042792",
"0.42020684",
"0.42007208",
"0.41976023",
"0.4193171",
"0.4191338",
"0.4165115",
"0.41551387",
"0.41525713",
"0.41374674",
"0.41308868",
"0.4096825",
"0.40838873",
"0.40836263",
"0.4078536",
"0.40563193",
"0.40544593",
"0.40538043",
"0.40514323",
"0.40476376",
"0.40471563",
"0.40432084",
"0.4042606",
"0.40353346",
"0.4028591",
"0.40250397",
"0.40208584",
"0.40157136",
"0.4015573",
"0.40059778",
"0.4004836",
"0.39949504",
"0.3992485",
"0.39790037",
"0.39748964",
"0.39731616",
"0.39707443",
"0.39683944",
"0.39660627",
"0.3962984",
"0.3962641",
"0.3954033",
"0.39521232"
] |
0.76983976
|
0
|
CreateBulk returns a builder for creating a bulk of UnsavedPostVideo entities.
|
func (c *UnsavedPostVideoClient) CreateBulk(builders ...*UnsavedPostVideoCreate) *UnsavedPostVideoCreateBulk {
return &UnsavedPostVideoCreateBulk{config: c.config, builders: builders}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *PostVideoClient) CreateBulk(builders ...*PostVideoCreate) *PostVideoCreateBulk {\n\treturn &PostVideoCreateBulk{config: c.config, builders: builders}\n}",
"func (upvcb *UnsavedPostVideoCreateBulk) Save(ctx context.Context) ([]*UnsavedPostVideo, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(upvcb.builders))\n\tnodes := make([]*UnsavedPostVideo, len(upvcb.builders))\n\tmutators := make([]Mutator, len(upvcb.builders))\n\tfor i := range upvcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := upvcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*UnsavedPostVideoMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, upvcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, upvcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, upvcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (c *UnsavedPostClient) CreateBulk(builders ...*UnsavedPostCreate) *UnsavedPostCreateBulk {\n\treturn &UnsavedPostCreateBulk{config: c.config, builders: builders}\n}",
"func (c *UnsavedPostAttachmentClient) CreateBulk(builders ...*UnsavedPostAttachmentCreate) *UnsavedPostAttachmentCreateBulk {\n\treturn &UnsavedPostAttachmentCreateBulk{config: c.config, builders: builders}\n}",
"func (c *UnsavedPostThumbnailClient) CreateBulk(builders ...*UnsavedPostThumbnailCreate) *UnsavedPostThumbnailCreateBulk {\n\treturn &UnsavedPostThumbnailCreateBulk{config: c.config, builders: builders}\n}",
"func (c *UnsavedPostImageClient) CreateBulk(builders ...*UnsavedPostImageCreate) *UnsavedPostImageCreateBulk {\n\treturn &UnsavedPostImageCreateBulk{config: c.config, builders: builders}\n}",
"func (c *PostClient) CreateBulk(builders ...*PostCreate) *PostCreateBulk {\n\treturn &PostCreateBulk{config: c.config, builders: builders}\n}",
"func (c *PostAttachmentClient) CreateBulk(builders ...*PostAttachmentCreate) *PostAttachmentCreateBulk {\n\treturn &PostAttachmentCreateBulk{config: c.config, builders: builders}\n}",
"func (c *PlaylistClient) CreateBulk(builders ...*PlaylistCreate) *PlaylistCreateBulk {\n\treturn &PlaylistCreateBulk{config: c.config, builders: builders}\n}",
"func (c *MediaClient) CreateBulk(builders ...*MediaCreate) *MediaCreateBulk {\n\treturn &MediaCreateBulk{config: c.config, builders: builders}\n}",
"func (c *TagClient) CreateBulk(builders ...*TagCreate) *TagCreateBulk {\n\treturn &TagCreateBulk{config: c.config, builders: builders}\n}",
"func (c *BinaryFileClient) CreateBulk(builders ...*BinaryFileCreate) *BinaryFileCreateBulk {\n\treturn &BinaryFileCreateBulk{config: c.config, builders: builders}\n}",
"func (c *ReviewClient) CreateBulk(builders ...*ReviewCreate) *ReviewCreateBulk {\n\treturn &ReviewCreateBulk{config: c.config, builders: builders}\n}",
"func (c *PostThumbnailClient) CreateBulk(builders ...*PostThumbnailCreate) *PostThumbnailCreateBulk {\n\treturn &PostThumbnailCreateBulk{config: c.config, builders: builders}\n}",
"func (c *PostImageClient) CreateBulk(builders ...*PostImageCreate) *PostImageCreateBulk {\n\treturn &PostImageCreateBulk{config: c.config, builders: builders}\n}",
"func (c *VeterinarianClient) CreateBulk(builders ...*VeterinarianCreate) *VeterinarianCreateBulk {\n\treturn &VeterinarianCreateBulk{config: c.config, builders: builders}\n}",
"func (c *UserWalletClient) CreateBulk(builders ...*UserWalletCreate) *UserWalletCreateBulk {\n\treturn &UserWalletCreateBulk{config: c.config, builders: builders}\n}",
"func (c *BeerClient) CreateBulk(builders ...*BeerCreate) *BeerCreateBulk {\n\treturn &BeerCreateBulk{config: c.config, builders: builders}\n}",
"func (c *PetClient) CreateBulk(builders ...*PetCreate) *PetCreateBulk {\n\treturn &PetCreateBulk{config: c.config, builders: builders}\n}",
"func (c *WorkExperienceClient) CreateBulk(builders ...*WorkExperienceCreate) *WorkExperienceCreateBulk {\n\treturn &WorkExperienceCreateBulk{config: c.config, builders: builders}\n}",
"func (c *DNSBLQueryClient) CreateBulk(builders ...*DNSBLQueryCreate) *DNSBLQueryCreateBulk {\n\treturn &DNSBLQueryCreateBulk{config: c.config, builders: builders}\n}",
"func (c *UserCardClient) CreateBulk(builders ...*UserCardCreate) *UserCardCreateBulk {\n\treturn &UserCardCreateBulk{config: c.config, builders: builders}\n}",
"func (s *CampaignNegativeKeywordService) CreateBulk(ctx context.Context, campaignID int64, data []*NegativeKeyword) ([]*NegativeKeyword, *Response, error) {\n\tif campaignID == 0 {\n\t\treturn nil, nil, fmt.Errorf(\"campaignID can not be 0\")\n\t}\n\tu := fmt.Sprintf(\"campaigns/%d/negativekeywords/bulk\", campaignID)\n\treq, err := s.client.NewRequest(\"POST\", u, data)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tnegativekeywords := []*NegativeKeyword{}\n\tresp, err := s.client.Do(ctx, req, &negativekeywords)\n\tif err != nil {\n\t\treturn nil, resp, err\n\t}\n\treturn negativekeywords, resp, nil\n}",
"func (s *AdGroupNegativeKeywordService) CreateBulk(ctx context.Context, campaignID int64, adGroupID int64, data []*NegativeKeyword) ([]*NegativeKeyword, *Response, error) {\n\tif campaignID == 0 {\n\t\treturn nil, nil, fmt.Errorf(\"campaignID can not be 0\")\n\t}\n\tif adGroupID == 0 {\n\t\treturn nil, nil, fmt.Errorf(\"adGroupID can not be 0\")\n\t}\n\tu := fmt.Sprintf(\"campaigns/%d/adgroups/%d/negativekeywords/bulk\", campaignID, adGroupID)\n\treq, err := s.client.NewRequest(\"POST\", u, data)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tnegativekeywords := []*NegativeKeyword{}\n\tresp, err := s.client.Do(ctx, req, &negativekeywords)\n\tif err != nil {\n\t\treturn nil, resp, err\n\t}\n\n\treturn negativekeywords, resp, nil\n}",
"func (c *AdminClient) CreateBulk(builders ...*AdminCreate) *AdminCreateBulk {\n\treturn &AdminCreateBulk{config: c.config, builders: builders}\n}",
"func (c *TransactionClient) CreateBulk(builders ...*TransactionCreate) *TransactionCreateBulk {\n\treturn &TransactionCreateBulk{config: c.config, builders: builders}\n}",
"func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk {\n\treturn &UserCreateBulk{config: c.config, builders: builders}\n}",
"func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk {\n\treturn &UserCreateBulk{config: c.config, builders: builders}\n}",
"func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk {\n\treturn &UserCreateBulk{config: c.config, builders: builders}\n}",
"func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk {\n\treturn &UserCreateBulk{config: c.config, builders: builders}\n}",
"func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk {\n\treturn &UserCreateBulk{config: c.config, builders: builders}\n}",
"func (c *EmptyClient) CreateBulk(builders ...*EmptyCreate) *EmptyCreateBulk {\n\treturn &EmptyCreateBulk{config: c.config, builders: builders}\n}",
"func (c *AppointmentClient) CreateBulk(builders ...*AppointmentCreate) *AppointmentCreateBulk {\n\treturn &AppointmentCreateBulk{config: c.config, builders: builders}\n}",
"func (c *WalletNodeClient) CreateBulk(builders ...*WalletNodeCreate) *WalletNodeCreateBulk {\n\treturn &WalletNodeCreateBulk{config: c.config, builders: builders}\n}",
"func (m *MessagesController) CreateBulk(ctx *gin.Context) {\n\tmessagesIn := &tat.MessagesJSONIn{}\n\tctx.Bind(messagesIn)\n\tvar msgs []*tat.MessageJSONOut\n\tfor _, messageIn := range messagesIn.Messages {\n\t\tm, code, err := m.createSingle(ctx, messageIn)\n\t\tif err != nil {\n\t\t\tctx.JSON(code, gin.H{\"error\": err.Error()})\n\t\t\treturn\n\t\t}\n\t\tmsgs = append(msgs, m)\n\t}\n\tctx.JSON(http.StatusCreated, msgs)\n}",
"func (c *AdminSessionClient) CreateBulk(builders ...*AdminSessionCreate) *AdminSessionCreateBulk {\n\treturn &AdminSessionCreateBulk{config: c.config, builders: builders}\n}",
"func (c *DNSBLResponseClient) CreateBulk(builders ...*DNSBLResponseCreate) *DNSBLResponseCreateBulk {\n\treturn &DNSBLResponseCreateBulk{config: c.config, builders: builders}\n}",
"func (c *SkillClient) CreateBulk(builders ...*SkillCreate) *SkillCreateBulk {\n\treturn &SkillCreateBulk{config: c.config, builders: builders}\n}",
"func (c *CardClient) CreateBulk(builders ...*CardCreate) *CardCreateBulk {\n\treturn &CardCreateBulk{config: c.config, builders: builders}\n}",
"func (c *EventClient) CreateBulk(builders ...*EventCreate) *EventCreateBulk {\n\treturn &EventCreateBulk{config: c.config, builders: builders}\n}",
"func (bcb *BulkCreateBulk) Save(ctx context.Context) ([]*Bulk, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(bcb.builders))\n\tnodes := make([]*Bulk, len(bcb.builders))\n\tmutators := make([]Mutator, len(bcb.builders))\n\tfor i := range bcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := bcb.builders[i]\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*BulkMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, bcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, bcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tif nodes[i].ID == 0 {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\t}\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, bcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (m *Manager) BulkCreate(obj interface{}) error {\n\treturn m.Query(m.Insert().Values(obj).Returning(), obj)\n}",
"func (c *IPClient) CreateBulk(builders ...*IPCreate) *IPCreateBulk {\n\treturn &IPCreateBulk{config: c.config, builders: builders}\n}",
"func NewBulk(data []byte) *EncodeData {\n\tans := &EncodeData{}\n\tans.Type = TypeBulk\n\tans.Value = data\n\treturn ans\n}",
"func (ftcb *FileTypeCreateBulk) Save(ctx context.Context) ([]*FileType, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(ftcb.builders))\n\tnodes := make([]*FileType, len(ftcb.builders))\n\tmutators := make([]Mutator, len(ftcb.builders))\n\tfor i := range ftcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := ftcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*FileTypeMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, ftcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\tspec := &sqlgraph.BatchCreateSpec{Nodes: specs}\n\t\t\t\t\tspec.OnConflict = ftcb.conflict\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, ftcb.driver, spec); err != nil {\n\t\t\t\t\t\tif sqlgraph.IsConstraintError(err) {\n\t\t\t\t\t\t\terr = &ConstraintError{msg: err.Error(), wrap: err}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation.id = &nodes[i].ID\n\t\t\t\tif specs[i].ID.Value != nil {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, ftcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (c *CategoryClient) CreateBulk(builders ...*CategoryCreate) *CategoryCreateBulk {\n\treturn &CategoryCreateBulk{config: c.config, builders: builders}\n}",
"func (c *CardScanClient) CreateBulk(builders ...*CardScanCreate) *CardScanCreateBulk {\n\treturn &CardScanCreateBulk{config: c.config, builders: builders}\n}",
"func (c *OperationClient) CreateBulk(builders ...*OperationCreate) *OperationCreateBulk {\n\treturn &OperationCreateBulk{config: c.config, builders: builders}\n}",
"func (icb *InstanceCreateBulk) Save(ctx context.Context) ([]*Instance, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(icb.builders))\n\tnodes := make([]*Instance, len(icb.builders))\n\tmutators := make([]Mutator, len(icb.builders))\n\tfor i := range icb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := icb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*InstanceMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, icb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\tspec := &sqlgraph.BatchCreateSpec{Nodes: specs}\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, icb.driver, spec); err != nil {\n\t\t\t\t\t\tif sqlgraph.IsConstraintError(err) {\n\t\t\t\t\t\t\terr = &ConstraintError{err.Error(), err}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation.id = &nodes[i].ID\n\t\t\t\tmutation.done = true\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, icb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (a *DefaultApiService) BulkCreate(ctx _context.Context) ApiBulkCreateRequest {\n\treturn ApiBulkCreateRequest{\n\t\tApiService: a,\n\t\tctx: ctx,\n\t}\n}",
"func (r *AssetRepository) CreateBulk(assets []assetEntity.Asset) (int, error) {\n\terr := r.restore()\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\tn, err := r.repository.CreateBulk(assets)\n\tif err != nil {\n\t\treturn n, fmt.Errorf(\"assets bulk create failed: %w\", err)\n\t}\n\terr = r.dump()\n\treturn n, err\n}",
"func (ccb *CampaignCreateBulk) Save(ctx context.Context) ([]*Campaign, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(ccb.builders))\n\tnodes := make([]*Campaign, len(ccb.builders))\n\tmutators := make([]Mutator, len(ccb.builders))\n\tfor i := range ccb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := ccb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*CampaignMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, ccb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, ccb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, ccb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (a *BulkApiService) CreateBulkExport(ctx context.Context) ApiCreateBulkExportRequest {\n\treturn ApiCreateBulkExportRequest{\n\t\tApiService: a,\n\t\tctx: ctx,\n\t}\n}",
"func (vcb *VehicleCreateBulk) Save(ctx context.Context) ([]*Vehicle, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(vcb.builders))\n\tnodes := make([]*Vehicle, len(vcb.builders))\n\tmutators := make([]Mutator, len(vcb.builders))\n\tfor i := range vcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := vcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*VehicleMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, vcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\tspec := &sqlgraph.BatchCreateSpec{Nodes: specs}\n\t\t\t\t\tspec.OnConflict = vcb.conflict\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, vcb.driver, spec); err != nil {\n\t\t\t\t\t\tif sqlgraph.IsConstraintError(err) {\n\t\t\t\t\t\t\terr = &ConstraintError{err.Error(), err}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation.id = &nodes[i].ID\n\t\t\t\tmutation.done = true\n\t\t\t\tif specs[i].ID.Value != nil {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\t}\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, vcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (c *JobClient) CreateBulk(builders ...*JobCreate) *JobCreateBulk {\n\treturn &JobCreateBulk{config: c.config, builders: builders}\n}",
"func (c *CompanyClient) CreateBulk(builders ...*CompanyCreate) *CompanyCreateBulk {\n\treturn &CompanyCreateBulk{config: c.config, builders: builders}\n}",
"func (a *BulkApiService) CreateBulkMoDeepCloner(ctx context.Context) ApiCreateBulkMoDeepClonerRequest {\n\treturn ApiCreateBulkMoDeepClonerRequest{\n\t\tApiService: a,\n\t\tctx: ctx,\n\t}\n}",
"func (c *UnsavedPostVideoClient) Create() *UnsavedPostVideoCreate {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpCreate)\n\treturn &UnsavedPostVideoCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func decodeBulkCreateJobPostRequest(_ context.Context, request interface{}) (interface{}, error) {\n\treq := request.(*pb.BulkCreateJobPostRequest)\n\tvar jobPosts []*models.JobPost\n\tfor _, jobPost := range req.JobPosts {\n\t\tjobPosts = append(jobPosts, models.JobPostToORM(jobPost))\n\t}\n\treturn endpoints.BulkCreateJobPostRequest{JobPosts: jobPosts}, nil\n}",
"func (fcb *FeedCreateBulk) Save(ctx context.Context) ([]*Feed, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(fcb.builders))\n\tnodes := make([]*Feed, len(fcb.builders))\n\tmutators := make([]Mutator, len(fcb.builders))\n\tfor i := range fcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := fcb.builders[i]\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tif err := builder.preSave(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation, ok := m.(*FeedMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, fcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, fcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tif nodes[i].ID == 0 {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int64(id)\n\t\t\t\t}\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, fcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (gcb *GameCreateBulk) Save(ctx context.Context) ([]*Game, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(gcb.builders))\n\tnodes := make([]*Game, len(gcb.builders))\n\tmutators := make([]Mutator, len(gcb.builders))\n\tfor i := range gcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := gcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*GameMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, gcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, gcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tif nodes[i].ID == 0 {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\t}\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, gcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (etcb *ExportTaskCreateBulk) Save(ctx context.Context) ([]*ExportTask, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(etcb.builders))\n\tnodes := make([]*ExportTask, len(etcb.builders))\n\tmutators := make([]Mutator, len(etcb.builders))\n\tfor i := range etcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := etcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*ExportTaskMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, etcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, etcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, etcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (hcb *HarborCreateBulk) Save(ctx context.Context) ([]*Harbor, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(hcb.builders))\n\tnodes := make([]*Harbor, len(hcb.builders))\n\tmutators := make([]Mutator, len(hcb.builders))\n\tfor i := range hcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := hcb.builders[i]\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*HarborMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, hcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, hcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, hcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (pcb *PetCreateBulk) Save(ctx context.Context) ([]*Pet, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(pcb.builders))\n\tnodes := make([]*Pet, len(pcb.builders))\n\tmutators := make([]Mutator, len(pcb.builders))\n\tfor i := range pcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := pcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*PetMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, pcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\tspec := &sqlgraph.BatchCreateSpec{Nodes: specs}\n\t\t\t\t\tspec.OnConflict = pcb.conflict\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, pcb.driver, spec); err != nil {\n\t\t\t\t\t\tif sqlgraph.IsConstraintError(err) {\n\t\t\t\t\t\t\terr = &ConstraintError{msg: err.Error(), wrap: err}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation.id = &nodes[i].ID\n\t\t\t\tif specs[i].ID.Value != nil {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, pcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (a *BulkApiService) CreateBulkMoCloner(ctx context.Context) ApiCreateBulkMoClonerRequest {\n\treturn ApiCreateBulkMoClonerRequest{\n\t\tApiService: a,\n\t\tctx: ctx,\n\t}\n}",
"func (bbcb *BasicBannerCreateBulk) Save(ctx context.Context) ([]*BasicBanner, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(bbcb.builders))\n\tnodes := make([]*BasicBanner, len(bbcb.builders))\n\tmutators := make([]Mutator, len(bbcb.builders))\n\tfor i := range bbcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := bbcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*BasicBannerMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, bbcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, bbcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, bbcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (bcb *BeerCreateBulk) Save(ctx context.Context) ([]*Beer, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(bcb.builders))\n\tnodes := make([]*Beer, len(bcb.builders))\n\tmutators := make([]Mutator, len(bcb.builders))\n\tfor i := range bcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := bcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*BeerMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, bcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, bcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tif nodes[i].ID == 0 {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int64(id)\n\t\t\t\t}\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, bcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (wcb *WalletCreateBulk) Save(ctx context.Context) ([]*Wallet, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(wcb.builders))\n\tnodes := make([]*Wallet, len(wcb.builders))\n\tmutators := make([]Mutator, len(wcb.builders))\n\tfor i := range wcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := wcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*WalletMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, wcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\tspec := &sqlgraph.BatchCreateSpec{Nodes: specs}\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, wcb.driver, spec); err != nil {\n\t\t\t\t\t\tif sqlgraph.IsConstraintError(err) {\n\t\t\t\t\t\t\terr = &ConstraintError{msg: err.Error(), wrap: err}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation.id = &nodes[i].ID\n\t\t\t\tmutation.done = true\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, wcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func NewMultiBulk(array []*EncodeData) *EncodeData {\n\tans := &EncodeData{}\n\tans.Type = TypeMultiBulk\n\tans.Array = array\n\treturn ans\n}",
"func (upvcb *UnsavedPostVideoCreateBulk) SaveX(ctx context.Context) []*UnsavedPostVideo {\n\tv, err := upvcb.Save(ctx)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn v\n}",
"func (recb *RawEventCreateBulk) Save(ctx context.Context) ([]*RawEvent, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(recb.builders))\n\tnodes := make([]*RawEvent, len(recb.builders))\n\tmutators := make([]Mutator, len(recb.builders))\n\tfor i := range recb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := recb.builders[i]\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tif err := builder.preSave(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation, ok := m.(*RawEventMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, recb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, recb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, recb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (wcb *WordCreateBulk) Save(ctx context.Context) ([]*Word, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(wcb.builders))\n\tnodes := make([]*Word, len(wcb.builders))\n\tmutators := make([]Mutator, len(wcb.builders))\n\tfor i := range wcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := wcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*WordMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, wcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, wcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, wcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (c *CoinInfoClient) CreateBulk(builders ...*CoinInfoCreate) *CoinInfoCreateBulk {\n\treturn &CoinInfoCreateBulk{config: c.config, builders: builders}\n}",
"func (bcb *BlockCreateBulk) Save(ctx context.Context) ([]*Block, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(bcb.builders))\n\tnodes := make([]*Block, len(bcb.builders))\n\tmutators := make([]Mutator, len(bcb.builders))\n\tfor i := range bcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := bcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*BlockMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, bcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, bcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, bcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (a *BulkApiService) CreateBulkMoMerger(ctx context.Context) ApiCreateBulkMoMergerRequest {\n\treturn ApiCreateBulkMoMergerRequest{\n\t\tApiService: a,\n\t\tctx: ctx,\n\t}\n}",
"func (pcb *PageCreateBulk) Save(ctx context.Context) ([]*Page, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(pcb.builders))\n\tnodes := make([]*Page, len(pcb.builders))\n\tmutators := make([]Mutator, len(pcb.builders))\n\tfor i := range pcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := pcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*PageMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tvar err error\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, pcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\tspec := &sqlgraph.BatchCreateSpec{Nodes: specs}\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, pcb.driver, spec); err != nil {\n\t\t\t\t\t\tif sqlgraph.IsConstraintError(err) {\n\t\t\t\t\t\t\terr = &ConstraintError{msg: err.Error(), wrap: err}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation.id = &nodes[i].ID\n\t\t\t\tif specs[i].ID.Value != nil {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, pcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (c *KeyStoreClient) CreateBulk(builders ...*KeyStoreCreate) *KeyStoreCreateBulk {\n\treturn &KeyStoreCreateBulk{config: c.config, builders: builders}\n}",
"func BuildBulkPayload(collectionBulkBody string) (*collection.BulkPayload, error) {\n\tvar err error\n\tvar body BulkRequestBody\n\t{\n\t\terr = json.Unmarshal([]byte(collectionBulkBody), &body)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"invalid JSON for body, \\nerror: %s, \\nexample of valid JSON:\\n%s\", err, \"'{\\n \\\"operation\\\": \\\"cancel\\\",\\n \\\"size\\\": 1,\\n \\\"status\\\": \\\"in progress\\\"\\n }'\")\n\t\t}\n\t\tif !(body.Operation == \"retry\" || body.Operation == \"cancel\" || body.Operation == \"abandon\") {\n\t\t\terr = goa.MergeErrors(err, goa.InvalidEnumValueError(\"body.operation\", body.Operation, []any{\"retry\", \"cancel\", \"abandon\"}))\n\t\t}\n\t\tif !(body.Status == \"new\" || body.Status == \"in progress\" || body.Status == \"done\" || body.Status == \"error\" || body.Status == \"unknown\" || body.Status == \"queued\" || body.Status == \"pending\" || body.Status == \"abandoned\") {\n\t\t\terr = goa.MergeErrors(err, goa.InvalidEnumValueError(\"body.status\", body.Status, []any{\"new\", \"in progress\", \"done\", \"error\", \"unknown\", \"queued\", \"pending\", \"abandoned\"}))\n\t\t}\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tv := &collection.BulkPayload{\n\t\tOperation: body.Operation,\n\t\tStatus: body.Status,\n\t\tSize: body.Size,\n\t}\n\t{\n\t\tvar zero uint\n\t\tif v.Size == zero {\n\t\t\tv.Size = 100\n\t\t}\n\t}\n\n\treturn v, nil\n}",
"func (c *ClinicClient) CreateBulk(builders ...*ClinicCreate) *ClinicCreateBulk {\n\treturn &ClinicCreateBulk{config: c.config, builders: builders}\n}",
"func (c *CustomerClient) CreateBulk(builders ...*CustomerCreate) *CustomerCreateBulk {\n\treturn &CustomerCreateBulk{config: c.config, builders: builders}\n}",
"func (r *pgRepository) CreateMany(ctx context.Context, tenant string, items []*model.APIDefinition) error {\n\tfor index, item := range items {\n\t\tentity := r.conv.ToEntity(item)\n\n\t\terr := r.creator.Create(ctx, resource.API, tenant, entity)\n\t\tif err != nil {\n\t\t\treturn errors.Wrapf(err, \"while persisting %d item\", index)\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (facb *FlowAchievementCreateBulk) Save(ctx context.Context) ([]*FlowAchievement, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(facb.builders))\n\tnodes := make([]*FlowAchievement, len(facb.builders))\n\tmutators := make([]Mutator, len(facb.builders))\n\tfor i := range facb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := facb.builders[i]\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*FlowAchievementMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, facb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\tspec := &sqlgraph.BatchCreateSpec{Nodes: specs}\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, facb.driver, spec); err != nil {\n\t\t\t\t\t\tif sqlgraph.IsConstraintError(err) {\n\t\t\t\t\t\t\terr = &ConstraintError{err.Error(), err}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation.id = &nodes[i].ID\n\t\t\t\tmutation.done = true\n\t\t\t\tif specs[i].ID.Value != nil {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\t}\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, facb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (ecb *EquipmentCreateBulk) Save(ctx context.Context) ([]*Equipment, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(ecb.builders))\n\tnodes := make([]*Equipment, len(ecb.builders))\n\tmutators := make([]Mutator, len(ecb.builders))\n\tfor i := range ecb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := ecb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*EquipmentMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, ecb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\tspec := &sqlgraph.BatchCreateSpec{Nodes: specs}\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, ecb.driver, spec); err != nil {\n\t\t\t\t\t\tif sqlgraph.IsConstraintError(err) {\n\t\t\t\t\t\t\terr = &ConstraintError{err.Error(), err}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation.id = &nodes[i].ID\n\t\t\t\tmutation.done = true\n\t\t\t\tif specs[i].ID.Value != nil {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\t}\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, ecb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (fcb *FileCreateBulk) Save(ctx context.Context) ([]*File, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(fcb.builders))\n\tnodes := make([]*File, len(fcb.builders))\n\tmutators := make([]Mutator, len(fcb.builders))\n\tfor i := range fcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := fcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*FileMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, fcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, fcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, fcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (acb *ActivityCreateBulk) Save(ctx context.Context) ([]*Activity, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(acb.builders))\n\tnodes := make([]*Activity, len(acb.builders))\n\tmutators := make([]Mutator, len(acb.builders))\n\tfor i := range acb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := acb.builders[i]\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*ActivityMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, acb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, acb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, acb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func CreateBatchUnbindProjectProductsRequest() (request *BatchUnbindProjectProductsRequest) {\n\trequest = &BatchUnbindProjectProductsRequest{\n\t\tRpcRequest: &requests.RpcRequest{},\n\t}\n\trequest.InitWithApiInfo(\"Iot\", \"2018-01-20\", \"BatchUnbindProjectProducts\", \"\", \"\")\n\trequest.Method = requests.POST\n\treturn\n}",
"func (bcb *BouncerCreateBulk) Save(ctx context.Context) ([]*Bouncer, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(bcb.builders))\n\tnodes := make([]*Bouncer, len(bcb.builders))\n\tmutators := make([]Mutator, len(bcb.builders))\n\tfor i := range bcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := bcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*BouncerMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, bcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\tspec := &sqlgraph.BatchCreateSpec{Nodes: specs}\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, bcb.driver, spec); err != nil {\n\t\t\t\t\t\tif sqlgraph.IsConstraintError(err) {\n\t\t\t\t\t\t\terr = &ConstraintError{msg: err.Error(), wrap: err}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation.id = &nodes[i].ID\n\t\t\t\tif specs[i].ID.Value != nil {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, bcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(ucb.builders))\n\tnodes := make([]*User, len(ucb.builders))\n\tmutators := make([]Mutator, len(ucb.builders))\n\tfor i := range ucb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := ucb.builders[i]\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tif err := builder.preSave(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation, ok := m.(*UserMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, ucb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, ucb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, ucb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (icb *ItemCreateBulk) Save(ctx context.Context) ([]*Item, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(icb.builders))\n\tnodes := make([]*Item, len(icb.builders))\n\tmutators := make([]Mutator, len(icb.builders))\n\tfor i := range icb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := icb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*ItemMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, icb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\tspec := &sqlgraph.BatchCreateSpec{Nodes: specs}\n\t\t\t\t\tspec.OnConflict = icb.conflict\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, icb.driver, spec); err != nil {\n\t\t\t\t\t\tif sqlgraph.IsConstraintError(err) {\n\t\t\t\t\t\t\terr = &ConstraintError{msg: err.Error(), wrap: err}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation.id = &nodes[i].ID\n\t\t\t\tmutation.done = true\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, icb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(ucb.builders))\n\tnodes := make([]*User, len(ucb.builders))\n\tmutators := make([]Mutator, len(ucb.builders))\n\tfor i := range ucb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := ucb.builders[i]\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tif err := builder.preSave(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation, ok := m.(*UserMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, ucb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, ucb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, ucb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(ucb.builders))\n\tnodes := make([]*User, len(ucb.builders))\n\tmutators := make([]Mutator, len(ucb.builders))\n\tfor i := range ucb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := ucb.builders[i]\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*UserMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, ucb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, ucb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, ucb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (rcb *RestaurantCreateBulk) Save(ctx context.Context) ([]*Restaurant, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(rcb.builders))\n\tnodes := make([]*Restaurant, len(rcb.builders))\n\tmutators := make([]Mutator, len(rcb.builders))\n\tfor i := range rcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := rcb.builders[i]\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*RestaurantMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, rcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, rcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif sqlgraph.IsConstraintError(err) {\n\t\t\t\t\t\t\terr = &ConstraintError{err.Error(), err}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation.id = &nodes[i].ID\n\t\t\t\tmutation.done = true\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, rcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (arcb *AppointmentResultsCreateBulk) Save(ctx context.Context) ([]*AppointmentResults, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(arcb.builders))\n\tnodes := make([]*AppointmentResults, len(arcb.builders))\n\tmutators := make([]Mutator, len(arcb.builders))\n\tfor i := range arcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := arcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*AppointmentResultsMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, arcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, arcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, arcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (dscb *DataSourceCreateBulk) Save(ctx context.Context) ([]*DataSource, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(dscb.builders))\n\tnodes := make([]*DataSource, len(dscb.builders))\n\tmutators := make([]Mutator, len(dscb.builders))\n\tfor i := range dscb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := dscb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*DataSourceMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, dscb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\tspec := &sqlgraph.BatchCreateSpec{Nodes: specs}\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, dscb.driver, spec); err != nil {\n\t\t\t\t\t\tif sqlgraph.IsConstraintError(err) {\n\t\t\t\t\t\t\terr = &ConstraintError{msg: err.Error(), wrap: err}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation.id = &nodes[i].ID\n\t\t\t\tif specs[i].ID.Value != nil {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, dscb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (bcb *BadgeCreateBulk) Save(ctx context.Context) ([]*Badge, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(bcb.builders))\n\tnodes := make([]*Badge, len(bcb.builders))\n\tmutators := make([]Mutator, len(bcb.builders))\n\tfor i := range bcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := bcb.builders[i]\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*BadgeMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, bcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\tspec := &sqlgraph.BatchCreateSpec{Nodes: specs}\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, bcb.driver, spec); err != nil {\n\t\t\t\t\t\tif sqlgraph.IsConstraintError(err) {\n\t\t\t\t\t\t\terr = &ConstraintError{err.Error(), err}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation.id = &nodes[i].ID\n\t\t\t\tmutation.done = true\n\t\t\t\tif specs[i].ID.Value != nil {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\t}\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, bcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (dcb *DatasourceCreateBulk) Save(ctx context.Context) ([]*Datasource, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(dcb.builders))\n\tnodes := make([]*Datasource, len(dcb.builders))\n\tmutators := make([]Mutator, len(dcb.builders))\n\tfor i := range dcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := dcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*DatasourceMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, dcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, dcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tif nodes[i].ID == 0 {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int64(id)\n\t\t\t\t}\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, dcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (gscb *GameServerCreateBulk) Save(ctx context.Context) ([]*GameServer, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(gscb.builders))\n\tnodes := make([]*GameServer, len(gscb.builders))\n\tmutators := make([]Mutator, len(gscb.builders))\n\tfor i := range gscb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := gscb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*GameServerMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, gscb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\tspec := &sqlgraph.BatchCreateSpec{Nodes: specs}\n\t\t\t\t\tspec.OnConflict = gscb.conflict\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, gscb.driver, spec); err != nil {\n\t\t\t\t\t\tif sqlgraph.IsConstraintError(err) {\n\t\t\t\t\t\t\terr = &ConstraintError{err.Error(), err}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tmutation.id = &nodes[i].ID\n\t\t\t\tmutation.done = true\n\t\t\t\tif specs[i].ID.Value != nil {\n\t\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\t}\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, gscb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (rcb *ResourceCreateBulk) Save(ctx context.Context) ([]*Resource, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(rcb.builders))\n\tnodes := make([]*Resource, len(rcb.builders))\n\tmutators := make([]Mutator, len(rcb.builders))\n\tfor i := range rcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := rcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*ResourceMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, rcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, rcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, rcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (client *Client) CreateBulkTransaction(txn []*CreateTransaction) (_ *Response, err error) {\n\tpath := \"/transaction_bulk\"\n\turi := fmt.Sprintf(\"%s%s\", client.apiBaseURL, path)\n\n\tif len(txn) > MaxBulkPutSize {\n\t\treturn nil, ErrMaxBulkSizeExceeded\n\t}\n\n\ttxnBytes, err := json.Marshal(txn)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treq, err := http.NewRequest(http.MethodPost, uri, bytes.NewBuffer(txnBytes))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tresp, err := client.performRequest(req, string(txnBytes))\n\treturn resp, err\n}",
"func (a *APIGen) BulkCreateIndexPattern(ctx context.Context, indexPatterns []IndexPattern) error {\n\tpanic(\"Should Not Be Called from Gen Pattern.\")\n}"
] |
[
"0.72498184",
"0.6689483",
"0.65358484",
"0.63331497",
"0.60760343",
"0.60595953",
"0.5867174",
"0.578191",
"0.5672591",
"0.5671879",
"0.55733824",
"0.55066586",
"0.55038714",
"0.54905343",
"0.5488017",
"0.54762673",
"0.54056907",
"0.53816074",
"0.5285025",
"0.52577865",
"0.52454525",
"0.521633",
"0.52098286",
"0.5174215",
"0.5151997",
"0.51238394",
"0.51164323",
"0.51164323",
"0.51164323",
"0.51164323",
"0.51164323",
"0.5111913",
"0.5091277",
"0.5090349",
"0.50866216",
"0.50778985",
"0.50521404",
"0.5050234",
"0.50459087",
"0.50181407",
"0.49966505",
"0.49839544",
"0.49831325",
"0.4977422",
"0.496968",
"0.4956631",
"0.4954954",
"0.4934482",
"0.49031022",
"0.48904952",
"0.487273",
"0.48450673",
"0.4800994",
"0.47903305",
"0.47896782",
"0.4785546",
"0.47707778",
"0.47528228",
"0.47331557",
"0.47190192",
"0.47112516",
"0.47035718",
"0.4678235",
"0.46771786",
"0.4669024",
"0.4665474",
"0.4657243",
"0.46084777",
"0.4602376",
"0.45967385",
"0.45879325",
"0.45476708",
"0.45423126",
"0.45391712",
"0.45305777",
"0.45137244",
"0.45113358",
"0.4501971",
"0.44797066",
"0.44761875",
"0.4464266",
"0.44558194",
"0.44285697",
"0.44253394",
"0.44174907",
"0.4416899",
"0.44122878",
"0.44084874",
"0.437921",
"0.43752933",
"0.43724266",
"0.43369737",
"0.43305358",
"0.43238902",
"0.43027514",
"0.42732877",
"0.4268399",
"0.42678896",
"0.42611957",
"0.42424333"
] |
0.7758062
|
0
|
Update returns an update builder for UnsavedPostVideo.
|
func (c *UnsavedPostVideoClient) Update() *UnsavedPostVideoUpdate {
mutation := newUnsavedPostVideoMutation(c.config, OpUpdate)
return &UnsavedPostVideoUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *PostVideoClient) Update() *PostVideoUpdate {\n\tmutation := newPostVideoMutation(c.config, OpUpdate)\n\treturn &PostVideoUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upvc *UnsavedPostVideoCreate) Save(ctx context.Context) (*UnsavedPostVideo, error) {\n\tvar (\n\t\terr error\n\t\tnode *UnsavedPostVideo\n\t)\n\tupvc.defaults()\n\tif len(upvc.hooks) == 0 {\n\t\tif err = upvc.check(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tnode, err = upvc.sqlSave(ctx)\n\t} else {\n\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\tmutation, ok := m.(*UnsavedPostVideoMutation)\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t}\n\t\t\tif err = upvc.check(); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tupvc.mutation = mutation\n\t\t\tnode, err = upvc.sqlSave(ctx)\n\t\t\tmutation.done = true\n\t\t\treturn node, err\n\t\t})\n\t\tfor i := len(upvc.hooks) - 1; i >= 0; i-- {\n\t\t\tmut = upvc.hooks[i](mut)\n\t\t}\n\t\tif _, err := mut.Mutate(ctx, upvc.mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn node, err\n}",
"func (c *UnsavedPostVideoClient) Get(ctx context.Context, id int) (*UnsavedPostVideo, error) {\n\treturn c.Query().Where(unsavedpostvideo.ID(id)).Only(ctx)\n}",
"func (upu *UnsavedPostUpdate) ClearVideos() *UnsavedPostUpdate {\n\tupu.mutation.ClearVideos()\n\treturn upu\n}",
"func (upq *UnsavedPostQuery) WithVideos(opts ...func(*UnsavedPostVideoQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostVideoQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withVideos = query\n\treturn upq\n}",
"func (c *UnsavedPostVideoClient) UpdateOne(upv *UnsavedPostVideo) *UnsavedPostVideoUpdateOne {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpUpdateOne, withUnsavedPostVideo(upv))\n\treturn &UnsavedPostVideoUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upuo *UnsavedPostUpdateOne) ClearVideos() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearVideos()\n\treturn upuo\n}",
"func (upvcb *UnsavedPostVideoCreateBulk) Save(ctx context.Context) ([]*UnsavedPostVideo, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(upvcb.builders))\n\tnodes := make([]*UnsavedPostVideo, len(upvcb.builders))\n\tmutators := make([]Mutator, len(upvcb.builders))\n\tfor i := range upvcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := upvcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*UnsavedPostVideoMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, upvcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, upvcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, upvcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func (c *UnsavedPostClient) Update() *UnsavedPostUpdate {\n\tmutation := newUnsavedPostMutation(c.config, OpUpdate)\n\treturn &UnsavedPostUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostAttachmentClient) Update() *UnsavedPostAttachmentUpdate {\n\tmutation := newUnsavedPostAttachmentMutation(c.config, OpUpdate)\n\treturn &UnsavedPostAttachmentUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func NewUnsavedPostVideoClient(c config) *UnsavedPostVideoClient {\n\treturn &UnsavedPostVideoClient{config: c}\n}",
"func (c *UnsavedPostVideoClient) Create() *UnsavedPostVideoCreate {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpCreate)\n\treturn &UnsavedPostVideoCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostVideoClient) Delete() *UnsavedPostVideoDelete {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpDelete)\n\treturn &UnsavedPostVideoDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostVideoClient) Query() *UnsavedPostVideoQuery {\n\treturn &UnsavedPostVideoQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *UnsavedPostVideoClient) QueryUnsavedPost(upv *UnsavedPostVideo) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upv.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostvideo.Table, unsavedpostvideo.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostvideo.UnsavedPostTable, unsavedpostvideo.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upv.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (video *FakeVideo) UpdateVideo(userID string) (err error) {\n\tif video.Name == \"\" {\n\t\terr = errors.New(\"the video name cannot be empty\")\n\n\t\treturn\n\t}\n\n\terr = nil\n\n\treturn\n}",
"func (c *UnsavedPostThumbnailClient) Update() *UnsavedPostThumbnailUpdate {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpUpdate)\n\treturn &UnsavedPostThumbnailUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (uu *UserUpdate) ClearVideos() *UserUpdate {\n\tuu.mutation.ClearVideos()\n\treturn uu\n}",
"func (upvc *UnsavedPostVideoCreate) Mutation() *UnsavedPostVideoMutation {\n\treturn upvc.mutation\n}",
"func NewUpdateWidgetParams() *UpdateWidgetParams {\n\tvar (\n\t\tacceptDefault = string(\"application/json\")\n\t\tcontentTypeDefault = string(\"application/json\")\n\t)\n\treturn &UpdateWidgetParams{\n\t\tAccept: &acceptDefault,\n\t\tContentType: &contentTypeDefault,\n\n\t\ttimeout: cr.DefaultTimeout,\n\t}\n}",
"func (o *DMessageEmbed) Update(exec boil.Executor, whitelist ...string) error {\n\tvar err error\n\tkey := makeCacheKey(whitelist, nil)\n\tdMessageEmbedUpdateCacheMut.RLock()\n\tcache, cached := dMessageEmbedUpdateCache[key]\n\tdMessageEmbedUpdateCacheMut.RUnlock()\n\n\tif !cached {\n\t\twl := strmangle.UpdateColumnSet(dMessageEmbedColumns, dMessageEmbedPrimaryKeyColumns, whitelist)\n\t\tif len(wl) == 0 {\n\t\t\treturn errors.New(\"models: unable to update d_message_embeds, could not build whitelist\")\n\t\t}\n\n\t\tcache.query = fmt.Sprintf(\"UPDATE \\\"d_message_embeds\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, wl),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", len(wl)+1, dMessageEmbedPrimaryKeyColumns),\n\t\t)\n\t\tcache.valueMapping, err = queries.BindMapping(dMessageEmbedType, dMessageEmbedMapping, append(wl, dMessageEmbedPrimaryKeyColumns...))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tvalues := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), cache.valueMapping)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, cache.query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err = exec.Exec(cache.query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"models: unable to update d_message_embeds row\")\n\t}\n\n\tif !cached {\n\t\tdMessageEmbedUpdateCacheMut.Lock()\n\t\tdMessageEmbedUpdateCache[key] = cache\n\t\tdMessageEmbedUpdateCacheMut.Unlock()\n\t}\n\n\treturn nil\n}",
"func (u *App) Update(c echo.Context, r *Update) (result *model.Post, err error) {\n\tif err = u.rbac.EnforceRole(c, model.AdminRole); err != nil {\n\t\tzaplog.ZLog(err)\n\t\treturn\n\t}\n\n\tif len(r.Excerpt) > 255 {\n\t\tr.Excerpt = r.Excerpt[:250] + \"...\"\n\t}\n\n\told, err := u.udb.View(u.db, r.ID)\n\tif err = zaplog.ZLog(err); err != nil {\n\t\treturn\n\t}\n\n\tif r.Status != \"\" && old.Status != r.Status && !old.AllowedStatuses(r.Status) {\n\t\terr = zaplog.ZLog(fmt.Errorf(\"Não é possível passar de %s para %s\", old.Status, r.Status))\n\t\treturn\n\t}\n\n\tupdate := model.Post{\n\t\tBase: model.Base{ID: r.ID},\n\t\tAuthor: r.Author,\n\t\tCategory: r.Category,\n\t\tTags: r.Tags,\n\t\tTitle: r.Title,\n\t\tSlug: r.Slug,\n\t\tContent: r.Content,\n\t\tExcerpt: r.Excerpt,\n\t\tStatus: r.Status,\n\t}\n\n\tvar operator model.User\n\tif err = u.db.Model(&model.User{}).Where(\"uuid = ?\", r.Author).First(&operator).Error; err == nil {\n\t\tupdate.AuthorName = operator.Name\n\t}\n\n\tif err = zaplog.ZLog(u.udb.Update(u.db, &update)); err != nil {\n\t\treturn\n\t}\n\treturn u.udb.View(u.db, r.ID)\n}",
"func (c *PostVideoClient) Get(ctx context.Context, id int) (*PostVideo, error) {\n\treturn c.Query().Where(postvideo.ID(id)).Only(ctx)\n}",
"func (c *PostVideoClient) Delete() *PostVideoDelete {\n\tmutation := newPostVideoMutation(c.config, OpDelete)\n\treturn &PostVideoDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upvc *UnsavedPostVideoCreate) SetUnsavedPost(u *UnsavedPost) *UnsavedPostVideoCreate {\n\treturn upvc.SetUnsavedPostID(u.ID)\n}",
"func (ydl *youtubeDl) Update() (*exec.Cmd, error) {\n\tydl.cmd = exec.Command(ydl.YoutubeDlPath, \"-U\")\n\n\tydl.Stderr, ydl.Err = ydl.cmd.StderrPipe()\n\n\tif ydl.Err != nil {\n\t\treturn nil, ydl.Err\n\t}\n\n\tydl.Stdout, ydl.Err = ydl.cmd.StdoutPipe()\n\n\tif ydl.Err != nil {\n\t\treturn nil, ydl.Err\n\t}\n\n\treturn ydl.cmd, ydl.cmd.Start()\n}",
"func (qs InstantprofileQS) Update() InstantprofileUpdateQS {\n\treturn InstantprofileUpdateQS{condFragments: qs.condFragments}\n}",
"func (upvc *UnsavedPostVideoCreate) check() error {\n\tif _, ok := upvc.mutation.UUID(); !ok {\n\t\treturn &ValidationError{Name: \"uuid\", err: errors.New(\"ent: missing required field \\\"uuid\\\"\")}\n\t}\n\tif v, ok := upvc.mutation.UUID(); ok {\n\t\tif err := unsavedpostvideo.UUIDValidator(v); err != nil {\n\t\t\treturn &ValidationError{Name: \"uuid\", err: fmt.Errorf(\"ent: validator failed for field \\\"uuid\\\": %w\", err)}\n\t\t}\n\t}\n\tif _, ok := upvc.mutation.Validity(); !ok {\n\t\treturn &ValidationError{Name: \"validity\", err: errors.New(\"ent: missing required field \\\"validity\\\"\")}\n\t}\n\tif v, ok := upvc.mutation.Validity(); ok {\n\t\tif err := unsavedpostvideo.ValidityValidator(v); err != nil {\n\t\t\treturn &ValidationError{Name: \"validity\", err: fmt.Errorf(\"ent: validator failed for field \\\"validity\\\": %w\", err)}\n\t\t}\n\t}\n\tif v, ok := upvc.mutation.Title(); ok {\n\t\tif err := unsavedpostvideo.TitleValidator(v); err != nil {\n\t\t\treturn &ValidationError{Name: \"title\", err: fmt.Errorf(\"ent: validator failed for field \\\"title\\\": %w\", err)}\n\t\t}\n\t}\n\tif v, ok := upvc.mutation.URL(); ok {\n\t\tif err := unsavedpostvideo.URLValidator(v); err != nil {\n\t\t\treturn &ValidationError{Name: \"url\", err: fmt.Errorf(\"ent: validator failed for field \\\"url\\\": %w\", err)}\n\t\t}\n\t}\n\tif _, ok := upvc.mutation.CreatedAt(); !ok {\n\t\treturn &ValidationError{Name: \"created_at\", err: errors.New(\"ent: missing required field \\\"created_at\\\"\")}\n\t}\n\tif _, ok := upvc.mutation.UnsavedPostID(); !ok {\n\t\treturn &ValidationError{Name: \"unsaved_post\", err: errors.New(\"ent: missing required edge \\\"unsaved_post\\\"\")}\n\t}\n\treturn nil\n}",
"func (c *PostVideoClient) UpdateOne(pv *PostVideo) *PostVideoUpdateOne {\n\tmutation := newPostVideoMutation(c.config, OpUpdateOne, withPostVideo(pv))\n\treturn &PostVideoUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostImageClient) Update() *UnsavedPostImageUpdate {\n\tmutation := newUnsavedPostImageMutation(c.config, OpUpdate)\n\treturn &UnsavedPostImageUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (uuo *UserUpdateOne) ClearVideos() *UserUpdateOne {\n\tuuo.mutation.ClearVideos()\n\treturn uuo\n}",
"func (o *DMessageEmbed) UpdateP(exec boil.Executor, whitelist ...string) {\n\terr := o.Update(exec, whitelist...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (upuo *UnsavedPostUpdateOne) Save(ctx context.Context) (*UnsavedPost, error) {\n\tvar (\n\t\terr error\n\t\tnode *UnsavedPost\n\t)\n\tupuo.defaults()\n\tif len(upuo.hooks) == 0 {\n\t\tif err = upuo.check(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tnode, err = upuo.sqlSave(ctx)\n\t} else {\n\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\tmutation, ok := m.(*UnsavedPostMutation)\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t}\n\t\t\tif err = upuo.check(); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tupuo.mutation = mutation\n\t\t\tnode, err = upuo.sqlSave(ctx)\n\t\t\tmutation.done = true\n\t\t\treturn node, err\n\t\t})\n\t\tfor i := len(upuo.hooks) - 1; i >= 0; i-- {\n\t\t\tmut = upuo.hooks[i](mut)\n\t\t}\n\t\tif _, err := mut.Mutate(ctx, upuo.mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn node, err\n}",
"func (self thread) Update(db Database) ThreadModel {\n root := self.posts[0].MessageID()\n reply_count := db.CountThreadReplies(root)\n\n if int(reply_count) + 1 != len(self.posts) {\n\n return thread{\n posts: append([]PostModel{self.posts[0]}, db.GetThreadReplyPostModels(self.prefix, root, 0)...),\n links: self.links,\n prefix: self.prefix,\n }\n }\n return self\n}",
"func (upvc *UnsavedPostVideoCreate) SetUnsavedPostID(id int) *UnsavedPostVideoCreate {\n\tupvc.mutation.SetUnsavedPostID(id)\n\treturn upvc\n}",
"func (b *GroupsSetLongPollSettingsBuilder) VideoNew(v bool) *GroupsSetLongPollSettingsBuilder {\n\tb.Params[\"video_new\"] = v\n\treturn b\n}",
"func (c *PostAttachmentClient) Update() *PostAttachmentUpdate {\n\tmutation := newPostAttachmentMutation(c.config, OpUpdate)\n\treturn &PostAttachmentUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func NewPostVideoClient(c config) *PostVideoClient {\n\treturn &PostVideoClient{config: c}\n}",
"func NewUpdateWidgetParamsWithTimeout(timeout time.Duration) *UpdateWidgetParams {\n\tvar (\n\t\tacceptDefault = string(\"application/json\")\n\t\tcontentTypeDefault = string(\"application/json\")\n\t)\n\treturn &UpdateWidgetParams{\n\t\tAccept: &acceptDefault,\n\t\tContentType: &contentTypeDefault,\n\n\t\ttimeout: timeout,\n\t}\n}",
"func (upu *UnsavedPostUpdate) Where(ps ...predicate.UnsavedPost) *UnsavedPostUpdate {\n\tupu.mutation.predicates = append(upu.mutation.predicates, ps...)\n\treturn upu\n}",
"func NewSwarmUpdateParams() *SwarmUpdateParams {\n\tvar (\n\t\trotateManagerTokenDefault = bool(false)\n\t\trotateManagerUnlockKeyDefault = bool(false)\n\t\trotateWorkerTokenDefault = bool(false)\n\t)\n\treturn &SwarmUpdateParams{\n\t\tRotateManagerToken: &rotateManagerTokenDefault,\n\t\tRotateManagerUnlockKey: &rotateManagerUnlockKeyDefault,\n\t\tRotateWorkerToken: &rotateWorkerTokenDefault,\n\n\t\ttimeout: cr.DefaultTimeout,\n\t}\n}",
"func (server *Server) UpdatePost(w http.ResponseWriter, r *http.Request) {\n\tvar code = http.StatusBadRequest\n\tvar uid uint32\n\tvar body []byte\n\tvars := mux.Vars(r)\n\tpost := models.Post{}\n\tpostUpdate := models.Post{}\n\tvar postUpdated *models.Post\n\t// Check if the post id is valid\n\tpid, err := strconv.ParseUint(vars[\"id\"], 10, 64)\n\tif err != nil {\n\t\tgoto Error\n\t}\n\n\t//CHeck if the auth token is valid and get the user id from it\n\tuid, err = middlewares.ExtractTokenID(r)\n\tif err != nil {\n\t\terr = errors.New(\"Unauthorized\")\n\t\tcode = http.StatusUnauthorized\n\t\tgoto Error\n\t}\n\n\t// Check if the post exist\n\terr = server.DB.Debug().Model(models.Post{}).Where(\"id = ?\", pid).Take(&post).Error\n\tif err != nil {\n\t\terr = errors.New(\"Post not found\")\n\t\tcode = http.StatusNotFound\n\t\tgoto Error\n\t}\n\n\t// If a user attempt to update a post not belonging to him\n\tif uid != post.AuthorID {\n\t\terr = errors.New(\"Unauthorized\")\n\t\tcode = http.StatusUnauthorized\n\t\tgoto Error\n\t}\n\n\tif body, err = server.ParseRequest(w, r); err != nil {\n\t\tcode = http.StatusUnprocessableEntity\n\t\tgoto Error\n\t}\n\terr = json.Unmarshal(body, &postUpdate)\n\tif err != nil {\n\t\tcode = http.StatusUnprocessableEntity\n\t\tgoto Error\n\t}\n\n\t//Also check if the request user id is equal to the one gotten from token\n\tif uid != postUpdate.AuthorID {\n\t\terr = errors.New(\"Unauthorized\")\n\t\tcode = http.StatusUnauthorized\n\t\tgoto Error\n\t}\n\n\tpostUpdate.Prepare()\n\terr = postUpdate.Validate()\n\tif err != nil {\n\t\tcode = http.StatusUnprocessableEntity\n\t\tgoto Error\n\t}\n\n\tpostUpdate.ID = post.ID //this is important to tell the model the post id to update, the other update field are set above\n\tpostUpdated, err = postUpdate.UpdateAPost(server.DB)\n\n\tif err != nil {\n\t\tformattedError := formaterror.FormatError(err.Error())\n\t\tmiddlewares.ERROR(w, http.StatusInternalServerError, formattedError)\n\t\tlogger.WriteLog(r, http.StatusInternalServerError, formattedError, server.GetCurrentFuncName())\n\t\treturn\n\t}\n\tcode = http.StatusOK\n\tmiddlewares.JSON(w, code, postUpdated)\n\tlogger.WriteLog(r, code, nil, server.GetCurrentFuncName())\n\treturn\nError:\n\tmiddlewares.ERROR(w, code, err)\n\tlogger.WriteLog(r, code, err, server.GetCurrentFuncName())\n}",
"func (o *UpdateWidgetParams) WithTimeout(timeout time.Duration) *UpdateWidgetParams {\n\to.SetTimeout(timeout)\n\treturn o\n}",
"func NewUpdateBuilder() *UpdateBuilder {\n\treturn DefaultFlavor.NewUpdateBuilder()\n}",
"func (po *Post) Update() *PostUpdateOne {\n\treturn NewPostClient(po.config).UpdateOne(po)\n}",
"func (c *UnsavedPostClient) QueryVideos(up *UnsavedPost) *UnsavedPostVideoQuery {\n\tquery := &UnsavedPostVideoQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostvideo.Table, unsavedpostvideo.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.VideosTable, unsavedpost.VideosColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func UpdatePost(c buffalo.Context) error {\n\tauthUser := c.Value(\"authUser\").(models.User)\n\tpost := &models.Post{}\n\tdatabase := c.Value(\"tx\").(*pop.Connection)\n\t// retrieve the existing record\n\tif txErr := database.Find(post, c.Param(\"post_id\")); txErr != nil {\n\n\t\tnotFoundResponse := utils.NewErrorResponse(\n\t\t\thttp.StatusNotFound,\n\t\t\t\"post_id\",\n\t\t\tfmt.Sprintf(\"The requested post %s is removed or move to somewhere else.\", c.Param(\"post_id\")),\n\t\t)\n\t\treturn c.Render(http.StatusNotFound, r.JSON(notFoundResponse))\n\t}\n\t// bind the form input\n\tif bindErr := c.Bind(post); bindErr != nil {\n\t\temptyBodyResponse := utils.NewErrorResponse(\n\t\t\thttp.StatusUnprocessableEntity,\n\t\t\t\"body\",\n\t\t\t\"The request body cannot be empty\",\n\t\t)\n\t\treturn c.Render(http.StatusUnprocessableEntity, r.JSON(emptyBodyResponse))\n\t}\n\tpost.UserID = authUser.ID\n\tvalidationErrors, err := database.ValidateAndUpdate(post)\n\tif err != nil {\n\t\treturn errors.WithStack(err)\n\t}\n\n\tif validationErrors.HasAny() {\n\t\terrResponse := utils.NewValidationErrorResponse(\n\t\t\thttp.StatusUnprocessableEntity,\n\t\t\tvalidationErrors.Errors,\n\t\t)\n\t\treturn c.Render(http.StatusUnprocessableEntity, r.JSON(errResponse))\n\t}\n\n\tresponse := PostResponse{\n\t\tCode: fmt.Sprintf(\"%d\", http.StatusOK),\n\t\tData: post,\n\t}\n\n\treturn c.Render(http.StatusOK, r.JSON(response))\n}",
"func (b *GroupsSetCallbackSettingsBuilder) VideoNew(v bool) *GroupsSetCallbackSettingsBuilder {\n\tb.Params[\"video_new\"] = v\n\treturn b\n}",
"func (t *PhoneToggleGroupCallRecordRequest) SetVideo(value bool) {\n\tif value {\n\t\tt.Flags.Set(2)\n\t\tt.Video = true\n\t} else {\n\t\tt.Flags.Unset(2)\n\t\tt.Video = false\n\t}\n}",
"func (client *Client) UpdateVideoInfoWithOptions(request *UpdateVideoInfoRequest, runtime *util.RuntimeOptions) (_result *UpdateVideoInfoResponse, _err error) {\n\t_err = util.ValidateModel(request)\n\tif _err != nil {\n\t\treturn _result, _err\n\t}\n\tquery := map[string]interface{}{}\n\tif !tea.BoolValue(util.IsUnset(request.CateId)) {\n\t\tquery[\"CateId\"] = request.CateId\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.CoverURL)) {\n\t\tquery[\"CoverURL\"] = request.CoverURL\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.Description)) {\n\t\tquery[\"Description\"] = request.Description\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.Tags)) {\n\t\tquery[\"Tags\"] = request.Tags\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.Title)) {\n\t\tquery[\"Title\"] = request.Title\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.VideoId)) {\n\t\tquery[\"VideoId\"] = request.VideoId\n\t}\n\n\treq := &openapi.OpenApiRequest{\n\t\tQuery: openapiutil.Query(query),\n\t}\n\tparams := &openapi.Params{\n\t\tAction: tea.String(\"UpdateVideoInfo\"),\n\t\tVersion: tea.String(\"2017-03-21\"),\n\t\tProtocol: tea.String(\"HTTPS\"),\n\t\tPathname: tea.String(\"/\"),\n\t\tMethod: tea.String(\"POST\"),\n\t\tAuthType: tea.String(\"AK\"),\n\t\tStyle: tea.String(\"RPC\"),\n\t\tReqBodyType: tea.String(\"formData\"),\n\t\tBodyType: tea.String(\"json\"),\n\t}\n\t_result = &UpdateVideoInfoResponse{}\n\t_body, _err := client.CallApi(params, req, runtime)\n\tif _err != nil {\n\t\treturn _result, _err\n\t}\n\t_err = tea.Convert(_body, &_result)\n\treturn _result, _err\n}",
"func (upq *UnsavedPostQuery) Clone() *UnsavedPostQuery {\n\tif upq == nil {\n\t\treturn nil\n\t}\n\treturn &UnsavedPostQuery{\n\t\tconfig: upq.config,\n\t\tlimit: upq.limit,\n\t\toffset: upq.offset,\n\t\torder: append([]OrderFunc{}, upq.order...),\n\t\tpredicates: append([]predicate.UnsavedPost{}, upq.predicates...),\n\t\twithAuthor: upq.withAuthor.Clone(),\n\t\twithCategory: upq.withCategory.Clone(),\n\t\twithThumbnail: upq.withThumbnail.Clone(),\n\t\twithImages: upq.withImages.Clone(),\n\t\twithVideos: upq.withVideos.Clone(),\n\t\twithAttachments: upq.withAttachments.Clone(),\n\t\t// clone intermediate query.\n\t\tsql: upq.sql.Clone(),\n\t\tpath: upq.path,\n\t}\n}",
"func (p *PhoneCallDiscarded) SetVideo(value bool) {\n\tif value {\n\t\tp.Flags.Set(6)\n\t\tp.Video = true\n\t} else {\n\t\tp.Flags.Unset(6)\n\t\tp.Video = false\n\t}\n}",
"func (upu *UnsavedPostUpdate) AddVideos(u ...*UnsavedPostVideo) *UnsavedPostUpdate {\n\tids := make([]int, len(u))\n\tfor i := range u {\n\t\tids[i] = u[i].ID\n\t}\n\treturn upu.AddVideoIDs(ids...)\n}",
"func (o *UpdateWidgetParams) WithWidgetBody(widgetBody UpdateWidgetBody) *UpdateWidgetParams {\n\to.SetWidgetBody(widgetBody)\n\treturn o\n}",
"func (upu *UnsavedPostUpdate) AddVideoIDs(ids ...int) *UnsavedPostUpdate {\n\tupu.mutation.AddVideoIDs(ids...)\n\treturn upu\n}",
"func (c *MediaClient) Update() *MediaUpdate {\n\tmutation := newMediaMutation(c.config, OpUpdate)\n\treturn &MediaUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (qs DaytypeQS) Update() DaytypeUpdateQS {\n\treturn DaytypeUpdateQS{condFragments: qs.condFragments}\n}",
"func (p *PhoneCallWaiting) SetVideo(value bool) {\n\tif value {\n\t\tp.Flags.Set(6)\n\t\tp.Video = true\n\t} else {\n\t\tp.Flags.Unset(6)\n\t\tp.Video = false\n\t}\n}",
"func (upq *UnsavedPostQuery) QueryVideos() *UnsavedPostVideoQuery {\n\tquery := &UnsavedPostVideoQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostvideo.Table, unsavedpostvideo.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.VideosTable, unsavedpost.VideosColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (o *PostApplyManifestParams) SetDisableUpdatePost(disableUpdatePost *bool) {\n\to.DisableUpdatePost = disableUpdatePost\n}",
"func (*UpdateVideoV1Request) Descriptor() ([]byte, []int) {\n\treturn file_api_ocp_video_api_ocp_video_api_proto_rawDescGZIP(), []int{10}\n}",
"func (o *AssetRevision) UpdateP(exec boil.Executor, whitelist ...string) {\n\terr := o.Update(exec, whitelist...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (env *Env) UpdatePost(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\ts := bluemonday.UGCPolicy()\n\tuser := ctx.Value(contextUser).(*models.User)\n\t// post ID needs to be sanitized and parsed - return if error parsing\n\tid, err := uuid.Parse(s.Sanitize(r.FormValue(\"id\")))\n\tif err != nil {\n\t\tenv.log(r, err)\n\t\tw.WriteHeader(http.StatusBadRequest)\n\t\treturn\n\t}\n\ttitle := s.Sanitize(r.FormValue(\"title\"))\n\tslug := s.Sanitize(r.FormValue(\"slug\"))\n\tsubtitle := s.Sanitize(r.FormValue(\"subtitle\"))\n\tshort := s.Sanitize(r.FormValue(\"short\"))\n\tcontent := s.Sanitize(r.FormValue(\"content\"))\n\tdigest := s.Sanitize(r.FormValue(\"digest\"))\n\t// published must be parsed into a bool\n\tpublished, err := strconv.ParseBool(s.Sanitize(r.FormValue(\"published\")))\n\tif err != nil {\n\t\tenv.log(r, err)\n\t\tw.WriteHeader(http.StatusBadRequest)\n\t\treturn\n\t}\n\tp, err := env.DB.UpdatePost(id, user.ID, title, slug, subtitle, short, content, digest, published)\n\tif err != nil {\n\t\tenv.log(r, err)\n\t\tw.WriteHeader(http.StatusInternalServerError)\n\t\treturn\n\t}\n\t// Send out updated post\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tw.WriteHeader(http.StatusOK)\n\tjson.NewEncoder(w).Encode(p)\n}",
"func NewUpdatePayload(message *taskspb.UpdateRequest) *tasks.UpdatePayload {\n\tv := &tasks.UpdatePayload{\n\t\tID: message.Id,\n\t}\n\tif message.Task != nil {\n\t\tv.Task = protobufTaskspbStoredTaskToTasksStoredTask(message.Task)\n\t}\n\treturn v\n}",
"func BuildUpdatePayload(tasksUpdateMessage string) (*tasks.UpdatePayload, error) {\n\tvar err error\n\tvar message taskspb.UpdateRequest\n\t{\n\t\tif tasksUpdateMessage != \"\" {\n\t\t\terr = json.Unmarshal([]byte(tasksUpdateMessage), &message)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"invalid JSON for message, \\nerror: %s, \\nexample of valid JSON:\\n%s\", err, \"'{\\n \\\"id\\\": \\\"Et unde velit sapiente voluptatum.\\\",\\n \\\"task\\\": {\\n \\\"assignee\\\": {\\n \\\"email\\\": \\\"[email protected]\\\",\\n \\\"firstname\\\": \\\"Ehab\\\",\\n \\\"isactive\\\": false,\\n \\\"lastname\\\": \\\"Terra\\\",\\n \\\"role\\\": \\\"admin\\\"\\n },\\n \\\"created_date\\\": \\\"1977-08-23T17:31:33Z\\\",\\n \\\"description\\\": \\\"Task description\\\",\\n \\\"due_date\\\": \\\"1994-02-04T20:22:05Z\\\",\\n \\\"id\\\": \\\"Dolor eos dolorem numquam odio aspernatur et.\\\",\\n \\\"owner\\\": {\\n \\\"email\\\": \\\"[email protected]\\\",\\n \\\"firstname\\\": \\\"Ehab\\\",\\n \\\"isactive\\\": false,\\n \\\"lastname\\\": \\\"Terra\\\",\\n \\\"role\\\": \\\"admin\\\"\\n },\\n \\\"status\\\": \\\"Pending\\\",\\n \\\"title\\\": \\\"New task title\\\",\\n \\\"updated_date\\\": \\\"1994-11-14T18:35:02Z\\\"\\n }\\n }'\")\n\t\t\t}\n\t\t}\n\t}\n\tv := &tasks.UpdatePayload{\n\t\tID: message.Id,\n\t}\n\tif message.Task != nil {\n\t\tv.Task = protobufTaskspbStoredTaskToTasksStoredTask(message.Task)\n\t}\n\n\treturn v, nil\n}",
"func (virtualmedia *VirtualMedia) Update() error {\n\t// Get a representation of the object's original state so we can find what\n\t// to update.\n\toriginal := new(VirtualMedia)\n\terr := original.UnmarshalJSON(virtualmedia.rawData)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treadWriteFields := []string{\n\t\t\"Image\",\n\t\t\"Inserted\",\n\t\t\"Password\",\n\t\t\"TransferMethod\",\n\t\t\"TransferProtocolType\",\n\t\t\"UserName\",\n\t\t\"WriteProtected\",\n\t}\n\n\toriginalElement := reflect.ValueOf(original).Elem()\n\tcurrentElement := reflect.ValueOf(virtualmedia).Elem()\n\n\treturn virtualmedia.Entity.Update(originalElement, currentElement, readWriteFields)\n}",
"func DashboardPostPut(r render.Render, db *gorm.DB, s sessions.Session, req *http.Request, args martini.Params) {\n\tuser, ok := checkSession(s, db)\n\tif ok == false {\n\t\tr.JSON(403, map[string]string{\"error\": \"not logged in\"})\n\t\treturn\n\t}\n\n\tid, err := strconv.Atoi(req.FormValue(\"id\"))\n\tif err != nil {\n\t\tr.JSON(400, map[string]string{\"error\": \"invalid id\"})\n\t\treturn\n\t}\n\ttitle := req.FormValue(\"title\")\n\tcontent := req.FormValue(\"content\")\n\n\tif id > 0 {\n\t\tvar post wpdb.Post\n\t\tdb.Where(\"ID=?\", id).Find(&post)\n\t\tif post.Id == 0 {\n\t\t\tr.JSON(400, map[string]string{\"error\": \"post not found\"})\n\t\t\treturn\n\t\t}\n\n\t\t// TO DO: Revisioning stuff for last edited by\n\t\tpost.Title = title\n\t\tpost.Content = content\n\t\tdb.Save(&post)\n\t\treturn\n\t}\n\n\tpost := wpdb.Post{\n\t\tUserId: user.Id,\n\t\tPostDate: time.Now().Format(\"2006-01-02 15:04:05\"),\n\t\tContent: content,\n\t\tTitle: title,\n\t\tName: strings.ToLower(strings.Replace(title, \" \", \"-\", -1)),\n\t}\n\n\tdb.Save(&post)\n\tr.JSON(200, map[string]int64{\"postid\": post.Id})\n}",
"func (c *PostVideoClient) Create() *PostVideoCreate {\n\tmutation := newPostVideoMutation(c.config, OpCreate)\n\treturn &PostVideoCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func Update(ctx *sweetygo.Context) error {\n\toldTitle := ctx.Param(\"title\") // from url\n\tnewTitle := ctx.Param(\"new-title\") // from form\n\tcat := ctx.Param(\"cat\")\n\thtml := ctx.Param(\"html\")\n\tmd := ctx.Param(\"md\")\n\tif newTitle != \"\" && cat != \"\" && html != \"\" && md != \"\" {\n\t\terr := model.UpdatePost(newTitle, cat, html, md, oldTitle)\n\t\tif err != nil {\n\t\t\treturn ctx.JSON(500, 0, \"update post error\", nil)\n\t\t}\n\t\treturn ctx.JSON(201, 1, \"success\", nil)\n\t}\n\treturn ctx.JSON(406, 0, \"I can't understand what u want\", nil)\n}",
"func (qs ControlQS) Update() ControlUpdateQS {\n\treturn ControlUpdateQS{condFragments: qs.condFragments}\n}",
"func (d *Demo) UpdateStruct(g *gom.Gom) {\n\ttoolkit.Println(\"===== Update With Struct =====\")\n\thero := models.NewHero(\"Wonderwoman\", \"Gal Gadot\", 34)\n\n\tvar err error\n\tif d.useParams {\n\t\t_, err = g.Set(&gom.SetParams{\n\t\t\tTableName: \"hero\",\n\t\t\tFilter: gom.Eq(\"RealName\", \"Scarlett Johansson\"),\n\t\t\tTimeout: 10,\n\t\t}).Cmd().Update(hero)\n\t} else {\n\t\t_, err = g.Set(nil).Table(\"hero\").Timeout(10).Filter(gom.Eq(\"RealName\", \"Scarlett Johansson\")).Cmd().Update(hero)\n\t}\n\n\tif err != nil {\n\t\ttoolkit.Println(err.Error())\n\t\treturn\n\t}\n}",
"func (c *PostClient) Update() *PostUpdate {\n\tmutation := newPostMutation(c.config, OpUpdate)\n\treturn &PostUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (client *Client) ProduceEditingProjectVideoWithOptions(request *ProduceEditingProjectVideoRequest, runtime *util.RuntimeOptions) (_result *ProduceEditingProjectVideoResponse, _err error) {\n\t_err = util.ValidateModel(request)\n\tif _err != nil {\n\t\treturn _result, _err\n\t}\n\tquery := map[string]interface{}{}\n\tif !tea.BoolValue(util.IsUnset(request.CoverURL)) {\n\t\tquery[\"CoverURL\"] = request.CoverURL\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.Description)) {\n\t\tquery[\"Description\"] = request.Description\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.MediaMetadata)) {\n\t\tquery[\"MediaMetadata\"] = request.MediaMetadata\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.OwnerId)) {\n\t\tquery[\"OwnerId\"] = request.OwnerId\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.ProduceConfig)) {\n\t\tquery[\"ProduceConfig\"] = request.ProduceConfig\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.ProjectId)) {\n\t\tquery[\"ProjectId\"] = request.ProjectId\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.ResourceOwnerAccount)) {\n\t\tquery[\"ResourceOwnerAccount\"] = request.ResourceOwnerAccount\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.ResourceOwnerId)) {\n\t\tquery[\"ResourceOwnerId\"] = request.ResourceOwnerId\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.Timeline)) {\n\t\tquery[\"Timeline\"] = request.Timeline\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.Title)) {\n\t\tquery[\"Title\"] = request.Title\n\t}\n\n\tif !tea.BoolValue(util.IsUnset(request.UserData)) {\n\t\tquery[\"UserData\"] = request.UserData\n\t}\n\n\treq := &openapi.OpenApiRequest{\n\t\tQuery: openapiutil.Query(query),\n\t}\n\tparams := &openapi.Params{\n\t\tAction: tea.String(\"ProduceEditingProjectVideo\"),\n\t\tVersion: tea.String(\"2017-03-21\"),\n\t\tProtocol: tea.String(\"HTTPS\"),\n\t\tPathname: tea.String(\"/\"),\n\t\tMethod: tea.String(\"POST\"),\n\t\tAuthType: tea.String(\"AK\"),\n\t\tStyle: tea.String(\"RPC\"),\n\t\tReqBodyType: tea.String(\"formData\"),\n\t\tBodyType: tea.String(\"json\"),\n\t}\n\t_result = &ProduceEditingProjectVideoResponse{}\n\t_body, _err := client.CallApi(params, req, runtime)\n\tif _err != nil {\n\t\treturn _result, _err\n\t}\n\t_err = tea.Convert(_body, &_result)\n\treturn _result, _err\n}",
"func (amv *AMV) SetVideoBytes(data []byte) error {\n\tfileName := amv.ID + \".webm\"\n\tfilePath := path.Join(Root, \"videos\", \"amvs\", fileName)\n\terr := ioutil.WriteFile(filePath, data, 0644)\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Run mkclean\n\toptimizedFile := filePath + \".optimized\"\n\n\tcmd := exec.Command(\n\t\t\"mkclean\",\n\t\t\"--doctype\", \"4\",\n\t\t\"--keep-cues\",\n\t\t\"--optimize\",\n\t\tfilePath,\n\t\toptimizedFile,\n\t)\n\n\tcmd.Stdout = os.Stdout\n\tcmd.Stderr = os.Stderr\n\tcmd.Stdin = os.Stdin\n\n\terr = cmd.Start()\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = cmd.Wait()\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Now delete the original file and replace it with the optimized file\n\terr = os.Remove(filePath)\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = os.Rename(optimizedFile, filePath)\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Refresh video file info\n\tamv.File = fileName\n\treturn amv.RefreshInfo()\n}",
"func (upu *UnsavedPostUpdate) RemoveVideos(u ...*UnsavedPostVideo) *UnsavedPostUpdate {\n\tids := make([]int, len(u))\n\tfor i := range u {\n\t\tids[i] = u[i].ID\n\t}\n\treturn upu.RemoveVideoIDs(ids...)\n}",
"func (v *PostUpdate) UnmarshalEasyJSON(l *jlexer.Lexer) {\n\teasyjsonD2b7633eDecodeGithubComMailcoursesTechnoparkDbmsForumGeneratedModels6(l, v)\n}",
"func (f *FakePrivilegedProjectProvider) UpdateUnsecured(project *kubermaticapiv1.Project) (*kubermaticapiv1.Project, error) {\n\treturn project, nil\n}",
"func (c *PostVideoClient) Query() *PostVideoQuery {\n\treturn &PostVideoQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (o *SwarmUpdateParams) WithBody(body *models.SwarmSpec) *SwarmUpdateParams {\n\to.SetBody(body)\n\treturn o\n}",
"func (p *PhoneCall) SetVideo(value bool) {\n\tif value {\n\t\tp.Flags.Set(6)\n\t\tp.Video = true\n\t} else {\n\t\tp.Flags.Unset(6)\n\t\tp.Video = false\n\t}\n}",
"func (p *PhoneCallRequested) SetVideo(value bool) {\n\tif value {\n\t\tp.Flags.Set(6)\n\t\tp.Video = true\n\t} else {\n\t\tp.Flags.Unset(6)\n\t\tp.Video = false\n\t}\n}",
"func (upuo *UnsavedPostUpdateOne) AddVideoIDs(ids ...int) *UnsavedPostUpdateOne {\n\tupuo.mutation.AddVideoIDs(ids...)\n\treturn upuo\n}",
"func (p *PostTag) ValidateUpdate(tx *pop.Connection) (*validate.Errors, error) {\n\treturn validate.NewErrors(), nil\n}",
"func (upuo *UnsavedPostUpdateOne) AddVideos(u ...*UnsavedPostVideo) *UnsavedPostUpdateOne {\n\tids := make([]int, len(u))\n\tfor i := range u {\n\t\tids[i] = u[i].ID\n\t}\n\treturn upuo.AddVideoIDs(ids...)\n}",
"func (client *VideosClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, videoName string, parameters VideoEntity, options *VideosClientUpdateOptions) (*policy.Request, error) {\n\turlPath := \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}\"\n\tif client.subscriptionID == \"\" {\n\t\treturn nil, errors.New(\"parameter client.subscriptionID cannot be empty\")\n\t}\n\turlPath = strings.ReplaceAll(urlPath, \"{subscriptionId}\", url.PathEscape(client.subscriptionID))\n\tif resourceGroupName == \"\" {\n\t\treturn nil, errors.New(\"parameter resourceGroupName cannot be empty\")\n\t}\n\turlPath = strings.ReplaceAll(urlPath, \"{resourceGroupName}\", url.PathEscape(resourceGroupName))\n\tif accountName == \"\" {\n\t\treturn nil, errors.New(\"parameter accountName cannot be empty\")\n\t}\n\turlPath = strings.ReplaceAll(urlPath, \"{accountName}\", url.PathEscape(accountName))\n\tif videoName == \"\" {\n\t\treturn nil, errors.New(\"parameter videoName cannot be empty\")\n\t}\n\turlPath = strings.ReplaceAll(urlPath, \"{videoName}\", url.PathEscape(videoName))\n\treq, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treqQP := req.Raw().URL.Query()\n\treqQP.Set(\"api-version\", \"2021-11-01-preview\")\n\treq.Raw().URL.RawQuery = reqQP.Encode()\n\treq.Raw().Header[\"Accept\"] = []string{\"application/json\"}\n\treturn req, runtime.MarshalAsJSON(req, parameters)\n}",
"func (r *PostingBot) Post(p *reddit.Post) error {\n\tswitch {\n\tcase p.NSFW:\n\t\t// We hide NSFW content\n\t\tmsg := tgbotapi.NewMessage(r.Config.ChatID, fmt.Sprintf(\"Uh oh, nsfw content! 🔞\\n%s\", p.URL))\n\t\tmsg.DisableWebPagePreview = true\n\t\tmsg.ReplyMarkup = utility.SetupInlineKeyboard(p.Subreddit, p.Permalink)\n\t\tr.TBot.Send(msg)\n\tcase p.Media.RedditVideo.IsGIF:\n\t\tmsg := tgbotapi.NewDocumentUpload(r.Config.ChatID, p.URL)\n\t\tmsg.ReplyMarkup = utility.SetupInlineKeyboard(p.Subreddit, p.Permalink)\n\t\tr.TBot.Send(msg)\n\tcase strings.Contains(p.URL, \".jpg\") || strings.Contains(p.URL, \".png\"):\n\t\tmsg := tgbotapi.NewPhotoUpload(r.Config.ChatID, \"\")\n\t\tmsg.FileID = p.URL\n\t\tmsg.UseExisting = true\n\t\tmsg.ReplyMarkup = utility.SetupInlineKeyboard(p.Subreddit, p.Permalink)\n\t\tr.TBot.Send(msg)\n\tdefault:\n\t\tif r.Config.VideoDownload {\n\t\t\tfileName, err := video.GetVideo(p.URL)\n\t\t\tif err != nil {\n\t\t\t\tfmt.Println(err)\n\t\t\t}\n\t\t\tvideoPath := r.Config.DownloadPath + fileName\n\n\t\t\tmsg := tgbotapi.NewVideoUpload(r.Config.ChatID, videoPath)\n\t\t\tmsg.ReplyMarkup = utility.SetupInlineKeyboard(p.Subreddit, p.Permalink)\n\n\t\t\tr.TBot.Send(msg)\n\t\t\tos.Remove(videoPath)\n\t\t} else {\n\t\t\tmsg := tgbotapi.NewMessage(r.Config.ChatID, p.URL)\n\t\t\tr.TBot.Send(msg)\n\t\t}\n\t}\n\treturn nil\n}",
"func (m *Media) Update() *MediaUpdateOne {\n\treturn (&MediaClient{config: m.config}).UpdateOne(m)\n}",
"func (o *PostApplyManifestParams) WithDisableUpdatePost(disableUpdatePost *bool) *PostApplyManifestParams {\n\to.SetDisableUpdatePost(disableUpdatePost)\n\treturn o\n}",
"func (o *Post) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error) {\n\tcurrTime := time.Now().In(boil.GetLocation())\n\n\to.UpdatedAt = currTime\n\n\tvar err error\n\tif err = o.doBeforeUpdateHooks(ctx, exec); err != nil {\n\t\treturn 0, err\n\t}\n\tkey := makeCacheKey(columns, nil)\n\tpostUpdateCacheMut.RLock()\n\tcache, cached := postUpdateCache[key]\n\tpostUpdateCacheMut.RUnlock()\n\n\tif !cached {\n\t\twl := columns.UpdateColumnSet(\n\t\t\tpostColumns,\n\t\t\tpostPrimaryKeyColumns,\n\t\t)\n\n\t\tif !columns.IsWhitelist() {\n\t\t\twl = strmangle.SetComplement(wl, []string{\"created_at\"})\n\t\t}\n\t\tif len(wl) == 0 {\n\t\t\treturn 0, errors.New(\"orm: unable to update posts, could not build whitelist\")\n\t\t}\n\n\t\tcache.query = fmt.Sprintf(\"UPDATE \\\"posts\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, wl),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", len(wl)+1, postPrimaryKeyColumns),\n\t\t)\n\t\tcache.valueMapping, err = queries.BindMapping(postType, postMapping, append(wl, postPrimaryKeyColumns...))\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t}\n\n\tvalues := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), cache.valueMapping)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, cache.query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tvar result sql.Result\n\tresult, err = exec.ExecContext(ctx, cache.query, values...)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"orm: unable to update posts row\")\n\t}\n\n\trowsAff, err := result.RowsAffected()\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"orm: failed to get rows affected by update for posts\")\n\t}\n\n\tif !cached {\n\t\tpostUpdateCacheMut.Lock()\n\t\tpostUpdateCache[key] = cache\n\t\tpostUpdateCacheMut.Unlock()\n\t}\n\n\treturn rowsAff, o.doAfterUpdateHooks(ctx, exec)\n}",
"func (c *PostThumbnailClient) Update() *PostThumbnailUpdate {\n\tmutation := newPostThumbnailMutation(c.config, OpUpdate)\n\treturn &PostThumbnailUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upu *UnsavedPostUpdate) ClearAttachments() *UnsavedPostUpdate {\n\tupu.mutation.ClearAttachments()\n\treturn upu\n}",
"func (api *MediaApi) update(c *routing.Context) error {\n\tid := c.Param(\"id\")\n\n\tmodel, fetchErr := api.dao.GetByID(id)\n\tif fetchErr != nil {\n\t\treturn utils.NewNotFoundError(fmt.Sprintf(\"Media item with id \\\"%v\\\" doesn't exist!\", id))\n\t}\n\n\tform := &models.MediaUpdateForm{}\n\tif readErr := c.Read(form); readErr != nil {\n\t\treturn utils.NewBadRequestError(\"Oops, an error occurred while updating media item.\", readErr)\n\t}\n\n\tform.Model = model\n\n\tupdatedModel, updateErr := api.dao.Update(form)\n\n\tif updateErr != nil {\n\t\treturn utils.NewBadRequestError(\"Oops, an error occurred while updating media item.\", updateErr)\n\t}\n\n\tupdatedModel = daos.ToAbsMediaPath(updatedModel)\n\n\treturn c.Write(updatedModel)\n}",
"func (o *DMessageEmbed) Upsert(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error {\n\tif o == nil {\n\t\treturn errors.New(\"models: no d_message_embeds provided for upsert\")\n\t}\n\n\tnzDefaults := queries.NonZeroDefaultSet(dMessageEmbedColumnsWithDefault, o)\n\n\t// Build cache key in-line uglily - mysql vs postgres problems\n\tbuf := strmangle.GetBuffer()\n\tif updateOnConflict {\n\t\tbuf.WriteByte('t')\n\t} else {\n\t\tbuf.WriteByte('f')\n\t}\n\tbuf.WriteByte('.')\n\tfor _, c := range conflictColumns {\n\t\tbuf.WriteString(c)\n\t}\n\tbuf.WriteByte('.')\n\tfor _, c := range updateColumns {\n\t\tbuf.WriteString(c)\n\t}\n\tbuf.WriteByte('.')\n\tfor _, c := range whitelist {\n\t\tbuf.WriteString(c)\n\t}\n\tbuf.WriteByte('.')\n\tfor _, c := range nzDefaults {\n\t\tbuf.WriteString(c)\n\t}\n\tkey := buf.String()\n\tstrmangle.PutBuffer(buf)\n\n\tdMessageEmbedUpsertCacheMut.RLock()\n\tcache, cached := dMessageEmbedUpsertCache[key]\n\tdMessageEmbedUpsertCacheMut.RUnlock()\n\n\tvar err error\n\n\tif !cached {\n\t\tvar ret []string\n\t\twhitelist, ret = strmangle.InsertColumnSet(\n\t\t\tdMessageEmbedColumns,\n\t\t\tdMessageEmbedColumnsWithDefault,\n\t\t\tdMessageEmbedColumnsWithoutDefault,\n\t\t\tnzDefaults,\n\t\t\twhitelist,\n\t\t)\n\t\tupdate := strmangle.UpdateColumnSet(\n\t\t\tdMessageEmbedColumns,\n\t\t\tdMessageEmbedPrimaryKeyColumns,\n\t\t\tupdateColumns,\n\t\t)\n\t\tif len(update) == 0 {\n\t\t\treturn errors.New(\"models: unable to upsert d_message_embeds, could not build update column list\")\n\t\t}\n\n\t\tconflict := conflictColumns\n\t\tif len(conflict) == 0 {\n\t\t\tconflict = make([]string, len(dMessageEmbedPrimaryKeyColumns))\n\t\t\tcopy(conflict, dMessageEmbedPrimaryKeyColumns)\n\t\t}\n\t\tcache.query = queries.BuildUpsertQueryPostgres(dialect, \"\\\"d_message_embeds\\\"\", updateOnConflict, ret, update, conflict, whitelist)\n\n\t\tcache.valueMapping, err = queries.BindMapping(dMessageEmbedType, dMessageEmbedMapping, whitelist)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif len(ret) != 0 {\n\t\t\tcache.retMapping, err = queries.BindMapping(dMessageEmbedType, dMessageEmbedMapping, ret)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tvalue := reflect.Indirect(reflect.ValueOf(o))\n\tvals := queries.ValuesFromMapping(value, cache.valueMapping)\n\tvar returns []interface{}\n\tif len(cache.retMapping) != 0 {\n\t\treturns = queries.PtrsFromMapping(value, cache.retMapping)\n\t}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, cache.query)\n\t\tfmt.Fprintln(boil.DebugWriter, vals)\n\t}\n\n\tif len(cache.retMapping) != 0 {\n\t\terr = exec.QueryRow(cache.query, vals...).Scan(returns...)\n\t\tif err == sql.ErrNoRows {\n\t\t\terr = nil // Postgres doesn't return anything when there's no update\n\t\t}\n\t} else {\n\t\t_, err = exec.Exec(cache.query, vals...)\n\t}\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"models: unable to upsert d_message_embeds\")\n\t}\n\n\tif !cached {\n\t\tdMessageEmbedUpsertCacheMut.Lock()\n\t\tdMessageEmbedUpsertCache[key] = cache\n\t\tdMessageEmbedUpsertCacheMut.Unlock()\n\t}\n\n\treturn nil\n}",
"func (p *postsQueryBuilder) Update() (int64, error) {\n\tif p.err != nil {\n\t\treturn 0, p.err\n\t}\n\treturn p.builder.Update()\n}",
"func (m *File) UpdateVideoInfos() error {\n\tvalues := FileInfos{}\n\n\tif err := deepcopier.Copy(&values).From(m); err != nil {\n\t\treturn err\n\t}\n\n\treturn Db().Model(File{}).Where(\"photo_id = ? AND file_video = 1\", m.PhotoID).Updates(values).Error\n}",
"func (upuo *UnsavedPostUpdateOne) RemoveVideos(u ...*UnsavedPostVideo) *UnsavedPostUpdateOne {\n\tids := make([]int, len(u))\n\tfor i := range u {\n\t\tids[i] = u[i].ID\n\t}\n\treturn upuo.RemoveVideoIDs(ids...)\n}",
"func (o *Vote) UpdateP(exec boil.Executor, whitelist ...string) {\n\terr := o.Update(exec, whitelist...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *UpdateWidgetParams) WithContext(ctx context.Context) *UpdateWidgetParams {\n\to.SetContext(ctx)\n\treturn o\n}",
"func (c *controller) Save(ctx *gin.Context) error {\n\tvar video entity.Video\n\t//binding\n\terr := ctx.ShouldBindJSON(&video)\n\tif err != nil {\n\t\treturn err\n\t}\n\t// custom validation\n\terr = validate.Struct(video)\n\tif err != nil {\n\t\treturn err\n\t}\n\tc.service.Save(video)\n\treturn nil\n\n}",
"func (p *Post) UpdateFromRequest(r *http.Request) {\n\tid := r.FormValue(\"id\")\n\tif bson.IsObjectIdHex(id) {\n\t\tp.Id = bson.ObjectIdHex(id)\n\t}\n\tp.Title = r.FormValue(\"title\")\n\tp.Image = r.FormValue(\"image\")\n\tp.Slug = r.FormValue(\"slug\")\n\tp.Markdown = r.FormValue(\"content\")\n\tp.Html = utils.Markdown2Html(p.Markdown)\n\tp.AllowComment = r.FormValue(\"comment\") == \"on\"\n\tp.Category = r.FormValue(\"category\")\n\tp.IsPublished = r.FormValue(\"status\") == \"on\"\n}"
] |
[
"0.6050984",
"0.5864362",
"0.5631024",
"0.55670154",
"0.54661644",
"0.5307306",
"0.52311844",
"0.52111053",
"0.5197555",
"0.5166555",
"0.51442146",
"0.51271266",
"0.5080909",
"0.49059314",
"0.4845857",
"0.48121595",
"0.4712475",
"0.47096348",
"0.4696673",
"0.46674263",
"0.463986",
"0.4638664",
"0.46212292",
"0.46041983",
"0.46005794",
"0.45716214",
"0.45688057",
"0.45533952",
"0.45359713",
"0.45198816",
"0.44541168",
"0.44292587",
"0.440816",
"0.4404761",
"0.4380251",
"0.43700597",
"0.43480337",
"0.4295237",
"0.4282657",
"0.4215996",
"0.4215026",
"0.42129153",
"0.42075706",
"0.42019972",
"0.41558963",
"0.41413108",
"0.4137078",
"0.41355142",
"0.4133526",
"0.41315112",
"0.4122067",
"0.41212526",
"0.4104837",
"0.41013694",
"0.4088386",
"0.40873754",
"0.4084105",
"0.40819928",
"0.40802968",
"0.40698242",
"0.4065863",
"0.40578175",
"0.40565243",
"0.40515444",
"0.40422115",
"0.40399152",
"0.40388635",
"0.40340903",
"0.4029733",
"0.40275717",
"0.4027152",
"0.40198725",
"0.40165675",
"0.40156686",
"0.40010983",
"0.3996291",
"0.39897826",
"0.3987434",
"0.39859435",
"0.39845562",
"0.39817247",
"0.3977136",
"0.39751592",
"0.39709544",
"0.39554957",
"0.39542225",
"0.3953986",
"0.39501753",
"0.39444646",
"0.39295888",
"0.39234337",
"0.39108652",
"0.39035466",
"0.38974026",
"0.38717264",
"0.38679838",
"0.3853311",
"0.38409624",
"0.38400546",
"0.383035"
] |
0.6968165
|
0
|
UpdateOne returns an update builder for the given entity.
|
func (c *UnsavedPostVideoClient) UpdateOne(upv *UnsavedPostVideo) *UnsavedPostVideoUpdateOne {
mutation := newUnsavedPostVideoMutation(c.config, OpUpdateOne, withUnsavedPostVideo(upv))
return &UnsavedPostVideoUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *BuildingClient) UpdateOne(b *Building) *BuildingUpdateOne {\n\tmutation := newBuildingMutation(c.config, OpUpdateOne, withBuilding(b))\n\treturn &BuildingUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BedtypeClient) UpdateOne(b *Bedtype) *BedtypeUpdateOne {\n\tmutation := newBedtypeMutation(c.config, OpUpdateOne, withBedtype(b))\n\treturn &BedtypeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *EmptyClient) UpdateOne(e *Empty) *EmptyUpdateOne {\n\tmutation := newEmptyMutation(c.config, OpUpdateOne, withEmpty(e))\n\treturn &EmptyUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DentistClient) UpdateOne(d *Dentist) *DentistUpdateOne {\n\tmutation := newDentistMutation(c.config, OpUpdateOne, withDentist(d))\n\treturn &DentistUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BeerClient) UpdateOne(b *Beer) *BeerUpdateOne {\n\tmutation := newBeerMutation(c.config, OpUpdateOne, withBeer(b))\n\treturn &BeerUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BillClient) UpdateOne(b *Bill) *BillUpdateOne {\n\tmutation := newBillMutation(c.config, OpUpdateOne, withBill(b))\n\treturn &BillUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BillClient) UpdateOne(b *Bill) *BillUpdateOne {\n\tmutation := newBillMutation(c.config, OpUpdateOne, withBill(b))\n\treturn &BillUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BillClient) UpdateOne(b *Bill) *BillUpdateOne {\n\tmutation := newBillMutation(c.config, OpUpdateOne, withBill(b))\n\treturn &BillUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *OperationClient) UpdateOne(o *Operation) *OperationUpdateOne {\n\tmutation := newOperationMutation(c.config, OpUpdateOne, withOperation(o))\n\treturn &OperationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostAttachmentClient) UpdateOne(pa *PostAttachment) *PostAttachmentUpdateOne {\n\tmutation := newPostAttachmentMutation(c.config, OpUpdateOne, withPostAttachment(pa))\n\treturn &PostAttachmentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *CleaningroomClient) UpdateOne(cl *Cleaningroom) *CleaningroomUpdateOne {\n\tmutation := newCleaningroomMutation(c.config, OpUpdateOne, withCleaningroom(cl))\n\treturn &CleaningroomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *CompanyClient) UpdateOne(co *Company) *CompanyUpdateOne {\n\tmutation := newCompanyMutation(c.config, OpUpdateOne, withCompany(co))\n\treturn &CompanyUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *CompanyClient) UpdateOne(co *Company) *CompanyUpdateOne {\n\tmutation := newCompanyMutation(c.config, OpUpdateOne, withCompany(co))\n\treturn &CompanyUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *EventClient) UpdateOne(e *Event) *EventUpdateOne {\n\tmutation := newEventMutation(c.config, OpUpdateOne, withEvent(e))\n\treturn &EventUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostClient) UpdateOne(po *Post) *PostUpdateOne {\n\tmutation := newPostMutation(c.config, OpUpdateOne, withPost(po))\n\treturn &PostUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DeviceClient) UpdateOne(d *Device) *DeviceUpdateOne {\n\tmutation := newDeviceMutation(c.config, OpUpdateOne, withDevice(d))\n\treturn &DeviceUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *OperationroomClient) UpdateOne(o *Operationroom) *OperationroomUpdateOne {\n\tmutation := newOperationroomMutation(c.config, OpUpdateOne, withOperationroom(o))\n\treturn &OperationroomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostAttachmentClient) UpdateOne(upa *UnsavedPostAttachment) *UnsavedPostAttachmentUpdateOne {\n\tmutation := newUnsavedPostAttachmentMutation(c.config, OpUpdateOne, withUnsavedPostAttachment(upa))\n\treturn &UnsavedPostAttachmentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DrugAllergyClient) UpdateOne(da *DrugAllergy) *DrugAllergyUpdateOne {\n\tmutation := newDrugAllergyMutation(c.config, OpUpdateOne, withDrugAllergy(da))\n\treturn &DrugAllergyUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *MealplanClient) UpdateOne(m *Mealplan) *MealplanUpdateOne {\n\tmutation := newMealplanMutation(c.config, OpUpdateOne, withMealplan(m))\n\treturn &MealplanUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PhysicianClient) UpdateOne(ph *Physician) *PhysicianUpdateOne {\n\tmutation := newPhysicianMutation(c.config, OpUpdateOne, withPhysician(ph))\n\treturn &PhysicianUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PhysicianClient) UpdateOne(ph *Physician) *PhysicianUpdateOne {\n\tmutation := newPhysicianMutation(c.config, OpUpdateOne, withPhysician(ph))\n\treturn &PhysicianUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RoomdetailClient) UpdateOne(r *Roomdetail) *RoomdetailUpdateOne {\n\tmutation := newRoomdetailMutation(c.config, OpUpdateOne, withRoomdetail(r))\n\treturn &RoomdetailUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *OperativerecordClient) UpdateOne(o *Operativerecord) *OperativerecordUpdateOne {\n\tmutation := newOperativerecordMutation(c.config, OpUpdateOne, withOperativerecord(o))\n\treturn &OperativerecordUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientroomClient) UpdateOne(pa *Patientroom) *PatientroomUpdateOne {\n\tmutation := newPatientroomMutation(c.config, OpUpdateOne, withPatientroom(pa))\n\treturn &PatientroomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *AppointmentClient) UpdateOne(a *Appointment) *AppointmentUpdateOne {\n\tmutation := newAppointmentMutation(c.config, OpUpdateOne, withAppointment(a))\n\treturn &AppointmentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ToolClient) UpdateOne(t *Tool) *ToolUpdateOne {\n\tmutation := newToolMutation(c.config, OpUpdateOne, withTool(t))\n\treturn &ToolUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostClient) UpdateOne(up *UnsavedPost) *UnsavedPostUpdateOne {\n\tmutation := newUnsavedPostMutation(c.config, OpUpdateOne, withUnsavedPost(up))\n\treturn &UnsavedPostUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *WorkExperienceClient) UpdateOne(we *WorkExperience) *WorkExperienceUpdateOne {\n\tmutation := newWorkExperienceMutation(c.config, OpUpdateOne, withWorkExperience(we))\n\treturn &WorkExperienceUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *TransactionClient) UpdateOne(t *Transaction) *TransactionUpdateOne {\n\tmutation := newTransactionMutation(c.config, OpUpdateOne, withTransaction(t))\n\treturn &TransactionUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RoomuseClient) UpdateOne(r *Roomuse) *RoomuseUpdateOne {\n\tmutation := newRoomuseMutation(c.config, OpUpdateOne, withRoomuse(r))\n\treturn &RoomuseUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DispenseMedicineClient) UpdateOne(dm *DispenseMedicine) *DispenseMedicineUpdateOne {\n\tmutation := newDispenseMedicineMutation(c.config, OpUpdateOne, withDispenseMedicine(dm))\n\treturn &DispenseMedicineUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *OrderClient) UpdateOne(o *Order) *OrderUpdateOne {\n\tmutation := newOrderMutation(c.config, OpUpdateOne, withOrder(o))\n\treturn &OrderUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PharmacistClient) UpdateOne(ph *Pharmacist) *PharmacistUpdateOne {\n\tmutation := newPharmacistMutation(c.config, OpUpdateOne, withPharmacist(ph))\n\treturn &PharmacistUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BookingClient) UpdateOne(b *Booking) *BookingUpdateOne {\n\tmutation := newBookingMutation(c.config, OpUpdateOne, withBooking(b))\n\treturn &BookingUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *AdminClient) UpdateOne(a *Admin) *AdminUpdateOne {\n\tmutation := newAdminMutation(c.config, OpUpdateOne, withAdmin(a))\n\treturn &AdminUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *MedicineClient) UpdateOne(m *Medicine) *MedicineUpdateOne {\n\tmutation := newMedicineMutation(c.config, OpUpdateOne, withMedicine(m))\n\treturn &MedicineUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *MedicineTypeClient) UpdateOne(mt *MedicineType) *MedicineTypeUpdateOne {\n\tmutation := newMedicineTypeMutation(c.config, OpUpdateOne, withMedicineType(mt))\n\treturn &MedicineTypeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DoctorClient) UpdateOne(d *Doctor) *DoctorUpdateOne {\n\tmutation := newDoctorMutation(c.config, OpUpdateOne, withDoctor(d))\n\treturn &DoctorUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientofphysicianClient) UpdateOne(pa *Patientofphysician) *PatientofphysicianUpdateOne {\n\tmutation := newPatientofphysicianMutation(c.config, OpUpdateOne, withPatientofphysician(pa))\n\treturn &PatientofphysicianUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ActivityTypeClient) UpdateOne(at *ActivityType) *ActivityTypeUpdateOne {\n\tmutation := newActivityTypeMutation(c.config, OpUpdateOne, withActivityType(at))\n\treturn &ActivityTypeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DNSBLQueryClient) UpdateOne(dq *DNSBLQuery) *DNSBLQueryUpdateOne {\n\tmutation := newDNSBLQueryMutation(c.config, OpUpdateOne, withDNSBLQuery(dq))\n\treturn &DNSBLQueryUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *OperativeClient) UpdateOne(o *Operative) *OperativeUpdateOne {\n\tmutation := newOperativeMutation(c.config, OpUpdateOne, withOperative(o))\n\treturn &OperativeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientClient) UpdateOne(pa *Patient) *PatientUpdateOne {\n\tmutation := newPatientMutation(c.config, OpUpdateOne, withPatient(pa))\n\treturn &PatientUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientClient) UpdateOne(pa *Patient) *PatientUpdateOne {\n\tmutation := newPatientMutation(c.config, OpUpdateOne, withPatient(pa))\n\treturn &PatientUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientClient) UpdateOne(pa *Patient) *PatientUpdateOne {\n\tmutation := newPatientMutation(c.config, OpUpdateOne, withPatient(pa))\n\treturn &PatientUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *FoodmenuClient) UpdateOne(f *Foodmenu) *FoodmenuUpdateOne {\n\tmutation := newFoodmenuMutation(c.config, OpUpdateOne, withFoodmenu(f))\n\treturn &FoodmenuUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *StaytypeClient) UpdateOne(s *Staytype) *StaytypeUpdateOne {\n\tmutation := newStaytypeMutation(c.config, OpUpdateOne, withStaytype(s))\n\treturn &StaytypeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *LevelOfDangerousClient) UpdateOne(lod *LevelOfDangerous) *LevelOfDangerousUpdateOne {\n\tmutation := newLevelOfDangerousMutation(c.config, OpUpdateOne, withLevelOfDangerous(lod))\n\treturn &LevelOfDangerousUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (su *PostUseCase) UpdateOne(id string, request data.Post) error {\n\tpost := &models.Post{ID: id}\n\terr := post.Get()\n\tif err != nil {\n\t\treturn err\n\t}\n\tpost.Post = request\n\terr = post.Update()\n\treturn err\n}",
"func UpdateOne(query interface{}, update interface{}) error {\n\treturn db.Update(Collection, query, update)\n}",
"func (c *PartorderClient) UpdateOne(pa *Partorder) *PartorderUpdateOne {\n\tmutation := newPartorderMutation(c.config, OpUpdateOne, withPartorder(pa))\n\treturn &PartorderUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnitOfMedicineClient) UpdateOne(uom *UnitOfMedicine) *UnitOfMedicineUpdateOne {\n\tmutation := newUnitOfMedicineMutation(c.config, OpUpdateOne, withUnitOfMedicine(uom))\n\treturn &UnitOfMedicineUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PurposeClient) UpdateOne(pu *Purpose) *PurposeUpdateOne {\n\tmutation := newPurposeMutation(c.config, OpUpdateOne, withPurpose(pu))\n\treturn &PurposeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ExaminationroomClient) UpdateOne(e *Examinationroom) *ExaminationroomUpdateOne {\n\tmutation := newExaminationroomMutation(c.config, OpUpdateOne, withExaminationroom(e))\n\treturn &ExaminationroomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PaymentClient) UpdateOne(pa *Payment) *PaymentUpdateOne {\n\tmutation := newPaymentMutation(c.config, OpUpdateOne, withPayment(pa))\n\treturn &PaymentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PaymentClient) UpdateOne(pa *Payment) *PaymentUpdateOne {\n\tmutation := newPaymentMutation(c.config, OpUpdateOne, withPayment(pa))\n\treturn &PaymentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *StatustClient) UpdateOne(s *Statust) *StatustUpdateOne {\n\tmutation := newStatustMutation(c.config, OpUpdateOne, withStatust(s))\n\treturn &StatustUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne {\n\tmutation := newTagMutation(c.config, OpUpdateOne, withTag(t))\n\treturn &TagUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RepairinvoiceClient) UpdateOne(r *Repairinvoice) *RepairinvoiceUpdateOne {\n\tmutation := newRepairinvoiceMutation(c.config, OpUpdateOne, withRepairinvoice(r))\n\treturn &RepairinvoiceUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DepositClient) UpdateOne(d *Deposit) *DepositUpdateOne {\n\tmutation := newDepositMutation(c.config, OpUpdateOne, withDeposit(d))\n\treturn &DepositUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *EmployeeClient) UpdateOne(e *Employee) *EmployeeUpdateOne {\n\tmutation := newEmployeeMutation(c.config, OpUpdateOne, withEmployee(e))\n\treturn &EmployeeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *EmployeeClient) UpdateOne(e *Employee) *EmployeeUpdateOne {\n\tmutation := newEmployeeMutation(c.config, OpUpdateOne, withEmployee(e))\n\treturn &EmployeeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *EmployeeClient) UpdateOne(e *Employee) *EmployeeUpdateOne {\n\tmutation := newEmployeeMutation(c.config, OpUpdateOne, withEmployee(e))\n\treturn &EmployeeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RoomClient) UpdateOne(r *Room) *RoomUpdateOne {\n\tmutation := newRoomMutation(c.config, OpUpdateOne, withRoom(r))\n\treturn &RoomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RoomClient) UpdateOne(r *Room) *RoomUpdateOne {\n\tmutation := newRoomMutation(c.config, OpUpdateOne, withRoom(r))\n\treturn &RoomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BillingstatusClient) UpdateOne(b *Billingstatus) *BillingstatusUpdateOne {\n\tmutation := newBillingstatusMutation(c.config, OpUpdateOne, withBillingstatus(b))\n\treturn &BillingstatusUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *EatinghistoryClient) UpdateOne(e *Eatinghistory) *EatinghistoryUpdateOne {\n\tmutation := newEatinghistoryMutation(c.config, OpUpdateOne, withEatinghistory(e))\n\treturn &EatinghistoryUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *StatusdClient) UpdateOne(s *Statusd) *StatusdUpdateOne {\n\tmutation := newStatusdMutation(c.config, OpUpdateOne, withStatusd(s))\n\treturn &StatusdUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (b *Bill) Update() *BillUpdateOne {\n\treturn (&BillClient{config: b.config}).UpdateOne(b)\n}",
"func (c *AnnotationClient) UpdateOne(a *Annotation) *AnnotationUpdateOne {\n\tmutation := newAnnotationMutation(c.config, OpUpdateOne, withAnnotation(a))\n\treturn &AnnotationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func UpdateOne(ctx context.Context, tx pgx.Tx, sb sq.UpdateBuilder) error {\n\tq, vs, err := sb.ToSql()\n\tif err != nil {\n\t\treturn err\n\t}\n\ttag, err := tx.Exec(ctx, q, vs...)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif tag.RowsAffected() != 1 {\n\t\treturn ErrNoRowsAffected\n\t}\n\treturn nil\n}",
"func (c *CleanernameClient) UpdateOne(cl *Cleanername) *CleanernameUpdateOne {\n\tmutation := newCleanernameMutation(c.config, OpUpdateOne, withCleanername(cl))\n\treturn &CleanernameUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *LeaseClient) UpdateOne(l *Lease) *LeaseUpdateOne {\n\tmutation := newLeaseMutation(c.config, OpUpdateOne, withLease(l))\n\treturn &LeaseUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BinaryFileClient) UpdateOne(bf *BinaryFile) *BinaryFileUpdateOne {\n\tmutation := newBinaryFileMutation(c.config, OpUpdateOne, withBinaryFile(bf))\n\treturn &BinaryFileUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *JobClient) UpdateOne(j *Job) *JobUpdateOne {\n\tmutation := newJobMutation(c.config, OpUpdateOne, withJob(j))\n\treturn &JobUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ActivitiesClient) UpdateOne(a *Activities) *ActivitiesUpdateOne {\n\tmutation := newActivitiesMutation(c.config, OpUpdateOne, withActivities(a))\n\treturn &ActivitiesUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostImageClient) UpdateOne(upi *UnsavedPostImage) *UnsavedPostImageUpdateOne {\n\tmutation := newUnsavedPostImageMutation(c.config, OpUpdateOne, withUnsavedPostImage(upi))\n\treturn &UnsavedPostImageUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ClubapplicationClient) UpdateOne(cl *Clubapplication) *ClubapplicationUpdateOne {\n\tmutation := newClubapplicationMutation(c.config, OpUpdateOne, withClubapplication(cl))\n\treturn &ClubapplicationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *SkillClient) UpdateOne(s *Skill) *SkillUpdateOne {\n\tmutation := newSkillMutation(c.config, OpUpdateOne, withSkill(s))\n\treturn &SkillUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RentalstatusClient) UpdateOne(r *Rentalstatus) *RentalstatusUpdateOne {\n\tmutation := newRentalstatusMutation(c.config, OpUpdateOne, withRentalstatus(r))\n\treturn &RentalstatusUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UsertypeClient) UpdateOne(u *Usertype) *UsertypeUpdateOne {\n\tmutation := newUsertypeMutation(c.config, OpUpdateOne, withUsertype(u))\n\treturn &UsertypeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *TasteClient) UpdateOne(t *Taste) *TasteUpdateOne {\n\tmutation := newTasteMutation(c.config, OpUpdateOne, withTaste(t))\n\treturn &TasteUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PositionassingmentClient) UpdateOne(po *Positionassingment) *PositionassingmentUpdateOne {\n\tmutation := newPositionassingmentMutation(c.config, OpUpdateOne, withPositionassingment(po))\n\treturn &PositionassingmentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *SymptomClient) UpdateOne(s *Symptom) *SymptomUpdateOne {\n\tmutation := newSymptomMutation(c.config, OpUpdateOne, withSymptom(s))\n\treturn &SymptomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PartClient) UpdateOne(pa *Part) *PartUpdateOne {\n\tmutation := newPartMutation(c.config, OpUpdateOne, withPart(pa))\n\treturn &PartUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func NewUpdateOneModel() *UpdateOneModel {\n\treturn &UpdateOneModel{}\n}",
"func (c *DepartmentClient) UpdateOne(d *Department) *DepartmentUpdateOne {\n\tmutation := newDepartmentMutation(c.config, OpUpdateOne, withDepartment(d))\n\treturn &DepartmentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *SituationClient) UpdateOne(s *Situation) *SituationUpdateOne {\n\tmutation := newSituationMutation(c.config, OpUpdateOne, withSituation(s))\n\treturn &SituationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ComplaintClient) UpdateOne(co *Complaint) *ComplaintUpdateOne {\n\tmutation := newComplaintMutation(c.config, OpUpdateOne, withComplaint(co))\n\treturn &ComplaintUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (t *Todo) Update() *TodoUpdateOne {\n\treturn (&TodoClient{t.config}).UpdateOne(t)\n}",
"func (c *QueueClient) UpdateOne(q *Queue) *QueueUpdateOne {\n\tmutation := newQueueMutation(c.config, OpUpdateOne, withQueue(q))\n\treturn &QueueUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserWalletClient) UpdateOne(uw *UserWallet) *UserWalletUpdateOne {\n\tmutation := newUserWalletMutation(c.config, OpUpdateOne, withUserWallet(uw))\n\treturn &UserWalletUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BranchClient) UpdateOne(b *Branch) *BranchUpdateOne {\n\tmutation := newBranchMutation(c.config, OpUpdateOne, withBranch(b))\n\treturn &BranchUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ReturninvoiceClient) UpdateOne(r *Returninvoice) *ReturninvoiceUpdateOne {\n\tmutation := newReturninvoiceMutation(c.config, OpUpdateOne, withReturninvoice(r))\n\treturn &ReturninvoiceUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientInfoClient) UpdateOne(pi *PatientInfo) *PatientInfoUpdateOne {\n\tmutation := newPatientInfoMutation(c.config, OpUpdateOne, withPatientInfo(pi))\n\treturn &PatientInfoUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOne(u *User) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUser(u))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOne(u *User) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUser(u))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOne(u *User) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUser(u))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOne(u *User) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUser(u))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOne(u *User) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUser(u))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}"
] |
[
"0.69773513",
"0.6700239",
"0.66991323",
"0.66772205",
"0.66711056",
"0.65891296",
"0.65891296",
"0.65891296",
"0.6529943",
"0.651992",
"0.6517249",
"0.6488436",
"0.6488436",
"0.6461467",
"0.64580745",
"0.6444564",
"0.6440813",
"0.64263475",
"0.6407116",
"0.64044094",
"0.6402244",
"0.6402244",
"0.6401924",
"0.63997734",
"0.63976485",
"0.63883317",
"0.63816136",
"0.6380565",
"0.6370969",
"0.63709646",
"0.6364213",
"0.6363832",
"0.6348345",
"0.6335132",
"0.6330745",
"0.63263464",
"0.6325927",
"0.63202494",
"0.631989",
"0.6319132",
"0.6316663",
"0.6287886",
"0.6282346",
"0.62710464",
"0.62710464",
"0.62710464",
"0.6258297",
"0.62548864",
"0.6243332",
"0.6216176",
"0.62148726",
"0.6214705",
"0.6211075",
"0.62070787",
"0.6187787",
"0.6186292",
"0.6186292",
"0.618427",
"0.61778814",
"0.6174648",
"0.61743003",
"0.61704266",
"0.61704266",
"0.61704266",
"0.6158959",
"0.6158959",
"0.6158523",
"0.615801",
"0.61553144",
"0.6135769",
"0.6133886",
"0.6126848",
"0.610412",
"0.6084781",
"0.6083719",
"0.607597",
"0.60747206",
"0.6073408",
"0.60694623",
"0.6044985",
"0.6041846",
"0.6037389",
"0.60345656",
"0.6029807",
"0.60198456",
"0.6018794",
"0.60022384",
"0.59993756",
"0.59894186",
"0.59838474",
"0.5975079",
"0.59639263",
"0.59572136",
"0.5950218",
"0.5949224",
"0.5938023",
"0.5934483",
"0.5934483",
"0.5934483",
"0.5934483",
"0.5934483"
] |
0.0
|
-1
|
UpdateOneID returns an update builder for the given id.
|
func (c *UnsavedPostVideoClient) UpdateOneID(id int) *UnsavedPostVideoUpdateOne {
mutation := newUnsavedPostVideoMutation(c.config, OpUpdateOne, withUnsavedPostVideoID(id))
return &UnsavedPostVideoUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *BuildingClient) UpdateOneID(id int) *BuildingUpdateOne {\n\tmutation := newBuildingMutation(c.config, OpUpdateOne, withBuildingID(id))\n\treturn &BuildingUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BedtypeClient) UpdateOneID(id int) *BedtypeUpdateOne {\n\tmutation := newBedtypeMutation(c.config, OpUpdateOne, withBedtypeID(id))\n\treturn &BedtypeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ModuleClient) UpdateOneID(id int) *ModuleUpdateOne {\n\treturn &ModuleUpdateOne{config: c.config, id: id}\n}",
"func (c *ModuleVersionClient) UpdateOneID(id int) *ModuleVersionUpdateOne {\n\treturn &ModuleVersionUpdateOne{config: c.config, id: id}\n}",
"func (c *BillClient) UpdateOneID(id int) *BillUpdateOne {\n\tmutation := newBillMutation(c.config, OpUpdateOne, withBillID(id))\n\treturn &BillUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BillClient) UpdateOneID(id int) *BillUpdateOne {\n\tmutation := newBillMutation(c.config, OpUpdateOne, withBillID(id))\n\treturn &BillUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BillClient) UpdateOneID(id int) *BillUpdateOne {\n\tmutation := newBillMutation(c.config, OpUpdateOne, withBillID(id))\n\treturn &BillUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *MealplanClient) UpdateOneID(id int) *MealplanUpdateOne {\n\tmutation := newMealplanMutation(c.config, OpUpdateOne, withMealplanID(id))\n\treturn &MealplanUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BeerClient) UpdateOneID(id int) *BeerUpdateOne {\n\tmutation := newBeerMutation(c.config, OpUpdateOne, withBeerID(id))\n\treturn &BeerUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RoomuseClient) UpdateOneID(id int) *RoomuseUpdateOne {\n\tmutation := newRoomuseMutation(c.config, OpUpdateOne, withRoomuseID(id))\n\treturn &RoomuseUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BookingClient) UpdateOneID(id int) *BookingUpdateOne {\n\tmutation := newBookingMutation(c.config, OpUpdateOne, withBookingID(id))\n\treturn &BookingUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *CleaningroomClient) UpdateOneID(id int) *CleaningroomUpdateOne {\n\tmutation := newCleaningroomMutation(c.config, OpUpdateOne, withCleaningroomID(id))\n\treturn &CleaningroomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *LengthtimeClient) UpdateOneID(id int) *LengthtimeUpdateOne {\n\tmutation := newLengthtimeMutation(c.config, OpUpdateOne, withLengthtimeID(id))\n\treturn &LengthtimeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ToolClient) UpdateOneID(id int) *ToolUpdateOne {\n\tmutation := newToolMutation(c.config, OpUpdateOne, withToolID(id))\n\treturn &ToolUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *StatustClient) UpdateOneID(id int) *StatustUpdateOne {\n\tmutation := newStatustMutation(c.config, OpUpdateOne, withStatustID(id))\n\treturn &StatustUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DrugAllergyClient) UpdateOneID(id int) *DrugAllergyUpdateOne {\n\tmutation := newDrugAllergyMutation(c.config, OpUpdateOne, withDrugAllergyID(id))\n\treturn &DrugAllergyUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ClubapplicationClient) UpdateOneID(id int) *ClubapplicationUpdateOne {\n\tmutation := newClubapplicationMutation(c.config, OpUpdateOne, withClubapplicationID(id))\n\treturn &ClubapplicationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *AppointmentClient) UpdateOneID(id uuid.UUID) *AppointmentUpdateOne {\n\tmutation := newAppointmentMutation(c.config, OpUpdateOne, withAppointmentID(id))\n\treturn &AppointmentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *EmptyClient) UpdateOneID(id int) *EmptyUpdateOne {\n\tmutation := newEmptyMutation(c.config, OpUpdateOne, withEmptyID(id))\n\treturn &EmptyUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *AdminClient) UpdateOneID(id int) *AdminUpdateOne {\n\tmutation := newAdminMutation(c.config, OpUpdateOne, withAdminID(id))\n\treturn &AdminUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *OperationroomClient) UpdateOneID(id int) *OperationroomUpdateOne {\n\tmutation := newOperationroomMutation(c.config, OpUpdateOne, withOperationroomID(id))\n\treturn &OperationroomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BinaryFileClient) UpdateOneID(id int) *BinaryFileUpdateOne {\n\tmutation := newBinaryFileMutation(c.config, OpUpdateOne, withBinaryFileID(id))\n\treturn &BinaryFileUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PhysicianClient) UpdateOneID(id int) *PhysicianUpdateOne {\n\tmutation := newPhysicianMutation(c.config, OpUpdateOne, withPhysicianID(id))\n\treturn &PhysicianUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PhysicianClient) UpdateOneID(id int) *PhysicianUpdateOne {\n\tmutation := newPhysicianMutation(c.config, OpUpdateOne, withPhysicianID(id))\n\treturn &PhysicianUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RoomdetailClient) UpdateOneID(id int) *RoomdetailUpdateOne {\n\tmutation := newRoomdetailMutation(c.config, OpUpdateOne, withRoomdetailID(id))\n\treturn &RoomdetailUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *OperativeClient) UpdateOneID(id int) *OperativeUpdateOne {\n\tmutation := newOperativeMutation(c.config, OpUpdateOne, withOperativeID(id))\n\treturn &OperativeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DoctorClient) UpdateOneID(id int) *DoctorUpdateOne {\n\tmutation := newDoctorMutation(c.config, OpUpdateOne, withDoctorID(id))\n\treturn &DoctorUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DentistClient) UpdateOneID(id int) *DentistUpdateOne {\n\tmutation := newDentistMutation(c.config, OpUpdateOne, withDentistID(id))\n\treturn &DentistUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnitOfMedicineClient) UpdateOneID(id int) *UnitOfMedicineUpdateOne {\n\tmutation := newUnitOfMedicineMutation(c.config, OpUpdateOne, withUnitOfMedicineID(id))\n\treturn &UnitOfMedicineUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *LeaseClient) UpdateOneID(id int) *LeaseUpdateOne {\n\tmutation := newLeaseMutation(c.config, OpUpdateOne, withLeaseID(id))\n\treturn &LeaseUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RoomClient) UpdateOneID(id int) *RoomUpdateOne {\n\tmutation := newRoomMutation(c.config, OpUpdateOne, withRoomID(id))\n\treturn &RoomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RoomClient) UpdateOneID(id int) *RoomUpdateOne {\n\tmutation := newRoomMutation(c.config, OpUpdateOne, withRoomID(id))\n\treturn &RoomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientroomClient) UpdateOneID(id int) *PatientroomUpdateOne {\n\tmutation := newPatientroomMutation(c.config, OpUpdateOne, withPatientroomID(id))\n\treturn &PatientroomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *JobClient) UpdateOneID(id int) *JobUpdateOne {\n\tmutation := newJobMutation(c.config, OpUpdateOne, withJobID(id))\n\treturn &JobUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *StatusdClient) UpdateOneID(id int) *StatusdUpdateOne {\n\tmutation := newStatusdMutation(c.config, OpUpdateOne, withStatusdID(id))\n\treturn &StatusdUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *MedicineClient) UpdateOneID(id int) *MedicineUpdateOne {\n\tmutation := newMedicineMutation(c.config, OpUpdateOne, withMedicineID(id))\n\treturn &MedicineUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BuildingClient) UpdateOne(b *Building) *BuildingUpdateOne {\n\tmutation := newBuildingMutation(c.config, OpUpdateOne, withBuilding(b))\n\treturn &BuildingUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *CleanernameClient) UpdateOneID(id int) *CleanernameUpdateOne {\n\tmutation := newCleanernameMutation(c.config, OpUpdateOne, withCleanernameID(id))\n\treturn &CleanernameUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DeviceClient) UpdateOneID(id int) *DeviceUpdateOne {\n\tmutation := newDeviceMutation(c.config, OpUpdateOne, withDeviceID(id))\n\treturn &DeviceUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BillingstatusClient) UpdateOneID(id int) *BillingstatusUpdateOne {\n\tmutation := newBillingstatusMutation(c.config, OpUpdateOne, withBillingstatusID(id))\n\treturn &BillingstatusUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PaymentClient) UpdateOneID(id int) *PaymentUpdateOne {\n\tmutation := newPaymentMutation(c.config, OpUpdateOne, withPaymentID(id))\n\treturn &PaymentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PaymentClient) UpdateOneID(id int) *PaymentUpdateOne {\n\tmutation := newPaymentMutation(c.config, OpUpdateOne, withPaymentID(id))\n\treturn &PaymentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *LevelOfDangerousClient) UpdateOneID(id int) *LevelOfDangerousUpdateOne {\n\tmutation := newLevelOfDangerousMutation(c.config, OpUpdateOne, withLevelOfDangerousID(id))\n\treturn &LevelOfDangerousUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *FoodmenuClient) UpdateOneID(id int) *FoodmenuUpdateOne {\n\tmutation := newFoodmenuMutation(c.config, OpUpdateOne, withFoodmenuID(id))\n\treturn &FoodmenuUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostClient) UpdateOneID(id int) *PostUpdateOne {\n\tmutation := newPostMutation(c.config, OpUpdateOne, withPostID(id))\n\treturn &PostUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PharmacistClient) UpdateOneID(id int) *PharmacistUpdateOne {\n\tmutation := newPharmacistMutation(c.config, OpUpdateOne, withPharmacistID(id))\n\treturn &PharmacistUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ExaminationroomClient) UpdateOneID(id int) *ExaminationroomUpdateOne {\n\tmutation := newExaminationroomMutation(c.config, OpUpdateOne, withExaminationroomID(id))\n\treturn &ExaminationroomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *KeyStoreClient) UpdateOneID(id int32) *KeyStoreUpdateOne {\n\tmutation := newKeyStoreMutation(c.config, OpUpdateOne, withKeyStoreID(id))\n\treturn &KeyStoreUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ActivitiesClient) UpdateOneID(id int) *ActivitiesUpdateOne {\n\tmutation := newActivitiesMutation(c.config, OpUpdateOne, withActivitiesID(id))\n\treturn &ActivitiesUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientofphysicianClient) UpdateOneID(id int) *PatientofphysicianUpdateOne {\n\tmutation := newPatientofphysicianMutation(c.config, OpUpdateOne, withPatientofphysicianID(id))\n\treturn &PatientofphysicianUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostAttachmentClient) UpdateOneID(id int) *PostAttachmentUpdateOne {\n\tmutation := newPostAttachmentMutation(c.config, OpUpdateOne, withPostAttachmentID(id))\n\treturn &PostAttachmentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *SkillClient) UpdateOneID(id int) *SkillUpdateOne {\n\tmutation := newSkillMutation(c.config, OpUpdateOne, withSkillID(id))\n\treturn &SkillUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *QueueClient) UpdateOneID(id int) *QueueUpdateOne {\n\tmutation := newQueueMutation(c.config, OpUpdateOne, withQueueID(id))\n\treturn &QueueUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *EventClient) UpdateOneID(id int) *EventUpdateOne {\n\tmutation := newEventMutation(c.config, OpUpdateOne, withEventID(id))\n\treturn &EventUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DNSBLQueryClient) UpdateOneID(id uuid.UUID) *DNSBLQueryUpdateOne {\n\tmutation := newDNSBLQueryMutation(c.config, OpUpdateOne, withDNSBLQueryID(id))\n\treturn &DNSBLQueryUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *SymptomClient) UpdateOneID(id int) *SymptomUpdateOne {\n\tmutation := newSymptomMutation(c.config, OpUpdateOne, withSymptomID(id))\n\treturn &SymptomUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientClient) UpdateOneID(id int) *PatientUpdateOne {\n\tmutation := newPatientMutation(c.config, OpUpdateOne, withPatientID(id))\n\treturn &PatientUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientClient) UpdateOneID(id int) *PatientUpdateOne {\n\tmutation := newPatientMutation(c.config, OpUpdateOne, withPatientID(id))\n\treturn &PatientUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientClient) UpdateOneID(id int) *PatientUpdateOne {\n\tmutation := newPatientMutation(c.config, OpUpdateOne, withPatientID(id))\n\treturn &PatientUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *NurseClient) UpdateOneID(id int) *NurseUpdateOne {\n\tmutation := newNurseMutation(c.config, OpUpdateOne, withNurseID(id))\n\treturn &NurseUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PurposeClient) UpdateOneID(id int) *PurposeUpdateOne {\n\tmutation := newPurposeMutation(c.config, OpUpdateOne, withPurposeID(id))\n\treturn &PurposeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *OrderClient) UpdateOneID(id int) *OrderUpdateOne {\n\tmutation := newOrderMutation(c.config, OpUpdateOne, withOrderID(id))\n\treturn &OrderUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DepositClient) UpdateOneID(id int) *DepositUpdateOne {\n\tmutation := newDepositMutation(c.config, OpUpdateOne, withDepositID(id))\n\treturn &DepositUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *DispenseMedicineClient) UpdateOneID(id int) *DispenseMedicineUpdateOne {\n\tmutation := newDispenseMedicineMutation(c.config, OpUpdateOne, withDispenseMedicineID(id))\n\treturn &DispenseMedicineUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PartorderClient) UpdateOneID(id int) *PartorderUpdateOne {\n\tmutation := newPartorderMutation(c.config, OpUpdateOne, withPartorderID(id))\n\treturn &PartorderUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PlanetClient) UpdateOneID(id int) *PlanetUpdateOne {\n\tmutation := newPlanetMutation(c.config, OpUpdateOne)\n\tmutation.id = &id\n\treturn &PlanetUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *StaytypeClient) UpdateOneID(id int) *StaytypeUpdateOne {\n\tmutation := newStaytypeMutation(c.config, OpUpdateOne, withStaytypeID(id))\n\treturn &StaytypeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UsertypeClient) UpdateOneID(id int) *UsertypeUpdateOne {\n\tmutation := newUsertypeMutation(c.config, OpUpdateOne, withUsertypeID(id))\n\treturn &UsertypeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RentalstatusClient) UpdateOneID(id int) *RentalstatusUpdateOne {\n\tmutation := newRentalstatusMutation(c.config, OpUpdateOne, withRentalstatusID(id))\n\treturn &RentalstatusUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PetruleClient) UpdateOneID(id int) *PetruleUpdateOne {\n\tmutation := newPetruleMutation(c.config, OpUpdateOne, withPetruleID(id))\n\treturn &PetruleUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ActivityTypeClient) UpdateOneID(id int) *ActivityTypeUpdateOne {\n\tmutation := newActivityTypeMutation(c.config, OpUpdateOne, withActivityTypeID(id))\n\treturn &ActivityTypeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *WorkExperienceClient) UpdateOneID(id int) *WorkExperienceUpdateOne {\n\tmutation := newWorkExperienceMutation(c.config, OpUpdateOne, withWorkExperienceID(id))\n\treturn &WorkExperienceUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *TasteClient) UpdateOneID(id int) *TasteUpdateOne {\n\tmutation := newTasteMutation(c.config, OpUpdateOne, withTasteID(id))\n\treturn &TasteUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *OperativerecordClient) UpdateOneID(id int) *OperativerecordUpdateOne {\n\tmutation := newOperativerecordMutation(c.config, OpUpdateOne, withOperativerecordID(id))\n\treturn &OperativerecordUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *OperationClient) UpdateOneID(id uuid.UUID) *OperationUpdateOne {\n\tmutation := newOperationMutation(c.config, OpUpdateOne, withOperationID(id))\n\treturn &OperationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOneID(id int) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUserID(id))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOneID(id int) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUserID(id))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOneID(id int) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUserID(id))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOneID(id int) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUserID(id))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOneID(id int) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUserID(id))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOneID(id int) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUserID(id))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOneID(id int) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUserID(id))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *FacultyClient) UpdateOneID(id int) *FacultyUpdateOne {\n\tmutation := newFacultyMutation(c.config, OpUpdateOne, withFacultyID(id))\n\treturn &FacultyUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *MedicineTypeClient) UpdateOneID(id int) *MedicineTypeUpdateOne {\n\tmutation := newMedicineTypeMutation(c.config, OpUpdateOne, withMedicineTypeID(id))\n\treturn &MedicineTypeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *AdminSessionClient) UpdateOneID(id int) *AdminSessionUpdateOne {\n\tmutation := newAdminSessionMutation(c.config, OpUpdateOne, withAdminSessionID(id))\n\treturn &AdminSessionUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *TransactionClient) UpdateOneID(id int32) *TransactionUpdateOne {\n\tmutation := newTransactionMutation(c.config, OpUpdateOne, withTransactionID(id))\n\treturn &TransactionUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostAttachmentClient) UpdateOneID(id int) *UnsavedPostAttachmentUpdateOne {\n\tmutation := newUnsavedPostAttachmentMutation(c.config, OpUpdateOne, withUnsavedPostAttachmentID(id))\n\treturn &UnsavedPostAttachmentUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *EatinghistoryClient) UpdateOneID(id int) *EatinghistoryUpdateOne {\n\tmutation := newEatinghistoryMutation(c.config, OpUpdateOne, withEatinghistoryID(id))\n\treturn &EatinghistoryUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostClient) UpdateOneID(id int) *UnsavedPostUpdateOne {\n\tmutation := newUnsavedPostMutation(c.config, OpUpdateOne, withUnsavedPostID(id))\n\treturn &UnsavedPostUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserWalletClient) UpdateOneID(id int64) *UserWalletUpdateOne {\n\tmutation := newUserWalletMutation(c.config, OpUpdateOne, withUserWalletID(id))\n\treturn &UserWalletUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *RepairinvoiceClient) UpdateOneID(id int) *RepairinvoiceUpdateOne {\n\tmutation := newRepairinvoiceMutation(c.config, OpUpdateOne, withRepairinvoiceID(id))\n\treturn &RepairinvoiceUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ClubappStatusClient) UpdateOneID(id int) *ClubappStatusUpdateOne {\n\tmutation := newClubappStatusMutation(c.config, OpUpdateOne, withClubappStatusID(id))\n\treturn &ClubappStatusUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UserClient) UpdateOneID(id int64) *UserUpdateOne {\n\tmutation := newUserMutation(c.config, OpUpdateOne, withUserID(id))\n\treturn &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PledgeClient) UpdateOneID(id int) *PledgeUpdateOne {\n\tmutation := newPledgeMutation(c.config, OpUpdateOne, withPledgeID(id))\n\treturn &PledgeUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *AnnotationClient) UpdateOneID(id int) *AnnotationUpdateOne {\n\tmutation := newAnnotationMutation(c.config, OpUpdateOne, withAnnotationID(id))\n\treturn &AnnotationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ComplaintClient) UpdateOneID(id int) *ComplaintUpdateOne {\n\tmutation := newComplaintMutation(c.config, OpUpdateOne, withComplaintID(id))\n\treturn &ComplaintUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PatientInfoClient) UpdateOneID(id int) *PatientInfoUpdateOne {\n\tmutation := newPatientInfoMutation(c.config, OpUpdateOne, withPatientInfoID(id))\n\treturn &PatientInfoUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BillClient) UpdateOne(b *Bill) *BillUpdateOne {\n\tmutation := newBillMutation(c.config, OpUpdateOne, withBill(b))\n\treturn &BillUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BillClient) UpdateOne(b *Bill) *BillUpdateOne {\n\tmutation := newBillMutation(c.config, OpUpdateOne, withBill(b))\n\treturn &BillUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BillClient) UpdateOne(b *Bill) *BillUpdateOne {\n\tmutation := newBillMutation(c.config, OpUpdateOne, withBill(b))\n\treturn &BillUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *BranchClient) UpdateOneID(id int) *BranchUpdateOne {\n\tmutation := newBranchMutation(c.config, OpUpdateOne, withBranchID(id))\n\treturn &BranchUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}"
] |
[
"0.71615124",
"0.70216423",
"0.7010951",
"0.6987627",
"0.69720626",
"0.69720626",
"0.69720626",
"0.6954614",
"0.689346",
"0.68728864",
"0.6870293",
"0.6866837",
"0.6832452",
"0.6766731",
"0.6758887",
"0.6757431",
"0.6731577",
"0.67303044",
"0.6728446",
"0.6724985",
"0.67239785",
"0.67209023",
"0.6718119",
"0.6718119",
"0.67104286",
"0.67062783",
"0.6697794",
"0.66902477",
"0.6682167",
"0.66768026",
"0.6674605",
"0.6674605",
"0.66745573",
"0.66642433",
"0.66625804",
"0.6657183",
"0.6656204",
"0.66550183",
"0.66548914",
"0.66531366",
"0.66450125",
"0.66450125",
"0.6636786",
"0.66309714",
"0.66269386",
"0.6623951",
"0.66233176",
"0.66004527",
"0.6579094",
"0.6575504",
"0.65677005",
"0.65592045",
"0.65578675",
"0.65515816",
"0.65495205",
"0.6520618",
"0.65140945",
"0.65140945",
"0.65140945",
"0.65092254",
"0.65040284",
"0.64891744",
"0.6477931",
"0.64730316",
"0.64712715",
"0.6469642",
"0.646921",
"0.6461148",
"0.645715",
"0.64520925",
"0.64469784",
"0.6446611",
"0.6440331",
"0.64351696",
"0.642902",
"0.64275914",
"0.64275914",
"0.64275914",
"0.64275914",
"0.64275914",
"0.64275914",
"0.64275914",
"0.6426236",
"0.642493",
"0.6423679",
"0.6423476",
"0.6420463",
"0.6419567",
"0.6415439",
"0.64131147",
"0.6409662",
"0.6407158",
"0.64018244",
"0.63964146",
"0.63946825",
"0.6385547",
"0.63830286",
"0.6376113",
"0.6376113",
"0.6376113",
"0.6372358"
] |
0.0
|
-1
|
Delete returns a delete builder for UnsavedPostVideo.
|
func (c *UnsavedPostVideoClient) Delete() *UnsavedPostVideoDelete {
mutation := newUnsavedPostVideoMutation(c.config, OpDelete)
return &UnsavedPostVideoDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *PostVideoClient) Delete() *PostVideoDelete {\n\tmutation := newPostVideoMutation(c.config, OpDelete)\n\treturn &PostVideoDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostClient) Delete() *UnsavedPostDelete {\n\tmutation := newUnsavedPostMutation(c.config, OpDelete)\n\treturn &UnsavedPostDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostAttachmentClient) Delete() *UnsavedPostAttachmentDelete {\n\tmutation := newUnsavedPostAttachmentMutation(c.config, OpDelete)\n\treturn &UnsavedPostAttachmentDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (video *FakeVideo) DeleteVideo() (err error) {\n\n\terr = nil\n\n\treturn\n}",
"func (o *DMessageEmbed) Delete(exec boil.Executor) error {\n\tif o == nil {\n\t\treturn errors.New(\"models: no DMessageEmbed provided for delete\")\n\t}\n\n\targs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), dMessageEmbedPrimaryKeyMapping)\n\tsql := \"DELETE FROM \\\"d_message_embeds\\\" WHERE \\\"id\\\"=$1\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, sql)\n\t\tfmt.Fprintln(boil.DebugWriter, args...)\n\t}\n\n\t_, err := exec.Exec(sql, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"models: unable to delete from d_message_embeds\")\n\t}\n\n\treturn nil\n}",
"func NewUnsavedPostVideoClient(c config) *UnsavedPostVideoClient {\n\treturn &UnsavedPostVideoClient{config: c}\n}",
"func (c *MediaClient) Delete() *MediaDelete {\n\tmutation := newMediaMutation(c.config, OpDelete)\n\treturn &MediaDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostClient) Delete() *PostDelete {\n\tmutation := newPostMutation(c.config, OpDelete)\n\treturn &PostDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostAttachmentClient) Delete() *PostAttachmentDelete {\n\tmutation := newPostAttachmentMutation(c.config, OpDelete)\n\treturn &PostAttachmentDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upu *UnsavedPostUpdate) ClearVideos() *UnsavedPostUpdate {\n\tupu.mutation.ClearVideos()\n\treturn upu\n}",
"func (c *UnsavedPostVideoClient) Get(ctx context.Context, id int) (*UnsavedPostVideo, error) {\n\treturn c.Query().Where(unsavedpostvideo.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostImageClient) Delete() *UnsavedPostImageDelete {\n\tmutation := newUnsavedPostImageMutation(c.config, OpDelete)\n\treturn &UnsavedPostImageDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostThumbnailClient) Delete() *UnsavedPostThumbnailDelete {\n\tmutation := newUnsavedPostThumbnailMutation(c.config, OpDelete)\n\treturn &UnsavedPostThumbnailDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (b *GroupsSetLongPollSettingsBuilder) VideoCommentDelete(v bool) *GroupsSetLongPollSettingsBuilder {\n\tb.Params[\"video_comment_delete\"] = v\n\treturn b\n}",
"func (dsl *PutDSL) Delete() linux.DeleteDSL {\n\treturn &DeleteDSL{dsl.parent, dsl.vppPut.Delete()}\n}",
"func (dsl *PutDSL) Delete() linux.DeleteDSL {\n\treturn &DeleteDSL{dsl.parent, dsl.vppPut.Delete()}\n}",
"func (upuo *UnsavedPostUpdateOne) ClearVideos() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearVideos()\n\treturn upuo\n}",
"func (b *GroupsSetCallbackSettingsBuilder) VideoCommentDelete(v bool) *GroupsSetCallbackSettingsBuilder {\n\tb.Params[\"video_comment_delete\"] = v\n\treturn b\n}",
"func (c *UnsavedPostVideoClient) DeleteOne(upv *UnsavedPostVideo) *UnsavedPostVideoDeleteOne {\n\treturn c.DeleteOneID(upv.ID)\n}",
"func (c *UnsavedPostVideoClient) Create() *UnsavedPostVideoCreate {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpCreate)\n\treturn &UnsavedPostVideoCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func Delete(s *discordgo.Session, m *discordgo.MessageCreate) {\n}",
"func (b *QueryBuilder) Delete() {\n}",
"func (c *UnsavedPostVideoClient) QueryUnsavedPost(upv *UnsavedPostVideo) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upv.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostvideo.Table, unsavedpostvideo.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostvideo.UnsavedPostTable, unsavedpostvideo.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upv.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *PartClient) Delete() *PartDelete {\n\tmutation := newPartMutation(c.config, OpDelete)\n\treturn &PartDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (mock *MockRepository) Delete(post *entity.Post) error {\n\treturn nil\n}",
"func NewDeleteBuilder() *DeleteBuilder {\n\treturn &DeleteBuilder{}\n}",
"func (c *BeerClient) Delete() *BeerDelete {\n\tmutation := newBeerMutation(c.config, OpDelete)\n\treturn &BeerDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upq *UnsavedPostQuery) WithVideos(opts ...func(*UnsavedPostVideoQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostVideoQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withVideos = query\n\treturn upq\n}",
"func NewDeleteCommand(parent cmd.Registerer, g *global.Data, m manifest.Data) *DeleteCommand {\n\tc := DeleteCommand{\n\t\tBase: cmd.Base{\n\t\t\tGlobals: g,\n\t\t},\n\t\tmanifest: m,\n\t}\n\tc.CmdClause = parent.Command(\"delete\", \"Delete a resource link for a Fastly service version\").Alias(\"remove\")\n\n\t// Required.\n\tc.RegisterFlag(cmd.StringFlagOpts{\n\t\tName: \"id\",\n\t\tDescription: flagIDDescription,\n\t\tDst: &c.input.ID,\n\t\tRequired: true,\n\t})\n\tc.RegisterFlag(cmd.StringFlagOpts{\n\t\tName: cmd.FlagVersionName,\n\t\tDescription: cmd.FlagVersionDesc,\n\t\tDst: &c.serviceVersion.Value,\n\t\tRequired: true,\n\t})\n\n\t// At least one of the following is required.\n\tc.RegisterFlag(cmd.StringFlagOpts{\n\t\tName: cmd.FlagServiceIDName,\n\t\tShort: 's',\n\t\tDescription: cmd.FlagServiceIDDesc,\n\t\tDst: &c.manifest.Flag.ServiceID,\n\t})\n\tc.RegisterFlag(cmd.StringFlagOpts{\n\t\tName: cmd.FlagServiceName,\n\t\tAction: c.serviceName.Set,\n\t\tDescription: cmd.FlagServiceDesc,\n\t\tDst: &c.serviceName.Value,\n\t})\n\n\t// Optional.\n\tc.RegisterAutoCloneFlag(cmd.AutoCloneFlagOpts{\n\t\tAction: c.autoClone.Set,\n\t\tDst: &c.autoClone.Value,\n\t})\n\tc.RegisterFlagBool(c.JSONFlag()) // --json\n\n\treturn &c\n}",
"func (c *BedtypeClient) Delete() *BedtypeDelete {\n\tmutation := newBedtypeMutation(c.config, OpDelete)\n\treturn &BedtypeDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func Delete(g *types.Cmd) {\n\tg.AddOptions(\"--delete\")\n}",
"func (c *ReviewClient) Delete() *ReviewDelete {\n\tmutation := newReviewMutation(c.config, OpDelete)\n\treturn &ReviewDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostThumbnailClient) Delete() *PostThumbnailDelete {\n\tmutation := newPostThumbnailMutation(c.config, OpDelete)\n\treturn &PostThumbnailDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (controller *WidgetController) Delete(context *qhttp.Context) {\n\tcontroller.storage.Delete(context.URIParameters[\"id\"])\n\tcontext.SetResponse(\"\", http.StatusNoContent)\n}",
"func (u *App) Delete(c echo.Context, id string) error {\n\tif err := u.rbac.EnforceRole(c, model.AdminRole); err != nil {\n\t\treturn err\n\t}\n\n\tpost, err := u.udb.View(u.db, id)\n\tif err = zaplog.ZLog(err); err != nil {\n\t\treturn err\n\t}\n\n\tif post.Status != model.StatusDraft {\n\t\treturn zaplog.ZLog(errors.New(\"Apenas é possível eliminar artigos em rascunho\"))\n\t}\n\n\treturn u.udb.Delete(u.db, id)\n}",
"func (l *Like) Delete() error {\n\treturn nil\n}",
"func (obj *RabbitQueue) ValidateDelete() error {\n\treturn nil\n}",
"func (c *ActivityTypeClient) Delete() *ActivityTypeDelete {\n\tmutation := newActivityTypeMutation(c.config, OpDelete)\n\treturn &ActivityTypeDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PartorderClient) Delete() *PartorderDelete {\n\tmutation := newPartorderMutation(c.config, OpDelete)\n\treturn &PartorderDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostVideoClient) Query() *UnsavedPostVideoQuery {\n\treturn &UnsavedPostVideoQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (*DeletePostRequest) Descriptor() ([]byte, []int) {\n\treturn file_view_grpc_blog_api_proto_rawDescGZIP(), []int{16}\n}",
"func NewDelete(appName string) *commander.CommandWrapper {\n\treturn &commander.CommandWrapper{\n\t\tHandler: &Delete{},\n\t\tHelp: &commander.CommandDescriptor{\n\t\t\tName: \"delete\",\n\t\t\tShortDescription: \"Delete a server.\",\n\t\t\tLongDescription: `Delete a server will destroy the world and container and the version file.`,\n\t\t\tArguments: \"name\",\n\t\t\tExamples: []string{\"\", \"my_server\"},\n\t\t},\n\t}\n}",
"func (client *VideosClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, videoName string, options *VideosClientDeleteOptions) (*policy.Request, error) {\n\turlPath := \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}\"\n\tif client.subscriptionID == \"\" {\n\t\treturn nil, errors.New(\"parameter client.subscriptionID cannot be empty\")\n\t}\n\turlPath = strings.ReplaceAll(urlPath, \"{subscriptionId}\", url.PathEscape(client.subscriptionID))\n\tif resourceGroupName == \"\" {\n\t\treturn nil, errors.New(\"parameter resourceGroupName cannot be empty\")\n\t}\n\turlPath = strings.ReplaceAll(urlPath, \"{resourceGroupName}\", url.PathEscape(resourceGroupName))\n\tif accountName == \"\" {\n\t\treturn nil, errors.New(\"parameter accountName cannot be empty\")\n\t}\n\turlPath = strings.ReplaceAll(urlPath, \"{accountName}\", url.PathEscape(accountName))\n\tif videoName == \"\" {\n\t\treturn nil, errors.New(\"parameter videoName cannot be empty\")\n\t}\n\turlPath = strings.ReplaceAll(urlPath, \"{videoName}\", url.PathEscape(videoName))\n\treq, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treqQP := req.Raw().URL.Query()\n\treqQP.Set(\"api-version\", \"2021-11-01-preview\")\n\treq.Raw().URL.RawQuery = reqQP.Encode()\n\treq.Raw().Header[\"Accept\"] = []string{\"application/json\"}\n\treturn req, nil\n}",
"func (c *ActivitiesClient) Delete() *ActivitiesDelete {\n\tmutation := newActivitiesMutation(c.config, OpDelete)\n\treturn &ActivitiesDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostImageClient) Delete() *PostImageDelete {\n\tmutation := newPostImageMutation(c.config, OpDelete)\n\treturn &PostImageDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (s *PluginCRUD) Delete(arg ...crud.Arg) (crud.Arg, error) {\n\tevent := eventFromArg(arg[0])\n\tplugin := pluginFromStuct(event)\n\n\tprint.DeletePrintln(\"deleting\", formatPluginMessage(plugin))\n\treturn plugin, nil\n}",
"func BuildDel(key string) *Cmd {\n\treturn Build(key, \"DEL\", key)\n}",
"func (upvc *UnsavedPostVideoCreate) Save(ctx context.Context) (*UnsavedPostVideo, error) {\n\tvar (\n\t\terr error\n\t\tnode *UnsavedPostVideo\n\t)\n\tupvc.defaults()\n\tif len(upvc.hooks) == 0 {\n\t\tif err = upvc.check(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tnode, err = upvc.sqlSave(ctx)\n\t} else {\n\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\tmutation, ok := m.(*UnsavedPostVideoMutation)\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t}\n\t\t\tif err = upvc.check(); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tupvc.mutation = mutation\n\t\t\tnode, err = upvc.sqlSave(ctx)\n\t\t\tmutation.done = true\n\t\t\treturn node, err\n\t\t})\n\t\tfor i := len(upvc.hooks) - 1; i >= 0; i-- {\n\t\t\tmut = upvc.hooks[i](mut)\n\t\t}\n\t\tif _, err := mut.Mutate(ctx, upvc.mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn node, err\n}",
"func (c *BuildingClient) Delete() *BuildingDelete {\n\tmutation := newBuildingMutation(c.config, OpDelete)\n\treturn &BuildingDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func Delete(c *gin.Context) {\r\n\tpost := getById(c)\r\n\tif post.ID == 0 {\r\n\t\treturn\r\n\t}\r\n\tdb.Unscoped().Delete(&post)\r\n\tc.JSON(http.StatusOK, gin.H{\r\n\t\t\"messege\": \"deleted successfuly\",\r\n\t\t\"data\": \"\",\r\n\t})\r\n}",
"func (c *Client) DeleteVideo(lib, source string) (*api.BaseResponse, error) {\n\treturn api.DeleteVideo(c, lib, source)\n}",
"func (r *GroupPolicyPresentationRequest) Delete(ctx context.Context) error {\n\treturn r.JSONRequest(ctx, \"DELETE\", \"\", nil, nil)\n}",
"func (c *UnsavedPostVideoClient) Update() *UnsavedPostVideoUpdate {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpUpdate)\n\treturn &UnsavedPostVideoUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (r *ConversationThreadRequest) Delete(ctx context.Context) error {\n\treturn r.JSONRequest(ctx, \"DELETE\", \"\", nil, nil)\n}",
"func (b *Builder) Delete(url string) *Builder {\n\tb.Url = url\n\tb.Method = http.MethodDelete\n\treturn b\n}",
"func (c *CleaningroomClient) Delete() *CleaningroomDelete {\n\tmutation := newCleaningroomMutation(c.config, OpDelete)\n\treturn &CleaningroomDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (s *GroupsService) DeleteVideo(gr string, vid int) (*Response, error) {\n\tu := fmt.Sprintf(\"groups/%s/videos/%d\", gr, vid)\n\tresp, err := deleteVideo(s.client, u)\n\n\treturn resp, err\n}",
"func DeletePostController(c *gin.Context) {\n\n\t// Get parameters from validate middleware\n\tparams := c.MustGet(\"params\").([]uint)\n\n\t// get userdata from user middleware\n\tuserdata := c.MustGet(\"userdata\").(user.User)\n\n\tif !c.MustGet(\"protected\").(bool) {\n\t\tc.JSON(e.ErrorMessage(e.ErrInternalError))\n\t\tc.Error(e.ErrInternalError).SetMeta(\"DeletePostController.protected\")\n\t\treturn\n\t}\n\n\t// Initialize model struct\n\tm := &models.DeletePostModel{\n\t\tIb: params[0],\n\t\tThread: params[1],\n\t\tID: params[2],\n\t}\n\n\t// Check the record id and get further info\n\terr := m.Status()\n\tif err == e.ErrNotFound {\n\t\tc.JSON(e.ErrorMessage(e.ErrNotFound))\n\t\tc.Error(err).SetMeta(\"DeletePostController.Status\")\n\t\treturn\n\t} else if err != nil {\n\t\tc.JSON(e.ErrorMessage(e.ErrInternalError))\n\t\tc.Error(err).SetMeta(\"DeletePostController.Status\")\n\t\treturn\n\t}\n\n\t// Delete data\n\terr = m.Delete()\n\tif err != nil {\n\t\tc.JSON(e.ErrorMessage(e.ErrInternalError))\n\t\tc.Error(err).SetMeta(\"DeletePostController.Delete\")\n\t\treturn\n\t}\n\n\t// Delete redis stuff\n\tindexKey := fmt.Sprintf(\"%s:%d\", \"index\", m.Ib)\n\tdirectoryKey := fmt.Sprintf(\"%s:%d\", \"directory\", m.Ib)\n\tthreadKey := fmt.Sprintf(\"%s:%d:%d\", \"thread\", m.Ib, m.Thread)\n\tpostKey := fmt.Sprintf(\"%s:%d:%d\", \"post\", m.Ib, m.Thread)\n\ttagsKey := fmt.Sprintf(\"%s:%d\", \"tags\", m.Ib)\n\timageKey := fmt.Sprintf(\"%s:%d\", \"image\", m.Ib)\n\tnewKey := fmt.Sprintf(\"%s:%d\", \"new\", m.Ib)\n\tpopularKey := fmt.Sprintf(\"%s:%d\", \"popular\", m.Ib)\n\tfavoritedKey := fmt.Sprintf(\"%s:%d\", \"favorited\", m.Ib)\n\n\terr = redis.Cache.Delete(indexKey, directoryKey, threadKey, postKey, tagsKey, imageKey, newKey, popularKey, favoritedKey)\n\tif err != nil {\n\t\tc.JSON(e.ErrorMessage(e.ErrInternalError))\n\t\tc.Error(err).SetMeta(\"DeletePostController.redis.Cache.Delete\")\n\t\treturn\n\t}\n\n\t// response message\n\tc.JSON(http.StatusOK, gin.H{\"success_message\": audit.AuditDeletePost})\n\n\t// audit log\n\taudit := audit.Audit{\n\t\tUser: userdata.ID,\n\t\tIb: m.Ib,\n\t\tType: audit.ModLog,\n\t\tIP: c.ClientIP(),\n\t\tAction: audit.AuditDeletePost,\n\t\tInfo: fmt.Sprintf(\"%s/%d\", m.Name, m.ID),\n\t}\n\n\t// submit audit\n\terr = audit.Submit()\n\tif err != nil {\n\t\tc.Error(err).SetMeta(\"DeletePostController.audit.Submit\")\n\t}\n\n}",
"func (c *PlaylistClient) Delete() *PlaylistDelete {\n\tmutation := newPlaylistMutation(c.config, OpDelete)\n\treturn &PlaylistDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (broadcast *Broadcast) DeletePost(ctx context.Context, author, postID,\n\tprivKeyHex string, seq int64) (*model.BroadcastResponse, error) {\n\tmsg := model.DeletePostMsg{\n\t\tAuthor: author,\n\t\tPostID: postID,\n\t}\n\treturn broadcast.broadcastTransaction(ctx, msg, privKeyHex, seq, \"\", false)\n}",
"func (c *RoomdetailClient) Delete() *RoomdetailDelete {\n\tmutation := newRoomdetailMutation(c.config, OpDelete)\n\treturn &RoomdetailDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (o *DMessageEmbed) DeleteP(exec boil.Executor) {\n\tif err := o.Delete(exec); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (p *postsQueryBuilder) Delete() (int64, error) {\n\tif p.err != nil {\n\t\treturn 0, p.err\n\t}\n\treturn p.builder.Delete()\n}",
"func NewDeleteMediaForbidden(body *DeleteMediaForbiddenResponseBody) *goa.ServiceError {\n\tv := &goa.ServiceError{\n\t\tName: *body.Name,\n\t\tID: *body.ID,\n\t\tMessage: *body.Message,\n\t\tTemporary: *body.Temporary,\n\t\tTimeout: *body.Timeout,\n\t\tFault: *body.Fault,\n\t}\n\n\treturn v\n}",
"func newDeleteCmdForEntityType(entityType string, options *edgeOptions, aliases ...string) *cobra.Command {\n\tcmd := &cobra.Command{\n\t\tUse: entityType + \" <id>\",\n\t\tShort: \"deletes \" + getPlural(entityType) + \" managed by the Ziti Edge Controller\",\n\t\tArgs: cobra.MinimumNArgs(1),\n\t\tAliases: append(aliases, getPlural(entityType)),\n\t\tRun: func(cmd *cobra.Command, args []string) {\n\t\t\toptions.Cmd = cmd\n\t\t\toptions.Args = args\n\t\t\terr := runDeleteEntityOfType(options, getPlural(entityType))\n\t\t\tcmdhelper.CheckErr(err)\n\t\t},\n\t\tSuggestFor: []string{},\n\t}\n\n\t// allow interspersing positional args and flags\n\tcmd.Flags().SetInterspersed(true)\n\toptions.AddCommonFlags(cmd)\n\n\tcmd.AddCommand(newDeleteWhereCmdForEntityType(entityType, options))\n\n\treturn cmd\n}",
"func (c *QueueClient) Delete() *QueueDelete {\n\tmutation := newQueueMutation(c.config, OpDelete)\n\treturn &QueueDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (m *GroupPolicyDefinitionsItemNextVersionDefinitionPreviousVersionDefinitionRequestBuilder) Delete(ctx context.Context, requestConfiguration *GroupPolicyDefinitionsItemNextVersionDefinitionPreviousVersionDefinitionRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (c *MedicineClient) Delete() *MedicineDelete {\n\tmutation := newMedicineMutation(c.config, OpDelete)\n\treturn &MedicineDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PharmacistClient) Delete() *PharmacistDelete {\n\tmutation := newPharmacistMutation(c.config, OpDelete)\n\treturn &PharmacistDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (client *Client) DeleteVideoWithOptions(request *DeleteVideoRequest, runtime *util.RuntimeOptions) (_result *DeleteVideoResponse, _err error) {\n\t_err = util.ValidateModel(request)\n\tif _err != nil {\n\t\treturn _result, _err\n\t}\n\tquery := map[string]interface{}{}\n\tif !tea.BoolValue(util.IsUnset(request.VideoIds)) {\n\t\tquery[\"VideoIds\"] = request.VideoIds\n\t}\n\n\treq := &openapi.OpenApiRequest{\n\t\tQuery: openapiutil.Query(query),\n\t}\n\tparams := &openapi.Params{\n\t\tAction: tea.String(\"DeleteVideo\"),\n\t\tVersion: tea.String(\"2017-03-21\"),\n\t\tProtocol: tea.String(\"HTTPS\"),\n\t\tPathname: tea.String(\"/\"),\n\t\tMethod: tea.String(\"POST\"),\n\t\tAuthType: tea.String(\"AK\"),\n\t\tStyle: tea.String(\"RPC\"),\n\t\tReqBodyType: tea.String(\"formData\"),\n\t\tBodyType: tea.String(\"json\"),\n\t}\n\t_result = &DeleteVideoResponse{}\n\t_body, _err := client.CallApi(params, req, runtime)\n\tif _err != nil {\n\t\treturn _result, _err\n\t}\n\t_err = tea.Convert(_body, &_result)\n\treturn _result, _err\n}",
"func (post *Post) delete() (err error) {\n\t_, err = Db.Exec(\"delete from posts where id = $1\", post.Id)\n\treturn\n}",
"func (r *PresenceRequest) Delete(ctx context.Context) error {\n\treturn r.JSONRequest(ctx, \"DELETE\", \"\", nil, nil)\n}",
"func (c *PostVideoClient) DeleteOne(pv *PostVideo) *PostVideoDeleteOne {\n\treturn c.DeleteOneID(pv.ID)\n}",
"func (b *Builder) Delete(conds ...Cond) *Builder {\r\n\tb.cond = b.cond.And(conds...)\r\n\tb.optype = deleteType\r\n\treturn b\r\n}",
"func (c *PostVideoClient) Get(ctx context.Context, id int) (*PostVideo, error) {\n\treturn c.Query().Where(postvideo.ID(id)).Only(ctx)\n}",
"func (c *BookingClient) Delete() *BookingDelete {\n\tmutation := newBookingMutation(c.config, OpDelete)\n\treturn &BookingDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func DestroyPost(w http.ResponseWriter, r *http.Request) {\n\n\tdb, err := sqlx.Connect(\"postgres\", connStr)\n\tif err != nil {\n\t\tfmt.Println(err)\n\t}\n\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\n\tparams := mux.Vars(r)\n\tquery := \"delete from posts where id=\" + params[\"id\"]\n\n\tdb.MustExec(query)\n}",
"func newDeleteCmd(out io.Writer, errOut io.Writer) *cobra.Command {\n\tcmd := &cobra.Command{\n\t\tUse: \"delete\",\n\t\tShort: \"deletes various entities managed by the Ziti Edge Controller\",\n\t\tLong: \"deletes various entities managed by the Ziti Edge Controller\",\n\t\tRun: func(cmd *cobra.Command, args []string) {\n\t\t\terr := cmd.Help()\n\t\t\tcmdhelper.CheckErr(err)\n\t\t},\n\t}\n\n\tnewOptions := func() *edgeOptions {\n\t\treturn &edgeOptions{\n\t\t\tCommonOptions: common.CommonOptions{\n\t\t\t\tOut: out,\n\t\t\t\tErr: errOut,\n\t\t\t},\n\t\t}\n\t}\n\n\tcmd.AddCommand(newDeleteCmdForEntityType(\"api-session\", newOptions()))\n\tcmd.AddCommand(newDeleteAuthenticatorCmd(\"authenticator\", newOptions()))\n\tcmd.AddCommand(newDeleteCmdForEntityType(\"ca\", newOptions()))\n\tcmd.AddCommand(newDeleteCmdForEntityType(\"config\", newOptions()))\n\tcmd.AddCommand(newDeleteCmdForEntityType(\"config-type\", newOptions()))\n\tcmd.AddCommand(newDeleteCmdForEntityType(\"edge-router\", newOptions(), \"er\", \"ers\"))\n\tcmd.AddCommand(newDeleteCmdForEntityType(\"edge-router-policy\", newOptions(), \"erp\", \"erps\"))\n\tcmd.AddCommand(newDeleteCmdForEntityType(\"identity\", newOptions()))\n\tcmd.AddCommand(newDeleteCmdForEntityType(\"service\", newOptions()))\n\tcmd.AddCommand(newDeleteCmdForEntityType(\"service-edge-router-policy\", newOptions(), \"serp\", \"serps\"))\n\tcmd.AddCommand(newDeleteCmdForEntityType(\"service-policy\", newOptions(), \"sp\", \"sps\"))\n\tcmd.AddCommand(newDeleteCmdForEntityType(\"session\", newOptions()))\n\tcmd.AddCommand(newDeleteCmdForEntityType(\"terminator\", newOptions()))\n\tcmd.AddCommand(newDeleteCmdForEntityType(\"posture-check\", newOptions()))\n\n\treturn cmd\n}",
"func (api *MediaApi) delete(c *routing.Context) error {\n\tid := c.Param(\"id\")\n\n\tmodel, fetchErr := api.dao.GetByID(id)\n\tif fetchErr != nil {\n\t\treturn utils.NewNotFoundError(fmt.Sprintf(\"Media item with id \\\"%v\\\" doesn't exist!\", id))\n\t}\n\n\tdeleteErr := api.dao.Delete(model)\n\tif deleteErr != nil {\n\t\treturn utils.NewBadRequestError(\"Oops, an error occurred while deleting Language item.\", deleteErr)\n\t}\n\n\tc.Response.WriteHeader(http.StatusNoContent)\n\n\treturn nil\n}",
"func (b *Executor) Delete() (err error) {\n\tif b.builder != nil {\n\t\terr = b.builder.Delete()\n\t\tb.builder = nil\n\t}\n\treturn err\n}",
"func (in *KubeadmControlPlane) ValidateDelete() error {\n\treturn nil\n}",
"func (upvc *UnsavedPostVideoCreate) Mutation() *UnsavedPostVideoMutation {\n\treturn upvc.mutation\n}",
"func NewPostVideoClient(c config) *PostVideoClient {\n\treturn &PostVideoClient{config: c}\n}",
"func (c *DispenseMedicineClient) Delete() *DispenseMedicineDelete {\n\tmutation := newDispenseMedicineMutation(c.config, OpDelete)\n\treturn &DispenseMedicineDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func NewDeletePostMaterial(ctx *middleware.Context, handler DeletePostMaterialHandler) *DeletePostMaterial {\n\treturn &DeletePostMaterial{Context: ctx, Handler: handler}\n}",
"func DeleteBuild(settings *playfab.Settings, postData *DeleteBuildRequestModel, entityToken string) (*EmptyResponseModel, error) {\n if entityToken == \"\" {\n return nil, playfab.NewCustomError(\"entityToken should not be an empty string\", playfab.ErrorGeneric)\n }\n b, errMarshal := json.Marshal(postData)\n if errMarshal != nil {\n return nil, playfab.NewCustomError(errMarshal.Error(), playfab.ErrorMarshal)\n }\n\n sourceMap, err := playfab.Request(settings, b, \"/MultiplayerServer/DeleteBuild\", \"X-EntityToken\", entityToken)\n if err != nil {\n return nil, err\n }\n \n result := &EmptyResponseModel{}\n\n config := mapstructure.DecoderConfig{\n DecodeHook: playfab.StringToDateTimeHook,\n Result: result,\n }\n \n decoder, errDecoding := mapstructure.NewDecoder(&config)\n if errDecoding != nil {\n return nil, playfab.NewCustomError(errDecoding.Error(), playfab.ErrorDecoding)\n }\n \n errDecoding = decoder.Decode(sourceMap)\n if errDecoding != nil {\n return nil, playfab.NewCustomError(errDecoding.Error(), playfab.ErrorDecoding)\n }\n\n return result, nil\n}",
"func (c *PatientroomClient) Delete() *PatientroomDelete {\n\tmutation := newPatientroomMutation(c.config, OpDelete)\n\treturn &PatientroomDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func NewCmdDelete(f cmdutil.Factory) *cobra.Command {\n\tva := cmdcompl.ValidArgsSlide{timeentryhlp.AliasCurrent, timeentryhlp.AliasLast}\n\tcmd := &cobra.Command{\n\t\tUse: \"delete { <time-entry-id> | \" +\n\t\t\tva.IntoUseOptions() + \" }...\",\n\t\tAliases: []string{\"del\", \"rm\", \"remove\"},\n\t\tArgs: cmdutil.RequiredNamedArgs(\"time entry id\"),\n\t\tValidArgs: va.IntoValidArgs(),\n\t\tShort: `Delete time entry(ies), use id \"` +\n\t\t\ttimeentryhlp.AliasCurrent + `\" to apply to time entry in progress`,\n\t\tLong: heredoc.Docf(`\n\t\t\tDelete time entries\n\n\t\t\tIf you want to delete the current (running) time entry you can use \"%s\" instead of its ID.\n\n\t\t\t**Important**: this action can't be reverted, once the time entry is deleted its ID is lost.\n\t\t`,\n\t\t\ttimeentryhlp.AliasCurrent,\n\t\t),\n\t\tExample: heredoc.Docf(`\n\t\t\t# trying to delete a time entry that does not exist, or from other workspace\n\t\t\t$ %[1]s 62af70d849445270d7c09fbc\n\t\t\tdelete time entry \"62af70d849445270d7c09fbc\": TIMEENTRY with id 62af70d849445270d7c09fbc doesn't belong to WORKSPACE with id cccccccccccccccccccccccc (code: 501)\n\n\t\t\t# deleting the running time entry\n\t\t\t$ %[1]s current\n\t\t\t# no output\n\n\t\t\t# deleting the last time entry\n\t\t\t$ %[1]s last\n\t\t\t# no output\n\n\t\t\t# deleting multiple time entries\n\t\t\t$ %[1]s 62b5b51085815e619d7ae18d 62b5d55185815e619d7af928\n\t\t\t# no output\n\t\t`, \"clockify-cli delete\"),\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tvar err error\n\t\t\tvar w, u string\n\n\t\t\tif w, err = f.GetWorkspaceID(); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tif u, err = f.GetUserID(); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tc, err := f.Client()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tfor i := range args {\n\t\t\t\tp := api.DeleteTimeEntryParam{\n\t\t\t\t\tWorkspace: w,\n\t\t\t\t\tTimeEntryID: args[i],\n\t\t\t\t}\n\n\t\t\t\tif p.TimeEntryID == timeentryhlp.AliasCurrent {\n\t\t\t\t\tte, err := c.GetTimeEntryInProgress(\n\t\t\t\t\t\tapi.GetTimeEntryInProgressParam{\n\t\t\t\t\t\t\tWorkspace: p.Workspace,\n\t\t\t\t\t\t\tUserID: u,\n\t\t\t\t\t\t})\n\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\n\t\t\t\t\tif te == nil {\n\t\t\t\t\t\treturn errors.New(\"there is no time entry in progress\")\n\t\t\t\t\t}\n\n\t\t\t\t\tp.TimeEntryID = te.ID\n\t\t\t\t}\n\n\t\t\t\tif p.TimeEntryID == timeentryhlp.AliasLast {\n\t\t\t\t\tte, err := timeentryhlp.GetLatestEntryEntry(c, p.Workspace, u)\n\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\n\t\t\t\t\tp.TimeEntryID = te.ID\n\t\t\t\t}\n\n\t\t\t\tif err := c.DeleteTimeEntry(p); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn nil\n\t\t},\n\t}\n\n\treturn cmd\n}",
"func (c *TasteClient) Delete() *TasteDelete {\n\tmutation := newTasteMutation(c.config, OpDelete)\n\treturn &TasteDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *ConversationsRepo) Delete(conversation *models.Conversation) error {\n _, err := c.DB.Model(conversation).Where(\"id = ?\", conversation.ID).Delete()\n return err\n}",
"func Delete(conds ...Cond) *Builder {\r\n\tbuilder := &Builder{cond: NewCond()}\r\n\treturn builder.Delete(conds...)\r\n}",
"func (b *Backend) Delete(request *frames.DeleteRequest) error {\n\n\terr := backends.ValidateRequest(\"kv\", request.Proto, nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tcontainer, path, err := b.newConnection(request.Proto.Session, request.Password.Get(), request.Token.Get(), request.Proto.Table, true)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn v3ioutils.DeleteTable(b.logger, container, path, request.Proto.Filter, b.numWorkers, b.numWorkers*b.updateWorkersPerVN, request.Proto.IfMissing == frames.IgnoreError)\n\t// TODO: delete the table directory entry if filter == \"\"\n}",
"func (s *Server) Delete(ctx context.Context, req *pb.DeleteRequest) (*pb.Empty, error) {\n\tp, ok := peer.FromContext(ctx)\n\tif !ok {\n\t\treturn nil, errors.New(\"failed to extract peer details from context\")\n\t}\n\ts.logger.Info(\"delete request received\", zap.Stringer(\"addr\", p.Addr), zap.String(\"key\", req.Key))\n\n\tif err := s.store.Delete(req.GetKey(), time.Now().UTC().UnixNano()); err != nil {\n\t\treturn &pb.Empty{}, fmt.Errorf(\"failed to process delete: %w\", err)\n\t}\n\treturn &pb.Empty{}, nil\n}",
"func (m *VirtualEventsWebinarsItemSessionsItemVirtualAppointmentRequestBuilder) Delete(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemSessionsItemVirtualAppointmentRequestBuilderDeleteRequestConfiguration)(error) {\n requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);\n if err != nil {\n return err\n }\n errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {\n \"4XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n \"5XX\": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue,\n }\n err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping)\n if err != nil {\n return err\n }\n return nil\n}",
"func (c *TagClient) Delete() *TagDelete {\n\tmutation := newTagMutation(c.config, OpDelete)\n\treturn &TagDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (*DeletePostResponse) Descriptor() ([]byte, []int) {\n\treturn file_view_grpc_blog_api_proto_rawDescGZIP(), []int{17}\n}",
"func (dsl *DeleteDSL) Put() linux.PutDSL {\n\treturn &PutDSL{dsl.parent, dsl.vppDelete.Put()}\n}",
"func (dsl *DeleteDSL) Put() linux.PutDSL {\n\treturn &PutDSL{dsl.parent, dsl.vppDelete.Put()}\n}",
"func (s *pluginCRUD) Delete(arg ...crud.Arg) (crud.Arg, error) {\n\tevent := eventFromArg(arg[0])\n\tplugin := pluginFromStuct(event)\n\terr := s.client.Plugins.Delete(nil, plugin.ID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn plugin, nil\n}",
"func (c *ClubClient) Delete() *ClubDelete {\n\tmutation := newClubMutation(c.config, OpDelete)\n\treturn &ClubDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}"
] |
[
"0.7163642",
"0.5944743",
"0.57796377",
"0.5683904",
"0.55927426",
"0.55621046",
"0.5486453",
"0.5465643",
"0.5352849",
"0.53467035",
"0.5328073",
"0.5243116",
"0.51956993",
"0.511472",
"0.5098119",
"0.5098119",
"0.50884163",
"0.5085532",
"0.5025677",
"0.5003587",
"0.49767452",
"0.49718314",
"0.49551424",
"0.48781762",
"0.48674166",
"0.4864092",
"0.48441896",
"0.4821719",
"0.4817151",
"0.48163512",
"0.48094353",
"0.47930986",
"0.47895327",
"0.47892672",
"0.47762915",
"0.47728154",
"0.47592434",
"0.47541818",
"0.47456208",
"0.47441053",
"0.4735392",
"0.47307527",
"0.47280142",
"0.47252968",
"0.47180352",
"0.4712444",
"0.47059825",
"0.46964598",
"0.46848318",
"0.46835172",
"0.46807343",
"0.46734634",
"0.46721968",
"0.46713907",
"0.4663508",
"0.46504226",
"0.46442357",
"0.46401066",
"0.46312767",
"0.46236834",
"0.4623271",
"0.46152815",
"0.46057367",
"0.45997012",
"0.45949176",
"0.45922494",
"0.45859602",
"0.4582857",
"0.45709765",
"0.4569224",
"0.45603144",
"0.45398685",
"0.45298344",
"0.452504",
"0.45221424",
"0.4519928",
"0.4512779",
"0.45126244",
"0.4507085",
"0.4492815",
"0.44754663",
"0.44747686",
"0.44746983",
"0.44712156",
"0.44708517",
"0.4470345",
"0.44701123",
"0.44699904",
"0.44680163",
"0.4464181",
"0.44572878",
"0.44568852",
"0.4453164",
"0.44500163",
"0.4447828",
"0.44387197",
"0.44374037",
"0.44374037",
"0.44371367",
"0.44349912"
] |
0.75625503
|
0
|
DeleteOne returns a delete builder for the given entity.
|
func (c *UnsavedPostVideoClient) DeleteOne(upv *UnsavedPostVideo) *UnsavedPostVideoDeleteOne {
return c.DeleteOneID(upv.ID)
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *BuildingClient) DeleteOne(b *Building) *BuildingDeleteOne {\n\treturn c.DeleteOneID(b.ID)\n}",
"func (c *DeviceClient) DeleteOne(d *Device) *DeviceDeleteOne {\n\treturn c.DeleteOneID(d.ID)\n}",
"func (c *EmptyClient) DeleteOne(e *Empty) *EmptyDeleteOne {\n\treturn c.DeleteOneID(e.ID)\n}",
"func (c *DentistClient) DeleteOne(d *Dentist) *DentistDeleteOne {\n\treturn c.DeleteOneID(d.ID)\n}",
"func (c *BedtypeClient) DeleteOne(b *Bedtype) *BedtypeDeleteOne {\n\treturn c.DeleteOneID(b.ID)\n}",
"func (c *OperativerecordClient) DeleteOne(o *Operativerecord) *OperativerecordDeleteOne {\n\treturn c.DeleteOneID(o.ID)\n}",
"func (c *OperationClient) DeleteOne(o *Operation) *OperationDeleteOne {\n\treturn c.DeleteOneID(o.ID)\n}",
"func (c *DNSBLQueryClient) DeleteOne(dq *DNSBLQuery) *DNSBLQueryDeleteOne {\n\treturn c.DeleteOneID(dq.ID)\n}",
"func (c *DispenseMedicineClient) DeleteOne(dm *DispenseMedicine) *DispenseMedicineDeleteOne {\n\treturn c.DeleteOneID(dm.ID)\n}",
"func (c *Command) DeleteOne() (int64, error) {\n\tclient := c.set.gom.GetClient()\n\n\tcollection := client.Database(c.set.gom.GetDatabase()).Collection(c.set.tableName)\n\n\tif len(c.set.filter.(bson.M)) == 0 {\n\t\treturn 0, errors.New(\"filter can't be empty\")\n\t}\n\n\tctx, cancelFunc := c.set.GetContext()\n\tdefer cancelFunc()\n\n\tres, err := collection.DeleteOne(ctx, c.set.filter)\n\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn res.DeletedCount, nil\n}",
"func (c *DoctorClient) DeleteOne(d *Doctor) *DoctorDeleteOne {\n\treturn c.DeleteOneID(d.ID)\n}",
"func NewDeleteOneModel() *DeleteOneModel {\n\treturn &DeleteOneModel{}\n}",
"func (c *DrugAllergyClient) DeleteOne(da *DrugAllergy) *DrugAllergyDeleteOne {\n\treturn c.DeleteOneID(da.ID)\n}",
"func (c *BeerClient) DeleteOne(b *Beer) *BeerDeleteOne {\n\treturn c.DeleteOneID(b.ID)\n}",
"func (d *Demo) DeleteOne(g *gom.Gom) {\n\ttoolkit.Println(\"===== Delete One =====\")\n\n\tvar err error\n\tif d.useParams {\n\t\t_, err = g.Set(&gom.SetParams{\n\t\t\tTableName: \"hero\",\n\t\t\tFilter: gom.Eq(\"Name\", \"Batman\"),\n\t\t\tTimeout: 10,\n\t\t}).Cmd().DeleteOne()\n\t} else {\n\t\t_, err = g.Set(nil).Table(\"hero\").Timeout(10).Filter(gom.Eq(\"Name\", \"Batman\")).Cmd().DeleteOne()\n\t}\n\n\tif err != nil {\n\t\ttoolkit.Println(err.Error())\n\t\treturn\n\t}\n}",
"func (c *OrderClient) DeleteOne(o *Order) *OrderDeleteOne {\n\treturn c.DeleteOneID(o.ID)\n}",
"func (c *AdminClient) DeleteOne(a *Admin) *AdminDeleteOne {\n\treturn c.DeleteOneID(a.ID)\n}",
"func (c *PharmacistClient) DeleteOne(ph *Pharmacist) *PharmacistDeleteOne {\n\treturn c.DeleteOneID(ph.ID)\n}",
"func (c *FoodmenuClient) DeleteOne(f *Foodmenu) *FoodmenuDeleteOne {\n\treturn c.DeleteOneID(f.ID)\n}",
"func (c *CleaningroomClient) DeleteOne(cl *Cleaningroom) *CleaningroomDeleteOne {\n\treturn c.DeleteOneID(cl.ID)\n}",
"func (c *PatientClient) DeleteOne(pa *Patient) *PatientDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *PatientClient) DeleteOne(pa *Patient) *PatientDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *PatientClient) DeleteOne(pa *Patient) *PatientDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *PostClient) DeleteOne(po *Post) *PostDeleteOne {\n\treturn c.DeleteOneID(po.ID)\n}",
"func (c *CompanyClient) DeleteOne(co *Company) *CompanyDeleteOne {\n\treturn c.DeleteOneID(co.ID)\n}",
"func (c *CompanyClient) DeleteOne(co *Company) *CompanyDeleteOne {\n\treturn c.DeleteOneID(co.ID)\n}",
"func (c *DepositClient) DeleteOne(d *Deposit) *DepositDeleteOne {\n\treturn c.DeleteOneID(d.ID)\n}",
"func (c *OperativeClient) DeleteOne(o *Operative) *OperativeDeleteOne {\n\treturn c.DeleteOneID(o.ID)\n}",
"func (c *EventClient) DeleteOne(e *Event) *EventDeleteOne {\n\treturn c.DeleteOneID(e.ID)\n}",
"func (c *UnsavedPostClient) DeleteOne(up *UnsavedPost) *UnsavedPostDeleteOne {\n\treturn c.DeleteOneID(up.ID)\n}",
"func (c *BedtypeClient) DeleteOneID(id int) *BedtypeDeleteOne {\n\tbuilder := c.Delete().Where(bedtype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BedtypeDeleteOne{builder}\n}",
"func (c *MedicineClient) DeleteOne(m *Medicine) *MedicineDeleteOne {\n\treturn c.DeleteOneID(m.ID)\n}",
"func (c *OperativerecordClient) DeleteOneID(id int) *OperativerecordDeleteOne {\n\tbuilder := c.Delete().Where(operativerecord.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OperativerecordDeleteOne{builder}\n}",
"func (c *PatientofphysicianClient) DeleteOne(pa *Patientofphysician) *PatientofphysicianDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *PhysicianClient) DeleteOne(ph *Physician) *PhysicianDeleteOne {\n\treturn c.DeleteOneID(ph.ID)\n}",
"func (c *PhysicianClient) DeleteOne(ph *Physician) *PhysicianDeleteOne {\n\treturn c.DeleteOneID(ph.ID)\n}",
"func DeleteOne(ctx context.Context, tx pgx.Tx, sb sq.DeleteBuilder) error {\n\tq, vs, err := sb.ToSql()\n\tif err != nil {\n\t\treturn err\n\t}\n\ttag, err := tx.Exec(ctx, q, vs...)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif tag.RowsAffected() != 1 {\n\t\treturn ErrNoRowsAffected\n\t}\n\treturn nil\n}",
"func (c *TransactionClient) DeleteOne(t *Transaction) *TransactionDeleteOne {\n\treturn c.DeleteOneID(t.ID)\n}",
"func (c *LevelOfDangerousClient) DeleteOne(lod *LevelOfDangerous) *LevelOfDangerousDeleteOne {\n\treturn c.DeleteOneID(lod.ID)\n}",
"func (c *BillClient) DeleteOne(b *Bill) *BillDeleteOne {\n\treturn c.DeleteOneID(b.ID)\n}",
"func (c *BillClient) DeleteOne(b *Bill) *BillDeleteOne {\n\treturn c.DeleteOneID(b.ID)\n}",
"func (c *BillClient) DeleteOne(b *Bill) *BillDeleteOne {\n\treturn c.DeleteOneID(b.ID)\n}",
"func (c *PaymentClient) DeleteOne(pa *Payment) *PaymentDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *PaymentClient) DeleteOne(pa *Payment) *PaymentDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *CleanernameClient) DeleteOne(cl *Cleanername) *CleanernameDeleteOne {\n\treturn c.DeleteOneID(cl.ID)\n}",
"func (d *DBRepository) deleteOne(ctx context.Context, id string) error {\n\tobjectId, err := primitive.ObjectIDFromHex(id)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif _, err := d.Collection.DeleteOne(ctx, bson.M{\"_id\": objectId}); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func (c *MedicineTypeClient) DeleteOne(mt *MedicineType) *MedicineTypeDeleteOne {\n\treturn c.DeleteOneID(mt.ID)\n}",
"func (c *StatusdClient) DeleteOne(s *Statusd) *StatusdDeleteOne {\n\treturn c.DeleteOneID(s.ID)\n}",
"func (c *ToolClient) DeleteOne(t *Tool) *ToolDeleteOne {\n\treturn c.DeleteOneID(t.ID)\n}",
"func (c *ActivityTypeClient) DeleteOne(at *ActivityType) *ActivityTypeDeleteOne {\n\treturn c.DeleteOneID(at.ID)\n}",
"func (c *LevelOfDangerousClient) DeleteOneID(id int) *LevelOfDangerousDeleteOne {\n\tbuilder := c.Delete().Where(levelofdangerous.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &LevelOfDangerousDeleteOne{builder}\n}",
"func (c *OperationroomClient) DeleteOne(o *Operationroom) *OperationroomDeleteOne {\n\treturn c.DeleteOneID(o.ID)\n}",
"func (c *TagClient) DeleteOne(t *Tag) *TagDeleteOne {\n\treturn c.DeleteOneID(t.ID)\n}",
"func (c *DentistClient) DeleteOneID(id int) *DentistDeleteOne {\n\tbuilder := c.Delete().Where(dentist.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DentistDeleteOne{builder}\n}",
"func (c *OperativeClient) DeleteOneID(id int) *OperativeDeleteOne {\n\tbuilder := c.Delete().Where(operative.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OperativeDeleteOne{builder}\n}",
"func NewDeleteOneNoContent() *DeleteOneNoContent {\n\treturn &DeleteOneNoContent{}\n}",
"func (c *UnsavedPostClient) DeleteOneID(id int) *UnsavedPostDeleteOne {\n\tbuilder := c.Delete().Where(unsavedpost.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &UnsavedPostDeleteOne{builder}\n}",
"func (c *StaytypeClient) DeleteOne(s *Staytype) *StaytypeDeleteOne {\n\treturn c.DeleteOneID(s.ID)\n}",
"func (c *OrderClient) DeleteOneID(id int) *OrderDeleteOne {\n\tbuilder := c.Delete().Where(order.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OrderDeleteOne{builder}\n}",
"func (c *BuildingClient) DeleteOneID(id int) *BuildingDeleteOne {\n\tbuilder := c.Delete().Where(building.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BuildingDeleteOne{builder}\n}",
"func (c *PostClient) DeleteOneID(id int) *PostDeleteOne {\n\tbuilder := c.Delete().Where(post.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PostDeleteOne{builder}\n}",
"func (c *PatientroomClient) DeleteOne(pa *Patientroom) *PatientroomDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *EventClient) DeleteOneID(id int) *EventDeleteOne {\n\tbuilder := c.Delete().Where(event.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &EventDeleteOne{builder}\n}",
"func NewDeleteOneDefault(code int) *DeleteOneDefault {\n\treturn &DeleteOneDefault{\n\t\t_statusCode: code,\n\t}\n}",
"func (c *UnsavedPostAttachmentClient) DeleteOne(upa *UnsavedPostAttachment) *UnsavedPostAttachmentDeleteOne {\n\treturn c.DeleteOneID(upa.ID)\n}",
"func (c *UnitOfMedicineClient) DeleteOne(uom *UnitOfMedicine) *UnitOfMedicineDeleteOne {\n\treturn c.DeleteOneID(uom.ID)\n}",
"func (c *FoodmenuClient) DeleteOneID(id int) *FoodmenuDeleteOne {\n\tbuilder := c.Delete().Where(foodmenu.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &FoodmenuDeleteOne{builder}\n}",
"func (c *PostAttachmentClient) DeleteOne(pa *PostAttachment) *PostAttachmentDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *DeviceClient) DeleteOneID(id int) *DeviceDeleteOne {\n\tbuilder := c.Delete().Where(device.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DeviceDeleteOne{builder}\n}",
"func (c *ToolClient) DeleteOneID(id int) *ToolDeleteOne {\n\tbuilder := c.Delete().Where(tool.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ToolDeleteOne{builder}\n}",
"func (c *AppointmentClient) DeleteOne(a *Appointment) *AppointmentDeleteOne {\n\treturn c.DeleteOneID(a.ID)\n}",
"func (c *EmptyClient) DeleteOneID(id int) *EmptyDeleteOne {\n\tbuilder := c.Delete().Where(empty.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &EmptyDeleteOne{builder}\n}",
"func (c *PurposeClient) DeleteOne(pu *Purpose) *PurposeDeleteOne {\n\treturn c.DeleteOneID(pu.ID)\n}",
"func (c *AdminClient) DeleteOneID(id int) *AdminDeleteOne {\n\tbuilder := c.Delete().Where(admin.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &AdminDeleteOne{builder}\n}",
"func (c *CleaningroomClient) DeleteOneID(id int) *CleaningroomDeleteOne {\n\tbuilder := c.Delete().Where(cleaningroom.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &CleaningroomDeleteOne{builder}\n}",
"func (c *LengthtimeClient) DeleteOneID(id int) *LengthtimeDeleteOne {\n\tbuilder := c.Delete().Where(lengthtime.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &LengthtimeDeleteOne{builder}\n}",
"func (c *DepartmentClient) DeleteOne(d *Department) *DepartmentDeleteOne {\n\treturn c.DeleteOneID(d.ID)\n}",
"func (c *UnsavedPostAttachmentClient) DeleteOneID(id int) *UnsavedPostAttachmentDeleteOne {\n\tbuilder := c.Delete().Where(unsavedpostattachment.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &UnsavedPostAttachmentDeleteOne{builder}\n}",
"func (c *PhysicianClient) DeleteOneID(id int) *PhysicianDeleteOne {\n\tbuilder := c.Delete().Where(physician.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PhysicianDeleteOne{builder}\n}",
"func (c *PhysicianClient) DeleteOneID(id int) *PhysicianDeleteOne {\n\tbuilder := c.Delete().Where(physician.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PhysicianDeleteOne{builder}\n}",
"func (c *DoctorClient) DeleteOneID(id int) *DoctorDeleteOne {\n\tbuilder := c.Delete().Where(doctor.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DoctorDeleteOne{builder}\n}",
"func (c *MealplanClient) DeleteOne(m *Mealplan) *MealplanDeleteOne {\n\treturn c.DeleteOneID(m.ID)\n}",
"func (c *CleanernameClient) DeleteOneID(id int) *CleanernameDeleteOne {\n\tbuilder := c.Delete().Where(cleanername.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &CleanernameDeleteOne{builder}\n}",
"func (c *ComplaintClient) DeleteOne(co *Complaint) *ComplaintDeleteOne {\n\treturn c.DeleteOneID(co.ID)\n}",
"func (c *StatustClient) DeleteOneID(id int) *StatustDeleteOne {\n\tbuilder := c.Delete().Where(statust.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &StatustDeleteOne{builder}\n}",
"func (c *PartorderClient) DeleteOne(pa *Partorder) *PartorderDeleteOne {\n\treturn c.DeleteOneID(pa.ID)\n}",
"func (c *StaytypeClient) DeleteOneID(id int) *StaytypeDeleteOne {\n\tbuilder := c.Delete().Where(staytype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &StaytypeDeleteOne{builder}\n}",
"func (c *PatientofphysicianClient) DeleteOneID(id int) *PatientofphysicianDeleteOne {\n\tbuilder := c.Delete().Where(patientofphysician.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PatientofphysicianDeleteOne{builder}\n}",
"func (c *RoomdetailClient) DeleteOne(r *Roomdetail) *RoomdetailDeleteOne {\n\treturn c.DeleteOneID(r.ID)\n}",
"func (c *BranchClient) DeleteOne(b *Branch) *BranchDeleteOne {\n\treturn c.DeleteOneID(b.ID)\n}",
"func (c *UnitOfMedicineClient) DeleteOneID(id int) *UnitOfMedicineDeleteOne {\n\tbuilder := c.Delete().Where(unitofmedicine.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &UnitOfMedicineDeleteOne{builder}\n}",
"func (c *TitleClient) DeleteOne(t *Title) *TitleDeleteOne {\n\treturn c.DeleteOneID(t.ID)\n}",
"func (c *WorkExperienceClient) DeleteOne(we *WorkExperience) *WorkExperienceDeleteOne {\n\treturn c.DeleteOneID(we.ID)\n}",
"func (c *AnnotationClient) DeleteOne(a *Annotation) *AnnotationDeleteOne {\n\treturn c.DeleteOneID(a.ID)\n}",
"func (c *UnsavedPostImageClient) DeleteOne(upi *UnsavedPostImage) *UnsavedPostImageDeleteOne {\n\treturn c.DeleteOneID(upi.ID)\n}",
"func (c *DispenseMedicineClient) DeleteOneID(id int) *DispenseMedicineDeleteOne {\n\tbuilder := c.Delete().Where(dispensemedicine.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DispenseMedicineDeleteOne{builder}\n}",
"func (c *DepositClient) DeleteOneID(id int) *DepositDeleteOne {\n\tbuilder := c.Delete().Where(deposit.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DepositDeleteOne{builder}\n}",
"func (c *PharmacistClient) DeleteOneID(id int) *PharmacistDeleteOne {\n\tbuilder := c.Delete().Where(pharmacist.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PharmacistDeleteOne{builder}\n}",
"func (c *PositionassingmentClient) DeleteOne(po *Positionassingment) *PositionassingmentDeleteOne {\n\treturn c.DeleteOneID(po.ID)\n}",
"func (c *KeyStoreClient) DeleteOneID(id int32) *KeyStoreDeleteOne {\n\tbuilder := c.Delete().Where(keystore.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &KeyStoreDeleteOne{builder}\n}",
"func (c *PaymentClient) DeleteOneID(id int) *PaymentDeleteOne {\n\tbuilder := c.Delete().Where(payment.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PaymentDeleteOne{builder}\n}"
] |
[
"0.6756587",
"0.6709248",
"0.6703961",
"0.670318",
"0.66553116",
"0.66148186",
"0.6572149",
"0.6557555",
"0.6552272",
"0.65237635",
"0.65061617",
"0.6499291",
"0.6434074",
"0.6432293",
"0.64267963",
"0.64205337",
"0.6398103",
"0.6385286",
"0.6372697",
"0.63663584",
"0.63654643",
"0.63654643",
"0.63654643",
"0.6362657",
"0.63574296",
"0.63574296",
"0.6353369",
"0.6339299",
"0.6336179",
"0.63301015",
"0.6321808",
"0.63174367",
"0.6303661",
"0.62972194",
"0.62863207",
"0.62863207",
"0.6279139",
"0.6275199",
"0.6270237",
"0.6268455",
"0.6268455",
"0.6268455",
"0.6263539",
"0.6263539",
"0.626228",
"0.62493193",
"0.62488425",
"0.6247898",
"0.6235509",
"0.62336886",
"0.62264526",
"0.622629",
"0.6222045",
"0.6213431",
"0.62110764",
"0.6203543",
"0.61965996",
"0.61887383",
"0.618642",
"0.6182131",
"0.617503",
"0.6174455",
"0.61586386",
"0.6158026",
"0.6154386",
"0.6149794",
"0.6145806",
"0.61379576",
"0.6136323",
"0.61348855",
"0.61171746",
"0.6115592",
"0.611266",
"0.61089367",
"0.61029077",
"0.6100578",
"0.6095522",
"0.6094066",
"0.60936314",
"0.60936314",
"0.6091636",
"0.60897076",
"0.6088863",
"0.60813314",
"0.60789454",
"0.60780084",
"0.60720104",
"0.6066409",
"0.606525",
"0.60645807",
"0.60624427",
"0.6055795",
"0.60554683",
"0.60463685",
"0.6039845",
"0.6039164",
"0.6036367",
"0.6023885",
"0.6022439",
"0.6019607",
"0.60158646"
] |
0.0
|
-1
|
DeleteOneID returns a delete builder for the given id.
|
func (c *UnsavedPostVideoClient) DeleteOneID(id int) *UnsavedPostVideoDeleteOne {
builder := c.Delete().Where(unsavedpostvideo.ID(id))
builder.mutation.id = &id
builder.mutation.op = OpDeleteOne
return &UnsavedPostVideoDeleteOne{builder}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *BedtypeClient) DeleteOneID(id int) *BedtypeDeleteOne {\n\tbuilder := c.Delete().Where(bedtype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BedtypeDeleteOne{builder}\n}",
"func (c *BuildingClient) DeleteOneID(id int) *BuildingDeleteOne {\n\tbuilder := c.Delete().Where(building.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BuildingDeleteOne{builder}\n}",
"func (c *LengthtimeClient) DeleteOneID(id int) *LengthtimeDeleteOne {\n\tbuilder := c.Delete().Where(lengthtime.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &LengthtimeDeleteOne{builder}\n}",
"func (c *CleanernameClient) DeleteOneID(id int) *CleanernameDeleteOne {\n\tbuilder := c.Delete().Where(cleanername.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &CleanernameDeleteOne{builder}\n}",
"func (c *ToolClient) DeleteOneID(id int) *ToolDeleteOne {\n\tbuilder := c.Delete().Where(tool.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ToolDeleteOne{builder}\n}",
"func (c *OperativeClient) DeleteOneID(id int) *OperativeDeleteOne {\n\tbuilder := c.Delete().Where(operative.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OperativeDeleteOne{builder}\n}",
"func (c *FoodmenuClient) DeleteOneID(id int) *FoodmenuDeleteOne {\n\tbuilder := c.Delete().Where(foodmenu.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &FoodmenuDeleteOne{builder}\n}",
"func (c *CleaningroomClient) DeleteOneID(id int) *CleaningroomDeleteOne {\n\tbuilder := c.Delete().Where(cleaningroom.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &CleaningroomDeleteOne{builder}\n}",
"func (c *DoctorClient) DeleteOneID(id int) *DoctorDeleteOne {\n\tbuilder := c.Delete().Where(doctor.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DoctorDeleteOne{builder}\n}",
"func (c *MealplanClient) DeleteOneID(id int) *MealplanDeleteOne {\n\tbuilder := c.Delete().Where(mealplan.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &MealplanDeleteOne{builder}\n}",
"func (c *DentistClient) DeleteOneID(id int) *DentistDeleteOne {\n\tbuilder := c.Delete().Where(dentist.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DentistDeleteOne{builder}\n}",
"func (c *OperativerecordClient) DeleteOneID(id int) *OperativerecordDeleteOne {\n\tbuilder := c.Delete().Where(operativerecord.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OperativerecordDeleteOne{builder}\n}",
"func (c *LevelOfDangerousClient) DeleteOneID(id int) *LevelOfDangerousDeleteOne {\n\tbuilder := c.Delete().Where(levelofdangerous.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &LevelOfDangerousDeleteOne{builder}\n}",
"func (c *PhysicianClient) DeleteOneID(id int) *PhysicianDeleteOne {\n\tbuilder := c.Delete().Where(physician.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PhysicianDeleteOne{builder}\n}",
"func (c *PhysicianClient) DeleteOneID(id int) *PhysicianDeleteOne {\n\tbuilder := c.Delete().Where(physician.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PhysicianDeleteOne{builder}\n}",
"func (c *BillClient) DeleteOneID(id int) *BillDeleteOne {\n\tbuilder := c.Delete().Where(bill.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BillDeleteOne{builder}\n}",
"func (c *BillClient) DeleteOneID(id int) *BillDeleteOne {\n\tbuilder := c.Delete().Where(bill.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BillDeleteOne{builder}\n}",
"func (c *BillClient) DeleteOneID(id int) *BillDeleteOne {\n\tbuilder := c.Delete().Where(bill.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BillDeleteOne{builder}\n}",
"func (c *DeviceClient) DeleteOneID(id int) *DeviceDeleteOne {\n\tbuilder := c.Delete().Where(device.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DeviceDeleteOne{builder}\n}",
"func (c *UnitOfMedicineClient) DeleteOneID(id int) *UnitOfMedicineDeleteOne {\n\tbuilder := c.Delete().Where(unitofmedicine.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &UnitOfMedicineDeleteOne{builder}\n}",
"func (c *AdminClient) DeleteOneID(id int) *AdminDeleteOne {\n\tbuilder := c.Delete().Where(admin.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &AdminDeleteOne{builder}\n}",
"func (c *DrugAllergyClient) DeleteOneID(id int) *DrugAllergyDeleteOne {\n\tbuilder := c.Delete().Where(drugallergy.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DrugAllergyDeleteOne{builder}\n}",
"func (c *RoomuseClient) DeleteOneID(id int) *RoomuseDeleteOne {\n\tbuilder := c.Delete().Where(roomuse.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &RoomuseDeleteOne{builder}\n}",
"func (c *PatientofphysicianClient) DeleteOneID(id int) *PatientofphysicianDeleteOne {\n\tbuilder := c.Delete().Where(patientofphysician.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PatientofphysicianDeleteOne{builder}\n}",
"func (c *OrderClient) DeleteOneID(id int) *OrderDeleteOne {\n\tbuilder := c.Delete().Where(order.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OrderDeleteOne{builder}\n}",
"func (c *MedicineClient) DeleteOneID(id int) *MedicineDeleteOne {\n\tbuilder := c.Delete().Where(medicine.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &MedicineDeleteOne{builder}\n}",
"func (c *EmptyClient) DeleteOneID(id int) *EmptyDeleteOne {\n\tbuilder := c.Delete().Where(empty.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &EmptyDeleteOne{builder}\n}",
"func (c *MedicineTypeClient) DeleteOneID(id int) *MedicineTypeDeleteOne {\n\tbuilder := c.Delete().Where(medicinetype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &MedicineTypeDeleteOne{builder}\n}",
"func (c *BeerClient) DeleteOneID(id int) *BeerDeleteOne {\n\tbuilder := c.Delete().Where(beer.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BeerDeleteOne{builder}\n}",
"func (c *RoomdetailClient) DeleteOneID(id int) *RoomdetailDeleteOne {\n\tbuilder := c.Delete().Where(roomdetail.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &RoomdetailDeleteOne{builder}\n}",
"func (c *StatustClient) DeleteOneID(id int) *StatustDeleteOne {\n\tbuilder := c.Delete().Where(statust.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &StatustDeleteOne{builder}\n}",
"func (c *BookingClient) DeleteOneID(id int) *BookingDeleteOne {\n\tbuilder := c.Delete().Where(booking.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BookingDeleteOne{builder}\n}",
"func (c *BinaryFileClient) DeleteOneID(id int) *BinaryFileDeleteOne {\n\tbuilder := c.Delete().Where(binaryfile.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BinaryFileDeleteOne{builder}\n}",
"func (c *PharmacistClient) DeleteOneID(id int) *PharmacistDeleteOne {\n\tbuilder := c.Delete().Where(pharmacist.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PharmacistDeleteOne{builder}\n}",
"func (c *KeyStoreClient) DeleteOneID(id int32) *KeyStoreDeleteOne {\n\tbuilder := c.Delete().Where(keystore.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &KeyStoreDeleteOne{builder}\n}",
"func (c *LeaseClient) DeleteOneID(id int) *LeaseDeleteOne {\n\tbuilder := c.Delete().Where(lease.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &LeaseDeleteOne{builder}\n}",
"func (c *PaymentClient) DeleteOneID(id int) *PaymentDeleteOne {\n\tbuilder := c.Delete().Where(payment.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PaymentDeleteOne{builder}\n}",
"func (c *PaymentClient) DeleteOneID(id int) *PaymentDeleteOne {\n\tbuilder := c.Delete().Where(payment.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PaymentDeleteOne{builder}\n}",
"func (c *DispenseMedicineClient) DeleteOneID(id int) *DispenseMedicineDeleteOne {\n\tbuilder := c.Delete().Where(dispensemedicine.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DispenseMedicineDeleteOne{builder}\n}",
"func (c *DepositClient) DeleteOneID(id int) *DepositDeleteOne {\n\tbuilder := c.Delete().Where(deposit.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DepositDeleteOne{builder}\n}",
"func (c *StaytypeClient) DeleteOneID(id int) *StaytypeDeleteOne {\n\tbuilder := c.Delete().Where(staytype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &StaytypeDeleteOne{builder}\n}",
"func (c *OperationroomClient) DeleteOneID(id int) *OperationroomDeleteOne {\n\tbuilder := c.Delete().Where(operationroom.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OperationroomDeleteOne{builder}\n}",
"func (c *NurseClient) DeleteOneID(id int) *NurseDeleteOne {\n\tbuilder := c.Delete().Where(nurse.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &NurseDeleteOne{builder}\n}",
"func (c *QueueClient) DeleteOneID(id int) *QueueDeleteOne {\n\tbuilder := c.Delete().Where(queue.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &QueueDeleteOne{builder}\n}",
"func (c *OperationClient) DeleteOneID(id uuid.UUID) *OperationDeleteOne {\n\tbuilder := c.Delete().Where(operation.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &OperationDeleteOne{builder}\n}",
"func (c *PostClient) DeleteOneID(id int) *PostDeleteOne {\n\tbuilder := c.Delete().Where(post.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PostDeleteOne{builder}\n}",
"func (c *ComplaintClient) DeleteOneID(id int) *ComplaintDeleteOne {\n\tbuilder := c.Delete().Where(complaint.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ComplaintDeleteOne{builder}\n}",
"func (c *PatientroomClient) DeleteOneID(id int) *PatientroomDeleteOne {\n\tbuilder := c.Delete().Where(patientroom.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PatientroomDeleteOne{builder}\n}",
"func (c *ModuleClient) DeleteOneID(id int) *ModuleDeleteOne {\n\treturn &ModuleDeleteOne{c.Delete().Where(module.ID(id))}\n}",
"func (c *ComplaintTypeClient) DeleteOneID(id int) *ComplaintTypeDeleteOne {\n\tbuilder := c.Delete().Where(complainttype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ComplaintTypeDeleteOne{builder}\n}",
"func (c *PurposeClient) DeleteOneID(id int) *PurposeDeleteOne {\n\tbuilder := c.Delete().Where(purpose.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PurposeDeleteOne{builder}\n}",
"func (c *AdminSessionClient) DeleteOneID(id int) *AdminSessionDeleteOne {\n\tbuilder := c.Delete().Where(adminsession.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &AdminSessionDeleteOne{builder}\n}",
"func (c *StatusdClient) DeleteOneID(id int) *StatusdDeleteOne {\n\tbuilder := c.Delete().Where(statusd.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &StatusdDeleteOne{builder}\n}",
"func (c *DNSBLQueryClient) DeleteOneID(id uuid.UUID) *DNSBLQueryDeleteOne {\n\tbuilder := c.Delete().Where(dnsblquery.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DNSBLQueryDeleteOne{builder}\n}",
"func (c *PetruleClient) DeleteOneID(id int) *PetruleDeleteOne {\n\tbuilder := c.Delete().Where(petrule.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PetruleDeleteOne{builder}\n}",
"func (c *EventClient) DeleteOneID(id int) *EventDeleteOne {\n\tbuilder := c.Delete().Where(event.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &EventDeleteOne{builder}\n}",
"func (c *ClubapplicationClient) DeleteOneID(id int) *ClubapplicationDeleteOne {\n\tbuilder := c.Delete().Where(clubapplication.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ClubapplicationDeleteOne{builder}\n}",
"func (c *DisciplineClient) DeleteOneID(id int) *DisciplineDeleteOne {\n\tbuilder := c.Delete().Where(discipline.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &DisciplineDeleteOne{builder}\n}",
"func (c *RoomClient) DeleteOneID(id int) *RoomDeleteOne {\n\tbuilder := c.Delete().Where(room.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &RoomDeleteOne{builder}\n}",
"func (c *RoomClient) DeleteOneID(id int) *RoomDeleteOne {\n\tbuilder := c.Delete().Where(room.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &RoomDeleteOne{builder}\n}",
"func (c *PledgeClient) DeleteOneID(id int) *PledgeDeleteOne {\n\tbuilder := c.Delete().Where(pledge.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PledgeDeleteOne{builder}\n}",
"func (c *CardClient) DeleteOneID(id int) *CardDeleteOne {\n\tbuilder := c.Delete().Where(card.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &CardDeleteOne{builder}\n}",
"func (c *BillingstatusClient) DeleteOneID(id int) *BillingstatusDeleteOne {\n\tbuilder := c.Delete().Where(billingstatus.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BillingstatusDeleteOne{builder}\n}",
"func (c *SymptomClient) DeleteOneID(id int) *SymptomDeleteOne {\n\tbuilder := c.Delete().Where(symptom.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &SymptomDeleteOne{builder}\n}",
"func (c *PatientClient) DeleteOneID(id int) *PatientDeleteOne {\n\tbuilder := c.Delete().Where(patient.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PatientDeleteOne{builder}\n}",
"func (c *PatientClient) DeleteOneID(id int) *PatientDeleteOne {\n\tbuilder := c.Delete().Where(patient.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PatientDeleteOne{builder}\n}",
"func (c *PatientClient) DeleteOneID(id int) *PatientDeleteOne {\n\tbuilder := c.Delete().Where(patient.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PatientDeleteOne{builder}\n}",
"func (c *TasteClient) DeleteOneID(id int) *TasteDeleteOne {\n\tbuilder := c.Delete().Where(taste.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &TasteDeleteOne{builder}\n}",
"func (c *UnsavedPostClient) DeleteOneID(id int) *UnsavedPostDeleteOne {\n\tbuilder := c.Delete().Where(unsavedpost.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &UnsavedPostDeleteOne{builder}\n}",
"func (c *JobClient) DeleteOneID(id int) *JobDeleteOne {\n\tbuilder := c.Delete().Where(job.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &JobDeleteOne{builder}\n}",
"func (c *ExaminationroomClient) DeleteOneID(id int) *ExaminationroomDeleteOne {\n\tbuilder := c.Delete().Where(examinationroom.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ExaminationroomDeleteOne{builder}\n}",
"func (c *PlanetClient) DeleteOneID(id int) *PlanetDeleteOne {\n\tbuilder := c.Delete().Where(planet.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PlanetDeleteOne{builder}\n}",
"func (c *PrescriptionClient) DeleteOneID(id int) *PrescriptionDeleteOne {\n\tbuilder := c.Delete().Where(prescription.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PrescriptionDeleteOne{builder}\n}",
"func (c *TransactionClient) DeleteOneID(id int32) *TransactionDeleteOne {\n\tbuilder := c.Delete().Where(transaction.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &TransactionDeleteOne{builder}\n}",
"func (c *SessionClient) DeleteOneID(id int) *SessionDeleteOne {\n\tbuilder := c.Delete().Where(session.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &SessionDeleteOne{builder}\n}",
"func (c *TitleClient) DeleteOneID(id int) *TitleDeleteOne {\n\tbuilder := c.Delete().Where(title.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &TitleDeleteOne{builder}\n}",
"func (c *PatientInfoClient) DeleteOneID(id int) *PatientInfoDeleteOne {\n\tbuilder := c.Delete().Where(patientinfo.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PatientInfoDeleteOne{builder}\n}",
"func (c *EatinghistoryClient) DeleteOneID(id int) *EatinghistoryDeleteOne {\n\tbuilder := c.Delete().Where(eatinghistory.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &EatinghistoryDeleteOne{builder}\n}",
"func (c *WifiClient) DeleteOneID(id int) *WifiDeleteOne {\n\tbuilder := c.Delete().Where(wifi.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &WifiDeleteOne{builder}\n}",
"func (c *FacultyClient) DeleteOneID(id int) *FacultyDeleteOne {\n\tbuilder := c.Delete().Where(faculty.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &FacultyDeleteOne{builder}\n}",
"func (c *WalletNodeClient) DeleteOneID(id int32) *WalletNodeDeleteOne {\n\tbuilder := c.Delete().Where(walletnode.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &WalletNodeDeleteOne{builder}\n}",
"func (c *ClubTypeClient) DeleteOneID(id int) *ClubTypeDeleteOne {\n\tbuilder := c.Delete().Where(clubtype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ClubTypeDeleteOne{builder}\n}",
"func (c *AppointmentClient) DeleteOneID(id uuid.UUID) *AppointmentDeleteOne {\n\tbuilder := c.Delete().Where(appointment.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &AppointmentDeleteOne{builder}\n}",
"func (c *PartorderClient) DeleteOneID(id int) *PartorderDeleteOne {\n\tbuilder := c.Delete().Where(partorder.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PartorderDeleteOne{builder}\n}",
"func (c *ClubClient) DeleteOneID(id int) *ClubDeleteOne {\n\tbuilder := c.Delete().Where(club.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ClubDeleteOne{builder}\n}",
"func (c *CoinInfoClient) DeleteOneID(id int32) *CoinInfoDeleteOne {\n\tbuilder := c.Delete().Where(coininfo.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &CoinInfoDeleteOne{builder}\n}",
"func (c *ClinicClient) DeleteOneID(id uuid.UUID) *ClinicDeleteOne {\n\tbuilder := c.Delete().Where(clinic.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ClinicDeleteOne{builder}\n}",
"func (c *TimerClient) DeleteOneID(id int) *TimerDeleteOne {\n\tbuilder := c.Delete().Where(timer.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &TimerDeleteOne{builder}\n}",
"func (c *ClubappStatusClient) DeleteOneID(id int) *ClubappStatusDeleteOne {\n\tbuilder := c.Delete().Where(clubappstatus.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ClubappStatusDeleteOne{builder}\n}",
"func (c *ActivityTypeClient) DeleteOneID(id int) *ActivityTypeDeleteOne {\n\tbuilder := c.Delete().Where(activitytype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ActivityTypeDeleteOne{builder}\n}",
"func (c *ModuleVersionClient) DeleteOneID(id int) *ModuleVersionDeleteOne {\n\treturn &ModuleVersionDeleteOne{c.Delete().Where(moduleversion.ID(id))}\n}",
"func (c *UsertypeClient) DeleteOneID(id int) *UsertypeDeleteOne {\n\tbuilder := c.Delete().Where(usertype.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &UsertypeDeleteOne{builder}\n}",
"func (c *ActivitiesClient) DeleteOneID(id int) *ActivitiesDeleteOne {\n\tbuilder := c.Delete().Where(activities.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &ActivitiesDeleteOne{builder}\n}",
"func (c *SituationClient) DeleteOneID(id int) *SituationDeleteOne {\n\tbuilder := c.Delete().Where(situation.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &SituationDeleteOne{builder}\n}",
"func (c *SkillClient) DeleteOneID(id int) *SkillDeleteOne {\n\tbuilder := c.Delete().Where(skill.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &SkillDeleteOne{builder}\n}",
"func (c *RentalstatusClient) DeleteOneID(id int) *RentalstatusDeleteOne {\n\tbuilder := c.Delete().Where(rentalstatus.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &RentalstatusDeleteOne{builder}\n}",
"func (c *BranchClient) DeleteOneID(id int) *BranchDeleteOne {\n\tbuilder := c.Delete().Where(branch.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &BranchDeleteOne{builder}\n}",
"func (c *YearClient) DeleteOneID(id int) *YearDeleteOne {\n\tbuilder := c.Delete().Where(year.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &YearDeleteOne{builder}\n}",
"func (c *PartClient) DeleteOneID(id int) *PartDeleteOne {\n\tbuilder := c.Delete().Where(part.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &PartDeleteOne{builder}\n}",
"func (c *TagClient) DeleteOneID(id int) *TagDeleteOne {\n\tbuilder := c.Delete().Where(tag.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &TagDeleteOne{builder}\n}",
"func (c *RepairinvoiceClient) DeleteOneID(id int) *RepairinvoiceDeleteOne {\n\tbuilder := c.Delete().Where(repairinvoice.ID(id))\n\tbuilder.mutation.id = &id\n\tbuilder.mutation.op = OpDeleteOne\n\treturn &RepairinvoiceDeleteOne{builder}\n}"
] |
[
"0.76778156",
"0.75968426",
"0.75511706",
"0.7541144",
"0.7539394",
"0.7526723",
"0.74882805",
"0.7487795",
"0.74769074",
"0.74767685",
"0.74631363",
"0.74613",
"0.7458024",
"0.745116",
"0.745116",
"0.7442616",
"0.7442616",
"0.7442616",
"0.743347",
"0.7425805",
"0.7422992",
"0.74197966",
"0.7418542",
"0.7399402",
"0.7396725",
"0.73856103",
"0.73840207",
"0.7375385",
"0.735778",
"0.73571473",
"0.73506707",
"0.73470324",
"0.7346839",
"0.7345604",
"0.7343301",
"0.73415756",
"0.7339983",
"0.7339983",
"0.73328143",
"0.7330048",
"0.7329202",
"0.7325914",
"0.7323134",
"0.7313714",
"0.7307478",
"0.7304015",
"0.72893864",
"0.7282448",
"0.72806984",
"0.72796077",
"0.7279311",
"0.72784746",
"0.7277576",
"0.7277483",
"0.72763735",
"0.72697914",
"0.7263448",
"0.72509044",
"0.7238351",
"0.7238351",
"0.7237803",
"0.72373664",
"0.723381",
"0.72292316",
"0.7228588",
"0.7228588",
"0.7228588",
"0.72245425",
"0.72225535",
"0.72206736",
"0.72152764",
"0.7205751",
"0.7203806",
"0.72032803",
"0.71952355",
"0.7193382",
"0.7190719",
"0.7189693",
"0.7165575",
"0.71655035",
"0.71611136",
"0.7160824",
"0.7160091",
"0.7155872",
"0.71474624",
"0.7144856",
"0.71436256",
"0.71384954",
"0.7131519",
"0.712696",
"0.7125728",
"0.71234626",
"0.7122792",
"0.71096176",
"0.7108689",
"0.71075124",
"0.7105292",
"0.7104324",
"0.7101526",
"0.7095171",
"0.7091349"
] |
0.0
|
-1
|
Query returns a query builder for UnsavedPostVideo.
|
func (c *UnsavedPostVideoClient) Query() *UnsavedPostVideoQuery {
return &UnsavedPostVideoQuery{
config: c.config,
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *UnsavedPostVideoClient) QueryUnsavedPost(upv *UnsavedPostVideo) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upv.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostvideo.Table, unsavedpostvideo.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostvideo.UnsavedPostTable, unsavedpostvideo.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upv.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) QueryVideos() *UnsavedPostVideoQuery {\n\tquery := &UnsavedPostVideoQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostvideo.Table, unsavedpostvideo.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.VideosTable, unsavedpost.VideosColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostClient) QueryVideos(up *UnsavedPost) *UnsavedPostVideoQuery {\n\tquery := &UnsavedPostVideoQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostvideo.Table, unsavedpostvideo.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.VideosTable, unsavedpost.VideosColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostThumbnailClient) QueryUnsavedPost(upt *UnsavedPostThumbnail) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upt.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, true, unsavedpostthumbnail.UnsavedPostTable, unsavedpostthumbnail.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upt.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostAttachmentClient) QueryUnsavedPost(upa *UnsavedPostAttachment) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upa.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostattachment.Table, unsavedpostattachment.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostattachment.UnsavedPostTable, unsavedpostattachment.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upa.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostVideoClient) Get(ctx context.Context, id int) (*UnsavedPostVideo, error) {\n\treturn c.Query().Where(unsavedpostvideo.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostImageClient) QueryUnsavedPost(upi *UnsavedPostImage) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upi.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostimage.Table, unsavedpostimage.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostimage.UnsavedPostTable, unsavedpostimage.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upi.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *AdminClient) QueryUnsavedPosts(a *Admin) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := a.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(admin.Table, admin.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, admin.UnsavedPostsTable, admin.UnsavedPostsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(a.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) WithVideos(opts ...func(*UnsavedPostVideoQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostVideoQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withVideos = query\n\treturn upq\n}",
"func (c *PostClient) QueryVideos(po *Post) *PostVideoQuery {\n\tquery := &PostVideoQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := po.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(post.Table, post.FieldID, id),\n\t\t\tsqlgraph.To(postvideo.Table, postvideo.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, post.VideosTable, post.VideosColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(po.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upu *UnsavedPostUpdate) ClearVideos() *UnsavedPostUpdate {\n\tupu.mutation.ClearVideos()\n\treturn upu\n}",
"func (upq *UnsavedPostQuery) Clone() *UnsavedPostQuery {\n\tif upq == nil {\n\t\treturn nil\n\t}\n\treturn &UnsavedPostQuery{\n\t\tconfig: upq.config,\n\t\tlimit: upq.limit,\n\t\toffset: upq.offset,\n\t\torder: append([]OrderFunc{}, upq.order...),\n\t\tpredicates: append([]predicate.UnsavedPost{}, upq.predicates...),\n\t\twithAuthor: upq.withAuthor.Clone(),\n\t\twithCategory: upq.withCategory.Clone(),\n\t\twithThumbnail: upq.withThumbnail.Clone(),\n\t\twithImages: upq.withImages.Clone(),\n\t\twithVideos: upq.withVideos.Clone(),\n\t\twithAttachments: upq.withAttachments.Clone(),\n\t\t// clone intermediate query.\n\t\tsql: upq.sql.Clone(),\n\t\tpath: upq.path,\n\t}\n}",
"func (c *UnsavedPostClient) Query() *UnsavedPostQuery {\n\treturn &UnsavedPostQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *UnsavedPostAttachmentClient) Query() *UnsavedPostAttachmentQuery {\n\treturn &UnsavedPostAttachmentQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *PostVideoClient) Query() *PostVideoQuery {\n\treturn &PostVideoQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *PostVideoClient) QueryPost(pv *PostVideo) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pv.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postvideo.Table, postvideo.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, postvideo.PostTable, postvideo.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pv.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *CategoryClient) QueryUnsavedPosts(ca *Category) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := ca.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(category.Table, category.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, category.UnsavedPostsTable, category.UnsavedPostsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(ca.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upuo *UnsavedPostUpdateOne) ClearVideos() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearVideos()\n\treturn upuo\n}",
"func (c *Category) QueryUnsavedPosts() *UnsavedPostQuery {\n\treturn (&CategoryClient{config: c.config}).QueryUnsavedPosts(c)\n}",
"func (c *UnsavedPostImageClient) Query() *UnsavedPostImageQuery {\n\treturn &UnsavedPostImageQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *UnsavedPostThumbnailClient) Query() *UnsavedPostThumbnailQuery {\n\treturn &UnsavedPostThumbnailQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (upq *UnsavedPostQuery) Where(ps ...predicate.UnsavedPost) *UnsavedPostQuery {\n\tupq.predicates = append(upq.predicates, ps...)\n\treturn upq\n}",
"func NewUnsavedPostVideoClient(c config) *UnsavedPostVideoClient {\n\treturn &UnsavedPostVideoClient{config: c}\n}",
"func (upvc *UnsavedPostVideoCreate) Save(ctx context.Context) (*UnsavedPostVideo, error) {\n\tvar (\n\t\terr error\n\t\tnode *UnsavedPostVideo\n\t)\n\tupvc.defaults()\n\tif len(upvc.hooks) == 0 {\n\t\tif err = upvc.check(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tnode, err = upvc.sqlSave(ctx)\n\t} else {\n\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\tmutation, ok := m.(*UnsavedPostVideoMutation)\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t}\n\t\t\tif err = upvc.check(); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tupvc.mutation = mutation\n\t\t\tnode, err = upvc.sqlSave(ctx)\n\t\t\tmutation.done = true\n\t\t\treturn node, err\n\t\t})\n\t\tfor i := len(upvc.hooks) - 1; i >= 0; i-- {\n\t\t\tmut = upvc.hooks[i](mut)\n\t\t}\n\t\tif _, err := mut.Mutate(ctx, upvc.mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn node, err\n}",
"func (upq *UnsavedPostQuery) QueryAttachments() *UnsavedPostAttachmentQuery {\n\tquery := &UnsavedPostAttachmentQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostattachment.Table, unsavedpostattachment.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.AttachmentsTable, unsavedpost.AttachmentsColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostVideoClient) Delete() *UnsavedPostVideoDelete {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpDelete)\n\treturn &UnsavedPostVideoDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostClient) QueryAttachments(up *UnsavedPost) *UnsavedPostAttachmentQuery {\n\tquery := &UnsavedPostAttachmentQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostattachment.Table, unsavedpostattachment.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.AttachmentsTable, unsavedpost.AttachmentsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) All(ctx context.Context) ([]*UnsavedPost, error) {\n\tif err := upq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn upq.sqlAll(ctx)\n}",
"func (c *PostVideoClient) Get(ctx context.Context, id int) (*PostVideo, error) {\n\treturn c.Query().Where(postvideo.ID(id)).Only(ctx)\n}",
"func (upvc *UnsavedPostVideoCreate) Mutation() *UnsavedPostVideoMutation {\n\treturn upvc.mutation\n}",
"func (uu *UserUpdate) ClearVideos() *UserUpdate {\n\tuu.mutation.ClearVideos()\n\treturn uu\n}",
"func (upu *UnsavedPostUpdate) Where(ps ...predicate.UnsavedPost) *UnsavedPostUpdate {\n\tupu.mutation.predicates = append(upu.mutation.predicates, ps...)\n\treturn upu\n}",
"func (upvcb *UnsavedPostVideoCreateBulk) Save(ctx context.Context) ([]*UnsavedPostVideo, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(upvcb.builders))\n\tnodes := make([]*UnsavedPostVideo, len(upvcb.builders))\n\tmutators := make([]Mutator, len(upvcb.builders))\n\tfor i := range upvcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := upvcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*UnsavedPostVideoMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, upvcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, upvcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, upvcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func WhereDraft(q *query.Query) *query.Query {\n\treturn q.Where(\"status = ?\", Draft)\n}",
"func (c *UnsavedPostClient) Get(ctx context.Context, id int) (*UnsavedPost, error) {\n\treturn c.Query().Where(unsavedpost.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostVideoClient) Update() *UnsavedPostVideoUpdate {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpUpdate)\n\treturn &UnsavedPostVideoUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func DBVideoToGQLVideo(i *dbm.Video) (o *gql.Video, err error) {\n\to = &gql.Video{\n\t\tID: *i.ID,\n\t\tTitle: i.Title,\n\t\tURL: *i.Url,\n\t}\n\treturn o, err\n}",
"func (upq *UnsavedPostQuery) QueryThumbnail() *UnsavedPostThumbnailQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, unsavedpost.ThumbnailTable, unsavedpost.ThumbnailColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (uuo *UserUpdateOne) ClearVideos() *UserUpdateOne {\n\tuuo.mutation.ClearVideos()\n\treturn uuo\n}",
"func (upq *UnsavedPostQuery) WithAttachments(opts ...func(*UnsavedPostAttachmentQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostAttachmentQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withAttachments = query\n\treturn upq\n}",
"func (i InputInlineQueryResultVideo) construct() InputInlineQueryResultClass { return &i }",
"func (c *UnsavedPostClient) QueryThumbnail(up *UnsavedPost) *UnsavedPostThumbnailQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, unsavedpost.ThumbnailTable, unsavedpost.ThumbnailColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (p *_Posts) Query(db database.DB, models ...*Post) *postsQueryBuilder {\n\tvar queryModels []mapping.Model\n\tif len(models) > 0 {\n\t\tqueryModels = make([]mapping.Model, len(models))\n\t\tfor i, model := range models {\n\t\t\tqueryModels[i] = model\n\t\t}\n\t}\n\tbuilder := db.Query(p.Model, queryModels...)\n\treturn &postsQueryBuilder{builder: builder}\n}",
"func (c *PostAttachmentClient) Query() *PostAttachmentQuery {\n\treturn &PostAttachmentQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (upvc *UnsavedPostVideoCreate) SetUnsavedPostID(id int) *UnsavedPostVideoCreate {\n\tupvc.mutation.SetUnsavedPostID(id)\n\treturn upvc\n}",
"func (upu *UnsavedPostUpdate) RemoveVideos(u ...*UnsavedPostVideo) *UnsavedPostUpdate {\n\tids := make([]int, len(u))\n\tfor i := range u {\n\t\tids[i] = u[i].ID\n\t}\n\treturn upu.RemoveVideoIDs(ids...)\n}",
"func (c *PostVideoClient) Delete() *PostVideoDelete {\n\tmutation := newPostVideoMutation(c.config, OpDelete)\n\treturn &PostVideoDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostVideoClient) Create() *UnsavedPostVideoCreate {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpCreate)\n\treturn &UnsavedPostVideoCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostAttachmentClient) QueryPost(pa *PostAttachment) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pa.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postattachment.Table, postattachment.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, postattachment.PostTable, postattachment.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pa.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upu *UnsavedPostUpdate) ClearAttachments() *UnsavedPostUpdate {\n\tupu.mutation.ClearAttachments()\n\treturn upu\n}",
"func (c *PostThumbnailClient) QueryPost(pt *PostThumbnail) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pt.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postthumbnail.Table, postthumbnail.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, true, postthumbnail.PostTable, postthumbnail.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pt.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) QueryImages() *UnsavedPostImageQuery {\n\tquery := &UnsavedPostImageQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostimage.Table, unsavedpostimage.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.ImagesTable, unsavedpost.ImagesColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func NewDropQuery() filters.Spec { return &modQuery{behavior: drop} }",
"func StreamQueryWithoutMessages() StreamQueryOpt {\n\treturn func(q *streamQuery) error {\n\t\tt := true\n\t\tq.empty = &t\n\t\treturn nil\n\t}\n}",
"func (upvc *UnsavedPostVideoCreate) SetUnsavedPost(u *UnsavedPost) *UnsavedPostVideoCreate {\n\treturn upvc.SetUnsavedPostID(u.ID)\n}",
"func (upuo *UnsavedPostUpdateOne) RemoveVideos(u ...*UnsavedPostVideo) *UnsavedPostUpdateOne {\n\tids := make([]int, len(u))\n\tfor i := range u {\n\t\tids[i] = u[i].ID\n\t}\n\treturn upuo.RemoveVideoIDs(ids...)\n}",
"func WhereSuspended(q *query.Query) *query.Query {\n\treturn q.Where(\"status = ?\", Suspended)\n}",
"func WherePublished(q *query.Query) *query.Query {\n\treturn q.Where(\"status >= ?\", Published)\n}",
"func (mq *MediaQuery) Clone() *MediaQuery {\n\tif mq == nil {\n\t\treturn nil\n\t}\n\treturn &MediaQuery{\n\t\tconfig: mq.config,\n\t\tctx: mq.ctx.Clone(),\n\t\torder: append([]OrderFunc{}, mq.order...),\n\t\tinters: append([]Interceptor{}, mq.inters...),\n\t\tpredicates: append([]predicate.Media{}, mq.predicates...),\n\t\t// clone intermediate query.\n\t\tsql: mq.sql.Clone(),\n\t\tpath: mq.path,\n\t}\n}",
"func (b *_Blogs) Query(db database.DB, models ...*Blog) *blogsQueryBuilder {\n\tvar queryModels []mapping.Model\n\tif len(models) > 0 {\n\t\tqueryModels = make([]mapping.Model, len(models))\n\t\tfor i, model := range models {\n\t\t\tqueryModels[i] = model\n\t\t}\n\t}\n\tbuilder := db.Query(b.Model, queryModels...)\n\treturn &blogsQueryBuilder{builder: builder}\n}",
"func (fctx *AvFormatContext) AvWriteUncodedFrameQuery(streamIdx int) int {\n\treturn int(C.av_write_uncoded_frame_query((*C.struct_AVFormatContext)(fctx), C.int(streamIdx)))\n}",
"func (g *BaseGenerator) GenerateEmptyQuery() query.Query {\n\treturn query.NewMysqlRequest()\n}",
"func (query *Query) CleanQuery() *Query {\n\tquery.content = make(map[string]interface{})\n\treturn query\n}",
"func (wq *WidgetQuery) Clone() *WidgetQuery {\n\tif wq == nil {\n\t\treturn nil\n\t}\n\treturn &WidgetQuery{\n\t\tconfig: wq.config,\n\t\tlimit: wq.limit,\n\t\toffset: wq.offset,\n\t\torder: append([]OrderFunc{}, wq.order...),\n\t\tpredicates: append([]predicate.Widget{}, wq.predicates...),\n\t\twithType: wq.withType.Clone(),\n\t\t// clone intermediate query.\n\t\tsql: wq.sql.Clone(),\n\t\tpath: wq.path,\n\t}\n}",
"func NewGraphqlPostUnauthorized() *GraphqlPostUnauthorized {\n\n\treturn &GraphqlPostUnauthorized{}\n}",
"func GetRecentPostMediaNoLogin(username string) (medias []IGMedia, err error) {\n\tui, err := GetUserInfoNoLogin(username)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tfor _, node := range ui.EdgeOwnerToTimelineMedia.Edges {\n\t\tmedias = append(medias, node.Node)\n\t}\n\treturn\n}",
"func (tracks *TrackCollection) Query(ctx context.Context) (query_interfaces.SelectQuery, error) {\n\ttracks.options = ctx.QueryParams()\n\tqueryType := \"\"\n\tif tracks.options.Has(\"type\") {\n\t\tqueryType = strings.ToLower(tracks.options.Get(\"type\").StrSlice()[0])\n\t}\n\tvar query query_interfaces.WhereQuery\n\tref := new(Track)\n\tbaseQuery := datastore.Query(ref)\n\tswitch queryType {\n\tcase \"admin\":\n\t\taccess, err := util.Authorize(ctx)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tuserId := int64(-1)\n\t\tif access != nil {\n\t\t\tuserId = access.UserId\n\t\t}\n\t\tmapRef := new(ArtistUser)\n\t\tquery = baseQuery.Join(mapRef).\n\t\t\tOn().\n\t\t\tEqual(&ref.Artist, &mapRef.Artist).\n\t\t\tWhere().\n\t\t\tEqual(&mapRef.User, userId)\n\tcase \"\":\n\t\tquery = baseQuery.(query_interfaces.WhereQuery)\n\tdefault:\n\t\tmessage := \"Error: Live event type \" + tracks.options.Get(\"type\").Str() + \" not understood.\"\n\t\treturn nil, errors.New(message)\n\t}\n\treturn query, nil\n}",
"func (c *PostImageClient) QueryPost(pi *PostImage) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pi.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postimage.Table, postimage.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, postimage.PostTable, postimage.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pi.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) WithThumbnail(opts ...func(*UnsavedPostThumbnailQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withThumbnail = query\n\treturn upq\n}",
"func (c *UnsavedPostThumbnailClient) Get(ctx context.Context, id int) (*UnsavedPostThumbnail, error) {\n\treturn c.Query().Where(unsavedpostthumbnail.ID(id)).Only(ctx)\n}",
"func (upu *UnsavedPostUpdate) RemoveVideoIDs(ids ...int) *UnsavedPostUpdate {\n\tupu.mutation.RemoveVideoIDs(ids...)\n\treturn upu\n}",
"func (upu *UnsavedPostUpdate) ClearContent() *UnsavedPostUpdate {\n\tupu.mutation.ClearContent()\n\treturn upu\n}",
"func (builder *QueryBuilder[K, F]) Query() Query[K, F] {\n\tif len(builder.query.Conditions) == 0 {\n\t\tbuilder.Where(defaultFilter[K, F]{})\n\t}\n\tif len(builder.query.Aggregators) == 0 {\n\t\tbuilder.Aggregate(defaultAggregator[K, F]{})\n\t}\n\tbuilder.query.results = &Result[K, F]{\n\t\tentries: make(map[ResultKey]*ResultEntry[K, F]),\n\t}\n\treturn builder.query\n}",
"func (d *mongoDriver) getPendingQuery(q bson.M) bson.M {\n\tq[\"status.completed\"] = false\n\tq[\"status.in_prog\"] = false\n\treturn q\n}",
"func (upvc *UnsavedPostVideoCreate) check() error {\n\tif _, ok := upvc.mutation.UUID(); !ok {\n\t\treturn &ValidationError{Name: \"uuid\", err: errors.New(\"ent: missing required field \\\"uuid\\\"\")}\n\t}\n\tif v, ok := upvc.mutation.UUID(); ok {\n\t\tif err := unsavedpostvideo.UUIDValidator(v); err != nil {\n\t\t\treturn &ValidationError{Name: \"uuid\", err: fmt.Errorf(\"ent: validator failed for field \\\"uuid\\\": %w\", err)}\n\t\t}\n\t}\n\tif _, ok := upvc.mutation.Validity(); !ok {\n\t\treturn &ValidationError{Name: \"validity\", err: errors.New(\"ent: missing required field \\\"validity\\\"\")}\n\t}\n\tif v, ok := upvc.mutation.Validity(); ok {\n\t\tif err := unsavedpostvideo.ValidityValidator(v); err != nil {\n\t\t\treturn &ValidationError{Name: \"validity\", err: fmt.Errorf(\"ent: validator failed for field \\\"validity\\\": %w\", err)}\n\t\t}\n\t}\n\tif v, ok := upvc.mutation.Title(); ok {\n\t\tif err := unsavedpostvideo.TitleValidator(v); err != nil {\n\t\t\treturn &ValidationError{Name: \"title\", err: fmt.Errorf(\"ent: validator failed for field \\\"title\\\": %w\", err)}\n\t\t}\n\t}\n\tif v, ok := upvc.mutation.URL(); ok {\n\t\tif err := unsavedpostvideo.URLValidator(v); err != nil {\n\t\t\treturn &ValidationError{Name: \"url\", err: fmt.Errorf(\"ent: validator failed for field \\\"url\\\": %w\", err)}\n\t\t}\n\t}\n\tif _, ok := upvc.mutation.CreatedAt(); !ok {\n\t\treturn &ValidationError{Name: \"created_at\", err: errors.New(\"ent: missing required field \\\"created_at\\\"\")}\n\t}\n\tif _, ok := upvc.mutation.UnsavedPostID(); !ok {\n\t\treturn &ValidationError{Name: \"unsaved_post\", err: errors.New(\"ent: missing required edge \\\"unsaved_post\\\"\")}\n\t}\n\treturn nil\n}",
"func (c *UnsavedPostAttachmentClient) Get(ctx context.Context, id int) (*UnsavedPostAttachment, error) {\n\treturn c.Query().Where(unsavedpostattachment.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostClient) QueryImages(up *UnsavedPost) *UnsavedPostImageQuery {\n\tquery := &UnsavedPostImageQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostimage.Table, unsavedpostimage.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.ImagesTable, unsavedpost.ImagesColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func PublishedAtNotIn(vs ...time.Time) predicate.GithubRelease {\n\treturn predicate.GithubRelease(sql.FieldNotIn(FieldPublishedAt, vs...))\n}",
"func (c *UnsavedPostImageClient) Get(ctx context.Context, id int) (*UnsavedPostImage, error) {\n\treturn c.Query().Where(unsavedpostimage.ID(id)).Only(ctx)\n}",
"func (p AuditSinceParameters) ToQuery() string {\n\treturn paramsToQuery(p)\n}",
"func (c *PostClient) QueryAttachments(po *Post) *PostAttachmentQuery {\n\tquery := &PostAttachmentQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := po.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(post.Table, post.FieldID, id),\n\t\t\tsqlgraph.To(postattachment.Table, postattachment.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, post.AttachmentsTable, post.AttachmentsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(po.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (vq *VehicleQuery) Clone() *VehicleQuery {\n\tif vq == nil {\n\t\treturn nil\n\t}\n\treturn &VehicleQuery{\n\t\tconfig: vq.config,\n\t\tlimit: vq.limit,\n\t\toffset: vq.offset,\n\t\torder: append([]OrderFunc{}, vq.order...),\n\t\tpredicates: append([]predicate.Vehicle{}, vq.predicates...),\n\t\twithMetadata: vq.withMetadata.Clone(),\n\t\twithRegistrations: vq.withRegistrations.Clone(),\n\t\twithMake: vq.withMake.Clone(),\n\t\twithModel: vq.withModel.Clone(),\n\t\twithMajorColor: vq.withMajorColor.Clone(),\n\t\twithMinorColor: vq.withMinorColor.Clone(),\n\t\twithClass: vq.withClass.Clone(),\n\t\t// clone intermediate query.\n\t\tsql: vq.sql.Clone(),\n\t\tpath: vq.path,\n\t}\n}",
"func StreamQueryInvert() StreamQueryOpt {\n\treturn func(q *streamQuery) error {\n\t\tq.invert = true\n\t\treturn nil\n\t}\n}",
"func (upu *UnsavedPostUpdate) AddVideos(u ...*UnsavedPostVideo) *UnsavedPostUpdate {\n\tids := make([]int, len(u))\n\tfor i := range u {\n\t\tids[i] = u[i].ID\n\t}\n\treturn upu.AddVideoIDs(ids...)\n}",
"func (upq *UnsavedPostQuery) Limit(limit int) *UnsavedPostQuery {\n\tupq.limit = &limit\n\treturn upq\n}",
"func UnpublishPost(shorturl string) (types.Post, error) {\n\tdb := database.GetMySQLInstance()\n\tdefer db.Close()\n\tvar post types.Post\n\terr := db.Where(\"shorturl LIKE ?\", shorturl).First(&post).Error\n\tif err != nil && err == gorm.ErrRecordNotFound {\n\t\treturn post, errors.New(\"post not found\")\n\t}\n\n\terr = db.Model(&post).Updates(map[string]interface{}{\"published\": false}).Error\n\tif err != nil {\n\t\treturn post, err\n\t}\n\tpost.Published = false\n\treturn post, nil\n}",
"func (upu *UnsavedPostUpdate) ClearSlug() *UnsavedPostUpdate {\n\tupu.mutation.ClearSlug()\n\treturn upu\n}",
"func (upq *UnsavedPostQuery) Unique(unique bool) *UnsavedPostQuery {\n\tupq.unique = &unique\n\treturn upq\n}",
"func (fq *ForumQuery) Clone() *ForumQuery {\n\treturn &ForumQuery{\n\t\tconfig: fq.config,\n\t\tlimit: fq.limit,\n\t\toffset: fq.offset,\n\t\torder: append([]OrderFunc{}, fq.order...),\n\t\tunique: append([]string{}, fq.unique...),\n\t\tpredicates: append([]predicate.Forum{}, fq.predicates...),\n\t\t// clone intermediate query.\n\t\tsql: fq.sql.Clone(),\n\t\tpath: fq.path,\n\t}\n}",
"func (upq *UnsavedPostQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := upq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn upq.sqlExist(ctx)\n}",
"func (q *Query) Reverse() *Query {\n\tq.reverse = true\n\treturn q\n}",
"func (p EmptyParameters) ToQuery() string {\n\treturn \"\"\n}",
"func (c *PostClient) Query() *PostQuery {\n\treturn &PostQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (q Query) Reverse() Query {\n\treturn Query{\n\t\tIterate: func() Iterator {\n\t\t\tnext := q.Iterate()\n\t\t\tvar readDone = false\n\t\t\tvar readError error\n\t\t\tvar index int\n\n\t\t\tvar items = make([]Record, 0, 16)\n\n\t\t\treturn func(ctx Context) (item Record, err error) {\n\t\t\t\tif !readDone {\n\t\t\t\t\tif readError != nil {\n\t\t\t\t\t\terr = readError\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\n\t\t\t\t\tfor {\n\t\t\t\t\t\tcurrent, err := next(ctx)\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\tif !IsNoRows(err) {\n\t\t\t\t\t\t\t\treadError = err\n\t\t\t\t\t\t\t\treturn Record{}, err\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\titems = append(items, current)\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = len(items) - 1\n\t\t\t\t\treadDone = true\n\t\t\t\t}\n\n\t\t\t\tif index < 0 {\n\t\t\t\t\terr = ErrNoRows\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\titem = items[index]\n\t\t\t\tindex--\n\t\t\t\treturn\n\t\t\t}\n\t\t},\n\t}\n}",
"func (p *postsQueryBuilder) Get() (*Post, error) {\n\tif p.err != nil {\n\t\treturn nil, p.err\n\t}\n\tmodel, err := p.builder.Get()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn model.(*Post), nil\n}",
"func (upuo *UnsavedPostUpdateOne) ClearAttachments() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearAttachments()\n\treturn upuo\n}",
"func NewQueryForSubmission() *datastore.Query {\n\treturn datastore.NewQuery(\"Submission\")\n}",
"func (mvq *ModuleVersionQuery) Clone() *ModuleVersionQuery {\n\treturn &ModuleVersionQuery{\n\t\tconfig: mvq.config,\n\t\tlimit: mvq.limit,\n\t\toffset: mvq.offset,\n\t\torder: append([]Order{}, mvq.order...),\n\t\tunique: append([]string{}, mvq.unique...),\n\t\tpredicates: append([]predicate.ModuleVersion{}, mvq.predicates...),\n\t\t// clone intermediate queries.\n\t\tsql: mvq.sql.Clone(),\n\t}\n}",
"func (upu *UnsavedPostUpdate) AddVideoIDs(ids ...int) *UnsavedPostUpdate {\n\tupu.mutation.AddVideoIDs(ids...)\n\treturn upu\n}",
"func (upuo *UnsavedPostUpdateOne) AddVideos(u ...*UnsavedPostVideo) *UnsavedPostUpdateOne {\n\tids := make([]int, len(u))\n\tfor i := range u {\n\t\tids[i] = u[i].ID\n\t}\n\treturn upuo.AddVideoIDs(ids...)\n}"
] |
[
"0.7125723",
"0.6615102",
"0.6536997",
"0.6153294",
"0.6105778",
"0.60727686",
"0.5949391",
"0.5875738",
"0.58239484",
"0.5821828",
"0.57830745",
"0.56542194",
"0.5626153",
"0.5614371",
"0.56088597",
"0.5506364",
"0.5459592",
"0.5347934",
"0.5207234",
"0.5098912",
"0.5080658",
"0.4940939",
"0.49389246",
"0.49230757",
"0.49122638",
"0.49001676",
"0.4868661",
"0.48635975",
"0.48260626",
"0.4820241",
"0.4759712",
"0.46780735",
"0.46097568",
"0.4597255",
"0.45603767",
"0.45452043",
"0.45250636",
"0.44598195",
"0.44213572",
"0.4308694",
"0.42931858",
"0.42766154",
"0.42722777",
"0.42559075",
"0.42223555",
"0.42150137",
"0.42142293",
"0.4190398",
"0.41824412",
"0.41713676",
"0.4161758",
"0.4106453",
"0.41001314",
"0.40639165",
"0.4056314",
"0.40543368",
"0.40276104",
"0.401211",
"0.40065655",
"0.40017083",
"0.39970136",
"0.39954466",
"0.39758602",
"0.39748898",
"0.39737603",
"0.3965333",
"0.395428",
"0.39433843",
"0.39372897",
"0.3927957",
"0.39115795",
"0.39009312",
"0.3898481",
"0.38828492",
"0.38787815",
"0.38780466",
"0.38777378",
"0.38682273",
"0.38658533",
"0.38574898",
"0.38509586",
"0.3844219",
"0.3837094",
"0.38333294",
"0.3833242",
"0.38066062",
"0.37946126",
"0.3786959",
"0.37680432",
"0.37679392",
"0.3766461",
"0.37581176",
"0.37443203",
"0.3744162",
"0.3723242",
"0.37158516",
"0.37060413",
"0.3701322",
"0.36998174",
"0.36970586"
] |
0.70654273
|
1
|
Get returns a UnsavedPostVideo entity by its id.
|
func (c *UnsavedPostVideoClient) Get(ctx context.Context, id int) (*UnsavedPostVideo, error) {
return c.Query().Where(unsavedpostvideo.ID(id)).Only(ctx)
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *PostVideoClient) Get(ctx context.Context, id int) (*PostVideo, error) {\n\treturn c.Query().Where(postvideo.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostClient) Get(ctx context.Context, id int) (*UnsavedPost, error) {\n\treturn c.Query().Where(unsavedpost.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostThumbnailClient) Get(ctx context.Context, id int) (*UnsavedPostThumbnail, error) {\n\treturn c.Query().Where(unsavedpostthumbnail.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostAttachmentClient) Get(ctx context.Context, id int) (*UnsavedPostAttachment, error) {\n\treturn c.Query().Where(unsavedpostattachment.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostVideoClient) GetX(ctx context.Context, id int) *UnsavedPostVideo {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *UnsavedPostImageClient) Get(ctx context.Context, id int) (*UnsavedPostImage, error) {\n\treturn c.Query().Where(unsavedpostimage.ID(id)).Only(ctx)\n}",
"func (upvc *UnsavedPostVideoCreate) Save(ctx context.Context) (*UnsavedPostVideo, error) {\n\tvar (\n\t\terr error\n\t\tnode *UnsavedPostVideo\n\t)\n\tupvc.defaults()\n\tif len(upvc.hooks) == 0 {\n\t\tif err = upvc.check(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tnode, err = upvc.sqlSave(ctx)\n\t} else {\n\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\tmutation, ok := m.(*UnsavedPostVideoMutation)\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t}\n\t\t\tif err = upvc.check(); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tupvc.mutation = mutation\n\t\t\tnode, err = upvc.sqlSave(ctx)\n\t\t\tmutation.done = true\n\t\t\treturn node, err\n\t\t})\n\t\tfor i := len(upvc.hooks) - 1; i >= 0; i-- {\n\t\t\tmut = upvc.hooks[i](mut)\n\t\t}\n\t\tif _, err := mut.Mutate(ctx, upvc.mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn node, err\n}",
"func (v *videoService) GetById(ctx context.Context, req *pbVideo.GetVideoRequest, res *pbVideo.GetVideoResponse) error {\n\tif req.Id == \"\" {\n\t\treturn errors.MissingVideoId\n\t}\n\n\tvideo, err := v.videoRepository.FindById(req.Id)\n\tif err != nil {\n\t\tlog.Info().Str(\"video\", req.Id).Msg(\"unable to find video\")\n\t\treturn errors.VideoNotFound\n\t}\n\n\terrorCount := len(video.Transcode.Errors)\n\ttrError := false\n\n\tif errorCount >= 1 {\n\t\ttrError = true\n\t} else {\n\t\ttrError = false\n\t}\n\tres.SignedUrl, err = v.s3Bucket.GetSignedResourceURL(video.Storage.OutputKey)\n\tif err != nil {\n\t\tlog.Warn().Err(err).Str(\"video\", req.Id).Msg(\"unable to fetch signed url for video\")\n\t}\n\n\t// count the view\n\terr = v.videoRepository.IncrementViews(video.ID)\n\tif err != nil {\n\t log.Warn().Err(err).Str(\"video\", video.ID.Hex()).Msg(\"unable to increment view counter\")\n\t}\n\t// TODO: publish video.events.view\n\n\tres.Video = &pbVideo.VideoDetails{\n\t\tId: video.ID.Hex(),\n\t\tTitle: video.Title,\n\t\tDescription: video.Description,\n\t\tTags: video.Tags,\n\t\tStorage: &pbVideo.VideoStorage{\n\t\t\tRawKey: video.Storage.RawKey,\n\t\t\tTranscodedKey: video.Storage.OutputKey,\n\t\t},\n\t\tStatistics: &pbVideo.VideoStatistics{\n\t\t\tViewCount: video.Statistics.ViewCount,\n\t\t},\n\t\tStatus: &pbVideo.VideoStatus{\n\t\t\tCompleted: video.Transcode.Completed,\n\t\t\tError: trError,\n\t\t\tErrorMessages: video.Transcode.Errors,\n\t\t},\n\t}\n\n\treturn nil\n}",
"func (video *FakeVideo) GetVideo(userID string, id int) (err error) {\n\tjsonFile, err := os.Open(\"testdata/fake_videos.json\")\n\n\tif err != nil {\n\t\treturn\n\t}\n\n\tdefer jsonFile.Close()\n\n\tjsonData, err := ioutil.ReadAll(jsonFile)\n\n\tif err != nil {\n\t\treturn\n\t}\n\n\tvar fakeVideos []FakeVideo\n\tjson.Unmarshal(jsonData, &fakeVideos)\n\n\tfor _, fakeVideo := range fakeVideos {\n\t\tif fakeVideo.ID == id && fakeVideo.CreatedBy == userID {\n\n\t\t\tvideo.ID = fakeVideo.ID\n\t\t\tvideo.Name = fakeVideo.Name\n\t\t\tvideo.URL = fakeVideo.URL\n\t\t\tvideo.YoutubeVideoID = fakeVideo.YoutubeVideoID\n\n\t\t\treturn\n\t\t}\n\t}\n\n\terr = errors.New(\"no corresponding video found\")\n\n\treturn\n}",
"func NewUnsavedPostVideoClient(c config) *UnsavedPostVideoClient {\n\treturn &UnsavedPostVideoClient{config: c}\n}",
"func (c *UnsavedPostVideoClient) Delete() *UnsavedPostVideoDelete {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpDelete)\n\treturn &UnsavedPostVideoDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *PostVideoClient) GetX(ctx context.Context, id int) *PostVideo {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (a *ApiV2) GetVideo(id string) (video VideoV2, err error) {\n\tvar resp VideoResp\n\tif !common.ValidUUID(id) {\n\t\treturn video, common.NewError(\"video id '%s' is invalid\", id)\n\t}\n\tuuid := common.ConvertToUUIDFormat(id)\n\turl := a.getBaseUrl() + \"/videos/\" + uuid\n\treq, err := a.makeRequest(\"GET\", url, nil)\n\tif err != nil {\n\t\treturn video, err\n\t}\n\terr = handleReq(a, req, &resp)\n\tif err != nil {\n\t\treturn video, err\n\t}\n\tvideo = resp.Video\n\ta.SetApi(&video)\n\treturn video, nil\n}",
"func (ivr InMemoryVideoRepository) Retrieve(id string) (*Video, error) {\n\tv, ok := ivr.storage[id]\n\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"no video with id %s in storage\", id)\n\t}\n\n\treturn v, nil\n}",
"func (c *PostClient) Get(ctx context.Context, id int) (*Post, error) {\n\treturn c.Query().Where(post.ID(id)).Only(ctx)\n}",
"func (upvc *UnsavedPostVideoCreate) SetUnsavedPostID(id int) *UnsavedPostVideoCreate {\n\tupvc.mutation.SetUnsavedPostID(id)\n\treturn upvc\n}",
"func (c *PostAttachmentClient) Get(ctx context.Context, id int) (*PostAttachment, error) {\n\treturn c.Query().Where(postattachment.ID(id)).Only(ctx)\n}",
"func (s *GroupsService) GetVideo(gr string, vid int, opt ...CallOption) (*Video, *Response, error) {\n\tu := fmt.Sprintf(\"groups/%s/videos/%d\", gr, vid)\n\tvideo, resp, err := getVideo(s.client, u, opt...)\n\n\treturn video, resp, err\n}",
"func (c *MediaClient) Get(ctx context.Context, id int) (*Media, error) {\n\treturn c.Query().Where(media.ID(id)).Only(ctx)\n}",
"func (s service) GetPost(id uint) (*Post, error) {\n\tp, err := (*s.repo).GetPost(id)\n\tif err != nil {\n\t\treturn nil, ErrPostNotFound\n\t}\n\n\treturn p, err\n}",
"func (c *PostThumbnailClient) Get(ctx context.Context, id int) (*PostThumbnail, error) {\n\treturn c.Query().Where(postthumbnail.ID(id)).Only(ctx)\n}",
"func (c *PostImageClient) Get(ctx context.Context, id int) (*PostImage, error) {\n\treturn c.Query().Where(postimage.ID(id)).Only(ctx)\n}",
"func (upvc *UnsavedPostVideoCreate) SetUnsavedPost(u *UnsavedPost) *UnsavedPostVideoCreate {\n\treturn upvc.SetUnsavedPostID(u.ID)\n}",
"func (repository *MockVideoRepository) GetVideoDetails(videoID string) (Video, error) {\n\tfor _, v := range repository.videos {\n\t\tif v.ID == videoID {\n\t\t\treturn v, repository.errorToReturn\n\t\t}\n\t}\n\treturn Video{}, errors.New(\"Invalid video requested. ID=\" + videoID)\n}",
"func (s *MockStore) GetPost(id int) (p Post, err error) {\n\tp, ok := s.mem[id]\n\tif !ok {\n\t\terr = errors.New(\"Could not find a post with that id.\")\n\t}\n\treturn p, err\n}",
"func (c *UnsavedPostVideoClient) Update() *UnsavedPostVideoUpdate {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpUpdate)\n\treturn &UnsavedPostVideoUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func GetPost(w http.ResponseWriter, r *http.Request, app api.AppServicer) (interface{}, error) {\n\tenv := app.(api.AppService)\n\tvars := mux.Vars(r)\n\tid, _ := strconv.Atoi(vars[\"id\"])\n\tpost := &models.Post{ID: id}\n\n\terr := post.GetPost(env.DB)\n\treturn post, err\n}",
"func (time *Timeline) Get() *FeedMedia {\n\tinsta := time.inst\n\tmedia := &FeedMedia{}\n\tmedia.inst = insta\n\tmedia.endpoint = urlTimeline\n\treturn media\n}",
"func (c *UnsavedPostVideoClient) QueryUnsavedPost(upv *UnsavedPostVideo) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upv.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostvideo.Table, unsavedpostvideo.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostvideo.UnsavedPostTable, unsavedpostvideo.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upv.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostClient) GetX(ctx context.Context, id int) *UnsavedPost {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (s *BlugService) GetPost(ctx context.Context, id int) (post *models.Post, err error) {\n\tdefer func(begin time.Time) {\n\t\ts.Logger.Info(\n\t\t\t\"blug\",\n\t\t\tzap.String(\"method\", \"getpost\"),\n\t\t\tzap.Int(\"id\", id),\n\t\t\tzap.NamedError(\"err\", err),\n\t\t\tzap.Duration(\"took\", time.Since(begin)),\n\t\t)\n\t}(time.Now())\n\n\tpost, err = s.DB.GetPost(id)\n\n\treturn post, err\n}",
"func (repo *Posts) Post(id graphql.ID) *models.Post {\n\treturn repo.posts[id]\n}",
"func GetPost(id int) (post Post, err error) {\n\tpost = Post{}\n\terr = Db.QueryRow(\"select * from posts where id = $1\", id).Scan(&post.ID, &post.Title, &post.Body, &post.CreatedAt)\n\treturn\n}",
"func (o *EquipmentFanModule) GetVid() string {\n\tif o == nil || o.Vid == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\treturn *o.Vid\n}",
"func (m *MovieModel) Get(id int64) (*Movie, error) {\n\t// The postgresql bigserial type starts autoincrementing at 1.\n\t// No movies will have a value below 1.\n\tif id < 1 {\n\t\treturn nil, ErrRecordNotFound\n\t}\n\n\t// Sql query\n\t// pq_sleep(10) to simulate a long running query\n\t// stmt := `SELECT pg_sleep(10),id,created_at,title,year,runtime,genres,version\n\t// \t\t\t\t FROM movies\n\t// \t\t\t\t WHERE id = $1`\n\tstmt := `SELECT id,created_at,title,year,runtime,genres,version\n\t\t\t\t\t FROM movies\n\t\t\t\t\t WHERE id = $1`\n\t// declare a movie\n\tvar movie Movie\n\n\t// ctx.WithTimeout() funciton to carry a 3 second timeout deadline.\n\t// emtpy context.Background() is the parent context\n\tctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)\n\n\t// IMPORTANT, use defer cancel() so we can cancel the context before Get() returns.\n\tdefer cancel()\n\n\t// Execute the query NOTE: that we have to use pg.Array() here\n\t// err := m.DB.QueryRow(stmt, id).Scan(\n\t// \t&[]byte{}, // for the pg_sleep(10)\n\t// \t&movie.ID,\n\t// \t&movie.CreatedAt,\n\t// \t&movie.Title,\n\t// \t&movie.Year,\n\t// \t&movie.Runtime,\n\t// \tpq.Array(&movie.Genres),\n\t// \t&movie.Version,\n\t// )\n\terr := m.DB.QueryRowContext(ctx, stmt, id).Scan(\n\t\t&movie.ID,\n\t\t&movie.CreatedAt,\n\t\t&movie.Title,\n\t\t&movie.Year,\n\t\t&movie.Runtime,\n\t\tpq.Array(&movie.Genres),\n\t\t&movie.Version,\n\t)\n\n\tif err != nil {\n\t\tswitch {\n\t\tcase errors.Is(err, sql.ErrNoRows):\n\t\t\treturn nil, ErrRecordNotFound\n\t\tdefault:\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn &movie, err\n}",
"func (c *UnsavedPostVideoClient) Create() *UnsavedPostVideoCreate {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpCreate)\n\treturn &UnsavedPostVideoCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c BlogPostItem) Get(id int64) revel.Result {\n\tblogitem := new(models.BlogPost)\n\terr := c.Txn.SelectOne(blogitem,\n\t\t`SELECT * FROM BlogPost WHERE id = ?`, id)\n\tif err != nil {\n\t\treturn c.RenderText(\"Error. BlogPost probably doesn't exist.\")\n\t}\n\treturn c.RenderJson(blogitem)\n}",
"func GetVideo(router *gin.RouterGroup) {\n\trouter.GET(\"/videos/:hash/:token/:type\", func(c *gin.Context) {\n\t\tif InvalidPreviewToken(c) {\n\t\t\tc.Data(http.StatusForbidden, \"image/svg+xml\", brokenIconSvg)\n\t\t\treturn\n\t\t}\n\n\t\tfileHash := c.Param(\"hash\")\n\t\ttypeName := c.Param(\"type\")\n\n\t\t_, ok := video.Types[typeName]\n\n\t\tif !ok {\n\t\t\tlog.Errorf(\"video: invalid type %s\", txt.Quote(typeName))\n\t\t\tc.Data(http.StatusOK, \"image/svg+xml\", videoIconSvg)\n\t\t\treturn\n\t\t}\n\n\t\tf, err := query.FileByHash(fileHash)\n\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"video: %s\", err.Error())\n\t\t\tc.Data(http.StatusOK, \"image/svg+xml\", videoIconSvg)\n\t\t\treturn\n\t\t}\n\n\t\tif !f.FileVideo {\n\t\t\tf, err = query.VideoByPhotoUID(f.PhotoUID)\n\n\t\t\tif err != nil {\n\t\t\t\tlog.Errorf(\"video: %s\", err.Error())\n\t\t\t\tc.Data(http.StatusOK, \"image/svg+xml\", videoIconSvg)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\n\t\tif f.FileError != \"\" {\n\t\t\tlog.Errorf(\"video: file error %s\", f.FileError)\n\t\t\tc.Data(http.StatusOK, \"image/svg+xml\", videoIconSvg)\n\t\t\treturn\n\t\t}\n\n\t\tfileName := photoprism.FileName(f.FileRoot, f.FileName)\n\n\t\tif !fs.FileExists(fileName) {\n\t\t\tlog.Errorf(\"video: file %s is missing\", txt.Quote(f.FileName))\n\t\t\tc.Data(http.StatusOK, \"image/svg+xml\", videoIconSvg)\n\n\t\t\t// Set missing flag so that the file doesn't show up in search results anymore.\n\t\t\tlogError(\"video\", f.Update(\"FileMissing\", true))\n\n\t\t\treturn\n\t\t}\n\n\t\tif c.Query(\"download\") != \"\" {\n\t\t\tc.FileAttachment(fileName, f.ShareFileName())\n\t\t} else {\n\t\t\tc.File(fileName)\n\t\t}\n\n\t\treturn\n\t})\n}",
"func (box *EntityBox) Get(id uint64) (*Entity, error) {\n\tobject, err := box.Box.Get(id)\n\tif err != nil {\n\t\treturn nil, err\n\t} else if object == nil {\n\t\treturn nil, nil\n\t}\n\treturn object.(*Entity), nil\n}",
"func (model *SnippetModel) Get(id int) (*models.Snippet, error) {\n\tstmt := ` SELECT id, title, content, created, expires FROM snippets\n\tWHERE expires > UTC_TIMESTAMP() AND id = ?`\n\n\tsnippet := &models.Snippet{}\n\n\terr := model.DB.QueryRow(stmt, id).Scan(&snippet.ID, &snippet.Title, &snippet.Content, &snippet.Created, &snippet.Expires)\n\tif err != nil {\n\t\tif errors.Is(err, sql.ErrNoRows) {\n\t\t\treturn nil, models.ErrNoRecord\n\t\t}\n\n\t\treturn nil, err\n\t}\n\n\treturn snippet, nil\n}",
"func NewVideo(title, fileName string, id int64, createdBy *Profile) *Video {\n\tv := &Video{\n\t\tTitle: title,\n\t\tFileName: fileName,\n\t\tID: id,\n\t\tCreated: time.Now(),\n\t\tCreatedByID: createdBy.ID,\n\t}\n\n\treturn v\n}",
"func (d *Dao) NewVideo(c context.Context, filename string) (v *archive.Video, err error) {\n\thash64 := int64(farm.Hash64([]byte(filename)))\n\trow := d.db.QueryRow(c, _newVideoByFnSQL, hash64, filename)\n\tv = &archive.Video{}\n\tvar avrState, vState int16\n\tif err = row.Scan(&v.ID, &v.Filename, &v.Cid, &v.Aid, &v.Title, &v.Desc, &v.SrcType, &v.Duration, &v.Filesize, &v.Resolutions,\n\t\t&v.Playurl, &v.FailCode, &v.Index, &v.Attribute, &v.XcodeState, &avrState, &vState, &v.CTime, &v.MTime); err != nil {\n\t\tif err == sql.ErrNoRows {\n\t\t\tv = nil\n\t\t\terr = nil\n\t\t} else {\n\t\t\tlog.Error(\"row.Scan error(%v)\", err)\n\t\t}\n\t\treturn\n\t}\n\t// 2 state map to 1\n\tif avrState == archive.VideoStatusDelete {\n\t\tv.Status = archive.VideoStatusDelete\n\t} else {\n\t\tv.Status = vState\n\t}\n\treturn\n}",
"func (upu *UnsavedPostUpdate) ClearVideos() *UnsavedPostUpdate {\n\tupu.mutation.ClearVideos()\n\treturn upu\n}",
"func (c *PostVideoClient) Delete() *PostVideoDelete {\n\tmutation := newPostVideoMutation(c.config, OpDelete)\n\treturn &PostVideoDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (c *UnsavedPostVideoClient) Query() *UnsavedPostVideoQuery {\n\treturn &UnsavedPostVideoQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (m *VideoManager) GetVideoOrCreateTask(uri, kind string) (Video, error) {\n\tclaim, err := claim.Resolve(uri)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tv, err := m.library.Get(claim.SDHash)\n\tif v == nil || err == sql.ErrNoRows {\n\t\terr := video.ValidateByClaim(claim)\n\t\tif err != nil {\n\t\t\tif errors.Is(err, video.ErrChannelNotEnabled) {\n\t\t\t\tm.library.IncViews(claim.PermanentURL, claim.SDHash)\n\t\t\t}\n\t\t\treturn nil, err\n\t\t}\n\n\t\tt, err := m.queue.GetBySDHash(claim.SDHash)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif t != nil {\n\t\t\treturn nil, video.ErrTranscodingUnderway\n\t\t}\n\t\t_, err = m.queue.Add(uri, claim.SDHash, kind)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn nil, video.ErrTranscodingUnderway\n\t}\n\treturn *v, nil\n}",
"func (remoteAccessVpnUserApi *RemoteAccessVpnUserApi) Get(id string) (*RemoteAccessVpnUser, error) {\n\tdata, err := remoteAccessVpnUserApi.entityService.Get(id, map[string]string{})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn parseRemoteAccessVpnUser(data), nil\n}",
"func (p *PostsController) GetPost(id int, userId uint) (*models.Post, *echo.HTTPError) {\n\tvar post models.Post\n\tp.db.Raw(`\n\t\tSELECT p.*,\n\t\t(SELECT \"value\" from \"likes\" \n\t\tWHERE \"user_id\" = ? and \"post_id\" = p.id) as \"StateValue\",\n\t\t(SELECT username FROM \"profiles\"\n\t\tWHERE user_id = p.user_id) as \"Creator\"\n\t\tFROM posts p\n\t\tWHERE p.id = ?\n\t`, userId, id).Find(&post)\n\n\tif post.ID == 0 {\n\t\treturn nil, echo.NewHTTPError(404, \"post does not exist\")\n\t}\n\n\treturn &post, nil\n}",
"func (db *Database) GetPost(postID string) (models.Post, error) {\n\tpost := &models.Post{}\n\terr := db.DB.Model(post).\n\t\tWhere(\"post.post_id = ?\", postID).\n\t\tSelect()\n\tif err != nil {\n\t\treturn models.Post{}, err\n\t}\n\n\treturn *post, nil\n}",
"func (c *EntryController) Get(ctx *app.GetEntryContext) error {\n\tentry, err := c.entryRepo.FindByID(ctx.EntryID)\n\tif err != nil {\n\t\tif errors.Cause(sql.ErrNoRows) != nil {\n\t\t\treturn ctx.NotFound()\n\t\t}\n\n\t\treturn errors.Wrap(err, \"Un-expected error\")\n\t}\n\n\tres := entryModelToMediaFull(entry)\n\treturn ctx.OKFull(res)\n}",
"func (t *PhoneToggleGroupCallRecordRequest) GetVideo() (value bool) {\n\tif t == nil {\n\t\treturn\n\t}\n\treturn t.Flags.Has(2)\n}",
"func (m *SnippetModel) Get(id int) (*models.Snippet, error) {\n\ttx, err := m.DB.Begin()\n\tif err != nil {\n\t\ttx.Rollback()\n\t\treturn nil, err\n\t}\n\tstmt := `SELECT id, title, content, created, expires FROM snippets\n WHERE expires > UTC_TIMESTAMP() AND id = ?`\n\t// m.DB.QueryRow returns a pointer to a sql.Row object which holds the\n\t// result from the database\n\trow := tx.QueryRow(stmt, id)\n\n\t// Initialize a pointer to a new zeroed Snippet struct\n\ts := &models.Snippet{}\n\n\t// row.Scan() copies the values from each field to the Snippet struct s,\n\t// All the values passed are pointers to the place you want to copy the data\n\t// into, and the number of arguments must be exactly the same as the number\n\t// of columns returned by your statement\n\terr = row.Scan(&s.ID, &s.Title, &s.Content, &s.Created, &s.Expires)\n\tif err != nil {\n\t\t// If the query returns no rows then row.Scan() will return a\n\t\t// sql.ErrNoRows error.\n\t\t// errors.Is() is used to check if the error is a sql.ErrNoRows\n\t\tif errors.Is(err, sql.ErrNoRows) {\n\t\t\ttx.Rollback()\n\t\t\treturn nil, models.ErrNoRecord\n\t\t} else {\n\t\t\ttx.Rollback()\n\t\t\treturn nil, err\n\t\t}\n\t}\n\t// If everything is OK then return the Snippet object\n\terr = tx.Commit()\n\treturn s, err\n}",
"func (m *EntityManager) Get(id string) (entity *Entity) {\n\tfor _, e := range m.entities {\n\t\tif e.ID() == id {\n\t\t\treturn e\n\t\t}\n\t}\n\treturn\n}",
"func (p *postsQueryBuilder) Get() (*Post, error) {\n\tif p.err != nil {\n\t\treturn nil, p.err\n\t}\n\tmodel, err := p.builder.Get()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn model.(*Post), nil\n}",
"func (c *UnsavedPostAttachmentClient) GetX(ctx context.Context, id int) *UnsavedPostAttachment {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func GetPostById(c *gin.Context) {\n\tpostID, err := strconv.ParseInt(c.Param(\"id\"), 10, 0)\n\tif err != nil {\n\t\tc.JSON(http.StatusBadRequest, gin.H{\"error\": err.Error()})\n\t\treturn\n\t}\n\n\tpost, err := postRepo.GetById(postID)\n\tif err != nil {\n\t\tc.JSON(http.StatusBadRequest, gin.H{\"error\": err.Error()})\n\t\treturn\n\t}\n\tc.JSON(http.StatusOK, PostModel{\n\t\tId: post.ID,\n\t\tLinks: halgo.Links{}.\n\t\t\tSelf(\"/posts/%d\", post.ID).\n\t\t\tLink(\"author\", \"%s/users/%d\", userServiceAddress, post.AuthorID).\n\t\t\tLink(\"ratings\", \"%s/ratings?postId=%d\", ratingServiceAddress, post.ID),\n\t\tHeadline: post.Headline,\n\t\tContent: post.Content,\n\t})\n}",
"func (o *EquipmentIoCardBase) GetVid() string {\n\tif o == nil || o.Vid == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\treturn *o.Vid\n}",
"func (r *VideoFormatsService) Get(profileId int64, id int64) *VideoFormatsGetCall {\n\tc := &VideoFormatsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}\n\tc.profileId = profileId\n\tc.id = id\n\treturn c\n}",
"func (m *MalService) GetAnimeVideo(id int, page ...int) (anime.VideoParser, error) {\n\treturn anime.InitVideoParser(m.Config, id, page...)\n}",
"func (a PromptsApi) GetVideoEmailPrompt(id string) (*VideoEmailPrompt, *APIResponse, error) {\n\n\tvar httpMethod = \"Get\"\n\t// create path and map variables\n\tpath := a.Configuration.BasePath + \"/prompt/{id}\"\n\tpath = strings.Replace(path, \"{\"+\"id\"+\"}\", fmt.Sprintf(\"%v\", id), -1)\n\n\n\theaderParams := make(map[string]string)\n\tqueryParams := url.Values{}\n\tformParams := make(map[string]string)\n\tvar postBody interface{}\n\tvar fileName string\n\tvar fileBytes []byte\n\t// authentication '(BBOAuth2)' required\n\t// oauth required\n\tif a.Configuration.AccessToken != \"\"{\n\t\theaderParams[\"Authorization\"] = \"Bearer \" + a.Configuration.AccessToken\n\t}\n\t// add default headers if any\n\tfor key := range a.Configuration.DefaultHeader {\n\t\theaderParams[key] = a.Configuration.DefaultHeader[key]\n\t}\n\n\n\t// to determine the Content-Type header\n\tlocalVarHttpContentTypes := []string{ \"application/x-www-form-urlencoded\", }\n\n\t// set Content-Type header\n\tlocalVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)\n\tif localVarHttpContentType != \"\" {\n\t\theaderParams[\"Content-Type\"] = localVarHttpContentType\n\t}\n\t// to determine the Accept header\n\tlocalVarHttpHeaderAccepts := []string{\n\t\t\"application/json\",\n\t}\n\n\t// set Accept header\n\tlocalVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)\n\tif localVarHttpHeaderAccept != \"\" {\n\t\theaderParams[\"Accept\"] = localVarHttpHeaderAccept\n\t}\n\tvar successPayload = new(VideoEmailPrompt)\n\thttpResponse, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, fileName, fileBytes)\n\tif err != nil {\n\t\treturn successPayload, NewAPIResponse(httpResponse.RawResponse), err\n\t}\n\terr = json.Unmarshal(httpResponse.Body(), &successPayload)\n\treturn successPayload, NewAPIResponse(httpResponse.RawResponse), err\n}",
"func (upuo *UnsavedPostUpdateOne) ClearVideos() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearVideos()\n\treturn upuo\n}",
"func (c *UnsavedPostImageClient) GetX(ctx context.Context, id int) *UnsavedPostImage {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *UnsavedPostThumbnailClient) GetX(ctx context.Context, id int) *UnsavedPostThumbnail {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *Client) GetInsertVideoResultById(libId, mediaId string) (*api.BaseResponse, error) {\n\treturn api.GetInsertVideoResultById(c, libId, mediaId)\n}",
"func (cmd *PlayCmd) ReadLatestVideoFrame(id, fmt string, w io.Writer) error {\n\tcmd.RLock()\n\tfCtx := cmd.fCtxMap[id]\n\tcmd.RUnlock()\n\tif fCtx == nil {\n\t\treturn ErrNotPlaying\n\t}\n\n\treturn fCtx.ReadLatestVideoFrame(fmt, w)\n}",
"func (ps PostStorage) GetPost(ctx sdk.Context, permlink linotypes.Permlink) (*Post, sdk.Error) {\n\tstore := ctx.KVStore(ps.key)\n\tkey := GetPostInfoKey(permlink)\n\tinfoByte := store.Get(key)\n\tif infoByte == nil {\n\t\treturn nil, types.ErrPostNotFound(permlink)\n\t}\n\tpostInfo := new(Post)\n\tps.cdc.MustUnmarshalBinaryLengthPrefixed(infoByte, postInfo)\n\treturn postInfo, nil\n}",
"func (c *ReviewClient) Get(ctx context.Context, id int32) (*Review, error) {\n\treturn c.Query().Where(review.ID(id)).Only(ctx)\n}",
"func (o *CapabilitySiocModuleManufacturingDef) GetVid() string {\n\tif o == nil || o.Vid == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\treturn *o.Vid\n}",
"func (rc *BypassRevisionCache) Get(docID, revID string, copyType BodyCopyType) (docRev DocumentRevision, err error) {\n\tdocRev.RevID = revID\n\tdocRev.Body, docRev.History, docRev.Channels, docRev.Attachments, docRev.Expiry, err = revCacheLoader(rc.backingStore, IDAndRev{DocID: docID, RevID: revID})\n\tif err != nil {\n\t\treturn DocumentRevision{}, err\n\t}\n\n\trc.bypassStat.Add(1)\n\n\treturn docRev, nil\n}",
"func (r repository) Get(ctx context.Context, id string) (entity.Link, error) {\n\tvar link entity.Link\n\terr := r.db.With(ctx).Select().Model(id, &link)\n\treturn link, err\n}",
"func (upvc *UnsavedPostVideoCreate) Mutation() *UnsavedPostVideoMutation {\n\treturn upvc.mutation\n}",
"func (d *Dao) VideoByCid(c context.Context, cid int64, ip string) (v *archive.Video, err error) {\n\tparams := url.Values{}\n\tparams.Set(\"cid\", strconv.FormatInt(cid, 10))\n\tvar res struct {\n\t\tCode int `json:\"code\"`\n\t\tData *archive.Video `json:\"data\"`\n\t}\n\tif err = d.client.Get(c, d.video, ip, params, &res); err != nil {\n\t\tlog.Error(\"VideoByCid cidURI(%s) error(%v)\", d.video+\"?\"+params.Encode(), err)\n\t\treturn\n\t}\n\tif res.Code != 0 {\n\t\terr = ecode.Int(res.Code)\n\t\tlog.Error(\"VideoByCid cidURI(%s) Code=(%d)\", d.video+\"?\"+params.Encode(), res.Code)\n\t\treturn\n\t}\n\tv = res.Data\n\treturn\n}",
"func (s MyEntityManager) Get(id uint64) ecs.Entity {\n\treturn *s.items[id].entity\n}",
"func (k Keeper) GetPost(ctx sdk.Context, id string) (post types.Post, found bool) {\n\tstore := ctx.KVStore(k.storeKey)\n\tif !store.Has(types.PostStoreKey(id)) {\n\t\treturn types.Post{}, false\n\t}\n\n\tk.cdc.MustUnmarshalBinaryBare(store.Get(types.PostStoreKey(id)), &post)\n\treturn post, true\n}",
"func (b Buffer) Get(ent entity.Key) *inventoryapi.PostDeltaBody {\n\tbody, ok := b.contents[ent]\n\tif !ok {\n\t\treturn nil\n\t}\n\treturn &body\n}",
"func (env *Env) GetPost(w http.ResponseWriter, r *http.Request) {\n\t// Grab the context to get the user\n\tctx := r.Context()\n\tuser := ctx.Value(contextUser).(*models.User)\n\tid, err := uuid.Parse(chi.URLParam(r, \"postID\"))\n\tif err != nil {\n\t\tenv.log(r, err)\n\t\tw.WriteHeader(http.StatusBadRequest)\n\t\treturn\n\t}\n\tp, err := env.DB.FindPost(id)\n\tif err != nil {\n\t\tenv.log(r, err)\n\t\tw.WriteHeader(http.StatusNotFound)\n\t\treturn\n\t}\n\tif p.Published == false && user.Role != \"ADMIN\" {\n\t\tw.WriteHeader(http.StatusNotFound)\n\t}\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tw.WriteHeader(http.StatusOK)\n\tjson.NewEncoder(w).Encode(p)\n}",
"func (c *ClaimContent) Get(id string) error {\n\treturn get(claimContentDB, c, id)\n}",
"func (c *Collection) Get(id string, dest interface{}) (contentAsBytes []byte, err error) {\n\tc.db.badger.View(func(txn *badger.Txn) error {\n\t\tcontentAsBytes, err = c.get(txn, id, dest)\n\t\treturn nil\n\t})\n\n\tif err == badger.ErrKeyNotFound {\n\t\treturn nil, ErrNotFound\n\t}\n\n\treturn\n}",
"func GetMovie(id int64) (*Movie, error) {\n\tmovie := Movie{}\n\terr := meddler.QueryRow(db, &movie, movieFindIdStmt, id)\n\treturn &movie, err\n}",
"func (c *YoutubeController) GetYoutubeVideoDetails(videoURL *string) (*types.UserVideoItem, error) {\n\t// https://www.googleapis.com/youtube/v3/videos?id=D95qIe5pLuA&key=AIzaSyBhFXscTPZr892Uj5h2wRghkFAqTPYtcEg&part=snippet,statistics,topicDetails\n\tif videoURL == nil {\n\t\treturn nil, errors.New(\"Need url\")\n\t}\n\n\t// attempt to get the video is\n\tu, err := url.Parse(mapping.StrToV(videoURL))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar videoID *string\n\tvalues := u.Query()[\"id\"]\n\tif len(values) == 0 {\n\t\tvideoID, err = c.gateway.GetYoutubeVideoID(videoURL)\n\t\tif err != nil {\n\t\t\treturn nil, errors.New(\"could not get video ID\")\n\t\t}\n\t}\n\tresponse, err := c.gateway.GetYoutubeVideoDetails(videoID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// baseURL := \"https://www.googleapis.com/youtube/v3/videos?\"\n\t// url := fmt.Sprintf(\"%s&id=%s&key=%s&part=snippet,statistics,topicDetails\", baseURL, *videoID, developerKey)\n\t// req, err := http.NewRequest(\"GET\", url, nil)\n\t// if err != nil {\n\t// \treturn nil, err\n\t// }\n\n\t// response := &types.UserVideoItem{}\n\t// client := &http.Client{}\n\t// resp, err := client.Do(req)\n\t// if err != nil {\n\t// \treturn nil, err\n\t// }\n\t// err = json.NewDecoder(resp.Body).Decode(&response)\n\t// if err != nil {\n\t// \treturn nil, err\n\t// }\n\t// if response == nil {\n\t// \treturn nil, errors.New(\"response is nil\")\n\t// }\n\treturn response, nil\n}",
"func (m *defaultEntityManager) Get(id string) (entity *Entity) {\n\tfor _, e := range m.entities {\n\t\tif e.ID() == id {\n\t\t\treturn e\n\t\t}\n\t}\n\treturn\n}",
"func retrieve(id int) (post Post, err error){\n\tpost = Post{}\n\terr = Db.QueryRow(\"select id, content, author from posts where id = $1\", id).Scan(&post.Id, &post.Content, &post.Author)\n\treturn\n}",
"func (m *SnippetModel) Get(id int) (*models.Snippet, error) {\n\t// Create the SQL statement to execute\n\t// Split over 2 lines for readibility\n\tstmt := `SELECT id, title, content, created, expires FROM snippets \n\tWHERE expires > UTC_TIMESTAMP() AND id =?`\n\n\t// Use the QueryRow() method on the comnnection pool to execute our\n\t// SQL statement, passing in the untrusted id variable as the value for the\n\t// placeholder parameter. This returns a pointer to a sql.Row object which\n\t// holds the result set from the database.\n\trow := m.DB.QueryRow(stmt, id)\n\n\t// Initialize a pointer to a new zeroed Snippet struct.\n\ts := &models.Snippet{}\n\n\t// Use row.Scan() to copy the values from each field in the sql.Row to the\n\t// corresponding field in the Snippet struct. Notice that the arguments\n\t// to row.Scan are *pointers* to the place we want to copy the data into,\n\t// and the number of arguments must be exactly the same as the number of\n\t// columns returned by the statement. If the query returns no rows, then\n\t// row.Scan() will return a sql.ErrNoRows error. We check for that and return\n\t// our models.ErrNoRecord error instead of a Snippet object\n\terr := row.Scan(&s.ID, &s.Title, &s.Content, &s.Created, &s.Expires)\n\tif err == sql.ErrNoRows {\n\t\treturn nil, models.ErrNoRecord\n\t} else if err != nil {\n\t\treturn nil, err\n\t}\n\n\t// If everything went OK then return the Snippet object.\n\treturn s, nil\n\n\t// Version above is long hand.\n\t// As errors from DB.QueryRow() are deferred until Scan() is called, it can be shortened to:\n\t// --------------------------------------\n\t// s := &models.Snippet{}\n\t// err := m.DB.QueryRow(\"SELECT ...\", id).Scan(&s.ID, &s.Title, &s.Content, &s.Created, &s.Expires)\n\t// if err == sql.ErrNoRows {\n\t// return nil, models.ErrNoRecord }\n\t// else if err != nil {\n\t// return nil, err }\n\t// return s, nil\n}",
"func (club *Club) Get(id int) error {\n\n\terr := db.Model(&club).Where(\"id=?\", id).Preload(\"Venues\").First(&club).Error\n\tif err != nil {\n\t\tlogrus.Errorf(\"Unable to find the club with id %d \", id)\n\t\treturn err\n\t}\n\treturn nil\n}",
"func (i *InputInlineQueryResultVideo) GetID() (value string) {\n\tif i == nil {\n\t\treturn\n\t}\n\treturn i.ID\n}",
"func (upvc *UnsavedPostVideoCreate) SaveX(ctx context.Context) *UnsavedPostVideo {\n\tv, err := upvc.Save(ctx)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn v\n}",
"func (img *Image) RetrieveVideo(buf *bytes.Buffer) {\n\tfname := strings.Join([]string{img.Handle, \"webm\"}, \".\")\n\tfname = Repository.dataPath(img.Source, fname)\n\tif b, err := ioutil.ReadFile(fname); err != nil {\n\t\tpanic(err)\n\t} else {\n\t\tif n, err := buf.Write(b); err != nil {\n\t\t\tpanic(err)\n\t\t} else if n != len(b) {\n\t\t\tpanic(\"partial write to memory buffer\")\n\t\t}\n\t}\n}",
"func (upu *UnsavedPostUpdate) RemoveVideoIDs(ids ...int) *UnsavedPostUpdate {\n\tupu.mutation.RemoveVideoIDs(ids...)\n\treturn upu\n}",
"func (s *Session) Get(id int) (podcast *Podcast, err error) {\n\terr = s.getf(\"/podcast/%d\", id).Into(&podcast)\n\treturn\n}",
"func (r RepositoryImpl) GetVoteEntity(id int64) *VoteEntity {\n\tif v, ok := r.database[id]; ok {\n\t\treturn &v\n\t}\n\treturn nil\n}",
"func (box *TestEntityRelatedBox) Get(id uint64) (*TestEntityRelated, error) {\n\tobject, err := box.Box.Get(id)\n\tif err != nil {\n\t\treturn nil, err\n\t} else if object == nil {\n\t\treturn nil, nil\n\t}\n\treturn object.(*TestEntityRelated), nil\n}",
"func (s *runnablesrvc) Get(ctx context.Context, p *runnable.GetPayload) (res *runnable.Runnable, err error) {\n\ts.logger.Print(\"runnable.get\")\n\tr, err := s.store.Get(ctx, p.ID)\n\tif r == nil {\n\t\treturn nil, runnable.MakeNotFound(errors.New(err.Error()))\n\t}\n\treturn runnableDomainToRest(r), nil\n}",
"func (driver *SQLDriver) Get(id string) (*pastes.Paste, error) {\n\t// Execute a SELECT query to retrieve the paste\n\trow := driver.database.QueryRow(\"SELECT * FROM ? WHERE id = ?\", driver.table, id)\n\terr := row.Err()\n\tif err != nil {\n\t\tif err == sql.ErrNoRows {\n\t\t\treturn nil, nil\n\t\t}\n\t\treturn nil, err\n\t}\n\n\t// Scan the row into a paste and return it\n\tpaste := new(pastes.Paste)\n\terr = row.Scan(&paste)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn paste, nil\n}",
"func (upuo *UnsavedPostUpdateOne) RemoveVideos(u ...*UnsavedPostVideo) *UnsavedPostUpdateOne {\n\tids := make([]int, len(u))\n\tfor i := range u {\n\t\tids[i] = u[i].ID\n\t}\n\treturn upuo.RemoveVideoIDs(ids...)\n}",
"func (upq *UnsavedPostQuery) WithVideos(opts ...func(*UnsavedPostVideoQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostVideoQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withVideos = query\n\treturn upq\n}",
"func NewPostVideoClient(c config) *PostVideoClient {\n\treturn &PostVideoClient{config: c}\n}",
"func (r *MgoTag) Get(id string) (*model.Tag, error) {\n\tif _, err := primitive.ObjectIDFromHex(id); err != nil {\n\t\treturn nil, errors.Errorf(\"Invalid id\", id)\n\t}\n\trow, err := r.db.FindID(context.Background(), r.table, id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer row.Close()\n\n\ttag := bsonTag{}\n\n\tif row.Next() {\n\t\tif err := row.Scan(&tag); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tif err := row.Err(); err != nil {\n\t\tif err == mongo.ErrNoDocuments {\n\t\t\treturn nil, nil\n\t\t}\n\t\treturn nil, err\n\t}\n\n\treturn formTag(&tag), nil\n}",
"func (m *Movie) GetId() uint {\n\treturn m.ID\n}",
"func GetPost(idString string, w http.ResponseWriter) {\r\n\tfmt.Println(\"inside GetPost\")\r\n\t//Connect Mongodb\r\n\tclient, err := mongo.NewClient(options.Client().ApplyURI(\"mongodb://127.0.0.1:27017\"))\r\n\tif err != nil {\r\n\t\tlog.Fatal(err)\r\n\t}\r\n\tctx, _ := context.WithTimeout(context.Background(), 10*time.Second)\r\n\terr = client.Connect(ctx)\r\n\tif err != nil {\r\n\t\tlog.Fatal(err)\r\n\t}\r\n\tdefer client.Disconnect(ctx)\r\n\r\n\t//Post Inside Database\r\n\tcollection := client.Database(\"inShotsDB\").Collection(\"posts\")\r\n\tid, err := primitive.ObjectIDFromHex(idString)\r\n\tfilter := bson.M{\"_id\": id}\r\n\tvar post Article\r\n\terr2 := collection.FindOne(context.TODO(), filter).Decode(&post)\r\n\tif err2 != nil {\r\n\t\tlog.Fatal(err2)\r\n\t}\r\n\tfmt.Println(\"Found Post\", post.Title)\r\n\tfmt.Fprintf(w, post.Title, post.Subtitle, post.Content)\r\n}",
"func (upvcb *UnsavedPostVideoCreateBulk) Save(ctx context.Context) ([]*UnsavedPostVideo, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(upvcb.builders))\n\tnodes := make([]*UnsavedPostVideo, len(upvcb.builders))\n\tmutators := make([]Mutator, len(upvcb.builders))\n\tfor i := range upvcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := upvcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*UnsavedPostVideoMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, upvcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, upvcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, upvcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}"
] |
[
"0.78316355",
"0.684556",
"0.6301316",
"0.6288337",
"0.623346",
"0.62052786",
"0.58339",
"0.5777674",
"0.56896776",
"0.56503123",
"0.55026567",
"0.5473741",
"0.5420953",
"0.54148984",
"0.5404938",
"0.52308655",
"0.5222444",
"0.5094099",
"0.50889146",
"0.5087546",
"0.5049558",
"0.5033301",
"0.5013948",
"0.4985382",
"0.497046",
"0.49536824",
"0.4951817",
"0.49473122",
"0.49196914",
"0.49188346",
"0.4917778",
"0.487053",
"0.4861723",
"0.48251706",
"0.48175055",
"0.47617096",
"0.4759961",
"0.4751166",
"0.47202858",
"0.47149014",
"0.4705311",
"0.46915522",
"0.46859378",
"0.46701172",
"0.4635394",
"0.46284884",
"0.4603332",
"0.46016183",
"0.4590185",
"0.45777234",
"0.4561537",
"0.45565692",
"0.45264634",
"0.45255205",
"0.45092958",
"0.4508661",
"0.45048386",
"0.44953427",
"0.44915053",
"0.4485898",
"0.44822195",
"0.44629475",
"0.44161624",
"0.44116133",
"0.44114065",
"0.43956977",
"0.4387841",
"0.4386466",
"0.43844286",
"0.43843853",
"0.4383403",
"0.43780738",
"0.43775988",
"0.43713862",
"0.43643197",
"0.43546718",
"0.43417406",
"0.4338603",
"0.43347114",
"0.43299612",
"0.43217185",
"0.43105033",
"0.4309838",
"0.43089134",
"0.43086734",
"0.43033433",
"0.4302256",
"0.42934784",
"0.42818144",
"0.42781568",
"0.42769107",
"0.42591834",
"0.4253359",
"0.42528802",
"0.42528075",
"0.42519832",
"0.42498866",
"0.4236971",
"0.42358375",
"0.42208678"
] |
0.88104784
|
0
|
GetX is like Get, but panics if an error occurs.
|
func (c *UnsavedPostVideoClient) GetX(ctx context.Context, id int) *UnsavedPostVideo {
obj, err := c.Get(ctx, id)
if err != nil {
panic(err)
}
return obj
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *StatustClient) GetX(ctx context.Context, id int) *Statust {\n\ts, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn s\n}",
"func (c *OperativeClient) GetX(ctx context.Context, id int) *Operative {\n\to, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn o\n}",
"func (c *StaytypeClient) GetX(ctx context.Context, id int) *Staytype {\n\ts, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn s\n}",
"func (c *LevelOfDangerousClient) GetX(ctx context.Context, id int) *LevelOfDangerous {\n\tlod, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn lod\n}",
"func (c *DentistClient) GetX(ctx context.Context, id int) *Dentist {\n\td, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn d\n}",
"func (c *ToolClient) GetX(ctx context.Context, id int) *Tool {\n\tt, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn t\n}",
"func (c *IPClient) GetX(ctx context.Context, id uuid.UUID) *IP {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *BeerClient) GetX(ctx context.Context, id int) *Beer {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *PhysicianClient) GetX(ctx context.Context, id int) *Physician {\n\tph, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn ph\n}",
"func (c *PhysicianClient) GetX(ctx context.Context, id int) *Physician {\n\tph, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn ph\n}",
"func (c *PharmacistClient) GetX(ctx context.Context, id int) *Pharmacist {\n\tph, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn ph\n}",
"func (c *EmptyClient) GetX(ctx context.Context, id int) *Empty {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *OperationClient) GetX(ctx context.Context, id uuid.UUID) *Operation {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *NurseClient) GetX(ctx context.Context, id int) *Nurse {\n\tn, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn n\n}",
"func (c *PatientInfoClient) GetX(ctx context.Context, id int) *PatientInfo {\n\tpi, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pi\n}",
"func (c *ClinicClient) GetX(ctx context.Context, id uuid.UUID) *Clinic {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *LeaseClient) GetX(ctx context.Context, id int) *Lease {\n\tl, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn l\n}",
"func (c *ModuleVersionClient) GetX(ctx context.Context, id int) *ModuleVersion {\n\tmv, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn mv\n}",
"func (c *PetruleClient) GetX(ctx context.Context, id int) *Petrule {\n\tpe, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pe\n}",
"func (c *KeyStoreClient) GetX(ctx context.Context, id int32) *KeyStore {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *SituationClient) GetX(ctx context.Context, id int) *Situation {\n\ts, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn s\n}",
"func (c *RepairinvoiceClient) GetX(ctx context.Context, id int) *Repairinvoice {\n\tr, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn r\n}",
"func (c *MedicineClient) GetX(ctx context.Context, id int) *Medicine {\n\tm, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn m\n}",
"func (c *BillClient) GetX(ctx context.Context, id int) *Bill {\n\tb, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn b\n}",
"func (c *BillClient) GetX(ctx context.Context, id int) *Bill {\n\tb, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn b\n}",
"func (c *BillClient) GetX(ctx context.Context, id int) *Bill {\n\tb, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn b\n}",
"func (c *OperativerecordClient) GetX(ctx context.Context, id int) *Operativerecord {\n\to, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn o\n}",
"func (c *ReturninvoiceClient) GetX(ctx context.Context, id int) *Returninvoice {\n\tr, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn r\n}",
"func (c *CleanernameClient) GetX(ctx context.Context, id int) *Cleanername {\n\tcl, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn cl\n}",
"func (c *AdminClient) GetX(ctx context.Context, id int) *Admin {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *RepairInvoiceClient) GetX(ctx context.Context, id int) *RepairInvoice {\n\tri, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn ri\n}",
"func (c *ComplaintClient) GetX(ctx context.Context, id int) *Complaint {\n\tco, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn co\n}",
"func (c *DNSBLQueryClient) GetX(ctx context.Context, id uuid.UUID) *DNSBLQuery {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *ModuleClient) GetX(ctx context.Context, id int) *Module {\n\tm, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn m\n}",
"func (c *MedicineTypeClient) GetX(ctx context.Context, id int) *MedicineType {\n\tmt, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn mt\n}",
"func (c *BuildingClient) GetX(ctx context.Context, id int) *Building {\n\tb, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn b\n}",
"func (c *DeviceClient) GetX(ctx context.Context, id int) *Device {\n\td, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn d\n}",
"func (c *PatientClient) GetX(ctx context.Context, id int) *Patient {\n\tpa, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pa\n}",
"func (c *PatientClient) GetX(ctx context.Context, id int) *Patient {\n\tpa, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pa\n}",
"func (c *PatientClient) GetX(ctx context.Context, id int) *Patient {\n\tpa, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pa\n}",
"func (c *RoomuseClient) GetX(ctx context.Context, id int) *Roomuse {\n\tr, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn r\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn u\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn u\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn u\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn u\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn u\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn u\n}",
"func (c *StatusdClient) GetX(ctx context.Context, id int) *Statusd {\n\ts, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn s\n}",
"func (c *UserClient) GetX(ctx context.Context, id int64) *User {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *PlanetClient) GetX(ctx context.Context, id int) *Planet {\n\tpl, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pl\n}",
"func (c *TransactionClient) GetX(ctx context.Context, id int32) *Transaction {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *PurposeClient) GetX(ctx context.Context, id int) *Purpose {\n\tpu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pu\n}",
"func (c *LengthtimeClient) GetX(ctx context.Context, id int) *Lengthtime {\n\tl, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn l\n}",
"func (c *VeterinarianClient) GetX(ctx context.Context, id uuid.UUID) *Veterinarian {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *UserClient) GetX(ctx context.Context, id int) *User {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *UsertypeClient) GetX(ctx context.Context, id int) *Usertype {\n\tu, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn u\n}",
"func (c *PrescriptionClient) GetX(ctx context.Context, id int) *Prescription {\n\tpr, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pr\n}",
"func (c *PaymentClient) GetX(ctx context.Context, id int) *Payment {\n\tpa, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pa\n}",
"func (c *PaymentClient) GetX(ctx context.Context, id int) *Payment {\n\tpa, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pa\n}",
"func (c *WorkExperienceClient) GetX(ctx context.Context, id int) *WorkExperience {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *DNSBLResponseClient) GetX(ctx context.Context, id uuid.UUID) *DNSBLResponse {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *OperationroomClient) GetX(ctx context.Context, id int) *Operationroom {\n\to, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn o\n}",
"func (c *CleaningroomClient) GetX(ctx context.Context, id int) *Cleaningroom {\n\tcl, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn cl\n}",
"func (c *PatientofphysicianClient) GetX(ctx context.Context, id int) *Patientofphysician {\n\tpa, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pa\n}",
"func (c *PositionInPharmacistClient) GetX(ctx context.Context, id int) *PositionInPharmacist {\n\tpip, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pip\n}",
"func (c *DoctorClient) GetX(ctx context.Context, id int) *Doctor {\n\td, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn d\n}",
"func (c *StatusRClient) GetX(ctx context.Context, id int) *StatusR {\n\ts, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn s\n}",
"func (c *SymptomClient) GetX(ctx context.Context, id int) *Symptom {\n\ts, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn s\n}",
"func (c *TagClient) GetX(ctx context.Context, id int) *Tag {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *CoinInfoClient) GetX(ctx context.Context, id int32) *CoinInfo {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *WifiClient) GetX(ctx context.Context, id int) *Wifi {\n\tw, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn w\n}",
"func (c *UnitOfMedicineClient) GetX(ctx context.Context, id int) *UnitOfMedicine {\n\tuom, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn uom\n}",
"func (c *EmployeeClient) GetX(ctx context.Context, id int) *Employee {\n\te, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn e\n}",
"func (c *EmployeeClient) GetX(ctx context.Context, id int) *Employee {\n\te, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn e\n}",
"func (c *EmployeeClient) GetX(ctx context.Context, id int) *Employee {\n\te, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn e\n}",
"func (c *YearClient) GetX(ctx context.Context, id int) *Year {\n\ty, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn y\n}",
"func (x *V) Get(params ...interface{}) (*V, error) {\n\tif false == x.initialized {\n\t\treturn nil, errNotInitialized\n\t}\n\tif 0 == len(params) {\n\t\treturn nil, errNilParameter\n\t}\n\treturn x.getOrCreate(false, params...)\n}",
"func (c *OrderClient) GetX(ctx context.Context, id int) *Order {\n\to, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn o\n}",
"func (c *FoodmenuClient) GetX(ctx context.Context, id int) *Foodmenu {\n\tf, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn f\n}",
"func (c *DispenseMedicineClient) GetX(ctx context.Context, id int) *DispenseMedicine {\n\tdm, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn dm\n}",
"func (c *SkillClient) GetX(ctx context.Context, id int) *Skill {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *TitleClient) GetX(ctx context.Context, id int) *Title {\n\tt, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn t\n}",
"func Get(ctx *grumble.Context) error {\n\tclient, execCtx, cancel := newClientAndCtx(ctx, 5*time.Second)\n\tdefer cancel()\n\tval, err := client.Get(execCtx, &ldProto.Key{Key: ctx.Args.String(\"key\")})\n\tif err != nil || val.Key == \"\" {\n\t\treturn err\n\t}\n\treturn exec(ctx, handleKeyValueReturned(val))\n}",
"func (c *CustomerClient) GetX(ctx context.Context, id uuid.UUID) *Customer {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (_HelloWorld *HelloWorldCaller) Get(opts *bind.CallOpts) (string, error) {\n\tvar (\n\t\tret0 = new(string)\n\t)\n\tout := ret0\n\terr := _HelloWorld.contract.Call(opts, out, \"get\")\n\treturn *ret0, err\n}",
"func (c *PostClient) GetX(ctx context.Context, id int) *Post {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *BillingstatusClient) GetX(ctx context.Context, id int) *Billingstatus {\n\tb, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn b\n}",
"func (c *RentalstatusClient) GetX(ctx context.Context, id int) *Rentalstatus {\n\tr, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn r\n}",
"func (c *UserWalletClient) GetX(ctx context.Context, id int64) *UserWallet {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *SessionClient) GetX(ctx context.Context, id int) *Session {\n\ts, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn s\n}",
"func (c *ReviewClient) GetX(ctx context.Context, id int32) *Review {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *BookingClient) GetX(ctx context.Context, id int) *Booking {\n\tb, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn b\n}",
"func (c *RoomdetailClient) GetX(ctx context.Context, id int) *Roomdetail {\n\tr, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn r\n}",
"func (c *EventClient) GetX(ctx context.Context, id int) *Event {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *PositionassingmentClient) GetX(ctx context.Context, id int) *Positionassingment {\n\tpo, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn po\n}",
"func (c *PatientroomClient) GetX(ctx context.Context, id int) *Patientroom {\n\tpa, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pa\n}",
"func (c *PetClient) GetX(ctx context.Context, id uuid.UUID) *Pet {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (c *CompanyClient) GetX(ctx context.Context, id int) *Company {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}"
] |
[
"0.6648088",
"0.66232616",
"0.6614234",
"0.65871096",
"0.65850157",
"0.65770745",
"0.65643096",
"0.6542851",
"0.65330243",
"0.65330243",
"0.65308136",
"0.650719",
"0.6504791",
"0.6490283",
"0.646992",
"0.6468367",
"0.64682376",
"0.64650553",
"0.6458181",
"0.6422355",
"0.63974655",
"0.6378646",
"0.6378526",
"0.6364793",
"0.6364793",
"0.6364793",
"0.6363413",
"0.6343908",
"0.6337061",
"0.6314544",
"0.6314414",
"0.6313774",
"0.6306085",
"0.6301973",
"0.62907875",
"0.6286949",
"0.62817043",
"0.62810564",
"0.62810564",
"0.62810564",
"0.6278438",
"0.6277063",
"0.6277063",
"0.6277063",
"0.6277063",
"0.6277063",
"0.6277063",
"0.6259341",
"0.62574685",
"0.624377",
"0.6243153",
"0.62430567",
"0.62414294",
"0.624061",
"0.62399554",
"0.62399554",
"0.62374806",
"0.62366956",
"0.62356126",
"0.62356126",
"0.6230102",
"0.6222115",
"0.62028795",
"0.62028795",
"0.62019604",
"0.6201459",
"0.6201417",
"0.6201218",
"0.6197682",
"0.6193074",
"0.6190794",
"0.61871403",
"0.6174177",
"0.6164113",
"0.6163691",
"0.6160635",
"0.6160635",
"0.6160635",
"0.6154522",
"0.6145612",
"0.61301714",
"0.61289114",
"0.61262417",
"0.61218536",
"0.6111986",
"0.609726",
"0.60963184",
"0.6083303",
"0.60821086",
"0.6075694",
"0.60629153",
"0.6046808",
"0.60413235",
"0.60396445",
"0.60389733",
"0.6034747",
"0.601842",
"0.60099",
"0.60064715",
"0.60018194",
"0.5997112"
] |
0.0
|
-1
|
QueryUnsavedPost queries the unsaved_post edge of a UnsavedPostVideo.
|
func (c *UnsavedPostVideoClient) QueryUnsavedPost(upv *UnsavedPostVideo) *UnsavedPostQuery {
query := &UnsavedPostQuery{config: c.config}
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
id := upv.ID
step := sqlgraph.NewStep(
sqlgraph.From(unsavedpostvideo.Table, unsavedpostvideo.FieldID, id),
sqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, unsavedpostvideo.UnsavedPostTable, unsavedpostvideo.UnsavedPostColumn),
)
fromV = sqlgraph.Neighbors(upv.driver.Dialect(), step)
return fromV, nil
}
return query
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *UnsavedPostThumbnailClient) QueryUnsavedPost(upt *UnsavedPostThumbnail) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upt.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, true, unsavedpostthumbnail.UnsavedPostTable, unsavedpostthumbnail.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upt.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostAttachmentClient) QueryUnsavedPost(upa *UnsavedPostAttachment) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upa.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostattachment.Table, unsavedpostattachment.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostattachment.UnsavedPostTable, unsavedpostattachment.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upa.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostImageClient) QueryUnsavedPost(upi *UnsavedPostImage) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := upi.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpostimage.Table, unsavedpostimage.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpostimage.UnsavedPostTable, unsavedpostimage.UnsavedPostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(upi.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *AdminClient) QueryUnsavedPosts(a *Admin) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := a.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(admin.Table, admin.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, admin.UnsavedPostsTable, admin.UnsavedPostsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(a.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *CategoryClient) QueryUnsavedPosts(ca *Category) *UnsavedPostQuery {\n\tquery := &UnsavedPostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := ca.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(category.Table, category.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpost.Table, unsavedpost.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, category.UnsavedPostsTable, category.UnsavedPostsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(ca.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostVideoClient) Get(ctx context.Context, id int) (*UnsavedPostVideo, error) {\n\treturn c.Query().Where(unsavedpostvideo.ID(id)).Only(ctx)\n}",
"func (upvc *UnsavedPostVideoCreate) SetUnsavedPost(u *UnsavedPost) *UnsavedPostVideoCreate {\n\treturn upvc.SetUnsavedPostID(u.ID)\n}",
"func (c *Category) QueryUnsavedPosts() *UnsavedPostQuery {\n\treturn (&CategoryClient{config: c.config}).QueryUnsavedPosts(c)\n}",
"func (upq *UnsavedPostQuery) QueryVideos() *UnsavedPostVideoQuery {\n\tquery := &UnsavedPostVideoQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostvideo.Table, unsavedpostvideo.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.VideosTable, unsavedpost.VideosColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostClient) QueryVideos(up *UnsavedPost) *UnsavedPostVideoQuery {\n\tquery := &UnsavedPostVideoQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostvideo.Table, unsavedpostvideo.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.VideosTable, unsavedpost.VideosColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *PostVideoClient) QueryPost(pv *PostVideo) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pv.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postvideo.Table, postvideo.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, postvideo.PostTable, postvideo.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pv.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upvc *UnsavedPostVideoCreate) SetUnsavedPostID(id int) *UnsavedPostVideoCreate {\n\tupvc.mutation.SetUnsavedPostID(id)\n\treturn upvc\n}",
"func (c *UnsavedPostVideoClient) Query() *UnsavedPostVideoQuery {\n\treturn &UnsavedPostVideoQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *UnsavedPostClient) Get(ctx context.Context, id int) (*UnsavedPost, error) {\n\treturn c.Query().Where(unsavedpost.ID(id)).Only(ctx)\n}",
"func NewUnsavedPostVideoClient(c config) *UnsavedPostVideoClient {\n\treturn &UnsavedPostVideoClient{config: c}\n}",
"func (upq *UnsavedPostQuery) WithVideos(opts ...func(*UnsavedPostVideoQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostVideoQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withVideos = query\n\treturn upq\n}",
"func (upvc *UnsavedPostVideoCreate) Save(ctx context.Context) (*UnsavedPostVideo, error) {\n\tvar (\n\t\terr error\n\t\tnode *UnsavedPostVideo\n\t)\n\tupvc.defaults()\n\tif len(upvc.hooks) == 0 {\n\t\tif err = upvc.check(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tnode, err = upvc.sqlSave(ctx)\n\t} else {\n\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\tmutation, ok := m.(*UnsavedPostVideoMutation)\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t}\n\t\t\tif err = upvc.check(); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tupvc.mutation = mutation\n\t\t\tnode, err = upvc.sqlSave(ctx)\n\t\t\tmutation.done = true\n\t\t\treturn node, err\n\t\t})\n\t\tfor i := len(upvc.hooks) - 1; i >= 0; i-- {\n\t\t\tmut = upvc.hooks[i](mut)\n\t\t}\n\t\tif _, err := mut.Mutate(ctx, upvc.mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn node, err\n}",
"func (upq *UnsavedPostQuery) Clone() *UnsavedPostQuery {\n\tif upq == nil {\n\t\treturn nil\n\t}\n\treturn &UnsavedPostQuery{\n\t\tconfig: upq.config,\n\t\tlimit: upq.limit,\n\t\toffset: upq.offset,\n\t\torder: append([]OrderFunc{}, upq.order...),\n\t\tpredicates: append([]predicate.UnsavedPost{}, upq.predicates...),\n\t\twithAuthor: upq.withAuthor.Clone(),\n\t\twithCategory: upq.withCategory.Clone(),\n\t\twithThumbnail: upq.withThumbnail.Clone(),\n\t\twithImages: upq.withImages.Clone(),\n\t\twithVideos: upq.withVideos.Clone(),\n\t\twithAttachments: upq.withAttachments.Clone(),\n\t\t// clone intermediate query.\n\t\tsql: upq.sql.Clone(),\n\t\tpath: upq.path,\n\t}\n}",
"func (c *UnsavedPostClient) Query() *UnsavedPostQuery {\n\treturn &UnsavedPostQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *PostClient) QueryVideos(po *Post) *PostVideoQuery {\n\tquery := &PostVideoQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := po.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(post.Table, post.FieldID, id),\n\t\t\tsqlgraph.To(postvideo.Table, postvideo.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, post.VideosTable, post.VideosColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(po.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostClient) QueryAttachments(up *UnsavedPost) *UnsavedPostAttachmentQuery {\n\tquery := &UnsavedPostAttachmentQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostattachment.Table, unsavedpostattachment.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.AttachmentsTable, unsavedpost.AttachmentsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upu *UnsavedPostUpdate) ClearVideos() *UnsavedPostUpdate {\n\tupu.mutation.ClearVideos()\n\treturn upu\n}",
"func (upq *UnsavedPostQuery) All(ctx context.Context) ([]*UnsavedPost, error) {\n\tif err := upq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn upq.sqlAll(ctx)\n}",
"func (c *PostAttachmentClient) QueryPost(pa *PostAttachment) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pa.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postattachment.Table, postattachment.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, postattachment.PostTable, postattachment.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pa.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostAttachmentClient) Query() *UnsavedPostAttachmentQuery {\n\treturn &UnsavedPostAttachmentQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *PostThumbnailClient) QueryPost(pt *PostThumbnail) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pt.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postthumbnail.Table, postthumbnail.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, true, postthumbnail.PostTable, postthumbnail.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pt.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostImageClient) Get(ctx context.Context, id int) (*UnsavedPostImage, error) {\n\treturn c.Query().Where(unsavedpostimage.ID(id)).Only(ctx)\n}",
"func UnpublishPost(shorturl string) (types.Post, error) {\n\tdb := database.GetMySQLInstance()\n\tdefer db.Close()\n\tvar post types.Post\n\terr := db.Where(\"shorturl LIKE ?\", shorturl).First(&post).Error\n\tif err != nil && err == gorm.ErrRecordNotFound {\n\t\treturn post, errors.New(\"post not found\")\n\t}\n\n\terr = db.Model(&post).Updates(map[string]interface{}{\"published\": false}).Error\n\tif err != nil {\n\t\treturn post, err\n\t}\n\tpost.Published = false\n\treturn post, nil\n}",
"func (upq *UnsavedPostQuery) QueryAttachments() *UnsavedPostAttachmentQuery {\n\tquery := &UnsavedPostAttachmentQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostattachment.Table, unsavedpostattachment.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.AttachmentsTable, unsavedpost.AttachmentsColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostClient) QueryThumbnail(up *UnsavedPost) *UnsavedPostThumbnailQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, unsavedpost.ThumbnailTable, unsavedpost.ThumbnailColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostAttachmentClient) Get(ctx context.Context, id int) (*UnsavedPostAttachment, error) {\n\treturn c.Query().Where(unsavedpostattachment.ID(id)).Only(ctx)\n}",
"func (upq *UnsavedPostQuery) QueryThumbnail() *UnsavedPostThumbnailQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostthumbnail.Table, unsavedpostthumbnail.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2O, false, unsavedpost.ThumbnailTable, unsavedpost.ThumbnailColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostThumbnailClient) Get(ctx context.Context, id int) (*UnsavedPostThumbnail, error) {\n\treturn c.Query().Where(unsavedpostthumbnail.ID(id)).Only(ctx)\n}",
"func (c *UnsavedPostVideoClient) Delete() *UnsavedPostVideoDelete {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpDelete)\n\treturn &UnsavedPostVideoDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upq *UnsavedPostQuery) QueryImages() *UnsavedPostImageQuery {\n\tquery := &UnsavedPostImageQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(unsavedpostimage.Table, unsavedpostimage.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.ImagesTable, unsavedpost.ImagesColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (e CategoryEdges) UnsavedPostsOrErr() ([]*UnsavedPost, error) {\n\tif e.loadedTypes[1] {\n\t\treturn e.UnsavedPosts, nil\n\t}\n\treturn nil, &NotLoadedError{edge: \"unsaved_posts\"}\n}",
"func (c *PostImageClient) QueryPost(pi *PostImage) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := pi.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(postimage.Table, postimage.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, postimage.PostTable, postimage.PostColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(pi.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostImageClient) Query() *UnsavedPostImageQuery {\n\treturn &UnsavedPostImageQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *UnsavedPostClient) QueryImages(up *UnsavedPost) *UnsavedPostImageQuery {\n\tquery := &UnsavedPostImageQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(unsavedpostimage.Table, unsavedpostimage.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, unsavedpost.ImagesTable, unsavedpost.ImagesColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upuo *UnsavedPostUpdateOne) ClearVideos() *UnsavedPostUpdateOne {\n\tupuo.mutation.ClearVideos()\n\treturn upuo\n}",
"func (upuo *UnsavedPostUpdateOne) Save(ctx context.Context) (*UnsavedPost, error) {\n\tvar (\n\t\terr error\n\t\tnode *UnsavedPost\n\t)\n\tupuo.defaults()\n\tif len(upuo.hooks) == 0 {\n\t\tif err = upuo.check(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tnode, err = upuo.sqlSave(ctx)\n\t} else {\n\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\tmutation, ok := m.(*UnsavedPostMutation)\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t}\n\t\t\tif err = upuo.check(); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tupuo.mutation = mutation\n\t\t\tnode, err = upuo.sqlSave(ctx)\n\t\t\tmutation.done = true\n\t\t\treturn node, err\n\t\t})\n\t\tfor i := len(upuo.hooks) - 1; i >= 0; i-- {\n\t\t\tmut = upuo.hooks[i](mut)\n\t\t}\n\t\tif _, err := mut.Mutate(ctx, upuo.mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn node, err\n}",
"func (c *UnsavedPostThumbnailClient) Query() *UnsavedPostThumbnailQuery {\n\treturn &UnsavedPostThumbnailQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (c *PostVideoClient) Get(ctx context.Context, id int) (*PostVideo, error) {\n\treturn c.Query().Where(postvideo.ID(id)).Only(ctx)\n}",
"func (upvc *UnsavedPostVideoCreate) Mutation() *UnsavedPostVideoMutation {\n\treturn upvc.mutation\n}",
"func (upq *UnsavedPostQuery) Where(ps ...predicate.UnsavedPost) *UnsavedPostQuery {\n\tupq.predicates = append(upq.predicates, ps...)\n\treturn upq\n}",
"func UnpublishBlogPost(ctx context.Context, id string) error {\n\tq := datastore.NewQuery(blogPostVersionKind).\n\t\tFilter(\"PostID=\", id).\n\t\tFilter(\"Published=\", true)\n\n\tvar posts []BlogPostVersion\n\tk, err := q.GetAll(ctx, &posts)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor i := range posts {\n\t\tposts[i].Published = false\n\t}\n\n\t_, err = datastore.PutMulti(ctx, k, posts)\n\treturn err\n}",
"func (upvcb *UnsavedPostVideoCreateBulk) Save(ctx context.Context) ([]*UnsavedPostVideo, error) {\n\tspecs := make([]*sqlgraph.CreateSpec, len(upvcb.builders))\n\tnodes := make([]*UnsavedPostVideo, len(upvcb.builders))\n\tmutators := make([]Mutator, len(upvcb.builders))\n\tfor i := range upvcb.builders {\n\t\tfunc(i int, root context.Context) {\n\t\t\tbuilder := upvcb.builders[i]\n\t\t\tbuilder.defaults()\n\t\t\tvar mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {\n\t\t\t\tmutation, ok := m.(*UnsavedPostVideoMutation)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"unexpected mutation type %T\", m)\n\t\t\t\t}\n\t\t\t\tif err := builder.check(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tbuilder.mutation = mutation\n\t\t\t\tnodes[i], specs[i] = builder.createSpec()\n\t\t\t\tvar err error\n\t\t\t\tif i < len(mutators)-1 {\n\t\t\t\t\t_, err = mutators[i+1].Mutate(root, upvcb.builders[i+1].mutation)\n\t\t\t\t} else {\n\t\t\t\t\t// Invoke the actual operation on the latest mutation in the chain.\n\t\t\t\t\tif err = sqlgraph.BatchCreate(ctx, upvcb.driver, &sqlgraph.BatchCreateSpec{Nodes: specs}); err != nil {\n\t\t\t\t\t\tif cerr, ok := isSQLConstraintError(err); ok {\n\t\t\t\t\t\t\terr = cerr\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmutation.done = true\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tid := specs[i].ID.Value.(int64)\n\t\t\t\tnodes[i].ID = int(id)\n\t\t\t\treturn nodes[i], nil\n\t\t\t})\n\t\t\tfor i := len(builder.hooks) - 1; i >= 0; i-- {\n\t\t\t\tmut = builder.hooks[i](mut)\n\t\t\t}\n\t\t\tmutators[i] = mut\n\t\t}(i, ctx)\n\t}\n\tif len(mutators) > 0 {\n\t\tif _, err := mutators[0].Mutate(ctx, upvcb.builders[0].mutation); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn nodes, nil\n}",
"func GetRecentPostMediaNoLogin(username string) (medias []IGMedia, err error) {\n\tui, err := GetUserInfoNoLogin(username)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tfor _, node := range ui.EdgeOwnerToTimelineMedia.Edges {\n\t\tmedias = append(medias, node.Node)\n\t}\n\treturn\n}",
"func (c *UnsavedPostVideoClient) GetX(ctx context.Context, id int) *UnsavedPostVideo {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (upu *UnsavedPostUpdate) RemoveVideos(u ...*UnsavedPostVideo) *UnsavedPostUpdate {\n\tids := make([]int, len(u))\n\tfor i := range u {\n\t\tids[i] = u[i].ID\n\t}\n\treturn upu.RemoveVideoIDs(ids...)\n}",
"func NewUnsavedPostClient(c config) *UnsavedPostClient {\n\treturn &UnsavedPostClient{config: c}\n}",
"func (c *UnsavedPostClient) QueryCategory(up *UnsavedPost) *CategoryQuery {\n\tquery := &CategoryQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(category.Table, category.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpost.CategoryTable, unsavedpost.CategoryColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upq *UnsavedPostQuery) AllX(ctx context.Context) []*UnsavedPost {\n\tnodes, err := upq.All(ctx)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn nodes\n}",
"func (upvc *UnsavedPostVideoCreate) SaveX(ctx context.Context) *UnsavedPostVideo {\n\tv, err := upvc.Save(ctx)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn v\n}",
"func (upq *UnsavedPostQuery) WithAttachments(opts ...func(*UnsavedPostAttachmentQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostAttachmentQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withAttachments = query\n\treturn upq\n}",
"func NewGraphqlPostUnauthorized() *GraphqlPostUnauthorized {\n\n\treturn &GraphqlPostUnauthorized{}\n}",
"func (upu *UnsavedPostUpdate) Where(ps ...predicate.UnsavedPost) *UnsavedPostUpdate {\n\tupu.mutation.predicates = append(upu.mutation.predicates, ps...)\n\treturn upu\n}",
"func (upu *UnsavedPostUpdate) Mutation() *UnsavedPostMutation {\n\treturn upu.mutation\n}",
"func (m *IGApiManager) GetRecentPostMedia(username string) (medias []IGMedia, err error) {\n\tui, err := m.GetUserInfo(username)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tfor _, node := range ui.EdgeOwnerToTimelineMedia.Edges {\n\t\tmedias = append(medias, node.Node)\n\t}\n\treturn\n}",
"func (upvc *UnsavedPostVideoCreate) check() error {\n\tif _, ok := upvc.mutation.UUID(); !ok {\n\t\treturn &ValidationError{Name: \"uuid\", err: errors.New(\"ent: missing required field \\\"uuid\\\"\")}\n\t}\n\tif v, ok := upvc.mutation.UUID(); ok {\n\t\tif err := unsavedpostvideo.UUIDValidator(v); err != nil {\n\t\t\treturn &ValidationError{Name: \"uuid\", err: fmt.Errorf(\"ent: validator failed for field \\\"uuid\\\": %w\", err)}\n\t\t}\n\t}\n\tif _, ok := upvc.mutation.Validity(); !ok {\n\t\treturn &ValidationError{Name: \"validity\", err: errors.New(\"ent: missing required field \\\"validity\\\"\")}\n\t}\n\tif v, ok := upvc.mutation.Validity(); ok {\n\t\tif err := unsavedpostvideo.ValidityValidator(v); err != nil {\n\t\t\treturn &ValidationError{Name: \"validity\", err: fmt.Errorf(\"ent: validator failed for field \\\"validity\\\": %w\", err)}\n\t\t}\n\t}\n\tif v, ok := upvc.mutation.Title(); ok {\n\t\tif err := unsavedpostvideo.TitleValidator(v); err != nil {\n\t\t\treturn &ValidationError{Name: \"title\", err: fmt.Errorf(\"ent: validator failed for field \\\"title\\\": %w\", err)}\n\t\t}\n\t}\n\tif v, ok := upvc.mutation.URL(); ok {\n\t\tif err := unsavedpostvideo.URLValidator(v); err != nil {\n\t\t\treturn &ValidationError{Name: \"url\", err: fmt.Errorf(\"ent: validator failed for field \\\"url\\\": %w\", err)}\n\t\t}\n\t}\n\tif _, ok := upvc.mutation.CreatedAt(); !ok {\n\t\treturn &ValidationError{Name: \"created_at\", err: errors.New(\"ent: missing required field \\\"created_at\\\"\")}\n\t}\n\tif _, ok := upvc.mutation.UnsavedPostID(); !ok {\n\t\treturn &ValidationError{Name: \"unsaved_post\", err: errors.New(\"ent: missing required edge \\\"unsaved_post\\\"\")}\n\t}\n\treturn nil\n}",
"func (upq *UnsavedPostQuery) WithThumbnail(opts ...func(*UnsavedPostThumbnailQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostThumbnailQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withThumbnail = query\n\treturn upq\n}",
"func (upuo *UnsavedPostUpdateOne) RemoveVideos(u ...*UnsavedPostVideo) *UnsavedPostUpdateOne {\n\tids := make([]int, len(u))\n\tfor i := range u {\n\t\tids[i] = u[i].ID\n\t}\n\treturn upuo.RemoveVideoIDs(ids...)\n}",
"func (upu *UnsavedPostUpdate) ClearSlug() *UnsavedPostUpdate {\n\tupu.mutation.ClearSlug()\n\treturn upu\n}",
"func (c *UnsavedPostVideoClient) Update() *UnsavedPostVideoUpdate {\n\tmutation := newUnsavedPostVideoMutation(c.config, OpUpdate)\n\treturn &UnsavedPostVideoUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func (upq *UnsavedPostQuery) QueryCategory() *CategoryQuery {\n\tquery := &CategoryQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(category.Table, category.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpost.CategoryTable, unsavedpost.CategoryColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (env *Env) GetUnpublishedPosts(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\tuser := ctx.Value(contextUser).(*models.User)\n\t// Just a double check - should we remove?\n\tif user.Role != \"ADMIN\" {\n\t\tw.WriteHeader(http.StatusForbidden)\n\t}\n\tp, err := env.DB.UnpublishedPosts()\n\tif err != nil {\n\t\tenv.log(r, err)\n\t\tw.WriteHeader(http.StatusNotFound)\n\t\treturn\n\t}\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tw.WriteHeader(http.StatusOK)\n\tjson.NewEncoder(w).Encode(p)\n}",
"func NewGraphqlPostUnprocessableEntity() *GraphqlPostUnprocessableEntity {\n\n\treturn &GraphqlPostUnprocessableEntity{}\n}",
"func (c *UnsavedPostClient) GetX(ctx context.Context, id int) *UnsavedPost {\n\tobj, err := c.Get(ctx, id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn obj\n}",
"func (upu *UnsavedPostUpdate) ClearTitle() *UnsavedPostUpdate {\n\tupu.mutation.ClearTitle()\n\treturn upu\n}",
"func (upq *UnsavedPostQuery) QueryAuthor() *AdminQuery {\n\tquery := &AdminQuery{config: upq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := upq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := upq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, selector),\n\t\t\tsqlgraph.To(admin.Table, admin.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpost.AuthorTable, unsavedpost.AuthorColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(upq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (s *MockStore) DelPost(id int) error {\n\t_, err := s.GetPost(id)\n\tdelete(s.mem, id)\n\n\treturn err\n}",
"func (c *PostVideoClient) Query() *PostVideoQuery {\n\treturn &PostVideoQuery{\n\t\tconfig: c.config,\n\t}\n}",
"func (item *Item) Unsave() error {\n\treturn item.changeSave(urlMediaUnsave)\n}",
"func DestroyPost(w http.ResponseWriter, r *http.Request) {\n\n\tdb, err := sqlx.Connect(\"postgres\", connStr)\n\tif err != nil {\n\t\tfmt.Println(err)\n\t}\n\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\n\tparams := mux.Vars(r)\n\tquery := \"delete from posts where id=\" + params[\"id\"]\n\n\tdb.MustExec(query)\n}",
"func (c *AdminClient) QueryPosts(a *Admin) *PostQuery {\n\tquery := &PostQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := a.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(admin.Table, admin.FieldID, id),\n\t\t\tsqlgraph.To(post.Table, post.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, admin.PostsTable, admin.PostsColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(a.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (c *UnsavedPostClient) QueryAuthor(up *UnsavedPost) *AdminQuery {\n\tquery := &AdminQuery{config: c.config}\n\tquery.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {\n\t\tid := up.ID\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(unsavedpost.Table, unsavedpost.FieldID, id),\n\t\t\tsqlgraph.To(admin.Table, admin.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.M2O, true, unsavedpost.AuthorTable, unsavedpost.AuthorColumn),\n\t\t)\n\t\tfromV = sqlgraph.Neighbors(up.driver.Dialect(), step)\n\t\treturn fromV, nil\n\t}\n\treturn query\n}",
"func (upu *UnsavedPostUpdate) AddVideos(u ...*UnsavedPostVideo) *UnsavedPostUpdate {\n\tids := make([]int, len(u))\n\tfor i := range u {\n\t\tids[i] = u[i].ID\n\t}\n\treturn upu.AddVideoIDs(ids...)\n}",
"func (upq *UnsavedPostQuery) OnlyX(ctx context.Context) *UnsavedPost {\n\tnode, err := upq.Only(ctx)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn node\n}",
"func (upq *UnsavedPostQuery) Count(ctx context.Context) (int, error) {\n\tif err := upq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn upq.sqlCount(ctx)\n}",
"func DBVideoToGQLVideo(i *dbm.Video) (o *gql.Video, err error) {\n\to = &gql.Video{\n\t\tID: *i.ID,\n\t\tTitle: i.Title,\n\t\tURL: *i.Url,\n\t}\n\treturn o, err\n}",
"func (upu *UnsavedPostUpdate) ClearAttachments() *UnsavedPostUpdate {\n\tupu.mutation.ClearAttachments()\n\treturn upu\n}",
"func (r *Resolver) PostQueryResolver(params graphql.ResolveParams) (interface{}, error) {\n\t// Strip the id from arguments and assert type\n\tid, ok := params.Args[\"id\"].(int)\n\tif ok {\n\t\tposts, err := r.Repository.GetByID(id)\n\t\treturn posts, err\n\t}\n\n\t// We didn't get a valid ID as a param, so we return all the posts\n\treturn r.Repository.GetAllPosts()\n}",
"func (upq *UnsavedPostQuery) WithImages(opts ...func(*UnsavedPostImageQuery)) *UnsavedPostQuery {\n\tquery := &UnsavedPostImageQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withImages = query\n\treturn upq\n}",
"func (upq *UnsavedPostQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := upq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn upq.sqlExist(ctx)\n}",
"func (upu *UnsavedPostUpdate) ClearImages() *UnsavedPostUpdate {\n\tupu.mutation.ClearImages()\n\treturn upu\n}",
"func (upuo *UnsavedPostUpdateOne) Mutation() *UnsavedPostMutation {\n\treturn upuo.mutation\n}",
"func (w *Window) PostEmpty() {\n\tglfw.PostEmptyEvent()\n}",
"func (upq *UnsavedPostQuery) WithCategory(opts ...func(*CategoryQuery)) *UnsavedPostQuery {\n\tquery := &CategoryQuery{config: upq.config}\n\tfor _, opt := range opts {\n\t\topt(query)\n\t}\n\tupq.withCategory = query\n\treturn upq\n}",
"func (upuo *UnsavedPostUpdateOne) AddVideos(u ...*UnsavedPostVideo) *UnsavedPostUpdateOne {\n\tids := make([]int, len(u))\n\tfor i := range u {\n\t\tids[i] = u[i].ID\n\t}\n\treturn upuo.AddVideoIDs(ids...)\n}",
"func (c *commentsQueryBuilder) RemovePost() (int64, error) {\n\tif c.err != nil {\n\t\treturn 0, c.err\n\t}\n\trelation, err := NRN_Comments.Model.RelationByIndex(2)\n\tif err != nil {\n\t\treturn 0, errors.Wrapf(mapping.ErrInternal, \"getting 'Post' relation by index for model 'Comment' failed: %v\", err)\n\t}\n\treturn c.builder.RemoveRelations(relation)\n}",
"func (upu *UnsavedPostUpdate) RemoveVideoIDs(ids ...int) *UnsavedPostUpdate {\n\tupu.mutation.RemoveVideoIDs(ids...)\n\treturn upu\n}",
"func (upu *UnsavedPostUpdate) check() error {\n\tif v, ok := upu.mutation.UUID(); ok {\n\t\tif err := unsavedpost.UUIDValidator(v); err != nil {\n\t\t\treturn &ValidationError{Name: \"uuid\", err: fmt.Errorf(\"ent: validator failed for field \\\"uuid\\\": %w\", err)}\n\t\t}\n\t}\n\tif v, ok := upu.mutation.Slug(); ok {\n\t\tif err := unsavedpost.SlugValidator(v); err != nil {\n\t\t\treturn &ValidationError{Name: \"slug\", err: fmt.Errorf(\"ent: validator failed for field \\\"slug\\\": %w\", err)}\n\t\t}\n\t}\n\tif v, ok := upu.mutation.AccessLevel(); ok {\n\t\tif err := unsavedpost.AccessLevelValidator(v); err != nil {\n\t\t\treturn &ValidationError{Name: \"access_level\", err: fmt.Errorf(\"ent: validator failed for field \\\"access_level\\\": %w\", err)}\n\t\t}\n\t}\n\tif v, ok := upu.mutation.Title(); ok {\n\t\tif err := unsavedpost.TitleValidator(v); err != nil {\n\t\t\treturn &ValidationError{Name: \"title\", err: fmt.Errorf(\"ent: validator failed for field \\\"title\\\": %w\", err)}\n\t\t}\n\t}\n\tif _, ok := upu.mutation.AuthorID(); upu.mutation.AuthorCleared() && !ok {\n\t\treturn errors.New(\"ent: clearing a required unique edge \\\"author\\\"\")\n\t}\n\treturn nil\n}",
"func (c *UnsavedPostClient) Delete() *UnsavedPostDelete {\n\tmutation := newUnsavedPostMutation(c.config, OpDelete)\n\treturn &UnsavedPostDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}\n}",
"func NewPDFUnsavedSig() *PDFUnsavedSig {\n\treturn (*PDFUnsavedSig)(allocPDFUnsavedSigMemory(1))\n}",
"func NewUnsavedPostImageClient(c config) *UnsavedPostImageClient {\n\treturn &UnsavedPostImageClient{config: c}\n}",
"func NewUnsavedPostAttachmentClient(c config) *UnsavedPostAttachmentClient {\n\treturn &UnsavedPostAttachmentClient{config: c}\n}",
"func (upu *UnsavedPostUpdate) ClearContent() *UnsavedPostUpdate {\n\tupu.mutation.ClearContent()\n\treturn upu\n}",
"func (upuo *UnsavedPostUpdateOne) SaveX(ctx context.Context) *UnsavedPost {\n\tnode, err := upuo.Save(ctx)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn node\n}",
"func (upq *UnsavedPostQuery) Unique(unique bool) *UnsavedPostQuery {\n\tupq.unique = &unique\n\treturn upq\n}",
"func (me *XsdGoPkgHasElem_PostBox) Walk() (err error) {\r\n\tif fn := WalkHandlers.XsdGoPkgHasElem_PostBox; me != nil {\r\n\t\tif fn != nil {\r\n\t\t\tif err = fn(me, true); xsdt.OnWalkError(&err, &WalkErrors, WalkContinueOnError, WalkOnError) {\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\t\t}\r\n\t\tif err = me.PostBox.Walk(); xsdt.OnWalkError(&err, &WalkErrors, WalkContinueOnError, WalkOnError) {\r\n\t\t\treturn\r\n\t\t}\r\n\t\tif fn != nil {\r\n\t\t\tif err = fn(me, false); xsdt.OnWalkError(&err, &WalkErrors, WalkContinueOnError, WalkOnError) {\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn\r\n}"
] |
[
"0.7551261",
"0.7482706",
"0.72833043",
"0.6855306",
"0.65172386",
"0.6275898",
"0.6168872",
"0.61466223",
"0.5964457",
"0.5962427",
"0.579486",
"0.57181776",
"0.5708585",
"0.5647332",
"0.5305457",
"0.528406",
"0.5265498",
"0.5187423",
"0.517293",
"0.5014415",
"0.49772963",
"0.49743912",
"0.4905157",
"0.49044457",
"0.48967642",
"0.48872665",
"0.48754665",
"0.4857696",
"0.48393154",
"0.47696856",
"0.47511196",
"0.4716675",
"0.47043467",
"0.46874183",
"0.4603607",
"0.46031487",
"0.45856452",
"0.45389378",
"0.4507673",
"0.44800645",
"0.44510645",
"0.44340932",
"0.4427608",
"0.4415105",
"0.44025046",
"0.43693835",
"0.4361526",
"0.43209895",
"0.43141916",
"0.42050004",
"0.42026696",
"0.41878402",
"0.41675675",
"0.41614643",
"0.41536933",
"0.41479146",
"0.41282442",
"0.41068327",
"0.4105859",
"0.40989667",
"0.40567032",
"0.40477875",
"0.40294072",
"0.40090838",
"0.40023616",
"0.39618784",
"0.39528933",
"0.39411163",
"0.39163283",
"0.3909248",
"0.39081302",
"0.39081082",
"0.38880602",
"0.38755384",
"0.38734218",
"0.38725916",
"0.38723698",
"0.38605905",
"0.3857769",
"0.384611",
"0.38336858",
"0.38312516",
"0.3828226",
"0.37924227",
"0.37870437",
"0.3782369",
"0.37813652",
"0.37710518",
"0.37700495",
"0.3768592",
"0.37494048",
"0.37381506",
"0.37313652",
"0.37310103",
"0.37307826",
"0.37141445",
"0.36989272",
"0.36931574",
"0.3691965",
"0.36717513"
] |
0.80787295
|
0
|
Hooks returns the client hooks.
|
func (c *UnsavedPostVideoClient) Hooks() []Hook {
return c.hooks.UnsavedPostVideo
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *OperationClient) Hooks() []Hook {\n\treturn c.hooks.Operation\n}",
"func (c *ToolClient) Hooks() []Hook {\n\treturn c.hooks.Tool\n}",
"func (c *TagClient) Hooks() []Hook {\n\treturn c.hooks.Tag\n}",
"func (c *ComplaintClient) Hooks() []Hook {\n\treturn c.hooks.Complaint\n}",
"func (c *PostClient) Hooks() []Hook {\n\treturn c.hooks.Post\n}",
"func (c *ClubapplicationClient) Hooks() []Hook {\n\treturn c.hooks.Clubapplication\n}",
"func (c *ClinicClient) Hooks() []Hook {\n\treturn c.hooks.Clinic\n}",
"func (c *EventClient) Hooks() []Hook {\n\treturn c.hooks.Event\n}",
"func (c *BuildingClient) Hooks() []Hook {\n\treturn c.hooks.Building\n}",
"func (c *OperativeClient) Hooks() []Hook {\n\treturn c.hooks.Operative\n}",
"func (c *SituationClient) Hooks() []Hook {\n\treturn c.hooks.Situation\n}",
"func (c *AppointmentClient) Hooks() []Hook {\n\treturn c.hooks.Appointment\n}",
"func (c *RentalstatusClient) Hooks() []Hook {\n\treturn c.hooks.Rentalstatus\n}",
"func (c *LeaseClient) Hooks() []Hook {\n\treturn c.hooks.Lease\n}",
"func (c *ReturninvoiceClient) Hooks() []Hook {\n\treturn c.hooks.Returninvoice\n}",
"func (c *ClubappStatusClient) Hooks() []Hook {\n\treturn c.hooks.ClubappStatus\n}",
"func (c *ReviewClient) Hooks() []Hook {\n\treturn c.hooks.Review\n}",
"func (c *EmployeeClient) Hooks() []Hook {\n\treturn c.hooks.Employee\n}",
"func (c *EmployeeClient) Hooks() []Hook {\n\treturn c.hooks.Employee\n}",
"func (c *EmployeeClient) Hooks() []Hook {\n\treturn c.hooks.Employee\n}",
"func (c *WorkExperienceClient) Hooks() []Hook {\n\treturn c.hooks.WorkExperience\n}",
"func (c *PartClient) Hooks() []Hook {\n\treturn c.hooks.Part\n}",
"func (c *CleanernameClient) Hooks() []Hook {\n\treturn c.hooks.Cleanername\n}",
"func (c *BeerClient) Hooks() []Hook {\n\treturn c.hooks.Beer\n}",
"func (c *FoodmenuClient) Hooks() []Hook {\n\treturn c.hooks.Foodmenu\n}",
"func (c *RepairinvoiceClient) Hooks() []Hook {\n\treturn c.hooks.Repairinvoice\n}",
"func (c *StatusdClient) Hooks() []Hook {\n\treturn c.hooks.Statusd\n}",
"func (c *EmptyClient) Hooks() []Hook {\n\treturn c.hooks.Empty\n}",
"func (c *BillClient) Hooks() []Hook {\n\treturn c.hooks.Bill\n}",
"func (c *BillClient) Hooks() []Hook {\n\treturn c.hooks.Bill\n}",
"func (c *BillClient) Hooks() []Hook {\n\treturn c.hooks.Bill\n}",
"func (c *CompanyClient) Hooks() []Hook {\n\treturn c.hooks.Company\n}",
"func (c *CompanyClient) Hooks() []Hook {\n\treturn c.hooks.Company\n}",
"func (c *IPClient) Hooks() []Hook {\n\treturn c.hooks.IP\n}",
"func (c *VeterinarianClient) Hooks() []Hook {\n\treturn c.hooks.Veterinarian\n}",
"func (c *MedicineClient) Hooks() []Hook {\n\treturn c.hooks.Medicine\n}",
"func (c *PrescriptionClient) Hooks() []Hook {\n\treturn c.hooks.Prescription\n}",
"func (c *TransactionClient) Hooks() []Hook {\n\treturn c.hooks.Transaction\n}",
"func (c *CategoryClient) Hooks() []Hook {\n\treturn c.hooks.Category\n}",
"func (c *KeyStoreClient) Hooks() []Hook {\n\treturn c.hooks.KeyStore\n}",
"func (c *PetruleClient) Hooks() []Hook {\n\treturn c.hooks.Petrule\n}",
"func (c *LevelOfDangerousClient) Hooks() []Hook {\n\treturn c.hooks.LevelOfDangerous\n}",
"func (c *AdminClient) Hooks() []Hook {\n\treturn c.hooks.Admin\n}",
"func (c *JobClient) Hooks() []Hook {\n\treturn c.hooks.Job\n}",
"func (c *OrderClient) Hooks() []Hook {\n\treturn c.hooks.Order\n}",
"func (c *PetClient) Hooks() []Hook {\n\treturn c.hooks.Pet\n}",
"func (c *DNSBLResponseClient) Hooks() []Hook {\n\treturn c.hooks.DNSBLResponse\n}",
"func (c *MealplanClient) Hooks() []Hook {\n\treturn c.hooks.Mealplan\n}",
"func (c *RepairInvoiceClient) Hooks() []Hook {\n\treturn c.hooks.RepairInvoice\n}",
"func (c *DoctorClient) Hooks() []Hook {\n\treturn c.hooks.Doctor\n}",
"func (c *StatustClient) Hooks() []Hook {\n\treturn c.hooks.Statust\n}",
"func (c *EatinghistoryClient) Hooks() []Hook {\n\treturn c.hooks.Eatinghistory\n}",
"func (c *StaytypeClient) Hooks() []Hook {\n\treturn c.hooks.Staytype\n}",
"func (c *CustomerClient) Hooks() []Hook {\n\treturn c.hooks.Customer\n}",
"func (c *StatusRClient) Hooks() []Hook {\n\treturn c.hooks.StatusR\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UserClient) Hooks() []Hook {\n\treturn c.hooks.User\n}",
"func (c *UnitOfMedicineClient) Hooks() []Hook {\n\treturn c.hooks.UnitOfMedicine\n}",
"func (c *YearClient) Hooks() []Hook {\n\treturn c.hooks.Year\n}",
"func (c *ClubClient) Hooks() []Hook {\n\treturn c.hooks.Club\n}",
"func (c *DentistClient) Hooks() []Hook {\n\treturn c.hooks.Dentist\n}",
"func (c *PaymentClient) Hooks() []Hook {\n\treturn c.hooks.Payment\n}",
"func (c *PaymentClient) Hooks() []Hook {\n\treturn c.hooks.Payment\n}",
"func (c *BookingClient) Hooks() []Hook {\n\treturn c.hooks.Booking\n}",
"func (c *DisciplineClient) Hooks() []Hook {\n\treturn c.hooks.Discipline\n}",
"func (c *PlanetClient) Hooks() []Hook {\n\treturn c.hooks.Planet\n}",
"func (c *OperationroomClient) Hooks() []Hook {\n\treturn c.hooks.Operationroom\n}",
"func (c *LengthtimeClient) Hooks() []Hook {\n\treturn c.hooks.Lengthtime\n}",
"func (c *DispenseMedicineClient) Hooks() []Hook {\n\treturn c.hooks.DispenseMedicine\n}",
"func (c *PartorderClient) Hooks() []Hook {\n\treturn c.hooks.Partorder\n}",
"func (c *PatientInfoClient) Hooks() []Hook {\n\treturn c.hooks.PatientInfo\n}",
"func (c *SkillClient) Hooks() []Hook {\n\treturn c.hooks.Skill\n}",
"func (c *PharmacistClient) Hooks() []Hook {\n\treturn c.hooks.Pharmacist\n}",
"func (c *TitleClient) Hooks() []Hook {\n\treturn c.hooks.Title\n}",
"func (c *DepositClient) Hooks() []Hook {\n\treturn c.hooks.Deposit\n}",
"func (c *SessionClient) Hooks() []Hook {\n\treturn c.hooks.Session\n}",
"func (c *PostImageClient) Hooks() []Hook {\n\treturn c.hooks.PostImage\n}",
"func (c *DrugAllergyClient) Hooks() []Hook {\n\treturn c.hooks.DrugAllergy\n}",
"func (c *TimerClient) Hooks() []Hook {\n\treturn c.hooks.Timer\n}",
"func (c *PhysicianClient) Hooks() []Hook {\n\treturn c.hooks.Physician\n}",
"func (c *PhysicianClient) Hooks() []Hook {\n\treturn c.hooks.Physician\n}",
"func (c *PostAttachmentClient) Hooks() []Hook {\n\treturn c.hooks.PostAttachment\n}",
"func (c *PatientClient) Hooks() []Hook {\n\treturn c.hooks.Patient\n}",
"func (c *PatientClient) Hooks() []Hook {\n\treturn c.hooks.Patient\n}",
"func (c *PatientClient) Hooks() []Hook {\n\treturn c.hooks.Patient\n}",
"func (c *PostThumbnailClient) Hooks() []Hook {\n\treturn c.hooks.PostThumbnail\n}",
"func (c *BedtypeClient) Hooks() []Hook {\n\treturn c.hooks.Bedtype\n}",
"func (c *CoinInfoClient) Hooks() []Hook {\n\treturn c.hooks.CoinInfo\n}",
"func (c *OperativerecordClient) Hooks() []Hook {\n\treturn c.hooks.Operativerecord\n}",
"func (c *ActivitiesClient) Hooks() []Hook {\n\treturn c.hooks.Activities\n}",
"func (c *MedicineTypeClient) Hooks() []Hook {\n\treturn c.hooks.MedicineType\n}",
"func (c *AdminSessionClient) Hooks() []Hook {\n\treturn c.hooks.AdminSession\n}"
] |
[
"0.80317485",
"0.79030067",
"0.7886111",
"0.78830385",
"0.7861127",
"0.7827846",
"0.78169984",
"0.7799408",
"0.7789961",
"0.7762907",
"0.774616",
"0.77400076",
"0.77377117",
"0.7723144",
"0.7715899",
"0.77091956",
"0.76981485",
"0.7695239",
"0.7695239",
"0.7695239",
"0.7691411",
"0.76718473",
"0.7669308",
"0.76659566",
"0.76649994",
"0.7658629",
"0.76272875",
"0.7619314",
"0.7616328",
"0.7616328",
"0.7616328",
"0.7613535",
"0.7613535",
"0.7612722",
"0.7607983",
"0.76073736",
"0.76072484",
"0.7600732",
"0.7597693",
"0.75947726",
"0.7593981",
"0.75886565",
"0.75843227",
"0.7583164",
"0.7580412",
"0.7568908",
"0.7559808",
"0.75595653",
"0.75512165",
"0.75502926",
"0.7532545",
"0.75314486",
"0.7530887",
"0.75256604",
"0.7522074",
"0.75039285",
"0.75039285",
"0.75039285",
"0.75039285",
"0.75039285",
"0.75039285",
"0.75039285",
"0.75039285",
"0.75039285",
"0.75039285",
"0.75039285",
"0.7503626",
"0.75009644",
"0.74971604",
"0.74927765",
"0.74925745",
"0.74925745",
"0.7490701",
"0.7489253",
"0.748288",
"0.748131",
"0.74717736",
"0.74631125",
"0.74541014",
"0.7448737",
"0.7445493",
"0.74428546",
"0.74352837",
"0.7419495",
"0.7416624",
"0.7410944",
"0.7410398",
"0.74081314",
"0.73945314",
"0.73945314",
"0.7394305",
"0.7393659",
"0.7393659",
"0.7393659",
"0.73885626",
"0.7386602",
"0.7375832",
"0.73689777",
"0.73569894",
"0.73537123",
"0.7353203"
] |
0.0
|
-1
|
NewMockRegionsService creates a new mock instance.
|
func NewMockRegionsService(ctrl *gomock.Controller) *MockRegionsService {
mock := &MockRegionsService{ctrl: ctrl}
mock.recorder = &MockRegionsServiceMockRecorder{mock}
return mock
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func NewMock(middleware []Middleware) OrganizationService {\n\tvar svc OrganizationService = NewBasicOrganizationServiceServiceMock()\n\tfor _, m := range middleware {\n\t\tsvc = m(svc)\n\t}\n\treturn svc\n}",
"func newAzureMachinePoolService(machinePoolScope *scope.MachinePoolScope, clusterScope *scope.ClusterScope) *azureMachinePoolService {\n\tcache := resourceskus.NewCache(clusterScope, clusterScope.Location())\n\treturn &azureMachinePoolService{\n\t\tvirtualMachinesScaleSetSvc: scalesets.NewService(machinePoolScope, cache),\n\t\tskuCache: cache,\n\t}\n}",
"func NewService(t mockConstructorTestingTNewService) *Service {\n\tmock := &Service{}\n\tmock.Mock.Test(t)\n\n\tt.Cleanup(func() { mock.AssertExpectations(t) })\n\n\treturn mock\n}",
"func NewService(t testing.TB) *Service {\n\tmock := &Service{}\n\tmock.Mock.Test(t)\n\n\tt.Cleanup(func() { mock.AssertExpectations(t) })\n\n\treturn mock\n}",
"func New(mockenv *common.MockEnvironment, storage storage.Storage) *MockService {\n\ts := &MockService{\n\t\tkube: mockenv.GetKubeClient(),\n\t\tstorage: storage,\n\t\tprojects: mockenv.GetProjects(),\n\t}\n\ts.v1 = &SecretsV1{MockService: s}\n\treturn s\n}",
"func New() (*mock, error) {\n\treturn &mock{\n\t\tConfigService: ConfigService{},\n\t\tContainerService: ContainerService{},\n\t\tDistributionService: DistributionService{},\n\t\tImageService: ImageService{},\n\t\tNetworkService: NetworkService{},\n\t\tNodeService: NodeService{},\n\t\tPluginService: PluginService{},\n\t\tSecretService: SecretService{},\n\t\tServiceService: ServiceService{},\n\t\tSystemService: SystemService{},\n\t\tSwarmService: SwarmService{},\n\t\tVolumeService: VolumeService{},\n\t\tVersion: Version,\n\t}, nil\n}",
"func (m *MockKubernetesService) GetRegions() (do.KubernetesRegions, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"GetRegions\")\n\tret0, _ := ret[0].(do.KubernetesRegions)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func NewMock() *Mock {\n\treturn &Mock{VolumesMock: &VolumesServiceMock{}}\n}",
"func NewIdentityService(t mockConstructorTestingTNewIdentityService) *IdentityService {\n\tmock := &IdentityService{}\n\tmock.Mock.Test(t)\n\n\tt.Cleanup(func() { mock.AssertExpectations(t) })\n\n\treturn mock\n}",
"func newMockSubscriber() mockSubscriber {\n\treturn mockSubscriber{}\n}",
"func newClient(auth azure.Authorizer) *azureClient {\n\treturn &azureClient{\n\t\tscalesetvms: newVirtualMachineScaleSetVMsClient(auth.SubscriptionID(), auth.BaseURI(), auth.Authorizer()),\n\t}\n}",
"func NewMockService(transport *http.Transport, aurl string, rurl string, surl string) Service {\n\n\treturn Service{\n\t\tclient: &http.Client{\n\t\t\tTransport: transport,\n\t\t},\n\t\tauthURL: aurl,\n\t\tregistryURL: rurl,\n\t\tserviceURL: surl,\n\t}\n}",
"func NewMockReplacer(\n\tctx context.Context,\n\tregion string,\n\tprofile string) *Replacer {\n\n\tasgroup := newAsg(region, profile)\n\tdeploy := fsm.NewDeploy(\"start\")\n\tasgroup.Ec2Api = &mockEC2iface{}\n\tasgroup.AsgAPI = &mockASGiface{}\n\tasgroup.EcsAPI = &mockECSiface{}\n\treturn &Replacer{\n\t\tctx: ctx,\n\t\tasg: asgroup,\n\t\tdeploy: deploy,\n\t}\n}",
"func TestIntegrationNew(t *testing.T) {\n\ttests := []struct {\n\t\tdefaultRegion string\n\t\tregions []string\n\t}{\n\t\t{genericRegions[0], genericRegions},\n\t}\n\tfor _, tt := range tests {\n\t\ttc := tt\n\t\tt.Run(\"test with 2 regions\", func(t *testing.T) {\n\t\t\ts := New(tc.defaultRegion, tc.regions)\n\t\t\tif s.defaultRegion != tc.defaultRegion {\n\t\t\t\tt.Fatalf(\"defaultRegion invalid expected: %s, got: %s\", tc.defaultRegion, s.defaultRegion)\n\t\t\t}\n\t\t\tif len(s.regions) != len(tc.regions) {\n\t\t\t\tt.Fatalf(\"regions length invalid, expected: %d, got: %d\", len(tc.regions), len(s.regions))\n\t\t\t}\n\t\t})\n\t}\n}",
"func NewMockRegistrar(ctrl *gomock.Controller) *MockRegistrar {\n\tmock := &MockRegistrar{ctrl: ctrl}\n\tmock.recorder = &MockRegistrarMockRecorder{mock}\n\treturn mock\n}",
"func NewRegion(c *config.Config, client *api.Client, channels *RegionBroadcastChannels) (*Region, error) {\n\treturn &Region{\n\t\tConfig: c,\n\t\tClient: client,\n\t\tbroadcastChannels: channels,\n\t\tregions: make([]string, 0),\n\t\tservices: &InternalServices{},\n\t\tnodes: &InternalNodes{},\n\t}, nil\n}",
"func testMakeBucketRegionsV2() {\n\t// initialize logging params\n\tstartTime := time.Now()\n\ttestName := getFuncName()\n\tfunction := \"MakeBucket(bucketName, region)\"\n\targs := map[string]interface{}{\n\t\t\"bucketName\": \"\",\n\t\t\"region\": \"eu-west-1\",\n\t}\n\n\t// Seed random based on current time.\n\trand.Seed(time.Now().Unix())\n\n\t// Instantiate new minio client object.\n\tc, err := minio.New(os.Getenv(serverEndpoint),\n\t\t&minio.Options{\n\t\t\tCreds: credentials.NewStaticV2(os.Getenv(accessKey), os.Getenv(secretKey), \"\"),\n\t\t\tSecure: mustParseBool(os.Getenv(enableHTTPS)),\n\t\t})\n\tif err != nil {\n\t\tlogError(testName, function, args, startTime, \"\", \"MinIO v2 client object creation failed\", err)\n\t\treturn\n\t}\n\n\t// Enable tracing, write to stderr.\n\t// c.TraceOn(os.Stderr)\n\n\t// Set user agent.\n\tc.SetAppInfo(\"MinIO-go-FunctionalTest\", \"0.1.0\")\n\n\t// Generate a new random bucket name.\n\tbucketName := randString(60, rand.NewSource(time.Now().UnixNano()), \"minio-go-test-\")\n\targs[\"bucketName\"] = bucketName\n\n\t// Make a new bucket in 'eu-central-1'.\n\tif err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: \"eu-west-1\"}); err != nil {\n\t\tlogError(testName, function, args, startTime, \"\", \"MakeBucket failed\", err)\n\t\treturn\n\t}\n\n\tif err = cleanupBucket(bucketName, c); err != nil {\n\t\tlogError(testName, function, args, startTime, \"\", \"CleanupBucket failed while removing bucket recursively\", err)\n\t\treturn\n\t}\n\n\t// Make a new bucket with '.' in its name, in 'us-west-2'. This\n\t// request is internally staged into a path style instead of\n\t// virtual host style.\n\tif err = c.MakeBucket(context.Background(), bucketName+\".withperiod\", minio.MakeBucketOptions{Region: \"us-west-2\"}); err != nil {\n\t\targs[\"bucketName\"] = bucketName + \".withperiod\"\n\t\targs[\"region\"] = \"us-west-2\"\n\t\tlogError(testName, function, args, startTime, \"\", \"MakeBucket test with a bucket name with period, '.', failed\", err)\n\t\treturn\n\t}\n\n\t// Delete all objects and buckets\n\tif err = cleanupBucket(bucketName+\".withperiod\", c); err != nil {\n\t\tlogError(testName, function, args, startTime, \"\", \"CleanupBucket failed while removing bucket recursively\", err)\n\t\treturn\n\t}\n\n\tsuccessLogger(testName, function, args, startTime).Info()\n}",
"func testMakeBucketRegions() {\n\tregion := \"eu-central-1\"\n\t// initialize logging params\n\tstartTime := time.Now()\n\ttestName := getFuncName()\n\tfunction := \"MakeBucket(bucketName, region)\"\n\t// initialize logging params\n\targs := map[string]interface{}{\n\t\t\"bucketName\": \"\",\n\t\t\"region\": region,\n\t}\n\n\t// Seed random based on current time.\n\trand.Seed(time.Now().Unix())\n\n\t// Instantiate new minio client object.\n\tc, err := minio.New(os.Getenv(serverEndpoint),\n\t\t&minio.Options{\n\t\t\tCreds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), \"\"),\n\t\t\tSecure: mustParseBool(os.Getenv(enableHTTPS)),\n\t\t})\n\tif err != nil {\n\t\tlogError(testName, function, args, startTime, \"\", \"MinIO client creation failed\", err)\n\t\treturn\n\t}\n\n\t// Enable tracing, write to stderr.\n\t// c.TraceOn(os.Stderr)\n\n\t// Set user agent.\n\tc.SetAppInfo(\"MinIO-go-FunctionalTest\", \"0.1.0\")\n\n\t// Generate a new random bucket name.\n\tbucketName := randString(60, rand.NewSource(time.Now().UnixNano()), \"minio-go-test-\")\n\targs[\"bucketName\"] = bucketName\n\n\t// Make a new bucket in 'eu-central-1'.\n\tif err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: region}); err != nil {\n\t\tlogError(testName, function, args, startTime, \"\", \"MakeBucket failed\", err)\n\t\treturn\n\t}\n\n\t// Delete all objects and buckets\n\tif err = cleanupBucket(bucketName, c); err != nil {\n\t\tlogError(testName, function, args, startTime, \"\", \"CleanupBucket failed\", err)\n\t\treturn\n\t}\n\n\t// Make a new bucket with '.' in its name, in 'us-west-2'. This\n\t// request is internally staged into a path style instead of\n\t// virtual host style.\n\tregion = \"us-west-2\"\n\targs[\"region\"] = region\n\tif err = c.MakeBucket(context.Background(), bucketName+\".withperiod\", minio.MakeBucketOptions{Region: region}); err != nil {\n\t\tlogError(testName, function, args, startTime, \"\", \"MakeBucket failed\", err)\n\t\treturn\n\t}\n\n\t// Delete all objects and buckets\n\tif err = cleanupBucket(bucketName+\".withperiod\", c); err != nil {\n\t\tlogError(testName, function, args, startTime, \"\", \"CleanupBucket failed\", err)\n\t\treturn\n\t}\n\tsuccessLogger(testName, function, args, startTime).Info()\n}",
"func (m *MockRegionsService) RegionsList(arg0 context.Context) ([]scalingo.Region, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"RegionsList\", arg0)\n\tret0, _ := ret[0].([]scalingo.Region)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func newVirtualMachineScaleSetVMsClient(subscriptionID string, baseURI string, authorizer autorest.Authorizer) compute.VirtualMachineScaleSetVMsClient {\n\tc := compute.NewVirtualMachineScaleSetVMsClientWithBaseURI(baseURI, subscriptionID)\n\tc.Authorizer = authorizer\n\tc.RetryAttempts = 1\n\t_ = c.AddToUserAgent(azure.UserAgent()) // intentionally ignore error as it doesn't matter\n\treturn c\n}",
"func newServicePool() *servicePool {\n\tresult := new(servicePool)\n\tresult.pool = make(map[reflect.Type]*sync.Pool)\n\treturn result\n}",
"func NewMockDataRegistryService_CreateOrUpdateMetricsServer(t mockConstructorTestingTNewMockDataRegistryService_CreateOrUpdateMetricsServer) *MockDataRegistryService_CreateOrUpdateMetricsServer {\n\tmock := &MockDataRegistryService_CreateOrUpdateMetricsServer{}\n\tmock.Mock.Test(t)\n\n\tt.Cleanup(func() { mock.AssertExpectations(t) })\n\n\treturn mock\n}",
"func NewService(registration services.Registration) (s *stubRegistrationService) {\n\ts = &stubRegistrationService{}\n\ts.registration = registration\n\treturn s\n}",
"func NewMocklocationsServiceInterface(ctrl *gomock.Controller) *MocklocationsServiceInterface {\n\tmock := &MocklocationsServiceInterface{ctrl: ctrl}\n\tmock.recorder = &MocklocationsServiceInterfaceMockRecorder{mock}\n\treturn mock\n}",
"func NewMockPersonService() PersonServiceProvider {\n\treturn &mockPersonService{}\n}",
"func ExampleVirtualMachinesClient_BeginCreateOrUpdate() {\n\tcred, err := azidentity.NewDefaultAzureCredential(nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to obtain a credential: %v\", err)\n\t}\n\tctx := context.Background()\n\tclient, err := armscvmm.NewVirtualMachinesClient(\"fd3c3665-1729-4b7b-9a38-238e83b0f98b\", cred, nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to create client: %v\", err)\n\t}\n\tpoller, err := client.BeginCreateOrUpdate(ctx,\n\t\t\"testrg\",\n\t\t\"DemoVM\",\n\t\tarmscvmm.VirtualMachine{\n\t\t\tExtendedLocation: &armscvmm.ExtendedLocation{\n\t\t\t\tName: to.Ptr(\"/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.Arc/customLocations/contoso\"),\n\t\t\t\tType: to.Ptr(\"customLocation\"),\n\t\t\t},\n\t\t\tLocation: to.Ptr(\"East US\"),\n\t\t\tProperties: &armscvmm.VirtualMachineProperties{\n\t\t\t\tCloudID: to.Ptr(\"/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.SCVMM/Clouds/HRCloud\"),\n\t\t\t\tHardwareProfile: &armscvmm.HardwareProfile{\n\t\t\t\t\tCPUCount: to.Ptr[int32](4),\n\t\t\t\t\tMemoryMB: to.Ptr[int32](4096),\n\t\t\t\t},\n\t\t\t\tTemplateID: to.Ptr(\"/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.SCVMM/VirtualMachineTemplates/HRVirtualMachineTemplate\"),\n\t\t\t\tVmmServerID: to.Ptr(\"/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.SCVMM/VMMServers/ContosoVMMServer\"),\n\t\t\t},\n\t\t},\n\t\tnil)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to finish the request: %v\", err)\n\t}\n\tres, err := poller.PollUntilDone(ctx, nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to pull the result: %v\", err)\n\t}\n\t// TODO: use response item\n\t_ = res\n}",
"func NewMockRegistry(ctrl *gomock.Controller) *MockRegistry {\n\tmock := &MockRegistry{ctrl: ctrl}\n\tmock.recorder = &MockRegistryMockRecorder{mock}\n\treturn mock\n}",
"func newAzureMachineService(machineScope *scope.MachineScope, clusterScope *scope.ClusterScope) *azureMachineService {\n\treturn &azureMachineService{\n\t\tmachineScope: machineScope,\n\t\tclusterScope: clusterScope,\n\t\tavailabilityZonesSvc: availabilityzones.NewService(clusterScope),\n\t\tnetworkInterfacesSvc: networkinterfaces.NewService(clusterScope),\n\t\tpublicIPSvc: publicips.NewService(clusterScope),\n\t\tvirtualMachinesSvc: virtualmachines.NewService(clusterScope, machineScope),\n\t\tvirtualMachinesExtSvc: virtualmachineextensions.NewService(clusterScope),\n\t\tdisksSvc: disks.NewService(clusterScope),\n\t}\n}",
"func TestNewResizeService(t *testing.T) {\n\tmockCtrl := gomock.NewController(t)\n\tdefer mockCtrl.Finish()\n\n\tmockResizeStorage := mocks.NewMockResizeStorage(mockCtrl)\n\tmockConverter := mocks.NewMockConverter(mockCtrl)\n\tmockPubSub := mocks.NewMockPublisherConsumer(mockCtrl)\n\n\trs := NewResizeService(mockResizeStorage, mockConverter, mockPubSub)\n\tassert.Equal(t, mockConverter, rs.Converter)\n\tassert.Equal(t, mockResizeStorage, rs.Storage)\n}",
"func NewK8sClient(t interface {\n\tmock.TestingT\n\tCleanup(func())\n}) *K8sClient {\n\tmock := &K8sClient{}\n\tmock.Mock.Test(t)\n\n\tt.Cleanup(func() { mock.AssertExpectations(t) })\n\n\treturn mock\n}",
"func NewVirtualMachinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachinesClient, error) {\n\tcl, err := arm.NewClient(moduleName+\".VirtualMachinesClient\", moduleVersion, credential, options)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tclient := &VirtualMachinesClient{\n\t\tsubscriptionID: subscriptionID,\n\t\tinternal: cl,\n\t}\n\treturn client, nil\n}",
"func NewGatewayMock(t minimock.Tester) *GatewayMock {\n\tm := &GatewayMock{t: t}\n\tif controller, ok := t.(minimock.MockController); ok {\n\t\tcontroller.RegisterMocker(m)\n\t}\n\n\tm.AutherMock = mGatewayMockAuther{mock: m}\n\n\tm.BeforeRunMock = mGatewayMockBeforeRun{mock: m}\n\tm.BeforeRunMock.callArgs = []*GatewayMockBeforeRunParams{}\n\n\tm.BootstrapperMock = mGatewayMockBootstrapper{mock: m}\n\n\tm.EphemeralModeMock = mGatewayMockEphemeralMode{mock: m}\n\tm.EphemeralModeMock.callArgs = []*GatewayMockEphemeralModeParams{}\n\n\tm.GetStateMock = mGatewayMockGetState{mock: m}\n\n\tm.NewGatewayMock = mGatewayMockNewGateway{mock: m}\n\tm.NewGatewayMock.callArgs = []*GatewayMockNewGatewayParams{}\n\n\tm.OnConsensusFinishedMock = mGatewayMockOnConsensusFinished{mock: m}\n\tm.OnConsensusFinishedMock.callArgs = []*GatewayMockOnConsensusFinishedParams{}\n\n\tm.OnPulseFromConsensusMock = mGatewayMockOnPulseFromConsensus{mock: m}\n\tm.OnPulseFromConsensusMock.callArgs = []*GatewayMockOnPulseFromConsensusParams{}\n\n\tm.OnPulseFromPulsarMock = mGatewayMockOnPulseFromPulsar{mock: m}\n\tm.OnPulseFromPulsarMock.callArgs = []*GatewayMockOnPulseFromPulsarParams{}\n\n\tm.RunMock = mGatewayMockRun{mock: m}\n\tm.RunMock.callArgs = []*GatewayMockRunParams{}\n\n\tm.UpdateStateMock = mGatewayMockUpdateState{mock: m}\n\tm.UpdateStateMock.callArgs = []*GatewayMockUpdateStateParams{}\n\n\treturn m\n}",
"func New() *Mock {\n\treturn &Mock{\n\t\tm: mockMap{},\n\t\toldTransport: http.DefaultTransport,\n\t}\n}",
"func newAwsServiceDiscoveryServices(c *TrussleV1Client, namespace string) *awsServiceDiscoveryServices {\n\treturn &awsServiceDiscoveryServices{\n\t\tclient: c.RESTClient(),\n\t\tns: namespace,\n\t}\n}",
"func NewMockVendors(ctrl *gomock.Controller) *MockVendors {\n\tmock := &MockVendors{ctrl: ctrl}\n\tmock.recorder = &MockVendorsMockRecorder{mock}\n\treturn mock\n}",
"func NewService(client *gophercloud.ProviderClient, clientOpts *clientconfig.ClientOpts, logger logr.Logger) (*Service, error) {\n\tidentityClient, err := openstack.NewIdentityV3(client, gophercloud.EndpointOpts{\n\t\tRegion: \"\",\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to create identity service client: %v\", err)\n\t}\n\n\tcomputeClient, err := openstack.NewComputeV2(client, gophercloud.EndpointOpts{\n\t\tRegion: clientOpts.RegionName,\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to create compute service client: %v\", err)\n\t}\n\n\tnetworkingClient, err := openstack.NewNetworkV2(client, gophercloud.EndpointOpts{\n\t\tRegion: clientOpts.RegionName,\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to create networking service client: %v\", err)\n\t}\n\n\timagesClient, err := openstack.NewImageServiceV2(client, gophercloud.EndpointOpts{\n\t\tRegion: clientOpts.RegionName,\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to create image service client: %v\", err)\n\t}\n\n\tif clientOpts.AuthInfo == nil {\n\t\treturn nil, fmt.Errorf(\"failed to get project id: authInfo must be set\")\n\t}\n\n\tprojectID := clientOpts.AuthInfo.ProjectID\n\tif projectID == \"\" && clientOpts.AuthInfo.ProjectName != \"\" {\n\t\tprojectID, err = provider.GetProjectID(client, clientOpts.AuthInfo.ProjectName)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error retrieveing project id: %v\", err)\n\t\t}\n\t}\n\tif projectID == \"\" {\n\t\treturn nil, fmt.Errorf(\"failed to get project id\")\n\t}\n\n\tnetworkingService, err := networking.NewService(client, clientOpts, logger)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to create networking service: %v\", err)\n\t}\n\n\treturn &Service{\n\t\tprovider: client,\n\t\tprojectID: projectID,\n\t\tidentityClient: identityClient,\n\t\tcomputeClient: computeClient,\n\t\tnetworkClient: networkingClient,\n\t\tnetworkingService: networkingService,\n\t\timagesClient: imagesClient,\n\t\tlogger: logger,\n\t}, nil\n}",
"func NewNotificationsService(t mockConstructorTestingTNewNotificationsService) *NotificationsService {\n\tmock := &NotificationsService{}\n\tmock.Mock.Test(t)\n\n\tt.Cleanup(func() { mock.AssertExpectations(t) })\n\n\treturn mock\n}",
"func newCloudRegions(regions []string) *cloudRegions {\n\tout := make([]string, len(regions))\n\tperm := rand.Perm(len(regions))\n\tfor i, v := range perm {\n\t\tout[v] = regions[i]\n\t}\n\n\treturn &cloudRegions{idx: 0, regions: regions}\n}",
"func New(scope Scope) *Service {\n\tzoneClient := newPrivateZonesClient(scope)\n\tvnetLinkClient := newVirtualNetworkLinksClient(scope)\n\trecordSetsClient := newRecordSetsClient(scope)\n\treturn &Service{\n\t\tScope: scope,\n\t\tzoneGetter: zoneClient,\n\t\tvnetLinkGetter: vnetLinkClient,\n\t\tzoneReconciler: async.New(scope, zoneClient, zoneClient),\n\t\tvnetLinkReconciler: async.New(scope, vnetLinkClient, vnetLinkClient),\n\t\trecordReconciler: async.New(scope, recordSetsClient, recordSetsClient),\n\t}\n}",
"func (m *MockClient) DescribeRegions(input *ec2.DescribeRegionsInput) (*ec2.DescribeRegionsOutput, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"DescribeRegions\", input)\n\tret0, _ := ret[0].(*ec2.DescribeRegionsOutput)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func RegisterRegionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RegionsClient) error {\n\n\tmux.Handle(\"POST\", pattern_Regions_Create_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\trctx, err := runtime.AnnotateContext(ctx, mux, req)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Regions_Create_0(rctx, inboundMarshaler, client, req, pathParams)\n\t\tctx = runtime.NewServerMetadataContext(ctx, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\n\t\tforward_Regions_Create_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\n\t})\n\n\tmux.Handle(\"GET\", pattern_Regions_Read_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\trctx, err := runtime.AnnotateContext(ctx, mux, req)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Regions_Read_0(rctx, inboundMarshaler, client, req, pathParams)\n\t\tctx = runtime.NewServerMetadataContext(ctx, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\n\t\tforward_Regions_Read_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\n\t})\n\n\tmux.Handle(\"PUT\", pattern_Regions_Update_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\trctx, err := runtime.AnnotateContext(ctx, mux, req)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Regions_Update_0(rctx, inboundMarshaler, client, req, pathParams)\n\t\tctx = runtime.NewServerMetadataContext(ctx, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\n\t\tforward_Regions_Update_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\n\t})\n\n\tmux.Handle(\"PATCH\", pattern_Regions_Update_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\trctx, err := runtime.AnnotateContext(ctx, mux, req)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Regions_Update_1(rctx, inboundMarshaler, client, req, pathParams)\n\t\tctx = runtime.NewServerMetadataContext(ctx, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\n\t\tforward_Regions_Update_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\n\t})\n\n\tmux.Handle(\"DELETE\", pattern_Regions_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\trctx, err := runtime.AnnotateContext(ctx, mux, req)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Regions_Delete_0(rctx, inboundMarshaler, client, req, pathParams)\n\t\tctx = runtime.NewServerMetadataContext(ctx, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\n\t\tforward_Regions_Delete_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\n\t})\n\n\tmux.Handle(\"GET\", pattern_Regions_List_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\trctx, err := runtime.AnnotateContext(ctx, mux, req)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Regions_List_0(rctx, inboundMarshaler, client, req, pathParams)\n\t\tctx = runtime.NewServerMetadataContext(ctx, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\n\t\tforward_Regions_List_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\n\t})\n\n\treturn nil\n}",
"func newClient(auth azure.Authorizer) *azureClient {\n\tc := newPrivateZonesClient(auth.SubscriptionID(), auth.BaseURI(), auth.Authorizer())\n\tv := newVirtualNetworkLinksClient(auth.SubscriptionID(), auth.BaseURI(), auth.Authorizer())\n\tr := newRecordSetsClient(auth.SubscriptionID(), auth.BaseURI(), auth.Authorizer())\n\treturn &azureClient{c, v, r}\n}",
"func newAzureManagedMachinePoolReconciler(scope *scope.ManagedControlPlaneScope) *azureManagedMachinePoolReconciler {\n\treturn &azureManagedMachinePoolReconciler{\n\t\tkubeclient: scope.Client,\n\t\tagentPoolsSvc: agentpools.NewService(scope),\n\t\tscaleSetsSvc: scalesets.NewService(scope, nil), // ManagedMachinePoolReconciler does not use sku cache at the moment\n\t}\n}",
"func NewMock(t *testing.T) *MockT { return &MockT{t: t} }",
"func NewMockRegistriesClient(ctrl *gomock.Controller) *MockRegistriesClient {\n\tmock := &MockRegistriesClient{ctrl: ctrl}\n\tmock.recorder = &MockRegistriesClientMockRecorder{mock}\n\treturn mock\n}",
"func (bil *baseInstanceList) newMockCloud() cloud.Cloud {\n\tc := cloud.NewMockGCE(nil)\n\n\t// insert hooks to lazy create a instance when needed\n\tc.MockInstances.GetHook = bil.newGAGetHook()\n\tc.MockBetaInstances.GetHook = bil.newBetaGetHook()\n\n\treturn c\n}",
"func NewMockObject(uid, name, ns string, res api.Resource) api.Object {\n\treturn NewObject(uuid.NewFromString(uid), name, ns, res)\n}",
"func NewService(cred interfaces.IAWSCredentials, region *regions.Region) *KinesisService {\n\treturn &KinesisService{cred, region, \"https://\" + ServiceName + \".\" + region.Name() + \".amazonaws.com\"}\n}",
"func New(client *http.Client) (*Service, error) {\n\tif client == nil {\n\t\treturn nil, errors.New(\"client is nil\")\n\t}\n\ts := &Service{client: client, BasePath: basePath}\n\ts.Locations = NewLocationsService(s)\n\treturn s, nil\n}",
"func NewHotRegionsStorage(\n\tctx context.Context,\n\tfilePath string,\n\tekm *encryption.Manager,\n\thotRegionStorageHandler HotRegionStorageHandler,\n) (*HotRegionStorage, error) {\n\tlevelDB, err := kv.NewLevelDBKV(filePath)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\thotRegionInfoCtx, hotRegionInfoCancel := context.WithCancel(ctx)\n\th := HotRegionStorage{\n\t\tLevelDBKV: levelDB,\n\t\tekm: ekm,\n\t\tbatchHotInfo: make(map[string]*HistoryHotRegion),\n\t\thotRegionInfoCtx: hotRegionInfoCtx,\n\t\thotRegionInfoCancel: hotRegionInfoCancel,\n\t\thotRegionStorageHandler: hotRegionStorageHandler,\n\t\tcurReservedDays: hotRegionStorageHandler.GetHotRegionsReservedDays(),\n\t\tcurInterval: hotRegionStorageHandler.GetHotRegionsWriteInterval(),\n\t}\n\th.hotRegionLoopWg.Add(2)\n\tgo h.backgroundFlush()\n\tgo h.backgroundDelete()\n\treturn &h, nil\n}",
"func New(cfg *config.Config) *HsmProvidersService {\n\n\treturn &HsmProvidersService{Client: client.New(\n\t\t*cfg,\n\t\tmetadata.ClientInfo{\n\t\t\tServiceName: ServiceName,\n\t\t\tEndpoint: *cfg.Endpoint,\n\t\t\tAPIVersion: pingaccess.SDKVersion,\n\t\t},\n\t)}\n}",
"func newFakeReconciler(initObjects ...runtime.Object) *ReconcileMachineRemediation {\n\tfakeClient := fake.NewFakeClient(initObjects...)\n\tremediator := &FakeRemedatior{}\n\treturn &ReconcileMachineRemediation{\n\t\tclient: fakeClient,\n\t\tremediator: remediator,\n\t\tnamespace: consts.NamespaceOpenshiftMachineAPI,\n\t}\n}",
"func NewUidService(t mockConstructorTestingTNewUidService) *UidService {\n\tmock := &UidService{}\n\tmock.Mock.Test(t)\n\n\tt.Cleanup(func() { mock.AssertExpectations(t) })\n\n\treturn mock\n}",
"func NewOAuth20Service(t mockConstructorTestingTNewOAuth20Service) *OAuth20Service {\n\tmock := &OAuth20Service{}\n\tmock.Mock.Test(t)\n\n\tt.Cleanup(func() { mock.AssertExpectations(t) })\n\n\treturn mock\n}",
"func NewMockPoolRegistry(ctrl *gomock.Controller) *MockPoolRegistry {\n\tmock := &MockPoolRegistry{ctrl: ctrl}\n\tmock.recorder = &MockPoolRegistryMockRecorder{mock}\n\treturn mock\n}",
"func NewMockVirtualServiceReconciler(ctrl *gomock.Controller) *MockVirtualServiceReconciler {\n\tmock := &MockVirtualServiceReconciler{ctrl: ctrl}\n\tmock.recorder = &MockVirtualServiceReconcilerMockRecorder{mock}\n\treturn mock\n}",
"func newPrivateZonesClient(auth azure.Authorizer) *azureZonesClient {\n\tc := privatedns.NewPrivateZonesClientWithBaseURI(auth.BaseURI(), auth.SubscriptionID())\n\tazure.SetAutoRestClientDefaults(&c.Client, auth.Authorizer())\n\treturn &azureZonesClient{\n\t\tprivatezones: c,\n\t}\n}",
"func NewService(config Config) *Service {\n\treturn &Service{\n\t\tinstances: new(sync.Map),\n\t\tconfig: config,\n\t}\n}",
"func NewMockProviders(ctrl *gomock.Controller) *MockProviders {\n\tmock := &MockProviders{ctrl: ctrl}\n\tmock.recorder = &MockProvidersMockRecorder{mock}\n\treturn mock\n}",
"func NewMockSegmentManager(t mockConstructorTestingTNewMockSegmentManager) *MockSegmentManager {\n\tmock := &MockSegmentManager{}\n\tmock.Mock.Test(t)\n\n\tt.Cleanup(func() { mock.AssertExpectations(t) })\n\n\treturn mock\n}",
"func newRouteGroups(c *ZalandoV1Client, namespace string) *routeGroups {\n\treturn &routeGroups{\n\t\tclient: c.RESTClient(),\n\t\tns: namespace,\n\t}\n}",
"func New()ManagementClient {\n return NewWithBaseURI(DefaultBaseURI, )\n}",
"func Mocks(n int) []blockservice.BlockService {\n\tnet := tn.VirtualNetwork(mockrouting.NewServer(), delay.Fixed(0))\n\tsg := testinstance.NewTestInstanceGenerator(net, nil, nil)\n\n\tinstances := sg.Instances(n)\n\n\tvar servs []blockservice.BlockService\n\tfor _, i := range instances {\n\t\tservs = append(servs, blockservice.New(i.Blockstore(), i.Exchange))\n\t}\n\treturn servs\n}",
"func New(client *http.Client) (*Service, error) {\n\tif client == nil {\n\t\treturn nil, errors.New(\"client is nil\")\n\t}\n\ts := &Service{client: client, BasePath: basePath}\n\ts.Organizations = NewOrganizationsService(s)\n\ts.Projects = NewProjectsService(s)\n\treturn s, nil\n}",
"func New(ctx context.Context, m map[string]interface{}) (auth.Manager, error) {\n\tvar mgr manager\n\tif err := mgr.Configure(m); err != nil {\n\t\treturn nil, err\n\t}\n\tgw, err := pool.GetGatewayServiceClient(pool.Endpoint(mgr.c.GatewayAddr))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tmgr.gw = gw\n\n\treturn &mgr, nil\n}",
"func newPrivateZonesClient(subscriptionID string, baseURI string, authorizer autorest.Authorizer) privatedns.PrivateZonesClient {\n\tzonesClient := privatedns.NewPrivateZonesClientWithBaseURI(baseURI, subscriptionID)\n\tazure.SetAutoRestClientDefaults(&zonesClient.Client, authorizer)\n\treturn zonesClient\n}",
"func (a *AzureInfoer) GetRegions(service string) (map[string]string, error) {\n\tlogger := a.log.WithFields(map[string]interface{}{\"service\": service})\n\tlogger.Debug(\"getting locations\")\n\n\tallLocations := make(map[string]string)\n\tsupLocations := make(map[string]string)\n\n\t// retrieve all locations for the subscription id (some of them may not be supported by the required provider)\n\tif locations, err := a.subscriptionsClient.ListLocations(context.TODO(), a.subscriptionId); err == nil {\n\t\t// fill up the map: DisplayName - > Name\n\t\tfor _, loc := range *locations.Value {\n\t\t\tallLocations[*loc.DisplayName] = *loc.Name\n\t\t}\n\t} else {\n\t\tlogger.Error(\"error while retrieving azure locations\")\n\t\treturn nil, err\n\t}\n\n\t// identify supported locations for the namespace and resource type\n\tconst (\n\t\tproviderNamespaceForCompute = \"Microsoft.Compute\"\n\t\tresourceTypeForCompute = \"locations/vmSizes\"\n\t\tproviderNamespaceForAks = \"Microsoft.ContainerService\"\n\t\tresourceTypeForAks = \"managedClusters\"\n\t)\n\n\tswitch service {\n\tcase \"aks\":\n\t\tif providers, err := a.providersClient.Get(context.TODO(), providerNamespaceForAks, \"\"); err == nil {\n\t\t\tfor _, pr := range *providers.ResourceTypes {\n\t\t\t\tif *pr.ResourceType == resourceTypeForAks {\n\t\t\t\t\tfor _, displName := range *pr.Locations {\n\t\t\t\t\t\tif loc, ok := allLocations[displName]; ok {\n\t\t\t\t\t\t\tsupLocations[loc] = displName\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlogger.Debug(\"unsupported location\", map[string]interface{}{\"name\": loc, \"displayname\": displName})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tlogger.Error(\"failed to retrieve supported locations\", map[string]interface{}{\"resource\": resourceTypeForAks})\n\t\t\treturn nil, err\n\t\t}\n\n\t\tlogger.Debug(\"found supported locations\", map[string]interface{}{\"numberOfLocations\": len(supLocations)})\n\t\treturn supLocations, nil\n\tdefault:\n\t\tif providers, err := a.providersClient.Get(context.TODO(), providerNamespaceForCompute, \"\"); err == nil {\n\t\t\tfor _, pr := range *providers.ResourceTypes {\n\t\t\t\tif *pr.ResourceType == resourceTypeForCompute {\n\t\t\t\t\tfor _, displName := range *pr.Locations {\n\t\t\t\t\t\tif loc, ok := allLocations[displName]; ok {\n\t\t\t\t\t\t\tsupLocations[loc] = displName\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlogger.Debug(\"unsupported location\", map[string]interface{}{\"name\": loc, \"displayname\": displName})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tlogger.Error(\"failed to retrieve supported locations\", map[string]interface{}{\"resource\": resourceTypeForCompute})\n\t\t\treturn nil, err\n\t\t}\n\n\t\tlogger.Debug(\"found supported locations\", map[string]interface{}{\"numberOfLocations\": len(supLocations)})\n\t\treturn supLocations, nil\n\t}\n}",
"func NewDestinationService(t mockConstructorTestingTNewDestinationService) *DestinationService {\n\tmock := &DestinationService{}\n\tmock.Mock.Test(t)\n\n\tt.Cleanup(func() { mock.AssertExpectations(t) })\n\n\treturn mock\n}",
"func newVirtualMachineClient(subID string, authorizer auth.Authorizer) (*client, error) {\n\tc, err := wssdcloudclient.GetVirtualMachineClient(&subID, authorizer)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &client{c}, nil\n}",
"func newService(name, project, image string, envs map[string]string, options options) *runapi.Service {\n\tvar envVars []*runapi.EnvVar\n\tfor k, v := range envs {\n\t\tenvVars = append(envVars, &runapi.EnvVar{Name: k, Value: v})\n\t}\n\n\tsvc := &runapi.Service{\n\t\tApiVersion: \"serving.knative.dev/v1\",\n\t\tKind: \"Service\",\n\t\tMetadata: &runapi.ObjectMeta{\n\t\t\tAnnotations: make(map[string]string),\n\t\t\tName: name,\n\t\t\tNamespace: project,\n\t\t},\n\t\tSpec: &runapi.ServiceSpec{\n\t\t\tTemplate: &runapi.RevisionTemplate{\n\t\t\t\tMetadata: &runapi.ObjectMeta{\n\t\t\t\t\tName: generateRevisionName(name, 0),\n\t\t\t\t\tAnnotations: make(map[string]string),\n\t\t\t\t},\n\t\t\t\tSpec: &runapi.RevisionSpec{\n\t\t\t\t\tContainerConcurrency: int64(options.Concurrency),\n\t\t\t\t\tContainers: []*runapi.Container{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tImage: image,\n\t\t\t\t\t\t\tEnv: envVars,\n\t\t\t\t\t\t\tResources: optionsToResourceRequirements(options),\n\t\t\t\t\t\t\tPorts: []*runapi.ContainerPort{optionsToContainerSpec(options)},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tForceSendFields: nil,\n\t\t\t\tNullFields: nil,\n\t\t\t},\n\t\t},\n\t}\n\n\tapplyMeta(svc.Metadata, image)\n\tapplyMeta(svc.Spec.Template.Metadata, image)\n\tapplyScaleMeta(svc.Spec.Template.Metadata, \"maxScale\", options.MaxInstances)\n\n\treturn svc\n}",
"func New(client *http.Client) (*Service, error) {\n\tif client == nil {\n\t\treturn nil, errors.New(\"client is nil\")\n\t}\n\ts := &Service{client: client, BasePath: basePath}\n\ts.Featuretiles = NewFeaturetilesService(s)\n\ts.Terraintiles = NewTerraintilesService(s)\n\treturn s, nil\n}",
"func Mock(objects ...runtime.Object) KubernetesClientLambda {\n\tfakePool, fakeClient := NewFakes(objects...)\n\treturn &kubernetesClientLambdaImpl{\n\t\tclientPool: fakePool,\n\t\tinformerFactory: informers.NewSharedInformerFactory(fakeClient, 0),\n\t}\n}",
"func NewApplicationService(t mockConstructorTestingTNewApplicationService) *ApplicationService {\n\tmock := &ApplicationService{}\n\tmock.Mock.Test(t)\n\n\tt.Cleanup(func() { mock.AssertExpectations(t) })\n\n\treturn mock\n}",
"func New(cfg *Config,\n\tapiManager apimanager.Provider,\n\tlogger logger.Logger, registerer prometheus.Registerer) (Provider, error) {\n\tservice := &MockServer{\n\t\tcfg: cfg,\n\t\tregisterer: registerer,\n\t\tapiManager: apiManager,\n\t\tLogger: logger.NewLogger(\"httpMockServer\"),\n\t}\n\treturn service, nil\n}",
"func newAuthorizationMocks(t *testing.T, resource, action string) (\n\tauthn.AuthenticationServiceClient, authz.AuthorizationServiceClient) {\n\tvar (\n\t\tctrl = gomock.NewController(t)\n\t\tmockAuthClient = authn.NewMockAuthenticationServiceClient(ctrl)\n\t\tmockAuthzClient = authz.NewMockAuthorizationServiceClient(ctrl)\n\t)\n\n\t// Mocking AuthN Calls\n\tmockAuthClient.EXPECT().Authenticate(gomock.Any(), gomock.Any()).DoAndReturn(\n\t\tfunc(_ context.Context, _ *authn.AuthenticateRequest) (*authn.AuthenticateResponse, error) {\n\t\t\treturn &authn.AuthenticateResponse{Subject: \"mock\", Teams: []string{}}, nil\n\t\t})\n\n\t// Mocking AuthZ Calls\n\tmockAuthzClient.EXPECT().ProjectsAuthorized(\n\t\tgomock.Any(),\n\t\t&authz.ProjectsAuthorizedReq{\n\t\t\tSubjects: []string{\"mock\"},\n\t\t\tResource: resource,\n\t\t\tAction: action,\n\t\t\tProjectsFilter: []string{},\n\t\t},\n\t).DoAndReturn(\n\t\tfunc(_ context.Context, _ *authz.ProjectsAuthorizedReq) (*authz.ProjectsAuthorizedResp, error) {\n\t\t\treturn &authz.ProjectsAuthorizedResp{Projects: []string{\"any\"}}, nil\n\t\t},\n\t)\n\n\treturn mockAuthClient, mockAuthzClient\n}",
"func NewMock(serverHost string) (*MockClient, error) {\n\treturn &MockClient{}, nil\n}",
"func NewMock() Client {\n\treturn &mockClient{}\n}",
"func New(client *http.Client) (*Service, error) {\n\tif client == nil {\n\t\treturn nil, errors.New(\"client is nil\")\n\t}\n\ts := &Service{client: client, BasePath: basePath}\n\ts.Hybrid = NewHybridService(s)\n\ts.Organizations = NewOrganizationsService(s)\n\ts.Projects = NewProjectsService(s)\n\treturn s, nil\n}",
"func ExampleAgentPoolsClient_BeginCreate() {\n\tcred, err := azidentity.NewDefaultAzureCredential(nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to obtain a credential: %v\", err)\n\t}\n\tctx := context.Background()\n\tclientFactory, err := armcontainerregistry.NewClientFactory(\"<subscription-id>\", cred, nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to create client: %v\", err)\n\t}\n\tpoller, err := clientFactory.NewAgentPoolsClient().BeginCreate(ctx, \"myResourceGroup\", \"myRegistry\", \"myAgentPool\", armcontainerregistry.AgentPool{\n\t\tLocation: to.Ptr(\"WESTUS\"),\n\t\tTags: map[string]*string{\n\t\t\t\"key\": to.Ptr(\"value\"),\n\t\t},\n\t\tProperties: &armcontainerregistry.AgentPoolProperties{\n\t\t\tCount: to.Ptr[int32](1),\n\t\t\tOS: to.Ptr(armcontainerregistry.OSLinux),\n\t\t\tTier: to.Ptr(\"S1\"),\n\t\t},\n\t}, nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to finish the request: %v\", err)\n\t}\n\tres, err := poller.PollUntilDone(ctx, nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to pull the result: %v\", err)\n\t}\n\t// You could use response here. We use blank identifier for just demo purposes.\n\t_ = res\n\t// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.\n\t// res.AgentPool = armcontainerregistry.AgentPool{\n\t// \tName: to.Ptr(\"myAgentPool\"),\n\t// \tType: to.Ptr(\"Microsoft.ContainerRegistry/registries/agentPools\"),\n\t// \tID: to.Ptr(\"/subscriptions/f9d7ebed-adbd-4cb4-b973-aaf82c136138/resourceGroups/huanwudfwestgroup/providers/Microsoft.ContainerRegistry/registries/huanglidfwest01/agentPools/testagent26\"),\n\t// \tLocation: to.Ptr(\"WESTUS\"),\n\t// \tProperties: &armcontainerregistry.AgentPoolProperties{\n\t// \t\tCount: to.Ptr[int32](1),\n\t// \t\tOS: to.Ptr(armcontainerregistry.OSLinux),\n\t// \t\tProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),\n\t// \t\tTier: to.Ptr(\"S1\"),\n\t// \t},\n\t// }\n}",
"func (m *VirtualMachinesClientMock) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, parameters compute.VirtualMachine, source string) *retry.Error {\n\treturn nil\n}",
"func newRpcServices(c *RpccontrollerV1Client, namespace string) *rpcServices {\n\treturn &rpcServices{\n\t\tclient: c.RESTClient(),\n\t\tns: namespace,\n\t}\n}",
"func RegisterRegionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RegionsServer) error {\n\n\tmux.Handle(\"POST\", pattern_Regions_Create_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\trctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Regions_Create_0(rctx, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tctx = runtime.NewServerMetadataContext(ctx, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\n\t\tforward_Regions_Create_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\n\t})\n\n\tmux.Handle(\"GET\", pattern_Regions_Read_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\trctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Regions_Read_0(rctx, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tctx = runtime.NewServerMetadataContext(ctx, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\n\t\tforward_Regions_Read_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\n\t})\n\n\tmux.Handle(\"PUT\", pattern_Regions_Update_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\trctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Regions_Update_0(rctx, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tctx = runtime.NewServerMetadataContext(ctx, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\n\t\tforward_Regions_Update_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\n\t})\n\n\tmux.Handle(\"PATCH\", pattern_Regions_Update_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\trctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Regions_Update_1(rctx, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tctx = runtime.NewServerMetadataContext(ctx, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\n\t\tforward_Regions_Update_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\n\t})\n\n\tmux.Handle(\"DELETE\", pattern_Regions_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\trctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Regions_Delete_0(rctx, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tctx = runtime.NewServerMetadataContext(ctx, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\n\t\tforward_Regions_Delete_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\n\t})\n\n\tmux.Handle(\"GET\", pattern_Regions_List_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\trctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Regions_List_0(rctx, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tctx = runtime.NewServerMetadataContext(ctx, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\n\t\tforward_Regions_List_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\n\t})\n\n\treturn nil\n}",
"func New(client client.Client, namespace string) *fakeManager {\n\treturn &fakeManager{\n\t\tclient: client,\n\t\tnamespace: namespace,\n\t}\n}",
"func New(client *http.Client) (*Service, error) {\n\tif client == nil {\n\t\treturn nil, errors.New(\"client is nil\")\n\t}\n\ts := &Service{client: client, BasePath: basePath}\n\ts.Claims = NewClaimsService(s)\n\ts.Pages = NewPagesService(s)\n\treturn s, nil\n}",
"func initializeMockController(objects []runtime.Object) (*generate.GenerateController, error) {\n\tclient, err := dclient.NewFakeClient(runtime.NewScheme(), nil, objects...)\n\tif err != nil {\n\t\tfmt.Printf(\"Failed to mock dynamic client\")\n\t\treturn nil, err\n\t}\n\tclient.SetDiscovery(dclient.NewFakeDiscoveryClient(nil))\n\tcfg := config.NewDefaultConfiguration(false)\n\tc := generate.NewGenerateControllerWithOnlyClient(client, engine.NewEngine(\n\t\tcfg,\n\t\tconfig.NewDefaultMetricsConfiguration(),\n\t\tjmespath.New(cfg),\n\t\tadapters.Client(client),\n\t\tnil,\n\t\timageverifycache.DisabledImageVerifyCache(),\n\t\tstore.ContextLoaderFactory(nil),\n\t\tnil,\n\t\t\"\",\n\t))\n\treturn c, nil\n}",
"func New() *MockLibvirt {\n\tserv, conn := net.Pipe()\n\n\tm := &MockLibvirt{\n\t\tConn: conn,\n\t\tTest: serv,\n\t}\n\n\tgo m.handle(serv)\n\n\treturn m\n}",
"func Test_Client_MapByRegion(t *testing.T) {\n\tcountriesInOceania := []string{\n\t\t\"American Samoa\",\n\t\t\"Australia\",\n\t\t\"Christmas Island\",\n\t\t\"Cocos (Keeling) Islands\",\n\t\t\"Cook Islands\",\n\t\t\"Fiji\",\n\t\t\"French Polynesia\",\n\t\t\"Guam\",\n\t\t\"Kiribati\",\n\t\t\"Marshall Islands\",\n\t\t\"Micronesia\",\n\t\t\"Nauru\",\n\t\t\"New Caledonia\",\n\t\t\"New Zealand\",\n\t\t\"Niue\",\n\t\t\"Norfolk Island\",\n\t\t\"Northern Mariana Islands\",\n\t\t\"Palau\",\n\t\t\"Papua New Guinea\",\n\t\t\"Pitcairn Islands\",\n\t\t\"Samoa\",\n\t\t\"Solomon Islands\",\n\t\t\"Tokelau\",\n\t\t\"Tonga\",\n\t\t\"Tuvalu\",\n\t\t\"Vanuatu\",\n\t\t\"Wallis and Futuna\",\n\t}\n\tret := mockClient.MapByRegion(\"Oceania\")\n\tfor _, row := range ret {\n\t\tassert.Contains(t, countriesInOceania, row.Name)\n\t}\n}",
"func New(client *http.Client) (*Service, error) {\n\tif client == nil {\n\t\treturn nil, errors.New(\"client is nil\")\n\t}\n\ts := &Service{client: client, BasePath: basePath}\n\ts.Albums = NewAlbumsService(s)\n\ts.MediaItems = NewMediaItemsService(s)\n\ts.SharedAlbums = NewSharedAlbumsService(s)\n\treturn s, nil\n}",
"func NewMockRemotes(ctrl *gomock.Controller) *MockRemotes {\n\tmock := &MockRemotes{ctrl: ctrl}\n\tmock.recorder = &MockRemotesMockRecorder{mock}\n\treturn mock\n}",
"func newInputService14ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService14ProtocolTest {\n\tsvc := &InputService14ProtocolTest{\n\t\tClient: client.New(\n\t\t\tcfg,\n\t\t\tmetadata.ClientInfo{\n\t\t\t\tServiceName: \"inputservice14protocoltest\",\n\t\t\t\tSigningRegion: signingRegion,\n\t\t\t\tEndpoint: endpoint,\n\t\t\t\tAPIVersion: \"2014-01-01\",\n\t\t\t},\n\t\t\thandlers,\n\t\t),\n\t}\n\n\t// Handlers\n\tsvc.Handlers.Sign.PushBack(v4.Sign)\n\tsvc.Handlers.Build.PushBackNamed(restxml.BuildHandler)\n\tsvc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler)\n\tsvc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler)\n\tsvc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler)\n\n\treturn svc\n}",
"func NewMockWithLogger(logger Logger) MockClient {\n\ttestCluster := generateTestCluster()\n\ttestHost := generateTestHost(testCluster)\n\ttestStorageDomain := generateTestStorageDomain()\n\tsecondaryStorageDomain := generateTestStorageDomain()\n\ttestDatacenter := generateTestDatacenter(testCluster)\n\ttestNetwork := generateTestNetwork(testDatacenter)\n\ttestVNICProfile := generateTestVNICProfile(testNetwork)\n\tblankTemplate := &template{\n\t\tnil,\n\t\tDefaultBlankTemplateID,\n\t\t\"Blank\",\n\t\t\"Blank template\",\n\t\tTemplateStatusOK,\n\t\t&vmCPU{\n\t\t\t&vmCPUTopo{\n\t\t\t\tcores: 1,\n\t\t\t\tthreads: 1,\n\t\t\t\tsockets: 1,\n\t\t\t},\n\t\t},\n\t}\n\n\tclient := getClient(\n\t\tlogger,\n\t\ttestStorageDomain,\n\t\tsecondaryStorageDomain,\n\t\ttestCluster,\n\t\ttestHost,\n\t\tblankTemplate,\n\t\ttestVNICProfile,\n\t\ttestNetwork,\n\t\ttestDatacenter,\n\t)\n\n\ttestCluster.client = client\n\ttestHost.client = client\n\tblankTemplate.client = client\n\ttestStorageDomain.client = client\n\tsecondaryStorageDomain.client = client\n\ttestDatacenter.client = client\n\ttestNetwork.client = client\n\ttestVNICProfile.client = client\n\n\treturn client\n}",
"func newRPCServerService() (*rpcServerService, error) {\n return &rpcServerService{serviceMap: util.NewSyncMap()}, nil\n}",
"func NewMockUsecases(ctrl *gomock.Controller) *MockUsecases {\n\tmock := &MockUsecases{ctrl: ctrl}\n\tmock.recorder = &MockUsecasesMockRecorder{mock}\n\treturn mock\n}",
"func NewVirtualRoutersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VirtualRoutersClient {\n\tcp := arm.ClientOptions{}\n\tif options != nil {\n\t\tcp = *options\n\t}\n\tif len(cp.Endpoint) == 0 {\n\t\tcp.Endpoint = arm.AzurePublicCloud\n\t}\n\tclient := &VirtualRoutersClient{\n\t\tsubscriptionID: subscriptionID,\n\t\thost: string(cp.Endpoint),\n\t\tpl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp),\n\t}\n\treturn client\n}",
"func New(client *http.Client) (*Service, error) {\n\tif client == nil {\n\t\treturn nil, errors.New(\"client is nil\")\n\t}\n\ts := &Service{client: client, BasePath: basePath}\n\ts.Projects = NewProjectsService(s)\n\treturn s, nil\n}",
"func New(client *http.Client) (*Service, error) {\n\tif client == nil {\n\t\treturn nil, errors.New(\"client is nil\")\n\t}\n\ts := &Service{client: client, BasePath: basePath}\n\ts.Projects = NewProjectsService(s)\n\treturn s, nil\n}",
"func New(client *http.Client) (*Service, error) {\n\tif client == nil {\n\t\treturn nil, errors.New(\"client is nil\")\n\t}\n\ts := &Service{client: client, BasePath: basePath}\n\ts.Projects = NewProjectsService(s)\n\treturn s, nil\n}",
"func New(client *http.Client) (*Service, error) {\n\tif client == nil {\n\t\treturn nil, errors.New(\"client is nil\")\n\t}\n\ts := &Service{client: client, BasePath: basePath}\n\ts.Projects = NewProjectsService(s)\n\treturn s, nil\n}",
"func New(client *http.Client) (*Service, error) {\n\tif client == nil {\n\t\treturn nil, errors.New(\"client is nil\")\n\t}\n\ts := &Service{client: client, BasePath: basePath}\n\ts.Projects = NewProjectsService(s)\n\treturn s, nil\n}",
"func New(client *http.Client) (*Service, error) {\n\tif client == nil {\n\t\treturn nil, errors.New(\"client is nil\")\n\t}\n\ts := &Service{client: client, BasePath: basePath}\n\ts.Projects = NewProjectsService(s)\n\treturn s, nil\n}"
] |
[
"0.5863838",
"0.5575068",
"0.54953337",
"0.538949",
"0.53589875",
"0.535194",
"0.53510696",
"0.53124946",
"0.52619344",
"0.52077705",
"0.5192601",
"0.5174721",
"0.51743853",
"0.51153713",
"0.5098767",
"0.5093426",
"0.5090133",
"0.5086709",
"0.50632465",
"0.50569195",
"0.49993125",
"0.49940413",
"0.498404",
"0.49748",
"0.49691123",
"0.49303976",
"0.4918692",
"0.49125952",
"0.49081618",
"0.489232",
"0.48778802",
"0.4869606",
"0.4846625",
"0.4821042",
"0.4815754",
"0.48114973",
"0.4807863",
"0.4799153",
"0.47914574",
"0.4787792",
"0.47745973",
"0.4766227",
"0.47411752",
"0.47406104",
"0.47387382",
"0.47366697",
"0.47361007",
"0.47305235",
"0.47263375",
"0.46991614",
"0.46915606",
"0.46876478",
"0.46795878",
"0.4675271",
"0.46682358",
"0.4666799",
"0.4666265",
"0.46656874",
"0.464433",
"0.4641841",
"0.4641311",
"0.46322355",
"0.4618308",
"0.4617272",
"0.46124223",
"0.4609281",
"0.4609241",
"0.4599182",
"0.4598012",
"0.45953676",
"0.45778432",
"0.4577235",
"0.45761",
"0.45719278",
"0.45687553",
"0.45603678",
"0.45579955",
"0.45518145",
"0.45455226",
"0.45447323",
"0.4543849",
"0.45394936",
"0.4537216",
"0.45301723",
"0.45287266",
"0.4528222",
"0.45256144",
"0.45240846",
"0.45217332",
"0.45196885",
"0.451406",
"0.4509383",
"0.4506981",
"0.4504491",
"0.45023486",
"0.45023486",
"0.45023486",
"0.45023486",
"0.45023486",
"0.45023486"
] |
0.63636696
|
0
|
EXPECT returns an object that allows the caller to indicate expected use.
|
func (m *MockRegionsService) EXPECT() *MockRegionsServiceMockRecorder {
return m.recorder
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (mmGetObject *mClientMockGetObject) Expect(ctx context.Context, head insolar.Reference) *mClientMockGetObject {\n\tif mmGetObject.mock.funcGetObject != nil {\n\t\tmmGetObject.mock.t.Fatalf(\"ClientMock.GetObject mock is already set by Set\")\n\t}\n\n\tif mmGetObject.defaultExpectation == nil {\n\t\tmmGetObject.defaultExpectation = &ClientMockGetObjectExpectation{}\n\t}\n\n\tmmGetObject.defaultExpectation.params = &ClientMockGetObjectParams{ctx, head}\n\tfor _, e := range mmGetObject.expectations {\n\t\tif minimock.Equal(e.params, mmGetObject.defaultExpectation.params) {\n\t\t\tmmGetObject.mock.t.Fatalf(\"Expectation set by When has same params: %#v\", *mmGetObject.defaultExpectation.params)\n\t\t}\n\t}\n\n\treturn mmGetObject\n}",
"func (r *Request) Expect(t *testing.T) *Response {\n\tr.apiTest.t = t\n\treturn r.apiTest.response\n}",
"func (m *MockisObject_Obj) EXPECT() *MockisObject_ObjMockRecorder {\n\treturn m.recorder\n}",
"func (r *Request) Expect(t TestingT) *Response {\n\tr.apiTest.t = t\n\treturn r.apiTest.response\n}",
"func Expect(t cbtest.T, actual interface{}, matcher matcher.Matcher, labelAndArgs ...interface{}) {\n\tt.Helper()\n\tres := ExpectE(t, actual, matcher, labelAndArgs...)\n\tif !res {\n\t\tt.FailNow()\n\t}\n}",
"func (_m *MockOStream) EXPECT() *MockOStreamMockRecorder {\n\treturn _m.recorder\n}",
"func Mock() Env {\n\treturn mock.New()\n}",
"func (m *MockActorUsecase) EXPECT() *MockActorUsecaseMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockUsecase) EXPECT() *MockUsecaseMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockUsecase) EXPECT() *MockUsecaseMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockUsecase) EXPECT() *MockUsecaseMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockUsecase) EXPECT() *MockUsecaseMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockUsecase) EXPECT() *MockUsecaseMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockUsecase) EXPECT() *MockUsecaseMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockUsecase) EXPECT() *MockUsecaseMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockUsecase) EXPECT() *MockUsecaseMockRecorder {\n\treturn m.recorder\n}",
"func (mmState *mClientMockState) Expect() *mClientMockState {\n\tif mmState.mock.funcState != nil {\n\t\tmmState.mock.t.Fatalf(\"ClientMock.State mock is already set by Set\")\n\t}\n\n\tif mmState.defaultExpectation == nil {\n\t\tmmState.defaultExpectation = &ClientMockStateExpectation{}\n\t}\n\n\treturn mmState\n}",
"func (m *MockCreator) EXPECT() *MockCreatorMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockCreator) EXPECT() *MockCreatorMockRecorder {\n\treturn m.recorder\n}",
"func Expect(t *testing.T, v, m interface{}) {\n\tvt, vok := v.(Equaler)\n\tmt, mok := m.(Equaler)\n\n\tvar state bool\n\tif vok && mok {\n\t\tstate = vt.Equal(mt)\n\t} else {\n\t\tstate = reflect.DeepEqual(v, m)\n\t}\n\n\tif state {\n\t\tflux.FatalFailed(t, \"Value %+v and %+v are not a match\", v, m)\n\t\treturn\n\t}\n\tflux.LogPassed(t, \"Value %+v and %+v are a match\", v, m)\n}",
"func (r Requester) Assert(actual, expected interface{}) Requester {\n\t//r.actualResponse = actual\n\t//r.expectedResponse = expected\n\treturn r\n}",
"func (m *MockParser) EXPECT() *MockParserMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockParser) EXPECT() *MockParserMockRecorder {\n\treturn m.recorder\n}",
"func (m *Mockrequester) EXPECT() *MockrequesterMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockArg) EXPECT() *MockArgMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockOrg) EXPECT() *MockOrgMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockNotary) Notarize(arg0 string) (map[string]interface{}, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"Notarize\", arg0)\n\tret0, _ := ret[0].(map[string]interface{})\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (mmGetCode *mClientMockGetCode) Expect(ctx context.Context, ref insolar.Reference) *mClientMockGetCode {\n\tif mmGetCode.mock.funcGetCode != nil {\n\t\tmmGetCode.mock.t.Fatalf(\"ClientMock.GetCode mock is already set by Set\")\n\t}\n\n\tif mmGetCode.defaultExpectation == nil {\n\t\tmmGetCode.defaultExpectation = &ClientMockGetCodeExpectation{}\n\t}\n\n\tmmGetCode.defaultExpectation.params = &ClientMockGetCodeParams{ctx, ref}\n\tfor _, e := range mmGetCode.expectations {\n\t\tif minimock.Equal(e.params, mmGetCode.defaultExpectation.params) {\n\t\t\tmmGetCode.mock.t.Fatalf(\"Expectation set by When has same params: %#v\", *mmGetCode.defaultExpectation.params)\n\t\t}\n\t}\n\n\treturn mmGetCode\n}",
"func (rb *RequestBuilder) EXPECT() *ResponseAsserter {\n\treq := httptest.NewRequest(rb.method, rb.path, rb.body)\n\tfor k, v := range rb.hdr {\n\t\treq.Header[k] = v\n\t}\n\n\trec := httptest.NewRecorder()\n\trb.cas.h.ServeHTTP(rec, req)\n\n\treturn &ResponseAsserter{\n\t\trec: rec,\n\t\treq: req,\n\t\tb: rb,\n\t\tfail: rb.fail.\n\t\t\tCopy().\n\t\t\tWithRequest(req).\n\t\t\tWithResponse(rec),\n\t}\n}",
"func (m *mParcelMockGetSign) Expect() *mParcelMockGetSign {\n\tm.mock.GetSignFunc = nil\n\tm.expectationSeries = nil\n\n\tif m.mainExpectation == nil {\n\t\tm.mainExpectation = &ParcelMockGetSignExpectation{}\n\t}\n\n\treturn m\n}",
"func (mmGather *mGathererMockGather) Expect() *mGathererMockGather {\n\tif mmGather.mock.funcGather != nil {\n\t\tmmGather.mock.t.Fatalf(\"GathererMock.Gather mock is already set by Set\")\n\t}\n\n\tif mmGather.defaultExpectation == nil {\n\t\tmmGather.defaultExpectation = &GathererMockGatherExpectation{}\n\t}\n\n\treturn mmGather\n}",
"func (m *mParcelMockGetCaller) Expect() *mParcelMockGetCaller {\n\tm.mock.GetCallerFunc = nil\n\tm.expectationSeries = nil\n\n\tif m.mainExpectation == nil {\n\t\tm.mainExpectation = &ParcelMockGetCallerExpectation{}\n\t}\n\n\treturn m\n}",
"func (mmGetUser *mStorageMockGetUser) Expect(ctx context.Context, userID int64) *mStorageMockGetUser {\n\tif mmGetUser.mock.funcGetUser != nil {\n\t\tmmGetUser.mock.t.Fatalf(\"StorageMock.GetUser mock is already set by Set\")\n\t}\n\n\tif mmGetUser.defaultExpectation == nil {\n\t\tmmGetUser.defaultExpectation = &StorageMockGetUserExpectation{}\n\t}\n\n\tmmGetUser.defaultExpectation.params = &StorageMockGetUserParams{ctx, userID}\n\tfor _, e := range mmGetUser.expectations {\n\t\tif minimock.Equal(e.params, mmGetUser.defaultExpectation.params) {\n\t\t\tmmGetUser.mock.t.Fatalf(\"Expectation set by When has same params: %#v\", *mmGetUser.defaultExpectation.params)\n\t\t}\n\t}\n\n\treturn mmGetUser\n}",
"func (mmProvide *mContainerMockProvide) Expect(constructor interface{}) *mContainerMockProvide {\n\tif mmProvide.mock.funcProvide != nil {\n\t\tmmProvide.mock.t.Fatalf(\"ContainerMock.Provide mock is already set by Set\")\n\t}\n\n\tif mmProvide.defaultExpectation == nil {\n\t\tmmProvide.defaultExpectation = &ContainerMockProvideExpectation{}\n\t}\n\n\tmmProvide.defaultExpectation.params = &ContainerMockProvideParams{constructor}\n\tfor _, e := range mmProvide.expectations {\n\t\tif minimock.Equal(e.params, mmProvide.defaultExpectation.params) {\n\t\t\tmmProvide.mock.t.Fatalf(\"Expectation set by When has same params: %#v\", *mmProvide.defaultExpectation.params)\n\t\t}\n\t}\n\n\treturn mmProvide\n}",
"func (m *MockNotary) EXPECT() *MockNotaryMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockS3API) EXPECT() *MockS3APIMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockstackDescriber) EXPECT() *MockstackDescriberMockRecorder {\n\treturn m.recorder\n}",
"func (mmGetState *mGatewayMockGetState) Expect() *mGatewayMockGetState {\n\tif mmGetState.mock.funcGetState != nil {\n\t\tmmGetState.mock.t.Fatalf(\"GatewayMock.GetState mock is already set by Set\")\n\t}\n\n\tif mmGetState.defaultExpectation == nil {\n\t\tmmGetState.defaultExpectation = &GatewayMockGetStateExpectation{}\n\t}\n\n\treturn mmGetState\n}",
"func (tc TestCases) expect() {\n\tfmt.Println(cnt)\n\tcnt++\n\tif !reflect.DeepEqual(tc.resp, tc.respExp) {\n\t\ttc.t.Error(fmt.Sprintf(\"\\nRequested: \", tc.req, \"\\nExpected: \", tc.respExp, \"\\nFound: \", tc.resp))\n\t}\n}",
"func (mmWriteTo *mDigestHolderMockWriteTo) Expect(w io.Writer) *mDigestHolderMockWriteTo {\n\tif mmWriteTo.mock.funcWriteTo != nil {\n\t\tmmWriteTo.mock.t.Fatalf(\"DigestHolderMock.WriteTo mock is already set by Set\")\n\t}\n\n\tif mmWriteTo.defaultExpectation == nil {\n\t\tmmWriteTo.defaultExpectation = &DigestHolderMockWriteToExpectation{}\n\t}\n\n\tmmWriteTo.defaultExpectation.params = &DigestHolderMockWriteToParams{w}\n\tfor _, e := range mmWriteTo.expectations {\n\t\tif minimock.Equal(e.params, mmWriteTo.defaultExpectation.params) {\n\t\t\tmmWriteTo.mock.t.Fatalf(\"Expectation set by When has same params: %#v\", *mmWriteTo.defaultExpectation.params)\n\t\t}\n\t}\n\n\treturn mmWriteTo\n}",
"func (mmGetObject *mClientMockGetObject) Return(o1 ObjectDescriptor, err error) *ClientMock {\n\tif mmGetObject.mock.funcGetObject != nil {\n\t\tmmGetObject.mock.t.Fatalf(\"ClientMock.GetObject mock is already set by Set\")\n\t}\n\n\tif mmGetObject.defaultExpectation == nil {\n\t\tmmGetObject.defaultExpectation = &ClientMockGetObjectExpectation{mock: mmGetObject.mock}\n\t}\n\tmmGetObject.defaultExpectation.results = &ClientMockGetObjectResults{o1, err}\n\treturn mmGetObject.mock\n}",
"func (m *mParcelMockGetSender) Expect() *mParcelMockGetSender {\n\tm.mock.GetSenderFunc = nil\n\tm.expectationSeries = nil\n\n\tif m.mainExpectation == nil {\n\t\tm.mainExpectation = &ParcelMockGetSenderExpectation{}\n\t}\n\n\treturn m\n}",
"func (m *MockNodeAttestor) EXPECT() *MockNodeAttestorMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockNodeAttestor) EXPECT() *MockNodeAttestorMockRecorder {\n\treturn m.recorder\n}",
"func (mmHasPendings *mClientMockHasPendings) Expect(ctx context.Context, object insolar.Reference) *mClientMockHasPendings {\n\tif mmHasPendings.mock.funcHasPendings != nil {\n\t\tmmHasPendings.mock.t.Fatalf(\"ClientMock.HasPendings mock is already set by Set\")\n\t}\n\n\tif mmHasPendings.defaultExpectation == nil {\n\t\tmmHasPendings.defaultExpectation = &ClientMockHasPendingsExpectation{}\n\t}\n\n\tmmHasPendings.defaultExpectation.params = &ClientMockHasPendingsParams{ctx, object}\n\tfor _, e := range mmHasPendings.expectations {\n\t\tif minimock.Equal(e.params, mmHasPendings.defaultExpectation.params) {\n\t\t\tmmHasPendings.mock.t.Fatalf(\"Expectation set by When has same params: %#v\", *mmHasPendings.defaultExpectation.params)\n\t\t}\n\t}\n\n\treturn mmHasPendings\n}",
"func (m *MockInformation) EXPECT() *MockInformationMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockIUsecase) EXPECT() *MockIUsecaseMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockUserUsecase) EXPECT() *MockUserUsecaseMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockUserUsecase) EXPECT() *MockUserUsecaseMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockmakeRequester) EXPECT() *MockmakeRequesterMockRecorder {\n\treturn m.recorder\n}",
"func (mmCreateTag *mTagCreatorMockCreateTag) Expect(t1 semantic.Tag) *mTagCreatorMockCreateTag {\n\tif mmCreateTag.mock.funcCreateTag != nil {\n\t\tmmCreateTag.mock.t.Fatalf(\"TagCreatorMock.CreateTag mock is already set by Set\")\n\t}\n\n\tif mmCreateTag.defaultExpectation == nil {\n\t\tmmCreateTag.defaultExpectation = &TagCreatorMockCreateTagExpectation{}\n\t}\n\n\tmmCreateTag.defaultExpectation.params = &TagCreatorMockCreateTagParams{t1}\n\tfor _, e := range mmCreateTag.expectations {\n\t\tif minimock.Equal(e.params, mmCreateTag.defaultExpectation.params) {\n\t\t\tmmCreateTag.mock.t.Fatalf(\"Expectation set by When has same params: %#v\", *mmCreateTag.defaultExpectation.params)\n\t\t}\n\t}\n\n\treturn mmCreateTag\n}",
"func (mmGetPacketSignature *mPacketParserMockGetPacketSignature) Expect() *mPacketParserMockGetPacketSignature {\n\tif mmGetPacketSignature.mock.funcGetPacketSignature != nil {\n\t\tmmGetPacketSignature.mock.t.Fatalf(\"PacketParserMock.GetPacketSignature mock is already set by Set\")\n\t}\n\n\tif mmGetPacketSignature.defaultExpectation == nil {\n\t\tmmGetPacketSignature.defaultExpectation = &PacketParserMockGetPacketSignatureExpectation{}\n\t}\n\n\treturn mmGetPacketSignature\n}",
"func (m *MockFactory) EXPECT() *MockFactoryMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockFactory) EXPECT() *MockFactoryMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockFactory) EXPECT() *MockFactoryMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockPKG) EXPECT() *MockPKGMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockStaker) EXPECT() *MockStakerMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockEC2) EXPECT() *MockEC2MockRecorder {\n\treturn m.recorder\n}",
"func (m *MockUseCase) EXPECT() *MockUseCaseMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockUseCase) EXPECT() *MockUseCaseMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockUseCase) EXPECT() *MockUseCaseMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockUseCase) EXPECT() *MockUseCaseMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockUseCase) EXPECT() *MockUseCaseMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockDefinitionUseCase) EXPECT() *MockDefinitionUseCaseMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockBookKeeping) EXPECT() *MockBookKeepingMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockExchange) EXPECT() *MockExchangeMockRecorder {\n\treturn m.recorder\n}",
"func (mmGetAbandonedRequest *mClientMockGetAbandonedRequest) Expect(ctx context.Context, objectRef insolar.Reference, reqRef insolar.Reference) *mClientMockGetAbandonedRequest {\n\tif mmGetAbandonedRequest.mock.funcGetAbandonedRequest != nil {\n\t\tmmGetAbandonedRequest.mock.t.Fatalf(\"ClientMock.GetAbandonedRequest mock is already set by Set\")\n\t}\n\n\tif mmGetAbandonedRequest.defaultExpectation == nil {\n\t\tmmGetAbandonedRequest.defaultExpectation = &ClientMockGetAbandonedRequestExpectation{}\n\t}\n\n\tmmGetAbandonedRequest.defaultExpectation.params = &ClientMockGetAbandonedRequestParams{ctx, objectRef, reqRef}\n\tfor _, e := range mmGetAbandonedRequest.expectations {\n\t\tif minimock.Equal(e.params, mmGetAbandonedRequest.defaultExpectation.params) {\n\t\t\tmmGetAbandonedRequest.mock.t.Fatalf(\"Expectation set by When has same params: %#v\", *mmGetAbandonedRequest.defaultExpectation.params)\n\t\t}\n\t}\n\n\treturn mmGetAbandonedRequest\n}",
"func (m *MockCodeGenerator) EXPECT() *MockCodeGeneratorMockRecorder {\n\treturn m.recorder\n}",
"func (mmGetPendings *mClientMockGetPendings) Expect(ctx context.Context, objectRef insolar.Reference) *mClientMockGetPendings {\n\tif mmGetPendings.mock.funcGetPendings != nil {\n\t\tmmGetPendings.mock.t.Fatalf(\"ClientMock.GetPendings mock is already set by Set\")\n\t}\n\n\tif mmGetPendings.defaultExpectation == nil {\n\t\tmmGetPendings.defaultExpectation = &ClientMockGetPendingsExpectation{}\n\t}\n\n\tmmGetPendings.defaultExpectation.params = &ClientMockGetPendingsParams{ctx, objectRef}\n\tfor _, e := range mmGetPendings.expectations {\n\t\tif minimock.Equal(e.params, mmGetPendings.defaultExpectation.params) {\n\t\t\tmmGetPendings.mock.t.Fatalf(\"Expectation set by When has same params: %#v\", *mmGetPendings.defaultExpectation.params)\n\t\t}\n\t}\n\n\treturn mmGetPendings\n}",
"func (m *MockArticleLogic) EXPECT() *MockArticleLogicMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockStream) EXPECT() *MockStreamMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockBucket) EXPECT() *MockBucketMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockKeystore) EXPECT() *MockKeystoreMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockKeystore) EXPECT() *MockKeystoreMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockbucketDescriber) EXPECT() *MockbucketDescriberMockRecorder {\n\treturn m.recorder\n}",
"func (mmAuther *mGatewayMockAuther) Expect() *mGatewayMockAuther {\n\tif mmAuther.mock.funcAuther != nil {\n\t\tmmAuther.mock.t.Fatalf(\"GatewayMock.Auther mock is already set by Set\")\n\t}\n\n\tif mmAuther.defaultExpectation == nil {\n\t\tmmAuther.defaultExpectation = &GatewayMockAutherExpectation{}\n\t}\n\n\treturn mmAuther\n}",
"func (_m *MockIStream) EXPECT() *MockIStreamMockRecorder {\n\treturn _m.recorder\n}",
"func (m *MockContract) EXPECT() *MockContractMockRecorder {\n\treturn m.recorder\n}",
"func (mmGetUserLocation *mStorageMockGetUserLocation) Expect(ctx context.Context, userID int64) *mStorageMockGetUserLocation {\n\tif mmGetUserLocation.mock.funcGetUserLocation != nil {\n\t\tmmGetUserLocation.mock.t.Fatalf(\"StorageMock.GetUserLocation mock is already set by Set\")\n\t}\n\n\tif mmGetUserLocation.defaultExpectation == nil {\n\t\tmmGetUserLocation.defaultExpectation = &StorageMockGetUserLocationExpectation{}\n\t}\n\n\tmmGetUserLocation.defaultExpectation.params = &StorageMockGetUserLocationParams{ctx, userID}\n\tfor _, e := range mmGetUserLocation.expectations {\n\t\tif minimock.Equal(e.params, mmGetUserLocation.defaultExpectation.params) {\n\t\t\tmmGetUserLocation.mock.t.Fatalf(\"Expectation set by When has same params: %#v\", *mmGetUserLocation.defaultExpectation.params)\n\t\t}\n\t}\n\n\treturn mmGetUserLocation\n}",
"func (mmAsBytes *mDigestHolderMockAsBytes) Expect() *mDigestHolderMockAsBytes {\n\tif mmAsBytes.mock.funcAsBytes != nil {\n\t\tmmAsBytes.mock.t.Fatalf(\"DigestHolderMock.AsBytes mock is already set by Set\")\n\t}\n\n\tif mmAsBytes.defaultExpectation == nil {\n\t\tmmAsBytes.defaultExpectation = &DigestHolderMockAsBytesExpectation{}\n\t}\n\n\treturn mmAsBytes\n}",
"func (m *MockSigner) EXPECT() *MockSignerMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockAZInfoProvider) EXPECT() *MockAZInfoProviderMockRecorder {\n\treturn m.recorder\n}",
"func (m *Ingester) EXPECT() *IngesterMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockOnewayInbound) EXPECT() *MockOnewayInboundMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockecsDescriber) EXPECT() *MockecsDescriberMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockLoaderFactory) EXPECT() *MockLoaderFactoryMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockArguments) EXPECT() *MockArgumentsMockRecorder {\n\treturn m.recorder\n}",
"func (mmAsByteString *mDigestHolderMockAsByteString) Expect() *mDigestHolderMockAsByteString {\n\tif mmAsByteString.mock.funcAsByteString != nil {\n\t\tmmAsByteString.mock.t.Fatalf(\"DigestHolderMock.AsByteString mock is already set by Set\")\n\t}\n\n\tif mmAsByteString.defaultExpectation == nil {\n\t\tmmAsByteString.defaultExpectation = &DigestHolderMockAsByteStringExpectation{}\n\t}\n\n\treturn mmAsByteString\n}",
"func (m *MockConsensus) EXPECT() *MockConsensusMockRecorder {\n\treturn m.recorder\n}",
"func expect(t *testing.T, method, url string, testieOptions ...func(*http.Request)) *testie {\n\treq, err := http.NewRequest(method, url, nil)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tfor _, opt := range testieOptions {\n\t\topt(req)\n\t}\n\n\treturn testReq(t, req)\n}",
"func (mmRegisterResult *mClientMockRegisterResult) Expect(ctx context.Context, request insolar.Reference, result RequestResult) *mClientMockRegisterResult {\n\tif mmRegisterResult.mock.funcRegisterResult != nil {\n\t\tmmRegisterResult.mock.t.Fatalf(\"ClientMock.RegisterResult mock is already set by Set\")\n\t}\n\n\tif mmRegisterResult.defaultExpectation == nil {\n\t\tmmRegisterResult.defaultExpectation = &ClientMockRegisterResultExpectation{}\n\t}\n\n\tmmRegisterResult.defaultExpectation.params = &ClientMockRegisterResultParams{ctx, request, result}\n\tfor _, e := range mmRegisterResult.expectations {\n\t\tif minimock.Equal(e.params, mmRegisterResult.defaultExpectation.params) {\n\t\t\tmmRegisterResult.mock.t.Fatalf(\"Expectation set by When has same params: %#v\", *mmRegisterResult.defaultExpectation.params)\n\t\t}\n\t}\n\n\treturn mmRegisterResult\n}",
"func (m *MockBookUseCase) EXPECT() *MockBookUseCaseMockRecorder {\n\treturn m.recorder\n}",
"func expectEqual(value, expected interface{}) {\n\tif value != expected {\n\t\tfmt.Printf(\"Fehler: %v bekommen, erwartet war aber %v.\\n\", value, expected)\n\t} else {\n\t\tfmt.Printf(\"OK: %v bekommen, erwartet war aber %v.\\n\", value, expected)\n\t}\n}",
"func (m *MockSource) EXPECT() *MockSourceMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockSource) EXPECT() *MockSourceMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockAddToManager) EXPECT() *MockAddToManagerMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockPlacementManager) EXPECT() *MockPlacementManagerMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockNS) EXPECT() *MockNSMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockOAuther) EXPECT() *MockOAutherMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockGenerator) EXPECT() *MockGeneratorMockRecorder {\n\treturn m.recorder\n}",
"func (m *MockIHealthUsecase) EXPECT() *MockIHealthUsecaseMockRecorder {\n\treturn m.recorder\n}"
] |
[
"0.58926755",
"0.5786918",
"0.576383",
"0.56990707",
"0.5694984",
"0.56704026",
"0.5645271",
"0.5626006",
"0.5624112",
"0.5624112",
"0.5624112",
"0.5624112",
"0.5624112",
"0.5624112",
"0.5624112",
"0.5624112",
"0.56050104",
"0.56007326",
"0.56007326",
"0.55889475",
"0.5585797",
"0.55826366",
"0.55826366",
"0.5540365",
"0.55309904",
"0.55300146",
"0.5518226",
"0.550036",
"0.54997486",
"0.54907167",
"0.5481579",
"0.5479837",
"0.54707986",
"0.54668397",
"0.54663783",
"0.5457921",
"0.5450415",
"0.5444143",
"0.54372525",
"0.5433729",
"0.54252476",
"0.5419703",
"0.5419226",
"0.5419226",
"0.54168236",
"0.5411645",
"0.54100025",
"0.5397852",
"0.5397852",
"0.5397011",
"0.53966695",
"0.53964454",
"0.5391712",
"0.5391712",
"0.5391712",
"0.53916544",
"0.5388891",
"0.53826284",
"0.5380391",
"0.5380391",
"0.5380391",
"0.5380391",
"0.5380391",
"0.53780085",
"0.5377835",
"0.53727",
"0.5371475",
"0.53693557",
"0.536886",
"0.53688276",
"0.5368239",
"0.53624046",
"0.5358682",
"0.5358682",
"0.53523695",
"0.53514105",
"0.5348084",
"0.53474134",
"0.53424144",
"0.53365433",
"0.5331375",
"0.5328617",
"0.53267777",
"0.5323739",
"0.53233516",
"0.5320212",
"0.5318194",
"0.53176427",
"0.5316279",
"0.53151655",
"0.5315045",
"0.5312675",
"0.5307445",
"0.5307085",
"0.5307085",
"0.5306434",
"0.5306033",
"0.53003836",
"0.5297029",
"0.52970153",
"0.52955616"
] |
0.0
|
-1
|
RegionsList mocks base method.
|
func (m *MockRegionsService) RegionsList(arg0 context.Context) ([]scalingo.Region, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RegionsList", arg0)
ret0, _ := ret[0].([]scalingo.Region)
ret1, _ := ret[1].(error)
return ret0, ret1
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func TestGetAllRegions(t *testing.T) {\n\tawsRegionSample := []string{\"ap-southeast-1\", \"us-west-2\", \"ap-northeast-1\", \"eu-west-2\", \"eu-central-1\"}\n\tawsChinaSample := []string{\"cn-north-1\", \"cn-northwest-1\"}\n\n\tawsRegions := GetAllRegions()\n\tfor _, region := range awsRegionSample {\n\t\tif !stringInSlice(region, awsRegions) {\n\t\t\tt.Errorf(\"Could not find region %s in retrieved list: %v\", region, awsRegions)\n\t\t}\n\t}\n\n\t// Test the same for China\n\tawsRegions = GetAllChinaRegions()\n\tfor _, region := range awsChinaSample {\n\t\tif !stringInSlice(region, awsRegions) {\n\t\t\tt.Errorf(\"Could not find region %s in retrieved list: %v\", region, awsRegions)\n\t\t}\n\t}\n}",
"func (m *MockKubernetesService) GetRegions() (do.KubernetesRegions, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"GetRegions\")\n\tret0, _ := ret[0].(do.KubernetesRegions)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (client IdentityClient) listRegions(ctx context.Context) (common.OCIResponse, error) {\n\thttpRequest := common.MakeDefaultHTTPRequest(http.MethodGet, \"/regions\")\n\tvar err error\n\n\tvar response ListRegionsResponse\n\tvar httpResponse *http.Response\n\thttpResponse, err = client.Call(ctx, &httpRequest)\n\tdefer common.CloseBodyIfValid(httpResponse)\n\tresponse.RawResponse = httpResponse\n\tif err != nil {\n\t\treturn response, err\n\t}\n\n\terr = common.UnmarshalResponse(httpResponse, &response)\n\treturn response, err\n}",
"func (m *MockClient) DescribeRegions(input *ec2.DescribeRegionsInput) (*ec2.DescribeRegionsOutput, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"DescribeRegions\", input)\n\tret0, _ := ret[0].(*ec2.DescribeRegionsOutput)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (client IdentityClient) ListRegions(ctx context.Context) (response ListRegionsResponse, err error) {\n\tvar ociResponse common.OCIResponse\n\tociResponse, err = client.listRegions(ctx)\n\tif err != nil {\n\t\tif ociResponse != nil {\n\t\t\tif httpResponse := ociResponse.HTTPResponse(); httpResponse != nil {\n\t\t\t\topcRequestId := httpResponse.Header.Get(\"opc-request-id\")\n\t\t\t\tresponse = ListRegionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId}\n\t\t\t} else {\n\t\t\t\tresponse = ListRegionsResponse{}\n\t\t\t}\n\t\t}\n\t\treturn\n\t}\n\tif convertedResponse, ok := ociResponse.(ListRegionsResponse); ok {\n\t\tresponse = convertedResponse\n\t} else {\n\t\terr = fmt.Errorf(\"failed to convert OCIResponse into ListRegionsResponse\")\n\t}\n\treturn\n}",
"func Test_Client_MapByRegion(t *testing.T) {\n\tcountriesInOceania := []string{\n\t\t\"American Samoa\",\n\t\t\"Australia\",\n\t\t\"Christmas Island\",\n\t\t\"Cocos (Keeling) Islands\",\n\t\t\"Cook Islands\",\n\t\t\"Fiji\",\n\t\t\"French Polynesia\",\n\t\t\"Guam\",\n\t\t\"Kiribati\",\n\t\t\"Marshall Islands\",\n\t\t\"Micronesia\",\n\t\t\"Nauru\",\n\t\t\"New Caledonia\",\n\t\t\"New Zealand\",\n\t\t\"Niue\",\n\t\t\"Norfolk Island\",\n\t\t\"Northern Mariana Islands\",\n\t\t\"Palau\",\n\t\t\"Papua New Guinea\",\n\t\t\"Pitcairn Islands\",\n\t\t\"Samoa\",\n\t\t\"Solomon Islands\",\n\t\t\"Tokelau\",\n\t\t\"Tonga\",\n\t\t\"Tuvalu\",\n\t\t\"Vanuatu\",\n\t\t\"Wallis and Futuna\",\n\t}\n\tret := mockClient.MapByRegion(\"Oceania\")\n\tfor _, row := range ret {\n\t\tassert.Contains(t, countriesInOceania, row.Name)\n\t}\n}",
"func (m *MockInformation) ListLocations() []string {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"ListLocations\")\n\tret0, _ := ret[0].([]string)\n\treturn ret0\n}",
"func Test_Client_MapBySubregion(t *testing.T) {\n\tcountriesInSEA := []string{\n\t\t\"Brunei\",\n\t\t\"Cambodia\",\n\t\t\"Indonesia\",\n\t\t\"Laos\",\n\t\t\"Malaysia\",\n\t\t\"Myanmar\",\n\t\t\"Philippines\",\n\t\t\"Singapore\",\n\t\t\"Thailand\",\n\t\t\"Timor-Leste\",\n\t\t\"Vietnam\",\n\t}\n\tret := mockClient.MapBySubregion(\"South-Eastern Asia\")\n\tfor _, row := range ret {\n\t\tassert.Contains(t, countriesInSEA, row.Name)\n\t}\n}",
"func (m *VirtualMachinesClientMock) List(ctx context.Context, resourceGroupName string) (result []compute.VirtualMachine, rerr *retry.Error) {\n\tm.mutex.Lock()\n\tdefer m.mutex.Unlock()\n\n\tif _, ok := m.FakeStore[resourceGroupName]; ok {\n\t\tfor _, v := range m.FakeStore[resourceGroupName] {\n\t\t\tresult = append(result, v)\n\t\t}\n\t}\n\n\treturn result, nil\n}",
"func (e Endpoints) ListRegions(ctx context.Context, token string) (regions []registry.Region, err error) {\n\trequest := ListRegionsRequest{Token: token}\n\tresponse, err := e.ListRegionsEndpoint(ctx, request)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn response.(ListRegionsResponse).Regions, response.(ListRegionsResponse).Err\n}",
"func (s *Service) NewRegionList(c context.Context, plat int8, build int, ver, mobiApp, device, language string) (res []*region.Region, version string, err error) {\n\tip := metadata.String(c, metadata.RemoteIP)\n\tvar (\n\t\thantlanguage = \"hant\"\n\t)\n\tif ok := model.IsOverseas(plat); ok && language != _initlanguage && language != hantlanguage {\n\t\tlanguage = hantlanguage\n\t} else if language == \"\" {\n\t\tlanguage = _initlanguage\n\t}\n\tvar (\n\t\trs = s.cachelist[fmt.Sprintf(_initRegionKey, plat, language)]\n\t\tchild = map[int][]*region.Region{}\n\t\tridtmp = map[string]struct{}{}\n\t\tpids []string\n\t\tauths map[string]*locmdl.Auth\n\t)\n\tfor _, rtmp := range rs {\n\t\tif rtmp.Area != \"\" {\n\t\t\tpids = append(pids, rtmp.Area)\n\t\t}\n\t}\n\tif len(pids) > 0 {\n\t\tauths, _ = s.loc.AuthPIDs(c, strings.Join(pids, \",\"), ip)\n\t}\nLOOP:\n\tfor _, rtmp := range rs {\n\t\tr := ®ion.Region{}\n\t\t*r = *rtmp\n\t\tif _, isgbm := _isBangumiIndex[r.Rid]; isgbm {\n\t\t\tr.IsBangumi = 1\n\t\t}\n\t\tvar tmpl, limitshow bool\n\t\tif limit, ok := s.limitCache[r.ID]; ok {\n\t\t\tfor i, l := range limit {\n\t\t\t\tif i+1 <= len(limit)-1 {\n\t\t\t\t\tif ((l.Condition == \"gt\" && limit[i+1].Condition == \"lt\") && (l.Build < limit[i+1].Build)) ||\n\t\t\t\t\t\t((l.Condition == \"lt\" && limit[i+1].Condition == \"gt\") && (l.Build > limit[i+1].Build)) {\n\t\t\t\t\t\tif (l.Condition == \"gt\" && limit[i+1].Condition == \"lt\") &&\n\t\t\t\t\t\t\t(build > l.Build && build < limit[i+1].Build) {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t} else if (l.Condition == \"lt\" && limit[i+1].Condition == \"gt\") &&\n\t\t\t\t\t\t\t(build < l.Build && build > limit[i+1].Build) {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttmpl = true\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif tmpl {\n\t\t\t\t\tif i == len(limit)-1 {\n\t\t\t\t\t\tlimitshow = true\n\t\t\t\t\t\t// continue LOOP\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\ttmpl = false\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif model.InvalidBuild(build, l.Build, l.Condition) {\n\t\t\t\t\tlimitshow = true\n\t\t\t\t\tcontinue\n\t\t\t\t\t// continue LOOP\n\t\t\t\t} else {\n\t\t\t\t\tlimitshow = false\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif limitshow {\n\t\t\tcontinue LOOP\n\t\t}\n\t\tif auth, ok := auths[r.Area]; ok && auth.Play == locmdl.Forbidden {\n\t\t\tlog.Warn(\"s.invalid area(%v) ip(%v) error(%v)\", r.Area, ip, err)\n\t\t\tcontinue\n\t\t}\n\t\tif isAudit := s.auditRegion(mobiApp, plat, build, r.Rid); isAudit {\n\t\t\tcontinue\n\t\t}\n\t\tif config, ok := s.configCache[r.ID]; ok {\n\t\t\tr.Config = config\n\t\t}\n\t\tkey := fmt.Sprintf(_regionRepeat, r.Rid, r.Reid)\n\t\tif _, ok := ridtmp[key]; !ok {\n\t\t\tridtmp[key] = struct{}{}\n\t\t} else {\n\t\t\tcontinue\n\t\t}\n\t\tif r.Reid != 0 {\n\t\t\tcl, ok := child[r.Reid]\n\t\t\tif !ok {\n\t\t\t\tcl = []*region.Region{}\n\t\t\t}\n\t\t\tcl = append(cl, r)\n\t\t\tchild[r.Reid] = cl\n\t\t} else {\n\t\t\tres = append(res, r)\n\t\t}\n\t}\n\tif len(res) == 0 {\n\t\tres = _emptyRegions\n\t} else {\n\t\tfor _, r := range res {\n\t\t\tr.Children = child[r.Rid]\n\t\t}\n\t}\n\tif version = s.hash(res); version == ver {\n\t\terr = ecode.NotModified\n\t\tres = nil\n\t}\n\treturn\n}",
"func (s *AppsServiceOp) ListRegions(ctx context.Context) ([]*AppRegion, *Response, error) {\n\tpath := fmt.Sprintf(\"%s/regions\", appsBasePath)\n\treq, err := s.client.NewRequest(ctx, http.MethodGet, path, nil)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\troot := new(appRegionsRoot)\n\tresp, err := s.client.Do(ctx, req, root)\n\tif err != nil {\n\t\treturn nil, resp, err\n\t}\n\treturn root.Regions, resp, nil\n}",
"func (mr *MockRegionsServiceMockRecorder) RegionsList(arg0 interface{}) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"RegionsList\", reflect.TypeOf((*MockRegionsService)(nil).RegionsList), arg0)\n}",
"func (m *MockCustomerService) ListByVIN(arg0 context.Context, arg1 *query.ListByVIN, arg2 bool) ([]model.Registration, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"ListByVIN\", arg0, arg1, arg2)\n\tret0, _ := ret[0].([]model.Registration)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (m *MockGatewaySet) List(filterResource ...func(*v1alpha3.Gateway) bool) []*v1alpha3.Gateway {\n\tm.ctrl.T.Helper()\n\tvarargs := []interface{}{}\n\tfor _, a := range filterResource {\n\t\tvarargs = append(varargs, a)\n\t}\n\tret := m.ctrl.Call(m, \"List\", varargs...)\n\tret0, _ := ret[0].([]*v1alpha3.Gateway)\n\treturn ret0\n}",
"func (m *MockInfra) Region() string {\n\tret := m.ctrl.Call(m, \"Region\")\n\tret0, _ := ret[0].(string)\n\treturn ret0\n}",
"func (m *MockVirtualServiceSet) List(filterResource ...func(*v1alpha3.VirtualService) bool) []*v1alpha3.VirtualService {\n\tm.ctrl.T.Helper()\n\tvarargs := []interface{}{}\n\tfor _, a := range filterResource {\n\t\tvarargs = append(varargs, a)\n\t}\n\tret := m.ctrl.Call(m, \"List\", varargs...)\n\tret0, _ := ret[0].([]*v1alpha3.VirtualService)\n\treturn ret0\n}",
"func (m *MockCall) Region() hrpc.RegionInfo {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"Region\")\n\tret0, _ := ret[0].(hrpc.RegionInfo)\n\treturn ret0\n}",
"func (m *MockInformation) ListItems() []string {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"ListItems\")\n\tret0, _ := ret[0].([]string)\n\treturn ret0\n}",
"func (m *MockIApi) ListInvoices(arg0 *chartmogul.Cursor, arg1 string) (*chartmogul.Invoices, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"ListInvoices\", arg0, arg1)\n\tret0, _ := ret[0].(*chartmogul.Invoices)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (m *MockRemotes) List() ([]string, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"List\")\n\tret0, _ := ret[0].([]string)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (m *MockRepository) List() ([]*entity.StreetMarket, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"List\")\n\tret0, _ := ret[0].([]*entity.StreetMarket)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (c *Client) ListRegions() (strset.Set, strset.Set, error) {\n\tvar allRegions strset.Set\n\tvar enabledRegions strset.Set\n\n\terr := parallel.RunFirstErr(\n\t\tfunc() error {\n\t\t\tvar err error\n\t\t\tallRegions, err = c.ListAllRegions()\n\t\t\treturn err\n\t\t},\n\t\tfunc() error {\n\t\t\tvar err error\n\t\t\tenabledRegions, err = c.ListEnabledRegions()\n\t\t\treturn err\n\t\t},\n\t)\n\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\treturn allRegions, enabledRegions, nil\n}",
"func (m *MockVirtualServiceClient) List(arg0 string, arg1 clients.ListOpts) (v1.VirtualServiceList, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"List\", arg0, arg1)\n\tret0, _ := ret[0].(v1.VirtualServiceList)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (m *MockReader) List() ([]*entity.StreetMarket, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"List\")\n\tret0, _ := ret[0].([]*entity.StreetMarket)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (m *MockRDSAPI) DescribeSourceRegions(arg0 *rds.DescribeSourceRegionsInput) (*rds.DescribeSourceRegionsOutput, error) {\n\tret := m.ctrl.Call(m, \"DescribeSourceRegions\", arg0)\n\tret0, _ := ret[0].(*rds.DescribeSourceRegionsOutput)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (client *Client) GetRegionList(request *GetRegionListRequest) (response *GetRegionListResponse, err error) {\n\tresponse = CreateGetRegionListResponse()\n\terr = client.DoAction(request, response)\n\treturn\n}",
"func GetRegions() ([]Region, error) {\n\tvar regions []Region\n\tarvanConfig := config.GetConfigInfo()\n\tarvanServer := arvanConfig.GetServer()\n\thttpReq, err := http.NewRequest(\"GET\", arvanServer+apiPrefix+defaultRegion+regionsEndpoint, nil)\n\tif err != nil {\n\t\treturn regions, err\n\t}\n\thttpReq.Header.Add(\"accept\", \"application/json\")\n\thttpReq.Header.Add(\"User-Agent\", \"ar-cli\")\n\thttpResp, err := http.DefaultClient.Do(httpReq)\n\tif err != nil {\n\t\treturn regions, err\n\t}\n\t// read body\n\tdefer httpResp.Body.Close()\n\tbody, err := ioutil.ReadAll(httpResp.Body)\n\tif err != nil {\n\t\treturn regions, err\n\t}\n\t// parse response\n\terr = json.Unmarshal(body, ®ions)\n\tif err != nil {\n\t\treturn regions, err\n\t}\n\n\treturn regions, nil\n}",
"func Regions() (names []string) {\n\tif RegionNames == nil {\n\t\tif RegionNames = fetchRegions(); RegionNames == nil {\n\t\t\tlog.Errorf(\"expected (regions) got ()\")\n\t\t\treturn nil\n\t\t}\n\t\tfor _, name := range RegionNames {\n\t\t\tRegionMap[name] = &Region{Name: name}\n\t\t}\n\t}\n\treturn RegionNames\n}",
"func (m *MockCandidatePropertyGetter) Region() *models.SCloudregion {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"Region\")\n\tret0, _ := ret[0].(*models.SCloudregion)\n\treturn ret0\n}",
"func (_m *ISession) VoiceRegions(options ...discordgo.RequestOption) ([]*discordgo.VoiceRegion, error) {\n\t_va := make([]interface{}, len(options))\n\tfor _i := range options {\n\t\t_va[_i] = options[_i]\n\t}\n\tvar _ca []interface{}\n\t_ca = append(_ca, _va...)\n\tret := _m.Called(_ca...)\n\n\tvar r0 []*discordgo.VoiceRegion\n\tvar r1 error\n\tif rf, ok := ret.Get(0).(func(...discordgo.RequestOption) ([]*discordgo.VoiceRegion, error)); ok {\n\t\treturn rf(options...)\n\t}\n\tif rf, ok := ret.Get(0).(func(...discordgo.RequestOption) []*discordgo.VoiceRegion); ok {\n\t\tr0 = rf(options...)\n\t} else {\n\t\tif ret.Get(0) != nil {\n\t\t\tr0 = ret.Get(0).([]*discordgo.VoiceRegion)\n\t\t}\n\t}\n\n\tif rf, ok := ret.Get(1).(func(...discordgo.RequestOption) error); ok {\n\t\tr1 = rf(options...)\n\t} else {\n\t\tr1 = ret.Error(1)\n\t}\n\n\treturn r0, r1\n}",
"func (m *MockFailoverServiceSet) List() []*v1alpha1.FailoverService {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"List\")\n\tret0, _ := ret[0].([]*v1alpha1.FailoverService)\n\treturn ret0\n}",
"func (m *MockVirtualMeshSet) List() []*v1alpha1.VirtualMesh {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"List\")\n\tret0, _ := ret[0].([]*v1alpha1.VirtualMesh)\n\treturn ret0\n}",
"func (m *MockInterface) List(arg0 *api.OpenShiftCluster, arg1, arg2 string) ([]byte, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"List\", arg0, arg1, arg2)\n\tret0, _ := ret[0].([]byte)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (m *VirtualMachineScaleSetVMsClientMock) List(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, expand string) (result []compute.VirtualMachineScaleSetVM, rerr *retry.Error) {\n\tm.mutex.Lock()\n\tdefer m.mutex.Unlock()\n\n\tif _, ok := m.FakeStore[resourceGroupName]; ok {\n\t\tfor _, v := range m.FakeStore[resourceGroupName] {\n\t\t\tresult = append(result, v)\n\t\t}\n\t}\n\treturn result, nil\n}",
"func GetRegionList() []*ec2.Region {\n\tsess := session.Must(session.NewSession(&aws.Config{Region: aws.String(\"us-east-1\")}))\n\tsvc := ec2.New(sess)\n\n\t// Create a context with a timeout that will abort the request if it takes too long\n\tctx, cancelFn := context.WithTimeout(context.Background(), time.Second*5)\n\tdefer cancelFn()\n\n\tresp, err := svc.DescribeRegionsWithContext(ctx, nil)\n\n\tif err != nil {\n\t\tfmt.Println(err.Error())\n\t\treturn nil\n\t}\n\n\treturn resp.Regions\n}",
"func (a *CloudProviderCredentialsApiService) ListAWSRegionsExecute(r ApiListAWSRegionsRequest) (ClusterRegionResponseList, *_nethttp.Response, error) {\n\tvar (\n\t\tlocalVarHTTPMethod = _nethttp.MethodGet\n\t\tlocalVarPostBody interface{}\n\t\tlocalVarFormFileName string\n\t\tlocalVarFileName string\n\t\tlocalVarFileBytes []byte\n\t\tlocalVarReturnValue ClusterRegionResponseList\n\t)\n\n\tlocalBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, \"CloudProviderCredentialsApiService.ListAWSRegions\")\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}\n\t}\n\n\tlocalVarPath := localBasePath + \"/aws/region\"\n\n\tlocalVarHeaderParams := make(map[string]string)\n\tlocalVarQueryParams := _neturl.Values{}\n\tlocalVarFormParams := _neturl.Values{}\n\n\t// to determine the Content-Type header\n\tlocalVarHTTPContentTypes := []string{}\n\n\t// set Content-Type header\n\tlocalVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)\n\tif localVarHTTPContentType != \"\" {\n\t\tlocalVarHeaderParams[\"Content-Type\"] = localVarHTTPContentType\n\t}\n\n\t// to determine the Accept header\n\tlocalVarHTTPHeaderAccepts := []string{\"application/json\"}\n\n\t// set Accept header\n\tlocalVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)\n\tif localVarHTTPHeaderAccept != \"\" {\n\t\tlocalVarHeaderParams[\"Accept\"] = localVarHTTPHeaderAccept\n\t}\n\treq, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, err\n\t}\n\n\tlocalVarHTTPResponse, err := a.client.callAPI(req)\n\tif err != nil || localVarHTTPResponse == nil {\n\t\treturn localVarReturnValue, localVarHTTPResponse, err\n\t}\n\n\tlocalVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)\n\tlocalVarHTTPResponse.Body.Close()\n\tlocalVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))\n\tif err != nil {\n\t\treturn localVarReturnValue, localVarHTTPResponse, err\n\t}\n\n\tif localVarHTTPResponse.StatusCode >= 300 {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: localVarHTTPResponse.Status,\n\t\t}\n\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t}\n\n\terr = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\tif err != nil {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: err.Error(),\n\t\t}\n\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t}\n\n\treturn localVarReturnValue, localVarHTTPResponse, nil\n}",
"func (s *testPluginCodeSuite) TestGetRegionIDs(c *C) {\n\tregionIDs := schedule.GetRegionIDs(s.tc,\"757365727461626C653A7573657231773937383833313437333137333731323135\",\n\t\t\"757365727461626C653A7573657234443637353232383738383832303830353737\")\n\tc.Assert(len(regionIDs), Equals, 3)\n\tc.Assert(regionIDs[0], Equals, uint64(2))\n\tc.Assert(regionIDs[1], Equals, uint64(3))\n\tc.Assert(regionIDs[2], Equals, uint64(4))\n}",
"func TestIntegrationRegion(t *testing.T) {\n\ttests := []struct {\n\t\tname string\n\t\tregion string\n\t\tregions []string\n\t\thaserror bool\n\t}{\n\t\t{\"test empty region\", \"\", genericRegions, true},\n\t\t{\"test good region\", genericRegions[0], genericRegions, false},\n\t}\n\tfor _, tt := range tests {\n\t\ttc := tt\n\t\tt.Run(tc.name, func(t *testing.T) {\n\t\t\ts := New(tc.region, tc.regions)\n\t\t\tss, err := s.Region(tc.region)\n\t\t\tif err != nil {\n\t\t\t\tt.Fatalf(\"Region() failed: %v\", err)\n\t\t\t}\n\t\t\tif ss.Config == nil || ss.Config.Region == nil {\n\t\t\t\tt.Fatal(\"ss.Config or ss.Config.Region is nil\")\n\t\t\t}\n\t\t\tresult := *ss.Config.Region\n\t\t\tif result != tc.region {\n\t\t\t\tt.Fatalf(\"Region() region invalid, expected: %s, got: %s\", tc.region, result)\n\t\t\t}\n\t\t})\n\t}\n}",
"func MakeListRegionsEndpoint(s registry.Service) endpoint.Endpoint {\n\treturn func(ctx context.Context, request interface{}) (interface{}, error) {\n\t\treq := request.(ListRegionsRequest)\n\t\tregions, err := s.ListRegions(ctx, req.Token)\n\t\treturn ListRegionsResponse{\n\t\t\tErr: err,\n\t\t\tRegions: regions,\n\t\t}, nil\n\t}\n}",
"func (m *MockProduct) ListEditors(arg0 context.Context, arg1 []string) ([]string, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"ListEditors\", arg0, arg1)\n\tret0, _ := ret[0].([]string)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (_m *VirtualMachine) List() ([]vm.VirtualMachine, error) {\n\tret := _m.Called()\n\n\tvar r0 []vm.VirtualMachine\n\tif rf, ok := ret.Get(0).(func() []vm.VirtualMachine); ok {\n\t\tr0 = rf()\n\t} else {\n\t\tif ret.Get(0) != nil {\n\t\t\tr0 = ret.Get(0).([]vm.VirtualMachine)\n\t\t}\n\t}\n\n\tvar r1 error\n\tif rf, ok := ret.Get(1).(func() error); ok {\n\t\tr1 = rf()\n\t} else {\n\t\tr1 = ret.Error(1)\n\t}\n\n\treturn r0, r1\n}",
"func GetRegions(sess *session.Session) (*ec2.DescribeRegionsOutput, error) {\n // snippet-start:[ec2.go.regions_and_zones.regions]\n svc := ec2.New(sess)\n\n resultRegions, err := svc.DescribeRegions(nil)\n // snippet-end:[ec2.go.regions_and_zones.regions]\n if err != nil {\n return nil, err\n }\n\n return resultRegions, nil\n}",
"func (m *MockDBStorage) List(arg0 string, arg1 *models.NodeList) (*models.ShadowList, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"List\", arg0, arg1)\n\tret0, _ := ret[0].(*models.ShadowList)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (m *MockVolumeMgr) List(arg0 context.Context, arg1 codemode.CodeMode) ([]proto.Vid, []clustermgr.AllocVolumeInfo, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"List\", arg0, arg1)\n\tret0, _ := ret[0].([]proto.Vid)\n\tret1, _ := ret[1].([]clustermgr.AllocVolumeInfo)\n\tret2, _ := ret[2].(error)\n\treturn ret0, ret1, ret2\n}",
"func (m *MockApplicationManager) List(ktx kontext.Context, offset, limit int) ([]entity.OauthApplicationJSON, int, jsonapi.Errors) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"List\", ktx, offset, limit)\n\tret0, _ := ret[0].([]entity.OauthApplicationJSON)\n\tret1, _ := ret[1].(int)\n\tret2, _ := ret[2].(jsonapi.Errors)\n\treturn ret0, ret1, ret2\n}",
"func ExampleRegistriesClient_NewListPager() {\n\tcred, err := azidentity.NewDefaultAzureCredential(nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to obtain a credential: %v\", err)\n\t}\n\tctx := context.Background()\n\tclientFactory, err := armcontainerregistry.NewClientFactory(\"<subscription-id>\", cred, nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to create client: %v\", err)\n\t}\n\tpager := clientFactory.NewRegistriesClient().NewListPager(nil)\n\tfor pager.More() {\n\t\tpage, err := pager.NextPage(ctx)\n\t\tif err != nil {\n\t\t\tlog.Fatalf(\"failed to advance page: %v\", err)\n\t\t}\n\t\tfor _, v := range page.Value {\n\t\t\t// You could use page here. We use blank identifier for just demo purposes.\n\t\t\t_ = v\n\t\t}\n\t\t// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.\n\t\t// page.RegistryListResult = armcontainerregistry.RegistryListResult{\n\t\t// \tValue: []*armcontainerregistry.Registry{\n\t\t// \t\t{\n\t\t// \t\t\tName: to.Ptr(\"myRegistry\"),\n\t\t// \t\t\tType: to.Ptr(\"Microsoft.ContainerRegistry/registries\"),\n\t\t// \t\t\tID: to.Ptr(\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry\"),\n\t\t// \t\t\tLocation: to.Ptr(\"westus\"),\n\t\t// \t\t\tTags: map[string]*string{\n\t\t// \t\t\t\t\"key\": to.Ptr(\"value\"),\n\t\t// \t\t\t},\n\t\t// \t\t\tProperties: &armcontainerregistry.RegistryProperties{\n\t\t// \t\t\t\tAdminUserEnabled: to.Ptr(false),\n\t\t// \t\t\t\tAnonymousPullEnabled: to.Ptr(false),\n\t\t// \t\t\t\tCreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, \"2021-06-15T21:38:26.1537861Z\"); return t}()),\n\t\t// \t\t\t\tDataEndpointEnabled: to.Ptr(false),\n\t\t// \t\t\t\tDataEndpointHostNames: []*string{\n\t\t// \t\t\t\t},\n\t\t// \t\t\t\tEncryption: &armcontainerregistry.EncryptionProperty{\n\t\t// \t\t\t\t\tStatus: to.Ptr(armcontainerregistry.EncryptionStatusDisabled),\n\t\t// \t\t\t\t},\n\t\t// \t\t\t\tLoginServer: to.Ptr(\"myRegistry.azurecr-test.io\"),\n\t\t// \t\t\t\tNetworkRuleBypassOptions: to.Ptr(armcontainerregistry.NetworkRuleBypassOptionsAzureServices),\n\t\t// \t\t\t\tNetworkRuleSet: &armcontainerregistry.NetworkRuleSet{\n\t\t// \t\t\t\t\tDefaultAction: to.Ptr(armcontainerregistry.DefaultActionAllow),\n\t\t// \t\t\t\t\tIPRules: []*armcontainerregistry.IPRule{\n\t\t// \t\t\t\t\t},\n\t\t// \t\t\t\t},\n\t\t// \t\t\t\tPolicies: &armcontainerregistry.Policies{\n\t\t// \t\t\t\t\tExportPolicy: &armcontainerregistry.ExportPolicy{\n\t\t// \t\t\t\t\t\tStatus: to.Ptr(armcontainerregistry.ExportPolicyStatusEnabled),\n\t\t// \t\t\t\t\t},\n\t\t// \t\t\t\t\tQuarantinePolicy: &armcontainerregistry.QuarantinePolicy{\n\t\t// \t\t\t\t\t\tStatus: to.Ptr(armcontainerregistry.PolicyStatusDisabled),\n\t\t// \t\t\t\t\t},\n\t\t// \t\t\t\t\tRetentionPolicy: &armcontainerregistry.RetentionPolicy{\n\t\t// \t\t\t\t\t\tDays: to.Ptr[int32](7),\n\t\t// \t\t\t\t\t\tLastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, \"2021-06-15T21:40:12.8506835+00:00\"); return t}()),\n\t\t// \t\t\t\t\t\tStatus: to.Ptr(armcontainerregistry.PolicyStatusDisabled),\n\t\t// \t\t\t\t\t},\n\t\t// \t\t\t\t\tTrustPolicy: &armcontainerregistry.TrustPolicy{\n\t\t// \t\t\t\t\t\tType: to.Ptr(armcontainerregistry.TrustPolicyTypeNotary),\n\t\t// \t\t\t\t\t\tStatus: to.Ptr(armcontainerregistry.PolicyStatusDisabled),\n\t\t// \t\t\t\t\t},\n\t\t// \t\t\t\t},\n\t\t// \t\t\t\tPrivateEndpointConnections: []*armcontainerregistry.PrivateEndpointConnection{\n\t\t// \t\t\t\t},\n\t\t// \t\t\t\tProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),\n\t\t// \t\t\t\tPublicNetworkAccess: to.Ptr(armcontainerregistry.PublicNetworkAccessEnabled),\n\t\t// \t\t\t\tZoneRedundancy: to.Ptr(armcontainerregistry.ZoneRedundancyDisabled),\n\t\t// \t\t\t},\n\t\t// \t\t\tSKU: &armcontainerregistry.SKU{\n\t\t// \t\t\t\tName: to.Ptr(armcontainerregistry.SKUNameStandard),\n\t\t// \t\t\t\tTier: to.Ptr(armcontainerregistry.SKUTierStandard),\n\t\t// \t\t\t},\n\t\t// \t}},\n\t\t// }\n\t}\n}",
"func (m *MockRepoClient) ListLicenses() ([]clients.License, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"ListLicenses\")\n\tret0, _ := ret[0].([]clients.License)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (a NumberregionsApi) ListAvailablePhoneNumberRegions(filtersCountryCode []string, filtersNpa []string, filtersNxx []string, filtersIsTollFree []string, filtersCity []string, filtersProvincePostalCode []string, filtersCountryPostalCode []string, sortCountryCode string, sortNpa string, sortNxx string, sortIsTollFree string, sortCity string, sortProvincePostalCode string, sortCountryPostalCode string, limit int32, offset int32, fields string, groupBy []string) (*ListPhoneNumbersRegions, *APIResponse, error) {\n\n\tvar localVarHttpMethod = strings.ToUpper(\"Get\")\n\t// create path and map variables\n\tlocalVarPath := a.Configuration.BasePath + \"/phone-numbers/available/regions\"\n\n\tlocalVarHeaderParams := make(map[string]string)\n\tlocalVarQueryParams := url.Values{}\n\tlocalVarFormParams := make(map[string]string)\n\tvar localVarPostBody interface{}\n\tvar localVarFileName string\n\tvar localVarFileBytes []byte\n\t// authentication '(apiKey)' required\n\t// set key with prefix in header\n\tlocalVarHeaderParams[\"Authorization\"] = a.Configuration.GetAPIKeyWithPrefix(\"Authorization\")\n\t// add default headers if any\n\tfor key := range a.Configuration.DefaultHeader {\n\t\tlocalVarHeaderParams[key] = a.Configuration.DefaultHeader[key]\n\t}\n\tvar filtersCountryCodeCollectionFormat = \"multi\"\n\tlocalVarQueryParams.Add(\"filters[country_code]\", a.Configuration.APIClient.ParameterToString(filtersCountryCode, filtersCountryCodeCollectionFormat))\n\n\tvar filtersNpaCollectionFormat = \"multi\"\n\tlocalVarQueryParams.Add(\"filters[npa]\", a.Configuration.APIClient.ParameterToString(filtersNpa, filtersNpaCollectionFormat))\n\n\tvar filtersNxxCollectionFormat = \"multi\"\n\tlocalVarQueryParams.Add(\"filters[nxx]\", a.Configuration.APIClient.ParameterToString(filtersNxx, filtersNxxCollectionFormat))\n\n\tvar filtersIsTollFreeCollectionFormat = \"multi\"\n\tlocalVarQueryParams.Add(\"filters[is_toll_free]\", a.Configuration.APIClient.ParameterToString(filtersIsTollFree, filtersIsTollFreeCollectionFormat))\n\n\tvar filtersCityCollectionFormat = \"multi\"\n\tlocalVarQueryParams.Add(\"filters[city]\", a.Configuration.APIClient.ParameterToString(filtersCity, filtersCityCollectionFormat))\n\n\tvar filtersProvincePostalCodeCollectionFormat = \"multi\"\n\tlocalVarQueryParams.Add(\"filters[province_postal_code]\", a.Configuration.APIClient.ParameterToString(filtersProvincePostalCode, filtersProvincePostalCodeCollectionFormat))\n\n\tvar filtersCountryPostalCodeCollectionFormat = \"csv\"\n\tlocalVarQueryParams.Add(\"filters[country_postal_code]\", a.Configuration.APIClient.ParameterToString(filtersCountryPostalCode, filtersCountryPostalCodeCollectionFormat))\n\n\tlocalVarQueryParams.Add(\"sort[country_code]\", a.Configuration.APIClient.ParameterToString(sortCountryCode, \"\"))\n\tlocalVarQueryParams.Add(\"sort[npa]\", a.Configuration.APIClient.ParameterToString(sortNpa, \"\"))\n\tlocalVarQueryParams.Add(\"sort[nxx]\", a.Configuration.APIClient.ParameterToString(sortNxx, \"\"))\n\tlocalVarQueryParams.Add(\"sort[is_toll_free]\", a.Configuration.APIClient.ParameterToString(sortIsTollFree, \"\"))\n\tlocalVarQueryParams.Add(\"sort[city]\", a.Configuration.APIClient.ParameterToString(sortCity, \"\"))\n\tlocalVarQueryParams.Add(\"sort[province_postal_code]\", a.Configuration.APIClient.ParameterToString(sortProvincePostalCode, \"\"))\n\tlocalVarQueryParams.Add(\"sort[country_postal_code]\", a.Configuration.APIClient.ParameterToString(sortCountryPostalCode, \"\"))\n\tlocalVarQueryParams.Add(\"limit\", a.Configuration.APIClient.ParameterToString(limit, \"\"))\n\tlocalVarQueryParams.Add(\"offset\", a.Configuration.APIClient.ParameterToString(offset, \"\"))\n\tlocalVarQueryParams.Add(\"fields\", a.Configuration.APIClient.ParameterToString(fields, \"\"))\n\tvar groupByCollectionFormat = \"csv\"\n\tlocalVarQueryParams.Add(\"group_by\", a.Configuration.APIClient.ParameterToString(groupBy, groupByCollectionFormat))\n\n\n\tclearEmptyParams(localVarQueryParams)\n\n\t// to determine the Content-Type header\n\tlocalVarHttpContentTypes := []string{ \"application/json\", }\n\n\t// set Content-Type header\n\tlocalVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)\n\tif localVarHttpContentType != \"\" {\n\t\tlocalVarHeaderParams[\"Content-Type\"] = localVarHttpContentType\n\t}\n\t// to determine the Accept header\n\tlocalVarHttpHeaderAccepts := []string{\n\t\t\"application/json\",\n\t\t}\n\n\t// set Accept header\n\tlocalVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)\n\tif localVarHttpHeaderAccept != \"\" {\n\t\tlocalVarHeaderParams[\"Accept\"] = localVarHttpHeaderAccept\n\t}\n\tvar successPayload = new(ListPhoneNumbersRegions)\n\tlocalVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)\n\n\tvar localVarURL, _ = url.Parse(localVarPath)\n\tlocalVarURL.RawQuery = localVarQueryParams.Encode()\n\tvar localVarAPIResponse = &APIResponse{Operation: \"ListAvailablePhoneNumberRegions\", Method: localVarHttpMethod, RequestURL: localVarURL.String()}\n\tif localVarHttpResponse != nil {\n\t\tlocalVarAPIResponse.Response = localVarHttpResponse.RawResponse\n\t\tlocalVarAPIResponse.Payload = localVarHttpResponse.Body()\n\t}\n\n\tif err != nil {\n\t\treturn successPayload, localVarAPIResponse, err\n\t}\n\terr = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)\n\treturn successPayload, localVarAPIResponse, err\n}",
"func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager {\n\turl := listURL(client)\n\tif opts != nil {\n\t\tquery, err := opts.ToRegionListQuery()\n\t\tif err != nil {\n\t\t\treturn pagination.Pager{Err: err}\n\t\t}\n\t\turl += query\n\t}\n\treturn pagination.NewPager(client, url, func(r pagination.PageResult) pagination.Page {\n\t\treturn RegionPage{pagination.LinkedPageBase{PageResult: r}}\n\t})\n}",
"func listInfo() ([]*RegionInfo, error) {\n // ex-1)\n // /cloud-info-spaces/regions/aws_region01/AWS/region [ap-northeast-2]\n // ex-2)\n // /cloud-info-spaces/regions/gcp_region02/GCP/region [us-east1]\n // /cloud-info-spaces/regions/gcp_region02/GCP/zone [us-east1-c]\n\n\n key := \"/cloud-info-spaces/regions\"\n keyValueList, err := store.GetList(key, true)\n if err != nil {\n return nil, err\n }\n\n var regionInfoList []*RegionInfo\n\tvar inKeyValueList []icbs.KeyValue\n\tprevRegionName := \"\"\n\tprevProviderName := \"\"\n for _, kv := range keyValueList {\n\n\t\tregionName := utils.GetNodeValue(kv.Key, 3)\n\t\tproviderName := utils.GetNodeValue(kv.Key, 4)\n\n\t\tif prevRegionName==\"\" || regionName == prevRegionName {\n\t\t\tprevRegionName = regionName\n\t\t\tprevProviderName = providerName\n\t\t\tkeyValue := icbs.KeyValue{utils.GetNodeValue(kv.Key, 5), kv.Value}\n\t\t\tinKeyValueList = append(inKeyValueList, keyValue)\n\t\t} else {\n\t\t\t// insert prev RegionInfo\n\t\t\trgnInfo := &RegionInfo{prevRegionName, prevProviderName, inKeyValueList}\n\t\t\tregionInfoList = append(regionInfoList, rgnInfo)\n\n\t\t\tprevRegionName = regionName\n\t\t\tprevProviderName = providerName\n\t\t\tinKeyValueList = nil\n\t\t\tkeyValue := icbs.KeyValue{utils.GetNodeValue(kv.Key, 5), kv.Value}\n\t\t\tinKeyValueList = append(inKeyValueList, keyValue)\n\t\t}\n\n }\n\n\tif len(keyValueList) > 0 {\n\t\t// insert last RegionInfo\n\t\trgnInfo := &RegionInfo{prevRegionName, prevProviderName, inKeyValueList}\n\t\tregionInfoList = append(regionInfoList, rgnInfo)\n\t}\n\n return regionInfoList, nil\n}",
"func (m *MockTagsService) List() (do.Tags, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"List\")\n\tret0, _ := ret[0].(do.Tags)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (lb *Leaderboard) Regions() *RegionCollection {\n\treturn toRegionCollection(lb.RegionsData)\n}",
"func (m *MockConfigStoreSvc) ListEnvironments(appName string) ([]*config.Environment, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"ListEnvironments\", appName)\n\tret0, _ := ret[0].([]*config.Environment)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func fakeListRegionalDisk(cfg *config.Config, name string, region string, policies []string, callCount int) gcpRequest {\n\tscope := fmt.Sprintf(\"regions/%s\", region)\n\tdisk := fakeRegionalDisk(cfg, name, region, policies)\n\treturn fakeDiskAggregatedListRequest(cfg, scope, disk, callCount)\n}",
"func (a *AzureInfoer) GetRegions() (map[string]string, error) {\n\n\tallLocations := make(map[string]string)\n\tsupLocations := make(map[string]string)\n\n\t// retrieve all locations for the subscription id (some of them may not be supported by the required provider\n\tif locations, err := a.subscriptionsClient.ListLocations(context.TODO(), a.subscriptionId); err == nil {\n\t\t// fill up the map: DisplayName - > Name\n\t\tfor _, loc := range *locations.Value {\n\t\t\tallLocations[*loc.DisplayName] = *loc.Name\n\t\t}\n\t} else {\n\t\tlog.Errorf(\"error while retrieving azure locations. err: %s\", err.Error())\n\t\treturn nil, err\n\t}\n\n\t// identify supported locations for the namespace and resource type\n\tconst (\n\t\tproviderNamespace = \"Microsoft.Compute\"\n\t\tresourceType = \"locations/vmSizes\"\n\t)\n\n\tif providers, err := a.providersClient.Get(context.TODO(), providerNamespace, \"\"); err == nil {\n\t\tfor _, pr := range *providers.ResourceTypes {\n\t\t\tif *pr.ResourceType == resourceType {\n\t\t\t\tfor _, displName := range *pr.Locations {\n\t\t\t\t\tif loc, ok := allLocations[displName]; ok {\n\t\t\t\t\t\tlog.Debugf(\"found supported location. [name, display name] = [%s, %s]\", loc, displName)\n\t\t\t\t\t\tsupLocations[loc] = displName\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.Debugf(\"unsupported location. [name, display name] = [%s, %s]\", loc, displName)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t} else {\n\t\tlog.Errorf(\"error while retrieving supported locations for provider: %s. err: %s\", providerNamespace, err.Error())\n\t\treturn nil, err\n\t}\n\n\treturn supLocations, nil\n}",
"func (m *MockConfigAdminServiceServer) ListRegisteredModels(arg0 *ListModelsRequest, arg1 ConfigAdminService_ListRegisteredModelsServer) error {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"ListRegisteredModels\", arg0, arg1)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"func (m *MockProduct) ListEditorsForAggregation(arg0 context.Context, arg1 []string) ([]string, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"ListEditorsForAggregation\", arg0, arg1)\n\tret0, _ := ret[0].([]string)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (client *VirtualMachineScaleSetsClientMock) List(ctx context.Context, resourceGroupName string) (result []compute.VirtualMachineScaleSet, rerr *retry.Error) {\n\tclient.mutex.Lock()\n\tdefer client.mutex.Unlock()\n\n\tresult = []compute.VirtualMachineScaleSet{}\n\tif _, ok := client.FakeStore[resourceGroupName]; ok {\n\t\tfor _, v := range client.FakeStore[resourceGroupName] {\n\t\t\tresult = append(result, v)\n\t\t}\n\t}\n\n\treturn result, nil\n}",
"func (m *MockRegionAPIClassDao) GetPrefixesByClass(apiClass string) ([]*model.RegionAPIClass, error) {\n\tret := m.ctrl.Call(m, \"GetPrefixesByClass\", apiClass)\n\tret0, _ := ret[0].([]*model.RegionAPIClass)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (m *MockIDistributedEnforcer) GetAllObjects() []string {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"GetAllObjects\")\n\tret0, _ := ret[0].([]string)\n\treturn ret0\n}",
"func GetRegionAZs(region string, azList *AZs) error {\n\n\tsess := session.Must(session.NewSession(&aws.Config{Region: aws.String(region)}))\n\tsvc := ec2.New(sess)\n\n\t// Create a context with a timeout that will abort the request if it takes too long\n\tctx, cancelFn := context.WithTimeout(context.Background(), time.Second*5)\n\tdefer cancelFn()\n\n\tresult, err := svc.DescribeAvailabilityZonesWithContext(ctx, nil)\n\n\tif err != nil {\n\t\t/*terminal.ErrorLine(\"Region AZ request timeout in [\" + region + \"], skipping...\")*/\n\t\treturn nil\n\t}\n\n\tazs := make(AZs, len(result.AvailabilityZones))\n\tfor i, az := range result.AvailabilityZones {\n\t\tazs[i] = AZ{\n\t\t\tName: aws.StringValue(az.ZoneName),\n\t\t\tRegion: aws.StringValue(az.RegionName),\n\t\t\tState: aws.StringValue(az.State),\n\t\t}\n\t}\n\n\t*azList = append(*azList, azs[:]...)\n\n\treturn nil\n}",
"func (m *MockInterface) GatewayDomains() []string {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"GatewayDomains\")\n\tret0, _ := ret[0].([]string)\n\treturn ret0\n}",
"func (m *MockProduct) ListEditorsScope(arg0 context.Context, arg1 []string) ([]string, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"ListEditorsScope\", arg0, arg1)\n\tret0, _ := ret[0].([]string)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (a *AzureInfoer) GetRegions(service string) (map[string]string, error) {\n\tlogger := a.log.WithFields(map[string]interface{}{\"service\": service})\n\tlogger.Debug(\"getting locations\")\n\n\tallLocations := make(map[string]string)\n\tsupLocations := make(map[string]string)\n\n\t// retrieve all locations for the subscription id (some of them may not be supported by the required provider)\n\tif locations, err := a.subscriptionsClient.ListLocations(context.TODO(), a.subscriptionId); err == nil {\n\t\t// fill up the map: DisplayName - > Name\n\t\tfor _, loc := range *locations.Value {\n\t\t\tallLocations[*loc.DisplayName] = *loc.Name\n\t\t}\n\t} else {\n\t\tlogger.Error(\"error while retrieving azure locations\")\n\t\treturn nil, err\n\t}\n\n\t// identify supported locations for the namespace and resource type\n\tconst (\n\t\tproviderNamespaceForCompute = \"Microsoft.Compute\"\n\t\tresourceTypeForCompute = \"locations/vmSizes\"\n\t\tproviderNamespaceForAks = \"Microsoft.ContainerService\"\n\t\tresourceTypeForAks = \"managedClusters\"\n\t)\n\n\tswitch service {\n\tcase \"aks\":\n\t\tif providers, err := a.providersClient.Get(context.TODO(), providerNamespaceForAks, \"\"); err == nil {\n\t\t\tfor _, pr := range *providers.ResourceTypes {\n\t\t\t\tif *pr.ResourceType == resourceTypeForAks {\n\t\t\t\t\tfor _, displName := range *pr.Locations {\n\t\t\t\t\t\tif loc, ok := allLocations[displName]; ok {\n\t\t\t\t\t\t\tsupLocations[loc] = displName\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlogger.Debug(\"unsupported location\", map[string]interface{}{\"name\": loc, \"displayname\": displName})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tlogger.Error(\"failed to retrieve supported locations\", map[string]interface{}{\"resource\": resourceTypeForAks})\n\t\t\treturn nil, err\n\t\t}\n\n\t\tlogger.Debug(\"found supported locations\", map[string]interface{}{\"numberOfLocations\": len(supLocations)})\n\t\treturn supLocations, nil\n\tdefault:\n\t\tif providers, err := a.providersClient.Get(context.TODO(), providerNamespaceForCompute, \"\"); err == nil {\n\t\t\tfor _, pr := range *providers.ResourceTypes {\n\t\t\t\tif *pr.ResourceType == resourceTypeForCompute {\n\t\t\t\t\tfor _, displName := range *pr.Locations {\n\t\t\t\t\t\tif loc, ok := allLocations[displName]; ok {\n\t\t\t\t\t\t\tsupLocations[loc] = displName\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlogger.Debug(\"unsupported location\", map[string]interface{}{\"name\": loc, \"displayname\": displName})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tlogger.Error(\"failed to retrieve supported locations\", map[string]interface{}{\"resource\": resourceTypeForCompute})\n\t\t\treturn nil, err\n\t\t}\n\n\t\tlogger.Debug(\"found supported locations\", map[string]interface{}{\"numberOfLocations\": len(supLocations)})\n\t\treturn supLocations, nil\n\t}\n}",
"func CreateGetRegionListResponse() (response *GetRegionListResponse) {\n\tresponse = &GetRegionListResponse{\n\t\tBaseResponse: &responses.BaseResponse{},\n\t}\n\treturn\n}",
"func (m *MockProduct) ListAggregations(arg0 context.Context, arg1 db.ListAggregationsParams) ([]db.ListAggregationsRow, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"ListAggregations\", arg0, arg1)\n\tret0, _ := ret[0].([]db.ListAggregationsRow)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func mockedVirtualMachines(reqUrl string) (virtualMachines []armcompute.VirtualMachine, err error) {\n\tvar mockedVirtualMachinesResponse mockedVirtualMachinesResponse\n\n\tm := newMockComputeSender()\n\treq, err := http.NewRequest(\"GET\", reqUrl, nil)\n\tif err != nil {\n\t\treturn virtualMachines, fmt.Errorf(\"error creating new request: %w\", err)\n\t}\n\tresp, err := m.Do(req)\n\tif err != nil || resp.StatusCode == 404 {\n\t\treturn virtualMachines, fmt.Errorf(\"error getting mock http response: %w\", err)\n\t}\n\n\tdefer func(Body io.ReadCloser) {\n\t\terr := Body.Close()\n\t\tif err != nil {\n\t\t\tfmt.Println(\"error io.ReadCloser: %w\", err)\n\t\t}\n\t}(resp.Body)\n\tresponseBody, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn virtualMachines, fmt.Errorf(\"error read all: %w\", err)\n\t}\n\terr = json.Unmarshal(responseBody, &mockedVirtualMachinesResponse)\n\tif err != nil {\n\t\treturn virtualMachines, fmt.Errorf(\"error unmarshalling: %w\", err)\n\t}\n\n\tvirtualMachines = mockedVirtualMachinesResponse.Value\n\n\treturn virtualMachines, nil\n}",
"func (m *MockService) List(arg0 context.Context, arg1 *pipeline.ListPayload) ([]*pipeline.EnduroStoredPipeline, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"List\", arg0, arg1)\n\tret0, _ := ret[0].([]*pipeline.EnduroStoredPipeline)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (m *VirtualEndpoint) GetSupportedRegions()([]CloudPcSupportedRegionable) {\n val, err := m.GetBackingStore().Get(\"supportedRegions\")\n if err != nil {\n panic(err)\n }\n if val != nil {\n return val.([]CloudPcSupportedRegionable)\n }\n return nil\n}",
"func (m *MockList) Intersect(other List) (List, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"Intersect\", other)\n\tret0, _ := ret[0].(List)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func Regions(dbCfg db.Config) ([]models.Region, error) {\n\tvar regions []models.Region\n\n\tdatabase, err := db.OpenDatabase(dbCfg)\n\tdefer database.Close()\n\n\tif err != nil {\n\t\treturn regions, err\n\t}\n\n\tregions = database.NewRegionsQuery().Get()\n\treturn regions, nil\n}",
"func (mc *MockCluster) ScanRegions(startKey []byte, limit int) []*core.RegionInfo {\n\treturn mc.Regions.ScanRange(startKey, limit)\n}",
"func (a *CloudProviderCredentialsApiService) ListAWSRegions(ctx _context.Context) ApiListAWSRegionsRequest {\n\treturn ApiListAWSRegionsRequest{\n\t\tApiService: a,\n\t\tctx: ctx,\n\t}\n}",
"func (m *MockVirtualDestinationSet) List(filterResource ...func(*v1beta1.VirtualDestination) bool) []*v1beta1.VirtualDestination {\n\tm.ctrl.T.Helper()\n\tvarargs := []interface{}{}\n\tfor _, a := range filterResource {\n\t\tvarargs = append(varargs, a)\n\t}\n\tret := m.ctrl.Call(m, \"List\", varargs...)\n\tret0, _ := ret[0].([]*v1beta1.VirtualDestination)\n\treturn ret0\n}",
"func (g *Game) Regions() (*RegionCollection, *Error) {\n\tvar result *RegionCollection\n\n\tswitch asserted := g.RegionsData.(type) {\n\t// list of IDs (strings)\n\tcase []interface{}:\n\t\tids, err := g.RegionIDs()\n\t\tif err != nil {\n\t\t\treturn result, err\n\t\t}\n\n\t\tresult = &RegionCollection{}\n\n\t\tfor _, id := range ids {\n\t\t\tregion, err := RegionByID(id)\n\t\t\tif err != nil {\n\t\t\t\treturn result, err\n\t\t\t}\n\n\t\t\tresult.Data = append(result.Data, *region)\n\t\t}\n\n\t// sub-resource due to embeds, aka \"{data:....}\"\n\tcase map[string]interface{}:\n\t\tresult = toRegionCollection(asserted)\n\t}\n\n\treturn result, nil\n}",
"func (m *MockResponseHandler) TargetList() {\n\tm.ctrl.T.Helper()\n\tm.ctrl.Call(m, \"TargetList\")\n}",
"func (_m *MockRepository) List(scope *jsonapi.Scope) *unidb.Error {\n\tret := _m.Called(scope)\n\n\tvar r0 *unidb.Error\n\tif rf, ok := ret.Get(0).(func(*jsonapi.Scope) *unidb.Error); ok {\n\t\tr0 = rf(scope)\n\t} else {\n\t\tif ret.Get(0) != nil {\n\t\t\tr0 = ret.Get(0).(*unidb.Error)\n\t\t}\n\t}\n\n\treturn r0\n}",
"func (a *API) ListRegions() ([]string, error) {\n\trequest := ecs.CreateDescribeRegionsRequest()\n\trequest.Scheme = \"https\"\n\n\tresponse, err := a.ecs.DescribeRegions(request)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"describing regions: %v\", err)\n\t}\n\tret := make([]string, 0, len(response.Regions.Region))\n\tfor _, region := range response.Regions.Region {\n\t\tret = append(ret, region.RegionId)\n\t}\n\tsort.Strings(ret)\n\treturn ret, nil\n}",
"func (m *MockEndpointsDao) List(sid string) ([]*model.Endpoint, error) {\n\tret := m.ctrl.Call(m, \"List\", sid)\n\tret0, _ := ret[0].([]*model.Endpoint)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (m *MockappResourcesGetter) GetAppResourcesByRegion(app *config.Application, region string) (*stack.AppRegionalResources, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"GetAppResourcesByRegion\", app, region)\n\tret0, _ := ret[0].(*stack.AppRegionalResources)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (m *MockIApi) ListAllInvoices(arg0 *chartmogul.ListAllInvoicesParams) (*chartmogul.Invoices, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"ListAllInvoices\", arg0)\n\tret0, _ := ret[0].(*chartmogul.Invoices)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func TestIntegrationNew(t *testing.T) {\n\ttests := []struct {\n\t\tdefaultRegion string\n\t\tregions []string\n\t}{\n\t\t{genericRegions[0], genericRegions},\n\t}\n\tfor _, tt := range tests {\n\t\ttc := tt\n\t\tt.Run(\"test with 2 regions\", func(t *testing.T) {\n\t\t\ts := New(tc.defaultRegion, tc.regions)\n\t\t\tif s.defaultRegion != tc.defaultRegion {\n\t\t\t\tt.Fatalf(\"defaultRegion invalid expected: %s, got: %s\", tc.defaultRegion, s.defaultRegion)\n\t\t\t}\n\t\t\tif len(s.regions) != len(tc.regions) {\n\t\t\t\tt.Fatalf(\"regions length invalid, expected: %d, got: %d\", len(tc.regions), len(s.regions))\n\t\t\t}\n\t\t})\n\t}\n}",
"func GetLocationListMocked(t *testing.T, locationsIn []*types.Location) []*types.Location {\n\n\tassert := assert.New(t)\n\n\t// wire up\n\tcs := &utils.MockConcertoService{}\n\tds, err := NewLocationService(cs)\n\tassert.Nil(err, \"Couldn't load location service\")\n\tassert.NotNil(ds, \"Location service not instanced\")\n\n\t// to json\n\tdIn, err := json.Marshal(locationsIn)\n\tassert.Nil(err, \"Location test data corrupted\")\n\n\t// call service\n\tcs.On(\"Get\", \"/wizard/locations\").Return(dIn, 200, nil)\n\tlocationsOut, err := ds.GetLocationList()\n\tassert.Nil(err, \"Error getting location list\")\n\tassert.Equal(locationsIn, locationsOut, \"GetLocationList returned different locations\")\n\n\treturn locationsOut\n}",
"func (m *MockAdminSectionRepo) GetAllSections(arg0 context.Context, arg1 int) ([]models.Section, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"GetAllSections\", arg0, arg1)\n\tret0, _ := ret[0].([]models.Section)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (m *MockService) GetList(paginator, size int64) ([]*model.Pokemon, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"GetList\", paginator, size)\n\tret0, _ := ret[0].([]*model.Pokemon)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func testMakeBucketRegionsV2() {\n\t// initialize logging params\n\tstartTime := time.Now()\n\ttestName := getFuncName()\n\tfunction := \"MakeBucket(bucketName, region)\"\n\targs := map[string]interface{}{\n\t\t\"bucketName\": \"\",\n\t\t\"region\": \"eu-west-1\",\n\t}\n\n\t// Seed random based on current time.\n\trand.Seed(time.Now().Unix())\n\n\t// Instantiate new minio client object.\n\tc, err := minio.New(os.Getenv(serverEndpoint),\n\t\t&minio.Options{\n\t\t\tCreds: credentials.NewStaticV2(os.Getenv(accessKey), os.Getenv(secretKey), \"\"),\n\t\t\tSecure: mustParseBool(os.Getenv(enableHTTPS)),\n\t\t})\n\tif err != nil {\n\t\tlogError(testName, function, args, startTime, \"\", \"MinIO v2 client object creation failed\", err)\n\t\treturn\n\t}\n\n\t// Enable tracing, write to stderr.\n\t// c.TraceOn(os.Stderr)\n\n\t// Set user agent.\n\tc.SetAppInfo(\"MinIO-go-FunctionalTest\", \"0.1.0\")\n\n\t// Generate a new random bucket name.\n\tbucketName := randString(60, rand.NewSource(time.Now().UnixNano()), \"minio-go-test-\")\n\targs[\"bucketName\"] = bucketName\n\n\t// Make a new bucket in 'eu-central-1'.\n\tif err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: \"eu-west-1\"}); err != nil {\n\t\tlogError(testName, function, args, startTime, \"\", \"MakeBucket failed\", err)\n\t\treturn\n\t}\n\n\tif err = cleanupBucket(bucketName, c); err != nil {\n\t\tlogError(testName, function, args, startTime, \"\", \"CleanupBucket failed while removing bucket recursively\", err)\n\t\treturn\n\t}\n\n\t// Make a new bucket with '.' in its name, in 'us-west-2'. This\n\t// request is internally staged into a path style instead of\n\t// virtual host style.\n\tif err = c.MakeBucket(context.Background(), bucketName+\".withperiod\", minio.MakeBucketOptions{Region: \"us-west-2\"}); err != nil {\n\t\targs[\"bucketName\"] = bucketName + \".withperiod\"\n\t\targs[\"region\"] = \"us-west-2\"\n\t\tlogError(testName, function, args, startTime, \"\", \"MakeBucket test with a bucket name with period, '.', failed\", err)\n\t\treturn\n\t}\n\n\t// Delete all objects and buckets\n\tif err = cleanupBucket(bucketName+\".withperiod\", c); err != nil {\n\t\tlogError(testName, function, args, startTime, \"\", \"CleanupBucket failed while removing bucket recursively\", err)\n\t\treturn\n\t}\n\n\tsuccessLogger(testName, function, args, startTime).Info()\n}",
"func (m *MockHTTP) List(w http.ResponseWriter, r *http.Request) {\n\tm.ctrl.T.Helper()\n\tm.ctrl.Call(m, \"List\", w, r)\n}",
"func (m *MockSFNAPI) ListStateMachines(arg0 *sfn.ListStateMachinesInput) (*sfn.ListStateMachinesOutput, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"ListStateMachines\", arg0)\n\tret0, _ := ret[0].(*sfn.ListStateMachinesOutput)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func ExampleRegistriesClient_NewListByResourceGroupPager() {\n\tcred, err := azidentity.NewDefaultAzureCredential(nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to obtain a credential: %v\", err)\n\t}\n\tctx := context.Background()\n\tclientFactory, err := armcontainerregistry.NewClientFactory(\"<subscription-id>\", cred, nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to create client: %v\", err)\n\t}\n\tpager := clientFactory.NewRegistriesClient().NewListByResourceGroupPager(\"myResourceGroup\", nil)\n\tfor pager.More() {\n\t\tpage, err := pager.NextPage(ctx)\n\t\tif err != nil {\n\t\t\tlog.Fatalf(\"failed to advance page: %v\", err)\n\t\t}\n\t\tfor _, v := range page.Value {\n\t\t\t// You could use page here. We use blank identifier for just demo purposes.\n\t\t\t_ = v\n\t\t}\n\t\t// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.\n\t\t// page.RegistryListResult = armcontainerregistry.RegistryListResult{\n\t\t// \tValue: []*armcontainerregistry.Registry{\n\t\t// \t\t{\n\t\t// \t\t\tName: to.Ptr(\"myRegistry\"),\n\t\t// \t\t\tType: to.Ptr(\"Microsoft.ContainerRegistry/registries\"),\n\t\t// \t\t\tID: to.Ptr(\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry\"),\n\t\t// \t\t\tLocation: to.Ptr(\"westus\"),\n\t\t// \t\t\tTags: map[string]*string{\n\t\t// \t\t\t\t\"key\": to.Ptr(\"value\"),\n\t\t// \t\t\t},\n\t\t// \t\t\tProperties: &armcontainerregistry.RegistryProperties{\n\t\t// \t\t\t\tAdminUserEnabled: to.Ptr(false),\n\t\t// \t\t\t\tAnonymousPullEnabled: to.Ptr(false),\n\t\t// \t\t\t\tCreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, \"2021-06-15T21:38:26.1537861Z\"); return t}()),\n\t\t// \t\t\t\tDataEndpointEnabled: to.Ptr(false),\n\t\t// \t\t\t\tDataEndpointHostNames: []*string{\n\t\t// \t\t\t\t},\n\t\t// \t\t\t\tEncryption: &armcontainerregistry.EncryptionProperty{\n\t\t// \t\t\t\t\tStatus: to.Ptr(armcontainerregistry.EncryptionStatusDisabled),\n\t\t// \t\t\t\t},\n\t\t// \t\t\t\tLoginServer: to.Ptr(\"myRegistry.azurecr-test.io\"),\n\t\t// \t\t\t\tNetworkRuleBypassOptions: to.Ptr(armcontainerregistry.NetworkRuleBypassOptionsAzureServices),\n\t\t// \t\t\t\tNetworkRuleSet: &armcontainerregistry.NetworkRuleSet{\n\t\t// \t\t\t\t\tDefaultAction: to.Ptr(armcontainerregistry.DefaultActionAllow),\n\t\t// \t\t\t\t\tIPRules: []*armcontainerregistry.IPRule{\n\t\t// \t\t\t\t\t},\n\t\t// \t\t\t\t},\n\t\t// \t\t\t\tPolicies: &armcontainerregistry.Policies{\n\t\t// \t\t\t\t\tExportPolicy: &armcontainerregistry.ExportPolicy{\n\t\t// \t\t\t\t\t\tStatus: to.Ptr(armcontainerregistry.ExportPolicyStatusEnabled),\n\t\t// \t\t\t\t\t},\n\t\t// \t\t\t\t\tQuarantinePolicy: &armcontainerregistry.QuarantinePolicy{\n\t\t// \t\t\t\t\t\tStatus: to.Ptr(armcontainerregistry.PolicyStatusDisabled),\n\t\t// \t\t\t\t\t},\n\t\t// \t\t\t\t\tRetentionPolicy: &armcontainerregistry.RetentionPolicy{\n\t\t// \t\t\t\t\t\tDays: to.Ptr[int32](7),\n\t\t// \t\t\t\t\t\tLastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, \"2021-06-15T21:40:12.8506835+00:00\"); return t}()),\n\t\t// \t\t\t\t\t\tStatus: to.Ptr(armcontainerregistry.PolicyStatusDisabled),\n\t\t// \t\t\t\t\t},\n\t\t// \t\t\t\t\tTrustPolicy: &armcontainerregistry.TrustPolicy{\n\t\t// \t\t\t\t\t\tType: to.Ptr(armcontainerregistry.TrustPolicyTypeNotary),\n\t\t// \t\t\t\t\t\tStatus: to.Ptr(armcontainerregistry.PolicyStatusDisabled),\n\t\t// \t\t\t\t\t},\n\t\t// \t\t\t\t},\n\t\t// \t\t\t\tPrivateEndpointConnections: []*armcontainerregistry.PrivateEndpointConnection{\n\t\t// \t\t\t\t},\n\t\t// \t\t\t\tProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),\n\t\t// \t\t\t\tPublicNetworkAccess: to.Ptr(armcontainerregistry.PublicNetworkAccessEnabled),\n\t\t// \t\t\t\tZoneRedundancy: to.Ptr(armcontainerregistry.ZoneRedundancyDisabled),\n\t\t// \t\t\t},\n\t\t// \t\t\tSKU: &armcontainerregistry.SKU{\n\t\t// \t\t\t\tName: to.Ptr(armcontainerregistry.SKUNameStandard),\n\t\t// \t\t\t\tTier: to.Ptr(armcontainerregistry.SKUTierStandard),\n\t\t// \t\t\t},\n\t\t// \t}},\n\t\t// }\n\t}\n}",
"func (m *MockServersService) List() (bl.Servers, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"List\")\n\tret0, _ := ret[0].(bl.Servers)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (m *VirtualEndpoint) SetSupportedRegions(value []CloudPcSupportedRegionable)() {\n err := m.GetBackingStore().Set(\"supportedRegions\", value)\n if err != nil {\n panic(err)\n }\n}",
"func (m *MockProductUC) List(arg0 context.Context, arg1, arg2 int) ([]*entity.Product, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"List\", arg0, arg1, arg2)\n\tret0, _ := ret[0].([]*entity.Product)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (m *MockstackDescriber) Resources() ([]*stack0.Resource, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"Resources\")\n\tret0, _ := ret[0].([]*stack0.Resource)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (m *MockInformation) ListAdjacentLocations() []string {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"ListAdjacentLocations\")\n\tret0, _ := ret[0].([]string)\n\treturn ret0\n}",
"func (_m *Usecase) List(ctx context.Context,page, limit, offset int, search string,token string,trans bool,exp bool,merchantIds []string)(*models.PromoWithPagination,error) {\n\tret := _m.Called(ctx, page, limit, offset,search,token,trans,exp,merchantIds)\n\n\tvar r0 *models.PromoWithPagination\n\tif rf, ok := ret.Get(0).(func(context.Context, int, int, int,string,string,bool,bool,[]string) *models.PromoWithPagination); ok {\n\t\tr0 = rf(ctx, page, limit, offset,search,token,trans,exp,merchantIds)\n\t} else {\n\t\tif ret.Get(0) != nil {\n\t\t\tr0 = ret.Get(0).(*models.PromoWithPagination)\n\t\t}\n\t}\n\n\tvar r1 error\n\tif rf, ok := ret.Get(1).(func(context.Context, int, int, int,string,string,bool,bool,[]string) error); ok {\n\t\tr1 = rf(ctx, page, limit, offset,search,token,trans,exp,merchantIds)\n\t} else {\n\t\tr1 = ret.Error(1)\n\t}\n\n\treturn r0, r1\n}",
"func GetVPCListMocked(t *testing.T, vpcsIn []*types.Vpc) []*types.Vpc {\n\n\tassert := assert.New(t)\n\n\t// wire up\n\tcs := &utils.MockConcertoService{}\n\tds, err := NewVPCService(cs)\n\tassert.Nil(err, \"Couldn't load VPC service\")\n\tassert.NotNil(ds, \"VPC service not instanced\")\n\n\t// to json\n\tdIn, err := json.Marshal(vpcsIn)\n\tassert.Nil(err, \"VPC test data corrupted\")\n\n\t// call service\n\tcs.On(\"Get\", \"/network/vpcs\").Return(dIn, 200, nil)\n\tvpcsOut, err := ds.GetVPCList()\n\tassert.Nil(err, \"Error getting VPC list\")\n\tassert.Equal(vpcsIn, vpcsOut, \"GetVPCList returned different VPCs\")\n\n\treturn vpcsOut\n}",
"func (m *MockLicenseDao) ListLicenses() ([]*model.LicenseInfo, error) {\n\tret := m.ctrl.Call(m, \"ListLicenses\")\n\tret0, _ := ret[0].([]*model.LicenseInfo)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (m *MockInterface) List(ctx context.Context, opts metav1.ListOptions) (*v1.PersistentVolumeList, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"List\", ctx, opts)\n\tret0, _ := ret[0].(*v1.PersistentVolumeList)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (m *MockMutableList) Intersect(other List) (List, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"Intersect\", other)\n\tret0, _ := ret[0].(List)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}"
] |
[
"0.7151419",
"0.69930094",
"0.6345857",
"0.62260467",
"0.62117094",
"0.6207775",
"0.61561954",
"0.6110936",
"0.60801184",
"0.59637207",
"0.5915789",
"0.5828484",
"0.57786",
"0.5766324",
"0.57529163",
"0.57484454",
"0.5715083",
"0.57035947",
"0.56904924",
"0.56904536",
"0.56796813",
"0.56726557",
"0.56635314",
"0.5662694",
"0.565991",
"0.56546575",
"0.5650981",
"0.56423247",
"0.56372744",
"0.56329286",
"0.5601727",
"0.55722684",
"0.5572228",
"0.5546824",
"0.55441004",
"0.5532507",
"0.5531795",
"0.5518346",
"0.54799855",
"0.5472417",
"0.54719824",
"0.5454175",
"0.5442869",
"0.5438166",
"0.542907",
"0.5420817",
"0.5418471",
"0.5410427",
"0.53972524",
"0.5391929",
"0.53907174",
"0.53885114",
"0.5385694",
"0.5378582",
"0.537546",
"0.53737485",
"0.534893",
"0.5347757",
"0.5326779",
"0.5306041",
"0.5303206",
"0.5298915",
"0.529454",
"0.5290359",
"0.5284617",
"0.5284076",
"0.52794164",
"0.52784663",
"0.52746636",
"0.52679414",
"0.52615273",
"0.52608454",
"0.52590835",
"0.5252735",
"0.52524054",
"0.5252036",
"0.5251662",
"0.5242212",
"0.5228782",
"0.5225854",
"0.5218892",
"0.5210036",
"0.5205921",
"0.5205364",
"0.52045226",
"0.5201508",
"0.519166",
"0.51826465",
"0.5179571",
"0.51740897",
"0.5172986",
"0.51657945",
"0.51515543",
"0.5151108",
"0.51494163",
"0.5148997",
"0.5148846",
"0.51483095",
"0.51417965",
"0.51317877"
] |
0.81148666
|
0
|
RegionsList indicates an expected call of RegionsList.
|
func (mr *MockRegionsServiceMockRecorder) RegionsList(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegionsList", reflect.TypeOf((*MockRegionsService)(nil).RegionsList), arg0)
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (m *MockRegionsService) RegionsList(arg0 context.Context) ([]scalingo.Region, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"RegionsList\", arg0)\n\tret0, _ := ret[0].([]scalingo.Region)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (client IdentityClient) ListRegions(ctx context.Context) (response ListRegionsResponse, err error) {\n\tvar ociResponse common.OCIResponse\n\tociResponse, err = client.listRegions(ctx)\n\tif err != nil {\n\t\tif ociResponse != nil {\n\t\t\tif httpResponse := ociResponse.HTTPResponse(); httpResponse != nil {\n\t\t\t\topcRequestId := httpResponse.Header.Get(\"opc-request-id\")\n\t\t\t\tresponse = ListRegionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId}\n\t\t\t} else {\n\t\t\t\tresponse = ListRegionsResponse{}\n\t\t\t}\n\t\t}\n\t\treturn\n\t}\n\tif convertedResponse, ok := ociResponse.(ListRegionsResponse); ok {\n\t\tresponse = convertedResponse\n\t} else {\n\t\terr = fmt.Errorf(\"failed to convert OCIResponse into ListRegionsResponse\")\n\t}\n\treturn\n}",
"func (e Endpoints) ListRegions(ctx context.Context, token string) (regions []registry.Region, err error) {\n\trequest := ListRegionsRequest{Token: token}\n\tresponse, err := e.ListRegionsEndpoint(ctx, request)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn response.(ListRegionsResponse).Regions, response.(ListRegionsResponse).Err\n}",
"func (s *AppsServiceOp) ListRegions(ctx context.Context) ([]*AppRegion, *Response, error) {\n\tpath := fmt.Sprintf(\"%s/regions\", appsBasePath)\n\treq, err := s.client.NewRequest(ctx, http.MethodGet, path, nil)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\troot := new(appRegionsRoot)\n\tresp, err := s.client.Do(ctx, req, root)\n\tif err != nil {\n\t\treturn nil, resp, err\n\t}\n\treturn root.Regions, resp, nil\n}",
"func (client IdentityClient) listRegions(ctx context.Context) (common.OCIResponse, error) {\n\thttpRequest := common.MakeDefaultHTTPRequest(http.MethodGet, \"/regions\")\n\tvar err error\n\n\tvar response ListRegionsResponse\n\tvar httpResponse *http.Response\n\thttpResponse, err = client.Call(ctx, &httpRequest)\n\tdefer common.CloseBodyIfValid(httpResponse)\n\tresponse.RawResponse = httpResponse\n\tif err != nil {\n\t\treturn response, err\n\t}\n\n\terr = common.UnmarshalResponse(httpResponse, &response)\n\treturn response, err\n}",
"func (c *Client) ListRegions() (strset.Set, strset.Set, error) {\n\tvar allRegions strset.Set\n\tvar enabledRegions strset.Set\n\n\terr := parallel.RunFirstErr(\n\t\tfunc() error {\n\t\t\tvar err error\n\t\t\tallRegions, err = c.ListAllRegions()\n\t\t\treturn err\n\t\t},\n\t\tfunc() error {\n\t\t\tvar err error\n\t\t\tenabledRegions, err = c.ListEnabledRegions()\n\t\t\treturn err\n\t\t},\n\t)\n\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\treturn allRegions, enabledRegions, nil\n}",
"func checkRegions(regions []string) ([]string, error) {\n\tif regions[0] == \"all\" {\n\t\treturn core.AllowedRegions, nil\n\t}\n\n\tfor _, region := range regions {\n\t\tisValid := false\n\t\tfor _, allowedRegion := range core.AllowedRegions {\n\t\t\tif region == allowedRegion {\n\t\t\t\tisValid = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\tif !isValid {\n\t\t\treturn nil, fmt.Errorf(\"invalid region: %s\", region)\n\t\t}\n\t}\n\n\treturn regions, nil\n}",
"func TestGetAllRegions(t *testing.T) {\n\tawsRegionSample := []string{\"ap-southeast-1\", \"us-west-2\", \"ap-northeast-1\", \"eu-west-2\", \"eu-central-1\"}\n\tawsChinaSample := []string{\"cn-north-1\", \"cn-northwest-1\"}\n\n\tawsRegions := GetAllRegions()\n\tfor _, region := range awsRegionSample {\n\t\tif !stringInSlice(region, awsRegions) {\n\t\t\tt.Errorf(\"Could not find region %s in retrieved list: %v\", region, awsRegions)\n\t\t}\n\t}\n\n\t// Test the same for China\n\tawsRegions = GetAllChinaRegions()\n\tfor _, region := range awsChinaSample {\n\t\tif !stringInSlice(region, awsRegions) {\n\t\t\tt.Errorf(\"Could not find region %s in retrieved list: %v\", region, awsRegions)\n\t\t}\n\t}\n}",
"func (a *API) ListRegions() ([]string, error) {\n\trequest := ecs.CreateDescribeRegionsRequest()\n\trequest.Scheme = \"https\"\n\n\tresponse, err := a.ecs.DescribeRegions(request)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"describing regions: %v\", err)\n\t}\n\tret := make([]string, 0, len(response.Regions.Region))\n\tfor _, region := range response.Regions.Region {\n\t\tret = append(ret, region.RegionId)\n\t}\n\tsort.Strings(ret)\n\treturn ret, nil\n}",
"func (mr *MockClientMockRecorder) DescribeRegions(input interface{}) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"DescribeRegions\", reflect.TypeOf((*MockClient)(nil).DescribeRegions), input)\n}",
"func (client *Client) GetRegionList(request *GetRegionListRequest) (response *GetRegionListResponse, err error) {\n\tresponse = CreateGetRegionListResponse()\n\terr = client.DoAction(request, response)\n\treturn\n}",
"func (s *Service) NewRegionList(c context.Context, plat int8, build int, ver, mobiApp, device, language string) (res []*region.Region, version string, err error) {\n\tip := metadata.String(c, metadata.RemoteIP)\n\tvar (\n\t\thantlanguage = \"hant\"\n\t)\n\tif ok := model.IsOverseas(plat); ok && language != _initlanguage && language != hantlanguage {\n\t\tlanguage = hantlanguage\n\t} else if language == \"\" {\n\t\tlanguage = _initlanguage\n\t}\n\tvar (\n\t\trs = s.cachelist[fmt.Sprintf(_initRegionKey, plat, language)]\n\t\tchild = map[int][]*region.Region{}\n\t\tridtmp = map[string]struct{}{}\n\t\tpids []string\n\t\tauths map[string]*locmdl.Auth\n\t)\n\tfor _, rtmp := range rs {\n\t\tif rtmp.Area != \"\" {\n\t\t\tpids = append(pids, rtmp.Area)\n\t\t}\n\t}\n\tif len(pids) > 0 {\n\t\tauths, _ = s.loc.AuthPIDs(c, strings.Join(pids, \",\"), ip)\n\t}\nLOOP:\n\tfor _, rtmp := range rs {\n\t\tr := ®ion.Region{}\n\t\t*r = *rtmp\n\t\tif _, isgbm := _isBangumiIndex[r.Rid]; isgbm {\n\t\t\tr.IsBangumi = 1\n\t\t}\n\t\tvar tmpl, limitshow bool\n\t\tif limit, ok := s.limitCache[r.ID]; ok {\n\t\t\tfor i, l := range limit {\n\t\t\t\tif i+1 <= len(limit)-1 {\n\t\t\t\t\tif ((l.Condition == \"gt\" && limit[i+1].Condition == \"lt\") && (l.Build < limit[i+1].Build)) ||\n\t\t\t\t\t\t((l.Condition == \"lt\" && limit[i+1].Condition == \"gt\") && (l.Build > limit[i+1].Build)) {\n\t\t\t\t\t\tif (l.Condition == \"gt\" && limit[i+1].Condition == \"lt\") &&\n\t\t\t\t\t\t\t(build > l.Build && build < limit[i+1].Build) {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t} else if (l.Condition == \"lt\" && limit[i+1].Condition == \"gt\") &&\n\t\t\t\t\t\t\t(build < l.Build && build > limit[i+1].Build) {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttmpl = true\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif tmpl {\n\t\t\t\t\tif i == len(limit)-1 {\n\t\t\t\t\t\tlimitshow = true\n\t\t\t\t\t\t// continue LOOP\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\ttmpl = false\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif model.InvalidBuild(build, l.Build, l.Condition) {\n\t\t\t\t\tlimitshow = true\n\t\t\t\t\tcontinue\n\t\t\t\t\t// continue LOOP\n\t\t\t\t} else {\n\t\t\t\t\tlimitshow = false\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif limitshow {\n\t\t\tcontinue LOOP\n\t\t}\n\t\tif auth, ok := auths[r.Area]; ok && auth.Play == locmdl.Forbidden {\n\t\t\tlog.Warn(\"s.invalid area(%v) ip(%v) error(%v)\", r.Area, ip, err)\n\t\t\tcontinue\n\t\t}\n\t\tif isAudit := s.auditRegion(mobiApp, plat, build, r.Rid); isAudit {\n\t\t\tcontinue\n\t\t}\n\t\tif config, ok := s.configCache[r.ID]; ok {\n\t\t\tr.Config = config\n\t\t}\n\t\tkey := fmt.Sprintf(_regionRepeat, r.Rid, r.Reid)\n\t\tif _, ok := ridtmp[key]; !ok {\n\t\t\tridtmp[key] = struct{}{}\n\t\t} else {\n\t\t\tcontinue\n\t\t}\n\t\tif r.Reid != 0 {\n\t\t\tcl, ok := child[r.Reid]\n\t\t\tif !ok {\n\t\t\t\tcl = []*region.Region{}\n\t\t\t}\n\t\t\tcl = append(cl, r)\n\t\t\tchild[r.Reid] = cl\n\t\t} else {\n\t\t\tres = append(res, r)\n\t\t}\n\t}\n\tif len(res) == 0 {\n\t\tres = _emptyRegions\n\t} else {\n\t\tfor _, r := range res {\n\t\t\tr.Children = child[r.Rid]\n\t\t}\n\t}\n\tif version = s.hash(res); version == ver {\n\t\terr = ecode.NotModified\n\t\tres = nil\n\t}\n\treturn\n}",
"func RunAppsListRegions(c *CmdConfig) error {\n\tregions, err := c.Apps().ListRegions()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn c.Display(displayers.AppRegions(regions))\n}",
"func Regions() (names []string) {\n\tif RegionNames == nil {\n\t\tif RegionNames = fetchRegions(); RegionNames == nil {\n\t\t\tlog.Errorf(\"expected (regions) got ()\")\n\t\t\treturn nil\n\t\t}\n\t\tfor _, name := range RegionNames {\n\t\t\tRegionMap[name] = &Region{Name: name}\n\t\t}\n\t}\n\treturn RegionNames\n}",
"func MakeListRegionsEndpoint(s registry.Service) endpoint.Endpoint {\n\treturn func(ctx context.Context, request interface{}) (interface{}, error) {\n\t\treq := request.(ListRegionsRequest)\n\t\tregions, err := s.ListRegions(ctx, req.Token)\n\t\treturn ListRegionsResponse{\n\t\t\tErr: err,\n\t\t\tRegions: regions,\n\t\t}, nil\n\t}\n}",
"func (c *Client) ListEnabledRegions() (strset.Set, error) {\n\tresult, err := c.EC2().DescribeRegions(&ec2.DescribeRegionsInput{\n\t\tAllRegions: aws.Bool(false),\n\t})\n\tif err != nil {\n\t\treturn nil, errors.WithStack(err)\n\t}\n\n\tregions := strset.New()\n\tfor _, region := range result.Regions {\n\t\tif region.RegionName != nil {\n\t\t\tregions.Add(*region.RegionName)\n\t\t}\n\t}\n\n\treturn regions, nil\n}",
"func RunNamespacesListRegions(c *CmdConfig) error {\n\tif len(c.Args) > 0 {\n\t\treturn doctl.NewTooManyArgsErr(c.NS)\n\t}\n\tfmt.Fprintf(c.Out, \"%+v\\n\", getValidRegions())\n\treturn nil\n}",
"func (rs Regions) Validate() error {\n\tif rs == nil || len(rs) == 0 {\n\t\treturn fmt.Errorf(\"Must have at least one region defined\")\n\t}\n\treturn nil\n}",
"func (s stack) ListAvailabilityZones(ctx context.Context) (_ map[string]bool, ferr fail.Error) {\n\tif valid.IsNil(s) {\n\t\treturn nil, fail.InvalidInstanceError()\n\t}\n\n\treturn nil, fail.NotImplementedError(\"implement me\")\n}",
"func GetRegionNameList() (names []string) {\n\tvregions := GetRegionList()\n\tfor _, vregion := range vregions {\n\t\tnames = append(names, aws.StringValue(vregion.RegionName))\n\t}\n\treturn\n}",
"func (a *CloudProviderCredentialsApiService) ListAWSRegions(ctx _context.Context) ApiListAWSRegionsRequest {\n\treturn ApiListAWSRegionsRequest{\n\t\tApiService: a,\n\t\tctx: ctx,\n\t}\n}",
"func (mr *MockKubernetesServiceMockRecorder) GetRegions() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"GetRegions\", reflect.TypeOf((*MockKubernetesService)(nil).GetRegions))\n}",
"func (m *VirtualEndpoint) SetSupportedRegions(value []CloudPcSupportedRegionable)() {\n err := m.GetBackingStore().Set(\"supportedRegions\", value)\n if err != nil {\n panic(err)\n }\n}",
"func (o AccessLevelsAccessLevelBasicConditionOutput) Regions() pulumi.StringArrayOutput {\n\treturn o.ApplyT(func(v AccessLevelsAccessLevelBasicCondition) []string { return v.Regions }).(pulumi.StringArrayOutput)\n}",
"func GetSupportedRegions() map[string]bool {\n\treturn supportedRegions\n}",
"func (m *VirtualEndpoint) GetSupportedRegions()([]CloudPcSupportedRegionable) {\n val, err := m.GetBackingStore().Get(\"supportedRegions\")\n if err != nil {\n panic(err)\n }\n if val != nil {\n return val.([]CloudPcSupportedRegionable)\n }\n return nil\n}",
"func (o AccessLevelBasicConditionOutput) Regions() pulumi.StringArrayOutput {\n\treturn o.ApplyT(func(v AccessLevelBasicCondition) []string { return v.Regions }).(pulumi.StringArrayOutput)\n}",
"func listInfo() ([]*RegionInfo, error) {\n // ex-1)\n // /cloud-info-spaces/regions/aws_region01/AWS/region [ap-northeast-2]\n // ex-2)\n // /cloud-info-spaces/regions/gcp_region02/GCP/region [us-east1]\n // /cloud-info-spaces/regions/gcp_region02/GCP/zone [us-east1-c]\n\n\n key := \"/cloud-info-spaces/regions\"\n keyValueList, err := store.GetList(key, true)\n if err != nil {\n return nil, err\n }\n\n var regionInfoList []*RegionInfo\n\tvar inKeyValueList []icbs.KeyValue\n\tprevRegionName := \"\"\n\tprevProviderName := \"\"\n for _, kv := range keyValueList {\n\n\t\tregionName := utils.GetNodeValue(kv.Key, 3)\n\t\tproviderName := utils.GetNodeValue(kv.Key, 4)\n\n\t\tif prevRegionName==\"\" || regionName == prevRegionName {\n\t\t\tprevRegionName = regionName\n\t\t\tprevProviderName = providerName\n\t\t\tkeyValue := icbs.KeyValue{utils.GetNodeValue(kv.Key, 5), kv.Value}\n\t\t\tinKeyValueList = append(inKeyValueList, keyValue)\n\t\t} else {\n\t\t\t// insert prev RegionInfo\n\t\t\trgnInfo := &RegionInfo{prevRegionName, prevProviderName, inKeyValueList}\n\t\t\tregionInfoList = append(regionInfoList, rgnInfo)\n\n\t\t\tprevRegionName = regionName\n\t\t\tprevProviderName = providerName\n\t\t\tinKeyValueList = nil\n\t\t\tkeyValue := icbs.KeyValue{utils.GetNodeValue(kv.Key, 5), kv.Value}\n\t\t\tinKeyValueList = append(inKeyValueList, keyValue)\n\t\t}\n\n }\n\n\tif len(keyValueList) > 0 {\n\t\t// insert last RegionInfo\n\t\trgnInfo := &RegionInfo{prevRegionName, prevProviderName, inKeyValueList}\n\t\tregionInfoList = append(regionInfoList, rgnInfo)\n\t}\n\n return regionInfoList, nil\n}",
"func (mr *MockRDSAPIMockRecorder) DescribeSourceRegions(arg0 interface{}) *gomock.Call {\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"DescribeSourceRegions\", reflect.TypeOf((*MockRDSAPI)(nil).DescribeSourceRegions), arg0)\n}",
"func GetRegionList() []*ec2.Region {\n\tsess := session.Must(session.NewSession(&aws.Config{Region: aws.String(\"us-east-1\")}))\n\tsvc := ec2.New(sess)\n\n\t// Create a context with a timeout that will abort the request if it takes too long\n\tctx, cancelFn := context.WithTimeout(context.Background(), time.Second*5)\n\tdefer cancelFn()\n\n\tresp, err := svc.DescribeRegionsWithContext(ctx, nil)\n\n\tif err != nil {\n\t\tfmt.Println(err.Error())\n\t\treturn nil\n\t}\n\n\treturn resp.Regions\n}",
"func (mr *MockInformationMockRecorder) ListLocations() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ListLocations\", reflect.TypeOf((*MockInformation)(nil).ListLocations))\n}",
"func Regions(dbCfg db.Config) ([]models.Region, error) {\n\tvar regions []models.Region\n\n\tdatabase, err := db.OpenDatabase(dbCfg)\n\tdefer database.Close()\n\n\tif err != nil {\n\t\treturn regions, err\n\t}\n\n\tregions = database.NewRegionsQuery().Get()\n\treturn regions, nil\n}",
"func (s *RegionService) NewListRegionsParams() *ListRegionsParams {\n\tp := &ListRegionsParams{}\n\tp.p = make(map[string]interface{})\n\treturn p\n}",
"func (g *Game) Regions() (*RegionCollection, *Error) {\n\tvar result *RegionCollection\n\n\tswitch asserted := g.RegionsData.(type) {\n\t// list of IDs (strings)\n\tcase []interface{}:\n\t\tids, err := g.RegionIDs()\n\t\tif err != nil {\n\t\t\treturn result, err\n\t\t}\n\n\t\tresult = &RegionCollection{}\n\n\t\tfor _, id := range ids {\n\t\t\tregion, err := RegionByID(id)\n\t\t\tif err != nil {\n\t\t\t\treturn result, err\n\t\t\t}\n\n\t\t\tresult.Data = append(result.Data, *region)\n\t\t}\n\n\t// sub-resource due to embeds, aka \"{data:....}\"\n\tcase map[string]interface{}:\n\t\tresult = toRegionCollection(asserted)\n\t}\n\n\treturn result, nil\n}",
"func (l *Selectable) Regions(start, end int, regions []Region) []Region {\n\tl.initialize()\n\treturn l.text.Regions(start, end, regions)\n}",
"func (a NumberregionsApi) ListAvailablePhoneNumberRegions(filtersCountryCode []string, filtersNpa []string, filtersNxx []string, filtersIsTollFree []string, filtersCity []string, filtersProvincePostalCode []string, filtersCountryPostalCode []string, sortCountryCode string, sortNpa string, sortNxx string, sortIsTollFree string, sortCity string, sortProvincePostalCode string, sortCountryPostalCode string, limit int32, offset int32, fields string, groupBy []string) (*ListPhoneNumbersRegions, *APIResponse, error) {\n\n\tvar localVarHttpMethod = strings.ToUpper(\"Get\")\n\t// create path and map variables\n\tlocalVarPath := a.Configuration.BasePath + \"/phone-numbers/available/regions\"\n\n\tlocalVarHeaderParams := make(map[string]string)\n\tlocalVarQueryParams := url.Values{}\n\tlocalVarFormParams := make(map[string]string)\n\tvar localVarPostBody interface{}\n\tvar localVarFileName string\n\tvar localVarFileBytes []byte\n\t// authentication '(apiKey)' required\n\t// set key with prefix in header\n\tlocalVarHeaderParams[\"Authorization\"] = a.Configuration.GetAPIKeyWithPrefix(\"Authorization\")\n\t// add default headers if any\n\tfor key := range a.Configuration.DefaultHeader {\n\t\tlocalVarHeaderParams[key] = a.Configuration.DefaultHeader[key]\n\t}\n\tvar filtersCountryCodeCollectionFormat = \"multi\"\n\tlocalVarQueryParams.Add(\"filters[country_code]\", a.Configuration.APIClient.ParameterToString(filtersCountryCode, filtersCountryCodeCollectionFormat))\n\n\tvar filtersNpaCollectionFormat = \"multi\"\n\tlocalVarQueryParams.Add(\"filters[npa]\", a.Configuration.APIClient.ParameterToString(filtersNpa, filtersNpaCollectionFormat))\n\n\tvar filtersNxxCollectionFormat = \"multi\"\n\tlocalVarQueryParams.Add(\"filters[nxx]\", a.Configuration.APIClient.ParameterToString(filtersNxx, filtersNxxCollectionFormat))\n\n\tvar filtersIsTollFreeCollectionFormat = \"multi\"\n\tlocalVarQueryParams.Add(\"filters[is_toll_free]\", a.Configuration.APIClient.ParameterToString(filtersIsTollFree, filtersIsTollFreeCollectionFormat))\n\n\tvar filtersCityCollectionFormat = \"multi\"\n\tlocalVarQueryParams.Add(\"filters[city]\", a.Configuration.APIClient.ParameterToString(filtersCity, filtersCityCollectionFormat))\n\n\tvar filtersProvincePostalCodeCollectionFormat = \"multi\"\n\tlocalVarQueryParams.Add(\"filters[province_postal_code]\", a.Configuration.APIClient.ParameterToString(filtersProvincePostalCode, filtersProvincePostalCodeCollectionFormat))\n\n\tvar filtersCountryPostalCodeCollectionFormat = \"csv\"\n\tlocalVarQueryParams.Add(\"filters[country_postal_code]\", a.Configuration.APIClient.ParameterToString(filtersCountryPostalCode, filtersCountryPostalCodeCollectionFormat))\n\n\tlocalVarQueryParams.Add(\"sort[country_code]\", a.Configuration.APIClient.ParameterToString(sortCountryCode, \"\"))\n\tlocalVarQueryParams.Add(\"sort[npa]\", a.Configuration.APIClient.ParameterToString(sortNpa, \"\"))\n\tlocalVarQueryParams.Add(\"sort[nxx]\", a.Configuration.APIClient.ParameterToString(sortNxx, \"\"))\n\tlocalVarQueryParams.Add(\"sort[is_toll_free]\", a.Configuration.APIClient.ParameterToString(sortIsTollFree, \"\"))\n\tlocalVarQueryParams.Add(\"sort[city]\", a.Configuration.APIClient.ParameterToString(sortCity, \"\"))\n\tlocalVarQueryParams.Add(\"sort[province_postal_code]\", a.Configuration.APIClient.ParameterToString(sortProvincePostalCode, \"\"))\n\tlocalVarQueryParams.Add(\"sort[country_postal_code]\", a.Configuration.APIClient.ParameterToString(sortCountryPostalCode, \"\"))\n\tlocalVarQueryParams.Add(\"limit\", a.Configuration.APIClient.ParameterToString(limit, \"\"))\n\tlocalVarQueryParams.Add(\"offset\", a.Configuration.APIClient.ParameterToString(offset, \"\"))\n\tlocalVarQueryParams.Add(\"fields\", a.Configuration.APIClient.ParameterToString(fields, \"\"))\n\tvar groupByCollectionFormat = \"csv\"\n\tlocalVarQueryParams.Add(\"group_by\", a.Configuration.APIClient.ParameterToString(groupBy, groupByCollectionFormat))\n\n\n\tclearEmptyParams(localVarQueryParams)\n\n\t// to determine the Content-Type header\n\tlocalVarHttpContentTypes := []string{ \"application/json\", }\n\n\t// set Content-Type header\n\tlocalVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)\n\tif localVarHttpContentType != \"\" {\n\t\tlocalVarHeaderParams[\"Content-Type\"] = localVarHttpContentType\n\t}\n\t// to determine the Accept header\n\tlocalVarHttpHeaderAccepts := []string{\n\t\t\"application/json\",\n\t\t}\n\n\t// set Accept header\n\tlocalVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)\n\tif localVarHttpHeaderAccept != \"\" {\n\t\tlocalVarHeaderParams[\"Accept\"] = localVarHttpHeaderAccept\n\t}\n\tvar successPayload = new(ListPhoneNumbersRegions)\n\tlocalVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)\n\n\tvar localVarURL, _ = url.Parse(localVarPath)\n\tlocalVarURL.RawQuery = localVarQueryParams.Encode()\n\tvar localVarAPIResponse = &APIResponse{Operation: \"ListAvailablePhoneNumberRegions\", Method: localVarHttpMethod, RequestURL: localVarURL.String()}\n\tif localVarHttpResponse != nil {\n\t\tlocalVarAPIResponse.Response = localVarHttpResponse.RawResponse\n\t\tlocalVarAPIResponse.Payload = localVarHttpResponse.Body()\n\t}\n\n\tif err != nil {\n\t\treturn successPayload, localVarAPIResponse, err\n\t}\n\terr = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)\n\treturn successPayload, localVarAPIResponse, err\n}",
"func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager {\n\turl := listURL(client)\n\tif opts != nil {\n\t\tquery, err := opts.ToRegionListQuery()\n\t\tif err != nil {\n\t\t\treturn pagination.Pager{Err: err}\n\t\t}\n\t\turl += query\n\t}\n\treturn pagination.NewPager(client, url, func(r pagination.PageResult) pagination.Page {\n\t\treturn RegionPage{pagination.LinkedPageBase{PageResult: r}}\n\t})\n}",
"func (m *MockInformation) ListLocations() []string {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"ListLocations\")\n\tret0, _ := ret[0].([]string)\n\treturn ret0\n}",
"func (m *PaymentRepositoryMock) MinimockListInspect() {\n\tfor _, e := range m.ListMock.expectations {\n\t\tif mm_atomic.LoadUint64(&e.Counter) < 1 {\n\t\t\tm.t.Errorf(\"Expected call to PaymentRepositoryMock.List with params: %#v\", *e.params)\n\t\t}\n\t}\n\n\t// if default expectation was set then invocations count should be greater than zero\n\tif m.ListMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterListCounter) < 1 {\n\t\tif m.ListMock.defaultExpectation.params == nil {\n\t\t\tm.t.Error(\"Expected call to PaymentRepositoryMock.List\")\n\t\t} else {\n\t\t\tm.t.Errorf(\"Expected call to PaymentRepositoryMock.List with params: %#v\", *m.ListMock.defaultExpectation.params)\n\t\t}\n\t}\n\t// if func was set then invocations count should be greater than zero\n\tif m.funcList != nil && mm_atomic.LoadUint64(&m.afterListCounter) < 1 {\n\t\tm.t.Error(\"Expected call to PaymentRepositoryMock.List\")\n\t}\n}",
"func (s *API) Regions() []scw.Region {\n\treturn []scw.Region{scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw}\n}",
"func (lb *Leaderboard) Regions() *RegionCollection {\n\treturn toRegionCollection(lb.RegionsData)\n}",
"func (a *CloudProviderCredentialsApiService) ListAWSRegionsExecute(r ApiListAWSRegionsRequest) (ClusterRegionResponseList, *_nethttp.Response, error) {\n\tvar (\n\t\tlocalVarHTTPMethod = _nethttp.MethodGet\n\t\tlocalVarPostBody interface{}\n\t\tlocalVarFormFileName string\n\t\tlocalVarFileName string\n\t\tlocalVarFileBytes []byte\n\t\tlocalVarReturnValue ClusterRegionResponseList\n\t)\n\n\tlocalBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, \"CloudProviderCredentialsApiService.ListAWSRegions\")\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}\n\t}\n\n\tlocalVarPath := localBasePath + \"/aws/region\"\n\n\tlocalVarHeaderParams := make(map[string]string)\n\tlocalVarQueryParams := _neturl.Values{}\n\tlocalVarFormParams := _neturl.Values{}\n\n\t// to determine the Content-Type header\n\tlocalVarHTTPContentTypes := []string{}\n\n\t// set Content-Type header\n\tlocalVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)\n\tif localVarHTTPContentType != \"\" {\n\t\tlocalVarHeaderParams[\"Content-Type\"] = localVarHTTPContentType\n\t}\n\n\t// to determine the Accept header\n\tlocalVarHTTPHeaderAccepts := []string{\"application/json\"}\n\n\t// set Accept header\n\tlocalVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)\n\tif localVarHTTPHeaderAccept != \"\" {\n\t\tlocalVarHeaderParams[\"Accept\"] = localVarHTTPHeaderAccept\n\t}\n\treq, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, err\n\t}\n\n\tlocalVarHTTPResponse, err := a.client.callAPI(req)\n\tif err != nil || localVarHTTPResponse == nil {\n\t\treturn localVarReturnValue, localVarHTTPResponse, err\n\t}\n\n\tlocalVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)\n\tlocalVarHTTPResponse.Body.Close()\n\tlocalVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))\n\tif err != nil {\n\t\treturn localVarReturnValue, localVarHTTPResponse, err\n\t}\n\n\tif localVarHTTPResponse.StatusCode >= 300 {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: localVarHTTPResponse.Status,\n\t\t}\n\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t}\n\n\terr = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\tif err != nil {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: err.Error(),\n\t\t}\n\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t}\n\n\treturn localVarReturnValue, localVarHTTPResponse, nil\n}",
"func (c *Client) CloudListRegions(projectID string) ([]types.CloudRegionDetail, error) {\n\tvar resultsreq []string\n\tif err := c.Get(queryEscape(\"/cloud/project/%s/region\", projectID), &resultsreq); err != nil {\n\t\treturn nil, err\n\t}\n\tregions := []types.CloudRegionDetail{}\n\tfor _, resultreq := range resultsreq {\n\t\tregions = append(regions, types.CloudRegionDetail{Name: resultreq})\n\t}\n\treturn regions, nil\n}",
"func CreateGetRegionListResponse() (response *GetRegionListResponse) {\n\tresponse = &GetRegionListResponse{\n\t\tBaseResponse: &responses.BaseResponse{},\n\t}\n\treturn\n}",
"func (s *testPluginCodeSuite) TestGetRegionIDs(c *C) {\n\tregionIDs := schedule.GetRegionIDs(s.tc,\"757365727461626C653A7573657231773937383833313437333137333731323135\",\n\t\t\"757365727461626C653A7573657234443637353232383738383832303830353737\")\n\tc.Assert(len(regionIDs), Equals, 3)\n\tc.Assert(regionIDs[0], Equals, uint64(2))\n\tc.Assert(regionIDs[1], Equals, uint64(3))\n\tc.Assert(regionIDs[2], Equals, uint64(4))\n}",
"func (mr *MockGatewaySetMockRecorder) List(filterResource ...interface{}) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"List\", reflect.TypeOf((*MockGatewaySet)(nil).List), filterResource...)\n}",
"func GetTargetRegions(enabledRegions []string, selectedRegions []string, excludedRegions []string) ([]string, error) {\n\tif len(enabledRegions) == 0 {\n\t\treturn nil, fmt.Errorf(\"Cannot have empty enabled regions\")\n\t}\n\n\t// neither selectedRegions nor excludedRegions => select enabledRegions\n\tif len(selectedRegions) == 0 && len(excludedRegions) == 0 {\n\t\treturn enabledRegions, nil\n\t}\n\n\tif len(selectedRegions) > 0 && len(excludedRegions) > 0 {\n\t\treturn nil, fmt.Errorf(\"Cannot specify both selected and excluded regions\")\n\t}\n\n\tvar invalidRegions []string\n\n\t// Validate selectedRegions\n\tfor _, selectedRegion := range selectedRegions {\n\t\tif !collections.ListContainsElement(enabledRegions, selectedRegion) {\n\t\t\tinvalidRegions = append(invalidRegions, selectedRegion)\n\t\t}\n\t}\n\tif len(invalidRegions) > 0 {\n\t\treturn nil, fmt.Errorf(\"Invalid values for region: [%s]\", invalidRegions)\n\t}\n\n\tif len(selectedRegions) > 0 {\n\t\treturn selectedRegions, nil\n\t}\n\n\t// Validate excludedRegions\n\tfor _, excludedRegion := range excludedRegions {\n\t\tif !collections.ListContainsElement(enabledRegions, excludedRegion) {\n\t\t\tinvalidRegions = append(invalidRegions, excludedRegion)\n\t\t}\n\t}\n\tif len(invalidRegions) > 0 {\n\t\treturn nil, fmt.Errorf(\"Invalid values for exclude-region: [%s]\", invalidRegions)\n\t}\n\n\t// Filter out excludedRegions from enabledRegions\n\tvar targetRegions []string\n\tif len(excludedRegions) > 0 {\n\t\tfor _, region := range enabledRegions {\n\t\t\tif !collections.ListContainsElement(excludedRegions, region) {\n\t\t\t\ttargetRegions = append(targetRegions, region)\n\t\t\t}\n\t\t}\n\t}\n\tif len(targetRegions) == 0 {\n\t\treturn nil, fmt.Errorf(\"Cannot exclude all regions: %s\", excludedRegions)\n\t}\n\treturn targetRegions, nil\n}",
"func (mr *MockSFNAPIMockRecorder) ListStateMachines(arg0 interface{}) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ListStateMachines\", reflect.TypeOf((*MockSFNAPI)(nil).ListStateMachines), arg0)\n}",
"func (m *ListRepositoryMock) MinimockIsInListInspect() {\n\tfor _, e := range m.IsInListMock.expectations {\n\t\tif mm_atomic.LoadUint64(&e.Counter) < 1 {\n\t\t\tm.t.Errorf(\"Expected call to ListRepositoryMock.IsInList with params: %#v\", *e.params)\n\t\t}\n\t}\n\n\t// if default expectation was set then invocations count should be greater than zero\n\tif m.IsInListMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterIsInListCounter) < 1 {\n\t\tif m.IsInListMock.defaultExpectation.params == nil {\n\t\t\tm.t.Error(\"Expected call to ListRepositoryMock.IsInList\")\n\t\t} else {\n\t\t\tm.t.Errorf(\"Expected call to ListRepositoryMock.IsInList with params: %#v\", *m.IsInListMock.defaultExpectation.params)\n\t\t}\n\t}\n\t// if func was set then invocations count should be greater than zero\n\tif m.funcIsInList != nil && mm_atomic.LoadUint64(&m.afterIsInListCounter) < 1 {\n\t\tm.t.Error(\"Expected call to ListRepositoryMock.IsInList\")\n\t}\n}",
"func (mr *MockVirtualDestinationSetMockRecorder) List(filterResource ...interface{}) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"List\", reflect.TypeOf((*MockVirtualDestinationSet)(nil).List), filterResource...)\n}",
"func (gc *Collector) listRegionIPs(project, region string) (res []*addressWrapper, allSucceeded bool, err error) {\n\tres = []*addressWrapper{}\n\n\trawIPs, err := gc.computeAPI.LookupIPAddresses(project, region)\n\tif err != nil {\n\t\tlog.Errorf(\"Could not list IP Addresses in Region \\\"%s\\\": %v\", region, err)\n\t\treturn nil, false, err\n\t}\n\n\tallSucceeded = true\n\tfor _, rawIP := range rawIPs {\n\t\taddressMatches, err := gc.shouldRemove(rawIP)\n\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"During verification of IP Address %s (\\\"%s\\\"): %v\", rawIP.Address, rawIP.Name, err)\n\t\t\tallSucceeded = false\n\t\t\tcontinue\n\t\t}\n\n\t\tif addressMatches {\n\t\t\tipAddress := wrapAddress(rawIP, region)\n\t\t\tres = append(res, ipAddress)\n\t\t}\n\t}\n\n\treturn res, allSucceeded, nil\n}",
"func (mr *MockPlacementGroupClientMockRecorder) List(arg0, arg1 interface{}) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"List\", reflect.TypeOf((*MockPlacementGroupClient)(nil).List), arg0, arg1)\n}",
"func (s *Session) Regions(ctx context.Context, req RegionRequest) (*RegionResults, error) {\n\t// Create the URL\n\turl := s.APIURL + \"/\" + regionEndpoint\n\n\t// Call and return\n\treturn s.region(ctx, url, req)\n}",
"func (c *Client) CloudProjectRegionList(projectID string) ([]string, error) {\n\tvar r []string\n\treturn r, c.Get(queryEscape(\"/cloud/project/%s/region\", projectID), &r)\n}",
"func (m *MockClient) DescribeRegions(input *ec2.DescribeRegionsInput) (*ec2.DescribeRegionsOutput, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"DescribeRegions\", input)\n\tret0, _ := ret[0].(*ec2.DescribeRegionsOutput)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (c *AuthorizedApp) IsAllowedRegion(s string) bool {\n\tif len(c.AllowedRegions) == 0 {\n\t\treturn true\n\t}\n\n\t_, ok := c.AllowedRegions[s]\n\treturn ok\n}",
"func ValidRegion(region string) bool {\n\tvregions := GetRegionList()\n\tfor _, vregion := range vregions {\n\t\tif region == aws.StringValue(vregion.RegionName) {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}",
"func getValidRegions() []string {\n\tvrs := make([]string, len(validRegions)*2)\n\ti := 0\n\tfor k, v := range validRegions {\n\t\tvrs[i] = k\n\t\tvrs[i+1] = v\n\t\ti += 2\n\t}\n\tsort.Strings(vrs)\n\treturn vrs\n}",
"func (client IdentityClient) ListRegionSubscriptions(ctx context.Context, request ListRegionSubscriptionsRequest) (response ListRegionSubscriptionsResponse, err error) {\n\tvar ociResponse common.OCIResponse\n\tpolicy := common.NoRetryPolicy()\n\tif client.RetryPolicy() != nil {\n\t\tpolicy = *client.RetryPolicy()\n\t}\n\tif request.RetryPolicy() != nil {\n\t\tpolicy = *request.RetryPolicy()\n\t}\n\tociResponse, err = common.Retry(ctx, request, client.listRegionSubscriptions, policy)\n\tif err != nil {\n\t\tif ociResponse != nil {\n\t\t\tif httpResponse := ociResponse.HTTPResponse(); httpResponse != nil {\n\t\t\t\topcRequestId := httpResponse.Header.Get(\"opc-request-id\")\n\t\t\t\tresponse = ListRegionSubscriptionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId}\n\t\t\t} else {\n\t\t\t\tresponse = ListRegionSubscriptionsResponse{}\n\t\t\t}\n\t\t}\n\t\treturn\n\t}\n\tif convertedResponse, ok := ociResponse.(ListRegionSubscriptionsResponse); ok {\n\t\tresponse = convertedResponse\n\t} else {\n\t\terr = fmt.Errorf(\"failed to convert OCIResponse into ListRegionSubscriptionsResponse\")\n\t}\n\treturn\n}",
"func (mr *MockVirtualServiceSetMockRecorder) List(filterResource ...interface{}) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"List\", reflect.TypeOf((*MockVirtualServiceSet)(nil).List), filterResource...)\n}",
"func ListExchangesByRegion(account accounts.Interface, httpClient *http.Client) ExchangeRegionList {\n\tmoonpayRegions, moonpayError := GetMoonpaySupportedRegions(httpClient)\n\tlog := logging.Get().WithGroup(\"exchanges\")\n\tif moonpayError != nil {\n\t\tlog.Error(moonpayError)\n\t}\n\n\tpocketRegions, pocketError := GetPocketSupportedRegions(httpClient)\n\tif pocketError != nil {\n\t\tlog.Error(pocketError)\n\t}\n\n\tisMoonpaySupported := IsMoonpaySupported(account.Coin().Code())\n\tisPocketSupported := IsPocketSupported(account)\n\n\texchangeRegions := ExchangeRegionList{}\n\tfor _, code := range regionCodes {\n\t\t// default behavior is to show the exchange if the supported regions check fails.\n\t\tmoonpayEnabled, pocketEnabled := true, true\n\t\tif moonpayError == nil {\n\t\t\t_, moonpayEnabled = moonpayRegions[code]\n\t\t}\n\t\tif pocketError == nil {\n\t\t\t_, pocketEnabled = pocketRegions[code]\n\t\t}\n\t\texchangeRegions.Regions = append(exchangeRegions.Regions, ExchangeRegion{\n\t\t\tCode: code,\n\t\t\tIsMoonpayEnabled: moonpayEnabled && isMoonpaySupported,\n\t\t\tIsPocketEnabled: pocketEnabled && isPocketSupported,\n\t\t})\n\t}\n\n\treturn exchangeRegions\n}",
"func (a *CloudProviderCredentialsApiService) ListScalewayRegions(ctx _context.Context) ApiListScalewayRegionsRequest {\n\treturn ApiListScalewayRegionsRequest{\n\t\tApiService: a,\n\t\tctx: ctx,\n\t}\n}",
"func (mr *MockTokensServiceMockRecorder) TokensList() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"TokensList\", reflect.TypeOf((*MockTokensService)(nil).TokensList))\n}",
"func (mr *MockIApiMockRecorder) ListInvoices(arg0, arg1 interface{}) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ListInvoices\", reflect.TypeOf((*MockIApi)(nil).ListInvoices), arg0, arg1)\n}",
"func (vp *baseVectorParty) IsList() bool {\n\treturn true\n}",
"func RunSnapshotList(c *CmdConfig) error {\n\tvar err error\n\tss := c.Snapshots()\n\n\trestype, err := c.Doit.GetString(c.NS, doctl.ArgResourceType)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tregion, err := c.Doit.GetString(c.NS, doctl.ArgRegionSlug)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tmatches := make([]glob.Glob, 0, len(c.Args))\n\tfor _, globStr := range c.Args {\n\t\tg, err := glob.Compile(globStr)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"unknown glob %q\", globStr)\n\t\t}\n\n\t\tmatches = append(matches, g)\n\t}\n\n\tvar matchedList []do.Snapshot\n\tvar list []do.Snapshot\n\n\tif restype == \"droplet\" {\n\t\tlist, err = ss.ListDroplet()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t} else if restype == \"volume\" {\n\t\tlist, err = ss.ListVolume()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t} else {\n\t\tlist, err = ss.List()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tfor _, snapshot := range list {\n\t\tvar skip = true\n\t\tif len(matches) == 0 {\n\t\t\tskip = false\n\t\t} else {\n\t\t\tfor _, m := range matches {\n\t\t\t\tif m.Match(snapshot.ID) {\n\t\t\t\t\tskip = false\n\t\t\t\t}\n\t\t\t\tif m.Match(snapshot.Name) {\n\t\t\t\t\tskip = false\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif !skip && region != \"\" {\n\t\t\tfor _, snapshotRegion := range snapshot.Regions {\n\t\t\t\tif region != snapshotRegion {\n\t\t\t\t\tskip = true\n\t\t\t\t} else {\n\t\t\t\t\tskip = false\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif !skip {\n\t\t\tmatchedList = append(matchedList, snapshot)\n\t\t}\n\t}\n\n\titem := &displayers.Snapshot{Snapshots: matchedList}\n\treturn c.Display(item)\n}",
"func (client IdentityClient) listRegionSubscriptions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) {\n\n\thttpRequest, err := request.HTTPRequest(http.MethodGet, \"/tenancies/{tenancyId}/regionSubscriptions\", binaryReqBody, extraHeaders)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar response ListRegionSubscriptionsResponse\n\tvar httpResponse *http.Response\n\thttpResponse, err = client.Call(ctx, &httpRequest)\n\tdefer common.CloseBodyIfValid(httpResponse)\n\tresponse.RawResponse = httpResponse\n\tif err != nil {\n\t\treturn response, err\n\t}\n\n\terr = common.UnmarshalResponse(httpResponse, &response)\n\treturn response, err\n}",
"func (mr *MockProductMockRecorder) ListEditors(arg0, arg1 interface{}) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ListEditors\", reflect.TypeOf((*MockProduct)(nil).ListEditors), arg0, arg1)\n}",
"func (m *MockKubernetesService) GetRegions() (do.KubernetesRegions, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"GetRegions\")\n\tret0, _ := ret[0].(do.KubernetesRegions)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func (mr *MockRemotesMockRecorder) List() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"List\", reflect.TypeOf((*MockRemotes)(nil).List))\n}",
"func (o WorkerPoolOutput) Regions() pulumi.StringArrayOutput {\n\treturn o.ApplyT(func(v *WorkerPool) pulumi.StringArrayOutput { return v.Regions }).(pulumi.StringArrayOutput)\n}",
"func (mr *MockAccessControlMockRecorder) CanList(arg0, arg1 interface{}) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"CanList\", reflect.TypeOf((*MockAccessControl)(nil).CanList), arg0, arg1)\n}",
"func (c Clients) Regions() map[string]*Client {\n\treturn c.regions\n}",
"func (r *RegionsService) List(profileId int64) *RegionsListCall {\n\tc := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}\n\tc.profileId = profileId\n\treturn c\n}",
"func (c *Client) DescribeRegions(request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error) {\n return c.DescribeRegionsWithContext(context.Background(), request)\n}",
"func (m *RegionResp) Validate(formats strfmt.Registry) error {\n\treturn nil\n}",
"func Regions() int {\n\treturn int(reg.Get(TZASC_CONF, CONF_REGIONS, 0xf)) + 1\n}",
"func isValidRegionCode(regionCode string) bool {\n\tvalid := supportedRegions[regionCode]\n\treturn len(regionCode) != 0 && valid\n}",
"func IsValidRegion(promisedLand string) bool {\n\tpartitions := endpoints.DefaultResolver().(endpoints.EnumPartitions).Partitions()\n\tfor _, p := range partitions {\n\t\tfor region := range p.Regions() {\n\t\t\tif promisedLand == region {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}",
"func (mr *MockVirtualServiceClientMockRecorder) List(arg0, arg1 interface{}) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"List\", reflect.TypeOf((*MockVirtualServiceClient)(nil).List), arg0, arg1)\n}",
"func (t *VLDbl) IsList() bool {\n\treturn true\n}",
"func (mr *MockFailoverServiceSetMockRecorder) List() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"List\", reflect.TypeOf((*MockFailoverServiceSet)(nil).List))\n}",
"func ValidateInboundEndpointList(t *testing.T, inboundEndpointCmd string, config *MiConfig) {\n\tt.Helper()\n\toutput, _ := ListArtifacts(t, inboundEndpointCmd, config)\n\tartifactList := config.MIClient.GetArtifactListFromAPI(utils.MiManagementInboundEndpointResource, &artifactutils.InboundEndpointList{})\n\tvalidateinboundEndpointListEqual(t, output, (artifactList.(*artifactutils.InboundEndpointList)))\n}",
"func (mr *MockResponseWriterMockRecorder) WriteList(arg0, arg1, arg2 interface{}) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"WriteList\", reflect.TypeOf((*MockResponseWriter)(nil).WriteList), arg0, arg1, arg2)\n}",
"func (o *FiltersSubnet) GetSubregionNamesOk() ([]string, bool) {\n\tif o == nil || o.SubregionNames == nil {\n\t\tvar ret []string\n\t\treturn ret, false\n\t}\n\treturn *o.SubregionNames, true\n}",
"func knownPublicRegions(architecture types.Architecture) map[string]string {\n\trequired := rhcos.AMIRegions(architecture)\n\n\tregions := make(map[string]string)\n\tfor _, region := range endpoints.AwsPartition().Regions() {\n\t\tif required.Has(region.ID()) {\n\t\t\tregions[region.ID()] = region.Description()\n\t\t}\n\t}\n\treturn regions\n}",
"func (mr *MockRepoClientMockRecorder) ListLicenses() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ListLicenses\", reflect.TypeOf((*MockRepoClient)(nil).ListLicenses))\n}",
"func (mr *MockClientMockRecorder) DescribeAvailabilityZones(arg0 interface{}) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"DescribeAvailabilityZones\", reflect.TypeOf((*MockClient)(nil).DescribeAvailabilityZones), arg0)\n}",
"func (o *FiltersSubnet) HasSubregionNames() bool {\n\tif o != nil && o.SubregionNames != nil {\n\t\treturn true\n\t}\n\n\treturn false\n}",
"func (mr *MockClientMockRecorder) ListHostedZones(arg0 interface{}) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ListHostedZones\", reflect.TypeOf((*MockClient)(nil).ListHostedZones), arg0)\n}",
"func TestIntegrationRegion(t *testing.T) {\n\ttests := []struct {\n\t\tname string\n\t\tregion string\n\t\tregions []string\n\t\thaserror bool\n\t}{\n\t\t{\"test empty region\", \"\", genericRegions, true},\n\t\t{\"test good region\", genericRegions[0], genericRegions, false},\n\t}\n\tfor _, tt := range tests {\n\t\ttc := tt\n\t\tt.Run(tc.name, func(t *testing.T) {\n\t\t\ts := New(tc.region, tc.regions)\n\t\t\tss, err := s.Region(tc.region)\n\t\t\tif err != nil {\n\t\t\t\tt.Fatalf(\"Region() failed: %v\", err)\n\t\t\t}\n\t\t\tif ss.Config == nil || ss.Config.Region == nil {\n\t\t\t\tt.Fatal(\"ss.Config or ss.Config.Region is nil\")\n\t\t\t}\n\t\t\tresult := *ss.Config.Region\n\t\t\tif result != tc.region {\n\t\t\t\tt.Fatalf(\"Region() region invalid, expected: %s, got: %s\", tc.region, result)\n\t\t\t}\n\t\t})\n\t}\n}",
"func Test_Client_MapByRegion(t *testing.T) {\n\tcountriesInOceania := []string{\n\t\t\"American Samoa\",\n\t\t\"Australia\",\n\t\t\"Christmas Island\",\n\t\t\"Cocos (Keeling) Islands\",\n\t\t\"Cook Islands\",\n\t\t\"Fiji\",\n\t\t\"French Polynesia\",\n\t\t\"Guam\",\n\t\t\"Kiribati\",\n\t\t\"Marshall Islands\",\n\t\t\"Micronesia\",\n\t\t\"Nauru\",\n\t\t\"New Caledonia\",\n\t\t\"New Zealand\",\n\t\t\"Niue\",\n\t\t\"Norfolk Island\",\n\t\t\"Northern Mariana Islands\",\n\t\t\"Palau\",\n\t\t\"Papua New Guinea\",\n\t\t\"Pitcairn Islands\",\n\t\t\"Samoa\",\n\t\t\"Solomon Islands\",\n\t\t\"Tokelau\",\n\t\t\"Tonga\",\n\t\t\"Tuvalu\",\n\t\t\"Vanuatu\",\n\t\t\"Wallis and Futuna\",\n\t}\n\tret := mockClient.MapByRegion(\"Oceania\")\n\tfor _, row := range ret {\n\t\tassert.Contains(t, countriesInOceania, row.Name)\n\t}\n}",
"func GetRegions() ([]Region, error) {\n\tvar regions []Region\n\tarvanConfig := config.GetConfigInfo()\n\tarvanServer := arvanConfig.GetServer()\n\thttpReq, err := http.NewRequest(\"GET\", arvanServer+apiPrefix+defaultRegion+regionsEndpoint, nil)\n\tif err != nil {\n\t\treturn regions, err\n\t}\n\thttpReq.Header.Add(\"accept\", \"application/json\")\n\thttpReq.Header.Add(\"User-Agent\", \"ar-cli\")\n\thttpResp, err := http.DefaultClient.Do(httpReq)\n\tif err != nil {\n\t\treturn regions, err\n\t}\n\t// read body\n\tdefer httpResp.Body.Close()\n\tbody, err := ioutil.ReadAll(httpResp.Body)\n\tif err != nil {\n\t\treturn regions, err\n\t}\n\t// parse response\n\terr = json.Unmarshal(body, ®ions)\n\tif err != nil {\n\t\treturn regions, err\n\t}\n\n\treturn regions, nil\n}",
"func (mr *MockFullNodeMockRecorder) NetProtectList(arg0 interface{}) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"NetProtectList\", reflect.TypeOf((*MockFullNode)(nil).NetProtectList), arg0)\n}",
"func (mr *MockEnvoyFilterSetMockRecorder) List(filterResource ...interface{}) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"List\", reflect.TypeOf((*MockEnvoyFilterSet)(nil).List), filterResource...)\n}",
"func (mc *MockCluster) ScanRegions(startKey []byte, limit int) []*core.RegionInfo {\n\treturn mc.Regions.ScanRange(startKey, limit)\n}",
"func (o *CreateLoadBalancerRequest) HasSubregionNames() bool {\n\tif o != nil && o.SubregionNames != nil {\n\t\treturn true\n\t}\n\n\treturn false\n}",
"func (s *ListDataLakesInput) SetRegions(v []*string) *ListDataLakesInput {\n\ts.Regions = v\n\treturn s\n}",
"func (o *CreateLoadBalancerRequest) GetSubregionNamesOk() (*[]string, bool) {\n\tif o == nil || o.SubregionNames == nil {\n\t\treturn nil, false\n\t}\n\treturn o.SubregionNames, true\n}",
"func (mr *MockRDSAPIMockRecorder) DescribeSourceRegionsRequest(arg0 interface{}) *gomock.Call {\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"DescribeSourceRegionsRequest\", reflect.TypeOf((*MockRDSAPI)(nil).DescribeSourceRegionsRequest), arg0)\n}"
] |
[
"0.71776366",
"0.6564506",
"0.65273726",
"0.6417446",
"0.63573587",
"0.62713206",
"0.6052334",
"0.5952357",
"0.59222037",
"0.58927447",
"0.5860398",
"0.5802703",
"0.5640489",
"0.56197524",
"0.55665183",
"0.5517176",
"0.5514891",
"0.54915076",
"0.54591185",
"0.54403275",
"0.53473765",
"0.53141356",
"0.52902365",
"0.5289158",
"0.52873033",
"0.5280574",
"0.5279434",
"0.5272762",
"0.5269947",
"0.52540827",
"0.52418876",
"0.52318347",
"0.52031666",
"0.51718146",
"0.5163762",
"0.5148468",
"0.50888216",
"0.50597525",
"0.5055845",
"0.50542957",
"0.5048536",
"0.5047505",
"0.50468296",
"0.5043472",
"0.50367755",
"0.5034361",
"0.503112",
"0.50042486",
"0.5000749",
"0.4999713",
"0.4998318",
"0.49959096",
"0.4994794",
"0.49883237",
"0.49881753",
"0.49848258",
"0.49790058",
"0.49543145",
"0.49518186",
"0.49498105",
"0.49415198",
"0.49280015",
"0.49271324",
"0.49231264",
"0.49224854",
"0.49066433",
"0.49064824",
"0.4901596",
"0.48986208",
"0.48880363",
"0.48810145",
"0.4879199",
"0.48760152",
"0.48586258",
"0.48586014",
"0.48441985",
"0.48429114",
"0.48428723",
"0.48373705",
"0.48031566",
"0.47708338",
"0.47679186",
"0.47660568",
"0.47628662",
"0.47556362",
"0.47541896",
"0.47499964",
"0.4748744",
"0.47480002",
"0.4738785",
"0.47342378",
"0.4730217",
"0.4728485",
"0.47241464",
"0.47232872",
"0.47207728",
"0.47206086",
"0.4718578",
"0.47131678",
"0.47119394"
] |
0.78075683
|
0
|
FillFrom fills PollAnswerVoters from given interface.
|
func (p *PollAnswerVoters) FillFrom(from interface {
GetChosen() (value bool)
GetCorrect() (value bool)
GetOption() (value []byte)
GetVoters() (value int)
}) {
p.Chosen = from.GetChosen()
p.Correct = from.GetCorrect()
p.Option = from.GetOption()
p.Voters = from.GetVoters()
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *ChatParticipantAdmin) FillFrom(from interface {\n\tGetUserID() (value int)\n\tGetInviterID() (value int)\n\tGetDate() (value int)\n}) {\n\tc.UserID = from.GetUserID()\n\tc.InviterID = from.GetInviterID()\n\tc.Date = from.GetDate()\n}",
"func (c *ChatParticipant) FillFrom(from interface {\n\tGetUserID() (value int)\n\tGetInviterID() (value int)\n\tGetDate() (value int)\n}) {\n\tc.UserID = from.GetUserID()\n\tc.InviterID = from.GetInviterID()\n\tc.Date = from.GetDate()\n}",
"func (e *EncryptedChatWaiting) FillFrom(from interface {\n\tGetID() (value int)\n\tGetAccessHash() (value int64)\n\tGetDate() (value int)\n\tGetAdminID() (value int)\n\tGetParticipantID() (value int)\n}) {\n\te.ID = from.GetID()\n\te.AccessHash = from.GetAccessHash()\n\te.Date = from.GetDate()\n\te.AdminID = from.GetAdminID()\n\te.ParticipantID = from.GetParticipantID()\n}",
"func (d *MessagesDialogsSlice) FillFrom(from interface {\n\tGetCount() (value int)\n\tGetDialogs() (value []DialogClass)\n\tGetMessages() (value []MessageClass)\n\tGetChats() (value []ChatClass)\n\tGetUsers() (value []UserClass)\n}) {\n\td.Count = from.GetCount()\n\td.Dialogs = from.GetDialogs()\n\td.Messages = from.GetMessages()\n\td.Chats = from.GetChats()\n\td.Users = from.GetUsers()\n}",
"func (d *MessagesDialogs) FillFrom(from interface {\n\tGetDialogs() (value []DialogClass)\n\tGetMessages() (value []MessageClass)\n\tGetChats() (value []ChatClass)\n\tGetUsers() (value []UserClass)\n}) {\n\td.Dialogs = from.GetDialogs()\n\td.Messages = from.GetMessages()\n\td.Chats = from.GetChats()\n\td.Users = from.GetUsers()\n}",
"func (a *AttachMenuBots) FillFrom(from interface {\n\tGetHash() (value int64)\n\tGetBots() (value []AttachMenuBot)\n\tGetUsers() (value []UserClass)\n}) {\n\ta.Hash = from.GetHash()\n\ta.Bots = from.GetBots()\n\ta.Users = from.GetUsers()\n}",
"func (i *InputCheckPasswordSRP) FillFrom(from interface {\n\tGetSRPID() (value int64)\n\tGetA() (value []byte)\n\tGetM1() (value []byte)\n}) {\n\ti.SRPID = from.GetSRPID()\n\ti.A = from.GetA()\n\ti.M1 = from.GetM1()\n}",
"func (u *Updates) FillFrom(from interface {\n\tGetUpdates() (value []UpdateClass)\n\tGetUsers() (value []UserClass)\n\tGetChats() (value []ChatClass)\n\tGetDate() (value int)\n\tGetSeq() (value int)\n}) {\n\tu.Updates = from.GetUpdates()\n\tu.Users = from.GetUsers()\n\tu.Chats = from.GetChats()\n\tu.Date = from.GetDate()\n\tu.Seq = from.GetSeq()\n}",
"func (b *BotApp) FillFrom(from interface {\n\tGetID() (value int64)\n\tGetAccessHash() (value int64)\n\tGetShortName() (value string)\n\tGetTitle() (value string)\n\tGetDescription() (value string)\n\tGetPhoto() (value PhotoClass)\n\tGetDocument() (value DocumentClass, ok bool)\n\tGetHash() (value int64)\n}) {\n\tb.ID = from.GetID()\n\tb.AccessHash = from.GetAccessHash()\n\tb.ShortName = from.GetShortName()\n\tb.Title = from.GetTitle()\n\tb.Description = from.GetDescription()\n\tb.Photo = from.GetPhoto()\n\tif val, ok := from.GetDocument(); ok {\n\t\tb.Document = val\n\t}\n\n\tb.Hash = from.GetHash()\n}",
"func (i *InputClientProxy) FillFrom(from interface {\n\tGetAddress() (value string)\n\tGetPort() (value int)\n}) {\n\ti.Address = from.GetAddress()\n\ti.Port = from.GetPort()\n}",
"func (e *EncryptedChatEmpty) FillFrom(from interface {\n\tGetID() (value int)\n}) {\n\te.ID = from.GetID()\n}",
"func (e *EncryptedChat) FillFrom(from interface {\n\tGetID() (value int)\n\tGetAccessHash() (value int64)\n\tGetDate() (value int)\n\tGetAdminID() (value int)\n\tGetParticipantID() (value int)\n\tGetGAOrB() (value []byte)\n\tGetKeyFingerprint() (value int64)\n}) {\n\te.ID = from.GetID()\n\te.AccessHash = from.GetAccessHash()\n\te.Date = from.GetDate()\n\te.AdminID = from.GetAdminID()\n\te.ParticipantID = from.GetParticipantID()\n\te.GAOrB = from.GetGAOrB()\n\te.KeyFingerprint = from.GetKeyFingerprint()\n}",
"func (m *MessageReplies) FillFrom(from interface {\n\tGetComments() (value bool)\n\tGetReplies() (value int)\n\tGetRepliesPts() (value int)\n\tGetRecentRepliers() (value []PeerClass, ok bool)\n\tGetChannelID() (value int64, ok bool)\n\tGetMaxID() (value int, ok bool)\n\tGetReadMaxID() (value int, ok bool)\n}) {\n\tm.Comments = from.GetComments()\n\tm.Replies = from.GetReplies()\n\tm.RepliesPts = from.GetRepliesPts()\n\tif val, ok := from.GetRecentRepliers(); ok {\n\t\tm.RecentRepliers = val\n\t}\n\n\tif val, ok := from.GetChannelID(); ok {\n\t\tm.ChannelID = val\n\t}\n\n\tif val, ok := from.GetMaxID(); ok {\n\t\tm.MaxID = val\n\t}\n\n\tif val, ok := from.GetReadMaxID(); ok {\n\t\tm.ReadMaxID = val\n\t}\n\n}",
"func (e *EncryptedChatRequested) FillFrom(from interface {\n\tGetFolderID() (value int, ok bool)\n\tGetID() (value int)\n\tGetAccessHash() (value int64)\n\tGetDate() (value int)\n\tGetAdminID() (value int)\n\tGetParticipantID() (value int)\n\tGetGA() (value []byte)\n}) {\n\tif val, ok := from.GetFolderID(); ok {\n\t\te.FolderID = val\n\t}\n\n\te.ID = from.GetID()\n\te.AccessHash = from.GetAccessHash()\n\te.Date = from.GetDate()\n\te.AdminID = from.GetAdminID()\n\te.ParticipantID = from.GetParticipantID()\n\te.GA = from.GetGA()\n}",
"func (c *ChannelsChannelParticipants) FillFrom(from interface {\n\tGetCount() (value int)\n\tGetParticipants() (value []ChannelParticipantClass)\n\tGetChats() (value []ChatClass)\n\tGetUsers() (value []UserClass)\n}) {\n\tc.Count = from.GetCount()\n\tc.Participants = from.GetParticipants()\n\tc.Chats = from.GetChats()\n\tc.Users = from.GetUsers()\n}",
"func (s *StickerPack) FillFrom(from interface {\n\tGetEmoticon() (value string)\n\tGetDocuments() (value []int64)\n}) {\n\ts.Emoticon = from.GetEmoticon()\n\ts.Documents = from.GetDocuments()\n}",
"func (i *InputGroupCall) FillFrom(from interface {\n\tGetID() (value int64)\n\tGetAccessHash() (value int64)\n}) {\n\ti.ID = from.GetID()\n\ti.AccessHash = from.GetAccessHash()\n}",
"func (i *Invoice) FillFrom(from interface {\n\tGetTest() (value bool)\n\tGetNameRequested() (value bool)\n\tGetPhoneRequested() (value bool)\n\tGetEmailRequested() (value bool)\n\tGetShippingAddressRequested() (value bool)\n\tGetFlexible() (value bool)\n\tGetPhoneToProvider() (value bool)\n\tGetEmailToProvider() (value bool)\n\tGetRecurring() (value bool)\n\tGetCurrency() (value string)\n\tGetPrices() (value []LabeledPrice)\n\tGetMaxTipAmount() (value int64, ok bool)\n\tGetSuggestedTipAmounts() (value []int64, ok bool)\n\tGetRecurringTermsURL() (value string, ok bool)\n}) {\n\ti.Test = from.GetTest()\n\ti.NameRequested = from.GetNameRequested()\n\ti.PhoneRequested = from.GetPhoneRequested()\n\ti.EmailRequested = from.GetEmailRequested()\n\ti.ShippingAddressRequested = from.GetShippingAddressRequested()\n\ti.Flexible = from.GetFlexible()\n\ti.PhoneToProvider = from.GetPhoneToProvider()\n\ti.EmailToProvider = from.GetEmailToProvider()\n\ti.Recurring = from.GetRecurring()\n\ti.Currency = from.GetCurrency()\n\ti.Prices = from.GetPrices()\n\tif val, ok := from.GetMaxTipAmount(); ok {\n\t\ti.MaxTipAmount = val\n\t}\n\n\tif val, ok := from.GetSuggestedTipAmounts(); ok {\n\t\ti.SuggestedTipAmounts = val\n\t}\n\n\tif val, ok := from.GetRecurringTermsURL(); ok {\n\t\ti.RecurringTermsURL = val\n\t}\n\n}",
"func (c *HelpCountryCode) FillFrom(from interface {\n\tGetCountryCode() (value string)\n\tGetPrefixes() (value []string, ok bool)\n\tGetPatterns() (value []string, ok bool)\n}) {\n\tc.CountryCode = from.GetCountryCode()\n\tif val, ok := from.GetPrefixes(); ok {\n\t\tc.Prefixes = val\n\t}\n\n\tif val, ok := from.GetPatterns(); ok {\n\t\tc.Patterns = val\n\t}\n\n}",
"func (c *ChatParticipantCreator) FillFrom(from interface {\n\tGetUserID() (value int)\n}) {\n\tc.UserID = from.GetUserID()\n}",
"func (u *UserEmpty) FillFrom(from interface {\n\tGetID() (value int64)\n}) {\n\tu.ID = from.GetID()\n}",
"func (c *MessagesChatFull) FillFrom(from interface {\n\tGetFullChat() (value ChatFullClass)\n\tGetChats() (value []ChatClass)\n\tGetUsers() (value []UserClass)\n}) {\n\tc.FullChat = from.GetFullChat()\n\tc.Chats = from.GetChats()\n\tc.Users = from.GetUsers()\n}",
"func (s *MessagesStickers) FillFrom(from interface {\n\tGetHash() (value int64)\n\tGetStickers() (value []DocumentClass)\n}) {\n\ts.Hash = from.GetHash()\n\ts.Stickers = from.GetStickers()\n}",
"func (a *AccessPointRule) FillFrom(from interface {\n\tGetPhonePrefixRules() (value string)\n\tGetDCID() (value int)\n\tGetIPs() (value []IPPortClass)\n}) {\n\ta.PhonePrefixRules = from.GetPhonePrefixRules()\n\ta.DCID = from.GetDCID()\n\ta.IPs = from.GetIPs()\n}",
"func (d *DialogFilterSuggested) FillFrom(from interface {\n\tGetFilter() (value DialogFilterClass)\n\tGetDescription() (value string)\n}) {\n\td.Filter = from.GetFilter()\n\td.Description = from.GetDescription()\n}",
"func (d *MessagesDhConfig) FillFrom(from interface {\n\tGetG() (value int)\n\tGetP() (value []byte)\n\tGetVersion() (value int)\n\tGetRandom() (value []byte)\n}) {\n\td.G = from.GetG()\n\td.P = from.GetP()\n\td.Version = from.GetVersion()\n\td.Random = from.GetRandom()\n}",
"func (u *UpdatesCombined) FillFrom(from interface {\n\tGetUpdates() (value []UpdateClass)\n\tGetUsers() (value []UserClass)\n\tGetChats() (value []ChatClass)\n\tGetDate() (value int)\n\tGetSeqStart() (value int)\n\tGetSeq() (value int)\n}) {\n\tu.Updates = from.GetUpdates()\n\tu.Users = from.GetUsers()\n\tu.Chats = from.GetChats()\n\tu.Date = from.GetDate()\n\tu.SeqStart = from.GetSeqStart()\n\tu.Seq = from.GetSeq()\n}",
"func (e *EncryptedChatDiscarded) FillFrom(from interface {\n\tGetHistoryDeleted() (value bool)\n\tGetID() (value int)\n}) {\n\te.HistoryDeleted = from.GetHistoryDeleted()\n\te.ID = from.GetID()\n}",
"func (u *UserStories) FillFrom(from interface {\n\tGetUserID() (value int64)\n\tGetMaxReadID() (value int, ok bool)\n\tGetStories() (value []StoryItemClass)\n}) {\n\tu.UserID = from.GetUserID()\n\tif val, ok := from.GetMaxReadID(); ok {\n\t\tu.MaxReadID = val\n\t}\n\n\tu.Stories = from.GetStories()\n}",
"func (u *UpdateShort) FillFrom(from interface {\n\tGetUpdate() (value UpdateClass)\n\tGetDate() (value int)\n}) {\n\tu.Update = from.GetUpdate()\n\tu.Date = from.GetDate()\n}",
"func (u *UpdateShortSentMessage) FillFrom(from interface {\n\tGetOut() (value bool)\n\tGetID() (value int)\n\tGetPts() (value int)\n\tGetPtsCount() (value int)\n\tGetDate() (value int)\n\tGetMedia() (value MessageMediaClass, ok bool)\n\tGetEntities() (value []MessageEntityClass, ok bool)\n\tGetTTLPeriod() (value int, ok bool)\n}) {\n\tu.Out = from.GetOut()\n\tu.ID = from.GetID()\n\tu.Pts = from.GetPts()\n\tu.PtsCount = from.GetPtsCount()\n\tu.Date = from.GetDate()\n\tif val, ok := from.GetMedia(); ok {\n\t\tu.Media = val\n\t}\n\n\tif val, ok := from.GetEntities(); ok {\n\t\tu.Entities = val\n\t}\n\n\tif val, ok := from.GetTTLPeriod(); ok {\n\t\tu.TTLPeriod = val\n\t}\n\n}",
"func (f *FileLocationUnavailable) FillFrom(from interface {\n\tGetVolumeID() (value int64)\n\tGetLocalID() (value int)\n\tGetSecret() (value int64)\n}) {\n\tf.VolumeID = from.GetVolumeID()\n\tf.LocalID = from.GetLocalID()\n\tf.Secret = from.GetSecret()\n}",
"func (i *InlineBotWebView) FillFrom(from interface {\n\tGetText() (value string)\n\tGetURL() (value string)\n}) {\n\ti.Text = from.GetText()\n\ti.URL = from.GetURL()\n}",
"func (n *NotifyForumTopic) FillFrom(from interface {\n\tGetPeer() (value PeerClass)\n\tGetTopMsgID() (value int)\n}) {\n\tn.Peer = from.GetPeer()\n\tn.TopMsgID = from.GetTopMsgID()\n}",
"func (p *PageListOrderedItemBlocks) FillFrom(from interface {\n\tGetNum() (value string)\n\tGetBlocks() (value []PageBlockClass)\n}) {\n\tp.Num = from.GetNum()\n\tp.Blocks = from.GetBlocks()\n}",
"func (r *ReactionCount) FillFrom(from interface {\n\tGetChosenOrder() (value int, ok bool)\n\tGetReaction() (value ReactionClass)\n\tGetCount() (value int)\n}) {\n\tif val, ok := from.GetChosenOrder(); ok {\n\t\tr.ChosenOrder = val\n\t}\n\n\tr.Reaction = from.GetReaction()\n\tr.Count = from.GetCount()\n}",
"func (n *NotifyPeer) FillFrom(from interface {\n\tGetPeer() (value PeerClass)\n}) {\n\tn.Peer = from.GetPeer()\n}",
"func (g *MessagesGetMessagesViewsRequest) FillFrom(from interface {\n\tGetPeer() (value InputPeerClass)\n\tGetID() (value []int)\n\tGetIncrement() (value bool)\n}) {\n\tg.Peer = from.GetPeer()\n\tg.ID = from.GetID()\n\tg.Increment = from.GetIncrement()\n}",
"func (s *AuthSentCode) FillFrom(from interface {\n\tGetType() (value AuthSentCodeTypeClass)\n\tGetPhoneCodeHash() (value string)\n\tGetNextType() (value AuthCodeTypeClass, ok bool)\n\tGetTimeout() (value int, ok bool)\n}) {\n\ts.Type = from.GetType()\n\ts.PhoneCodeHash = from.GetPhoneCodeHash()\n\tif val, ok := from.GetNextType(); ok {\n\t\ts.NextType = val\n\t}\n\n\tif val, ok := from.GetTimeout(); ok {\n\t\ts.Timeout = val\n\t}\n\n}",
"func (i *ChannelsInviteToChannelRequest) FillFrom(from interface {\n\tGetChannel() (value InputChannelClass)\n\tGetUsers() (value []InputUserClass)\n}) {\n\ti.Channel = from.GetChannel()\n\ti.Users = from.GetUsers()\n}",
"func (a *UserAuth) FillFrom(from interface {\n\tGetFoo() (value string)\n}) {\n\ta.Foo = from.GetFoo()\n}",
"func (r *StoriesReportRequest) FillFrom(from interface {\n\tGetUserID() (value InputUserClass)\n\tGetID() (value []int)\n\tGetReason() (value ReportReasonClass)\n\tGetMessage() (value string)\n}) {\n\tr.UserID = from.GetUserID()\n\tr.ID = from.GetID()\n\tr.Reason = from.GetReason()\n\tr.Message = from.GetMessage()\n}",
"func (l *LangPackStringPluralized) FillFrom(from interface {\n\tGetKey() (value string)\n\tGetZeroValue() (value string, ok bool)\n\tGetOneValue() (value string, ok bool)\n\tGetTwoValue() (value string, ok bool)\n\tGetFewValue() (value string, ok bool)\n\tGetManyValue() (value string, ok bool)\n\tGetOtherValue() (value string)\n}) {\n\tl.Key = from.GetKey()\n\tif val, ok := from.GetZeroValue(); ok {\n\t\tl.ZeroValue = val\n\t}\n\n\tif val, ok := from.GetOneValue(); ok {\n\t\tl.OneValue = val\n\t}\n\n\tif val, ok := from.GetTwoValue(); ok {\n\t\tl.TwoValue = val\n\t}\n\n\tif val, ok := from.GetFewValue(); ok {\n\t\tl.FewValue = val\n\t}\n\n\tif val, ok := from.GetManyValue(); ok {\n\t\tl.ManyValue = val\n\t}\n\n\tl.OtherValue = from.GetOtherValue()\n}",
"func (d *MessagesDhConfigNotModified) FillFrom(from interface {\n\tGetRandom() (value []byte)\n}) {\n\td.Random = from.GetRandom()\n}",
"func (r *MessagesReportRequest) FillFrom(from interface {\n\tGetPeer() (value InputPeerClass)\n\tGetID() (value []int)\n\tGetReason() (value ReportReasonClass)\n\tGetMessage() (value string)\n}) {\n\tr.Peer = from.GetPeer()\n\tr.ID = from.GetID()\n\tr.Reason = from.GetReason()\n\tr.Message = from.GetMessage()\n}",
"func (g *PhoneGetGroupCallRequest) FillFrom(from interface {\n\tGetCall() (value InputGroupCall)\n\tGetLimit() (value int)\n}) {\n\tg.Call = from.GetCall()\n\tg.Limit = from.GetLimit()\n}",
"func (t *PhoneToggleGroupCallRecordRequest) FillFrom(from interface {\n\tGetStart() (value bool)\n\tGetVideo() (value bool)\n\tGetCall() (value InputGroupCall)\n\tGetTitle() (value string, ok bool)\n\tGetVideoPortrait() (value bool, ok bool)\n}) {\n\tt.Start = from.GetStart()\n\tt.Video = from.GetVideo()\n\tt.Call = from.GetCall()\n\tif val, ok := from.GetTitle(); ok {\n\t\tt.Title = val\n\t}\n\n\tif val, ok := from.GetVideoPortrait(); ok {\n\t\tt.VideoPortrait = val\n\t}\n\n}",
"func (r *ChannelsReportSpamRequest) FillFrom(from interface {\n\tGetChannel() (value InputChannelClass)\n\tGetParticipant() (value InputPeerClass)\n\tGetID() (value []int)\n}) {\n\tr.Channel = from.GetChannel()\n\tr.Participant = from.GetParticipant()\n\tr.ID = from.GetID()\n}",
"func (s *MessagesSponsoredMessages) FillFrom(from interface {\n\tGetPostsBetween() (value int, ok bool)\n\tGetMessages() (value []SponsoredMessage)\n\tGetChats() (value []ChatClass)\n\tGetUsers() (value []UserClass)\n}) {\n\tif val, ok := from.GetPostsBetween(); ok {\n\t\ts.PostsBetween = val\n\t}\n\n\ts.Messages = from.GetMessages()\n\ts.Chats = from.GetChats()\n\ts.Users = from.GetUsers()\n}",
"func (e *EmojiKeywordsDifference) FillFrom(from interface {\n\tGetLangCode() (value string)\n\tGetFromVersion() (value int)\n\tGetVersion() (value int)\n\tGetKeywords() (value []EmojiKeywordClass)\n}) {\n\te.LangCode = from.GetLangCode()\n\te.FromVersion = from.GetFromVersion()\n\te.Version = from.GetVersion()\n\te.Keywords = from.GetKeywords()\n}",
"func (s *MessagesSentEncryptedMessage) FillFrom(from interface {\n\tGetDate() (value int)\n}) {\n\ts.Date = from.GetDate()\n}",
"func (g *MessagesGetScheduledMessagesRequest) FillFrom(from interface {\n\tGetPeer() (value InputPeerClass)\n\tGetID() (value []int)\n}) {\n\tg.Peer = from.GetPeer()\n\tg.ID = from.GetID()\n}",
"func (g *MessagesGetBotAppRequest) FillFrom(from interface {\n\tGetApp() (value InputBotAppClass)\n\tGetHash() (value int64)\n}) {\n\tg.App = from.GetApp()\n\tg.Hash = from.GetHash()\n}",
"func (u *User) FillFrom(from interface {\n\tGetSelf() (value bool)\n\tGetContact() (value bool)\n\tGetMutualContact() (value bool)\n\tGetDeleted() (value bool)\n\tGetBot() (value bool)\n\tGetBotChatHistory() (value bool)\n\tGetBotNochats() (value bool)\n\tGetVerified() (value bool)\n\tGetRestricted() (value bool)\n\tGetMin() (value bool)\n\tGetBotInlineGeo() (value bool)\n\tGetSupport() (value bool)\n\tGetScam() (value bool)\n\tGetApplyMinPhoto() (value bool)\n\tGetFake() (value bool)\n\tGetBotAttachMenu() (value bool)\n\tGetPremium() (value bool)\n\tGetAttachMenuEnabled() (value bool)\n\tGetBotCanEdit() (value bool)\n\tGetCloseFriend() (value bool)\n\tGetStoriesHidden() (value bool)\n\tGetStoriesUnavailable() (value bool)\n\tGetID() (value int64)\n\tGetAccessHash() (value int64, ok bool)\n\tGetFirstName() (value string, ok bool)\n\tGetLastName() (value string, ok bool)\n\tGetUsername() (value string, ok bool)\n\tGetPhone() (value string, ok bool)\n\tGetPhoto() (value UserProfilePhotoClass, ok bool)\n\tGetStatus() (value UserStatusClass, ok bool)\n\tGetBotInfoVersion() (value int, ok bool)\n\tGetRestrictionReason() (value []RestrictionReason, ok bool)\n\tGetBotInlinePlaceholder() (value string, ok bool)\n\tGetLangCode() (value string, ok bool)\n\tGetEmojiStatus() (value EmojiStatusClass, ok bool)\n\tGetUsernames() (value []Username, ok bool)\n\tGetStoriesMaxID() (value int, ok bool)\n}) {\n\tu.Self = from.GetSelf()\n\tu.Contact = from.GetContact()\n\tu.MutualContact = from.GetMutualContact()\n\tu.Deleted = from.GetDeleted()\n\tu.Bot = from.GetBot()\n\tu.BotChatHistory = from.GetBotChatHistory()\n\tu.BotNochats = from.GetBotNochats()\n\tu.Verified = from.GetVerified()\n\tu.Restricted = from.GetRestricted()\n\tu.Min = from.GetMin()\n\tu.BotInlineGeo = from.GetBotInlineGeo()\n\tu.Support = from.GetSupport()\n\tu.Scam = from.GetScam()\n\tu.ApplyMinPhoto = from.GetApplyMinPhoto()\n\tu.Fake = from.GetFake()\n\tu.BotAttachMenu = from.GetBotAttachMenu()\n\tu.Premium = from.GetPremium()\n\tu.AttachMenuEnabled = from.GetAttachMenuEnabled()\n\tu.BotCanEdit = from.GetBotCanEdit()\n\tu.CloseFriend = from.GetCloseFriend()\n\tu.StoriesHidden = from.GetStoriesHidden()\n\tu.StoriesUnavailable = from.GetStoriesUnavailable()\n\tu.ID = from.GetID()\n\tif val, ok := from.GetAccessHash(); ok {\n\t\tu.AccessHash = val\n\t}\n\n\tif val, ok := from.GetFirstName(); ok {\n\t\tu.FirstName = val\n\t}\n\n\tif val, ok := from.GetLastName(); ok {\n\t\tu.LastName = val\n\t}\n\n\tif val, ok := from.GetUsername(); ok {\n\t\tu.Username = val\n\t}\n\n\tif val, ok := from.GetPhone(); ok {\n\t\tu.Phone = val\n\t}\n\n\tif val, ok := from.GetPhoto(); ok {\n\t\tu.Photo = val\n\t}\n\n\tif val, ok := from.GetStatus(); ok {\n\t\tu.Status = val\n\t}\n\n\tif val, ok := from.GetBotInfoVersion(); ok {\n\t\tu.BotInfoVersion = val\n\t}\n\n\tif val, ok := from.GetRestrictionReason(); ok {\n\t\tu.RestrictionReason = val\n\t}\n\n\tif val, ok := from.GetBotInlinePlaceholder(); ok {\n\t\tu.BotInlinePlaceholder = val\n\t}\n\n\tif val, ok := from.GetLangCode(); ok {\n\t\tu.LangCode = val\n\t}\n\n\tif val, ok := from.GetEmojiStatus(); ok {\n\t\tu.EmojiStatus = val\n\t}\n\n\tif val, ok := from.GetUsernames(); ok {\n\t\tu.Usernames = val\n\t}\n\n\tif val, ok := from.GetStoriesMaxID(); ok {\n\t\tu.StoriesMaxID = val\n\t}\n\n}",
"func (s *SavedPhoneContact) FillFrom(from interface {\n\tGetPhone() (value string)\n\tGetFirstName() (value string)\n\tGetLastName() (value string)\n\tGetDate() (value int)\n}) {\n\ts.Phone = from.GetPhone()\n\ts.FirstName = from.GetFirstName()\n\ts.LastName = from.GetLastName()\n\ts.Date = from.GetDate()\n}",
"func (c *MessagesCreateChatRequest) FillFrom(from interface {\n\tGetUsers() (value []InputUserClass)\n\tGetTitle() (value string)\n\tGetTTLPeriod() (value int, ok bool)\n}) {\n\tc.Users = from.GetUsers()\n\tc.Title = from.GetTitle()\n\tif val, ok := from.GetTTLPeriod(); ok {\n\t\tc.TTLPeriod = val\n\t}\n\n}",
"func (g *UsersGetStoriesMaxIDsRequest) FillFrom(from interface {\n\tGetID() (value []InputUserClass)\n}) {\n\tg.ID = from.GetID()\n}",
"func (s *MessagesSearchCounter) FillFrom(from interface {\n\tGetInexact() (value bool)\n\tGetFilter() (value MessagesFilterClass)\n\tGetCount() (value int)\n}) {\n\ts.Inexact = from.GetInexact()\n\ts.Filter = from.GetFilter()\n\ts.Count = from.GetCount()\n}",
"func (l *LangPackString) FillFrom(from interface {\n\tGetKey() (value string)\n\tGetValue() (value string)\n}) {\n\tl.Key = from.GetKey()\n\tl.Value = from.GetValue()\n}",
"func (r *MessagesRequestEncryptionRequest) FillFrom(from interface {\n\tGetUserID() (value InputUserClass)\n\tGetRandomID() (value int)\n\tGetGA() (value []byte)\n}) {\n\tr.UserID = from.GetUserID()\n\tr.RandomID = from.GetRandomID()\n\tr.GA = from.GetGA()\n}",
"func (s *MessagesSendEncryptedServiceRequest) FillFrom(from interface {\n\tGetPeer() (value InputEncryptedChat)\n\tGetRandomID() (value int64)\n\tGetData() (value []byte)\n}) {\n\ts.Peer = from.GetPeer()\n\ts.RandomID = from.GetRandomID()\n\ts.Data = from.GetData()\n}",
"func (a *StoriesAllStories) FillFrom(from interface {\n\tGetHasMore() (value bool)\n\tGetCount() (value int)\n\tGetState() (value string)\n\tGetUserStories() (value []UserStories)\n\tGetUsers() (value []UserClass)\n\tGetStealthMode() (value StoriesStealthMode)\n}) {\n\ta.HasMore = from.GetHasMore()\n\ta.Count = from.GetCount()\n\ta.State = from.GetState()\n\ta.UserStories = from.GetUserStories()\n\ta.Users = from.GetUsers()\n\ta.StealthMode = from.GetStealthMode()\n}",
"func (a *MessagesAcceptUrlAuthRequest) FillFrom(from interface {\n\tGetWriteAllowed() (value bool)\n\tGetPeer() (value InputPeerClass)\n\tGetMsgID() (value int)\n\tGetButtonID() (value int)\n}) {\n\ta.WriteAllowed = from.GetWriteAllowed()\n\ta.Peer = from.GetPeer()\n\ta.MsgID = from.GetMsgID()\n\ta.ButtonID = from.GetButtonID()\n}",
"func (f *InteractiveFiller) Fill(v interface{}, opts fill.InteractiveFillerOpts) error {\n\tf.digManually = opts.DigManually\n\tf.bytesFromFile = opts.BytesFromFile\n\n\tmsg, ok := v.(*dynamic.Message)\n\tif !ok {\n\t\treturn fill.ErrCodecMismatch\n\t}\n\n\tf.state = initialPromptInputterState.clone()\n\terr := f.inputMessage(msg)\n\t// If io.EOF is returned, it means CTRL+d is entered.\n\t// In this case, Input skips rest fields and finishes normally.\n\tif errors.Is(err, io.EOF) {\n\t\treturn io.EOF\n\t}\n\tif errors.Is(err, prompt.ErrAbort) {\n\t\treturn nil\n\t}\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func (s *StickerSet) FillFrom(from interface {\n\tGetArchived() (value bool)\n\tGetOfficial() (value bool)\n\tGetMasks() (value bool)\n\tGetAnimated() (value bool)\n\tGetVideos() (value bool)\n\tGetEmojis() (value bool)\n\tGetInstalledDate() (value int, ok bool)\n\tGetID() (value int64)\n\tGetAccessHash() (value int64)\n\tGetTitle() (value string)\n\tGetShortName() (value string)\n\tGetThumbs() (value []PhotoSizeClass, ok bool)\n\tGetThumbDCID() (value int, ok bool)\n\tGetThumbVersion() (value int, ok bool)\n\tGetThumbDocumentID() (value int64, ok bool)\n\tGetCount() (value int)\n\tGetHash() (value int)\n}) {\n\ts.Archived = from.GetArchived()\n\ts.Official = from.GetOfficial()\n\ts.Masks = from.GetMasks()\n\ts.Animated = from.GetAnimated()\n\ts.Videos = from.GetVideos()\n\ts.Emojis = from.GetEmojis()\n\tif val, ok := from.GetInstalledDate(); ok {\n\t\ts.InstalledDate = val\n\t}\n\n\ts.ID = from.GetID()\n\ts.AccessHash = from.GetAccessHash()\n\ts.Title = from.GetTitle()\n\ts.ShortName = from.GetShortName()\n\tif val, ok := from.GetThumbs(); ok {\n\t\ts.Thumbs = val\n\t}\n\n\tif val, ok := from.GetThumbDCID(); ok {\n\t\ts.ThumbDCID = val\n\t}\n\n\tif val, ok := from.GetThumbVersion(); ok {\n\t\ts.ThumbVersion = val\n\t}\n\n\tif val, ok := from.GetThumbDocumentID(); ok {\n\t\ts.ThumbDocumentID = val\n\t}\n\n\ts.Count = from.GetCount()\n\ts.Hash = from.GetHash()\n}",
"func (g *PhoneGroupCallStreamChannels) FillFrom(from interface {\n\tGetChannels() (value []GroupCallStreamChannel)\n}) {\n\tg.Channels = from.GetChannels()\n}",
"func (c *ChannelLocation) FillFrom(from interface {\n\tGetGeoPoint() (value GeoPointClass)\n\tGetAddress() (value string)\n}) {\n\tc.GeoPoint = from.GetGeoPoint()\n\tc.Address = from.GetAddress()\n}",
"func (d *MessagesDialogsNotModified) FillFrom(from interface {\n\tGetCount() (value int)\n}) {\n\td.Count = from.GetCount()\n}",
"func (s *AccountSendVerifyPhoneCodeRequest) FillFrom(from interface {\n\tGetPhoneNumber() (value string)\n\tGetSettings() (value CodeSettings)\n}) {\n\ts.PhoneNumber = from.GetPhoneNumber()\n\ts.Settings = from.GetSettings()\n}",
"func (u *UpdateShortMessage) FillFrom(from interface {\n\tGetOut() (value bool)\n\tGetMentioned() (value bool)\n\tGetMediaUnread() (value bool)\n\tGetSilent() (value bool)\n\tGetID() (value int)\n\tGetUserID() (value int64)\n\tGetMessage() (value string)\n\tGetPts() (value int)\n\tGetPtsCount() (value int)\n\tGetDate() (value int)\n\tGetFwdFrom() (value MessageFwdHeader, ok bool)\n\tGetViaBotID() (value int64, ok bool)\n\tGetReplyTo() (value MessageReplyHeaderClass, ok bool)\n\tGetEntities() (value []MessageEntityClass, ok bool)\n\tGetTTLPeriod() (value int, ok bool)\n}) {\n\tu.Out = from.GetOut()\n\tu.Mentioned = from.GetMentioned()\n\tu.MediaUnread = from.GetMediaUnread()\n\tu.Silent = from.GetSilent()\n\tu.ID = from.GetID()\n\tu.UserID = from.GetUserID()\n\tu.Message = from.GetMessage()\n\tu.Pts = from.GetPts()\n\tu.PtsCount = from.GetPtsCount()\n\tu.Date = from.GetDate()\n\tif val, ok := from.GetFwdFrom(); ok {\n\t\tu.FwdFrom = val\n\t}\n\n\tif val, ok := from.GetViaBotID(); ok {\n\t\tu.ViaBotID = val\n\t}\n\n\tif val, ok := from.GetReplyTo(); ok {\n\t\tu.ReplyTo = val\n\t}\n\n\tif val, ok := from.GetEntities(); ok {\n\t\tu.Entities = val\n\t}\n\n\tif val, ok := from.GetTTLPeriod(); ok {\n\t\tu.TTLPeriod = val\n\t}\n\n}",
"func (c *StickersCreateStickerSetRequest) FillFrom(from interface {\n\tGetMasks() (value bool)\n\tGetAnimated() (value bool)\n\tGetVideos() (value bool)\n\tGetEmojis() (value bool)\n\tGetTextColor() (value bool)\n\tGetUserID() (value InputUserClass)\n\tGetTitle() (value string)\n\tGetShortName() (value string)\n\tGetThumb() (value InputDocumentClass, ok bool)\n\tGetStickers() (value []InputStickerSetItem)\n\tGetSoftware() (value string, ok bool)\n}) {\n\tc.Masks = from.GetMasks()\n\tc.Animated = from.GetAnimated()\n\tc.Videos = from.GetVideos()\n\tc.Emojis = from.GetEmojis()\n\tc.TextColor = from.GetTextColor()\n\tc.UserID = from.GetUserID()\n\tc.Title = from.GetTitle()\n\tc.ShortName = from.GetShortName()\n\tif val, ok := from.GetThumb(); ok {\n\t\tc.Thumb = val\n\t}\n\n\tc.Stickers = from.GetStickers()\n\tif val, ok := from.GetSoftware(); ok {\n\t\tc.Software = val\n\t}\n\n}",
"func (vec *MessagesSearchCounterVector) FillFrom(from interface {\n\tGetElems() (value []MessagesSearchCounter)\n}) {\n\tvec.Elems = from.GetElems()\n}",
"func (t *StoriesTogglePinnedRequest) FillFrom(from interface {\n\tGetID() (value []int)\n\tGetPinned() (value bool)\n}) {\n\tt.ID = from.GetID()\n\tt.Pinned = from.GetPinned()\n}",
"func (r *MessagesRequestSimpleWebViewRequest) FillFrom(from interface {\n\tGetFromSwitchWebview() (value bool)\n\tGetBot() (value InputUserClass)\n\tGetURL() (value string)\n\tGetThemeParams() (value DataJSON, ok bool)\n\tGetPlatform() (value string)\n}) {\n\tr.FromSwitchWebview = from.GetFromSwitchWebview()\n\tr.Bot = from.GetBot()\n\tr.URL = from.GetURL()\n\tif val, ok := from.GetThemeParams(); ok {\n\t\tr.ThemeParams = val\n\t}\n\n\tr.Platform = from.GetPlatform()\n}",
"func (f *FileHash) FillFrom(from interface {\n\tGetOffset() (value int64)\n\tGetLimit() (value int)\n\tGetHash() (value []byte)\n}) {\n\tf.Offset = from.GetOffset()\n\tf.Limit = from.GetLimit()\n\tf.Hash = from.GetHash()\n}",
"func (s *MessagesSentEncryptedFile) FillFrom(from interface {\n\tGetDate() (value int)\n\tGetFile() (value EncryptedFileClass)\n}) {\n\ts.Date = from.GetDate()\n\ts.File = from.GetFile()\n}",
"func (u *UpdateShortChatMessage) FillFrom(from interface {\n\tGetOut() (value bool)\n\tGetMentioned() (value bool)\n\tGetMediaUnread() (value bool)\n\tGetSilent() (value bool)\n\tGetID() (value int)\n\tGetFromID() (value int64)\n\tGetChatID() (value int64)\n\tGetMessage() (value string)\n\tGetPts() (value int)\n\tGetPtsCount() (value int)\n\tGetDate() (value int)\n\tGetFwdFrom() (value MessageFwdHeader, ok bool)\n\tGetViaBotID() (value int64, ok bool)\n\tGetReplyTo() (value MessageReplyHeaderClass, ok bool)\n\tGetEntities() (value []MessageEntityClass, ok bool)\n\tGetTTLPeriod() (value int, ok bool)\n}) {\n\tu.Out = from.GetOut()\n\tu.Mentioned = from.GetMentioned()\n\tu.MediaUnread = from.GetMediaUnread()\n\tu.Silent = from.GetSilent()\n\tu.ID = from.GetID()\n\tu.FromID = from.GetFromID()\n\tu.ChatID = from.GetChatID()\n\tu.Message = from.GetMessage()\n\tu.Pts = from.GetPts()\n\tu.PtsCount = from.GetPtsCount()\n\tu.Date = from.GetDate()\n\tif val, ok := from.GetFwdFrom(); ok {\n\t\tu.FwdFrom = val\n\t}\n\n\tif val, ok := from.GetViaBotID(); ok {\n\t\tu.ViaBotID = val\n\t}\n\n\tif val, ok := from.GetReplyTo(); ok {\n\t\tu.ReplyTo = val\n\t}\n\n\tif val, ok := from.GetEntities(); ok {\n\t\tu.Entities = val\n\t}\n\n\tif val, ok := from.GetTTLPeriod(); ok {\n\t\tu.TTLPeriod = val\n\t}\n\n}",
"func (s *StatsGraph) FillFrom(from interface {\n\tGetJSON() (value DataJSON)\n\tGetZoomToken() (value string, ok bool)\n}) {\n\ts.JSON = from.GetJSON()\n\tif val, ok := from.GetZoomToken(); ok {\n\t\ts.ZoomToken = val\n\t}\n\n}",
"func (g *AccountGetWallPapersRequest) FillFrom(from interface {\n\tGetHash() (value int64)\n}) {\n\tg.Hash = from.GetHash()\n}",
"func (s *StatsGraphAsync) FillFrom(from interface {\n\tGetToken() (value string)\n}) {\n\ts.Token = from.GetToken()\n}",
"func (a *UserAuthPassword) FillFrom(from interface {\n\tGetPwd() (value string)\n}) {\n\ta.Pwd = from.GetPwd()\n}",
"func (g *MessagesGetDiscussionMessageRequest) FillFrom(from interface {\n\tGetPeer() (value InputPeerClass)\n\tGetMsgID() (value int)\n}) {\n\tg.Peer = from.GetPeer()\n\tg.MsgID = from.GetMsgID()\n}",
"func (g *MessagesGetEmojiGroupsRequest) FillFrom(from interface {\n\tGetHash() (value int)\n}) {\n\tg.Hash = from.GetHash()\n}",
"func (c *StickersChangeStickerRequest) FillFrom(from interface {\n\tGetSticker() (value InputDocumentClass)\n\tGetEmoji() (value string, ok bool)\n\tGetMaskCoords() (value MaskCoords, ok bool)\n\tGetKeywords() (value string, ok bool)\n}) {\n\tc.Sticker = from.GetSticker()\n\tif val, ok := from.GetEmoji(); ok {\n\t\tc.Emoji = val\n\t}\n\n\tif val, ok := from.GetMaskCoords(); ok {\n\t\tc.MaskCoords = val\n\t}\n\n\tif val, ok := from.GetKeywords(); ok {\n\t\tc.Keywords = val\n\t}\n\n}",
"func (p *PageListOrderedItemText) FillFrom(from interface {\n\tGetNum() (value string)\n\tGetText() (value RichTextClass)\n}) {\n\tp.Num = from.GetNum()\n\tp.Text = from.GetText()\n}",
"func (listener *WinRMListener) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {\n\ttypedInput, ok := armInput.(WinRMListener_ARM)\n\tif !ok {\n\t\treturn fmt.Errorf(\"unexpected type supplied for PopulateFromARM() function. Expected WinRMListener_ARM, got %T\", armInput)\n\t}\n\n\t// Set property \"CertificateUrl\":\n\tif typedInput.CertificateUrl != nil {\n\t\tcertificateUrl := *typedInput.CertificateUrl\n\t\tlistener.CertificateUrl = &certificateUrl\n\t}\n\n\t// Set property \"Protocol\":\n\tif typedInput.Protocol != nil {\n\t\tprotocol := *typedInput.Protocol\n\t\tlistener.Protocol = &protocol\n\t}\n\n\t// No error\n\treturn nil\n}",
"func (e *EmojiURL) FillFrom(from interface {\n\tGetURL() (value string)\n}) {\n\te.URL = from.GetURL()\n}",
"func (p *PaymentsPaymentForm) FillFrom(from interface {\n\tGetCanSaveCredentials() (value bool)\n\tGetPasswordMissing() (value bool)\n\tGetFormID() (value int64)\n\tGetBotID() (value int64)\n\tGetTitle() (value string)\n\tGetDescription() (value string)\n\tGetPhoto() (value WebDocumentClass, ok bool)\n\tGetInvoice() (value Invoice)\n\tGetProviderID() (value int64)\n\tGetURL() (value string)\n\tGetNativeProvider() (value string, ok bool)\n\tGetNativeParams() (value DataJSON, ok bool)\n\tGetAdditionalMethods() (value []PaymentFormMethod, ok bool)\n\tGetSavedInfo() (value PaymentRequestedInfo, ok bool)\n\tGetSavedCredentials() (value []PaymentSavedCredentialsCard, ok bool)\n\tGetUsers() (value []UserClass)\n}) {\n\tp.CanSaveCredentials = from.GetCanSaveCredentials()\n\tp.PasswordMissing = from.GetPasswordMissing()\n\tp.FormID = from.GetFormID()\n\tp.BotID = from.GetBotID()\n\tp.Title = from.GetTitle()\n\tp.Description = from.GetDescription()\n\tif val, ok := from.GetPhoto(); ok {\n\t\tp.Photo = val\n\t}\n\n\tp.Invoice = from.GetInvoice()\n\tp.ProviderID = from.GetProviderID()\n\tp.URL = from.GetURL()\n\tif val, ok := from.GetNativeProvider(); ok {\n\t\tp.NativeProvider = val\n\t}\n\n\tif val, ok := from.GetNativeParams(); ok {\n\t\tp.NativeParams = val\n\t}\n\n\tif val, ok := from.GetAdditionalMethods(); ok {\n\t\tp.AdditionalMethods = val\n\t}\n\n\tif val, ok := from.GetSavedInfo(); ok {\n\t\tp.SavedInfo = val\n\t}\n\n\tif val, ok := from.GetSavedCredentials(); ok {\n\t\tp.SavedCredentials = val\n\t}\n\n\tp.Users = from.GetUsers()\n}",
"func (f *FileLocation) FillFrom(from interface {\n\tGetDCID() (value int)\n\tGetVolumeID() (value int64)\n\tGetLocalID() (value int)\n\tGetSecret() (value int64)\n}) {\n\tf.DCID = from.GetDCID()\n\tf.VolumeID = from.GetVolumeID()\n\tf.LocalID = from.GetLocalID()\n\tf.Secret = from.GetSecret()\n}",
"func (g *UsersGetFullUserRequest) FillFrom(from interface {\n\tGetID() (value InputUserClass)\n}) {\n\tg.ID = from.GetID()\n}",
"func (g *MessagesGetPeerSettingsRequest) FillFrom(from interface {\n\tGetPeer() (value InputPeerClass)\n}) {\n\tg.Peer = from.GetPeer()\n}",
"func (ec *EC) Fill(in interface{}) (err error) {\n\tv := reflect.ValueOf(in)\n\tif v.Kind() != reflect.Ptr {\n\t\treturn ErrNotPtr\n\t\t// requires 1.13\n\t\t// return fmt.Errorf(\"%w: %s\", ErrNotPtr, v.Kind())\n\t}\n\tstv := reflect.Indirect(v)\n\tif stv.Kind() != reflect.Struct {\n\t\treturn ErrNotSt\n\t\t// requires 1.13\n\t\t// return fmt.Errorf(\"%w: %s\", ErrNotSt, stv.Kind())\n\t}\n\tst := stv.Type()\n\terr = ec.fillFields(st, stv, \"\")\n\treturn\n}",
"func (r *ChannelsReorderPinnedForumTopicsRequest) FillFrom(from interface {\n\tGetForce() (value bool)\n\tGetChannel() (value InputChannelClass)\n\tGetOrder() (value []int)\n}) {\n\tr.Force = from.GetForce()\n\tr.Channel = from.GetChannel()\n\tr.Order = from.GetOrder()\n}",
"func (a *StoriesAllStoriesNotModified) FillFrom(from interface {\n\tGetState() (value string)\n\tGetStealthMode() (value StoriesStealthMode)\n}) {\n\ta.State = from.GetState()\n\ta.StealthMode = from.GetStealthMode()\n}",
"func (b *AuthBindTempAuthKeyRequest) FillFrom(from interface {\n\tGetPermAuthKeyID() (value int64)\n\tGetNonce() (value int64)\n\tGetExpiresAt() (value int)\n\tGetEncryptedMessage() (value []byte)\n}) {\n\tb.PermAuthKeyID = from.GetPermAuthKeyID()\n\tb.Nonce = from.GetNonce()\n\tb.ExpiresAt = from.GetExpiresAt()\n\tb.EncryptedMessage = from.GetEncryptedMessage()\n}",
"func (g *MessagesGetCustomEmojiDocumentsRequest) FillFrom(from interface {\n\tGetDocumentID() (value []int64)\n}) {\n\tg.DocumentID = from.GetDocumentID()\n}",
"func (i *InputThemeSettings) FillFrom(from interface {\n\tGetMessageColorsAnimated() (value bool)\n\tGetBaseTheme() (value BaseThemeClass)\n\tGetAccentColor() (value int)\n\tGetOutboxAccentColor() (value int, ok bool)\n\tGetMessageColors() (value []int, ok bool)\n\tGetWallpaper() (value InputWallPaperClass, ok bool)\n\tGetWallpaperSettings() (value WallPaperSettings, ok bool)\n}) {\n\ti.MessageColorsAnimated = from.GetMessageColorsAnimated()\n\ti.BaseTheme = from.GetBaseTheme()\n\ti.AccentColor = from.GetAccentColor()\n\tif val, ok := from.GetOutboxAccentColor(); ok {\n\t\ti.OutboxAccentColor = val\n\t}\n\n\tif val, ok := from.GetMessageColors(); ok {\n\t\ti.MessageColors = val\n\t}\n\n\tif val, ok := from.GetWallpaper(); ok {\n\t\ti.Wallpaper = val\n\t}\n\n\tif val, ok := from.GetWallpaperSettings(); ok {\n\t\ti.WallpaperSettings = val\n\t}\n\n}",
"func (s *SponsoredWebPage) FillFrom(from interface {\n\tGetURL() (value string)\n\tGetSiteName() (value string)\n\tGetPhoto() (value PhotoClass, ok bool)\n}) {\n\ts.URL = from.GetURL()\n\ts.SiteName = from.GetSiteName()\n\tif val, ok := from.GetPhoto(); ok {\n\t\ts.Photo = val\n\t}\n\n}",
"func Fill(obj interface{}) {\n\tif reflect.TypeOf(obj).Kind() != reflect.Ptr {\n\t\tlog.Panic(\"panic at [md5login/filler] : obj kind passed to Fill should be Ptr\")\n\t}\n\tv := reflect.TypeOf(obj).Elem()\n\ts := reflect.ValueOf(obj).Elem()\n\tfor i := 0; i < v.NumField(); i++ {\n\t\tcurrentField := v.Field(i)\n\t\ttag := currentField.Tag.Get(tagName)\n\t\tif tag == emptyTag || tag == ignoreTag {\n\t\t\tcontinue\n\t\t}\n\t\tt, elm := parseTag(tag)\n\t\tfor _, filter := range fillers {\n\t\t\tvar elmValue interface{}\n\t\t\tif filter.Tag == t {\n\t\t\t\tif elm != \"\" {\n\t\t\t\t\telmValue = s.FieldByName(elm).Interface()\n\t\t\t\t}\n\t\t\t\tres, err := filter.Fn(elmValue)\n\t\t\t\tif err != nil {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif s.FieldByName(currentField.Name).CanSet() {\n\t\t\t\t\ts.FieldByName(currentField.Name).Set(reflect.ValueOf(res))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}",
"func (t *MessagesTranslateTextRequest) FillFrom(from interface {\n\tGetPeer() (value InputPeerClass, ok bool)\n\tGetID() (value []int, ok bool)\n\tGetText() (value []TextWithEntities, ok bool)\n\tGetToLang() (value string)\n}) {\n\tif val, ok := from.GetPeer(); ok {\n\t\tt.Peer = val\n\t}\n\n\tif val, ok := from.GetID(); ok {\n\t\tt.ID = val\n\t}\n\n\tif val, ok := from.GetText(); ok {\n\t\tt.Text = val\n\t}\n\n\tt.ToLang = from.GetToLang()\n}"
] |
[
"0.61358523",
"0.6103557",
"0.60135645",
"0.5946528",
"0.5925604",
"0.5924813",
"0.5901469",
"0.58489656",
"0.58470464",
"0.57705593",
"0.5765602",
"0.5756197",
"0.57481086",
"0.57037634",
"0.56513953",
"0.5646895",
"0.56391966",
"0.56328183",
"0.5588158",
"0.55641115",
"0.5543528",
"0.550166",
"0.5494219",
"0.5486579",
"0.54863554",
"0.54733616",
"0.5450122",
"0.5429417",
"0.5423953",
"0.541777",
"0.54147136",
"0.54126394",
"0.5383306",
"0.53822154",
"0.5373444",
"0.53696847",
"0.5369152",
"0.5340565",
"0.53373116",
"0.5334787",
"0.5305307",
"0.53033274",
"0.5299813",
"0.52973276",
"0.5288018",
"0.5272474",
"0.52678615",
"0.52609515",
"0.5238974",
"0.52351",
"0.5171871",
"0.5154475",
"0.5143914",
"0.5140778",
"0.5131658",
"0.5130812",
"0.5121353",
"0.5116822",
"0.51120204",
"0.51003426",
"0.5075256",
"0.5073226",
"0.5065966",
"0.5060945",
"0.5052575",
"0.502679",
"0.5013698",
"0.5011127",
"0.4987456",
"0.4980026",
"0.49701422",
"0.49601084",
"0.49475038",
"0.4945047",
"0.4935533",
"0.49184415",
"0.49147376",
"0.48993668",
"0.4894292",
"0.48784783",
"0.48756233",
"0.4858637",
"0.48421946",
"0.48413706",
"0.48413646",
"0.48296228",
"0.48187786",
"0.4809076",
"0.48062205",
"0.4801761",
"0.47724935",
"0.47650108",
"0.47383225",
"0.4704184",
"0.46862197",
"0.4673212",
"0.46641433",
"0.46315137",
"0.46223563",
"0.46158105"
] |
0.8222732
|
0
|
TypeID returns type id in TL schema. See
|
func (*PollAnswerVoters) TypeID() uint32 {
return PollAnswerVotersTypeID
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (*InputIdentityDocument) TypeID() uint32 {\n\treturn InputIdentityDocumentTypeID\n}",
"func (*InputPersonalDocument) TypeID() uint32 {\n\treturn InputPersonalDocumentTypeID\n}",
"func (s *Spec) TypeID(typ Type) (TypeID, error) {\n\tif _, ok := typ.(*Void); ok {\n\t\t// Equality is weird for void, since it is a zero sized type.\n\t\treturn 0, nil\n\t}\n\n\tid, ok := s.typeIDs[typ]\n\tif !ok {\n\t\treturn 0, fmt.Errorf(\"no ID for type %s: %w\", typ, ErrNotFound)\n\t}\n\n\treturn id, nil\n}",
"func (*HelpCountryCode) TypeID() uint32 {\n\treturn HelpCountryCodeTypeID\n}",
"func (*AuthSentCode) TypeID() uint32 {\n\treturn AuthSentCodeTypeID\n}",
"func (*SecureValueTypePersonalDetails) TypeID() uint32 {\n\treturn SecureValueTypePersonalDetailsTypeID\n}",
"func (*PersonalDocument) TypeID() uint32 {\n\treturn PersonalDocumentTypeID\n}",
"func (*ProxyTypeMtproto) TypeID() uint32 {\n\treturn ProxyTypeMtprotoTypeID\n}",
"func (*BotInfo) TypeID() uint32 {\n\treturn BotInfoTypeID\n}",
"func (o *V0037DiagRpcm) GetTypeId() int32 {\n\tif o == nil || o.TypeId == nil {\n\t\tvar ret int32\n\t\treturn ret\n\t}\n\treturn *o.TypeId\n}",
"func (*CallbackQueryPayloadDataWithPassword) TypeID() uint32 {\n\treturn CallbackQueryPayloadDataWithPasswordTypeID\n}",
"func (*Int) TypeID() uint32 {\n\treturn IntTypeID\n}",
"func (*LangPackStringPluralized) TypeID() uint32 {\n\treturn LangPackStringPluralizedTypeID\n}",
"func (*LangPackString) TypeID() uint32 {\n\treturn LangPackStringTypeID\n}",
"func (*SecureValueTypePhone) TypeID() uint32 {\n\treturn SecureValueTypePhoneTypeID\n}",
"func (*CallbackQueryPayloadData) TypeID() uint32 {\n\treturn CallbackQueryPayloadDataTypeID\n}",
"func (*SecureValueTypeRentalAgreement) TypeID() uint32 {\n\treturn SecureValueTypeRentalAgreementTypeID\n}",
"func (*Count) TypeID() uint32 {\n\treturn CountTypeID\n}",
"func (*AccessPointRule) TypeID() uint32 {\n\treturn AccessPointRuleTypeID\n}",
"func (*SecureValueErrorTranslationFiles) TypeID() uint32 {\n\treturn SecureValueErrorTranslationFilesTypeID\n}",
"func (*ImportedContacts) TypeID() uint32 {\n\treturn ImportedContactsTypeID\n}",
"func (*User) TypeID() uint32 {\n\treturn UserTypeID\n}",
"func (*Bytes) TypeID() uint32 {\n\treturn BytesTypeID\n}",
"func (*PassportElementPersonalDetails) TypeID() uint32 {\n\treturn PassportElementPersonalDetailsTypeID\n}",
"func (*SecureValueErrorTranslationFile) TypeID() uint32 {\n\treturn SecureValueErrorTranslationFileTypeID\n}",
"func (*SavedPhoneContact) TypeID() uint32 {\n\treturn SavedPhoneContactTypeID\n}",
"func (*SecureValueTypeBankStatement) TypeID() uint32 {\n\treturn SecureValueTypeBankStatementTypeID\n}",
"func (*BotApp) TypeID() uint32 {\n\treturn BotAppTypeID\n}",
"func (*ChatInviteLinkInfo) TypeID() uint32 {\n\treturn ChatInviteLinkInfoTypeID\n}",
"func (*MessagesSponsoredMessages) TypeID() uint32 {\n\treturn MessagesSponsoredMessagesTypeID\n}",
"func (*CallbackQueryPayloadGame) TypeID() uint32 {\n\treturn CallbackQueryPayloadGameTypeID\n}",
"func (*PassportRequiredElement) TypeID() uint32 {\n\treturn PassportRequiredElementTypeID\n}",
"func (*NotifyForumTopic) TypeID() uint32 {\n\treturn NotifyForumTopicTypeID\n}",
"func (*MessagesSearchCounter) TypeID() uint32 {\n\treturn MessagesSearchCounterTypeID\n}",
"func (*SecureValueErrorFiles) TypeID() uint32 {\n\treturn SecureValueErrorFilesTypeID\n}",
"func (tid TypeID) ID() TypeID {\n\treturn tid\n}",
"func (*GetLanguagePackStringRequest) TypeID() uint32 {\n\treturn GetLanguagePackStringRequestTypeID\n}",
"func (*SecureValueErrorData) TypeID() uint32 {\n\treturn SecureValueErrorDataTypeID\n}",
"func (*StatsGraph) TypeID() uint32 {\n\treturn StatsGraphTypeID\n}",
"func (i ID) Type() string {\n\tstuff := strings.Split(i.String(), \"/\")\n\treturn stuff[0]\n}",
"func (*MessagesSearchCounterVector) TypeID() uint32 {\n\treturn MessagesSearchCounterVectorTypeID\n}",
"func (*UsersGetStoriesMaxIDsRequest) TypeID() uint32 {\n\treturn UsersGetStoriesMaxIDsRequestTypeID\n}",
"func (*MessageInteractionInfo) TypeID() uint32 {\n\treturn MessageInteractionInfoTypeID\n}",
"func (*SecureValueTypeAddress) TypeID() uint32 {\n\treturn SecureValueTypeAddressTypeID\n}",
"func (*PassportElementEmailAddress) TypeID() uint32 {\n\treturn PassportElementEmailAddressTypeID\n}",
"func (*UpdateShortSentMessage) TypeID() uint32 {\n\treturn UpdateShortSentMessageTypeID\n}",
"func (*SecureValueTypeUtilityBill) TypeID() uint32 {\n\treturn SecureValueTypeUtilityBillTypeID\n}",
"func (*UpdateShortMessage) TypeID() uint32 {\n\treturn UpdateShortMessageTypeID\n}",
"func (*NetworkStatistics) TypeID() uint32 {\n\treturn NetworkStatisticsTypeID\n}",
"func (*UserAuth) TypeID() uint32 {\n\treturn UserAuthTypeID\n}",
"func (*SecureValueTypeIdentityCard) TypeID() uint32 {\n\treturn SecureValueTypeIdentityCardTypeID\n}",
"func (*UpdateShort) TypeID() uint32 {\n\treturn UpdateShortTypeID\n}",
"func (*GetStoryRequest) TypeID() uint32 {\n\treturn GetStoryRequestTypeID\n}",
"func (*LangPackStringDeleted) TypeID() uint32 {\n\treturn LangPackStringDeletedTypeID\n}",
"func (*StorageFileWebp) TypeID() uint32 {\n\treturn StorageFileWebpTypeID\n}",
"func (*PassportElementBankStatement) TypeID() uint32 {\n\treturn PassportElementBankStatementTypeID\n}",
"func (*NetworkTypeNone) TypeID() uint32 {\n\treturn NetworkTypeNoneTypeID\n}",
"func (*InputCheckPasswordSRP) TypeID() uint32 {\n\treturn InputCheckPasswordSRPTypeID\n}",
"func (*SecureValueErrorSelfie) TypeID() uint32 {\n\treturn SecureValueErrorSelfieTypeID\n}",
"func (*PassportElementRentalAgreement) TypeID() uint32 {\n\treturn PassportElementRentalAgreementTypeID\n}",
"func (*SecureValueTypeEmail) TypeID() uint32 {\n\treturn SecureValueTypeEmailTypeID\n}",
"func (*EncryptedChatRequested) TypeID() uint32 {\n\treturn EncryptedChatRequestedTypeID\n}",
"func (*InvokeWithTraceRequest) TypeID() uint32 {\n\treturn InvokeWithTraceRequestTypeID\n}",
"func (*UpdatesTooLong) TypeID() uint32 {\n\treturn UpdatesTooLongTypeID\n}",
"func (*HTTPURL) TypeID() uint32 {\n\treturn HTTPURLTypeID\n}",
"func (*ExportedStoryLink) TypeID() uint32 {\n\treturn ExportedStoryLinkTypeID\n}",
"func (*FoundChatMessages) TypeID() uint32 {\n\treturn FoundChatMessagesTypeID\n}",
"func (*SecureValueError) TypeID() uint32 {\n\treturn SecureValueErrorTypeID\n}",
"func (*InputInlineQueryResultContact) TypeID() uint32 {\n\treturn InputInlineQueryResultContactTypeID\n}",
"func (*InputThemeSettings) TypeID() uint32 {\n\treturn InputThemeSettingsTypeID\n}",
"func (*GetLoginURLInfoRequest) TypeID() uint32 {\n\treturn GetLoginURLInfoRequestTypeID\n}",
"func (*SponsoredWebPage) TypeID() uint32 {\n\treturn SponsoredWebPageTypeID\n}",
"func (*ParseTextEntitiesRequest) TypeID() uint32 {\n\treturn ParseTextEntitiesRequestTypeID\n}",
"func (*SecureValueErrorFile) TypeID() uint32 {\n\treturn SecureValueErrorFileTypeID\n}",
"func (*AuthSentCodeSuccess) TypeID() uint32 {\n\treturn AuthSentCodeSuccessTypeID\n}",
"func (*SecureValueErrorFrontSide) TypeID() uint32 {\n\treturn SecureValueErrorFrontSideTypeID\n}",
"func (*PassportElementDriverLicense) TypeID() uint32 {\n\treturn PassportElementDriverLicenseTypeID\n}",
"func (*EncryptedChat) TypeID() uint32 {\n\treturn EncryptedChatTypeID\n}",
"func (*SecureValueTypeInternalPassport) TypeID() uint32 {\n\treturn SecureValueTypeInternalPassportTypeID\n}",
"func (*PassportElementIdentityCard) TypeID() uint32 {\n\treturn PassportElementIdentityCardTypeID\n}",
"func (g *generator) typeID(t reflect.Type) string {\n\tif t.Name() != \"\" {\n\t\treturn strings.ReplaceAll(g.goName(t), \".\", \"_\")\n\t}\n\tswitch t.Kind() {\n\tcase reflect.Slice:\n\t\treturn \"slice_\" + g.typeID(t.Elem())\n\tcase reflect.Array:\n\t\treturn fmt.Sprintf(\"array_%d_%s\", t.Len(), g.typeID(t.Elem()))\n\tcase reflect.Map:\n\t\treturn fmt.Sprintf(\"map_%s__%s\", g.typeID(t.Key()), g.typeID(t.Elem()))\n\tcase reflect.Ptr:\n\t\treturn \"ptr_\" + g.typeID(t.Elem())\n\tdefault:\n\t\treturn typeIDReplacer.Replace(g.goName(t))\n\t}\n}",
"func (*SecureValueTypeDriverLicense) TypeID() uint32 {\n\treturn SecureValueTypeDriverLicenseTypeID\n}",
"func (*FileHash) TypeID() uint32 {\n\treturn FileHashTypeID\n}",
"func (*UserLink) TypeID() uint32 {\n\treturn UserLinkTypeID\n}",
"func (*PassportElementAddress) TypeID() uint32 {\n\treturn PassportElementAddressTypeID\n}",
"func (*IntSchema) Type() int {\n\treturn Int\n}",
"func (*UserStories) TypeID() uint32 {\n\treturn UserStoriesTypeID\n}",
"func (*InputInlineQueryResultDocument) TypeID() uint32 {\n\treturn InputInlineQueryResultDocumentTypeID\n}",
"func (*StorageFilePdf) TypeID() uint32 {\n\treturn StorageFilePdfTypeID\n}",
"func (*NetworkTypeMobile) TypeID() uint32 {\n\treturn NetworkTypeMobileTypeID\n}",
"func (*MessagesTranslateTextRequest) TypeID() uint32 {\n\treturn MessagesTranslateTextRequestTypeID\n}",
"func (*MessagesSentEncryptedFile) TypeID() uint32 {\n\treturn MessagesSentEncryptedFileTypeID\n}",
"func (*ChatParticipantCreator) TypeID() uint32 {\n\treturn ChatParticipantCreatorTypeID\n}",
"func (*ChannelLocation) TypeID() uint32 {\n\treturn ChannelLocationTypeID\n}",
"func (*FileLocation) TypeID() uint32 {\n\treturn FileLocationTypeID\n}",
"func (*SecureValueTypeTemporaryRegistration) TypeID() uint32 {\n\treturn SecureValueTypeTemporaryRegistrationTypeID\n}",
"func (*StorageFileUnknown) TypeID() uint32 {\n\treturn StorageFileUnknownTypeID\n}",
"func (*NotifyUsers) TypeID() uint32 {\n\treturn NotifyUsersTypeID\n}",
"func (*MessagesChatFull) TypeID() uint32 {\n\treturn MessagesChatFullTypeID\n}",
"func (mySource *Source) SourceTypeID() (param int) {\n\treturn mySource.SourceTypeIDvar\n}"
] |
[
"0.7280226",
"0.71835047",
"0.71792775",
"0.716715",
"0.71457",
"0.70380384",
"0.7017868",
"0.7009107",
"0.6988318",
"0.6955022",
"0.6943305",
"0.69288427",
"0.6890464",
"0.68785155",
"0.6865772",
"0.6848933",
"0.6848019",
"0.68476367",
"0.6843631",
"0.68369544",
"0.681974",
"0.6769168",
"0.6767807",
"0.6766676",
"0.67591083",
"0.6751039",
"0.6724642",
"0.67185056",
"0.6717554",
"0.66959137",
"0.6680148",
"0.66760075",
"0.66636056",
"0.66589284",
"0.6646344",
"0.663703",
"0.66296256",
"0.6625055",
"0.6621131",
"0.66190726",
"0.6616155",
"0.6607289",
"0.6606535",
"0.66057885",
"0.65990853",
"0.659817",
"0.65947807",
"0.6584337",
"0.65824497",
"0.6576118",
"0.65742064",
"0.6560286",
"0.6560207",
"0.65590346",
"0.6551947",
"0.6550582",
"0.65490633",
"0.6548407",
"0.6546097",
"0.65445954",
"0.6529288",
"0.65259427",
"0.6523796",
"0.65217704",
"0.65170777",
"0.6509382",
"0.6506502",
"0.650179",
"0.64980495",
"0.6497149",
"0.64924705",
"0.64883614",
"0.64811677",
"0.64774936",
"0.64727116",
"0.64691573",
"0.64678365",
"0.646758",
"0.64666843",
"0.64629215",
"0.6462807",
"0.6457818",
"0.6455485",
"0.64481205",
"0.6447599",
"0.6445569",
"0.6444546",
"0.6439797",
"0.6428213",
"0.64266473",
"0.64258105",
"0.6423326",
"0.64227635",
"0.64216423",
"0.64171493",
"0.6416823",
"0.6409014",
"0.6407525",
"0.6405153",
"0.6400288"
] |
0.64209044
|
94
|
TypeName returns name of type in TL schema.
|
func (*PollAnswerVoters) TypeName() string {
return "pollAnswerVoters"
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func TypeName(t Type) *string {\n\tfor {\n\t\tswitch tt := t.(type) {\n\t\tcase TName:\n\t\t\treturn &tt.TypeName\n\t\tcase TInterface:\n\t\t\treturn nil\n\t\tcase TMap:\n\t\t\treturn nil\n\t\tdefault:\n\t\t\tnext, ok := tt.(LinearType)\n\t\t\tif !ok {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tt = next.NextType()\n\t\t}\n\t}\n}",
"func (t DataType) TypeName() string { return typeNames[t] }",
"func TypeName(typ reflect.Type) string {\n\tname := PkgPathQualifiedTypeName(typ)\n\tif name == \"\" {\n\t\tname = typ.String()\n\t}\n\treturn name\n}",
"func GetTypeName(tau TypeT) string {\n\t//FIXME: check if the name needs to be freed\n\treturn C.GoString(C.yices_get_type_name(C.type_t(tau)))\n}",
"func (f *Field) TypeName() string {\n\treturn typeName(f.Type)\n}",
"func GetTypeName(v interface{}) string {\n\treturn GetType(v).Name()\n}",
"func (t *TypeSpecDef) TypeName() string {\n\tif ignoreNameOverride(t.TypeSpec.Name.Name) {\n\t\treturn t.TypeSpec.Name.Name[1:]\n\t} else if t.TypeSpec.Comment != nil {\n\t\t// get alias from comment '// @name '\n\t\tconst regexCaseInsensitive = \"(?i)\"\n\t\treTypeName, err := regexp.Compile(regexCaseInsensitive + `^@name\\s+(\\S+)`)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\tfor _, comment := range t.TypeSpec.Comment.List {\n\t\t\ttrimmedComment := strings.TrimSpace(strings.TrimLeft(comment.Text, \"/\"))\n\t\t\ttexts := reTypeName.FindStringSubmatch(trimmedComment)\n\t\t\tif len(texts) > 1 {\n\t\t\t\treturn texts[1]\n\t\t\t}\n\t\t}\n\t}\n\n\tvar names []string\n\tif t.NotUnique {\n\t\tpkgPath := strings.Map(func(r rune) rune {\n\t\t\tif r == '\\\\' || r == '/' || r == '.' {\n\t\t\t\treturn '_'\n\t\t\t}\n\t\t\treturn r\n\t\t}, t.PkgPath)\n\t\tnames = append(names, pkgPath)\n\t} else {\n\t\tnames = append(names, t.File.Name.Name)\n\t}\n\tif parentFun, ok := (t.ParentSpec).(*ast.FuncDecl); ok && parentFun != nil {\n\t\tnames = append(names, parentFun.Name.Name)\n\t}\n\tnames = append(names, t.TypeSpec.Name.Name)\n\treturn fullTypeName(names...)\n}",
"func (t colType) databaseTypeName() string {\n\tif !t.valid {\n\t\treturn \"\"\n\t}\n\treturn t.encodingProps.name\n}",
"func (t *VLStr) TypeName() string {\n\treturn \"VLStr\"\n}",
"func TypeName(x interface{}) string {\n\treturn strings.ToLower(reflect.Indirect(reflect.ValueOf(x)).Type().Name())\n}",
"func MessageTypeName(typ int) string {\n\tfor name, value := range MessageTypeNames {\n\t\tif value == typ {\n\t\t\treturn name\n\t\t}\n\t}\n\n\treturn strconv.Itoa(typ)\n}",
"func TypeName(type_ Type) string {\n\tc_type := (C.GType)(type_)\n\n\tretC := C.g_type_name(c_type)\n\tretGo := C.GoString(retC)\n\n\treturn retGo\n}",
"func (s Settings) TypeName() string {\n\treturn naming.PascalCase(s.enumType)\n}",
"func getTypeName(t interface{}) (string, error) {\n\tswitch typ := t.(type) {\n\t// Primitive / known type, return t\n\tcase string:\n\t\treturn typ, nil\n\t// Record type, construct name from record name and optionally namespace\n\tcase map[string]interface{}:\n\t\tvar pkg, name string\n\t\tvar ok bool\n\n\t\tif name, ok = typ[\"name\"].(string); !ok {\n\t\t\treturn \"\", errors.New(\"invalid name provided\")\n\t\t}\n\n\t\tif typ[\"namespace\"] != nil {\n\t\t\tif pkg, ok = typ[\"namespace\"].(string); !ok {\n\t\t\t\treturn \"\", errors.New(\"invalid namespace provided\")\n\t\t\t}\n\n\t\t\treturn fmt.Sprintf(\"%s.%s\", pkg, name), nil\n\t\t}\n\t\treturn name, nil\n\t}\n\treturn \"\", errors.New(\"unrecognized type\")\n}",
"func (g *grpc) typeName(str string) string {\n\treturn g.gen.TypeName(g.objectNamed(str))\n}",
"func (t *VLDblStr) TypeName() string {\n\treturn \"VLDblStr\"\n}",
"func (t *VLStrStr) TypeName() string {\n\treturn \"VLStrStr\"\n}",
"func (t *liverpc) goTypeName(protoName string) string {\n\tdef := t.reg.MessageDefinition(protoName)\n\tif def == nil {\n\t\tgen.Fail(\"could not find message for\", protoName)\n\t}\n\n\tvar prefix string\n\tif pkg := t.goPackageName(def.File); pkg != t.genPkgName {\n\t\tprefix = pkg + \".\"\n\t}\n\n\tvar name string\n\tfor _, parent := range def.Lineage() {\n\t\tname += parent.Descriptor.GetName() + \"_\"\n\t}\n\tname += def.Descriptor.GetName()\n\treturn prefix + name\n}",
"func (*ProxyTypeMtproto) TypeName() string {\n\treturn \"proxyTypeMtproto\"\n}",
"func GoTypeName(t design.DataType, tabs int) string {\n\treturn GoPackageTypeName(t, false, \"\", tabs)\n}",
"func (t Type) Name() string {\n\treturn schemas[t%EvCount].Name\n}",
"func (t *VMStrStr) TypeName() string {\n\treturn \"VMStrStr\"\n}",
"func (a *BaseAggregateSourced) GetTypeName() string {\n\treturn a.TypeName\n}",
"func (n Name) Type() string {\n\t_, t := n.GetLookupAndType()\n\treturn t\n}",
"func (t *VSStr) TypeName() string {\n\treturn \"VSStr\"\n}",
"func (*StringSchema) GetName() string {\n\treturn typeString\n}",
"func (t *VMStrTPStrStr) TypeName() string {\n\treturn \"VMStrTPStrStr\"\n}",
"func (g *Generator) goTypeName(protoPkg, protoName string) string {\n\tif ti, ok := g.types[protoName]; ok {\n\t\treturn ti.RelativeName(protoPkg)\n\t}\n\tpanic(\"unknown type: \" + protoName)\n}",
"func (nb *NetBooter) TypeName() string {\n\treturn nb.Type\n}",
"func (t *VLIntStr) TypeName() string {\n\treturn \"VLIntStr\"\n}",
"func (t *VLDbl) TypeName() string {\n\treturn \"VLDbl\"\n}",
"func (t *VTDblStr) TypeName() string {\n\treturn \"VTDblStr\"\n}",
"func (t *VSDblStr) TypeName() string {\n\treturn \"VSDblStr\"\n}",
"func (ExfatFileNameDirectoryEntry) TypeName() string {\n\treturn \"FileName\"\n}",
"func (*LangPackString) TypeName() string {\n\treturn \"langPackString\"\n}",
"func (o ApiOperationRequestHeaderOutput) TypeName() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v ApiOperationRequestHeader) *string { return v.TypeName }).(pulumi.StringPtrOutput)\n}",
"func (t *VMIntTPStrStr) TypeName() string {\n\treturn \"VMIntTPStrStr\"\n}",
"func (o ApiOperationRequestRepresentationOutput) TypeName() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v ApiOperationRequestRepresentation) *string { return v.TypeName }).(pulumi.StringPtrOutput)\n}",
"func (d *dubbogo) typeName(str string) string {\n return d.gen.TypeName(d.objectNamed(str))\n}",
"func (g *Generator) TypeName(obj Object) string {\n\treturn g.DefaultPackageName(obj) + CamelCaseSlice(obj.TypeName())\n}",
"func (e *Event) GetTypeName() string {\n\treturn e.GetType().GetName()\n}",
"func (*LangPackStringPluralized) TypeName() string {\n\treturn \"langPackStringPluralized\"\n}",
"func (*GetLanguagePackStringRequest) TypeName() string {\n\treturn \"getLanguagePackString\"\n}",
"func (t *VMStrTPStrInt) TypeName() string {\n\treturn \"VMStrTPStrInt\"\n}",
"func (t *VSStrStr) TypeName() string {\n\treturn \"VSStrStr\"\n}",
"func NewTypeName(name string, typ Type) *TypeName {\n\treturn &TypeName{object: object{scope: nil, name: name, typ: typ}}\n}",
"func (t *VLStrInt) TypeName() string {\n\treturn \"VLStrInt\"\n}",
"func (t *VMStrTPIntStr) TypeName() string {\n\treturn \"VMStrTPIntStr\"\n}",
"func (t *VSDbl) TypeName() string {\n\treturn \"VSDbl\"\n}",
"func (f *FieldSet) DatabaseTypeName(idx int) string {\n\treturn f.fields[idx].typeCode().typeName()\n}",
"func (r *Thing) ThingTypeName() pulumi.StringOutput {\n\treturn (pulumi.StringOutput)(r.s.State[\"thingTypeName\"])\n}",
"func (t *VLStrDbl) TypeName() string {\n\treturn \"VLStrDbl\"\n}",
"func handlerTypeName(handler ResourceHandler) string {\n\trulesType := handler.Rules().ResourceType()\n\tif rulesType == nil {\n\t\treturn handler.ResourceName()\n\t}\n\n\treturn resourceTypeName(rulesType.String())\n}",
"func (i *StringIterator) TypeName() string {\n\treturn \"string-iterator\"\n}",
"func (t *VTStrStr) TypeName() string {\n\treturn \"VTStrStr\"\n}",
"func (s PersonSerializer) TypeName() string {\n\treturn \"Person\"\n}",
"func (t Type) Type() string {\n\treturn t.typeName\n}",
"func (t *VSIntStr) TypeName() string {\n\treturn \"VSIntStr\"\n}",
"func (def TypeDefinition) Name() InternalTypeName {\n\treturn def.name\n}",
"func (t *VTIntStr) TypeName() string {\n\treturn \"VTIntStr\"\n}",
"func (o ApiOperationRequestQueryParameterOutput) TypeName() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v ApiOperationRequestQueryParameter) *string { return v.TypeName }).(pulumi.StringPtrOutput)\n}",
"func (t *TypeValue) TypeName() string {\n\treturn t.name\n}",
"func typeName(typ string) string {\n\tif typ[0] == '(' {\n\t\tts := strings.Split(typ[1:len(typ)-1], \",\")\n\t\tif len(ts) != 2 {\n\t\t\tlog.Fatalf(\"Tuple expect 2 arguments\")\n\t\t}\n\t\treturn \"types.NewTuple(\" + typeName(ts[0]) + \", \" + typeName(ts[1]) + \")\"\n\t}\n\tswitch typ {\n\tcase \"Flags\", \"Mem\", \"Void\", \"Int128\":\n\t\treturn \"types.Type\" + typ\n\tdefault:\n\t\treturn \"typ.\" + typ\n\t}\n}",
"func (o ApiOperationResponseHeaderOutput) TypeName() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v ApiOperationResponseHeader) *string { return v.TypeName }).(pulumi.StringPtrOutput)\n}",
"func resourceTypeName(qualifiedName string) string {\n\ti := strings.LastIndex(qualifiedName, \".\")\n\tif i < 0 {\n\t\treturn qualifiedName\n\t}\n\n\treturn qualifiedName[i+1 : len(qualifiedName)]\n}",
"func (t *VTStrInt) TypeName() string {\n\treturn \"VTStrInt\"\n}",
"func QualifiedTypeName(t DataType) string {\n\tswitch t.Kind() {\n\tcase ArrayKind:\n\t\ta := t.(*Array)\n\t\treturn fmt.Sprintf(\"%s<%s>\",\n\t\t\tt.Name(),\n\t\t\tQualifiedTypeName(a.ElemType.Type),\n\t\t)\n\tcase MapKind:\n\t\th := t.(*Map)\n\t\treturn fmt.Sprintf(\"%s<%s, %s>\",\n\t\t\tt.Name(),\n\t\t\tQualifiedTypeName(h.KeyType.Type),\n\t\t\tQualifiedTypeName(h.ElemType.Type),\n\t\t)\n\t}\n\treturn t.Name()\n}",
"func (t *TPDU) MessageTypeName() string {\n\treturn \"T-PDU\"\n}",
"func (*MessagesTranslateTextRequest) TypeName() string {\n\treturn \"messages.translateText\"\n}",
"func (*LangPackStringDeleted) TypeName() string {\n\treturn \"langPackStringDeleted\"\n}",
"func GetType(schemaID *facet.SchemaID) string {\n\n\tif schemaID.Namespace == \"pd\" {\n\t\tswitch schemaID.Name {\n\t\tcase \"host\", \"vm\", \"cloudResource\", \"computeHost\", \"discovery\":\n\t\t\treturn fmt.Sprintf(\"%s_host\", schemaID.Namespace)\n\t\t}\n\t} else {\n\t\t// some special cases. Longer term we should update the facets, to\n\t\t// provide this info.\n\t\tswitch schemaID.Name {\n\t\tcase \"computeInstance\":\n\t\t\treturn \"pd_host\"\n\t\t}\n\t}\n\n\treturn strings.Join([]string{schemaID.Namespace, schemaID.Name}, \"_\")\n}",
"func (t *VMIntTPDblStr) TypeName() string {\n\treturn \"VMIntTPDblStr\"\n}",
"func (t *VMIntTPStrDbl) TypeName() string {\n\treturn \"VMIntTPStrDbl\"\n}",
"func (t *VMIntTPIntStr) TypeName() string {\n\treturn \"VMIntTPIntStr\"\n}",
"func (t *VMIntTPStrInt) TypeName() string {\n\treturn \"VMIntTPStrInt\"\n}",
"func (t *VMStrTPStrDbl) TypeName() string {\n\treturn \"VMStrTPStrDbl\"\n}",
"func JSONSchemaType(t string) string {\n\tif m, ok := kindMap[t]; ok {\n\t\treturn m\n\t}\n\treturn t\n}",
"func (t *VMIntStr) TypeName() string {\n\treturn \"VMIntStr\"\n}",
"func (t *VLInt) TypeName() string {\n\treturn \"VLInt\"\n}",
"func (*SecureValueErrorTranslationFile) TypeName() string {\n\treturn \"secureValueErrorTranslationFile\"\n}",
"func (*ImportedContacts) TypeName() string {\n\treturn \"importedContacts\"\n}",
"func (t *VLDblInt) TypeName() string {\n\treturn \"VLDblInt\"\n}",
"func (o ApiOperationRequestRepresentationFormParameterOutput) TypeName() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v ApiOperationRequestRepresentationFormParameter) *string { return v.TypeName }).(pulumi.StringPtrOutput)\n}",
"func (o ApiOperationTemplateParameterOutput) TypeName() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v ApiOperationTemplateParameter) *string { return v.TypeName }).(pulumi.StringPtrOutput)\n}",
"func (t *VTStrDbl) TypeName() string {\n\treturn \"VTStrDbl\"\n}",
"func (t *VMStrTPDblStr) TypeName() string {\n\treturn \"VMStrTPDblStr\"\n}",
"func (*AuthSentCode) TypeName() string {\n\treturn \"auth.sentCode\"\n}",
"func (o ApiOperationResponseRepresentationOutput) TypeName() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v ApiOperationResponseRepresentation) *string { return v.TypeName }).(pulumi.StringPtrOutput)\n}",
"func (b *Base) FormatTypeName(s string) string {\n\tif nil == b.TypeNameFormatter {\n\t\treturn s\n\t}\n\n\treturn b.TypeNameFormatter.FormatName(s)\n}",
"func (nb *NullBooter) TypeName() string {\n\treturn \"null\"\n}",
"func (*MessagesSentEncryptedFile) TypeName() string {\n\treturn \"messages.sentEncryptedFile\"\n}",
"func (*MessagesSponsoredMessages) TypeName() string {\n\treturn \"messages.sponsoredMessages\"\n}",
"func (ExfatUpcaseTableDirectoryEntry) TypeName() string {\n\treturn \"UpcaseTable\"\n}",
"func (t *VLDblDbl) TypeName() string {\n\treturn \"VLDblDbl\"\n}",
"func ClearTypeName(tau TypeT) int32 {\n\treturn int32(C.yices_clear_type_name(C.type_t(tau)))\n}",
"func hclTypeName(i interface{}) string {\n\tswitch k := reflect.Indirect(reflect.ValueOf(i)).Kind(); k {\n\tcase reflect.Bool:\n\t\treturn \"boolean\"\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,\n\t\treflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32,\n\t\treflect.Uint64, reflect.Uintptr, reflect.Float32, reflect.Float64:\n\t\treturn \"number\"\n\tcase reflect.Array, reflect.Slice:\n\t\treturn \"list\"\n\tcase reflect.Map:\n\t\treturn \"map\"\n\tcase reflect.String:\n\t\treturn \"string\"\n\tdefault:\n\t\t// fall back to the Go type if there's no match\n\t\treturn k.String()\n\t}\n}",
"func (*SecureValueErrorTranslationFiles) TypeName() string {\n\treturn \"secureValueErrorTranslationFiles\"\n}",
"func (o LookupResourceDefaultVersionResultOutput) TypeName() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v LookupResourceDefaultVersionResult) *string { return v.TypeName }).(pulumi.StringPtrOutput)\n}",
"func (*InputIdentityDocument) TypeName() string {\n\treturn \"inputIdentityDocument\"\n}",
"func (t *VSInt) TypeName() string {\n\treturn \"VSInt\"\n}",
"func (*LongSchema) GetName() string {\n\treturn typeLong\n}"
] |
[
"0.7576737",
"0.7440053",
"0.72421193",
"0.7217555",
"0.71185815",
"0.7098497",
"0.69458586",
"0.68736404",
"0.6840946",
"0.68369395",
"0.6828058",
"0.67910546",
"0.67909455",
"0.6790181",
"0.6788002",
"0.6763308",
"0.67446107",
"0.6740499",
"0.67020935",
"0.6699163",
"0.6685545",
"0.6681641",
"0.66792685",
"0.66635126",
"0.66587347",
"0.6655394",
"0.664081",
"0.66374886",
"0.66363823",
"0.66089976",
"0.65991825",
"0.6589417",
"0.658632",
"0.6586283",
"0.6557884",
"0.65534854",
"0.65446067",
"0.65401256",
"0.65386707",
"0.6536439",
"0.65351677",
"0.65321803",
"0.6518388",
"0.65176165",
"0.6517247",
"0.6517139",
"0.651696",
"0.65120286",
"0.650774",
"0.650619",
"0.65042746",
"0.6501203",
"0.649325",
"0.64929044",
"0.64925224",
"0.6486069",
"0.6466613",
"0.64607304",
"0.6449026",
"0.6448487",
"0.6446067",
"0.6444271",
"0.64382035",
"0.6419951",
"0.6404249",
"0.64005613",
"0.63979954",
"0.6394632",
"0.6390701",
"0.6385727",
"0.6382981",
"0.6381121",
"0.6377776",
"0.63736004",
"0.6368521",
"0.6366776",
"0.6365011",
"0.6362591",
"0.63537997",
"0.63452184",
"0.63321567",
"0.6325763",
"0.6323724",
"0.6319324",
"0.6310232",
"0.63062024",
"0.6304361",
"0.62970614",
"0.6295757",
"0.62928754",
"0.62869024",
"0.6280704",
"0.6272456",
"0.62707704",
"0.626213",
"0.62377137",
"0.6236496",
"0.62316966",
"0.6229903",
"0.6218316",
"0.61953473"
] |
0.0
|
-1
|
TypeInfo returns info about TL type.
|
func (p *PollAnswerVoters) TypeInfo() tdp.Type {
typ := tdp.Type{
Name: "pollAnswerVoters",
ID: PollAnswerVotersTypeID,
}
if p == nil {
typ.Null = true
return typ
}
typ.Fields = []tdp.Field{
{
Name: "Chosen",
SchemaName: "chosen",
Null: !p.Flags.Has(0),
},
{
Name: "Correct",
SchemaName: "correct",
Null: !p.Flags.Has(1),
},
{
Name: "Option",
SchemaName: "option",
},
{
Name: "Voters",
SchemaName: "voters",
},
}
return typ
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (p *ProxyTypeMtproto) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"proxyTypeMtproto\",\n\t\tID: ProxyTypeMtprotoTypeID,\n\t}\n\tif p == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Secret\",\n\t\t\tSchemaName: \"secret\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (s *AuthSentCode) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"auth.sentCode\",\n\t\tID: AuthSentCodeTypeID,\n\t}\n\tif s == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Type\",\n\t\t\tSchemaName: \"type\",\n\t\t},\n\t\t{\n\t\t\tName: \"PhoneCodeHash\",\n\t\t\tSchemaName: \"phone_code_hash\",\n\t\t},\n\t\t{\n\t\t\tName: \"NextType\",\n\t\t\tSchemaName: \"next_type\",\n\t\t\tNull: !s.Flags.Has(1),\n\t\t},\n\t\t{\n\t\t\tName: \"Timeout\",\n\t\t\tSchemaName: \"timeout\",\n\t\t\tNull: !s.Flags.Has(2),\n\t\t},\n\t}\n\treturn typ\n}",
"func (c *ChatInviteLinkInfo) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"chatInviteLinkInfo\",\n\t\tID: ChatInviteLinkInfoTypeID,\n\t}\n\tif c == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"ChatID\",\n\t\t\tSchemaName: \"chat_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"AccessibleFor\",\n\t\t\tSchemaName: \"accessible_for\",\n\t\t},\n\t\t{\n\t\t\tName: \"Type\",\n\t\t\tSchemaName: \"type\",\n\t\t},\n\t\t{\n\t\t\tName: \"Title\",\n\t\t\tSchemaName: \"title\",\n\t\t},\n\t\t{\n\t\t\tName: \"Photo\",\n\t\t\tSchemaName: \"photo\",\n\t\t},\n\t\t{\n\t\t\tName: \"Description\",\n\t\t\tSchemaName: \"description\",\n\t\t},\n\t\t{\n\t\t\tName: \"MemberCount\",\n\t\t\tSchemaName: \"member_count\",\n\t\t},\n\t\t{\n\t\t\tName: \"MemberUserIDs\",\n\t\t\tSchemaName: \"member_user_ids\",\n\t\t},\n\t\t{\n\t\t\tName: \"CreatesJoinRequest\",\n\t\t\tSchemaName: \"creates_join_request\",\n\t\t},\n\t\t{\n\t\t\tName: \"IsPublic\",\n\t\t\tSchemaName: \"is_public\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (s *AuthSentCodeSuccess) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"auth.sentCodeSuccess\",\n\t\tID: AuthSentCodeSuccessTypeID,\n\t}\n\tif s == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Authorization\",\n\t\t\tSchemaName: \"authorization\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (c *CallbackQueryPayloadDataWithPassword) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"callbackQueryPayloadDataWithPassword\",\n\t\tID: CallbackQueryPayloadDataWithPasswordTypeID,\n\t}\n\tif c == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Password\",\n\t\t\tSchemaName: \"password\",\n\t\t},\n\t\t{\n\t\t\tName: \"Data\",\n\t\t\tSchemaName: \"data\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (n *NotifyUsers) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"notifyUsers\",\n\t\tID: NotifyUsersTypeID,\n\t}\n\tif n == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{}\n\treturn typ\n}",
"func (n *NotifyChats) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"notifyChats\",\n\t\tID: NotifyChatsTypeID,\n\t}\n\tif n == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{}\n\treturn typ\n}",
"func (g *Generator) GetTypeInfo(tp *fdep.DepType) TypeInfo {\n\treturn &TypeInfo_Default{\n\t\tsource: g.GetTypeSource(tp),\n\t\tconverter: g.GetTypeConverter(tp),\n\t}\n}",
"func (a *UserAuth) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"user.auth\",\n\t\tID: UserAuthTypeID,\n\t}\n\tif a == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Foo\",\n\t\t\tSchemaName: \"foo\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (g *GetLoginURLInfoRequest) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"getLoginUrlInfo\",\n\t\tID: GetLoginURLInfoRequestTypeID,\n\t}\n\tif g == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"ChatID\",\n\t\t\tSchemaName: \"chat_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"MessageID\",\n\t\t\tSchemaName: \"message_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"ButtonID\",\n\t\t\tSchemaName: \"button_id\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (n *NotifyForumTopic) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"notifyForumTopic\",\n\t\tID: NotifyForumTopicTypeID,\n\t}\n\tif n == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Peer\",\n\t\t\tSchemaName: \"peer\",\n\t\t},\n\t\t{\n\t\t\tName: \"TopMsgID\",\n\t\t\tSchemaName: \"top_msg_id\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (e *EncryptedChat) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"encryptedChat\",\n\t\tID: EncryptedChatTypeID,\n\t}\n\tif e == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"ID\",\n\t\t\tSchemaName: \"id\",\n\t\t},\n\t\t{\n\t\t\tName: \"AccessHash\",\n\t\t\tSchemaName: \"access_hash\",\n\t\t},\n\t\t{\n\t\t\tName: \"Date\",\n\t\t\tSchemaName: \"date\",\n\t\t},\n\t\t{\n\t\t\tName: \"AdminID\",\n\t\t\tSchemaName: \"admin_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"ParticipantID\",\n\t\t\tSchemaName: \"participant_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"GAOrB\",\n\t\t\tSchemaName: \"g_a_or_b\",\n\t\t},\n\t\t{\n\t\t\tName: \"KeyFingerprint\",\n\t\t\tSchemaName: \"key_fingerprint\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (n *NotifyPeer) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"notifyPeer\",\n\t\tID: NotifyPeerTypeID,\n\t}\n\tif n == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Peer\",\n\t\t\tSchemaName: \"peer\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (l *LangPackString) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"langPackString\",\n\t\tID: LangPackStringTypeID,\n\t}\n\tif l == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Key\",\n\t\t\tSchemaName: \"key\",\n\t\t},\n\t\t{\n\t\t\tName: \"Value\",\n\t\t\tSchemaName: \"value\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (a *UserAuthPassword) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"user.authPassword\",\n\t\tID: UserAuthPasswordTypeID,\n\t}\n\tif a == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Pwd\",\n\t\t\tSchemaName: \"pwd\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (s *SecureValueErrorTranslationFiles) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"secureValueErrorTranslationFiles\",\n\t\tID: SecureValueErrorTranslationFilesTypeID,\n\t}\n\tif s == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Type\",\n\t\t\tSchemaName: \"type\",\n\t\t},\n\t\t{\n\t\t\tName: \"FileHash\",\n\t\t\tSchemaName: \"file_hash\",\n\t\t},\n\t\t{\n\t\t\tName: \"Text\",\n\t\t\tSchemaName: \"text\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (e *EncryptedChatWaiting) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"encryptedChatWaiting\",\n\t\tID: EncryptedChatWaitingTypeID,\n\t}\n\tif e == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"ID\",\n\t\t\tSchemaName: \"id\",\n\t\t},\n\t\t{\n\t\t\tName: \"AccessHash\",\n\t\t\tSchemaName: \"access_hash\",\n\t\t},\n\t\t{\n\t\t\tName: \"Date\",\n\t\t\tSchemaName: \"date\",\n\t\t},\n\t\t{\n\t\t\tName: \"AdminID\",\n\t\t\tSchemaName: \"admin_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"ParticipantID\",\n\t\t\tSchemaName: \"participant_id\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (l *LangPackStringDeleted) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"langPackStringDeleted\",\n\t\tID: LangPackStringDeletedTypeID,\n\t}\n\tif l == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Key\",\n\t\t\tSchemaName: \"key\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (e *EncryptedChatRequested) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"encryptedChatRequested\",\n\t\tID: EncryptedChatRequestedTypeID,\n\t}\n\tif e == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"FolderID\",\n\t\t\tSchemaName: \"folder_id\",\n\t\t\tNull: !e.Flags.Has(0),\n\t\t},\n\t\t{\n\t\t\tName: \"ID\",\n\t\t\tSchemaName: \"id\",\n\t\t},\n\t\t{\n\t\t\tName: \"AccessHash\",\n\t\t\tSchemaName: \"access_hash\",\n\t\t},\n\t\t{\n\t\t\tName: \"Date\",\n\t\t\tSchemaName: \"date\",\n\t\t},\n\t\t{\n\t\t\tName: \"AdminID\",\n\t\t\tSchemaName: \"admin_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"ParticipantID\",\n\t\t\tSchemaName: \"participant_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"GA\",\n\t\t\tSchemaName: \"g_a\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (n *NetworkTypeWiFi) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"networkTypeWiFi\",\n\t\tID: NetworkTypeWiFiTypeID,\n\t}\n\tif n == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{}\n\treturn typ\n}",
"func (s *SecureValueTypePersonalDetails) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"secureValueTypePersonalDetails\",\n\t\tID: SecureValueTypePersonalDetailsTypeID,\n\t}\n\tif s == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{}\n\treturn typ\n}",
"func (i *InputCheckPasswordSRP) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"inputCheckPasswordSRP\",\n\t\tID: InputCheckPasswordSRPTypeID,\n\t}\n\tif i == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"SRPID\",\n\t\t\tSchemaName: \"srp_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"A\",\n\t\t\tSchemaName: \"A\",\n\t\t},\n\t\t{\n\t\t\tName: \"M1\",\n\t\t\tSchemaName: \"M1\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (c *ChatStatisticsAdministratorActionsInfo) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"chatStatisticsAdministratorActionsInfo\",\n\t\tID: ChatStatisticsAdministratorActionsInfoTypeID,\n\t}\n\tif c == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"UserID\",\n\t\t\tSchemaName: \"user_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"DeletedMessageCount\",\n\t\t\tSchemaName: \"deleted_message_count\",\n\t\t},\n\t\t{\n\t\t\tName: \"BannedUserCount\",\n\t\t\tSchemaName: \"banned_user_count\",\n\t\t},\n\t\t{\n\t\t\tName: \"RestrictedUserCount\",\n\t\t\tSchemaName: \"restricted_user_count\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (n *NetworkTypeMobile) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"networkTypeMobile\",\n\t\tID: NetworkTypeMobileTypeID,\n\t}\n\tif n == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{}\n\treturn typ\n}",
"func (c *HelpCountryCode) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"help.countryCode\",\n\t\tID: HelpCountryCodeTypeID,\n\t}\n\tif c == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"CountryCode\",\n\t\t\tSchemaName: \"country_code\",\n\t\t},\n\t\t{\n\t\t\tName: \"Prefixes\",\n\t\t\tSchemaName: \"prefixes\",\n\t\t\tNull: !c.Flags.Has(0),\n\t\t},\n\t\t{\n\t\t\tName: \"Patterns\",\n\t\t\tSchemaName: \"patterns\",\n\t\t\tNull: !c.Flags.Has(1),\n\t\t},\n\t}\n\treturn typ\n}",
"func (i *ImportedContacts) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"importedContacts\",\n\t\tID: ImportedContactsTypeID,\n\t}\n\tif i == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"UserIDs\",\n\t\t\tSchemaName: \"user_ids\",\n\t\t},\n\t\t{\n\t\t\tName: \"ImporterCount\",\n\t\t\tSchemaName: \"importer_count\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (a *AttachMenuBots) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"attachMenuBots\",\n\t\tID: AttachMenuBotsTypeID,\n\t}\n\tif a == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Hash\",\n\t\t\tSchemaName: \"hash\",\n\t\t},\n\t\t{\n\t\t\tName: \"Bots\",\n\t\t\tSchemaName: \"bots\",\n\t\t},\n\t\t{\n\t\t\tName: \"Users\",\n\t\t\tSchemaName: \"users\",\n\t\t},\n\t}\n\treturn typ\n}",
"func AllTypeInfo() *types.Info {\n\treturn &types.Info{\n\t\tTypes: make(map[ast.Expr]types.TypeAndValue),\n\t\tDefs: make(map[*ast.Ident]types.Object),\n\t\tUses: make(map[*ast.Ident]types.Object),\n\t\tImplicits: make(map[ast.Node]types.Object),\n\t\tSelections: make(map[*ast.SelectorExpr]*types.Selection),\n\t\tScopes: make(map[ast.Node]*types.Scope),\n\t}\n}",
"func (i *InputInlineQueryResultVoiceNote) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"inputInlineQueryResultVoiceNote\",\n\t\tID: InputInlineQueryResultVoiceNoteTypeID,\n\t}\n\tif i == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"ID\",\n\t\t\tSchemaName: \"id\",\n\t\t},\n\t\t{\n\t\t\tName: \"Title\",\n\t\t\tSchemaName: \"title\",\n\t\t},\n\t\t{\n\t\t\tName: \"VoiceNoteURL\",\n\t\t\tSchemaName: \"voice_note_url\",\n\t\t},\n\t\t{\n\t\t\tName: \"VoiceNoteDuration\",\n\t\t\tSchemaName: \"voice_note_duration\",\n\t\t},\n\t\t{\n\t\t\tName: \"ReplyMarkup\",\n\t\t\tSchemaName: \"reply_markup\",\n\t\t},\n\t\t{\n\t\t\tName: \"InputMessageContent\",\n\t\t\tSchemaName: \"input_message_content\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (c *ChatParticipantAdmin) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"chatParticipantAdmin\",\n\t\tID: ChatParticipantAdminTypeID,\n\t}\n\tif c == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"UserID\",\n\t\t\tSchemaName: \"user_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"InviterID\",\n\t\t\tSchemaName: \"inviter_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"Date\",\n\t\t\tSchemaName: \"date\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (f *FoundChatMessages) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"foundChatMessages\",\n\t\tID: FoundChatMessagesTypeID,\n\t}\n\tif f == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"TotalCount\",\n\t\t\tSchemaName: \"total_count\",\n\t\t},\n\t\t{\n\t\t\tName: \"Messages\",\n\t\t\tSchemaName: \"messages\",\n\t\t},\n\t\t{\n\t\t\tName: \"NextFromMessageID\",\n\t\t\tSchemaName: \"next_from_message_id\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (p *PassportElementPersonalDetails) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"passportElementPersonalDetails\",\n\t\tID: PassportElementPersonalDetailsTypeID,\n\t}\n\tif p == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"PersonalDetails\",\n\t\t\tSchemaName: \"personal_details\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (m *MessageFileTypePrivate) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"messageFileTypePrivate\",\n\t\tID: MessageFileTypePrivateTypeID,\n\t}\n\tif m == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Name\",\n\t\t\tSchemaName: \"name\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (i *InlineQueryPeerTypeChat) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"inlineQueryPeerTypeChat\",\n\t\tID: InlineQueryPeerTypeChatTypeID,\n\t}\n\tif i == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{}\n\treturn typ\n}",
"func (p *ProxyTypeHTTP) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"proxyTypeHttp\",\n\t\tID: ProxyTypeHTTPTypeID,\n\t}\n\tif p == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Username\",\n\t\t\tSchemaName: \"username\",\n\t\t},\n\t\t{\n\t\t\tName: \"Password\",\n\t\t\tSchemaName: \"password\",\n\t\t},\n\t\t{\n\t\t\tName: \"HTTPOnly\",\n\t\t\tSchemaName: \"http_only\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (s *SecureValueTypeRentalAgreement) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"secureValueTypeRentalAgreement\",\n\t\tID: SecureValueTypeRentalAgreementTypeID,\n\t}\n\tif s == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{}\n\treturn typ\n}",
"func (u *Updates) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"updates\",\n\t\tID: UpdatesTypeID,\n\t}\n\tif u == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Updates\",\n\t\t\tSchemaName: \"updates\",\n\t\t},\n\t\t{\n\t\t\tName: \"Users\",\n\t\t\tSchemaName: \"users\",\n\t\t},\n\t\t{\n\t\t\tName: \"Chats\",\n\t\t\tSchemaName: \"chats\",\n\t\t},\n\t\t{\n\t\t\tName: \"Date\",\n\t\t\tSchemaName: \"date\",\n\t\t},\n\t\t{\n\t\t\tName: \"Seq\",\n\t\t\tSchemaName: \"seq\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (g *GetConnectedWebsitesRequest) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"getConnectedWebsites\",\n\t\tID: GetConnectedWebsitesRequestTypeID,\n\t}\n\tif g == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{}\n\treturn typ\n}",
"func (m *MessageInteractionInfo) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"messageInteractionInfo\",\n\t\tID: MessageInteractionInfoTypeID,\n\t}\n\tif m == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"ViewCount\",\n\t\t\tSchemaName: \"view_count\",\n\t\t},\n\t\t{\n\t\t\tName: \"ForwardCount\",\n\t\t\tSchemaName: \"forward_count\",\n\t\t},\n\t\t{\n\t\t\tName: \"ReplyInfo\",\n\t\t\tSchemaName: \"reply_info\",\n\t\t},\n\t\t{\n\t\t\tName: \"Reactions\",\n\t\t\tSchemaName: \"reactions\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (g *GetLanguagePackStringRequest) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"getLanguagePackString\",\n\t\tID: GetLanguagePackStringRequestTypeID,\n\t}\n\tif g == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"LanguagePackDatabasePath\",\n\t\t\tSchemaName: \"language_pack_database_path\",\n\t\t},\n\t\t{\n\t\t\tName: \"LocalizationTarget\",\n\t\t\tSchemaName: \"localization_target\",\n\t\t},\n\t\t{\n\t\t\tName: \"LanguagePackID\",\n\t\t\tSchemaName: \"language_pack_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"Key\",\n\t\t\tSchemaName: \"key\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (s *MessagesSentEncryptedFile) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"messages.sentEncryptedFile\",\n\t\tID: MessagesSentEncryptedFileTypeID,\n\t}\n\tif s == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Date\",\n\t\t\tSchemaName: \"date\",\n\t\t},\n\t\t{\n\t\t\tName: \"File\",\n\t\t\tSchemaName: \"file\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (u *UserLink) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"userLink\",\n\t\tID: UserLinkTypeID,\n\t}\n\tif u == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"URL\",\n\t\t\tSchemaName: \"url\",\n\t\t},\n\t\t{\n\t\t\tName: \"ExpiresIn\",\n\t\t\tSchemaName: \"expires_in\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (g *GetLogTagsRequest) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"getLogTags\",\n\t\tID: GetLogTagsRequestTypeID,\n\t}\n\tif g == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{}\n\treturn typ\n}",
"func (u *UpdatesTooLong) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"updatesTooLong\",\n\t\tID: UpdatesTooLongTypeID,\n\t}\n\tif u == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{}\n\treturn typ\n}",
"func (g *GetForumTopicRequest) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"getForumTopic\",\n\t\tID: GetForumTopicRequestTypeID,\n\t}\n\tif g == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"ChatID\",\n\t\t\tSchemaName: \"chat_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"MessageThreadID\",\n\t\t\tSchemaName: \"message_thread_id\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (c *ChatParticipantCreator) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"chatParticipantCreator\",\n\t\tID: ChatParticipantCreatorTypeID,\n\t}\n\tif c == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"UserID\",\n\t\t\tSchemaName: \"user_id\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (c *CallbackQueryPayloadData) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"callbackQueryPayloadData\",\n\t\tID: CallbackQueryPayloadDataTypeID,\n\t}\n\tif c == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Data\",\n\t\t\tSchemaName: \"data\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (e *EncryptedChatEmpty) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"encryptedChatEmpty\",\n\t\tID: EncryptedChatEmptyTypeID,\n\t}\n\tif e == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"ID\",\n\t\t\tSchemaName: \"id\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (t *MessagesTranslateTextRequest) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"messages.translateText\",\n\t\tID: MessagesTranslateTextRequestTypeID,\n\t}\n\tif t == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Peer\",\n\t\t\tSchemaName: \"peer\",\n\t\t\tNull: !t.Flags.Has(0),\n\t\t},\n\t\t{\n\t\t\tName: \"ID\",\n\t\t\tSchemaName: \"id\",\n\t\t\tNull: !t.Flags.Has(0),\n\t\t},\n\t\t{\n\t\t\tName: \"Text\",\n\t\t\tSchemaName: \"text\",\n\t\t\tNull: !t.Flags.Has(1),\n\t\t},\n\t\t{\n\t\t\tName: \"ToLang\",\n\t\t\tSchemaName: \"to_lang\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (s *SecureValueErrorTranslationFile) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"secureValueErrorTranslationFile\",\n\t\tID: SecureValueErrorTranslationFileTypeID,\n\t}\n\tif s == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Type\",\n\t\t\tSchemaName: \"type\",\n\t\t},\n\t\t{\n\t\t\tName: \"FileHash\",\n\t\t\tSchemaName: \"file_hash\",\n\t\t},\n\t\t{\n\t\t\tName: \"Text\",\n\t\t\tSchemaName: \"text\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (g *GetProxyLinkRequest) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"getProxyLink\",\n\t\tID: GetProxyLinkRequestTypeID,\n\t}\n\tif g == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"ProxyID\",\n\t\t\tSchemaName: \"proxy_id\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (f *FileHash) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"fileHash\",\n\t\tID: FileHashTypeID,\n\t}\n\tif f == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Offset\",\n\t\t\tSchemaName: \"offset\",\n\t\t},\n\t\t{\n\t\t\tName: \"Limit\",\n\t\t\tSchemaName: \"limit\",\n\t\t},\n\t\t{\n\t\t\tName: \"Hash\",\n\t\t\tSchemaName: \"hash\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (n *NetworkTypeMobileRoaming) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"networkTypeMobileRoaming\",\n\t\tID: NetworkTypeMobileRoamingTypeID,\n\t}\n\tif n == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{}\n\treturn typ\n}",
"func (c *CreateTemporaryPasswordRequest) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"createTemporaryPassword\",\n\t\tID: CreateTemporaryPasswordRequestTypeID,\n\t}\n\tif c == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Password\",\n\t\t\tSchemaName: \"password\",\n\t\t},\n\t\t{\n\t\t\tName: \"ValidFor\",\n\t\t\tSchemaName: \"valid_for\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (d *MessagesDialogs) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"messages.dialogs\",\n\t\tID: MessagesDialogsTypeID,\n\t}\n\tif d == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Dialogs\",\n\t\t\tSchemaName: \"dialogs\",\n\t\t},\n\t\t{\n\t\t\tName: \"Messages\",\n\t\t\tSchemaName: \"messages\",\n\t\t},\n\t\t{\n\t\t\tName: \"Chats\",\n\t\t\tSchemaName: \"chats\",\n\t\t},\n\t\t{\n\t\t\tName: \"Users\",\n\t\t\tSchemaName: \"users\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (s *SecureValueErrorFiles) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"secureValueErrorFiles\",\n\t\tID: SecureValueErrorFilesTypeID,\n\t}\n\tif s == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Type\",\n\t\t\tSchemaName: \"type\",\n\t\t},\n\t\t{\n\t\t\tName: \"FileHash\",\n\t\t\tSchemaName: \"file_hash\",\n\t\t},\n\t\t{\n\t\t\tName: \"Text\",\n\t\t\tSchemaName: \"text\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (b *BotApp) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"botApp\",\n\t\tID: BotAppTypeID,\n\t}\n\tif b == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"ID\",\n\t\t\tSchemaName: \"id\",\n\t\t},\n\t\t{\n\t\t\tName: \"AccessHash\",\n\t\t\tSchemaName: \"access_hash\",\n\t\t},\n\t\t{\n\t\t\tName: \"ShortName\",\n\t\t\tSchemaName: \"short_name\",\n\t\t},\n\t\t{\n\t\t\tName: \"Title\",\n\t\t\tSchemaName: \"title\",\n\t\t},\n\t\t{\n\t\t\tName: \"Description\",\n\t\t\tSchemaName: \"description\",\n\t\t},\n\t\t{\n\t\t\tName: \"Photo\",\n\t\t\tSchemaName: \"photo\",\n\t\t},\n\t\t{\n\t\t\tName: \"Document\",\n\t\t\tSchemaName: \"document\",\n\t\t\tNull: !b.Flags.Has(0),\n\t\t},\n\t\t{\n\t\t\tName: \"Hash\",\n\t\t\tSchemaName: \"hash\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (b *BotInfo) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"botInfo\",\n\t\tID: BotInfoTypeID,\n\t}\n\tif b == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"ShortDescription\",\n\t\t\tSchemaName: \"short_description\",\n\t\t},\n\t\t{\n\t\t\tName: \"Description\",\n\t\t\tSchemaName: \"description\",\n\t\t},\n\t\t{\n\t\t\tName: \"Photo\",\n\t\t\tSchemaName: \"photo\",\n\t\t},\n\t\t{\n\t\t\tName: \"Animation\",\n\t\t\tSchemaName: \"animation\",\n\t\t},\n\t\t{\n\t\t\tName: \"MenuButton\",\n\t\t\tSchemaName: \"menu_button\",\n\t\t},\n\t\t{\n\t\t\tName: \"Commands\",\n\t\t\tSchemaName: \"commands\",\n\t\t},\n\t\t{\n\t\t\tName: \"DefaultGroupAdministratorRights\",\n\t\t\tSchemaName: \"default_group_administrator_rights\",\n\t\t},\n\t\t{\n\t\t\tName: \"DefaultChannelAdministratorRights\",\n\t\t\tSchemaName: \"default_channel_administrator_rights\",\n\t\t},\n\t\t{\n\t\t\tName: \"EditCommandsLink\",\n\t\t\tSchemaName: \"edit_commands_link\",\n\t\t},\n\t\t{\n\t\t\tName: \"EditDescriptionLink\",\n\t\t\tSchemaName: \"edit_description_link\",\n\t\t},\n\t\t{\n\t\t\tName: \"EditDescriptionMediaLink\",\n\t\t\tSchemaName: \"edit_description_media_link\",\n\t\t},\n\t\t{\n\t\t\tName: \"EditSettingsLink\",\n\t\t\tSchemaName: \"edit_settings_link\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (c *ChatParticipant) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"chatParticipant\",\n\t\tID: ChatParticipantTypeID,\n\t}\n\tif c == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"UserID\",\n\t\t\tSchemaName: \"user_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"InviterID\",\n\t\t\tSchemaName: \"inviter_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"Date\",\n\t\t\tSchemaName: \"date\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (i *InputClientProxy) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"inputClientProxy\",\n\t\tID: InputClientProxyTypeID,\n\t}\n\tif i == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Address\",\n\t\t\tSchemaName: \"address\",\n\t\t},\n\t\t{\n\t\t\tName: \"Port\",\n\t\t\tSchemaName: \"port\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (a *AddedReactions) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"addedReactions\",\n\t\tID: AddedReactionsTypeID,\n\t}\n\tif a == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"TotalCount\",\n\t\t\tSchemaName: \"total_count\",\n\t\t},\n\t\t{\n\t\t\tName: \"Reactions\",\n\t\t\tSchemaName: \"reactions\",\n\t\t},\n\t\t{\n\t\t\tName: \"NextOffset\",\n\t\t\tSchemaName: \"next_offset\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (f *FileLocationUnavailable) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"fileLocationUnavailable\",\n\t\tID: FileLocationUnavailableTypeID,\n\t}\n\tif f == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"VolumeID\",\n\t\t\tSchemaName: \"volume_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"LocalID\",\n\t\t\tSchemaName: \"local_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"Secret\",\n\t\t\tSchemaName: \"secret\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (s *MessagesSentEncryptedMessage) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"messages.sentEncryptedMessage\",\n\t\tID: MessagesSentEncryptedMessageTypeID,\n\t}\n\tif s == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Date\",\n\t\t\tSchemaName: \"date\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (g *GetTopChatsRequest) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"getTopChats\",\n\t\tID: GetTopChatsRequestTypeID,\n\t}\n\tif g == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Category\",\n\t\t\tSchemaName: \"category\",\n\t\t},\n\t\t{\n\t\t\tName: \"Limit\",\n\t\t\tSchemaName: \"limit\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (s *SecureValueTypeInternalPassport) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"secureValueTypeInternalPassport\",\n\t\tID: SecureValueTypeInternalPassportTypeID,\n\t}\n\tif s == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{}\n\treturn typ\n}",
"func (s *SecureValueTypePassport) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"secureValueTypePassport\",\n\t\tID: SecureValueTypePassportTypeID,\n\t}\n\tif s == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{}\n\treturn typ\n}",
"func (g *GetWebAppURLRequest) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"getWebAppUrl\",\n\t\tID: GetWebAppURLRequestTypeID,\n\t}\n\tif g == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"BotUserID\",\n\t\t\tSchemaName: \"bot_user_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"URL\",\n\t\t\tSchemaName: \"url\",\n\t\t},\n\t\t{\n\t\t\tName: \"Theme\",\n\t\t\tSchemaName: \"theme\",\n\t\t},\n\t\t{\n\t\t\tName: \"ApplicationName\",\n\t\t\tSchemaName: \"application_name\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (i *InputPersonalDocument) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"inputPersonalDocument\",\n\t\tID: InputPersonalDocumentTypeID,\n\t}\n\tif i == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Files\",\n\t\t\tSchemaName: \"files\",\n\t\t},\n\t\t{\n\t\t\tName: \"Translation\",\n\t\t\tSchemaName: \"translation\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (a *AccessPointRule) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"accessPointRule\",\n\t\tID: AccessPointRuleTypeID,\n\t}\n\tif a == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"PhonePrefixRules\",\n\t\t\tSchemaName: \"phone_prefix_rules\",\n\t\t},\n\t\t{\n\t\t\tName: \"DCID\",\n\t\t\tSchemaName: \"dc_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"IPs\",\n\t\t\tSchemaName: \"ips\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (c *CallbackQueryPayloadGame) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"callbackQueryPayloadGame\",\n\t\tID: CallbackQueryPayloadGameTypeID,\n\t}\n\tif c == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"GameShortName\",\n\t\t\tSchemaName: \"game_short_name\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (e *EmojiKeywordsDifference) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"emojiKeywordsDifference\",\n\t\tID: EmojiKeywordsDifferenceTypeID,\n\t}\n\tif e == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"LangCode\",\n\t\t\tSchemaName: \"lang_code\",\n\t\t},\n\t\t{\n\t\t\tName: \"FromVersion\",\n\t\t\tSchemaName: \"from_version\",\n\t\t},\n\t\t{\n\t\t\tName: \"Version\",\n\t\t\tSchemaName: \"version\",\n\t\t},\n\t\t{\n\t\t\tName: \"Keywords\",\n\t\t\tSchemaName: \"keywords\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (p *PassportElementRentalAgreement) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"passportElementRentalAgreement\",\n\t\tID: PassportElementRentalAgreementTypeID,\n\t}\n\tif p == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"RentalAgreement\",\n\t\t\tSchemaName: \"rental_agreement\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (g *AccountGetWallPapersRequest) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"account.getWallPapers\",\n\t\tID: AccountGetWallPapersRequestTypeID,\n\t}\n\tif g == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Hash\",\n\t\t\tSchemaName: \"hash\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (c *MessagesChatFull) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"messages.chatFull\",\n\t\tID: MessagesChatFullTypeID,\n\t}\n\tif c == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"FullChat\",\n\t\t\tSchemaName: \"full_chat\",\n\t\t},\n\t\t{\n\t\t\tName: \"Chats\",\n\t\t\tSchemaName: \"chats\",\n\t\t},\n\t\t{\n\t\t\tName: \"Users\",\n\t\t\tSchemaName: \"users\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (s *SecureValueTypePhone) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"secureValueTypePhone\",\n\t\tID: SecureValueTypePhoneTypeID,\n\t}\n\tif s == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{}\n\treturn typ\n}",
"func (n *NotifyBroadcasts) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"notifyBroadcasts\",\n\t\tID: NotifyBroadcastsTypeID,\n\t}\n\tif n == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{}\n\treturn typ\n}",
"func (i *InlineBotWebView) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"inlineBotWebView\",\n\t\tID: InlineBotWebViewTypeID,\n\t}\n\tif i == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Text\",\n\t\t\tSchemaName: \"text\",\n\t\t},\n\t\t{\n\t\t\tName: \"URL\",\n\t\t\tSchemaName: \"url\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (p *ProxyTypeSocks5) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"proxyTypeSocks5\",\n\t\tID: ProxyTypeSocks5TypeID,\n\t}\n\tif p == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Username\",\n\t\t\tSchemaName: \"username\",\n\t\t},\n\t\t{\n\t\t\tName: \"Password\",\n\t\t\tSchemaName: \"password\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (*BotInfo) TypeName() string {\n\treturn \"botInfo\"\n}",
"func (f *StorageFileMp3) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"storage.fileMp3\",\n\t\tID: StorageFileMp3TypeID,\n\t}\n\tif f == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{}\n\treturn typ\n}",
"func (p *PaymentResult) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"paymentResult\",\n\t\tID: PaymentResultTypeID,\n\t}\n\tif p == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Success\",\n\t\t\tSchemaName: \"success\",\n\t\t},\n\t\t{\n\t\t\tName: \"VerificationURL\",\n\t\t\tSchemaName: \"verification_url\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (u *UserStories) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"userStories\",\n\t\tID: UserStoriesTypeID,\n\t}\n\tif u == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"UserID\",\n\t\t\tSchemaName: \"user_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"MaxReadID\",\n\t\t\tSchemaName: \"max_read_id\",\n\t\t\tNull: !u.Flags.Has(0),\n\t\t},\n\t\t{\n\t\t\tName: \"Stories\",\n\t\t\tSchemaName: \"stories\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (c *MessagesCreateChatRequest) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"messages.createChat\",\n\t\tID: MessagesCreateChatRequestTypeID,\n\t}\n\tif c == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Users\",\n\t\t\tSchemaName: \"users\",\n\t\t},\n\t\t{\n\t\t\tName: \"Title\",\n\t\t\tSchemaName: \"title\",\n\t\t},\n\t\t{\n\t\t\tName: \"TTLPeriod\",\n\t\t\tSchemaName: \"ttl_period\",\n\t\t\tNull: !c.Flags.Has(0),\n\t\t},\n\t}\n\treturn typ\n}",
"func (m *MessageFileTypeUnknown) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"messageFileTypeUnknown\",\n\t\tID: MessageFileTypeUnknownTypeID,\n\t}\n\tif m == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{}\n\treturn typ\n}",
"func (i *InputCheckPasswordEmpty) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"inputCheckPasswordEmpty\",\n\t\tID: InputCheckPasswordEmptyTypeID,\n\t}\n\tif i == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{}\n\treturn typ\n}",
"func (a *MessagesAcceptUrlAuthRequest) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"messages.acceptUrlAuth\",\n\t\tID: MessagesAcceptUrlAuthRequestTypeID,\n\t}\n\tif a == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"WriteAllowed\",\n\t\t\tSchemaName: \"write_allowed\",\n\t\t\tNull: !a.Flags.Has(0),\n\t\t},\n\t\t{\n\t\t\tName: \"Peer\",\n\t\t\tSchemaName: \"peer\",\n\t\t},\n\t\t{\n\t\t\tName: \"MsgID\",\n\t\t\tSchemaName: \"msg_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"ButtonID\",\n\t\t\tSchemaName: \"button_id\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (s *SpeechRecognitionResultText) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"speechRecognitionResultText\",\n\t\tID: SpeechRecognitionResultTextTypeID,\n\t}\n\tif s == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Text\",\n\t\t\tSchemaName: \"text\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (p *PersonalDocument) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"personalDocument\",\n\t\tID: PersonalDocumentTypeID,\n\t}\n\tif p == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Files\",\n\t\t\tSchemaName: \"files\",\n\t\t},\n\t\t{\n\t\t\tName: \"Translation\",\n\t\t\tSchemaName: \"translation\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (c *Count) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"count\",\n\t\tID: CountTypeID,\n\t}\n\tif c == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Count\",\n\t\t\tSchemaName: \"count\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (e *EncryptedChatDiscarded) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"encryptedChatDiscarded\",\n\t\tID: EncryptedChatDiscardedTypeID,\n\t}\n\tif e == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"HistoryDeleted\",\n\t\t\tSchemaName: \"history_deleted\",\n\t\t\tNull: !e.Flags.Has(0),\n\t\t},\n\t\t{\n\t\t\tName: \"ID\",\n\t\t\tSchemaName: \"id\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (d *MessagesDhConfigNotModified) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"messages.dhConfigNotModified\",\n\t\tID: MessagesDhConfigNotModifiedTypeID,\n\t}\n\tif d == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Random\",\n\t\t\tSchemaName: \"random\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (s *SecureValueTypePassportRegistration) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"secureValueTypePassportRegistration\",\n\t\tID: SecureValueTypePassportRegistrationTypeID,\n\t}\n\tif s == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{}\n\treturn typ\n}",
"func (g *GetChatEventLogRequest) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"getChatEventLog\",\n\t\tID: GetChatEventLogRequestTypeID,\n\t}\n\tif g == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"ChatID\",\n\t\t\tSchemaName: \"chat_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"Query\",\n\t\t\tSchemaName: \"query\",\n\t\t},\n\t\t{\n\t\t\tName: \"FromEventID\",\n\t\t\tSchemaName: \"from_event_id\",\n\t\t},\n\t\t{\n\t\t\tName: \"Limit\",\n\t\t\tSchemaName: \"limit\",\n\t\t},\n\t\t{\n\t\t\tName: \"Filters\",\n\t\t\tSchemaName: \"filters\",\n\t\t},\n\t\t{\n\t\t\tName: \"UserIDs\",\n\t\t\tSchemaName: \"user_ids\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (u *User) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"user\",\n\t\tID: UserTypeID,\n\t}\n\tif u == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Self\",\n\t\t\tSchemaName: \"self\",\n\t\t\tNull: !u.Flags.Has(10),\n\t\t},\n\t\t{\n\t\t\tName: \"Contact\",\n\t\t\tSchemaName: \"contact\",\n\t\t\tNull: !u.Flags.Has(11),\n\t\t},\n\t\t{\n\t\t\tName: \"MutualContact\",\n\t\t\tSchemaName: \"mutual_contact\",\n\t\t\tNull: !u.Flags.Has(12),\n\t\t},\n\t\t{\n\t\t\tName: \"Deleted\",\n\t\t\tSchemaName: \"deleted\",\n\t\t\tNull: !u.Flags.Has(13),\n\t\t},\n\t\t{\n\t\t\tName: \"Bot\",\n\t\t\tSchemaName: \"bot\",\n\t\t\tNull: !u.Flags.Has(14),\n\t\t},\n\t\t{\n\t\t\tName: \"BotChatHistory\",\n\t\t\tSchemaName: \"bot_chat_history\",\n\t\t\tNull: !u.Flags.Has(15),\n\t\t},\n\t\t{\n\t\t\tName: \"BotNochats\",\n\t\t\tSchemaName: \"bot_nochats\",\n\t\t\tNull: !u.Flags.Has(16),\n\t\t},\n\t\t{\n\t\t\tName: \"Verified\",\n\t\t\tSchemaName: \"verified\",\n\t\t\tNull: !u.Flags.Has(17),\n\t\t},\n\t\t{\n\t\t\tName: \"Restricted\",\n\t\t\tSchemaName: \"restricted\",\n\t\t\tNull: !u.Flags.Has(18),\n\t\t},\n\t\t{\n\t\t\tName: \"Min\",\n\t\t\tSchemaName: \"min\",\n\t\t\tNull: !u.Flags.Has(20),\n\t\t},\n\t\t{\n\t\t\tName: \"BotInlineGeo\",\n\t\t\tSchemaName: \"bot_inline_geo\",\n\t\t\tNull: !u.Flags.Has(21),\n\t\t},\n\t\t{\n\t\t\tName: \"Support\",\n\t\t\tSchemaName: \"support\",\n\t\t\tNull: !u.Flags.Has(23),\n\t\t},\n\t\t{\n\t\t\tName: \"Scam\",\n\t\t\tSchemaName: \"scam\",\n\t\t\tNull: !u.Flags.Has(24),\n\t\t},\n\t\t{\n\t\t\tName: \"ApplyMinPhoto\",\n\t\t\tSchemaName: \"apply_min_photo\",\n\t\t\tNull: !u.Flags.Has(25),\n\t\t},\n\t\t{\n\t\t\tName: \"Fake\",\n\t\t\tSchemaName: \"fake\",\n\t\t\tNull: !u.Flags.Has(26),\n\t\t},\n\t\t{\n\t\t\tName: \"BotAttachMenu\",\n\t\t\tSchemaName: \"bot_attach_menu\",\n\t\t\tNull: !u.Flags.Has(27),\n\t\t},\n\t\t{\n\t\t\tName: \"Premium\",\n\t\t\tSchemaName: \"premium\",\n\t\t\tNull: !u.Flags.Has(28),\n\t\t},\n\t\t{\n\t\t\tName: \"AttachMenuEnabled\",\n\t\t\tSchemaName: \"attach_menu_enabled\",\n\t\t\tNull: !u.Flags.Has(29),\n\t\t},\n\t\t{\n\t\t\tName: \"BotCanEdit\",\n\t\t\tSchemaName: \"bot_can_edit\",\n\t\t\tNull: !u.Flags2.Has(1),\n\t\t},\n\t\t{\n\t\t\tName: \"CloseFriend\",\n\t\t\tSchemaName: \"close_friend\",\n\t\t\tNull: !u.Flags2.Has(2),\n\t\t},\n\t\t{\n\t\t\tName: \"StoriesHidden\",\n\t\t\tSchemaName: \"stories_hidden\",\n\t\t\tNull: !u.Flags2.Has(3),\n\t\t},\n\t\t{\n\t\t\tName: \"StoriesUnavailable\",\n\t\t\tSchemaName: \"stories_unavailable\",\n\t\t\tNull: !u.Flags2.Has(4),\n\t\t},\n\t\t{\n\t\t\tName: \"ID\",\n\t\t\tSchemaName: \"id\",\n\t\t},\n\t\t{\n\t\t\tName: \"AccessHash\",\n\t\t\tSchemaName: \"access_hash\",\n\t\t\tNull: !u.Flags.Has(0),\n\t\t},\n\t\t{\n\t\t\tName: \"FirstName\",\n\t\t\tSchemaName: \"first_name\",\n\t\t\tNull: !u.Flags.Has(1),\n\t\t},\n\t\t{\n\t\t\tName: \"LastName\",\n\t\t\tSchemaName: \"last_name\",\n\t\t\tNull: !u.Flags.Has(2),\n\t\t},\n\t\t{\n\t\t\tName: \"Username\",\n\t\t\tSchemaName: \"username\",\n\t\t\tNull: !u.Flags.Has(3),\n\t\t},\n\t\t{\n\t\t\tName: \"Phone\",\n\t\t\tSchemaName: \"phone\",\n\t\t\tNull: !u.Flags.Has(4),\n\t\t},\n\t\t{\n\t\t\tName: \"Photo\",\n\t\t\tSchemaName: \"photo\",\n\t\t\tNull: !u.Flags.Has(5),\n\t\t},\n\t\t{\n\t\t\tName: \"Status\",\n\t\t\tSchemaName: \"status\",\n\t\t\tNull: !u.Flags.Has(6),\n\t\t},\n\t\t{\n\t\t\tName: \"BotInfoVersion\",\n\t\t\tSchemaName: \"bot_info_version\",\n\t\t\tNull: !u.Flags.Has(14),\n\t\t},\n\t\t{\n\t\t\tName: \"RestrictionReason\",\n\t\t\tSchemaName: \"restriction_reason\",\n\t\t\tNull: !u.Flags.Has(18),\n\t\t},\n\t\t{\n\t\t\tName: \"BotInlinePlaceholder\",\n\t\t\tSchemaName: \"bot_inline_placeholder\",\n\t\t\tNull: !u.Flags.Has(19),\n\t\t},\n\t\t{\n\t\t\tName: \"LangCode\",\n\t\t\tSchemaName: \"lang_code\",\n\t\t\tNull: !u.Flags.Has(22),\n\t\t},\n\t\t{\n\t\t\tName: \"EmojiStatus\",\n\t\t\tSchemaName: \"emoji_status\",\n\t\t\tNull: !u.Flags.Has(30),\n\t\t},\n\t\t{\n\t\t\tName: \"Usernames\",\n\t\t\tSchemaName: \"usernames\",\n\t\t\tNull: !u.Flags2.Has(0),\n\t\t},\n\t\t{\n\t\t\tName: \"StoriesMaxID\",\n\t\t\tSchemaName: \"stories_max_id\",\n\t\t\tNull: !u.Flags2.Has(5),\n\t\t},\n\t}\n\treturn typ\n}",
"func (s *SecureValueTypeEmail) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"secureValueTypeEmail\",\n\t\tID: SecureValueTypeEmailTypeID,\n\t}\n\tif s == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{}\n\treturn typ\n}",
"func (d *MessagesDhConfig) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"messages.dhConfig\",\n\t\tID: MessagesDhConfigTypeID,\n\t}\n\tif d == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"G\",\n\t\t\tSchemaName: \"g\",\n\t\t},\n\t\t{\n\t\t\tName: \"P\",\n\t\t\tSchemaName: \"p\",\n\t\t},\n\t\t{\n\t\t\tName: \"Version\",\n\t\t\tSchemaName: \"version\",\n\t\t},\n\t\t{\n\t\t\tName: \"Random\",\n\t\t\tSchemaName: \"random\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (a *AttachMenuBotsNotModified) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"attachMenuBotsNotModified\",\n\t\tID: AttachMenuBotsNotModifiedTypeID,\n\t}\n\tif a == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{}\n\treturn typ\n}",
"func (d *MessagesDialogsNotModified) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"messages.dialogsNotModified\",\n\t\tID: MessagesDialogsNotModifiedTypeID,\n\t}\n\tif d == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Count\",\n\t\t\tSchemaName: \"count\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (i *InvokeWithTraceRequest) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"invokeWithTrace\",\n\t\tID: InvokeWithTraceRequestTypeID,\n\t}\n\tif i == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"TraceParent\",\n\t\t\tSchemaName: \"traceParent\",\n\t\t\tNull: !i.Flags.Has(1),\n\t\t},\n\t\t{\n\t\t\tName: \"TraceState\",\n\t\t\tSchemaName: \"traceState\",\n\t\t\tNull: !i.Flags.Has(2),\n\t\t},\n\t\t{\n\t\t\tName: \"Baggage\",\n\t\t\tSchemaName: \"baggage\",\n\t\t\tNull: !i.Flags.Has(3),\n\t\t},\n\t\t{\n\t\t\tName: \"Query\",\n\t\t\tSchemaName: \"query\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (s *SecureValueErrorSelfie) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"secureValueErrorSelfie\",\n\t\tID: SecureValueErrorSelfieTypeID,\n\t}\n\tif s == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"Type\",\n\t\t\tSchemaName: \"type\",\n\t\t},\n\t\t{\n\t\t\tName: \"FileHash\",\n\t\t\tSchemaName: \"file_hash\",\n\t\t},\n\t\t{\n\t\t\tName: \"Text\",\n\t\t\tSchemaName: \"text\",\n\t\t},\n\t}\n\treturn typ\n}",
"func (n *NetworkStatistics) TypeInfo() tdp.Type {\n\ttyp := tdp.Type{\n\t\tName: \"networkStatistics\",\n\t\tID: NetworkStatisticsTypeID,\n\t}\n\tif n == nil {\n\t\ttyp.Null = true\n\t\treturn typ\n\t}\n\ttyp.Fields = []tdp.Field{\n\t\t{\n\t\t\tName: \"SinceDate\",\n\t\t\tSchemaName: \"since_date\",\n\t\t},\n\t\t{\n\t\t\tName: \"Entries\",\n\t\t\tSchemaName: \"entries\",\n\t\t},\n\t}\n\treturn typ\n}"
] |
[
"0.6523819",
"0.65014523",
"0.64907414",
"0.64792776",
"0.64730346",
"0.63896567",
"0.63731474",
"0.63631487",
"0.63246155",
"0.6316621",
"0.6315235",
"0.6313948",
"0.6305927",
"0.63057333",
"0.6304288",
"0.6297136",
"0.627797",
"0.62740797",
"0.6272644",
"0.62634546",
"0.6263419",
"0.6254869",
"0.62354326",
"0.62331814",
"0.62131405",
"0.62089694",
"0.62032354",
"0.62017065",
"0.6184523",
"0.6174471",
"0.6164391",
"0.6160807",
"0.61573136",
"0.6151311",
"0.61355764",
"0.6131861",
"0.6120433",
"0.6115905",
"0.61050534",
"0.6101265",
"0.60909563",
"0.60869354",
"0.60865146",
"0.60829574",
"0.60801816",
"0.60719365",
"0.6071667",
"0.6064328",
"0.60540533",
"0.60532355",
"0.6044776",
"0.6035242",
"0.6027784",
"0.60258013",
"0.60251564",
"0.60248905",
"0.6011106",
"0.60108757",
"0.6009079",
"0.60060436",
"0.60030913",
"0.5980263",
"0.597971",
"0.5979357",
"0.59718096",
"0.5971697",
"0.59683466",
"0.59679884",
"0.5957636",
"0.59573746",
"0.59546816",
"0.59517145",
"0.5949125",
"0.594502",
"0.5938608",
"0.5938506",
"0.5935003",
"0.5926428",
"0.5923485",
"0.59102625",
"0.5901792",
"0.59011567",
"0.58998835",
"0.5899678",
"0.5898712",
"0.5893924",
"0.5892989",
"0.58888227",
"0.5880653",
"0.5874592",
"0.58722866",
"0.5871273",
"0.5868823",
"0.58682936",
"0.58652514",
"0.5865211",
"0.5864719",
"0.5862912",
"0.5860884",
"0.58598244",
"0.58580804"
] |
0.0
|
-1
|
SetFlags sets flags for nonzero fields.
|
func (p *PollAnswerVoters) SetFlags() {
if !(p.Chosen == false) {
p.Flags.Set(0)
}
if !(p.Correct == false) {
p.Flags.Set(1)
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (c *MessagesCreateChatRequest) SetFlags() {\n\tif !(c.TTLPeriod == 0) {\n\t\tc.Flags.Set(0)\n\t}\n}",
"func (s *MessagesSearchCounter) SetFlags() {\n\tif !(s.Inexact == false) {\n\t\ts.Flags.Set(1)\n\t}\n}",
"func (s *StatsGraph) SetFlags() {\n\tif !(s.ZoomToken == \"\") {\n\t\ts.Flags.Set(0)\n\t}\n}",
"func (r *ReactionCount) SetFlags() {\n\tif !(r.ChosenOrder == 0) {\n\t\tr.Flags.Set(0)\n\t}\n}",
"func (u *UserStories) SetFlags() {\n\tif !(u.MaxReadID == 0) {\n\t\tu.Flags.Set(0)\n\t}\n}",
"func (c *HelpCountryCode) SetFlags() {\n\tif !(c.Prefixes == nil) {\n\t\tc.Flags.Set(0)\n\t}\n\tif !(c.Patterns == nil) {\n\t\tc.Flags.Set(1)\n\t}\n}",
"func (b *BotApp) SetFlags() {\n\tif !(b.Document == nil) {\n\t\tb.Flags.Set(0)\n\t}\n}",
"func (t *PhoneToggleGroupCallRecordRequest) SetFlags() {\n\tif !(t.Start == false) {\n\t\tt.Flags.Set(0)\n\t}\n\tif !(t.Video == false) {\n\t\tt.Flags.Set(2)\n\t}\n\tif !(t.Title == \"\") {\n\t\tt.Flags.Set(1)\n\t}\n\tif !(t.VideoPortrait == false) {\n\t\tt.Flags.Set(2)\n\t}\n}",
"func (a *StoriesAllStories) SetFlags() {\n\tif !(a.HasMore == false) {\n\t\ta.Flags.Set(0)\n\t}\n}",
"func (s *AuthSentCode) SetFlags() {\n\tif !(s.NextType == nil) {\n\t\ts.Flags.Set(1)\n\t}\n\tif !(s.Timeout == 0) {\n\t\ts.Flags.Set(2)\n\t}\n}",
"func (u *UpdateShortSentMessage) SetFlags() {\n\tif !(u.Out == false) {\n\t\tu.Flags.Set(1)\n\t}\n\tif !(u.Media == nil) {\n\t\tu.Flags.Set(9)\n\t}\n\tif !(u.Entities == nil) {\n\t\tu.Flags.Set(7)\n\t}\n\tif !(u.TTLPeriod == 0) {\n\t\tu.Flags.Set(25)\n\t}\n}",
"func SetFlags(flag int) { std.SetFlags(flag) }",
"func (l *LangPackStringPluralized) SetFlags() {\n\tif !(l.ZeroValue == \"\") {\n\t\tl.Flags.Set(0)\n\t}\n\tif !(l.OneValue == \"\") {\n\t\tl.Flags.Set(1)\n\t}\n\tif !(l.TwoValue == \"\") {\n\t\tl.Flags.Set(2)\n\t}\n\tif !(l.FewValue == \"\") {\n\t\tl.Flags.Set(3)\n\t}\n\tif !(l.ManyValue == \"\") {\n\t\tl.Flags.Set(4)\n\t}\n}",
"func (i *InvokeWithTraceRequest) SetFlags() {\n\tif !(i.TraceParent == \"\") {\n\t\ti.Flags.Set(1)\n\t}\n\tif !(i.TraceState == \"\") {\n\t\ti.Flags.Set(2)\n\t}\n\tif !(i.Baggage == \"\") {\n\t\ti.Flags.Set(3)\n\t}\n}",
"func (s *SponsoredWebPage) SetFlags() {\n\tif !(s.Photo == nil) {\n\t\ts.Flags.Set(0)\n\t}\n}",
"func (t *MessagesTranslateTextRequest) SetFlags() {\n\tif !(t.Peer == nil) {\n\t\tt.Flags.Set(0)\n\t}\n\tif !(t.ID == nil) {\n\t\tt.Flags.Set(0)\n\t}\n\tif !(t.Text == nil) {\n\t\tt.Flags.Set(1)\n\t}\n}",
"func (c *StickersChangeStickerRequest) SetFlags() {\n\tif !(c.Emoji == \"\") {\n\t\tc.Flags.Set(0)\n\t}\n\tif !(c.MaskCoords.Zero()) {\n\t\tc.Flags.Set(1)\n\t}\n\tif !(c.Keywords == \"\") {\n\t\tc.Flags.Set(2)\n\t}\n}",
"func (i *Invoice) SetFlags() {\n\tif !(i.Test == false) {\n\t\ti.Flags.Set(0)\n\t}\n\tif !(i.NameRequested == false) {\n\t\ti.Flags.Set(1)\n\t}\n\tif !(i.PhoneRequested == false) {\n\t\ti.Flags.Set(2)\n\t}\n\tif !(i.EmailRequested == false) {\n\t\ti.Flags.Set(3)\n\t}\n\tif !(i.ShippingAddressRequested == false) {\n\t\ti.Flags.Set(4)\n\t}\n\tif !(i.Flexible == false) {\n\t\ti.Flags.Set(5)\n\t}\n\tif !(i.PhoneToProvider == false) {\n\t\ti.Flags.Set(6)\n\t}\n\tif !(i.EmailToProvider == false) {\n\t\ti.Flags.Set(7)\n\t}\n\tif !(i.Recurring == false) {\n\t\ti.Flags.Set(9)\n\t}\n\tif !(i.MaxTipAmount == 0) {\n\t\ti.Flags.Set(8)\n\t}\n\tif !(i.SuggestedTipAmounts == nil) {\n\t\ti.Flags.Set(8)\n\t}\n\tif !(i.RecurringTermsURL == \"\") {\n\t\ti.Flags.Set(9)\n\t}\n}",
"func (c *StickersCreateStickerSetRequest) SetFlags() {\n\tif !(c.Masks == false) {\n\t\tc.Flags.Set(0)\n\t}\n\tif !(c.Animated == false) {\n\t\tc.Flags.Set(1)\n\t}\n\tif !(c.Videos == false) {\n\t\tc.Flags.Set(4)\n\t}\n\tif !(c.Emojis == false) {\n\t\tc.Flags.Set(5)\n\t}\n\tif !(c.TextColor == false) {\n\t\tc.Flags.Set(6)\n\t}\n\tif !(c.Thumb == nil) {\n\t\tc.Flags.Set(2)\n\t}\n\tif !(c.Software == \"\") {\n\t\tc.Flags.Set(3)\n\t}\n}",
"func (s *AccountSetContentSettingsRequest) SetFlags() {\n\tif !(s.SensitiveEnabled == false) {\n\t\ts.Flags.Set(0)\n\t}\n}",
"func (r *ChannelsReorderPinnedForumTopicsRequest) SetFlags() {\n\tif !(r.Force == false) {\n\t\tr.Flags.Set(0)\n\t}\n}",
"func (l *LvlStruct) SetFlags(flag int) {\n\tl.mu.Lock()\n\tdefer l.mu.Unlock()\n\tl.log.SetFlags(flag)\n}",
"func (u *UpdateShortMessage) SetFlags() {\n\tif !(u.Out == false) {\n\t\tu.Flags.Set(1)\n\t}\n\tif !(u.Mentioned == false) {\n\t\tu.Flags.Set(4)\n\t}\n\tif !(u.MediaUnread == false) {\n\t\tu.Flags.Set(5)\n\t}\n\tif !(u.Silent == false) {\n\t\tu.Flags.Set(13)\n\t}\n\tif !(u.FwdFrom.Zero()) {\n\t\tu.Flags.Set(2)\n\t}\n\tif !(u.ViaBotID == 0) {\n\t\tu.Flags.Set(11)\n\t}\n\tif !(u.ReplyTo == nil) {\n\t\tu.Flags.Set(3)\n\t}\n\tif !(u.Entities == nil) {\n\t\tu.Flags.Set(7)\n\t}\n\tif !(u.TTLPeriod == 0) {\n\t\tu.Flags.Set(25)\n\t}\n}",
"func (a *StoriesAllStoriesNotModified) SetFlags() {\n}",
"func (o *GetMessagesAllOf) SetFlags(v []string) {\n\to.Flags = &v\n}",
"func (s *MessagesSponsoredMessages) SetFlags() {\n\tif !(s.PostsBetween == 0) {\n\t\ts.Flags.Set(0)\n\t}\n}",
"func SetFlags(flag int) {\n\tstd.SetFlags(flag)\n}",
"func SetFlags(flag int) {\n\tstd.SetFlags(flag)\n}",
"func SetFlags(f *asn1.BitString, j []int) {\n\tfor _, i := range j {\n\t\tSetFlag(f, i)\n\t}\n}",
"func (recv *Value) SetFlags(vFlags uint32) {\n\tc_v_flags := (C.guint)(vFlags)\n\n\tC.g_value_set_flags((*C.GValue)(recv.native), c_v_flags)\n\n\treturn\n}",
"func (s *StickerSet) SetFlags() {\n\tif !(s.Archived == false) {\n\t\ts.Flags.Set(1)\n\t}\n\tif !(s.Official == false) {\n\t\ts.Flags.Set(2)\n\t}\n\tif !(s.Masks == false) {\n\t\ts.Flags.Set(3)\n\t}\n\tif !(s.Animated == false) {\n\t\ts.Flags.Set(5)\n\t}\n\tif !(s.Videos == false) {\n\t\ts.Flags.Set(6)\n\t}\n\tif !(s.Emojis == false) {\n\t\ts.Flags.Set(7)\n\t}\n\tif !(s.InstalledDate == 0) {\n\t\ts.Flags.Set(0)\n\t}\n\tif !(s.Thumbs == nil) {\n\t\ts.Flags.Set(4)\n\t}\n\tif !(s.ThumbDCID == 0) {\n\t\ts.Flags.Set(4)\n\t}\n\tif !(s.ThumbVersion == 0) {\n\t\ts.Flags.Set(4)\n\t}\n\tif !(s.ThumbDocumentID == 0) {\n\t\ts.Flags.Set(8)\n\t}\n}",
"func (r *MessagesRequestSimpleWebViewRequest) SetFlags() {\n\tif !(r.FromSwitchWebview == false) {\n\t\tr.Flags.Set(1)\n\t}\n\tif !(r.ThemeParams.Zero()) {\n\t\tr.Flags.Set(0)\n\t}\n}",
"func (u *User) SetFlags() {\n\tif !(u.Self == false) {\n\t\tu.Flags.Set(10)\n\t}\n\tif !(u.Contact == false) {\n\t\tu.Flags.Set(11)\n\t}\n\tif !(u.MutualContact == false) {\n\t\tu.Flags.Set(12)\n\t}\n\tif !(u.Deleted == false) {\n\t\tu.Flags.Set(13)\n\t}\n\tif !(u.Bot == false) {\n\t\tu.Flags.Set(14)\n\t}\n\tif !(u.BotChatHistory == false) {\n\t\tu.Flags.Set(15)\n\t}\n\tif !(u.BotNochats == false) {\n\t\tu.Flags.Set(16)\n\t}\n\tif !(u.Verified == false) {\n\t\tu.Flags.Set(17)\n\t}\n\tif !(u.Restricted == false) {\n\t\tu.Flags.Set(18)\n\t}\n\tif !(u.Min == false) {\n\t\tu.Flags.Set(20)\n\t}\n\tif !(u.BotInlineGeo == false) {\n\t\tu.Flags.Set(21)\n\t}\n\tif !(u.Support == false) {\n\t\tu.Flags.Set(23)\n\t}\n\tif !(u.Scam == false) {\n\t\tu.Flags.Set(24)\n\t}\n\tif !(u.ApplyMinPhoto == false) {\n\t\tu.Flags.Set(25)\n\t}\n\tif !(u.Fake == false) {\n\t\tu.Flags.Set(26)\n\t}\n\tif !(u.BotAttachMenu == false) {\n\t\tu.Flags.Set(27)\n\t}\n\tif !(u.Premium == false) {\n\t\tu.Flags.Set(28)\n\t}\n\tif !(u.AttachMenuEnabled == false) {\n\t\tu.Flags.Set(29)\n\t}\n\tif !(u.BotCanEdit == false) {\n\t\tu.Flags2.Set(1)\n\t}\n\tif !(u.CloseFriend == false) {\n\t\tu.Flags2.Set(2)\n\t}\n\tif !(u.StoriesHidden == false) {\n\t\tu.Flags2.Set(3)\n\t}\n\tif !(u.StoriesUnavailable == false) {\n\t\tu.Flags2.Set(4)\n\t}\n\tif !(u.AccessHash == 0) {\n\t\tu.Flags.Set(0)\n\t}\n\tif !(u.FirstName == \"\") {\n\t\tu.Flags.Set(1)\n\t}\n\tif !(u.LastName == \"\") {\n\t\tu.Flags.Set(2)\n\t}\n\tif !(u.Username == \"\") {\n\t\tu.Flags.Set(3)\n\t}\n\tif !(u.Phone == \"\") {\n\t\tu.Flags.Set(4)\n\t}\n\tif !(u.Photo == nil) {\n\t\tu.Flags.Set(5)\n\t}\n\tif !(u.Status == nil) {\n\t\tu.Flags.Set(6)\n\t}\n\tif !(u.BotInfoVersion == 0) {\n\t\tu.Flags.Set(14)\n\t}\n\tif !(u.RestrictionReason == nil) {\n\t\tu.Flags.Set(18)\n\t}\n\tif !(u.BotInlinePlaceholder == \"\") {\n\t\tu.Flags.Set(19)\n\t}\n\tif !(u.LangCode == \"\") {\n\t\tu.Flags.Set(22)\n\t}\n\tif !(u.EmojiStatus == nil) {\n\t\tu.Flags.Set(30)\n\t}\n\tif !(u.Usernames == nil) {\n\t\tu.Flags2.Set(0)\n\t}\n\tif !(u.StoriesMaxID == 0) {\n\t\tu.Flags2.Set(5)\n\t}\n}",
"func (fm *FieldModelFlagsSimple) Set(value *FlagsSimple) error {\n return fm.SetValue(*value)\n}",
"func (sr *StatusRegister) setFlags(flags byte) {\n\tsr.c = 0x1 & flags\n\tsr.z = 0x1 & (flags >> 1)\n\tsr.i = 0x1 & (flags >> 2)\n\tsr.d = 0x1 & (flags >> 3)\n\tsr.b = 0x1 & (flags >> 4)\n\tsr.u = 0x1 & (flags >> 5)\n\tsr.v = 0x1 & (flags >> 6)\n\tsr.n = 0x1 & (flags >> 7)\n}",
"func (f *Factory) SetFlags() {\n}",
"func (u *UpdateShortChatMessage) SetFlags() {\n\tif !(u.Out == false) {\n\t\tu.Flags.Set(1)\n\t}\n\tif !(u.Mentioned == false) {\n\t\tu.Flags.Set(4)\n\t}\n\tif !(u.MediaUnread == false) {\n\t\tu.Flags.Set(5)\n\t}\n\tif !(u.Silent == false) {\n\t\tu.Flags.Set(13)\n\t}\n\tif !(u.FwdFrom.Zero()) {\n\t\tu.Flags.Set(2)\n\t}\n\tif !(u.ViaBotID == 0) {\n\t\tu.Flags.Set(11)\n\t}\n\tif !(u.ReplyTo == nil) {\n\t\tu.Flags.Set(3)\n\t}\n\tif !(u.Entities == nil) {\n\t\tu.Flags.Set(7)\n\t}\n\tif !(u.TTLPeriod == 0) {\n\t\tu.Flags.Set(25)\n\t}\n}",
"func (s *MessagesSendMessageRequest) SetFlags() {\n\tif !(s.NoWebpage == false) {\n\t\ts.Flags.Set(1)\n\t}\n\tif !(s.Silent == false) {\n\t\ts.Flags.Set(5)\n\t}\n\tif !(s.Background == false) {\n\t\ts.Flags.Set(6)\n\t}\n\tif !(s.ClearDraft == false) {\n\t\ts.Flags.Set(7)\n\t}\n\tif !(s.Noforwards == false) {\n\t\ts.Flags.Set(14)\n\t}\n\tif !(s.UpdateStickersetsOrder == false) {\n\t\ts.Flags.Set(15)\n\t}\n\tif !(s.ReplyTo == nil) {\n\t\ts.Flags.Set(0)\n\t}\n\tif !(s.ReplyMarkup == nil) {\n\t\ts.Flags.Set(2)\n\t}\n\tif !(s.Entities == nil) {\n\t\ts.Flags.Set(3)\n\t}\n\tif !(s.ScheduleDate == 0) {\n\t\ts.Flags.Set(10)\n\t}\n\tif !(s.SendAs == nil) {\n\t\ts.Flags.Set(13)\n\t}\n}",
"func (p *PaymentsPaymentForm) SetFlags() {\n\tif !(p.CanSaveCredentials == false) {\n\t\tp.Flags.Set(2)\n\t}\n\tif !(p.PasswordMissing == false) {\n\t\tp.Flags.Set(3)\n\t}\n\tif !(p.Photo == nil) {\n\t\tp.Flags.Set(5)\n\t}\n\tif !(p.NativeProvider == \"\") {\n\t\tp.Flags.Set(4)\n\t}\n\tif !(p.NativeParams.Zero()) {\n\t\tp.Flags.Set(4)\n\t}\n\tif !(p.AdditionalMethods == nil) {\n\t\tp.Flags.Set(6)\n\t}\n\tif !(p.SavedInfo.Zero()) {\n\t\tp.Flags.Set(0)\n\t}\n\tif !(p.SavedCredentials == nil) {\n\t\tp.Flags.Set(1)\n\t}\n}",
"func (c *AccountChangeAuthorizationSettingsRequest) SetFlags() {\n\tif !(c.EncryptedRequestsDisabled == false) {\n\t\tc.Flags.Set(0)\n\t}\n\tif !(c.CallRequestsDisabled == false) {\n\t\tc.Flags.Set(1)\n\t}\n}",
"func (l *Logger) SetFlags(flag Flag) {\n\tl.mu.Lock()\n\n\tl.cfg.Datetime = flag&Ldatetime != 0\n\tl.cfg.Timestamp = flag&Ltimestamp != 0\n\tl.cfg.UTC = flag&LUTC != 0\n\tl.cfg.Shortfile = flag&Lshortfile != 0\n\tl.cfg.Longfile = flag&Llongfile != 0\n\tl.cfg.Function = flag&Lfunction != 0\n\tl.cfg.flag = flag\n\n\tl.mu.Unlock()\n}",
"func (l *Logger) SetFlags(flag int) {\n\tl.mu.Lock()\n\tdefer l.mu.Unlock()\n\tl.flag = flag\n}",
"func (l *Logger) SetFlags(flag int) {\n\tl.mu.Lock()\n\tdefer l.mu.Unlock()\n\tl.flag = flag\n}",
"func (l *Logger) SetFlags(flag int) {\n\tl.mu.Lock()\n\tdefer l.mu.Unlock()\n\tl.flag = flag\n}",
"func SetFlags(flag int) {\n Std.SetFlags(flag)\n}",
"func (f Flags) Set(v Flags) {\n\tf = f | v\n}",
"func (scs *SubCommandStruct) SetFlags(f *flag.FlagSet) {\n\tif scs.FlagSetter != nil {\n\t\tscs.FlagSetter.SetFlags(f)\n\t}\n}",
"func (m *Magic) SetFlags(flags int) error {\n\tif m.ptr == nil {\n\t\treturn ConnectionError\n\t}\n\n\tif C.magic_setflags(m.ptr, C.int(flags)) < 0 {\n\t\treturn errors.New(\"Magic: FlagPreserveATime is not supported by this system.\")\n\t}\n\n\treturn m.check()\n}",
"func (l *Logger) SetFlags(flag int) {\n\tl.mu.Lock()\n\tdefer l.mu.Unlock()\n\tl.flag = flag\n\tl.lg.SetFlags(flag & maskStdLogFlags)\n}",
"func (m *MessageReplies) SetFlags() {\n\tif !(m.Comments == false) {\n\t\tm.Flags.Set(0)\n\t}\n\tif !(m.RecentRepliers == nil) {\n\t\tm.Flags.Set(1)\n\t}\n\tif !(m.ChannelID == 0) {\n\t\tm.Flags.Set(0)\n\t}\n\tif !(m.MaxID == 0) {\n\t\tm.Flags.Set(2)\n\t}\n\tif !(m.ReadMaxID == 0) {\n\t\tm.Flags.Set(3)\n\t}\n}",
"func (l *Logger) SetFlags(flag int) {\n\tl.logger.SetFlags(flag)\n}",
"func (t *TextOutput) SetFlags(flags Flag) *TextOutput {\n\tt.mu.Lock()\n\tdefer t.mu.Unlock()\n\tt.flags = flags\n\treturn t\n}",
"func SetFlags(flag int) {\n\tgolog.SetFlags(flag)\n}",
"func (i *InputThemeSettings) SetFlags() {\n\tif !(i.MessageColorsAnimated == false) {\n\t\ti.Flags.Set(2)\n\t}\n\tif !(i.OutboxAccentColor == 0) {\n\t\ti.Flags.Set(3)\n\t}\n\tif !(i.MessageColors == nil) {\n\t\ti.Flags.Set(0)\n\t}\n\tif !(i.Wallpaper == nil) {\n\t\ti.Flags.Set(1)\n\t}\n\tif !(i.WallpaperSettings.Zero()) {\n\t\ti.Flags.Set(1)\n\t}\n}",
"func (o *MetadataOptions) SetFlags() {\n\tflag.StringVar(&o.MType, \"mtype\", \"METADATA-SYSTEM\", \"The type of metadata requested\")\n\tflag.StringVar(&o.Format, \"format\", \"COMPACT\", \"Metadata format\")\n\tflag.StringVar(&o.ID, \"id\", \"*\", \"Metadata identifier\")\n}",
"func (n *RforkNode) SetFlags(a *StringExpr) {\n\tn.arg = a\n}",
"func setFlags(*os.File) error {\n\treturn nil\n}",
"func (p *Pack) ClearFlags(flags registry.Flags) {\n\tp.flags &^= flags\n}",
"func (o *CatalogEntry) SetFlags(v string) {\n\to.Flags = &v\n}",
"func (mc *ModelConvert) SetFlags(flag int) {\n\tmc.TagFlag = flag\n}",
"func (c *cmdVersion) AddFlags(fs *flag.FlagSet) {\n\t// no flags\n}",
"func SetFlag(f *asn1.BitString, i int) {\n\tfor l := len(f.Bytes); l < 4; l++ {\n\t\t(*f).Bytes = append((*f).Bytes, byte(0))\n\t\t(*f).BitLength = len((*f).Bytes) * 8\n\t}\n\t//Which byte?\n\tb := i / 8\n\t//Which bit in byte\n\tp := uint(7 - (i - 8*b))\n\t(*f).Bytes[b] = (*f).Bytes[b] | (1 << p)\n}",
"func (o *GenerateTokenResponse) SetFlags(v GenerateTokenResponseFlags) {\n\to.Flags = &v\n}",
"func (m *wasiSnapshotPreview1Impl) fdFdstatSetFlags(pfd wasiFd, pflags wasiFdflags) (err wasiErrno) {\n\tf, err := m.files.getFile(pfd, wasiRightsFdDatasync)\n\tif err != wasiErrnoSuccess {\n\t\treturn err\n\t}\n\n\tferr := f.SetFlags(int(pflags))\n\tif ferr != nil {\n\t\treturn fileErrno(ferr)\n\t}\n\treturn wasiErrnoSuccess\n}",
"func (o *Partition) SetFlags(ctx context.Context, flags uint64, options map[string]dbus.Variant) (err error) {\n\terr = o.object.CallWithContext(ctx, InterfacePartition+\".SetFlags\", 0, flags, options).Store()\n\treturn\n}",
"func UnsetFlags(f *asn1.BitString, j []int) {\n\tfor _, i := range j {\n\t\tUnsetFlag(f, i)\n\t}\n}",
"func ClearFlags() {\n\tclearFlags()\n}",
"func (cmd *GrantCmd) SetFlags(f *flag.FlagSet) {\n\tf.BoolVar(&cmd.isConfigs, \"configs\", false, \"list config perms\")\n\tf.BoolVar(&cmd.isServices, \"services\", false, \"list services perms\")\n\tf.BoolVar(&cmd.isApps, \"apps\", false, \"list app perms\")\n\tf.BoolVar(&cmd.isApp, \"app\", false, \"target is app\")\n\tf.BoolVar(&cmd.isGroup, \"group\", false, \"target is group\")\n\tf.BoolVar(&cmd.canWrite, \"write\", false, \"need write\")\n}",
"func (this *DtNavMesh) SetPolyFlags(ref DtPolyRef, flags uint16) DtStatus {\n\tif ref == 0 {\n\t\treturn DT_FAILURE\n\t}\n\tvar salt, it, ip uint32\n\tthis.DecodePolyId(ref, &salt, &it, &ip)\n\tif it >= (uint32)(this.m_maxTiles) {\n\t\treturn DT_FAILURE | DT_INVALID_PARAM\n\t}\n\tif this.m_tiles[it].Salt != salt || this.m_tiles[it].Header == nil {\n\t\treturn DT_FAILURE | DT_INVALID_PARAM\n\t}\n\ttile := &this.m_tiles[it]\n\tif ip >= (uint32)(tile.Header.PolyCount) {\n\t\treturn DT_FAILURE | DT_INVALID_PARAM\n\t}\n\tpoly := &tile.Polys[ip]\n\n\t// Change flags.\n\tpoly.Flags = flags\n\n\treturn DT_SUCCESS\n}",
"func SetFlags() {\n\tflag.BoolVar(&onlyTestOperator, \"only-test-operator\", false, \"to only test operator installation and registry installation\")\n\tflag.BoolVar(&setupSelenium, \"setup-selenium\", false, \"to deploy selenium, used for ui testing, if this flag is not passed testsuite will deploy selenium anyway if it detects it's required\")\n\tflag.BoolVar(&disableClusteredTests, \"disable-clustered-tests\", false, \"to disable tests for clustered registry deployments\")\n\tflag.BoolVar(&disableConvertersTests, \"disable-converters-tests\", false, \"to disable tests for kafka connect converters\")\n\tflag.BoolVar(&disableAuthTests, \"disable-auth-tests\", false, \"to disable tests for keycloak authentication\")\n\tflag.BoolVar(&olmRunAdvancedTestcases, \"enable-olm-advanced-tests\", false, \"to enable advanced tests for OLM testsuite\")\n}",
"func (l *Logger) SetFlags(level LogLevel, flag int) {\n\tswitch level {\n\tcase Info:\n\t\tl.logInfo.SetFlags(flag)\n\tcase Notice:\n\t\tl.logNotice.SetFlags(flag)\n\tcase Warning:\n\t\tl.logWarning.SetFlags(flag)\n\tcase Debug:\n\t\tl.logDebug.SetFlags(flag)\n\tcase Trace:\n\t\tl.logTrace.SetFlags(flag)\n\tcase Error:\n\t\tl.logError.SetFlags(flag)\n\tcase Critical:\n\t\tl.logCritical.SetFlags(flag)\n\tcase All:\n\t\tl.logInfo.SetFlags(flag)\n\t\tl.logNotice.SetFlags(flag)\n\t\tl.logWarning.SetFlags(flag)\n\t\tl.logDebug.SetFlags(flag)\n\t\tl.logTrace.SetFlags(flag)\n\t\tl.logError.SetFlags(flag)\n\t\tl.logCritical.SetFlags(flag)\n\t}\n}",
"func SetFlags(flag int) {\n\tif (flag & Lshortfile) == Lshortfile {\n\t\tTraceCaller = true\n\t\tCallerBase = true\n\t\tSetFlags(flag - Lshortfile)\n\t} else if (flag & Llongfile) == Llongfile {\n\t\tTraceCaller = true\n\t\tCallerBase = false\n\t\tSetFlags(flag - Llongfile)\n\t} else {\n\t\tlogger.SetFlags(flag)\n\t}\n}",
"func (l *LangPackStringPluralized) SetZeroValue(value string) {\n\tl.Flags.Set(0)\n\tl.ZeroValue = value\n}",
"func LogSetFlags(lflags int) {\n\tmuLogt.Lock()\n\tdefer muLogt.Unlock()\n\tlogt.SetFlags(lflags)\n}",
"func FD_ZERO(p *syscall.FdSet) {\n\tfor i := range p.Bits {\n\t\tp.Bits[i] = 0\n\t}\n}",
"func (manager *Manager) SetFlags(profileFlag string, debugFlag bool) {\n\tif !(profileFlag == \"cpu\" || profileFlag == \"memory\" || profileFlag == \"\") {\n\t\tlog.Fatal(\"ERROR: Invalid profile flag. Acceptable values are 'cpu' or 'memory'.\")\n\t}\n\tmanager.ProfileFlag = profileFlag\n\tmanager.DebugFlag = debugFlag\n}",
"func ExampleMicroStellar_SetFlags() {\n\t// Create a new MicroStellar client connected to a fake network. To\n\t// use a real network replace \"fake\" below with \"test\" or \"public\".\n\tms := New(\"fake\")\n\n\t// Set the AUTH_REQUIRED and AUTH_REVOCABLE flags on the account.\n\terr := ms.SetFlags(\"SCSMBQYTXKZYY7CLVT6NPPYWVDQYDOQ6BB3QND4OIXC7762JYJYZ3RMK\", FlagAuthRequired|FlagAuthRevocable)\n\n\tif err != nil {\n\t\tlog.Fatalf(\"SetFlags: %v\", err)\n\t}\n\n\tfmt.Printf(\"ok\")\n\t// Output: ok\n}",
"func (r *Registers) setFlagZ(bit bool) {\n\tif bit {\n\t\tr.F |= zeroFlag\n\t} else {\n\t\tr.F = r.F &^ zeroFlag\n\t}\n}",
"func (u *NonNegativeFlag) Set(v string) error {\n\tx, err := strconv.ParseInt(v, 0, strconv.IntSize)\n\tif x < 0 {\n\t\treturn errors.New(\"Non-negative number required\")\n\t}\n\tif err == nil {\n\t\t*u = NonNegativeFlag(x)\n\t}\n\treturn err\n}",
"func (v *Vector) SetZero() {\n\tv.X = 0\n\tv.Y = 0\n\tv.Z = 0\n}",
"func Flags(f byte) Field {\n\treturn func(p *Packet) error {\n\t\treturn p.append(flags, []byte{f})\n\t}\n}",
"func mungeSetZeroValue(i int, rec []interface{}, destMeta sqlz.RecordMeta) {\n\t// REVISIT: do we need to do special handling for kind.Datetime\n\t// and kind.Time (e.g. \"00:00\" for time)?\n\tz := reflect.Zero(destMeta[i].ScanType()).Interface()\n\trec[i] = z\n}",
"func (r *Registers) setFlagN(bit bool) {\n\tif bit {\n\t\tr.F |= negativeFlag\n\t} else {\n\t\tr.F = r.F &^ negativeFlag\n\t}\n}",
"func (b Bitmask) SetAll() {\n\tfor i := range b {\n\t\tb[i] = ^uint64(0)\n\t}\n}",
"func SetFlags(rolls *[]string) {\n\tpflag.StringSliceVar(rolls, \"roll\", []string{\"1d6\"}, \"Specify the number/sides of die/dice you wish to roll\")\n\tpflag.Parse()\n}",
"func (dt *FieldTraits) AllowZeroValue(p Path) { dt.add(p, FieldTypeAllowZeroValue) }",
"func (r *RPCTractserverTalker) SetControlFlags(ctx context.Context, addr string, root string, flags core.DiskControlFlags) core.Error {\n\treq := core.SetControlFlagsReq{Root: root, Flags: flags}\n\tvar reply core.Error\n\tif err := r.cc.Send(ctx, addr, core.SetControlFlagsMethod, req, &reply); err != nil {\n\t\tlog.Errorf(\"SetControlFlags RPC error on tractserver %s: %s\", addr, err)\n\t\treturn core.ErrRPC\n\t}\n\tif reply != core.NoError {\n\t\tlog.Errorf(\"SetControlFlags error on tractserver %s: %s\", addr, reply)\n\t}\n\treturn reply\n}",
"func (p *Pack) AddFlags(flags registry.Flags) {\n\tp.flags |= flags\n}",
"func (ob *ObjectBox) SetDebugFlags(flags uint) error {\n\trc := C.obx_store_debug_flags(ob.store, C.OBXDebugFlags(flags))\n\tif rc != 0 {\n\t\treturn createError()\n\t}\n\treturn nil\n}",
"func (b *PktBase) AddFlags(flags ...PktFlags) {\n\tfor _, f := range flags {\n\t\tb.flags |= f\n\t}\n}",
"func (ft *FieldType) SetFlag(flag uint) {\n\tft.flag = flag\n}",
"func (o CaaRecordRecordOutput) Flags() pulumi.IntOutput {\n\treturn o.ApplyT(func(v CaaRecordRecord) int { return v.Flags }).(pulumi.IntOutput)\n}",
"func SetFlags(ci *fs.ConfigInfo) {\n\tif dumpHeaders {\n\t\tci.Dump |= fs.DumpHeaders\n\t\tfs.Logf(nil, \"--dump-headers is obsolete - please use --dump headers instead\")\n\t}\n\tif dumpBodies {\n\t\tci.Dump |= fs.DumpBodies\n\t\tfs.Logf(nil, \"--dump-bodies is obsolete - please use --dump bodies instead\")\n\t}\n\tif ci.Dump != 0 && verbose < 2 && ci.LogLevel != fs.LogLevelDebug {\n\t\tfs.Logf(nil, \"Automatically setting -vv as --dump is enabled\")\n\t\tverbose = 2\n\t}\n\n\tif verbose >= 2 {\n\t\tci.LogLevel = fs.LogLevelDebug\n\t} else if verbose >= 1 {\n\t\tci.LogLevel = fs.LogLevelInfo\n\t}\n\tif (ci.DryRun || ci.Interactive) && ci.StatsLogLevel > fs.LogLevelNotice {\n\t\tci.StatsLogLevel = fs.LogLevelNotice\n\t}\n\tif quiet {\n\t\tif verbose > 0 {\n\t\t\tlog.Fatalf(\"Can't set -v and -q\")\n\t\t}\n\t\tci.LogLevel = fs.LogLevelError\n\t}\n\tlogLevelFlag := pflag.Lookup(\"log-level\")\n\tif logLevelFlag != nil && logLevelFlag.Changed {\n\t\tif verbose > 0 {\n\t\t\tlog.Fatalf(\"Can't set -v and --log-level\")\n\t\t}\n\t\tif quiet {\n\t\t\tlog.Fatalf(\"Can't set -q and --log-level\")\n\t\t}\n\t}\n\tif ci.UseJSONLog {\n\t\tlogrus.AddHook(fsLog.NewCallerHook())\n\t\tlogrus.SetFormatter(&logrus.JSONFormatter{\n\t\t\tTimestampFormat: \"2006-01-02T15:04:05.999999-07:00\",\n\t\t})\n\t\tlogrus.SetLevel(logrus.DebugLevel)\n\t\tswitch ci.LogLevel {\n\t\tcase fs.LogLevelEmergency, fs.LogLevelAlert:\n\t\t\tlogrus.SetLevel(logrus.PanicLevel)\n\t\tcase fs.LogLevelCritical:\n\t\t\tlogrus.SetLevel(logrus.FatalLevel)\n\t\tcase fs.LogLevelError:\n\t\t\tlogrus.SetLevel(logrus.ErrorLevel)\n\t\tcase fs.LogLevelWarning, fs.LogLevelNotice:\n\t\t\tlogrus.SetLevel(logrus.WarnLevel)\n\t\tcase fs.LogLevelInfo:\n\t\t\tlogrus.SetLevel(logrus.InfoLevel)\n\t\tcase fs.LogLevelDebug:\n\t\t\tlogrus.SetLevel(logrus.DebugLevel)\n\t\t}\n\t}\n\n\tswitch {\n\tcase deleteBefore && (deleteDuring || deleteAfter),\n\t\tdeleteDuring && deleteAfter:\n\t\tlog.Fatalf(`Only one of --delete-before, --delete-during or --delete-after can be used.`)\n\tcase deleteBefore:\n\t\tci.DeleteMode = fs.DeleteModeBefore\n\tcase deleteDuring:\n\t\tci.DeleteMode = fs.DeleteModeDuring\n\tcase deleteAfter:\n\t\tci.DeleteMode = fs.DeleteModeAfter\n\tdefault:\n\t\tci.DeleteMode = fs.DeleteModeDefault\n\t}\n\n\tif len(ci.CompareDest) > 0 && len(ci.CopyDest) > 0 {\n\t\tlog.Fatalf(`Can't use --compare-dest with --copy-dest.`)\n\t}\n\n\tswitch {\n\tcase len(ci.StatsOneLineDateFormat) > 0:\n\t\tci.StatsOneLineDate = true\n\t\tci.StatsOneLine = true\n\tcase ci.StatsOneLineDate:\n\t\tci.StatsOneLineDateFormat = \"2006/01/02 15:04:05 - \"\n\t\tci.StatsOneLine = true\n\t}\n\n\tif bindAddr != \"\" {\n\t\taddrs, err := net.LookupIP(bindAddr)\n\t\tif err != nil {\n\t\t\tlog.Fatalf(\"--bind: Failed to parse %q as IP address: %v\", bindAddr, err)\n\t\t}\n\t\tif len(addrs) != 1 {\n\t\t\tlog.Fatalf(\"--bind: Expecting 1 IP address for %q but got %d\", bindAddr, len(addrs))\n\t\t}\n\t\tci.BindAddr = addrs[0]\n\t}\n\n\tif disableFeatures != \"\" {\n\t\tif disableFeatures == \"help\" {\n\t\t\tlog.Fatalf(\"Possible backend features are: %s\\n\", strings.Join(new(fs.Features).List(), \", \"))\n\t\t}\n\t\tci.DisableFeatures = strings.Split(disableFeatures, \",\")\n\t}\n\n\tif len(uploadHeaders) != 0 {\n\t\tci.UploadHeaders = ParseHeaders(uploadHeaders)\n\t}\n\tif len(downloadHeaders) != 0 {\n\t\tci.DownloadHeaders = ParseHeaders(downloadHeaders)\n\t}\n\tif len(headers) != 0 {\n\t\tci.Headers = ParseHeaders(headers)\n\t}\n\tif len(headers) != 0 {\n\t\tci.Headers = ParseHeaders(headers)\n\t}\n\tif len(metadataSet) != 0 {\n\t\tci.MetadataSet = make(fs.Metadata, len(metadataSet))\n\t\tfor _, kv := range metadataSet {\n\t\t\tequal := strings.IndexRune(kv, '=')\n\t\t\tif equal < 0 {\n\t\t\t\tlog.Fatalf(\"Failed to parse '%s' as metadata key=value.\", kv)\n\t\t\t}\n\t\t\tci.MetadataSet[strings.ToLower(kv[:equal])] = kv[equal+1:]\n\t\t}\n\t\tfs.Debugf(nil, \"MetadataUpload %v\", ci.MetadataSet)\n\t}\n\tif len(dscp) != 0 {\n\t\tif value, ok := parseDSCP(dscp); ok {\n\t\t\tci.TrafficClass = value << 2\n\t\t} else {\n\t\t\tlog.Fatalf(\"--dscp: Invalid DSCP name: %v\", dscp)\n\t\t}\n\t}\n\n\t// Set path to configuration file\n\tif err := config.SetConfigPath(configPath); err != nil {\n\t\tlog.Fatalf(\"--config: Failed to set %q as config path: %v\", configPath, err)\n\t}\n\n\t// Set path to cache dir\n\tif err := config.SetCacheDir(cacheDir); err != nil {\n\t\tlog.Fatalf(\"--cache-dir: Failed to set %q as cache dir: %v\", cacheDir, err)\n\t}\n\n\t// Set path to temp dir\n\tif err := config.SetTempDir(tempDir); err != nil {\n\t\tlog.Fatalf(\"--temp-dir: Failed to set %q as temp dir: %v\", tempDir, err)\n\t}\n\n\t// Set whether multi-thread-streams was set\n\tmultiThreadStreamsFlag := pflag.Lookup(\"multi-thread-streams\")\n\tci.MultiThreadSet = multiThreadStreamsFlag != nil && multiThreadStreamsFlag.Changed\n\n\t// Make sure some values are > 0\n\tnonZero := func(pi *int) {\n\t\tif *pi <= 0 {\n\t\t\t*pi = 1\n\t\t}\n\t}\n\tnonZero(&ci.LowLevelRetries)\n\tnonZero(&ci.Transfers)\n\tnonZero(&ci.Checkers)\n}",
"func (e Enum) FlagSet(v any, key string) error {\n\treturn e.setValue(v, key)\n}",
"func (wv *Spectrum) SetZero() {\n\tfor k := 0; k < 4; k++ {\n\t\twv.C[k] = 0\n\t}\n\n}",
"func UnsetFlag(f *asn1.BitString, i int) {\n\tfor l := len(f.Bytes); l < 4; l++ {\n\t\t(*f).Bytes = append((*f).Bytes, byte(0))\n\t\t(*f).BitLength = len((*f).Bytes) * 8\n\t}\n\t//Which byte?\n\tb := i / 8\n\t//Which bit in byte\n\tp := uint(7 - (i - 8*b))\n\t(*f).Bytes[b] = (*f).Bytes[b] &^ (1 << p)\n}",
"func SetStructFieldIfZeroValue(strukt interface{}, fieldName string, value interface{}) (bool, error) {\n\tfieldType := reflect.TypeOf(value)\n\treturn setStructField(strukt, fieldName, value, fieldType, true)\n}",
"func (f *Flag) Set() { atomic.CompareAndSwapUint32((*uint32)(unsafe.Pointer(f)), 0, 1) }",
"func (v *Vec3i) SetZero() {\n\tv.SetScalar(0)\n}",
"func (f *FSEIDFields) SetChFlag() {\n\tf.Flags |= 0x04\n}"
] |
[
"0.7008905",
"0.69243014",
"0.6899272",
"0.6869151",
"0.68664783",
"0.6827175",
"0.6800291",
"0.67430615",
"0.6694443",
"0.6651706",
"0.6621111",
"0.66196966",
"0.6598913",
"0.6594741",
"0.65725183",
"0.6549936",
"0.64687246",
"0.6463531",
"0.6449801",
"0.6404753",
"0.6391108",
"0.6390208",
"0.63750166",
"0.63667476",
"0.6349434",
"0.63350177",
"0.63344425",
"0.63344425",
"0.6298389",
"0.62814426",
"0.62455696",
"0.6243254",
"0.6236816",
"0.6206427",
"0.61833787",
"0.6172258",
"0.6139492",
"0.6123166",
"0.610516",
"0.60730535",
"0.60719365",
"0.6048017",
"0.6048017",
"0.6048017",
"0.6040207",
"0.6037736",
"0.59718186",
"0.59685975",
"0.5952432",
"0.594484",
"0.59075713",
"0.58224285",
"0.57991594",
"0.5792408",
"0.5768872",
"0.5745263",
"0.5724652",
"0.5710764",
"0.57085735",
"0.56969273",
"0.5671392",
"0.56590265",
"0.5647044",
"0.56415087",
"0.5637114",
"0.55649495",
"0.55525017",
"0.55509156",
"0.55507785",
"0.553651",
"0.55078393",
"0.5489675",
"0.5485371",
"0.5474377",
"0.54658127",
"0.5446629",
"0.5427327",
"0.542448",
"0.5391886",
"0.5371505",
"0.5337054",
"0.53152853",
"0.5295092",
"0.52891845",
"0.52786183",
"0.5256852",
"0.52124184",
"0.5165156",
"0.51650727",
"0.5164405",
"0.51615804",
"0.51366234",
"0.51349825",
"0.51268655",
"0.5123862",
"0.5120371",
"0.51138324",
"0.5103803",
"0.509031",
"0.5074653"
] |
0.5862093
|
51
|
SetChosen sets value of Chosen conditional field.
|
func (p *PollAnswerVoters) SetChosen(value bool) {
if value {
p.Flags.Set(0)
p.Chosen = true
} else {
p.Flags.Unset(0)
p.Chosen = false
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (p *PollAnswerVoters) GetChosen() (value bool) {\n\tif p == nil {\n\t\treturn\n\t}\n\treturn p.Flags.Has(0)\n}",
"func (r *ReactionCount) SetChosenOrder(value int) {\n\tr.Flags.Set(0)\n\tr.ChosenOrder = value\n}",
"func (f *FlagChoice) Set(value string) error {\n\tfor _, choice := range f.choices {\n\t\tif choice == value {\n\t\t\tf.chosen = value\n\t\t\treturn nil\n\t\t}\n\t}\n\treturn fmt.Errorf(\"%q is not a valid choice, must be: %s\", value, f.String())\n}",
"func registerOnChosenReceived(self *State, message string) {\n\tif !validateChosen(message) || self.IsLeader {\n\t\treturn\n\t}\n\n\tfirstBracket := strings.Index(message, \"[\")\n\tsecondBracket := strings.Index(message, \"]\")\n\tself.Proposition.ChosenValue.CopyFromCommand(extractCommand(message[(firstBracket + 1):secondBracket]))\n\n\trestString := message[(secondBracket + 1):]\n\t_, index := GetKeyValuePair(restString)\n\n\tsynchronize(self, index)\n}",
"func (q *PollVoteQuery) FindByChosenOption(v string) *PollVoteQuery {\n\treturn q.Where(kallax.Eq(Schema.PollVote.ChosenOption, v))\n}",
"func (c ChooserDef) SetState(state ChooserState) {\n\tc.ComponentDef.SetState(state)\n}",
"func (cv *Choice) Set(value string) error {\n\tif indexof.String(cv.AllowedValues, value) == indexof.NotFound {\n\t\treturn fmt.Errorf(\n\t\t\t\"invalid flag value: %s, must be one of %s\",\n\t\t\tvalue,\n\t\t\tstrings.Join(cv.AllowedValues, \", \"),\n\t\t)\n\t}\n\n\tcv.Choice = &value\n\treturn nil\n}",
"func (v *FileChooser) SetChoice(id, option string) {\n\tcId := C.CString(id)\n\tdefer C.free(unsafe.Pointer(cId))\n\tcOption := C.CString(option)\n\tdefer C.free(unsafe.Pointer(cOption))\n\tC.gtk_file_chooser_set_choice(v.native(), (*C.gchar)(cId), (*C.gchar)(cOption))\n}",
"func (s *SelectableAttribute) Chooser() BooleanAttribute {\n\treturn s.chooser\n}",
"func (mmPickNextJoinCandidate *mCandidateControlFeederMockPickNextJoinCandidate) Set(f func() (c1 profiles.CandidateProfile, d1 cryptkit.DigestHolder)) *CandidateControlFeederMock {\n\tif mmPickNextJoinCandidate.defaultExpectation != nil {\n\t\tmmPickNextJoinCandidate.mock.t.Fatalf(\"Default expectation is already set for the CandidateControlFeeder.PickNextJoinCandidate method\")\n\t}\n\n\tif len(mmPickNextJoinCandidate.expectations) > 0 {\n\t\tmmPickNextJoinCandidate.mock.t.Fatalf(\"Some expectations are already set for the CandidateControlFeeder.PickNextJoinCandidate method\")\n\t}\n\n\tmmPickNextJoinCandidate.mock.funcPickNextJoinCandidate = f\n\treturn mmPickNextJoinCandidate.mock\n}",
"func (oo *OmciCC) SetChMonitoredRequest(omciTransID uint16, chVal bool) {\n\too.monitoredRequests[omciTransID].chSuccess <- chVal\n}",
"func SetPrompted(cfg Configurer, key OnceKey) bool {\n\tasked := cfg.GetBool(string(key))\n\tif asked {\n\t\tlogging.Debug(\"%s: already asked\", key)\n\t\treturn false\n\t}\n\n\tlogging.Debug(\"%s: setting asked\", key)\n\tif err := cfg.Set(string(key), true); err != nil {\n\t\tmultilog.Log(logging.ErrorNoStacktrace, rollbar.Error)(\"Failed to set %q: %v\", key, err)\n\t}\n\treturn true\n}",
"func Set(newChoices []string) {\n\tchoices = newChoices\n\tchoicelen = len(newChoices)\n}",
"func (m *User) SetCountry(value *string)() {\n m.country = value\n}",
"func (i *Ime) SetCandidates(parameters Object, callback func(success bool)) {\n\ti.o.Call(\"setCandidates\", parameters, callback)\n}",
"func (s *SelectableAttribute) SetEqualer(e Equaler) {\n\tif s.chooser.Demand().(BoolEqualer).B {\n\t\ts.attr.SetEqualer(e)\n\t}\n}",
"func (swp *SourceWorkerPool) SetInputChannel(inChan chan map[string]interface{}) error {\n\treturn ErrInputChanDoesNotExist\n}",
"func (m *ManagementTemplateStep) SetAcceptedVersion(value ManagementTemplateStepVersionable)() {\n err := m.GetBackingStore().Set(\"acceptedVersion\", value)\n if err != nil {\n panic(err)\n }\n}",
"func (o *Outbound) Chooser() peer.Chooser {\n\treturn o.chooser\n}",
"func (_m *ChannelStore) SetShared(channelId string, shared bool) error {\n\tret := _m.Called(channelId, shared)\n\n\tvar r0 error\n\tif rf, ok := ret.Get(0).(func(string, bool) error); ok {\n\t\tr0 = rf(channelId, shared)\n\t} else {\n\t\tr0 = ret.Error(0)\n\t}\n\n\treturn r0\n}",
"func (_m *Knapsack) SetUpdateChannel(channel string) error {\n\tret := _m.Called(channel)\n\n\tvar r0 error\n\tif rf, ok := ret.Get(0).(func(string) error); ok {\n\t\tr0 = rf(channel)\n\t} else {\n\t\tr0 = ret.Error(0)\n\t}\n\n\treturn r0\n}",
"func (m *EducationFeedbackOutcome) SetPublishedFeedback(value EducationFeedbackable)() {\n m.publishedFeedback = value\n}",
"func (p *pwmGroup) Set(channel uint8, value uint32) {\n\tval := uint16(value)\n\tchannel &= 1\n\tp.setChanLevel(channel, val)\n}",
"func (r *ReactionCount) GetChosenOrder() (value int, ok bool) {\n\tif r == nil {\n\t\treturn\n\t}\n\tif !r.Flags.Has(0) {\n\t\treturn value, false\n\t}\n\treturn r.ChosenOrder, true\n}",
"func (field *Field) setValue(value reflect.Value, args ...string) (size int, err error) {\n\tlog.Debug(\"try set value %[1]T (%#v)\", value.Interface(), args)\n\n\tswitch value.Interface().(type) {\n\tcase bool:\n\t\t// toggle the boolean\n\t\tvalue.SetBool(!value.Interface().(bool))\n\tcase int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64:\n\t\t// override the integer\n\t\tif len(args) == 0 {\n\t\t\terr = fmt.Errorf(\"should pass %v\", TYPE_INT)\n\t\t\treturn\n\t\t}\n\n\t\tvar val int\n\t\tif val, err = strconv.Atoi(args[0]); err != nil {\n\t\t\terr = fmt.Errorf(\"should pass %v: %v\", TYPE_INT, args[0])\n\t\t\treturn\n\t\t}\n\n\t\tif len(field.Choices) > 0 {\n\t\t\tidx := sort.SearchStrings(field.Choices, args[0])\n\t\t\tif idx == len(field.Choices) || field.Choices[idx] != args[0] {\n\t\t\t\terr = fmt.Errorf(\"%v should choice from %v\", args[0], field.Choices)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\n\t\tswitch field.Value.Kind() {\n\t\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\t\tvalue.SetInt(int64(val))\n\t\tdefault:\n\t\t\tvalue.SetUint(uint64(val))\n\t\t}\n\n\t\tsize++\n\tcase string:\n\t\t// override the string\n\t\tif len(args) == 0 {\n\t\t\terr = fmt.Errorf(\"should pass %v\", TYPE_STRING)\n\t\t\treturn\n\t\t}\n\n\t\tif len(field.Choices) > 0 {\n\t\t\tidx := sort.SearchStrings(field.Choices, args[0])\n\t\t\tif idx == len(field.Choices) || field.Choices[idx] != args[0] {\n\t\t\t\terr = fmt.Errorf(\"%v should choice from %v\", args[0], field.Choices)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\n\t\tvalue.SetString(args[0])\n\t\tsize++\n\tcase *os.File:\n\t\tif len(args) == 0 {\n\t\t\terr = fmt.Errorf(\"should pass filename\")\n\t\t\treturn\n\t\t}\n\n\t\tlog.Info(\"open file %#v\", args[0])\n\n\t\tvar f *os.File\n\t\tif f, err = os.Open(args[0]); err == nil {\n\t\t\tvalue.Set(reflect.ValueOf(f))\n\t\t\tsize++\n\t\t}\n\t\treturn\n\tcase os.FileMode:\n\t\tif len(args) == 0 {\n\t\t\terr = fmt.Errorf(\"should pass file perm\")\n\t\t\treturn\n\t\t}\n\n\t\tlog.Info(\"set os.FileMode as %v\", args[0])\n\t\tvar perm int\n\t\tif perm, err = strconv.Atoi(args[0]); err != nil || uint64(perm)&uint64(0xFFFFFFFF00000000) != 0 {\n\t\t\tlog.Info(\"cannot set os.FileMode %#v: %v\", args[0], err)\n\t\t\terr = fmt.Errorf(\"cannot set os.FileMode %#v: %v\", args[0], err)\n\t\t\treturn\n\t\t}\n\n\t\tvalue.Set(reflect.ValueOf(os.FileMode(uint32(perm))))\n\t\tsize++\n\tcase time.Time:\n\t\tif len(args) == 0 {\n\t\t\terr = fmt.Errorf(\"should pass TIME: RFC-3339 (2006-01-02T15:04:05+07:00)\")\n\t\t\treturn\n\t\t}\n\n\t\tlog.Info(\"set time.Time as %v\", args[0])\n\t\tvar timestamp time.Time\n\n\t\tif timestamp, err = time.Parse(time.RFC3339, args[0]); err != nil {\n\t\t\tlog.Info(\"should pass RFC-3339 (2006-01-02T15:04:05+07:00): %v: %v\", args[0], err)\n\t\t\terr = fmt.Errorf(\"should pass RFC-3339 (2006-01-02T15:04:05+07:00): %v: %v\", args[0], err)\n\t\t\treturn\n\t\t}\n\t\tvalue.Set(reflect.ValueOf(timestamp))\n\t\tsize++\n\tcase net.Interface:\n\t\tif len(args) == 0 {\n\t\t\terr = fmt.Errorf(\"should pass IFACE\")\n\t\t\treturn\n\t\t}\n\n\t\tvar iface *net.Interface\n\n\t\tif iface, err = net.InterfaceByName(args[0]); err != nil {\n\t\t\terr = fmt.Errorf(\"invalid IFACE %#v: %v\", args[0], err)\n\t\t\treturn\n\t\t}\n\n\t\tvalue.Set(reflect.ValueOf(*iface))\n\t\tsize++\n\tcase net.IP:\n\t\tif len(args) == 0 {\n\t\t\terr = fmt.Errorf(\"should pass IP\")\n\t\t\treturn\n\t\t}\n\n\t\tip := field.getIP(args[0])\n\t\tif ip == nil {\n\t\t\terr = fmt.Errorf(\"invalid IP: %#v\", args[0])\n\t\t\treturn\n\t\t}\n\n\t\tvalue.Set(reflect.ValueOf(ip))\n\t\tsize++\n\tcase net.IPNet:\n\t\tif len(args) == 0 {\n\t\t\terr = fmt.Errorf(\"should pass CIDR\")\n\t\t\treturn\n\t\t}\n\n\t\tinet := field.getCIRD(args[0])\n\t\tif inet == nil {\n\t\t\terr = fmt.Errorf(\"invalid CIDR: %#v\", args[0])\n\t\t\treturn\n\t\t}\n\n\t\tvalue.Set(reflect.ValueOf(*inet))\n\t\tsize++\n\tdefault:\n\t\tswitch value.Kind() {\n\t\tcase reflect.Struct:\n\t\t\t// execute sub-command\n\t\t\tif err = field.Subcommand.Parse(args...); err != nil {\n\t\t\t\t// only show the help message on the sub-command\n\t\t\t\tfield.Subcommand.HelpMessage(err)\n\t\t\t\tos.Exit(1)\n\t\t\t}\n\t\tcase reflect.Ptr:\n\t\t\tlog.Debug(\"set pointer %v: %v\", field.Name, value)\n\n\t\t\tif value.IsNil() {\n\t\t\t\tif field.Subcommand != nil {\n\t\t\t\t\tlog.Info(\"nil pointer, assign as sub-command\")\n\n\t\t\t\t\tvalue.Set(field.Subcommand.Value)\n\t\t\t\t} else {\n\t\t\t\t\tlog.Info(\"nil pointer, new instance: %v\", value.Type())\n\n\t\t\t\t\tobj := reflect.New(value.Type().Elem())\n\t\t\t\t\tvalue.Set(obj)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif size, err = field.setValue(value.Elem(), args...); err != nil {\n\t\t\t\treturn\n\t\t\t}\n\t\tcase reflect.Slice:\n\t\t\telem := reflect.New(value.Type().Elem()).Elem()\n\t\t\tif size, err = field.setValue(elem, args...); err != nil {\n\t\t\t\terr = fmt.Errorf(\"cannot set %#v: %v\", value.Type(), err)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// append to the slice\n\t\t\tvalue.Set(reflect.Append(value, elem))\n\t\tdefault:\n\t\t\tlog.Warn(\"not implemented set value: %[1]v (%[1]T)\", value.Interface())\n\t\t\terr = fmt.Errorf(\"not implemented set value: %[1]v (%[1]T)\", value.Interface())\n\t\t\treturn\n\t\t}\n\t}\n\n\tlog.Debug(\"success set %v (%d)\", value, size)\n\treturn\n}",
"func (o *HttpDeliveryOptions) SetValue(v DeliveryOverrideType) {\n\to.Value = v\n}",
"func (m *User) SetPreferredName(value *string)() {\n m.preferredName = value\n}",
"func (m *WorkbookFilter) SetCriteria(value WorkbookFilterCriteriaable)() {\n err := m.GetBackingStore().Set(\"criteria\", value)\n if err != nil {\n panic(err)\n }\n}",
"func (c *Cache) SetCandidate(key string, value candidate.Candidate) error {\n\tc.mutex.Lock()\n\tdefer c.mutex.Unlock()\n\tlog.Debugf(\"Setting cache: %s\\n\", key)\n\tc.candidateState[key] = value\n\terr := utils.WriteJSONFile(fmt.Sprintf(\"%s/candidate.json\", c.path), c.candidateState)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}",
"func (m *GovernancePolicy) SetDecisionMakerCriteria(value []GovernanceCriteriaable)() {\n err := m.GetBackingStore().Set(\"decisionMakerCriteria\", value)\n if err != nil {\n panic(err)\n }\n}",
"func (oo *OmciCC) SendSetGemNCTPVar(ctx context.Context, timeout int, highPrio bool, rxChan chan Message, params ...me.ParamData) (*me.ManagedEntity, error) {\n\ttid := oo.GetNextTid(highPrio)\n\tlogger.Debugw(ctx, \"send GemNCTP-Set-msg:\", log.Fields{\"device-id\": oo.deviceID,\n\t\t\"SequNo\": strconv.FormatInt(int64(tid), 16),\n\t\t\"InstId\": strconv.FormatInt(int64(params[0].EntityID), 16)})\n\n\tmeInstance, omciErr := me.NewGemPortNetworkCtp(params[0])\n\tif omciErr.GetError() == nil {\n\t\t//obviously we have to set all 'untouched' parameters to default by some additional option parameter!!\n\t\tomciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType,\n\t\t\toframe.TransactionID(tid), oframe.AddDefaults(true))\n\t\tif err != nil {\n\t\t\tlogger.Errorw(ctx, \"Cannot encode GemNCTP for set\", log.Fields{\n\t\t\t\t\"Err\": err, \"device-id\": oo.deviceID})\n\t\t\treturn nil, err\n\t\t}\n\n\t\tpkt, err := SerializeOmciLayer(ctx, omciLayer, msgLayer)\n\t\tif err != nil {\n\t\t\tlogger.Errorw(ctx, \"Cannot serialize GemNCTP set\", log.Fields{\n\t\t\t\t\"Err\": err, \"device-id\": oo.deviceID})\n\t\t\treturn nil, err\n\t\t}\n\n\t\tomciRxCallbackPair := CallbackPair{\n\t\t\tCbKey: tid,\n\t\t\tCbEntry: CallbackPairEntry{rxChan, oo.receiveOmciResponse, true},\n\t\t}\n\t\terr = oo.Send(ctx, pkt, timeout, CDefaultRetries, highPrio, omciRxCallbackPair)\n\t\tif err != nil {\n\t\t\tlogger.Errorw(ctx, \"Cannot send GemNCTP set\", log.Fields{\n\t\t\t\t\"Err\": err, \"device-id\": oo.deviceID})\n\t\t\treturn nil, err\n\t\t}\n\t\tlogger.Debug(ctx, \"send GemNCTP-Set-msg done\", log.Fields{\"device-id\": oo.deviceID})\n\t\treturn meInstance, nil\n\t}\n\tlogger.Errorw(ctx, \"Cannot generate GemNCTP Instance\", log.Fields{\n\t\t\"Err\": omciErr.GetError(), \"device-id\": oo.deviceID})\n\treturn nil, omciErr.GetError()\n}",
"func (o *Optional[T]) Set(value T) {\n\to.value = value\n\to.set = true\n}",
"func Choose(pr string, options []string) int {\n\treturn defaultPrompter.Choose(pr, options)\n}",
"func validateChosen(message string) bool {\n\tmatch, _ := regexp.MatchString(\"chosen=\", message)\n\tmatch2, _ := regexp.MatchString(\"index=\", message)\n\treturn match && match2\n}",
"func (f *FPC) SetOpinionGiverRng(rng *rand.Rand) {\n\tf.opinionGiverRng = rng\n}",
"func (o *Oauthclientrequest) SetField(field string, fieldValue interface{}) {\n\t// Get Value object for field\n\ttarget := reflect.ValueOf(o)\n\ttargetField := reflect.Indirect(target).FieldByName(field)\n\n\t// Set value\n\tif fieldValue != nil {\n\t\ttargetField.Set(reflect.ValueOf(fieldValue))\n\t} else {\n\t\t// Must create a new Value (creates **type) then get its element (*type), which will be nil pointer of the appropriate type\n\t\tx := reflect.Indirect(reflect.New(targetField.Type()))\n\t\ttargetField.Set(x)\n\t}\n\n\t// Add field to set field names list\n\tif o.SetFieldNames == nil {\n\t\to.SetFieldNames = make(map[string]bool)\n\t}\n\to.SetFieldNames[field] = true\n}",
"func Choice(s *string, choices []string, title, id, class string, valid Validator) (jquery.JQuery, error) {\n\tj := jq(\"<select>\").AddClass(ClassPrefix + \"-choice\").AddClass(class)\n\tj.SetAttr(\"title\", title).SetAttr(\"id\", id)\n\tif *s == \"\" {\n\t\t*s = choices[0]\n\t}\n\tindex := -1\n\tfor i, c := range choices {\n\t\tif c == *s {\n\t\t\tindex = i\n\t\t}\n\t\tj.Append(jq(\"<option>\").SetAttr(\"value\", c).SetText(c))\n\t}\n\tif index == -1 {\n\t\treturn jq(), fmt.Errorf(\"Default of '%s' is not among valid choices\", *s)\n\t}\n\tj.SetData(\"prev\", index)\n\tj.SetProp(\"selectedIndex\", index)\n\tj.Call(jquery.CHANGE, func(event jquery.Event) {\n\t\tnewS := event.Target.Get(\"value\").String()\n\t\tnewIndex := event.Target.Get(\"selectedIndex\").Int()\n\t\tif valid != nil && !valid.Validate(newS) {\n\t\t\tnewIndex = int(j.Data(\"prev\").(float64))\n\t\t\tj.SetProp(\"selectedIndex\", newIndex)\n\t\t}\n\t\t*s = choices[int(newIndex)]\n\t\tj.SetData(\"prev\", newIndex)\n\t})\n\treturn j, nil\n}",
"func (cycle *Cycle) Choose() {\n\tif !cycle.showing ||\n\t\tlen(cycle.items) == 0 ||\n\t\tcycle.selected < 0 ||\n\t\tcycle.selected >= len(cycle.items) {\n\n\t\treturn\n\t}\n\n\tcycle.items[cycle.selected].choose()\n\tcycle.Hide()\n}",
"func (this *TriggerAction) Set(field string, value interface{}) {\n switch field {\n case \"id\":\n this.SetId(value.(int64))\n break\n case \"agentName\":\n this.agentName = value.(string)\n break\n case \"propertyName\":\n this.propertyName = value.(string)\n break\n case \"propertyValue\":\n this.propertyValue = value.(string)\n break\n }\n}",
"func (dtp *Datetimepicker) SetDate(date string) {\n\tdtp.dtp.Call(\"data\", \"DateTimePicker\").Call(\"date\", date)\n}",
"func (cp *MockChannelProvider) SetChannel(id string, channel fab.Channel) {\n\tcp.channels[id] = channel\n}",
"func (c *Client) SetVoteChoice(ctx context.Context, hash *chainhash.Hash,\n\tchoices map[string]string, tspendPolicy map[string]string, treasuryPolicy map[string]string) error {\n\n\t// Retrieve current voting preferences from VSP.\n\tstatus, err := c.status(ctx, hash)\n\tif err != nil {\n\t\tif errors.Is(err, errors.Locked) {\n\t\t\treturn err\n\t\t}\n\t\tc.log.Errorf(\"Could not check status of VSP ticket %s: %v\", hash, err)\n\t\treturn nil\n\t}\n\n\t// Check for any mismatch between the provided voting preferences and the\n\t// VSP preferences to determine if VSP needs to be updated.\n\tupdate := false\n\n\t// Check consensus vote choices.\n\tfor newAgenda, newChoice := range choices {\n\t\tvspChoice, ok := status.VoteChoices[newAgenda]\n\t\tif !ok {\n\t\t\tupdate = true\n\t\t\tbreak\n\t\t}\n\t\tif vspChoice != newChoice {\n\t\t\tupdate = true\n\t\t\tbreak\n\t\t}\n\t}\n\n\t// Check tspend policies.\n\tfor newTSpend, newChoice := range tspendPolicy {\n\t\tvspChoice, ok := status.TSpendPolicy[newTSpend]\n\t\tif !ok {\n\t\t\tupdate = true\n\t\t\tbreak\n\t\t}\n\t\tif vspChoice != newChoice {\n\t\t\tupdate = true\n\t\t\tbreak\n\t\t}\n\t}\n\n\t// Check treasury policies.\n\tfor newKey, newChoice := range treasuryPolicy {\n\t\tvspChoice, ok := status.TSpendPolicy[newKey]\n\t\tif !ok {\n\t\t\tupdate = true\n\t\t\tbreak\n\t\t}\n\t\tif vspChoice != newChoice {\n\t\t\tupdate = true\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif !update {\n\t\tc.log.Debugf(\"VSP already has correct vote choices for ticket %s\", hash)\n\t\treturn nil\n\t}\n\n\tc.log.Debugf(\"Updating vote choices on VSP for ticket %s\", hash)\n\terr = c.setVoteChoices(ctx, hash, choices, tspendPolicy, treasuryPolicy)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func TestBidderChooserChoose(t *testing.T) {\n\tshuffler := reverseShuffler{}\n\tavailable := []string{\"a1\", \"a2\"}\n\n\ttestCases := []struct {\n\t\tdescription string\n\t\tgivenRequested []string\n\t\tgivenCooperative Cooperative\n\t\texpected []string\n\t}{\n\t\t{\n\t\t\tdescription: \"No Coop - Nil\",\n\t\t\tgivenRequested: nil,\n\t\t\tgivenCooperative: Cooperative{Enabled: false},\n\t\t\texpected: []string{\"a2\", \"a1\"},\n\t\t},\n\t\t{\n\t\t\tdescription: \"No Coop - Empty\",\n\t\t\tgivenRequested: []string{},\n\t\t\tgivenCooperative: Cooperative{Enabled: false},\n\t\t\texpected: []string{\"a2\", \"a1\"},\n\t\t},\n\t\t{\n\t\t\tdescription: \"No Coop - One\",\n\t\t\tgivenRequested: []string{\"r\"},\n\t\t\tgivenCooperative: Cooperative{Enabled: false},\n\t\t\texpected: []string{\"r\"},\n\t\t},\n\t\t{\n\t\t\tdescription: \"No Coop - Many\",\n\t\t\tgivenRequested: []string{\"r1\", \"r2\"},\n\t\t\tgivenCooperative: Cooperative{Enabled: false},\n\t\t\texpected: []string{\"r2\", \"r1\"},\n\t\t},\n\t\t{\n\t\t\tdescription: \"Coop - Nil\",\n\t\t\tgivenRequested: nil,\n\t\t\tgivenCooperative: Cooperative{Enabled: true, PriorityGroups: [][]string{{\"pr1A\", \"pr1B\"}, {\"pr2A\", \"pr2B\"}}},\n\t\t\texpected: []string{\"pr1B\", \"pr1A\", \"pr2B\", \"pr2A\", \"a2\", \"a1\"},\n\t\t},\n\t\t{\n\t\t\tdescription: \"Coop - Empty\",\n\t\t\tgivenRequested: nil,\n\t\t\tgivenCooperative: Cooperative{Enabled: true, PriorityGroups: [][]string{{\"pr1A\", \"pr1B\"}, {\"pr2A\", \"pr2B\"}}},\n\t\t\texpected: []string{\"pr1B\", \"pr1A\", \"pr2B\", \"pr2A\", \"a2\", \"a1\"},\n\t\t},\n\t\t{\n\t\t\tdescription: \"Coop - Integration Test\",\n\t\t\tgivenRequested: []string{\"r1\", \"r2\"},\n\t\t\tgivenCooperative: Cooperative{Enabled: true, PriorityGroups: [][]string{{\"pr1A\", \"pr1B\"}, {\"pr2A\", \"pr2B\"}}},\n\t\t\texpected: []string{\"r2\", \"r1\", \"pr1B\", \"pr1A\", \"pr2B\", \"pr2A\", \"a2\", \"a1\"},\n\t\t},\n\t}\n\n\tfor _, test := range testCases {\n\t\tchooser := standardBidderChooser{shuffler: shuffler}\n\t\tresult := chooser.choose(test.givenRequested, available, test.givenCooperative)\n\n\t\tassert.Equal(t, test.expected, result, test.description)\n\t}\n}",
"func (m *AgreementAcceptance) SetState(value *AgreementAcceptanceState)() {\n m.state = value\n}",
"func (o *OptionalVal[T]) Set(v T) {\n\to.v, o.present = v, true\n}",
"func (n *Node) SetOpt(x interface{})",
"func (s *SelectableAttribute) SetSelected(b bool) {\n\ts.chooser.SetEqualer(BoolEqualer{B: b})\n}",
"func (s *SidecarInjectField) setValue(config *string, ao *AnnotationOverlay, annotation *map[string]string,\n\ta Annotation) bool {\n\tif v, ok := s.SidecarOverlayandGetValue(ao, annotation, a); ok {\n\t\tif len(v) > 0 {\n\t\t\t*config = v\n\t\t\treturn true\n\t\t} else if len(*config) > 0 {\n\t\t\treturn true\n\t\t} else {\n\t\t\t*config = a.DefaultValue\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}",
"func (m *SmsLogRow) SetOtherPartyCountryCode(value *string)() {\n err := m.GetBackingStore().Set(\"otherPartyCountryCode\", value)\n if err != nil {\n panic(err)\n }\n}",
"func (s *AutoParameter) SetValueHint(v string) *AutoParameter {\n\ts.ValueHint = &v\n\treturn s\n}",
"func set_channel(c spi.Conn, channel uint8) {\n\tif (channel > 125) {\n\t\tchannel = 125\n\t}\n\twrite_register(c, RfCh, channel)\n}",
"func (m *EducationAssignment) SetAssignedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {\n m.assignedDateTime = value\n}",
"func (m *ItemItemsItemWorkbookFunctionsAverageIfPostRequestBody) SetCriteria(value iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Jsonable)() {\n err := m.GetBackingStore().Set(\"criteria\", value)\n if err != nil {\n panic(err)\n }\n}",
"func (r *Raft) becomeCandidate() {\n\t// Your Code Here (2A).\n\tr.State = StateCandidate\n\tr.Lead = None\n\tr.Term++\n\tr.Vote = r.id\n\tr.votes = make(map[uint64]bool)\n\tr.votes[r.id] = true\n}",
"func (me *TxsdFeCompositeTypeOperator) Set(s string) { (*xsdt.String)(me).Set(s) }",
"func (o IFS) Choose() *Affine {\n\tr := rand.Intn(len(o.Choices))\n\treturn o.Choices[r]\n}",
"func (o *MicrosoftGraphChoiceColumn) SetChoices(v []string) {\n\to.Choices = &v\n}",
"func (f *Field) SetValue(newValue interface{}) {\n\tf.Call(\"setValue\", newValue)\n}",
"func (m *SharePostRequestBody) SetNotifyTeam(value *bool)() {\n m.notifyTeam = value\n}",
"func (m *AgedAccountsPayable) SetVendorId(value *string)() {\n err := m.GetBackingStore().Set(\"vendorId\", value)\n if err != nil {\n panic(err)\n }\n}",
"func (m *TelecomExpenseManagementPartner) SetAppAuthorized(value *bool)() {\n err := m.GetBackingStore().Set(\"appAuthorized\", value)\n if err != nil {\n panic(err)\n }\n}",
"func SetTxConfirmed(db *gorp.DbMap, r *TxRecord) (err error) {\n\tr.State = ExchangeStateTransferred\n\t_, err = db.Update(r)\n\treturn\n}",
"func (p *EdwardsPoint) ConditionalSelect(a, b *EdwardsPoint, choice int) {\n\tp.inner.X.ConditionalSelect(&a.inner.X, &b.inner.X, choice)\n\tp.inner.Y.ConditionalSelect(&a.inner.Y, &b.inner.Y, choice)\n\tp.inner.Z.ConditionalSelect(&a.inner.Z, &b.inner.Z, choice)\n\tp.inner.T.ConditionalSelect(&a.inner.T, &b.inner.T, choice)\n}",
"func (me *TSupplierCountry) Set(s string) { (*xsdt.String)(me).Set(s) }",
"func (g Generator) setTestResultValue(result *ir.Result, pathwayResult *pathway.Result, tt *orderprofile.TestType) error {\n\tswitch {\n\tcase pathwayResult.IsValueRandom() && pathwayResult.ReferenceRange != \"\":\n\t\t// Generate random value from the custom reference range.\n\t\treturn g.setRandomValueBasedOnCustomReferenceRange(result, pathwayResult)\n\n\tcase pathwayResult.IsValueRandom() && pathwayResult.ReferenceRange == \"\":\n\t\t// Generate random value from the order profile's reference range.\n\t\treturn g.setRandomValueBasedOnOrderProfileReferenceRange(result, pathwayResult, tt)\n\n\tdefault:\n\t\t// Use values specified in the pathway.\n\t\treturn g.setValueSpecifiedInThePathway(result, pathwayResult, tt)\n\t}\n\treturn nil\n}",
"func (_m *Delivery) SetAvailable(c echo.Context) error {\n\tret := _m.Called(c)\n\n\tvar r0 error\n\tif rf, ok := ret.Get(0).(func(echo.Context) error); ok {\n\t\tr0 = rf(c)\n\t} else {\n\t\tr0 = ret.Error(0)\n\t}\n\n\treturn r0\n}",
"func (m *Group) SetTeam(value Teamable)() {\n m.team = value\n}",
"func (r *Raft) becomeCandidate() {\n\t// Your Code Here (2A).\n\tif _, ok := r.Prs[r.id]; !ok {\n\t\treturn\n\t}\n\tr.State = StateCandidate\n\tr.Term++\n\tr.Lead = None\n\tr.Vote = r.id\n\tr.votes = make(map[uint64]bool)\n\tr.votes[r.id] = true // 自己给自己投票\n\tr.actualElectionTimeout = rand.Intn(r.electionTimeout) + r.electionTimeout\n\tr.leadTransferee = None\n}",
"func (c *Client) SetVoteChoice(ctx context.Context, hash *chainhash.Hash,\n\tchoices []wallet.AgendaChoice, tspendPolicy map[string]string, treasuryPolicy map[string]string) error {\n\n\t// Retrieve current voting preferences from VSP.\n\tstatus, err := c.status(ctx, hash)\n\tif err != nil {\n\t\tif errors.Is(err, errors.Locked) {\n\t\t\treturn err\n\t\t}\n\t\tlog.Errorf(\"Could not check status of VSP ticket %s: %v\", hash, err)\n\t\treturn nil\n\t}\n\n\t// Check for any mismatch between the provided voting preferences and the\n\t// VSP preferences to determine if VSP needs to be updated.\n\tupdate := false\n\n\t// Check consensus vote choices.\n\tfor _, newChoice := range choices {\n\t\tvspChoice, ok := status.VoteChoices[newChoice.AgendaID]\n\t\tif !ok {\n\t\t\tupdate = true\n\t\t\tbreak\n\t\t}\n\t\tif vspChoice != newChoice.ChoiceID {\n\t\t\tupdate = true\n\t\t\tbreak\n\t\t}\n\t}\n\n\t// Apply the above changes to the two checks below.\n\n\t// Check tspend policies.\n\tfor newTSpend, newChoice := range tspendPolicy {\n\t\tvspChoice, ok := status.TSpendPolicy[newTSpend]\n\t\tif !ok {\n\t\t\tupdate = true\n\t\t\tbreak\n\t\t}\n\t\tif vspChoice != newChoice {\n\t\t\tupdate = true\n\t\t\tbreak\n\t\t}\n\t}\n\n\t// Check treasury policies.\n\tfor newKey, newChoice := range treasuryPolicy {\n\t\tvspChoice, ok := status.TSpendPolicy[newKey]\n\t\tif !ok {\n\t\t\tupdate = true\n\t\t\tbreak\n\t\t}\n\t\tif vspChoice != newChoice {\n\t\t\tupdate = true\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif !update {\n\t\tlog.Debugf(\"VSP already has correct vote choices for ticket %s\", hash)\n\t\treturn nil\n\t}\n\n\tlog.Debugf(\"Updating vote choices on VSP for ticket %s\", hash)\n\terr = c.setVoteChoices(ctx, hash, choices, tspendPolicy, treasuryPolicy)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func (_m *IService) SetReputation(id string, newRep int64) bool {\n\tret := _m.Called(id, newRep)\n\n\tvar r0 bool\n\tif rf, ok := ret.Get(0).(func(string, int64) bool); ok {\n\t\tr0 = rf(id, newRep)\n\t} else {\n\t\tr0 = ret.Get(0).(bool)\n\t}\n\n\treturn r0\n}",
"func (me *TxsdFeDisplacementMapTypeXChannelSelector) Set(s string) { (*xsdt.String)(me).Set(s) }",
"func (s *StringEnum) Set(arg string) error {\n\tif _, ok := s.choices[s.choiceMapper(arg)]; !ok {\n\t\tmsg := \"%w (valid choices: %v\"\n\t\tif s.caseInsensitive {\n\t\t\tmsg += \" [case insensitive]\"\n\t\t}\n\t\tmsg += \")\"\n\t\treturn fmt.Errorf(msg, ErrInvalidChoice, s.choiceNames)\n\t}\n\n\ts.val = arg\n\n\treturn nil\n}",
"func (mmRemoveJoinCandidate *mCandidateControlFeederMockRemoveJoinCandidate) Set(f func(candidateAdded bool, nodeID insolar.ShortNodeID) (b1 bool)) *CandidateControlFeederMock {\n\tif mmRemoveJoinCandidate.defaultExpectation != nil {\n\t\tmmRemoveJoinCandidate.mock.t.Fatalf(\"Default expectation is already set for the CandidateControlFeeder.RemoveJoinCandidate method\")\n\t}\n\n\tif len(mmRemoveJoinCandidate.expectations) > 0 {\n\t\tmmRemoveJoinCandidate.mock.t.Fatalf(\"Some expectations are already set for the CandidateControlFeeder.RemoveJoinCandidate method\")\n\t}\n\n\tmmRemoveJoinCandidate.mock.funcRemoveJoinCandidate = f\n\treturn mmRemoveJoinCandidate.mock\n}",
"func (_m *Prompter) Choice(prompt string, options []string) string {\n\tret := _m.Called(prompt, options)\n\n\tvar r0 string\n\tif rf, ok := ret.Get(0).(func(string, []string) string); ok {\n\t\tr0 = rf(prompt, options)\n\t} else {\n\t\tr0 = ret.Get(0).(string)\n\t}\n\n\treturn r0\n}",
"func (m *EducationFeedbackOutcome) SetFeedback(value EducationFeedbackable)() {\n m.feedback = value\n}",
"func (m *ChannelIdentity) SetChannelId(value *string)() {\n m.channelId = value\n}",
"func (_Energyconsumption *EnergyconsumptionTransactor) SetConsumer(opts *bind.TransactOpts, _owner string, _deviceType string, _peakPowerPos uint32, _peakPowerNeg uint32, _latitude uint32, _longitude uint32, _voltageLevel uint32, _location string, _installDate string) (*types.Transaction, error) {\n\treturn _Energyconsumption.contract.Transact(opts, \"setConsumer\", _owner, _deviceType, _peakPowerPos, _peakPowerNeg, _latitude, _longitude, _voltageLevel, _location, _installDate)\n}",
"func (b *Bot) SetChatStickerSet(request axon.O) (result bool, err error) {\n\tvar response interface{}\n\tif response, err = b.doPost(\"setChatStickerSet\", request); err == nil {\n\t\tresult = response.(bool)\n\t}\n\treturn\n}",
"func (b *GetParticipantsQueryBuilder) Kicked(paramQ string) *GetParticipantsQueryBuilder {\n\tb.req.Filter = &tg.ChannelParticipantsKicked{\n\t\tQ: paramQ,\n\t}\n\treturn b\n}",
"func SetGuestResponse(partyUUID string, response bool) error {\n\tapp.InitDB()\n\n\tquery := \"UPDATE guest SET attending = ? WHERE party_uuid = ?\"\n\trevel.INFO.Printf(\"Query -> %s\", query)\n\n\tresult, err := app.DB.Exec(query, response, partyUUID)\n\trevel.INFO.Printf(\"%s -> %s\", result, err)\n\treturn nil\n}",
"func NewMockClientChooser(ctrl *gomock.Controller) *MockClientChooser {\n\tmock := &MockClientChooser{ctrl: ctrl}\n\tmock.recorder = &MockClientChooserMockRecorder{mock}\n\treturn mock\n}",
"func (m *DirectoryAudit) SetInitiatedBy(value AuditActivityInitiatorable)() {\n m.initiatedBy = value\n}",
"func (p *Player) SetChannel(c *api.Channel) {\n\tp.chSetChannel <- c\n}",
"func (channelTree *ChannelTree) SetOnChannelSelect(handler func(channelID string)) {\n\tchannelTree.onChannelSelect = handler\n}",
"func (m *User) SetTeamwork(value UserTeamworkable)() {\n m.teamwork = value\n}",
"func (r *Raft) becomeCandidate() {\n\tr.State = StateCandidate\n\tr.Term += 1\n\tr.votes = make(map[uint64]bool)\n\t// vote for self\n\tr.votes[r.id] = true\n\tr.Vote = r.id\n\tr.electionElapsed = 0\n\tr.randomElectionTimeout = randomTimeout(r.electionTimeout)\n\tr.voteFailCount = 0\n\n\t// Your Code Here (2A).\n}",
"func (m *ChatMessage) SetChannelIdentity(value ChannelIdentityable)() {\n m.channelIdentity = value\n}",
"func (m *AssignedEntitiesWithMetricTile) SetConfigured(val bool) {\n\tm.configuredField = val\n}",
"func (suite *KeeperTestSuite) TestSetChannel() {\n\t// create client and connections on both chains\n\tpath := ibctesting.NewPath(suite.chainA, suite.chainB)\n\tsuite.coordinator.SetupConnections(path)\n\n\t// check for channel to be created on chainA\n\t_, found := suite.chainA.App.GetIBCKeeper().ChannelKeeper.GetChannel(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID)\n\tsuite.False(found)\n\n\tpath.SetChannelOrdered()\n\n\t// init channel\n\terr := path.EndpointA.ChanOpenInit()\n\tsuite.NoError(err)\n\n\tstoredChannel, found := suite.chainA.App.GetIBCKeeper().ChannelKeeper.GetChannel(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID)\n\t// counterparty channel id is empty after open init\n\texpectedCounterparty := types.NewCounterparty(path.EndpointB.ChannelConfig.PortID, \"\")\n\n\tsuite.True(found)\n\tsuite.Equal(types.INIT, storedChannel.State)\n\tsuite.Equal(types.ORDERED, storedChannel.Ordering)\n\tsuite.Equal(expectedCounterparty, storedChannel.Counterparty)\n}",
"func (m *Vulnerability) SetHasChatter(value *bool)() {\n err := m.GetBackingStore().Set(\"hasChatter\", value)\n if err != nil {\n panic(err)\n }\n}",
"func (m *VirtualEndpoint) SetExternalPartnerSettings(value []CloudPcExternalPartnerSettingable)() {\n err := m.GetBackingStore().Set(\"externalPartnerSettings\", value)\n if err != nil {\n panic(err)\n }\n}",
"func (c *PumpsClient) SetSelectStrategy(strategy string) error {\n\tif strategy != Range && strategy != Hash {\n\t\treturn errors.Errorf(\"strategy %s is not support\", strategy)\n\t}\n\n\tc.Lock()\n\tc.Selector = NewSelector(strategy)\n\tc.Selector.SetPumps(copyPumps(c.Pumps.AvaliablePumps))\n\tc.Unlock()\n\treturn nil\n}",
"func (o *Dialercampaignconfigchangecampaign) SetField(field string, fieldValue interface{}) {\n\t// Get Value object for field\n\ttarget := reflect.ValueOf(o)\n\ttargetField := reflect.Indirect(target).FieldByName(field)\n\n\t// Set value\n\tif fieldValue != nil {\n\t\ttargetField.Set(reflect.ValueOf(fieldValue))\n\t} else {\n\t\t// Must create a new Value (creates **type) then get its element (*type), which will be nil pointer of the appropriate type\n\t\tx := reflect.Indirect(reflect.New(targetField.Type()))\n\t\ttargetField.Set(x)\n\t}\n\n\t// Add field to set field names list\n\tif o.SetFieldNames == nil {\n\t\to.SetFieldNames = make(map[string]bool)\n\t}\n\to.SetFieldNames[field] = true\n}",
"func SetByCode(code string, scopeType Scope) (o Option, err error) {\n\tc := MockCode(code)\n\t// GroupID does not have a scope code\n\tswitch scopeType {\n\tcase WebsiteID:\n\t\to.Website = c\n\tcase StoreID:\n\t\to.Store = c\n\tdefault:\n\t\terr = ErrUnsupportedScope\n\t}\n\treturn\n}",
"func (cli *CliPrompter) Choose(pr string, options []string) int {\n\tselected := \"\"\n\tprompt := &survey.Select{\n\t\tMessage: pr,\n\t\tOptions: options,\n\t}\n\t_ = survey.AskOne(prompt, &selected, survey.WithValidator(survey.Required))\n\n\t// return the selected element index\n\tfor i, option := range options {\n\t\tif selected == option {\n\t\t\treturn i\n\t\t}\n\t}\n\treturn 0\n}",
"func (s *ImageSpec) SetZChannel(val int) {\n\tC.ImageSpec_set_z_channel(s.ptr, C.int(val))\n\truntime.KeepAlive(s)\n}",
"func (m *TeamworkSoftwareUpdateHealth) SetPartnerAgentSoftwareUpdateStatus(value TeamworkSoftwareUpdateStatusable)() {\n err := m.GetBackingStore().Set(\"partnerAgentSoftwareUpdateStatus\", value)\n if err != nil {\n panic(err)\n }\n}",
"func (t *Test) SetParam(param string, value interface{}, flag ...paramFlag) {\n\tif len(flag) > 1 {\n\t\tpanic(\"The overrideable parameter is just an optional param, not variadic.\")\n\t}\n\n\tif _, ok := TestParams[param]; !ok || (len(flag) == 1 && flag[0] == Overridable) {\n\t\tTestParams[param] = value\n\t}\n}",
"func MaybeSetVerbosity(log Logger, verbosity Level) {\n\ttype verbositySetter interface {\n\t\tSetVerbosity(Level)\n\t}\n\tv, ok := log.(verbositySetter)\n\tif ok {\n\t\tv.SetVerbosity(verbosity)\n\t}\n}",
"func (m *ItemFacet) SetSource(value PersonDataSourcesable)() {\n err := m.GetBackingStore().Set(\"source\", value)\n if err != nil {\n panic(err)\n }\n}"
] |
[
"0.58171195",
"0.53884727",
"0.5161208",
"0.4963434",
"0.4761757",
"0.47269666",
"0.46368372",
"0.45769733",
"0.43802416",
"0.43200487",
"0.42954415",
"0.42653507",
"0.42040944",
"0.42033854",
"0.41568658",
"0.40611437",
"0.40466717",
"0.40457955",
"0.40342954",
"0.40198773",
"0.40133005",
"0.40040132",
"0.39946803",
"0.3989695",
"0.39885083",
"0.39832172",
"0.39761212",
"0.39703798",
"0.39682156",
"0.39267334",
"0.38932258",
"0.38780704",
"0.3871991",
"0.38709608",
"0.38657925",
"0.38620347",
"0.38614604",
"0.38519514",
"0.38242728",
"0.38198477",
"0.38153332",
"0.38150582",
"0.38094762",
"0.380943",
"0.3808955",
"0.37991282",
"0.37719306",
"0.3754862",
"0.37457228",
"0.37397823",
"0.37391388",
"0.37355313",
"0.3735284",
"0.3729108",
"0.37177444",
"0.37153158",
"0.37123886",
"0.37107995",
"0.3709643",
"0.37066987",
"0.37019047",
"0.37006366",
"0.36981604",
"0.36925447",
"0.36910173",
"0.36839694",
"0.3681744",
"0.36684072",
"0.36600885",
"0.36568743",
"0.36556217",
"0.36511624",
"0.3644961",
"0.36435002",
"0.36365998",
"0.36336717",
"0.3631862",
"0.36250028",
"0.36186582",
"0.36183497",
"0.3614086",
"0.36130643",
"0.36107752",
"0.3607519",
"0.3606253",
"0.35716408",
"0.35698",
"0.35529175",
"0.3547916",
"0.3543451",
"0.35367778",
"0.35333642",
"0.35301748",
"0.3529172",
"0.3526918",
"0.3525526",
"0.3524996",
"0.35217223",
"0.3512243",
"0.35078433"
] |
0.7558031
|
0
|
GetChosen returns value of Chosen conditional field.
|
func (p *PollAnswerVoters) GetChosen() (value bool) {
if p == nil {
return
}
return p.Flags.Has(0)
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (r *ReactionCount) GetChosenOrder() (value int, ok bool) {\n\tif r == nil {\n\t\treturn\n\t}\n\tif !r.Flags.Has(0) {\n\t\treturn value, false\n\t}\n\treturn r.ChosenOrder, true\n}",
"func (p *PollAnswerVoters) SetChosen(value bool) {\n\tif value {\n\t\tp.Flags.Set(0)\n\t\tp.Chosen = true\n\t} else {\n\t\tp.Flags.Unset(0)\n\t\tp.Chosen = false\n\t}\n}",
"func (s *SelectableAttribute) Chooser() BooleanAttribute {\n\treturn s.chooser\n}",
"func (o *Outbound) Chooser() peer.Chooser {\n\treturn o.chooser\n}",
"func (q *PollVoteQuery) FindByChosenOption(v string) *PollVoteQuery {\n\treturn q.Where(kallax.Eq(Schema.PollVote.ChosenOption, v))\n}",
"func (this *Client) GetCandidate(value string, opts ...RequestOpt) (*schema.Candidate, error) {\n\tvar response struct {\n\t\tCandidate *schema.Candidate `json:\"candidate\"`\n\t}\n\tpayload := NewGetPayload(ContentTypeJson)\n\tif err := this.Do(payload, &response, append(opts, OptPath(\"candidates\", value))...); err != nil {\n\t\treturn nil, err\n\t} else {\n\t\treturn response.Candidate, nil\n\t}\n}",
"func (o *HttpDeliveryOptions) GetValueOk() (*DeliveryOverrideType, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn &o.Value, true\n}",
"func (v *FileChooser) GetChoice(id string) string {\n\tcId := C.CString(id)\n\tdefer C.free(unsafe.Pointer(cId))\n\tc := C.gtk_file_chooser_get_choice(v.native(), (*C.gchar)(cId))\n\treturn C.GoString(c)\n}",
"func (o *DistinctOption) Get() (bool, int) {\n\tif o == nil {\n\t\treturn false, 0\n\t}\n\treturn o.value == 1, o.value\n}",
"func (o IFS) Choose() *Affine {\n\tr := rand.Intn(len(o.Choices))\n\treturn o.Choices[r]\n}",
"func (this *TriggerAction) Get(field string) interface{} {\n switch field {\n case \"id\":\n return this.Id()\n case \"agentName\":\n return this.agentName\n case \"propertyName\":\n return this.propertyName\n case \"propertyValue\":\n return this.propertyValue\n }\n\n return nil\n}",
"func (cv *Choice) String() string {\n\tif cv.Choice != nil {\n\t\treturn *cv.Choice\n\t}\n\treturn \"\"\n}",
"func (po *Post) Value(name string) (ent.Value, error) {\n\treturn po.selectValues.Get(name)\n}",
"func (a Meta_Country) Get(fieldName string) (value interface{}, found bool) {\n\tif a.AdditionalProperties != nil {\n\t\tvalue, found = a.AdditionalProperties[fieldName]\n\t}\n\treturn\n}",
"func (r *PollOption) Value(col string) (interface{}, error) {\n\tswitch col {\n\tcase \"id\":\n\t\treturn r.ID, nil\n\tcase \"poll_id\":\n\t\tv := r.Model.VirtualColumn(col)\n\t\tif v == nil {\n\t\t\treturn nil, kallax.ErrEmptyVirtualColumn\n\t\t}\n\t\treturn v, nil\n\tcase \"content\":\n\t\treturn r.Content, nil\n\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"kallax: invalid column in PollOption: %s\", col)\n\t}\n}",
"func (mg *OpenIDConnectProvider) GetCondition(ct xpv1.ConditionType) xpv1.Condition {\n\treturn mg.Status.GetCondition(ct)\n}",
"func (s *SelectableAttribute) value(v []Equaler) Equaler {\n\tchooserVal := v[0].(BoolEqualer).B\n\tattrVal := v[1]\n\n\tif chooserVal {\n\t\treturn attrVal\n\t}\n\treturn s.unselectedValue\n}",
"func (mg *TransitGatewayVpcAttachmentAccepter) GetCondition(ct xpv1.ConditionType) xpv1.Condition {\n\treturn mg.Status.GetCondition(ct)\n}",
"func (a FluxSuggestion_Params) Get(fieldName string) (value string, found bool) {\n\tif a.AdditionalProperties != nil {\n\t\tvalue, found = a.AdditionalProperties[fieldName]\n\t}\n\treturn\n}",
"func (c *Config) MaybeValue() string {\n\tif c.Value != nil {\n\t\treturn *c.Value\n\t}\n\treturn \"\"\n}",
"func (s GetChannelPolicyInput) GoString() string {\n\treturn s.String()\n}",
"func (r *ReactionCount) SetChosenOrder(value int) {\n\tr.Flags.Set(0)\n\tr.ChosenOrder = value\n}",
"func (accepts Accepts) GetPreferredValue(availables []string) (index int, value string, ok bool) {\n\tfor _, accept := range accepts {\n\t\tfor i, avail := range availables {\n\t\t\tif accept.value == avail {\n\t\t\t\treturn i, avail, true\n\t\t\t}\n\t\t}\n\t}\n\treturn\n}",
"func (a Meta_Priority) Get(fieldName string) (value interface{}, found bool) {\n\tif a.AdditionalProperties != nil {\n\t\tvalue, found = a.AdditionalProperties[fieldName]\n\t}\n\treturn\n}",
"func (s GetProposalInput) GoString() string {\n\treturn s.String()\n}",
"func getWaitChan(ctx context.Context) (wait waitChan, ok bool) {\n\twait, ok = ctx.Value(waitKey{}).(waitChan)\n\n\treturn\n}",
"func (m *QueryParameterMatcher) GetValue() string {\n\tif m != nil {\n\t\treturn m.Value\n\t}\n\treturn \"\"\n}",
"func (s CandidateProperties) GoString() string {\n\treturn s.String()\n}",
"func (s SlotValueSelectionSetting) GoString() string {\n\treturn s.String()\n}",
"func (p *pwmGroup) Get(channel uint8) (value uint32) {\n\tchannel &= 1\n\treturn uint32(p.getChanLevel(channel))\n}",
"func (s EvaluationFormSingleSelectQuestionOption) GoString() string {\n\treturn s.String()\n}",
"func (s GetPropertyValueInput) GoString() string {\n\treturn s.String()\n}",
"func (p *colorPicker) Pick(image string) Color {\n\tif c, present := p.imageColors[tag.StripTag(image, false)]; present {\n\t\treturn c\n\t}\n\n\t// If no mapping is found, don't add any color formatting\n\treturn None\n}",
"func (cli *CLI) Choose() (string, error) {\n\tcolorstring.Fprintf(cli.errStream, chooseText)\n\n\tnum, err := cli.AskNumber(4, 1)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// If user selects 3, should ask user GPL V2 or V3\n\tif num == 3 {\n\t\tvar buf bytes.Buffer\n\t\tbuf.WriteString(\"\\n\")\n\t\tbuf.WriteString(\"Which version do you want?\\n\")\n\t\tbuf.WriteString(\" 1) V2\\n\")\n\t\tbuf.WriteString(\" 2) V3\\n\")\n\t\tfmt.Fprintf(cli.errStream, buf.String())\n\n\t\tnum, err = cli.AskNumber(2, 1)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tnum += 4\n\t}\n\n\tvar key string\n\tswitch num {\n\tcase 1:\n\t\tkey = \"mit\"\n\tcase 2:\n\t\tkey = \"apache-2.0\"\n\tcase 4:\n\t\tkey = \"\"\n\tcase 5:\n\t\tkey = \"gpl-2.0\"\n\tcase 6:\n\t\tkey = \"gpl-3.0\"\n\tdefault:\n\t\t// Should not reach here\n\t\tpanic(\"Invalid number\")\n\t}\n\n\treturn key, nil\n}",
"func (o *HttpDeliveryOptions) GetValue() DeliveryOverrideType {\n\tif o == nil {\n\t\tvar ret DeliveryOverrideType\n\t\treturn ret\n\t}\n\n\treturn o.Value\n}",
"func (mg *VpcPeeringConnection) GetCondition(ct xpv1.ConditionType) xpv1.Condition {\n\treturn mg.Status.GetCondition(ct)\n}",
"func (d *Detector) GetPreferred() (Collector, string, error) {\n\t// Detection rounds finished, exit fast\n\tif d.candidates == nil {\n\t\tif d.preferredCollector == nil {\n\t\t\treturn nil, \"\", ErrPermaFail\n\t\t}\n\t\treturn d.preferredCollector, d.preferredName, nil\n\t}\n\n\t// Retry all remaining candidates\n\tdetected, remaining := retryCandidates(d.candidates)\n\td.candidates = remaining\n\n\t// Add newly detected detected\n\tfor name, c := range detected {\n\t\td.detected[name] = c\n\t}\n\n\t// Pick preferred collector among detected ones\n\tpreferred := rankCollectors(d.detected, d.preferredName)\n\tif preferred != d.preferredName {\n\t\tlog.Infof(\"Using collector %s\", preferred)\n\t\td.preferredName = preferred\n\t\td.preferredCollector = d.detected[preferred]\n\t}\n\n\t// Stop detection when all candidates are tested\n\t// return a PermaFail error if nothing was detected\n\tif len(remaining) == 0 {\n\t\td.candidates = nil\n\t\td.detected = nil\n\t\tif d.preferredCollector == nil {\n\t\t\treturn nil, \"\", ErrPermaFail\n\t\t}\n\t}\n\n\tif d.preferredCollector == nil {\n\t\treturn nil, \"\", ErrNothingYet\n\t}\n\treturn d.preferredCollector, d.preferredName, nil\n}",
"func (s EvaluationFormSingleSelectQuestionAutomationOption) GoString() string {\n\treturn s.String()\n}",
"func (t *ChannelsToggleJoinRequestRequest) GetChannel() (value InputChannelClass) {\n\tif t == nil {\n\t\treturn\n\t}\n\treturn t.Channel\n}",
"func (a Meta_CaProvince) Get(fieldName string) (value interface{}, found bool) {\n\tif a.AdditionalProperties != nil {\n\t\tvalue, found = a.AdditionalProperties[fieldName]\n\t}\n\treturn\n}",
"func (yn *YesNo) Value() (driver.Value, error) {\n\treturn []byte{byte(*yn)}, nil\n}",
"func getChoice(request events.APIGatewayProxyRequest, span opentracing.Span) (choice string) {\n\t_, winOk := request.QueryStringParameters[\"win\"]\n\tif winOk {\n\t\tspan.SetTag(\"WinFlag\", true)\n\t\treturn \"win\"\n\t} else {\n\t\tspan.SetTag(\"WinFlag\", false)\n\t}\n\tchoiceQP, qpOk := request.QueryStringParameters[\"choice\"]\n\tif !qpOk {\n\t\tspan.LogKV(\"event\", \"No choice query parameter provided.\")\n\t} else {\n\t\tspan.SetTag(\"choiceQueryParameter\", choiceQP)\n\t}\n\t_, validChoice := choiceToNum[choiceQP]\n\tif !validChoice {\n\t\trandomChoice := numToChoice[getRandomNumber()]\n\t\tinvalid := fmt.Sprintf(\"Invalid choice query parameter \\\"%s\\\". Using %s selected at random.\",\n\t\t\tchoiceQP, randomChoice)\n\t\tspan.LogKV(\"event\", invalid)\n\t\tspan.SetTag(\"randomChoice\", randomChoice)\n\t\tchoice = randomChoice\n\t} else {\n\t\tchoice = choiceQP\n\t}\n\treturn choice\n}",
"func (pmux *PubSubMux) GetPubCh(channel string) (chan<- interface{}, bool) {\n\tpmux.muxLock.Lock()\n\tdefer pmux.muxLock.Unlock()\n\n\tp, ok := pmux.mux[channel]\n\tif !ok {\n\t\tp = newPubSub()\n\t\tpmux.mux[channel] = p\n\t}\n\n\tsrcGotten := p.srcGotten\n\tp.srcGotten = true\n\treturn p.src, srcGotten\n}",
"func (o *ColorPicker) GetPickColor() gdnative.Color {\n\t//log.Println(\"Calling ColorPicker.GetPickColor()\")\n\n\t// Build out the method's arguments\n\tptrArguments := make([]gdnative.Pointer, 0, 0)\n\n\t// Get the method bind\n\tmethodBind := gdnative.NewMethodBind(\"ColorPicker\", \"get_pick_color\")\n\n\t// Call the parent method.\n\t// Color\n\tretPtr := gdnative.NewEmptyColor()\n\tgdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)\n\n\t// If we have a return type, convert it from a pointer into its actual object.\n\tret := gdnative.NewColorFromPointer(retPtr)\n\treturn ret\n}",
"func (b Bitfield) GetValue(field Bitfield) uint8 {\n\tif b.Get(field) {\n\t\treturn 1\n\t}\n\treturn 0\n}",
"func (field Field) RequiredValue() string {\n\tresult, _ := field.TagGet(\"require\")\n\treturn result\n}",
"func validateChosen(message string) bool {\n\tmatch, _ := regexp.MatchString(\"chosen=\", message)\n\tmatch2, _ := regexp.MatchString(\"index=\", message)\n\treturn match && match2\n}",
"func (a Meta_Connections) Get(fieldName string) (value interface{}, found bool) {\n\tif a.AdditionalProperties != nil {\n\t\tvalue, found = a.AdditionalProperties[fieldName]\n\t}\n\treturn\n}",
"func (s DescribeSubscribedWorkteamInput) GoString() string {\n\treturn s.String()\n}",
"func (c ChooserProps) IsProps() {}",
"func (o *OptionsProvider) Get() interface{} {\n\treturn o.spec\n}",
"func (c LessThanEqual) GetValue() interface{} {\n\treturn c.Value\n}",
"func (a Meta_Up) Get(fieldName string) (value interface{}, found bool) {\n\tif a.AdditionalProperties != nil {\n\t\tvalue, found = a.AdditionalProperties[fieldName]\n\t}\n\treturn\n}",
"func (m *Option) GetValue() (val string, set bool) {\n\tif m.Value == nil {\n\t\treturn\n\t}\n\n\treturn *m.Value, true\n}",
"func (mg *TransitGateway) GetCondition(ct xpv1.ConditionType) xpv1.Condition {\n\treturn mg.Status.GetCondition(ct)\n}",
"func (m *User) GetCountry()(*string) {\n return m.country\n}",
"func (s EvaluationFormSingleSelectQuestionProperties) GoString() string {\n\treturn s.String()\n}",
"func registerOnChosenReceived(self *State, message string) {\n\tif !validateChosen(message) || self.IsLeader {\n\t\treturn\n\t}\n\n\tfirstBracket := strings.Index(message, \"[\")\n\tsecondBracket := strings.Index(message, \"]\")\n\tself.Proposition.ChosenValue.CopyFromCommand(extractCommand(message[(firstBracket + 1):secondBracket]))\n\n\trestString := message[(secondBracket + 1):]\n\t_, index := GetKeyValuePair(restString)\n\n\tsynchronize(self, index)\n}",
"func (o offlineFallback) GetValue() interface{} {\n\treturn bool(o)\n}",
"func (a TemplateApply_Secrets) Get(fieldName string) (value string, found bool) {\n\tif a.AdditionalProperties != nil {\n\t\tvalue, found = a.AdditionalProperties[fieldName]\n\t}\n\treturn\n}",
"func (v *Vending) Get(c echo.Context) error {\n\tif v.chocolate == 0 {\n\t\treturn c.String(http.StatusOK, \"Out of chocolate please refill\")\n\t}\n\treturn c.String(http.StatusOK, fmt.Sprintf(\"There are %v pieces of chocolate left.\", v.chocolate))\n}",
"func (s CandidateGenerationConfig) GoString() string {\n\treturn s.String()\n}",
"func GetAvailableCriteria(property *Property) (*AvailableCriteria, error) {\n\tavailableCriteria := NewAvailableCriteria()\n\tif err := availableCriteria.GetAvailableCriteria(property); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn availableCriteria, nil\n}",
"func (option ApplicationCommandInteractionDataOption) ChannelIDValue() (value string, ok bool) {\n\treturn option.StringValue()\n}",
"func (s VoteOnProposalInput) GoString() string {\n\treturn s.String()\n}",
"func (s GetSubscriberInput) GoString() string {\n\treturn s.String()\n}",
"func (p *googleCloudProvider) getDefaultValue(\n\tkey resource.PropertyKey,\n\tconfigName string,\n\tolds resource.PropertyMap,\n) (*resource.PropertyValue, bool) {\n\t// 1. Check if old inputs define the value.\n\tif v, ok := olds[key]; ok {\n\t\treturn &v, true\n\t}\n\n\t// 2. Check if the config has a corresponding value.\n\tif cv, ok := p.config[configName]; ok {\n\t\tv := resource.NewStringProperty(cv)\n\t\treturn &v, true\n\t}\n\n\treturn nil, false\n}",
"func (s UserTurnInputSpecification) GoString() string {\n\treturn s.String()\n}",
"func Choose(pr string, options []string) int {\n\treturn defaultPrompter.Choose(pr, options)\n}",
"func (bi *bucketInternal) GetRandom(valuePtr interface{}) (string, Cas, error) {\n\treturn bi.b.getRandom(valuePtr)\n}",
"func (s DeviceSelectionConfig) GoString() string {\n\treturn s.String()\n}",
"func (s PromptSearchCriteria) GoString() string {\n\treturn s.String()\n}",
"func (p *googleCloudProvider) getDefaultValue(key resource.PropertyKey, configName string, olds resource.PropertyMap) (*resource.PropertyValue, bool) {\n\t// 1. Check if old inputs define the value.\n\tif v, ok := olds[key]; ok {\n\t\treturn &v, true\n\t}\n\n\t// 2. Check if the config has a corresponding value.\n\tif cv, ok := p.config[configName]; ok {\n\t\tv := resource.NewStringProperty(cv)\n\t\treturn &v, true\n\t}\n\n\treturn nil, false\n}",
"func (c *InitRainbondCluster) GetChan() chan apiv1.Message {\n\treturn c.result\n}",
"func (s ConditionalSpecification) GoString() string {\n\treturn s.String()\n}",
"func (m *ManagementTemplateStep) GetAcceptedVersion()(ManagementTemplateStepVersionable) {\n val, err := m.GetBackingStore().Get(\"acceptedVersion\")\n if err != nil {\n panic(err)\n }\n if val != nil {\n return val.(ManagementTemplateStepVersionable)\n }\n return nil\n}",
"func (mg *TransitGatewayVpcAttachment) GetCondition(ct xpv1.ConditionType) xpv1.Condition {\n\treturn mg.Status.GetCondition(ct)\n}",
"func computeOptionValue(def_value string, opt_conf string, is_conf error, options map[string]string, opt_name string) string {\n\tfinal_value := def_value\n\n\tif is_conf == nil {\n\t\tfinal_value = opt_conf\n\t}\n\n\topt_val, is_opt := options[opt_name]\n\tif is_opt {\n\t\tfinal_value = opt_val\n\t}\n\n\treturn final_value\n}",
"func (s GetRevisionInput) GoString() string {\n\treturn s.String()\n}",
"func (s GetBrowserSettingsInput) GoString() string {\n\treturn s.String()\n}",
"func (o *Invoice) GetChannelOk() (*string, bool) {\n\tif o == nil || o.Channel == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Channel, true\n}",
"func (p *ProofRequestHolder) GetCriteria(index int) (*presentation.CriteriaHolder, error) {\n\tnumberOfCriteria := len(p.ProofRequest.ProofRequest.Criteria)\n\tif index > (numberOfCriteria - 1) {\n\t\terr := fmt.Errorf(\"index out of bounds %d elements in the array\", numberOfCriteria)\n\t\treturn nil, err\n\t}\n\n\tholder := presentation.CriteriaHolder{\n\t\tIndex: index,\n\t\tCriterion: p.ProofRequest.ProofRequest.Criteria[index],\n\t\tVariables: p.ProofRequest.ConditionVariables,\n\t}\n\treturn &holder, nil\n}",
"func (a ParamsWithAddPropsParams_P2_Inner) Get(fieldName string) (value string, found bool) {\n\tif a.AdditionalProperties != nil {\n\t\tvalue, found = a.AdditionalProperties[fieldName]\n\t}\n\treturn\n}",
"func (s AutoMLCandidateGenerationConfig) GoString() string {\n\treturn s.String()\n}",
"func (s AutoMLJobCompletionCriteria) GoString() string {\n\treturn s.String()\n}",
"func (o *ViewCustomFieldTask) GetValueOk() (*map[string]interface{}, bool) {\n\tif o == nil || o.Value == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Value, true\n}",
"func ChosenSystem() System {\n\treturn system\n}",
"func (c *Client) Get(flag, env string) bool {\n\tv, err := c.get(flag, env)\n\tif err != nil {\n\t\treturn c.Default\n\t}\n\treturn v\n}",
"func (s IntentConfirmationSetting) GoString() string {\n\treturn s.String()\n}",
"func (options *Options) Value(name string) interface{} {\n\tvalue := options.eval.evalField(options.eval.curCtx(), name, false)\n\tif !value.IsValid() {\n\t\treturn nil\n\t}\n\n\treturn value.Interface()\n}",
"func (p *pool) get() (*channel, error) {\n\tif p.closed {\n\t\treturn nil, ErrPoolClosed\n\t}\n\n\tactiveChannel, ok := <-p.readyChannel\n\tif !ok {\n\t\treturn nil, ErrPoolClosed\n\t}\n\n\treturn activeChannel, nil\n}",
"func (s GetSearchSuggestionsInput) GoString() string {\n\treturn s.String()\n}",
"func (o *FeatureFlag) GetValue() string {\n\tif o == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\n\treturn o.Value\n}",
"func (s EvaluationFormSingleSelectQuestionAutomation) GoString() string {\n\treturn s.String()\n}",
"func (s GetChannelPolicyOutput) GoString() string {\n\treturn s.String()\n}",
"func (s PropertyLatestValue) GoString() string {\n\treturn s.String()\n}",
"func (s ShadowModelVariantConfig) GoString() string {\n\treturn s.String()\n}",
"func (c *Switch) Get() string {\n\treturn c.curRenderable\n}",
"func (o loadFromOnline) GetValue() interface{} {\n\treturn bool(o)\n}",
"func (_Contract *ContractCallerSession) GetVote(from common.Address, delegatedTo common.Address, proposalID *big.Int) (struct {\n\tWeight *big.Int\n\tChoices []*big.Int\n}, error) {\n\treturn _Contract.Contract.GetVote(&_Contract.CallOpts, from, delegatedTo, proposalID)\n}"
] |
[
"0.5641866",
"0.55887014",
"0.53598875",
"0.5266123",
"0.51962525",
"0.51438904",
"0.49943697",
"0.4619427",
"0.45437723",
"0.45410016",
"0.44951814",
"0.44936886",
"0.4493387",
"0.448874",
"0.44827282",
"0.4476039",
"0.4472224",
"0.4455197",
"0.44321918",
"0.44266415",
"0.43945852",
"0.43775284",
"0.4376891",
"0.4360926",
"0.4357517",
"0.43493035",
"0.43313134",
"0.4320939",
"0.43096328",
"0.43062648",
"0.42952165",
"0.42881092",
"0.42856103",
"0.4283608",
"0.42739382",
"0.4273591",
"0.42625007",
"0.42494074",
"0.42463857",
"0.42387536",
"0.4236037",
"0.42298457",
"0.42275158",
"0.42225948",
"0.42145896",
"0.42003474",
"0.41950524",
"0.41879",
"0.4183681",
"0.41827852",
"0.41717443",
"0.41703713",
"0.41690937",
"0.4167141",
"0.4163253",
"0.41610917",
"0.41499126",
"0.41486296",
"0.41479048",
"0.41450298",
"0.41447753",
"0.41408452",
"0.41364482",
"0.41273412",
"0.4116957",
"0.41168112",
"0.41157693",
"0.41137603",
"0.41113454",
"0.41098034",
"0.41061267",
"0.41020337",
"0.4098346",
"0.40947777",
"0.40947753",
"0.4092144",
"0.40869188",
"0.40866834",
"0.40860945",
"0.4084448",
"0.4081852",
"0.4080903",
"0.40693587",
"0.40657908",
"0.40656456",
"0.40637577",
"0.40618205",
"0.40596718",
"0.4052967",
"0.4051776",
"0.40482658",
"0.40480888",
"0.40473256",
"0.40435433",
"0.40412128",
"0.40411723",
"0.40405077",
"0.4032875",
"0.4032776",
"0.40290397"
] |
0.75561273
|
0
|
SetCorrect sets value of Correct conditional field.
|
func (p *PollAnswerVoters) SetCorrect(value bool) {
if value {
p.Flags.Set(1)
p.Correct = true
} else {
p.Flags.Unset(1)
p.Correct = false
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (tb *TextBuf) SetSpellCorrect(data interface{}, editFun spell.EditFunc) {\n\tif editFun == nil {\n\t\tif tb.SpellCorrect != nil {\n\t\t\ttb.SpellCorrect.SpellSig.Disconnect(tb.This())\n\t\t}\n\t\ttb.SpellCorrect.Destroy()\n\t\ttb.SpellCorrect = nil\n\t\treturn\n\t}\n\tif tb.SpellCorrect != nil {\n\t\tif tb.SpellCorrect.Context == data {\n\t\t\ttb.SpellCorrect.EditFunc = editFun\n\t\t\treturn\n\t\t}\n\t}\n\tgi.InitSpell()\n\ttb.SpellCorrect = &gi.SpellCorrect{}\n\ttb.SpellCorrect.InitName(tb.SpellCorrect, \"tb-spellcorrect\") // needed for standalone Ki's\n\ttb.SpellCorrect.Context = data\n\ttb.SpellCorrect.EditFunc = editFun\n\t// note: only need to connect once..\n\ttb.SpellCorrect.SpellSig.ConnectOnly(tb.This(), func(recv, send ki.Ki, sig int64, data interface{}) {\n\t\tif sig == int64(gi.SpellSelect) {\n\t\t\ttbf, _ := recv.Embed(KiT_TextBuf).(*TextBuf)\n\t\t\ttbf.CorrectText(data.(string)) // always use data\n\t\t} else if sig == int64(gi.SpellIgnore) {\n\t\t\ttbf, _ := recv.Embed(KiT_TextBuf).(*TextBuf)\n\t\t\ttbf.CorrectText(data.(string)) // always use data\n\t\t}\n\t})\n}",
"func (p *PollAnswerVoters) GetCorrect() (value bool) {\n\tif p == nil {\n\t\treturn\n\t}\n\treturn p.Flags.Has(1)\n}",
"func (mtr *Mxmx1inteccMetrics) SetCorrectable(val metrics.Counter) error {\n\tmtr.metrics.SetCounter(val, mtr.getOffset(\"Correctable\"))\n\treturn nil\n}",
"func (mtr *Mxmx0inteccMetrics) SetCorrectable(val metrics.Counter) error {\n\tmtr.metrics.SetCounter(val, mtr.getOffset(\"Correctable\"))\n\treturn nil\n}",
"func (q *Question) AnswerCorrect(attempt string) bool {\n\treturn q.Answer == strings.TrimSpace(attempt)\n}",
"func (m *TradeCorrectionMutation) SetCorrection(s string) {\n\tm.correction = &s\n}",
"func (bg bucketGroup) correct(prediction float64) float64 {\n\n\tswitch {\n\tcase prediction <= 2.5*bg.Len():\n\t\treturn bg.smallRangeCorrection(prediction, bg.Len())\n\tdefault:\n\t\treturn prediction\n\t}\n}",
"func (e *Evaluator) UnknownCorrect() uint {\n\treturn e.unknownCorrect\n}",
"func (tv *TextView) CancelCorrect() {\n\tif tv.Buf.SpellCorrect == nil || tv.ISearch.On || tv.QReplace.On {\n\t\treturn\n\t}\n\tif !tv.Buf.Opts.SpellCorrect {\n\t\treturn\n\t}\n\ttv.Buf.CurView = nil\n\ttv.Buf.SpellCorrect.Cancel()\n}",
"func (e *Evaluator) KnownCorrect() uint {\n\treturn e.knownCorrect\n}",
"func (tb *TextBuf) IsSpellCorrectEnabled(pos TextPos) bool {\n\tif tb.SpellCorrect == nil || !tb.Opts.SpellCorrect {\n\t\treturn false\n\t}\n\tswitch tb.Info.Cat {\n\tcase filecat.Doc: // always\n\t\treturn true\n\tcase filecat.Code:\n\t\treturn tb.InComment(pos)\n\tdefault:\n\t\treturn false\n\t}\n}",
"func (q *Question) IsAnswerCorrect(answer string) bool {\n\treturn answer == q.CorrectAnswer\n}",
"func (m *Model) Correct(word string) string {\n\tif m == nil || len(m.terms) == 0 {\n\t\treturn word\n\t}\n\n\tvar result *suggestItem\n\n\tfor _, si := range getSuggestSlice(m.terms, word) {\n\t\tif result == nil {\n\t\t\tresult = si\n\t\t\tcontinue\n\t\t}\n\n\t\tif si.score < result.score {\n\t\t\tresult = si\n\t\t\tcontinue\n\t\t}\n\t}\n\n\tif result.score > mathutil.Between(m.Threshold, 1, 1000) {\n\t\treturn word\n\t}\n\n\treturn result.term\n}",
"func (e *Evaluator) OverallCorrect() uint {\n\treturn e.knownCorrect + e.unknownCorrect\n}",
"func (tb *TextBuf) CorrectText(s string) {\n\tst := TextPos{tb.SpellCorrect.SrcLn, tb.SpellCorrect.SrcCh} // start of word\n\ttb.RemoveTag(st, token.TextSpellErr)\n\toend := st\n\toend.Ch += len(tb.SpellCorrect.Word)\n\ted := tb.SpellCorrect.EditFunc(tb.SpellCorrect.Context, s, tb.SpellCorrect.Word)\n\ttb.DeleteText(st, oend, true, true)\n\ttb.InsertText(st, []byte(ed.NewText), true, true)\n\tif tb.CurView != nil {\n\t\tep := st\n\t\tep.Ch += len(ed.NewText)\n\t\ttb.CurView.SetCursorShow(ep)\n\t\ttb.CurView = nil\n\t}\n}",
"func (tv *TextView) OfferCorrect() bool {\n\tif tv.Buf.SpellCorrect == nil || tv.ISearch.On || tv.QReplace.On || tv.IsInactive() {\n\t\treturn false\n\t}\n\tsel := tv.SelectReg\n\tif !tv.SelectWord() {\n\t\ttv.SelectReg = sel\n\t\treturn false\n\t}\n\ttbe := tv.Selection()\n\tif tbe == nil {\n\t\ttv.SelectReg = sel\n\t\treturn false\n\t}\n\ttv.SelectReg = sel\n\twb := string(tbe.ToBytes())\n\twbn := strings.TrimLeft(wb, \" \\t\")\n\tif len(wb) != len(wbn) {\n\t\treturn false // SelectWord captures leading whitespace - don't offer if there is leading whitespace\n\t}\n\tsugs, knwn, err := tv.Buf.SpellCorrect.CheckWordInline(wb)\n\tif knwn || err != nil {\n\t\treturn false\n\t}\n\ttv.Buf.SpellCorrect.Suggestions = sugs\n\ttv.Buf.SpellCorrect.Word = wb\n\ttv.Buf.SpellCorrect.SrcLn = tbe.Reg.Start.Ln\n\ttv.Buf.SpellCorrect.SrcCh = tbe.Reg.Start.Ch\n\n\tcpos := tv.CharStartPos(tv.CursorPos).ToPoint() // physical location\n\tcpos.X += 5\n\tcpos.Y += 10\n\ttv.Buf.CurView = tv\n\ttv.Buf.SpellCorrect.Show(wb, tv.Viewport, cpos)\n\treturn true\n}",
"func (s *State) ApplyClueAnswer(clue string, answer string, onlyCorrect bool) error {\n\tclue = strings.ToUpper(clue)\n\tnums, ok := s.Puzzle.ClueNumbers[clue]\n\tif !ok {\n\t\treturn fmt.Errorf(\"invalid clue identifier: %s\", clue)\n\t}\n\n\t// Ignore spaces within the answer and ensure the answer is all uppercase.\n\tanswer = strings.ReplaceAll(answer, \" \", \"\")\n\tanswer = strings.ToUpper(answer)\n\n\t// Ensure that we have a proper length answer\n\tif len(nums) != len(answer) {\n\t\treturn fmt.Errorf(\"unable to apply answer %s to clue %s, incompatible sizes\", answer, clue)\n\t}\n\n\t// Cache the coordinates of each cell of the answer.\n\txs := make(map[int]int)\n\tys := make(map[int]int)\n\tfor _, num := range nums {\n\t\tx, y, err := s.Puzzle.GetCellCoordinates(num)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\txs[num] = x\n\t\tys[num] = y\n\t}\n\n\t// Check to see if the answer is correct when required.\n\tif onlyCorrect {\n\t\tfor i, num := range nums {\n\t\t\tx := xs[num]\n\t\t\ty := ys[num]\n\n\t\t\texisting := s.Cells[y][x]\n\t\t\texpected := s.Puzzle.Cells[y][x]\n\t\t\tdesired := string(answer[i])\n\n\t\t\t// We can't change a correct value to an incorrect or empty one.\n\t\t\tif existing != \"\" && desired != existing {\n\t\t\t\treturn fmt.Errorf(\"unable to apply answer %s to clue %s, changes correct value\", answer, clue)\n\t\t\t}\n\n\t\t\t// We can't write an incorrect value into a cell\n\t\t\tif desired != \".\" && desired != expected {\n\t\t\t\treturn fmt.Errorf(\"unable to apply answer %s to clue %s, incorrect\", answer, clue)\n\t\t\t}\n\t\t}\n\t}\n\n\t// Apply the answer to the cells.\n\tfilled := true\n\tfor i, num := range nums {\n\t\tx := xs[num]\n\t\ty := ys[num]\n\n\t\tif answer[i] != '.' {\n\t\t\ts.Cells[y][x] = string(answer[i])\n\t\t} else {\n\t\t\ts.Cells[y][x] = \"\"\n\t\t\tfilled = false\n\t\t}\n\t}\n\n\t// Update whether or not the clue was filled.\n\ts.CluesFilled[clue] = filled\n\n\t// Also determine if the puzzle is finished with all correct answers and\n\t// update the Status if so.\n\tcomplete := true\n\tfor y := 0; y < s.Puzzle.Rows; y++ {\n\t\tfor x := 0; x < s.Puzzle.Cols; x++ {\n\t\t\tif s.Cells[y][x] != s.Puzzle.Cells[y][x] {\n\t\t\t\tcomplete = false\n\t\t\t}\n\t\t}\n\t}\n\tif complete {\n\t\ts.Status = model.StatusComplete\n\t}\n\n\treturn nil\n}",
"func (me TRequesterStatistic) IsPercentKnownAnswersCorrect() bool {\n\treturn me.String() == \"PercentKnownAnswersCorrect\"\n}",
"func (me TRequesterStatistic) IsPercentPluralityAnswersCorrect() bool {\n\treturn me.String() == \"PercentPluralityAnswersCorrect\"\n}",
"func (_SweetToken *SweetTokenTransactor) SetLogic(opts *bind.TransactOpts, logic_ common.Address) (*types.Transaction, error) {\n\treturn _SweetToken.contract.Transact(opts, \"setLogic\", logic_)\n}",
"func (c *Context) SetFreqCorrection(ppm int) (err int) {\n\treturn int(C.rtlsdr_set_freq_correction((*C.rtlsdr_dev_t)(c.dev),\n\t\tC.int(ppm)))\n}",
"func (s *State) ApplyAnswer(clue string, answer string, onlyCorrect bool) error {\n\tnum, direction, err := ParseClue(clue)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tcells, err := ParseAnswer(answer)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tminX, minY, maxX, maxY, err := s.Puzzle.GetAnswerCoordinates(num, direction)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Check to see if our cell values are compatible with the size of the answer.\n\tif len(cells) != (maxX-minX)+(maxY-minY)+1 {\n\t\treturn fmt.Errorf(\"unable to apply answer %s to %s, incompatible sizes\", answer, clue)\n\t}\n\n\t// Determine the way to iterate through the grid.\n\tvar dx, dy int\n\tif direction == \"a\" {\n\t\tdx = 1\n\t} else {\n\t\tdy = 1\n\t}\n\n\t// Check to see if the answer is correct when required.\n\tif onlyCorrect {\n\t\tfor x, y := minX, minY; x <= maxX && y <= maxY; x, y = x+dx, y+dy {\n\t\t\texisting := s.Cells[y][x]\n\t\t\texpected := s.Puzzle.Cells[y][x]\n\t\t\tdesired := cells[y-minY+x-minX]\n\n\t\t\t// We can't change a correct value to an incorrect or empty one.\n\t\t\tif existing != \"\" && desired != existing {\n\t\t\t\treturn fmt.Errorf(\"unable to apply answer %s to %s, changes correct value\", answer, clue)\n\t\t\t}\n\n\t\t\t// We can't write an incorrect value into a cell.\n\t\t\tif desired != \"\" && desired != expected {\n\t\t\t\treturn fmt.Errorf(\"unable to apply answer %s to %s, incorrect\", answer, clue)\n\t\t\t}\n\t\t}\n\t}\n\n\t// Write the cells of our answer.\n\tfor x, y := minX, minY; x <= maxX && y <= maxY; x, y = x+dx, y+dy {\n\t\ts.Cells[y][x] = cells[y-minY+x-minX]\n\t}\n\n\t// Now that we've filled in an answer we may have completed one or more clues.\n\t// Do a quick scan of all of the clues to make sure AcrossCluesFilled and\n\t// DownCluesFilled are up to date.\n\terr = s.UpdateFilledClues()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Also determine if the puzzle is finished with all correct answers and\n\t// update the Status if so.\n\tcomplete := true\n\tfor y := 0; y < s.Puzzle.Rows; y++ {\n\t\tfor x := 0; x < s.Puzzle.Cols; x++ {\n\t\t\tif s.Cells[y][x] != s.Puzzle.Cells[y][x] {\n\t\t\t\tcomplete = false\n\t\t\t}\n\t\t}\n\t}\n\tif complete {\n\t\ts.Status = model.StatusComplete\n\t}\n\n\t// TODO: This method should probably also return information about whether or\n\t// not the answer was correct, and if so how many clues where completed as a\n\t// result of applying this answer.\n\treturn nil\n}",
"func (q Quiz) IsClientAnswerCorrect() bool {\n\tresult := false\n\n\tif strings.Compare(q.ClientAnswer, q.CorrectAnswer) == 0 {\n\t\treturn true\n\t}\n\n\treturn result\n}",
"func (t *TriDense) SetRawTriangular(mat blas64.Triangular) {\n\tif mat.Diag == blas.Unit {\n\t\tpanic(\"mat: cannot set TriDense with Unit storage format\")\n\t}\n\tt.cap = mat.N\n\tt.mat = mat\n}",
"func (mtr *Mxmx1inteccMetrics) SetUncorrectable(val metrics.Counter) error {\n\tmtr.metrics.SetCounter(val, mtr.getOffset(\"Uncorrectable\"))\n\treturn nil\n}",
"func (m *DiscoveredSensitiveType) SetConfidence(value *int32)() {\n err := m.GetBackingStore().Set(\"confidence\", value)\n if err != nil {\n panic(err)\n }\n}",
"func (mtr *MsmsintmiscMetrics) SetElamCapEccCorrectable(val metrics.Counter) error {\n\tmtr.metrics.SetCounter(val, mtr.getOffset(\"ElamCapEccCorrectable\"))\n\treturn nil\n}",
"func (mtr *Mxmx0inteccMetrics) SetUncorrectable(val metrics.Counter) error {\n\tmtr.metrics.SetCounter(val, mtr.getOffset(\"Uncorrectable\"))\n\treturn nil\n}",
"func (m *IdentityUserFlowAttributeAssignment) SetRequiresVerification(value *bool)() {\n m.requiresVerification = value\n}",
"func TestUpdateCorrectData(t *testing.T) {\n\tcMock := getMock()\n\tcMock.On(\"UpdateAnswer\", updatedAnswer).Return(updatedAnswer, nil)\n\n\tbody, _ := json.Marshal(updatedAnswer)\n\tresponse, err := MakeBestPATCH(body)\n\tif assert.Nil(t, err) {\n\t\tcMock.AssertExpectations(t)\n\n\t\tassert.Equal(t, *updatedAnswer.IsBest, *response.IsBest)\n\t\tassert.Equal(t, *updatedAnswer.Content, *response.Content)\n\t}\n}",
"func (u *NewUser) SetRecoveryQuestion(questionIn string, answerIn string) {\n\n\tif questionIn != \"\" && answerIn != \"\" {\n\t\trecovery := new(recoveryQuestion)\n\n\t\trecovery.Question = questionIn\n\t\trecovery.Answer = answerIn\n\n\t\tvar cred *credentials\n\t\tif u.Credentials == nil {\n\t\t\tcred = new(credentials)\n\t\t} else {\n\t\t\tcred = u.Credentials\n\t\t}\n\t\tcred.RecoveryQuestion = recovery\n\t\tu.Credentials = cred\n\n\t}\n}",
"func (im InputMethod) SetPKAutoCorrection(tconn *chrome.TestConn, acLevel AutoCorrectionLevel) action.Action {\n\tsettings := map[string]interface{}{\"physicalKeyboardAutoCorrectionLevel\": acLevel}\n\treturn im.SetSettings(tconn, settings)\n}",
"func (me TRequesterStatistic) IsNumberPluralityAnswersCorrect() bool {\n\treturn me.String() == \"NumberPluralityAnswersCorrect\"\n}",
"func (me TRequesterStatistic) IsNumberKnownAnswersCorrect() bool {\n\treturn me.String() == \"NumberKnownAnswersCorrect\"\n}",
"func (hc *httpClientServiceImpl) SetCheckRedirect(cr func(req *http.Request, via []*http.Request) error) {\n\thc.httpClient.CheckRedirect = cr\n}",
"func (_m *IService) SetReputation(id string, newRep int64) bool {\n\tret := _m.Called(id, newRep)\n\n\tvar r0 bool\n\tif rf, ok := ret.Get(0).(func(string, int64) bool); ok {\n\t\tr0 = rf(id, newRep)\n\t} else {\n\t\tr0 = ret.Get(0).(bool)\n\t}\n\n\treturn r0\n}",
"func (f *Float) SetValid(n float64) {\n\tf.Float64 = n\n\tf.Valid = true\n}",
"func (_SweetToken *SweetTokenTransactorSession) SetLogic(logic_ common.Address) (*types.Transaction, error) {\n\treturn _SweetToken.Contract.SetLogic(&_SweetToken.TransactOpts, logic_)\n}",
"func (p *Payload) SetVerdict(verdict int) error {\n\tC.nfq_set_verdict(p.cQh, C.u_int32_t(p.ID), C.u_int32_t(verdict), 0, nil)\n\n\treturn nil\n}",
"func (muo *ModelUpdateOne) SetRight(b bool) *ModelUpdateOne {\n\tmuo.mutation.SetRight(b)\n\treturn muo\n}",
"func (mtr *MsmsintmiscMetrics) SetBl2RamEccCorrectable(val metrics.Counter) error {\n\tmtr.metrics.SetCounter(val, mtr.getOffset(\"Bl2RamEccCorrectable\"))\n\treturn nil\n}",
"func (_SweetToken *SweetTokenSession) SetLogic(logic_ common.Address) (*types.Transaction, error) {\n\treturn _SweetToken.Contract.SetLogic(&_SweetToken.TransactOpts, logic_)\n}",
"func (ac *AnswerCreate) SetValid(b bool) *AnswerCreate {\n\tac.mutation.SetValid(b)\n\treturn ac\n}",
"func (m *TradeRecordMutation) ResetCorrection() {\n\tm.correction = nil\n\tm.clearedcorrection = false\n\tm.removedcorrection = nil\n}",
"func (i *NullInt) SetValid(n int64) {\n\ti.Int64 = n\n\ti.Valid = true\n}",
"func (p *OnuTcontProfile) CanSetFixed() bool {\r\n\treturn p.TcontType == 5 || p.TcontType == 1\r\n}",
"func (mu *ModelUpdate) SetRight(b bool) *ModelUpdate {\n\tmu.mutation.SetRight(b)\n\treturn mu\n}",
"func (m *EducationAssignment) SetRubric(value EducationRubricable)() {\n m.rubric = value\n}",
"func (s *State) ApplyCellAnswer(start int, answer string, onlyCorrect bool) error {\n\tif start <= 0 {\n\t\treturn fmt.Errorf(\"invalid starting index: %d\", start)\n\t}\n\n\t// Ignore spaces within the answer and ensure the answer is all uppercase.\n\tanswer = strings.ReplaceAll(answer, \" \", \"\")\n\tanswer = strings.ToUpper(answer)\n\n\t// We also ignore any given characters in the puzzle (such as hyphens) as well\n\t// that might be in the answer. It's common that they're typed as part of the\n\t// answer.\n\tfor y := 0; y < s.Puzzle.Rows; y++ {\n\t\tfor x := 0; x < s.Puzzle.Cols; x++ {\n\t\t\tgiven := s.Puzzle.Givens[y][x]\n\t\t\tif given != \"\" {\n\t\t\t\tfmt.Printf(\"given: %s\\n\", given)\n\t\t\t\tanswer = strings.ReplaceAll(answer, given, \"\")\n\t\t\t}\n\t\t}\n\t}\n\n\t// Ensure that we have a non-empty answer.\n\tif len(answer) == 0 {\n\t\treturn fmt.Errorf(\"empty answer\")\n\t}\n\n\t// Compute the coordinates of each letter of the answer. We do this ahead of\n\t// time and not in a loop while setting cell values because we may discover\n\t// an error in identifying a cell's coordinate.\n\txs := make([]int, len(answer))\n\tys := make([]int, len(answer))\n\tfor i := 0; i < len(answer); i++ {\n\t\tx, y, err := s.Puzzle.GetCellCoordinates(start + i)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\txs[i] = x\n\t\tys[i] = y\n\t}\n\n\t// Check to see if the answer is correct when required.\n\tif onlyCorrect {\n\t\tfor i := 0; i < len(answer); i++ {\n\t\t\tx := xs[i]\n\t\t\ty := ys[i]\n\n\t\t\texisting := s.Cells[y][x]\n\t\t\texpected := s.Puzzle.Cells[y][x]\n\t\t\tdesired := string(answer[i])\n\n\t\t\t// We can't change a correct value to an incorrect or empty one.\n\t\t\tif existing != \"\" && desired != existing {\n\t\t\t\treturn fmt.Errorf(\"unable to apply answer %s starting at index %d, changes correct value\", answer, start)\n\t\t\t}\n\n\t\t\t// We can't write an incorrect value into a cell\n\t\t\tif desired != \".\" && desired != expected {\n\t\t\t\treturn fmt.Errorf(\"unable to apply answer %s starting at index %d, incorrect\", answer, start)\n\t\t\t}\n\t\t}\n\t}\n\n\t// Apply the answer.\n\tfor i := 0; i < len(answer); i++ {\n\t\tif answer[i] != '.' {\n\t\t\ts.Cells[ys[i]][xs[i]] = string(answer[i])\n\t\t} else {\n\t\t\ts.Cells[ys[i]][xs[i]] = \"\"\n\t\t}\n\t}\n\n\t// Update which clues have been filled.\n\tif err := s.UpdateFilledClues(); err != nil {\n\t\treturn err\n\t}\n\n\t// Also determine if the puzzle is finished with all correct answers and\n\t// update the Status if so.\n\tcomplete := true\n\tfor y := 0; y < s.Puzzle.Rows; y++ {\n\t\tfor x := 0; x < s.Puzzle.Cols; x++ {\n\t\t\tif s.Cells[y][x] != s.Puzzle.Cells[y][x] {\n\t\t\t\tcomplete = false\n\t\t\t}\n\t\t}\n\t}\n\tif complete {\n\t\ts.Status = model.StatusComplete\n\t}\n\n\treturn nil\n}",
"func (service *LockServiceMock) SetMockResponse(value bool) {\n\tservice.defaultValue = value\n}",
"func (im InputMethod) SetVKAutoCorrection(tconn *chrome.TestConn, acLevel AutoCorrectionLevel) action.Action {\n\tsettings := map[string]interface{}{\"virtualKeyboardAutoCorrectionLevel\": acLevel}\n\treturn im.SetSettings(tconn, settings)\n}",
"func (user *User) SetVerified(currentUser IUser) error {\n\terr := verifyAuthorization(user, currentUser)\n\tif err != nil {\n\t\treturn err\n\t}\n\tuser.Verified = true\n\treturn nil\n}",
"func (s *tlsClientService) SetCheckRedirect(cr func(req *http.Request, via []*http.Request) error) {\n\ts.client.CheckRedirect = cr\n}",
"func TestAskAddCorrectData(t *testing.T) {\n\tbody, _ := json.Marshal(&defaultAnswer)\n\n\tcMock := getMock()\n\tcMock.On(\"AddAnswer\", defaultAnswer).Return(createdAnswer, nil)\n\n\tdata, err := AnswerPUT(body)\n\tif assert.Nil(t, err) {\n\t\tcMock.AssertExpectations(t)\n\n\t\tassert.Equal(t, createdAnswer.ID, data.ID)\n\t\tassert.Equal(t, createdAnswer.QuestionID, data.QuestionID)\n\t\tassert.Equal(t, *createdAnswer.Content, *data.Content)\n\t\tassert.Equal(t, createdAnswer.AuthorID, data.AuthorID)\n\t\tassert.Equal(t, *createdAnswer.IsBest, *data.IsBest)\n\t\tassert.Equal(t, createdAnswer.Created, data.Created)\n\t}\n}",
"func (f *Float32) SetValid(n float32) {\n\tf.Float32 = n\n\tf.Valid = true\n}",
"func (m *TradeCorrectionMutation) ResetCorrection() {\n\tm.correction = nil\n}",
"func (r *ReferenceAdapter) SetProjectReferenceCondition(reason string, err error) error {\n\tconditions := &r.ProjectReference.Status.Conditions\n\tconditionType := gcpv1alpha1.ConditionError\n\tif err != nil {\n\t\tr.conditionManager.SetCondition(conditions, conditionType, corev1.ConditionTrue, reason, err.Error())\n\t} else {\n\t\tif len(*conditions) != 0 {\n\t\t\treason = reason + \"Resolved\"\n\t\t\tr.conditionManager.SetCondition(conditions, conditionType, corev1.ConditionFalse, reason, \"\")\n\t\t} else {\n\t\t\treturn nil\n\t\t}\n\t}\n\n\treturn r.StatusUpdate()\n}",
"func (m *TradeRecordMutation) ClearCorrection() {\n\tm.clearedcorrection = true\n}",
"func (u *User) isPasswordCorrect(passwordAttempt string) bool {\n\t//storedPasswordHash, salt := getPassword(c.Email)\n\thash := argon2.IDKey([]byte(passwordAttempt), u.salt, 4, 32*1024, 4, 32)\n\treturn bytes.Compare(u.hashedPassword, hash) == 0\n}",
"func (r *Store) SetConfirm(name string, content []byte, reason string, cb store.RecipientCallback) error {\n\tstore := r.getStore(name)\n\treturn store.SetConfirm(strings.TrimPrefix(name, store.Alias()), content, reason, cb)\n}",
"func (i *Int8) SetValid(n int8) {\n\ti.Int8 = n\n\ti.Valid = true\n}",
"func (field *Field) SetRequired() {\n\ttext := field.Get(\"required\")\n\tif v, err := strconv.ParseBool(text); err == nil {\n\t\tfield.Required = v\n\t}\n}",
"func (_Cakevault *CakevaultTransactor) SetAdmin(opts *bind.TransactOpts, _admin common.Address) (*types.Transaction, error) {\n\treturn _Cakevault.contract.Transact(opts, \"setAdmin\", _admin)\n}",
"func (n *Node) SetCondition(condition string) {\n\tif strings.IndexFunc(condition, unicode.IsSpace) != -1 {\n\t\tpanic(\"vdf: condition cannot contain spaces\")\n\t}\n\tif strings.ContainsAny(condition, \"\\\"{}\") {\n\t\tpanic(\"vdf: condition cannot contain \\\", {, or }\")\n\t}\n\tn.condition = condition\n\tif n.cf != nil && n.cf.condition == \"\" {\n\t\tn.cf.condition = \" \"\n\t}\n}",
"func (o *Invoice) SetCorrections(v []string) {\n\to.Corrections = v\n}",
"func (b *Byte) SetValid(n byte) {\n\tb.Byte = n\n\tb.Valid = true\n}",
"func (c *cqut) setCheckDirect(b bool) {\n\tc.client.CheckRedirect = func(req *http.Request, vias []*http.Request) error {\n\t\tif b {\n\t\t\treturn nil\n\t\t}\n\t\treturn http.ErrUseLastResponse\n\t}\n}",
"func (o *InlineObject901) SetValueIfTrueExplicitNull(b bool) {\n\to.ValueIfTrue = nil\n\to.isExplicitNullValueIfTrue = b\n}",
"func (ns *Namespace) SetCondition(obj api.AffectedObject, code api.Code, msg string) bool {\n\tchanged := false\n\tif _, existed := ns.conditions[obj]; !existed {\n\t\tchanged = true\n\t\tns.conditions[obj] = map[api.Code]string{}\n\t}\n\n\tif oldMsg, existed := ns.conditions[obj][code]; !existed || msg != oldMsg {\n\t\tchanged = true\n\t\tns.conditions[obj][code] = msg\n\t}\n\n\treturn changed\n}",
"func (o *Loop) SetAutoclear(ctx context.Context, value bool, options map[string]dbus.Variant) (err error) {\n\terr = o.object.CallWithContext(ctx, InterfaceLoop+\".SetAutoclear\", 0, value, options).Store()\n\treturn\n}",
"func (c *Context) SetResp(obj interface{}) ( error){\n\tif c.Resp == nil {\n\t\treturn nil\n\t}\n\treturn \tc.Resp.Marshal(obj)\n}",
"func (me *TQualificationStatus) Set(s string) { (*xsdt.String)(me).Set(s) }",
"func (p *OnuTcontProfile) CanSetAssured() bool {\r\n\treturn p.TcontType == 5 || p.TcontType == 3 || p.TcontType == 2\r\n}",
"func (o *InlineObject901) SetValueIfTrue(v AnyOfobject) {\n\to.ValueIfTrue = &v\n}",
"func SetCompleteCondition(conditions *[]conditionsv1.Condition, reason string, message string) {\n\tconditionsv1.SetStatusCondition(conditions, conditionsv1.Condition{\n\t\tType: ocsv1.ConditionReconcileComplete,\n\t\tStatus: corev1.ConditionTrue,\n\t\tReason: reason,\n\t\tMessage: message,\n\t})\n\tconditionsv1.SetStatusCondition(conditions, conditionsv1.Condition{\n\t\tType: conditionsv1.ConditionAvailable,\n\t\tStatus: corev1.ConditionTrue,\n\t\tReason: reason,\n\t\tMessage: message,\n\t})\n\tconditionsv1.SetStatusCondition(conditions, conditionsv1.Condition{\n\t\tType: conditionsv1.ConditionProgressing,\n\t\tStatus: corev1.ConditionFalse,\n\t\tReason: reason,\n\t\tMessage: message,\n\t})\n\tconditionsv1.SetStatusCondition(conditions, conditionsv1.Condition{\n\t\tType: conditionsv1.ConditionDegraded,\n\t\tStatus: corev1.ConditionFalse,\n\t\tReason: reason,\n\t\tMessage: message,\n\t})\n\tconditionsv1.SetStatusCondition(conditions, conditionsv1.Condition{\n\t\tType: conditionsv1.ConditionUpgradeable,\n\t\tStatus: corev1.ConditionTrue,\n\t\tReason: reason,\n\t\tMessage: message,\n\t})\n}",
"func (device *ServoBrick) SetResponseExpected(functionID Function, responseExpected bool) error {\n\treturn device.device.SetResponseExpected(uint8(functionID), responseExpected)\n}",
"func (blk *Block) SetProof(proof uint64) {\n\tblk.Proof = proof\n\tblk.Hash = blk.CalcHash()\n}",
"func TestForcedCorrection(t *testing.T) {\n\tsamples := sampleNames(t)\n\tstraightF := straightFImage(t)\n\tfor _, v := range samples {\n\t\tif strings.HasSuffix(v, \"-s.jpg\") {\n\t\t\tcontinue\n\t\t}\n\t\tname := filepath.Join(datadir, v)\n\t\tt.Logf(\"forced correction of %s\", name)\n\t\tf, err := os.Open(name)\n\t\tif err != nil {\n\t\t\tt.Fatal(err)\n\t\t}\n\t\tdefer f.Close()\n\t\tnum := name[10]\n\t\tangle, flipMode := 0, 0\n\t\tswitch num {\n\t\tcase '1':\n\t\t\t// nothing to do\n\t\tcase '2':\n\t\t\tflipMode = 2\n\t\tcase '3':\n\t\t\tangle = 180\n\t\tcase '4':\n\t\t\tangle = 180\n\t\t\tflipMode = 2\n\t\tcase '5':\n\t\t\tangle = -90\n\t\t\tflipMode = 2\n\t\tcase '6':\n\t\t\tangle = -90\n\t\tcase '7':\n\t\t\tangle = 90\n\t\t\tflipMode = 2\n\t\tcase '8':\n\t\t\tangle = 90\n\t\t}\n\t\tim, _, err := Decode(f, &DecodeOpts{Rotate: angle, Flip: FlipDirection(flipMode)})\n\t\tif err != nil {\n\t\t\tt.Fatal(err)\n\t\t}\n\t\tif !equals(im, straightF) {\n\t\t\tt.Fatalf(\"%v not properly corrected\", name)\n\t\t}\n\t}\n}",
"func (device *SilentStepperBrick) SetResponseExpected(functionID Function, responseExpected bool) error {\n\treturn device.device.SetResponseExpected(uint8(functionID), responseExpected)\n}",
"func (r *Reconciler) SetPhase(phase nbv1.NooBaaAccountPhase, reason string, message string) {\n\n\tc := &r.NooBaaAccount.Status.Conditions\n\n\tif phase == \"\" {\n\t\tr.Logger.Infof(\"SetPhase: temporary error during phase %q\", r.NooBaaAccount.Status.Phase)\n\t\tutil.SetProgressingCondition(c, reason, message)\n\t\treturn\n\t}\n\n\tr.Logger.Infof(\"SetPhase: %s\", phase)\n\tr.NooBaaAccount.Status.Phase = phase\n\tswitch phase {\n\tcase nbv1.NooBaaAccountPhaseReady:\n\t\tutil.SetAvailableCondition(c, reason, message)\n\tcase nbv1.NooBaaAccountPhaseRejected:\n\t\tutil.SetErrorCondition(c, reason, message)\n\tdefault:\n\t\tutil.SetProgressingCondition(c, reason, message)\n\t}\n}",
"func (mtr *Dprdpr1intsramseccMetrics) SetDprPhvFifoCorrectable(val metrics.Counter) error {\n\tmtr.metrics.SetCounter(val, mtr.getOffset(\"DprPhvFifoCorrectable\"))\n\treturn nil\n}",
"func (ct *Ctr) Set(cur int) bool {\n\tif ct.Cur == cur {\n\t\tct.Chg = false\n\t\treturn false\n\t}\n\tct.Chg = true\n\tct.Prv = ct.Cur\n\tct.Cur = cur\n\treturn true\n}",
"func (_GovernmentContract *GovernmentContractTransactor) SetAppellate(opts *bind.TransactOpts, newAppellate common.Address) (*types.Transaction, error) {\n\treturn _GovernmentContract.contract.Transact(opts, \"setAppellate\", newAppellate)\n}",
"func set(c client.Client, opCond *operators.OperatorCondition, conditionType string, status meta.ConditionStatus,\n\treason, message string) error {\n\tnewCond := meta.Condition{\n\t\tType: conditionType,\n\t\tStatus: status,\n\t\tReason: reason,\n\t\tMessage: message,\n\t}\n\tif err := patch(c, opCond, newCond); err != nil {\n\t\treturn err\n\t}\n\t// Wait to ensure change is actually picked up\n\treturn wait(c, opCond.GetNamespace(), newCond.Type, newCond.Status)\n}",
"func (u *User) LoginCorrect() bool {\n\tif len(u.Email) == 0 || len(u.Password) == 0 {\n\t\treturn false\n\t}\n\n\trow := db.QueryRow(SQL_USER_AUTH, u.Email, u.Password)\n\terr := row.Scan(&u.Name, &u.Id)\n\n\tif err != nil || err == sql.ErrNoRows {\n\t\treturn false\n\t}\n\n\treturn true\n}",
"func (s *Sdr) SetOptimalIQCorrectionPoint(w float32) error {\n\tif C.airspyhf_set_optimal_iq_correction_point(s.handle, C.float(w)) != C.AIRSPYHF_SUCCESS {\n\t\treturn fmt.Errorf(\"airspyhf.Sdr.SetOptimalIQCorrectionPoint: failed to set IQ correction point\")\n\t}\n\treturn nil\n}",
"func (yn *YesNo) Set(value bool) {\n\tif value {\n\t\t*yn = 'Y'\n\t} else {\n\t\t*yn = 'N'\n\t}\n}",
"func (m *RoomTypeMutation) SetCost(i int) {\n\tm._Cost = &i\n\tm.add_Cost = nil\n}",
"func (m *RelatedContact) SetAccessConsent(value *bool)() {\n err := m.GetBackingStore().Set(\"accessConsent\", value)\n if err != nil {\n panic(err)\n }\n}",
"func (device *DualButtonBricklet) SetResponseExpected(functionID Function, responseExpected bool) error {\n\treturn device.device.SetResponseExpected(uint8(functionID), responseExpected)\n}",
"func (me *Tanglepos180Type) Set(s string) { (*xsdt.Double)(me).Set(s) }",
"func (me *TQualificationTypeStatus) Set(s string) { (*xsdt.String)(me).Set(s) }",
"func (i *NullBool) Set(v bool) {\n\ti.Bool = v\n\ti.Valid = true\n}",
"func (c *Client) SetCheckRetry(checkRetry retryablehttp.CheckRetry) {\n\tc.modifyLock.RLock()\n\tdefer c.modifyLock.RUnlock()\n\tc.config.modifyLock.Lock()\n\tdefer c.config.modifyLock.Unlock()\n\n\tc.config.CheckRetry = checkRetry\n}",
"func (me *Tangle180Type) Set(s string) { (*xsdt.Double)(me).Set(s) }",
"func (rv *ResourceValidator) SetValidationResult(isAllowed bool, message string) {\n\trv.arResponse.Response.Allowed = isAllowed\n\trv.arResponse.Response.Result.Message = message\n}",
"func Correction(v string) predicate.TradeCorrection {\n\treturn predicate.TradeCorrection(sql.FieldEQ(FieldCorrection, v))\n}",
"func (mtr *Dppdpp1intsramseccMetrics) SetDppPhvFifoCorrectable(val metrics.Counter) error {\n\tmtr.metrics.SetCounter(val, mtr.getOffset(\"DppPhvFifoCorrectable\"))\n\treturn nil\n}",
"func (u *User) SetPremium(value bool) {\n\tif value {\n\t\tu.Flags.Set(28)\n\t\tu.Premium = true\n\t} else {\n\t\tu.Flags.Unset(28)\n\t\tu.Premium = false\n\t}\n}",
"func (d *Doorman) SetCb(cb audio.OnDataCb) {\n\td.Lock()\n\tdefer d.Unlock()\n\td.onDataCb = cb\n}"
] |
[
"0.6405366",
"0.60046273",
"0.5913459",
"0.59002554",
"0.5454887",
"0.5330916",
"0.5140346",
"0.5070354",
"0.5041941",
"0.4871911",
"0.47054982",
"0.4664606",
"0.4622775",
"0.46227434",
"0.45899174",
"0.45180055",
"0.44813672",
"0.44520646",
"0.44068882",
"0.44004178",
"0.43917564",
"0.43634066",
"0.43556768",
"0.43492755",
"0.4327344",
"0.4322673",
"0.4313168",
"0.4302131",
"0.4240817",
"0.4184835",
"0.4182584",
"0.41789234",
"0.4128032",
"0.41152918",
"0.4106955",
"0.40986866",
"0.40835357",
"0.40702033",
"0.4062477",
"0.40598974",
"0.40582174",
"0.40580016",
"0.4027718",
"0.40218627",
"0.40130594",
"0.40113634",
"0.40046933",
"0.39916673",
"0.39887798",
"0.39879337",
"0.39709705",
"0.39650068",
"0.3961453",
"0.3952855",
"0.39497498",
"0.39258608",
"0.39215818",
"0.3919659",
"0.39144185",
"0.389843",
"0.38980627",
"0.38902932",
"0.38626572",
"0.3861442",
"0.38613352",
"0.38590837",
"0.38510194",
"0.3837871",
"0.38376334",
"0.38252676",
"0.38224244",
"0.38093492",
"0.38063598",
"0.38021186",
"0.38007417",
"0.37848687",
"0.37839696",
"0.37763318",
"0.37703943",
"0.3758267",
"0.37522465",
"0.37411746",
"0.37312764",
"0.3725139",
"0.37190813",
"0.37123427",
"0.3706516",
"0.36996827",
"0.36966625",
"0.36956114",
"0.36846092",
"0.36841753",
"0.36793205",
"0.3676906",
"0.36727318",
"0.3663033",
"0.3657967",
"0.3655491",
"0.36506328",
"0.36470333"
] |
0.78581035
|
0
|
GetCorrect returns value of Correct conditional field.
|
func (p *PollAnswerVoters) GetCorrect() (value bool) {
if p == nil {
return
}
return p.Flags.Has(1)
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (e *Evaluator) KnownCorrect() uint {\n\treturn e.knownCorrect\n}",
"func (e *Evaluator) UnknownCorrect() uint {\n\treturn e.unknownCorrect\n}",
"func (p *PollAnswerVoters) SetCorrect(value bool) {\n\tif value {\n\t\tp.Flags.Set(1)\n\t\tp.Correct = true\n\t} else {\n\t\tp.Flags.Unset(1)\n\t\tp.Correct = false\n\t}\n}",
"func (e *Evaluator) OverallCorrect() uint {\n\treturn e.knownCorrect + e.unknownCorrect\n}",
"func (m *Model) Correct(word string) string {\n\tif m == nil || len(m.terms) == 0 {\n\t\treturn word\n\t}\n\n\tvar result *suggestItem\n\n\tfor _, si := range getSuggestSlice(m.terms, word) {\n\t\tif result == nil {\n\t\t\tresult = si\n\t\t\tcontinue\n\t\t}\n\n\t\tif si.score < result.score {\n\t\t\tresult = si\n\t\t\tcontinue\n\t\t}\n\t}\n\n\tif result.score > mathutil.Between(m.Threshold, 1, 1000) {\n\t\treturn word\n\t}\n\n\treturn result.term\n}",
"func (q *Question) AnswerCorrect(attempt string) bool {\n\treturn q.Answer == strings.TrimSpace(attempt)\n}",
"func (bg bucketGroup) correct(prediction float64) float64 {\n\n\tswitch {\n\tcase prediction <= 2.5*bg.Len():\n\t\treturn bg.smallRangeCorrection(prediction, bg.Len())\n\tdefault:\n\t\treturn prediction\n\t}\n}",
"func (i *Invoice) GetTest() (value bool) {\n\tif i == nil {\n\t\treturn\n\t}\n\treturn i.Flags.Has(0)\n}",
"func (o *CreateRiskRulesData) GetFieldOk() (*string, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn &o.Field, true\n}",
"func (m *TradeCorrectionMutation) Correction() (r string, exists bool) {\n\tv := m.correction\n\tif v == nil {\n\t\treturn\n\t}\n\treturn *v, true\n}",
"func (o *SingleSelectFieldField) GetPrimaryOk() (*bool, bool) {\n\tif o == nil || IsNil(o.Primary) {\n\t\treturn nil, false\n\t}\n\treturn o.Primary, true\n}",
"func (o *Author) GetRawOk() (*string, bool) {\n\tif o == nil || o.Raw == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Raw, true\n}",
"func (o *ProdutoVM) GetPrecoOk() (*float64, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Preco.Get(), o.Preco.IsSet()\n}",
"func (c *CheckSuite) GetConclusion() string {\n\tif c == nil || c.Conclusion == nil {\n\t\treturn \"\"\n\t}\n\treturn *c.Conclusion\n}",
"func (s VTG) GetTrueCourseOverGround() (float64, error) {\n\tif v, err := s.TrueTrack.GetValue(); err == nil {\n\t\treturn (unit.Angle(v) * unit.Degree).Radians(), nil\n\t}\n\treturn 0, fmt.Errorf(\"value is unavailable\")\n}",
"func (m *DiscoveredSensitiveType) GetConfidence()(*int32) {\n val, err := m.GetBackingStore().Get(\"confidence\")\n if err != nil {\n panic(err)\n }\n if val != nil {\n return val.(*int32)\n }\n return nil\n}",
"func (o *AssetConcentrationRisk) GetValueOk() (*float64, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn &o.Value, true\n}",
"func (o *Ratio32) GetAOk() (*uint32, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn &o.A, true\n}",
"func (o *Account) GetPrimaryOk() (*bool, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn &o.Primary, true\n}",
"func (o *Invoice) GetCorrectionsOk() ([]string, bool) {\n\tif o == nil || o.Corrections == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Corrections, true\n}",
"func (o *PaymentMethodCash) GetReferenceOk() (*string, bool) {\n\tif o == nil || IsNil(o.Reference) {\n\t\treturn nil, false\n\t}\n\treturn o.Reference, true\n}",
"func (me TRequesterStatistic) IsPercentKnownAnswersCorrect() bool {\n\treturn me.String() == \"PercentKnownAnswersCorrect\"\n}",
"func (o *CreateRiskRulesData) GetValueOk() (*string, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn &o.Value, true\n}",
"func (m Message) GetCouponRate(f *field.CouponRateField) quickfix.MessageRejectError {\n\treturn m.Body.Get(f)\n}",
"func (m Message) GetCouponRate(f *field.CouponRateField) quickfix.MessageRejectError {\n\treturn m.Body.Get(f)\n}",
"func (m Message) GetCouponRate(f *field.CouponRateField) quickfix.MessageRejectError {\n\treturn m.Body.Get(f)\n}",
"func (m Message) GetCouponRate(f *field.CouponRateField) quickfix.MessageRejectError {\n\treturn m.Body.Get(f)\n}",
"func GetConsent(log logging.Logger) bool {\n\tvar response string\n\n\tlog.Info(\"Are you sure you want to continue? (yes/no)\\n\")\n\n\t_, err := fmt.Scanln(&response)\n\tif err != nil {\n\t\tlog.Errorf(\"Error reading input: %s\\n\", err)\n\t\treturn false\n\t}\n\n\tif response == \"no\" {\n\t\treturn false\n\t} else if response != \"yes\" {\n\t\tlog.Info(\"Please type yes or no and then press enter:\")\n\t\treturn GetConsent(log)\n\t}\n\n\treturn true\n}",
"func (u *User) GetRestricted() (value bool) {\n\tif u == nil {\n\t\treturn\n\t}\n\treturn u.Flags.Has(18)\n}",
"func (u *User) GetPremium() (value bool) {\n\tif u == nil {\n\t\treturn\n\t}\n\treturn u.Flags.Has(28)\n}",
"func (s *StateDB) GetRefund() uint64 {\n\treturn s.refund\n}",
"func (o *OutputField) GetValueOk() (*SqlExpression, bool) {\n\tif o == nil || IsNil(o.Value) {\n\t\treturn nil, false\n\t}\n\treturn o.Value, true\n}",
"func (o *Transfer) GetGuaranteeDecisionRationaleOk() (*TransferAuthorizationGuaranteeDecisionRationale, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn o.GuaranteeDecisionRationale.Get(), o.GuaranteeDecisionRationale.IsSet()\n}",
"func (q Quiz) IsClientAnswerCorrect() bool {\n\tresult := false\n\n\tif strings.Compare(q.ClientAnswer, q.CorrectAnswer) == 0 {\n\t\treturn true\n\t}\n\n\treturn result\n}",
"func (u *User) GetVerified() (value bool) {\n\tif u == nil {\n\t\treturn\n\t}\n\treturn u.Flags.Has(17)\n}",
"func (o *RollbackDeductedLoyaltyPointsEffectProps) GetValue() float32 {\n\tif o == nil {\n\t\tvar ret float32\n\t\treturn ret\n\t}\n\n\treturn o.Value\n}",
"func (me TRequesterStatistic) IsPercentPluralityAnswersCorrect() bool {\n\treturn me.String() == \"PercentPluralityAnswersCorrect\"\n}",
"func (o *CartaoProduto) GetUsrOk() (*int64, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Usr.Get(), o.Usr.IsSet()\n}",
"func (o *UserDisco) GetPhoneOk() (*string, bool) {\n\tif o == nil || o.Phone == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Phone, true\n}",
"func (o *ReadConsumptionAccountRequest) GetDryRunOk() (*bool, bool) {\n\tif o == nil || o.DryRun == nil {\n\t\treturn nil, false\n\t}\n\treturn o.DryRun, true\n}",
"func (o *PaymentStatusUpdateWebhook) GetAdjustedReferenceOk() (*string, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn o.AdjustedReference.Get(), o.AdjustedReference.IsSet()\n}",
"func (o *LastBidAsk) GetAOk() (*float32, bool) {\n\tif o == nil || o.A == nil {\n\t\treturn nil, false\n\t}\n\treturn o.A, true\n}",
"func Correction(v string) predicate.TradeCorrection {\n\treturn predicate.TradeCorrection(sql.FieldEQ(FieldCorrection, v))\n}",
"func (m *EducationAssignment) GetRubric()(EducationRubricable) {\n return m.rubric\n}",
"func (w *WebHookPayload) GetForced() bool {\n\tif w == nil || w.Forced == nil {\n\t\treturn false\n\t}\n\treturn *w.Forced\n}",
"func (o *PaymentInitiationPayment) GetAdjustedReferenceOk() (*string, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn o.AdjustedReference.Get(), o.AdjustedReference.IsSet()\n}",
"func (m *TradeCorrectionMutation) OldCorrection(ctx context.Context) (v string, err error) {\n\tif !m.op.Is(OpUpdateOne) {\n\t\treturn v, errors.New(\"OldCorrection is only allowed on UpdateOne operations\")\n\t}\n\tif m.id == nil || m.oldValue == nil {\n\t\treturn v, errors.New(\"OldCorrection requires an ID field in the mutation\")\n\t}\n\toldValue, err := m.oldValue(ctx)\n\tif err != nil {\n\t\treturn v, fmt.Errorf(\"querying old value for OldCorrection: %w\", err)\n\t}\n\treturn oldValue.Correction, nil\n}",
"func (o *RuleActionStore) GetValueOk() (*string, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Value.Get(), o.Value.IsSet()\n}",
"func (r *RequiredStatusChecksRequest) GetStrict() bool {\n\tif r == nil || r.Strict == nil {\n\t\treturn false\n\t}\n\treturn *r.Strict\n}",
"func (c *CheckRun) GetConclusion() string {\n\tif c == nil || c.Conclusion == nil {\n\t\treturn \"\"\n\t}\n\treturn *c.Conclusion\n}",
"func (m Message) GetUnderlyingCouponRate(f *field.UnderlyingCouponRateField) quickfix.MessageRejectError {\n\treturn m.Body.Get(f)\n}",
"func (m Message) GetUnderlyingCouponRate(f *field.UnderlyingCouponRateField) quickfix.MessageRejectError {\n\treturn m.Body.Get(f)\n}",
"func (o *UploadResponse) GetValueOk() (*NFT, bool) {\n\tif o == nil || o.Value == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Value, true\n}",
"func (o *PaymentInitiationPaymentGetResponse) GetAdjustedReferenceOk() (*string, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn o.AdjustedReference.Get(), o.AdjustedReference.IsSet()\n}",
"func (o *ResourceDefinitionFilter) GetValueOk() (*string, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn &o.Value, true\n}",
"func (o *FilingSentiment) GetNegativeOk() (*float32, bool) {\n\tif o == nil || o.Negative == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Negative, true\n}",
"func (o *PortalSignInCustomization) GetTextOk() (*string, bool) {\n\tif o == nil || o.Text == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Text, true\n}",
"func GetQuiz() Quiz {\n\treturn quiz\n}",
"func (o *RiskRulesListAllOfData) GetFieldOk() (*string, bool) {\n\tif o == nil || IsNil(o.Field) {\n\t\treturn nil, false\n\t}\n\treturn o.Field, true\n}",
"func (o *InlineObject54) GetGetOk() (*string, bool) {\n\tif o == nil || o.Get == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Get, true\n}",
"func (o *SingleSelectFieldField) GetPrimary() bool {\n\tif o == nil || IsNil(o.Primary) {\n\t\tvar ret bool\n\t\treturn ret\n\t}\n\treturn *o.Primary\n}",
"func (f FormField) GetChecked() bool {\n\treturn f.Value == \"on\"\n}",
"func (o *PaymentStatusUpdateWebhook) GetOriginalReferenceOk() (*string, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn o.OriginalReference.Get(), o.OriginalReference.IsSet()\n}",
"func (o *TfaApiRequestErrorDetails) GetTextOk() (*string, bool) {\n\tif o == nil || o.Text == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Text, true\n}",
"func (o *IncomeSummaryFieldNumber) GetValueOk() (*float64, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn &o.Value, true\n}",
"func (o *PaymentInitiationPayment) GetReferenceOk() (*string, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn &o.Reference, true\n}",
"func (o *FilingSentiment) GetPositiveOk() (*float32, bool) {\n\tif o == nil || o.Positive == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Positive, true\n}",
"func (o *PhotosSummary) GetPrimaryOk() (*PhotosSummaryPrimary, bool) {\n\tif o == nil || o.Primary == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Primary, true\n}",
"func (o *DepositSwitchTargetUser) GetPhoneOk() (*string, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn &o.Phone, true\n}",
"func (m Message) GetCreditRating(f *field.CreditRatingField) quickfix.MessageRejectError {\n\treturn m.Body.Get(f)\n}",
"func (m Message) GetCreditRating(f *field.CreditRatingField) quickfix.MessageRejectError {\n\treturn m.Body.Get(f)\n}",
"func (m Message) GetCreditRating(f *field.CreditRatingField) quickfix.MessageRejectError {\n\treturn m.Body.Get(f)\n}",
"func (m Message) GetCreditRating(f *field.CreditRatingField) quickfix.MessageRejectError {\n\treturn m.Body.Get(f)\n}",
"func (o *ReconciliationTarget) GetCostOk() (*float32, bool) {\n\tif o == nil || o.Cost == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Cost, true\n}",
"func (m *ThreatAssessmentRequest) GetExpectedAssessment()(*ThreatExpectedAssessment) {\n return m.expectedAssessment\n}",
"func (v *verifyingClient) Get(ctx context.Context, round uint64) (Result, error) {\n\tinfo, err := v.indirectClient.Info(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tr, err := v.Client.Get(ctx, round)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\trd := asRandomData(r)\n\tif err := v.verify(ctx, info, rd); err != nil {\n\t\treturn nil, err\n\t}\n\treturn rd, nil\n}",
"func (o *StatusDescriptorDTO) GetFieldOk() (*string, bool) {\n\tif o == nil || o.Field == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Field, true\n}",
"func (o *FilingSentiment) GetModalStrongOk() (*float32, bool) {\n\tif o == nil || o.ModalStrong == nil {\n\t\treturn nil, false\n\t}\n\treturn o.ModalStrong, true\n}",
"func (r *Repository) GetCodeOfConduct() *CodeOfConduct {\n\tif r == nil {\n\t\treturn nil\n\t}\n\treturn r.CodeOfConduct\n}",
"func (client PrimitiveClient) GetBool() (result BooleanWrapper, err error) {\n req, err := client.GetBoolPreparer()\n if err != nil {\n return result, autorest.NewErrorWithError(err, \"complexgroup.PrimitiveClient\", \"GetBool\", nil , \"Failure preparing request\")\n }\n\n resp, err := client.GetBoolSender(req)\n if err != nil {\n result.Response = autorest.Response{Response: resp}\n return result, autorest.NewErrorWithError(err, \"complexgroup.PrimitiveClient\", \"GetBool\", resp, \"Failure sending request\")\n }\n\n result, err = client.GetBoolResponder(resp)\n if err != nil {\n err = autorest.NewErrorWithError(err, \"complexgroup.PrimitiveClient\", \"GetBool\", resp, \"Failure responding to request\")\n }\n\n return\n}",
"func (m *IdentityUserFlowAttributeAssignment) GetRequiresVerification()(*bool) {\n return m.requiresVerification\n}",
"func (mg *User) GetCondition(ct xpv1.ConditionType) xpv1.Condition {\n\treturn mg.Status.GetCondition(ct)\n}",
"func (o *FilingSentiment) GetPositive() float32 {\n\tif o == nil || o.Positive == nil {\n\t\tvar ret float32\n\t\treturn ret\n\t}\n\treturn *o.Positive\n}",
"func (o *AUMEvoluation) GetBalanceOk() (*float64, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn &o.Balance, true\n}",
"func (m *UpdateMegaParProfileRequest) GetBrightness() (val uint32, set bool) {\n\tif m.Brightness == nil {\n\t\treturn\n\t}\n\n\treturn *m.Brightness, true\n}",
"func (m NoSides) GetCommission() (v decimal.Decimal, err quickfix.MessageRejectError) {\n\tvar f field.CommissionField\n\tif err = m.Get(&f); err == nil {\n\t\tv = f.Value()\n\t}\n\treturn\n}",
"func (o *InlineObject901) GetValueIfTrue() AnyOfobject {\n\tif o == nil || o.ValueIfTrue == nil {\n\t\tvar ret AnyOfobject\n\t\treturn ret\n\t}\n\treturn *o.ValueIfTrue\n}",
"func (a Meta_CaProvince) Get(fieldName string) (value interface{}, found bool) {\n\tif a.AdditionalProperties != nil {\n\t\tvalue, found = a.AdditionalProperties[fieldName]\n\t}\n\treturn\n}",
"func (m *EducationFeedbackOutcome) GetFeedback()(EducationFeedbackable) {\n return m.feedback\n}",
"func (u *UpdateCheckRunOptions) GetConclusion() string {\n\tif u == nil || u.Conclusion == nil {\n\t\treturn \"\"\n\t}\n\treturn *u.Conclusion\n}",
"func (r *Reactions) GetConfused() int {\n\tif r == nil || r.Confused == nil {\n\t\treturn 0\n\t}\n\treturn *r.Confused\n}",
"func (o *SyntheticsAPITestResultShortResult) GetPassedOk() (*bool, bool) {\n\tif o == nil || o.Passed == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Passed, true\n}",
"func (o *FilingSentiment) GetConstrainingOk() (*float32, bool) {\n\tif o == nil || o.Constraining == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Constraining, true\n}",
"func (rt *SimpleRolloutTrait) GetCondition(ct runtimev1alpha1.ConditionType) runtimev1alpha1.Condition {\n\treturn rt.Status.GetCondition(ct)\n}",
"func (m *UpdateMegaParProfileRequest) GetPower() (val bool, set bool) {\n\tif m.Power == nil {\n\t\treturn\n\t}\n\n\treturn *m.Power, true\n}",
"func (o *FilingSentiment) GetUncertaintyOk() (*float32, bool) {\n\tif o == nil || o.Uncertainty == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Uncertainty, true\n}",
"func (b *Boolean) Raw() bool {\n\treturn b.value\n}",
"func (o *TransactionResult) GetDebugLevel() int32 {\n\tif o == nil || o.DebugLevel.Get() == nil {\n\t\tvar ret int32\n\t\treturn ret\n\t}\n\treturn *o.DebugLevel.Get()\n}",
"func (commit *Commit) GetRound() int32 {\n\tif commit == nil {\n\t\treturn -1\n\t}\n\treturn commit.Round\n}",
"func (o *ProdutoVM) GetPreco() float64 {\n\tif o == nil || o.Preco.Get() == nil {\n\t\tvar ret float64\n\t\treturn ret\n\t}\n\treturn *o.Preco.Get()\n}"
] |
[
"0.61078286",
"0.5996673",
"0.55538696",
"0.5541479",
"0.49943668",
"0.48367012",
"0.47852778",
"0.47372735",
"0.46892217",
"0.46633095",
"0.4659691",
"0.46323043",
"0.46216172",
"0.4551146",
"0.45494395",
"0.45095488",
"0.45077643",
"0.44855946",
"0.4482962",
"0.4435966",
"0.4421453",
"0.44083163",
"0.4382686",
"0.4360079",
"0.4360079",
"0.4360079",
"0.4360079",
"0.4357514",
"0.43294495",
"0.43271825",
"0.4326898",
"0.43078166",
"0.4299022",
"0.4295616",
"0.42898646",
"0.4289835",
"0.42665514",
"0.42626965",
"0.42596847",
"0.42560112",
"0.42463002",
"0.4245146",
"0.42441416",
"0.4242674",
"0.4239758",
"0.42335385",
"0.42315602",
"0.42188415",
"0.42101344",
"0.42089862",
"0.4208669",
"0.4208669",
"0.42059517",
"0.42013097",
"0.41938213",
"0.41893396",
"0.41836163",
"0.4182176",
"0.41813743",
"0.4180791",
"0.41772938",
"0.41727155",
"0.4170823",
"0.41612163",
"0.41604364",
"0.41602114",
"0.41590387",
"0.41470265",
"0.41437554",
"0.41416323",
"0.41416323",
"0.41416323",
"0.41416323",
"0.41408968",
"0.4140524",
"0.41403347",
"0.4139785",
"0.41353872",
"0.4131991",
"0.41318303",
"0.4128397",
"0.41237065",
"0.41225335",
"0.41219205",
"0.41205114",
"0.41188556",
"0.41147792",
"0.41120028",
"0.41119394",
"0.41101995",
"0.41072825",
"0.41060472",
"0.410578",
"0.4102641",
"0.41019425",
"0.4099555",
"0.40952748",
"0.40944162",
"0.40907755",
"0.4089203"
] |
0.74209064
|
0
|
GetOption returns value of Option field.
|
func (p *PollAnswerVoters) GetOption() (value []byte) {
if p == nil {
return
}
return p.Option
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (pipe *PipeWS) GetOption(name string) (\n\tvalue interface{},\n\terr error) {\n\treturn nil, mangos.ErrBadOption\n}",
"func (dialer *DialerWS) GetOption(name string) (\n\tvalue interface{},\n\terr error) {\n\treturn nil, mangos.ErrBadOption\n}",
"func (service *Service) GetOption(key string) interface{} {\n\treturn service.Options[key]\n}",
"func (d *dialer) GetOption(n string) (interface{}, error) {\n\td.lock.Lock()\n\tdefer d.lock.Unlock()\n\n\tswitch n {\n\tcase mangos.OptionMaxRecvSize:\n\t\treturn d.recvMaxSize, nil\n\t}\n\treturn nil, mangos.ErrBadOption\n}",
"func (l *listener) GetOption(name string) (interface{}, error) {\n\tl.lock.Lock()\n\tdefer l.lock.Unlock()\n\tswitch name {\n\tcase mangos.OptionMaxRecvSize:\n\t\treturn l.recvMaxSize, nil\n\tcase OptionInputBufferSize:\n\t\treturn l.inputBufferSize, nil\n\tcase OptionOutputBufferSize:\n\t\treturn l.outputBufferSize, nil\n\tcase OptionSecurityDescriptor:\n\t\treturn l.securityDesc, nil\n\t}\n\treturn nil, mangos.ErrBadOption\n}",
"func GetOption(optflag *string, envvarname string, defaultvalue string) string {\n\tparseflags()\n\n\tresult := *optflag\n\n\tif result == \"\" || result == defaultvalue {\n\t\tresult = os.Getenv(envvarname)\n\t}\n\n\tif result == \"\" {\n\t\tresult = defaultvalue\n\t}\n\n\treturn result\n}",
"func (t *tlsTran) GetOption(name string) (interface{}, error) {\n\tswitch name {\n\tcase mangos.OptionTLSConfig:\n\t\treturn t.config, nil\n\tcase mangos.OptionLocalAddress:\n\t\tif t.localAddr == nil {\n\t\t\treturn nil, mangos.ErrBadOption\n\t\t}\n\t\treturn t.localAddr.String(), nil\n\tdefault:\n\t\treturn nil, mangos.ErrBadOption\n\t}\n}",
"func (m *Option) GetValue() (val string, set bool) {\n\tif m.Value == nil {\n\t\treturn\n\t}\n\n\treturn *m.Value, true\n}",
"func (a *Args) GetOpt(key string) string {\n\tfor _, b := range a.binOpts {\n\t\tif b.key == key {\n\t\t\treturn b.val\n\t\t}\n\t}\n\n\t// Invalid Option\n\tfmt.Fprintf(os.Stderr, \"Args - Missing option: %s\\n\", key)\n\tos.Exit(1)\n\n\t// Never Gets Here\n\treturn \"\"\n}",
"func getOptionValue(options []QueryOption, key QueryOptionKey) (interface{}, bool) {\n\t//Iterate through the options to try to find the key\n\tfor _, option := range options {\n\t\tif option.Key == key {\n\t\t\treturn option.Value, true\n\t\t}\n\t}\n\n\t//Option was not found\n\treturn \"\", false\n}",
"func (c *ConfigParser) GetOption(section, option string) (value string, retval error) {\n\tretval = nil\n\tvalue = \"\"\n\tif c.HasSection(section) {\n\t\tif c.HasOption(section, option) {\n\t\t\tvalue = c.sections[section].options[option]\n\t\t} else {\n\t\t\tetext := fmt.Sprintf(\"Option '%s' does not exist in section '%s'.\\n\", option, section)\n\t\t\tretval = errors.New(etext)\n\t\t}\n\t} else {\n\t\tetext := fmt.Sprintf(\"Section '%s' does not exist.\\n\", section)\n\t\tretval = errors.New(etext)\n\t}\n\treturn\n}",
"func OptGet() Option {\n\treturn RequestOption(webutil.OptGet())\n}",
"func (f *Fifo) GetOption(opt FifoOption) ([]byte, error) {\n\tif opt == RWFifoNoBlock {\n\t\treturn nil, fmt.Errorf(\"Option %s not implemented\", opt)\n\t}\n\n\tvar data unsafe.Pointer\n\tvar dataLen C.uint\n\n\ts := C.ncs_FifoGetOption(f.handle, C.int(opt), data, &dataLen)\n\n\tif Status(s) == StatusInvalidDataLength {\n\t\treturn f.GetOptionWithByteSize(opt, fifoOptSize[opt]*uint(dataLen))\n\t}\n\n\treturn nil, fmt.Errorf(\"Failed to read %s option: %s\", opt, Status(s))\n}",
"func (m MarketDataSnapshotFullRefresh) GetOptAttribute() (v string, err quickfix.MessageRejectError) {\n\tvar f field.OptAttributeField\n\tif err = m.Get(&f); err == nil {\n\t\tv = f.Value()\n\t}\n\treturn\n}",
"func (u *Updater) Get() Options {\n\treturn u.v.Load().(Options)\n}",
"func (m OrderStatusRequest) GetOptAttribute() (v string, err quickfix.MessageRejectError) {\n\tvar f field.OptAttributeField\n\tif err = m.Get(&f); err == nil {\n\t\tv = f.Value()\n\t}\n\treturn\n}",
"func (opts Options) Get(key string) string {\n\tfor i := len(opts) - 1; i >= 0; i-- {\n\t\to := opts[i]\n\t\tif o.IsKey(key) {\n\t\t\treturn o.Value\n\t\t}\n\t}\n\treturn \"\"\n}",
"func (m CrossOrderCancelReplaceRequest) GetOptAttribute() (v string, err quickfix.MessageRejectError) {\n\tvar f field.OptAttributeField\n\tif err = m.Get(&f); err == nil {\n\t\tv = f.Value()\n\t}\n\treturn\n}",
"func (cli *CommandLine) OptionValue(optionName string) (string, bool) {\n\tvalue, ok := cli.OptionValues[optionName]\n\treturn value, ok\n}",
"func (a Flags) Get(fieldName string) (value interface{}, found bool) {\n\tif a.AdditionalProperties != nil {\n\t\tvalue, found = a.AdditionalProperties[fieldName]\n\t}\n\treturn\n}",
"func (h *Handle) optionGetStr(f func(*C.alpm_handle_t) *C.char) (string, error) {\n\tcStr := f(h.ptr)\n\tstr := C.GoString(cStr)\n\n\tdefer C.free(unsafe.Pointer(cStr))\n\n\tif cStr == nil {\n\t\treturn str, h.LastError()\n\t}\n\n\treturn str, nil\n}",
"func (m Message) GetOptAttribute(f *field.OptAttributeField) quickfix.MessageRejectError {\n\treturn m.Body.Get(f)\n}",
"func (m Message) GetOptAttribute(f *field.OptAttributeField) quickfix.MessageRejectError {\n\treturn m.Body.Get(f)\n}",
"func (m Message) GetOptAttribute(f *field.OptAttributeField) quickfix.MessageRejectError {\n\treturn m.Body.Get(f)\n}",
"func (m Message) GetOptAttribute(f *field.OptAttributeField) quickfix.MessageRejectError {\n\treturn m.Body.Get(f)\n}",
"func Get(section, option string) string {\n\treturn cfg.Get(section, option)\n}",
"func (x *fastReflection_FlagOptions) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {\n\tswitch descriptor.FullName() {\n\tcase \"cosmos.autocli.v1.FlagOptions.name\":\n\t\tvalue := x.Name\n\t\treturn protoreflect.ValueOfString(value)\n\tcase \"cosmos.autocli.v1.FlagOptions.shorthand\":\n\t\tvalue := x.Shorthand\n\t\treturn protoreflect.ValueOfString(value)\n\tcase \"cosmos.autocli.v1.FlagOptions.usage\":\n\t\tvalue := x.Usage\n\t\treturn protoreflect.ValueOfString(value)\n\tcase \"cosmos.autocli.v1.FlagOptions.default_value\":\n\t\tvalue := x.DefaultValue\n\t\treturn protoreflect.ValueOfString(value)\n\tcase \"cosmos.autocli.v1.FlagOptions.deprecated\":\n\t\tvalue := x.Deprecated\n\t\treturn protoreflect.ValueOfString(value)\n\tcase \"cosmos.autocli.v1.FlagOptions.shorthand_deprecated\":\n\t\tvalue := x.ShorthandDeprecated\n\t\treturn protoreflect.ValueOfString(value)\n\tcase \"cosmos.autocli.v1.FlagOptions.hidden\":\n\t\tvalue := x.Hidden\n\t\treturn protoreflect.ValueOfBool(value)\n\tdefault:\n\t\tif descriptor.IsExtension() {\n\t\t\tpanic(fmt.Errorf(\"proto3 declared messages do not support extensions: cosmos.autocli.v1.FlagOptions\"))\n\t\t}\n\t\tpanic(fmt.Errorf(\"message cosmos.autocli.v1.FlagOptions does not contain field %s\", descriptor.FullName()))\n\t}\n}",
"func (d *DHCPv4) GetOneOption(code OptionCode) []byte {\n\treturn d.Options.Get(code)\n}",
"func (m SecurityListRequest) GetOptAttribute() (v string, err quickfix.MessageRejectError) {\n\tvar f field.OptAttributeField\n\tif err = m.Get(&f); err == nil {\n\t\tv = f.Value()\n\t}\n\treturn\n}",
"func (o *OptionsProvider) Get() interface{} {\n\treturn o.spec\n}",
"func getValue(sf reflect.StructField) (string, error) {\n\tvar (\n\t\tvalue string\n\t\terr error\n\t)\n\n\tkey, options := parseKeyForOption(sf.Tag.Get(\"env\"))\n\n\t// Get default value if exists\n\tdefaultValue := sf.Tag.Get(\"envDefault\")\n\tvalue = getValueOrDefault(key, defaultValue)\n\n\tif len(options) > 0 {\n\t\tfor _, option := range options {\n\t\t\t// TODO: Implement others options supported\n\t\t\t// For now only option supported is \"required\".\n\t\t\tswitch option {\n\t\t\tcase \"\":\n\t\t\t\tbreak\n\t\t\tcase required:\n\t\t\t\tvalue, err = getRequired(key)\n\t\t\tdefault:\n\t\t\t\terr = errTagOptionNotSupported\n\t\t\t}\n\t\t}\n\t}\n\n\treturn value, err\n}",
"func (os OptionSet) Get(key string) (*Option, bool) {\n\tresult, exists := os[key]\n\treturn result, exists\n}",
"func (o *DistinctOption) Get() (bool, int) {\n\tif o == nil {\n\t\treturn false, 0\n\t}\n\treturn o.value == 1, o.value\n}",
"func (rs *PollOptionResultSet) Get() (*PollOption, error) {\n\treturn rs.last, rs.lastErr\n}",
"func GetRenewOption(ctx context.Context, id int64) (RenewOption, error) {\n\tvar a RenewOption\n\tif !ValidateSession(ctx) {\n\t\treturn a, ErrSessionRequired\n\t}\n\tfields := []interface{}{id}\n\tstmt, row := getRowFromDB(ctx, Wdb.Prepstmt.GetRenewOption, fields)\n\tif stmt != nil {\n\t\tdefer stmt.Close()\n\t}\n\treturn a, ReadRenewOption(row, &a)\n}",
"func (flag *flag) GetValue() string {\n\treturn flag.FlagValue.String()\n}",
"func (gt *GT) readOptionValue(opt *Option, optionValues *OptionValues) (interface{}, error) {\n\tgt.printOption(opt, optionValues)\n\tdefer fmt.Fprintln(gt.Out)\n\n\ts, err := gt.readStdin()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tdefaultVal := opt.Default(optionValues)\n\n\tvar returnVal interface{}\n\n\t// TODO: cleanup somehow\n\tif s == \"\" {\n\t\treturnVal = defaultVal\n\t} else {\n\t\tswitch defaultVal.(type) {\n\t\tcase string:\n\t\t\treturnVal = s\n\t\tcase bool:\n\t\t\tboolVal, err := strconv.ParseBool(s)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\treturnVal = boolVal\n\t\tcase int:\n\t\t\tintVal, err := strconv.Atoi(s)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\treturnVal = intVal\n\t\tdefault:\n\t\t\tpanic(\"unsupported type\")\n\t\t}\n\t}\n\n\tif err := opt.Validate(returnVal); err != nil {\n\t\tgt.printf(\"\\n\")\n\t\tgt.printWarningf(\"Validation failed: %s\", err.Error())\n\t\treturn gt.readOptionValue(opt, optionValues)\n\t}\n\n\treturn returnVal, nil\n}",
"func (m *Option) GetName() (val string, set bool) {\n\tif m.Name == nil {\n\t\treturn\n\t}\n\n\treturn *m.Name, true\n}",
"func (fv FlagValue) Get() interface{} {\n\treturn fv.String()\n}",
"func (adaType *AdaSuperType) Option() string {\n\tvar buffer bytes.Buffer\n\tfor i := 0; i < len(fieldOptions); i++ {\n\t\tif (adaType.options & (1 << uint(i))) > 0 {\n\t\t\tif buffer.Len() > 0 {\n\t\t\t\tbuffer.WriteString(\",\")\n\t\t\t}\n\t\t\tbuffer.WriteString(fieldOptions[i])\n\t\t}\n\t}\n\treturn buffer.String()\n}",
"func (m *Memo) Get(key string) (o *Option, ok bool) {\n\to, ok = m.Collection[key]\n\treturn\n}",
"func (o *FeatureFlag) GetValue() string {\n\tif o == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\n\treturn o.Value\n}",
"func (o *OptionalVal[T]) Get() (v T, present bool) {\n\treturn o.v, o.present\n}",
"func (this *Command) Option(name string) *Option {\n\tfor _, o := range this.Options {\n\t\tif o.Name == name || o.Alias == name {\n\t\t\treturn o\n\t\t}\n\t}\n\treturn nil\n}",
"func (o *MicrosoftGraphWorkbookSortField) GetDataOption() string {\n\tif o == nil || o.DataOption == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\treturn *o.DataOption\n}",
"func (pdu *Pdu) GetOptionOpaqueValue(key OptionKey) (opaqueValue string) {\n for _, option := range pdu.Options {\n if key == option.Key {\n opaqueValue = strings.ToUpper(hex.EncodeToString(option.Value))\n return\n }\n }\n return \"\"\n}",
"func (m Message) GetUnderlyingOptAttribute(f *field.UnderlyingOptAttributeField) quickfix.MessageRejectError {\n\treturn m.Body.Get(f)\n}",
"func (m Message) GetUnderlyingOptAttribute(f *field.UnderlyingOptAttributeField) quickfix.MessageRejectError {\n\treturn m.Body.Get(f)\n}",
"func getEtcdOption(conf map[string]string, confKey, envVar string) (string, bool) {\n\tconfVal, inConf := conf[confKey]\n\tenvVal, inEnv := os.LookupEnv(envVar)\n\tif inEnv {\n\t\treturn envVal, true\n\t}\n\treturn confVal, inConf\n}",
"func (repo *Repository) GetOptionsValue() string {\n\tif repo.OptionsValue != \"\" {\n\t\treturn repo.OptionsValue\n\t}\n\treturn fmt.Sprintf(\"%s: %s\", strings.ToLower(repo.Name), repo.Pkg)\n}",
"func (ep *endpoint) GetSockOpt(_ fidl.Context, level, optName int16) (socket.BaseSocketGetSockOptResult, error) {\n\tvar val interface{}\n\tif level == C.SOL_SOCKET && optName == C.SO_TIMESTAMP {\n\t\tep.mu.Lock()\n\t\tif ep.mu.sockOptTimestamp {\n\t\t\tval = int32(1)\n\t\t} else {\n\t\t\tval = int32(0)\n\t\t}\n\t\tep.mu.Unlock()\n\t} else {\n\t\tvar err tcpip.Error\n\t\tval, err = GetSockOpt(ep.ep, ep.ns, &ep.terminal, ep.netProto, ep.transProto, level, optName)\n\t\tif level == C.SOL_SOCKET && optName == C.SO_ERROR {\n\t\t\tep.pending.mustUpdate()\n\t\t}\n\t\tif err != nil {\n\t\t\treturn socket.BaseSocketGetSockOptResultWithErr(tcpipErrorToCode(err)), nil\n\t\t}\n\t}\n\tif val, ok := val.([]byte); ok {\n\t\treturn socket.BaseSocketGetSockOptResultWithResponse(socket.BaseSocketGetSockOptResponse{\n\t\t\tOptval: val,\n\t\t}), nil\n\t}\n\tb := make([]byte, reflect.TypeOf(val).Size())\n\tn := copyAsBytes(b, val)\n\tif n < len(b) {\n\t\tpanic(fmt.Sprintf(\"short %T: %d/%d\", val, n, len(b)))\n\t}\n\t_ = syslog.DebugTf(\"getsockopt\", \"%p: level=%d, optName=%d, optVal[%d]=%v\", ep, level, optName, len(b), b)\n\n\treturn socket.BaseSocketGetSockOptResultWithResponse(socket.BaseSocketGetSockOptResponse{\n\t\tOptval: b,\n\t}), nil\n}",
"func (c *Client) Option(string) error {\n\treturn nil\n}",
"func (a Meta_Georegion) Get(fieldName string) (value interface{}, found bool) {\n\tif a.AdditionalProperties != nil {\n\t\tvalue, found = a.AdditionalProperties[fieldName]\n\t}\n\treturn\n}",
"func (o *HttpDeliveryOptions) GetValueOk() (*DeliveryOverrideType, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn &o.Value, true\n}",
"func (c *Client) Get(flag, env string) bool {\n\tv, err := c.get(flag, env)\n\tif err != nil {\n\t\treturn c.Default\n\t}\n\treturn v\n}",
"func (node *DropView) GetOptLike() *OptLike {\n\treturn nil\n}",
"func (c *Configuration) Get(field string) interface{} {\n\tout := getField(c.App, field)\n\tif out == nil {\n\t\tout = getField(c.Base, field)\n\t}\n\n\treturn out\n}",
"func (a Secrets) Get(fieldName string) (value string, found bool) {\n\tif a.AdditionalProperties != nil {\n\t\tvalue, found = a.AdditionalProperties[fieldName]\n\t}\n\treturn\n}",
"func (a FluxSuggestion_Params) Get(fieldName string) (value string, found bool) {\n\tif a.AdditionalProperties != nil {\n\t\tvalue, found = a.AdditionalProperties[fieldName]\n\t}\n\treturn\n}",
"func GetBootOption(c common.Client, uri string) (*BootOption, error) {\n\tvar bootoption BootOption\n\treturn &bootoption, bootoption.Get(c, uri, &bootoption)\n}",
"func (f *FileStruct) GetPersistPackageOption() string {\n\tif f.Desc == nil || f.Desc.GetOptions() == nil {\n\t\treturn \"\"\n\t}\n\tif proto.HasExtension(f.Desc.GetOptions(), persist.E_Package) {\n\t\tpkg, err := proto.GetExtension(f.Desc.GetOptions(), persist.E_Package)\n\t\tif err != nil {\n\t\t\tlogrus.WithError(err).Debug(\"Error\")\n\t\t\treturn \"\"\n\t\t}\n\t\t//logrus.WithField(\"pkg\", *pkg.(*string)).Info(\"Package\")\n\t\treturn *pkg.(*string)\n\t}\n\tlogrus.WithField(\"File Options\", f.Desc.GetOptions()).Debug(\"file options\")\n\treturn \"\"\n}",
"func GetInt(section, option string) int {\n\treturn cfg.GetInt(section, option)\n}",
"func GetV(opts map[string]string, key string, defaultValue string) string {\n\tif value, ok := opts[key]; ok {\n\t\treturn value\n\t}\n\treturn defaultValue\n}",
"func (x *fastReflection_RpcCommandOptions) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {\n\tswitch descriptor.FullName() {\n\tcase \"cosmos.autocli.v1.RpcCommandOptions.rpc_method\":\n\t\tvalue := x.RpcMethod\n\t\treturn protoreflect.ValueOfString(value)\n\tcase \"cosmos.autocli.v1.RpcCommandOptions.use\":\n\t\tvalue := x.Use\n\t\treturn protoreflect.ValueOfString(value)\n\tcase \"cosmos.autocli.v1.RpcCommandOptions.long\":\n\t\tvalue := x.Long\n\t\treturn protoreflect.ValueOfString(value)\n\tcase \"cosmos.autocli.v1.RpcCommandOptions.short\":\n\t\tvalue := x.Short\n\t\treturn protoreflect.ValueOfString(value)\n\tcase \"cosmos.autocli.v1.RpcCommandOptions.example\":\n\t\tvalue := x.Example\n\t\treturn protoreflect.ValueOfString(value)\n\tcase \"cosmos.autocli.v1.RpcCommandOptions.alias\":\n\t\tif len(x.Alias) == 0 {\n\t\t\treturn protoreflect.ValueOfList(&_RpcCommandOptions_6_list{})\n\t\t}\n\t\tlistValue := &_RpcCommandOptions_6_list{list: &x.Alias}\n\t\treturn protoreflect.ValueOfList(listValue)\n\tcase \"cosmos.autocli.v1.RpcCommandOptions.suggest_for\":\n\t\tif len(x.SuggestFor) == 0 {\n\t\t\treturn protoreflect.ValueOfList(&_RpcCommandOptions_7_list{})\n\t\t}\n\t\tlistValue := &_RpcCommandOptions_7_list{list: &x.SuggestFor}\n\t\treturn protoreflect.ValueOfList(listValue)\n\tcase \"cosmos.autocli.v1.RpcCommandOptions.deprecated\":\n\t\tvalue := x.Deprecated\n\t\treturn protoreflect.ValueOfString(value)\n\tcase \"cosmos.autocli.v1.RpcCommandOptions.version\":\n\t\tvalue := x.Version\n\t\treturn protoreflect.ValueOfString(value)\n\tcase \"cosmos.autocli.v1.RpcCommandOptions.flag_options\":\n\t\tif len(x.FlagOptions) == 0 {\n\t\t\treturn protoreflect.ValueOfMap(&_RpcCommandOptions_10_map{})\n\t\t}\n\t\tmapValue := &_RpcCommandOptions_10_map{m: &x.FlagOptions}\n\t\treturn protoreflect.ValueOfMap(mapValue)\n\tcase \"cosmos.autocli.v1.RpcCommandOptions.positional_args\":\n\t\tif len(x.PositionalArgs) == 0 {\n\t\t\treturn protoreflect.ValueOfList(&_RpcCommandOptions_11_list{})\n\t\t}\n\t\tlistValue := &_RpcCommandOptions_11_list{list: &x.PositionalArgs}\n\t\treturn protoreflect.ValueOfList(listValue)\n\tcase \"cosmos.autocli.v1.RpcCommandOptions.skip\":\n\t\tvalue := x.Skip\n\t\treturn protoreflect.ValueOfBool(value)\n\tdefault:\n\t\tif descriptor.IsExtension() {\n\t\t\tpanic(fmt.Errorf(\"proto3 declared messages do not support extensions: cosmos.autocli.v1.RpcCommandOptions\"))\n\t\t}\n\t\tpanic(fmt.Errorf(\"message cosmos.autocli.v1.RpcCommandOptions does not contain field %s\", descriptor.FullName()))\n\t}\n}",
"func (f StringSliceFlag) GetValue() string {\n\tif f.Value != nil {\n\t\treturn f.Value.String()\n\t}\n\treturn \"\"\n}",
"func Opt(key string, val interface{}) Option {\n\treturn &option{key, val}\n}",
"func (v *Validator) Get(field string) string {\n\treturn v.model[field]\n}",
"func (x *fastReflection_ModuleOptions) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {\n\tswitch descriptor.FullName() {\n\tcase \"cosmos.autocli.v1.ModuleOptions.tx\":\n\t\tvalue := x.Tx\n\t\treturn protoreflect.ValueOfMessage(value.ProtoReflect())\n\tcase \"cosmos.autocli.v1.ModuleOptions.query\":\n\t\tvalue := x.Query\n\t\treturn protoreflect.ValueOfMessage(value.ProtoReflect())\n\tdefault:\n\t\tif descriptor.IsExtension() {\n\t\t\tpanic(fmt.Errorf(\"proto3 declared messages do not support extensions: cosmos.autocli.v1.ModuleOptions\"))\n\t\t}\n\t\tpanic(fmt.Errorf(\"message cosmos.autocli.v1.ModuleOptions does not contain field %s\", descriptor.FullName()))\n\t}\n}",
"func getKeyValFromTagOption(opt string) (string, string) {\n\tif idx := strings.Index(opt, \":\"); idx != -1 {\n\t\treturn strings.TrimSpace(opt[:idx]), strings.TrimSpace(opt[idx+1:])\n\n\t}\n\tfmt.Printf(\"ilegal option: %s\\n\\n\", opt)\n\treturn \"\", \"\"\n}",
"func (o *InlineObject54) GetGet() string {\n\tif o == nil || o.Get == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\treturn *o.Get\n}",
"func computeOptionValue(def_value string, opt_conf string, is_conf error, options map[string]string, opt_name string) string {\n\tfinal_value := def_value\n\n\tif is_conf == nil {\n\t\tfinal_value = opt_conf\n\t}\n\n\topt_val, is_opt := options[opt_name]\n\tif is_opt {\n\t\tfinal_value = opt_val\n\t}\n\n\treturn final_value\n}",
"func (f *ArrayStringFlags) Get() interface{} {\n\treturn \"\"\n}",
"func (o *GlobalOption) Value() string {\n\treturn o.value\n}",
"func (o *Option) String() string { return o.Name }",
"func (f *Fifo) GetOptionWithByteSize(opt FifoOption, size uint) ([]byte, error) {\n\tif opt == RWFifoNoBlock {\n\t\treturn nil, fmt.Errorf(\"Option %s not implemented\", opt)\n\t}\n\n\treturn getOption(\"fifo\", f.handle, opt, size)\n}",
"func (o *HttpDeliveryOptions) GetValue() DeliveryOverrideType {\n\tif o == nil {\n\t\tvar ret DeliveryOverrideType\n\t\treturn ret\n\t}\n\n\treturn o.Value\n}",
"func GetUint(section, option string) uint {\n\treturn cfg.GetUint(section, option)\n}",
"func (node *AlterView) GetOptLike() *OptLike {\n\treturn nil\n}",
"func (m optionsMap) getString(k string, def string) string {\n\tv, ok := m[k]\n\tif !ok {\n\t\treturn def\n\t}\n\treturn v\n}",
"func (jo *Object) GetValue(field string) (Value, bool) {\n\tjp, ok := jo.GetProperty(field)\n\tif !ok {\n\t\treturn nil, false\n\t}\n\treturn jp.Value, true\n}",
"func (f *Field) Get(l *Location) (string, error) {\n\tif l.Comp == -1 {\n\t\treturn string(f.Value), nil\n\t}\n\tcomp, err := f.Component(l.Comp)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn comp.Get(l)\n}",
"func (a LabelUpdate_Properties) Get(fieldName string) (value string, found bool) {\n\tif a.AdditionalProperties != nil {\n\t\tvalue, found = a.AdditionalProperties[fieldName]\n\t}\n\treturn\n}",
"func (a Meta_Priority) Get(fieldName string) (value interface{}, found bool) {\n\tif a.AdditionalProperties != nil {\n\t\tvalue, found = a.AdditionalProperties[fieldName]\n\t}\n\treturn\n}",
"func (tcp TCP) GetMSSOption() uint {\n\tfor i := 0; i < len(tcp.Options); i++ {\n\t\tif tcp.Options[i].OptionType == 2 {\n\t\t\treturn uint(binary.BigEndian.Uint16(tcp.Options[i].OptionData))\n\t\t}\n\t}\n\n\treturn 0\n}",
"func (o *CommitOptions) GetTag() string {\n\tif o.Tag == nil {\n\t\tvar z string\n\t\treturn z\n\t}\n\treturn *o.Tag\n}",
"func ReadOption(printText string, defaultVal int, maxValue int, retryOnInvalid bool) (int, error) {\n\tvalidate := func(value string) bool {\n\t\toption, _ := strconv.Atoi(value)\n\t\treturn option > 0 && option <= maxValue\n\t}\n\n\toptionStr, err := ReadInput(printText, Default{Value: strconv.Itoa(defaultVal), IsDefault: true}, validate, \"Choose a number\", retryOnInvalid)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn strconv.Atoi(optionStr)\n}",
"func (o *Opts) GetTimeout() time.Duration {\n\tif o.Timeout == 0 {\n\t\treturn DefaultTimeout\n\t}\n\n\treturn o.Timeout\n}",
"func (o *SyntheticsGlobalVariableParseTestOptions) GetField() string {\n\tif o == nil || o.Field == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\treturn *o.Field\n}",
"func getStringOpt(name, dfault string) string {\n if value := os.Getenv(name); value != \"\" {\n return value\n }\n return dfault\n}",
"func (p *DynamicUInt64Property) Get() uint64 {\n\treturn p.prop.GetUInt64(p.defaultValue)\n}",
"func (node *CreateView) GetOptLike() *OptLike {\n\treturn nil\n}",
"func (a *Args) GetOptI(key string) int {\n\ts := a.GetOpt(key)\n\n\ti, err := strconv.Atoi(s)\n\tif err != nil {\n\t\tfmt.Fprintf(os.Stderr, \"Args: Invalid option value - %s for key %s - Must be an integer\", s, key)\n\t\tos.Exit(1)\n\t}\n\n\treturn i\n}",
"func (f Int64SliceFlag) GetValue() string {\n\tif f.Value != nil {\n\t\treturn f.Value.String()\n\t}\n\treturn \"\"\n}",
"func getValue(valueField string, as *args.Store) (result *string) {\n\t// No input? No result!\n\tif !utils.IsSet(valueField) {\n\t\treturn nil\n\t}\n\n\t// check whether a parameter reference was provided, i.e. something like \"param:<name>\"\n\tparamName := regexParamValue.FindStringSubmatch(valueField)\n\tif len(paramName) > 0 {\n\t\tutils.Assert(len(paramName) == 2, \"Should contain the matching text plus a single capturing group\")\n\n\t\targValue, exists := as.Get(paramName[1])\n\t\tif exists {\n\t\t\treturn &argValue\n\t\t}\n\t\treturn nil\n\t}\n\n\t// else assume that provided value was a static text\n\treturn &valueField\n}",
"func (c *Control) Get(key string) (string, bool) {\n\tval, ok := c.Values[key]\n\treturn val, ok\n}",
"func (a Meta_Asn) Get(fieldName string) (value interface{}, found bool) {\n\tif a.AdditionalProperties != nil {\n\t\tvalue, found = a.AdditionalProperties[fieldName]\n\t}\n\treturn\n}",
"func Get(key string) string {\n\treturn viper.GetString(key)\n}",
"func (ui *UI) GetChooseMainOption() string {\n\tprompt := promptui.Select{\n\t\tLabel: \"Select command\",\n\t\tItems: []string{\"containers\", \"exit\"},\n\t}\n\t_, result, err := prompt.Run()\n\tif err != nil {\n\t\tif !strings.Contains(err.Error(), \"^\") {\n\t\t\tui.logger.Errorf(\"Prompt failed %v\", err)\n\t\t}\n\t}\n\treturn result\n}",
"func (sf *StructField) TagSettingsGet(key string) (string, bool) {\n sf.tagSettingsLock.RLock()\n defer sf.tagSettingsLock.RUnlock()\n val, ok := sf.TagSettings[key]\n return val, ok\n}",
"func GetVal(k string) string {\n\treturn Get(k).Val\n}"
] |
[
"0.7789426",
"0.76038283",
"0.7586303",
"0.73756325",
"0.7094269",
"0.7091528",
"0.7010969",
"0.6985966",
"0.6707076",
"0.6698385",
"0.6686824",
"0.6682675",
"0.6648879",
"0.64282256",
"0.6405165",
"0.63772094",
"0.62942415",
"0.6261119",
"0.62004966",
"0.6181061",
"0.61582494",
"0.610316",
"0.610316",
"0.610316",
"0.610316",
"0.60917073",
"0.60799074",
"0.6058173",
"0.6054504",
"0.60507756",
"0.6026232",
"0.6020492",
"0.60128534",
"0.58919245",
"0.58830345",
"0.58385557",
"0.58380294",
"0.5829287",
"0.5822258",
"0.58221066",
"0.56412256",
"0.5628328",
"0.5608803",
"0.55995303",
"0.5563872",
"0.55592686",
"0.55498284",
"0.55498284",
"0.55404896",
"0.5528771",
"0.54798174",
"0.54691744",
"0.54569757",
"0.5451778",
"0.5449517",
"0.5427656",
"0.5426424",
"0.5425531",
"0.5399057",
"0.53908885",
"0.53836995",
"0.5379736",
"0.537395",
"0.5352939",
"0.53453237",
"0.534489",
"0.53382516",
"0.5334279",
"0.53263706",
"0.53147453",
"0.5303885",
"0.5298734",
"0.5292022",
"0.5285545",
"0.5283563",
"0.52830935",
"0.5266006",
"0.5265776",
"0.52565444",
"0.5254378",
"0.5250326",
"0.52359253",
"0.52306026",
"0.52295566",
"0.52286726",
"0.5226683",
"0.5226391",
"0.5223377",
"0.52147114",
"0.5213988",
"0.5203835",
"0.5203709",
"0.5197163",
"0.5168262",
"0.5158865",
"0.51556915",
"0.51468694",
"0.5137263",
"0.5132199",
"0.51309067"
] |
0.7474285
|
3
|
GetVoters returns value of Voters field.
|
func (p *PollAnswerVoters) GetVoters() (value int) {
if p == nil {
return
}
return p.Voters
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (e *Election) GetAllVoters() ([]models.Voter, error) {\n\treturn e.db.GetAllVoters()\n}",
"func (_Contracts *ContractsCaller) GetEligibleVoters(opts *bind.CallOpts, _proposal *big.Int, _voterAddr common.Address) (struct {\n\tVoterId *big.Int\n\tVoterAddr common.Address\n\tPositionId *big.Int\n\tIsVerified bool\n\tIsVoted bool\n}, error) {\n\tret := new(struct {\n\t\tVoterId *big.Int\n\t\tVoterAddr common.Address\n\t\tPositionId *big.Int\n\t\tIsVerified bool\n\t\tIsVoted bool\n\t})\n\tout := ret\n\terr := _Contracts.contract.Call(opts, out, \"getEligibleVoters\", _proposal, _voterAddr)\n\treturn *ret, err\n}",
"func (api *PrimaryAPI) GetAllVoters(w http.ResponseWriter, r *http.Request) {\n\t// TODO: Needs auth\n\t// if (!admin) return 403\n\n\tv, err := api.Election.GetAllVoters()\n\tif err != nil {\n\t\tw.WriteHeader(500)\n\t\tw.Write([]byte(err.Error()))\n\t\treturn\n\t}\n\n\tWriteJSON(w, v)\n\n}",
"func (_Contracts *ContractsCallerSession) GetEligibleVoters(_proposal *big.Int, _voterAddr common.Address) (struct {\n\tVoterId *big.Int\n\tVoterAddr common.Address\n\tPositionId *big.Int\n\tIsVerified bool\n\tIsVoted bool\n}, error) {\n\treturn _Contracts.Contract.GetEligibleVoters(&_Contracts.CallOpts, _proposal, _voterAddr)\n}",
"func (s *ArkClient) GetDelegateVoters(params DelegateQueryParams) (DelegateVoters, *http.Response, error) {\n\trespData := new(DelegateVoters)\n\trespError := new(ArkApiResponseError)\n\tresp, err := s.sling.New().Get(\"api/delegates/voters\").QueryStruct(¶ms).Receive(respData, respError)\n\tif err == nil {\n\t\terr = respError\n\t}\n\n\treturn *respData, resp, err\n}",
"func (_Contracts *ContractsSession) GetEligibleVoters(_proposal *big.Int, _voterAddr common.Address) (struct {\n\tVoterId *big.Int\n\tVoterAddr common.Address\n\tPositionId *big.Int\n\tIsVerified bool\n\tIsVoted bool\n}, error) {\n\treturn _Contracts.Contract.GetEligibleVoters(&_Contracts.CallOpts, _proposal, _voterAddr)\n}",
"func (_Contracts *ContractsSession) AVoters(arg0 *big.Int) (struct {\n\tVoterId *big.Int\n\tIsUnique bool\n\tVoterAddr common.Address\n}, error) {\n\treturn _Contracts.Contract.AVoters(&_Contracts.CallOpts, arg0)\n}",
"func (db ElectionDatabase) FindVotedVoters() ([]models.Voter, error) {\n\tvotersCollection := db.Session.DB(config.MongoDbName).C(\"voters\")\n\tvar voters []models.Voter\n\terr := votersCollection.Find(bson.M{\"voted\": true}).All(&voters)\n\treturn voters, err\n}",
"func (_Contracts *ContractsCaller) AVoters(opts *bind.CallOpts, arg0 *big.Int) (struct {\n\tVoterId *big.Int\n\tIsUnique bool\n\tVoterAddr common.Address\n}, error) {\n\tret := new(struct {\n\t\tVoterId *big.Int\n\t\tIsUnique bool\n\t\tVoterAddr common.Address\n\t})\n\tout := ret\n\terr := _Contracts.contract.Call(opts, out, \"aVoters\", arg0)\n\treturn *ret, err\n}",
"func (r *Organization) Viewers() *pulumi.ArrayOutput {\n\treturn (*pulumi.ArrayOutput)(r.s.State[\"viewers\"])\n}",
"func (x *ValidatorParticipation) GetVotedEther() uint64 {\n\tif x != nil {\n\t\treturn x.VotedEther\n\t}\n\treturn 0\n}",
"func (_Contracts *ContractsCallerSession) AVoters(arg0 *big.Int) (struct {\n\tVoterId *big.Int\n\tIsUnique bool\n\tVoterAddr common.Address\n}, error) {\n\treturn _Contracts.Contract.AVoters(&_Contracts.CallOpts, arg0)\n}",
"func (_Contracts *ContractsCallerSession) VotersCount() (*big.Int, error) {\n\treturn _Contracts.Contract.VotersCount(&_Contracts.CallOpts)\n}",
"func GetUserVotes(c *gin.Context) {\n\tuuid := c.Param(\"uuid\")\n\tvar user models.User\n\tvar votes []models.Vote\n\n\t// check if vote exists throw an not found error if not\n\tdb := db.GetDB()\n\tif err := db.Where(\"uuid = ?\", uuid).First(&user).Error; err != nil {\n\t\tc.AbortWithStatus(http.StatusNotFound)\n\t\treturn\n\t}\n\n\t// // Find vote and associated voter\n\t// db.Model(&vote).Association(\"UUIDVote\").Find(&user.UUIDVote)\n\n\t// // Get only all uuid from voter list\n\t// voteUUIDs := []string{}\n\t// for _, v := range user.UUIDVote {\n\t// \tvoteUUIDs = append(voteUUIDs, v.UUID.String())\n\t// }\n\n\tdb.Model(&user).Related(&votes, \"Votes\")\n\n\t// return json data\n\tc.JSON(http.StatusOK, gin.H{\n\t\t\"user\": user,\n\t\t\"votes\": votes,\n\t})\n}",
"func (_Contracts *ContractsSession) VotersCount() (*big.Int, error) {\n\treturn _Contracts.Contract.VotersCount(&_Contracts.CallOpts)\n}",
"func (db *DB) GetTeachers() ([]string, error) {\n\tconn, err := redishelper.GetRedisConn(db.RedisServer, db.RedisPassword)\n\tif err != nil {\n\t\treturn []string{}, err\n\t}\n\tdefer conn.Close()\n\n\tk := \"ming:teachers\"\n\treturn redis.Strings(conn.Do(\"ZRANGE\", k, 0, -1))\n}",
"func getVolunteers(c *gin.Context) {\n\tvar vols []Volunteer\n\t//Read volunteers from database\n\tif err := db.Find(&vols).Error; err != nil {\n\t\tcreateNotFoundResponse(c)\n\t\treturn\n\t}\n\n\t//Authorization if user is reporter\n\tif !reporterAuth(c) {\n\t\treturn\n\t}\n\tc.JSON(200, vols)\n}",
"func (s *Store) GetVotes() Votes {\n\tvotes := make(map[string]int)\n\n\ts.db.View(func(tx *bolt.Tx) error {\n\t\tbVOT := tx.Bucket([]byte(\"VOTES\"))\n\n\t\tc := bVOT.Cursor()\n\t\tfor k, v := c.First(); k != nil; k, v = c.Next() {\n\t\t\tvotes[string(k)] = btoi(v)\n\t\t}\n\n\t\treturn nil\n\t})\n\n\treturn votes\n}",
"func (wb *EVSEWifi) voltages() (float64, float64, float64, error) {\n\tparams, err := wb.paramG.Get()\n\treturn params.VoltageP1, params.VoltageP2, params.VoltageP3, err\n}",
"func (p *Producer) Votes() common.Fixed64 {\n\treturn p.votes\n}",
"func GetVorgemerkt(id int) (reserveds []Reserved, err error) {\n\t//Abfragen für Array Entliehen\n\trows, err := Db.Query(\"select equipment.ID, equipment.name, equipment.description, equipment.Image, reserve.returnUntil from equipment, reserve where reserve.clientID=$1 and reserve.equipmentID=equipment.ID\", id)\n\tif err != nil {\tfmt.Println(err)}\n\n\tfor rows.Next() {\n\t\tequipment := Equipment{}\n\t\treserve := Reserve{}\n\t\terr = rows.Scan(&equipment.ID, &equipment.Name, &equipment.Description, &equipment.Image, &reserve.ReturnUntil)\n\n\t\tif err != nil {\n\t\t\tlog.Println(\"Fehler Nr. 2 in model.GetAllEquipment\")\n\t\t\treturn\n\t\t}\n\n\t\treserved := Reserved{Name:equipment.Name, ID:equipment.ID, Description:equipment.Description, Image:equipment.Image, ReturnUntil:reserve.ReturnUntil}\n\t\tfmt.Print(\"reserved: \")\n\t\tfmt.Print(reserved)\n\t\treserveds = append(reserveds, reserved)\n\t}\n\trows.Close()\n\treturn\n}",
"func (this *Device) GetVolts() (map[string]float64, error) {\n\t// retrieve values as text\n\tcommand := strings.Split(GENCMD_MEASURE_VOLTS, \" \")\n\tvolts := make(map[string]float64, len(command))\n\tfor _, name := range command[1:] {\n\n\t\t// Retrieve volt value\n\t\tvalue, err := this.GeneralCommand(command[0] + \" \" + name)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\t// Find value within text\n\t\tmatch := REGEXP_VOLTAGE.FindStringSubmatch(value)\n\t\tif len(match) != 2 {\n\t\t\treturn nil, this.log.Error(\"Bad Response from %v\", command[0])\n\t\t}\n\n\t\t// Convert to uint64\n\t\tvalue2, err := strconv.ParseFloat(match[1], 64)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\t// Set value\n\t\tvolts[name] = value2\n\t}\n\n\treturn volts, nil\n}",
"func (_Contracts *ContractsCaller) VotersCount(opts *bind.CallOpts) (*big.Int, error) {\n\tvar (\n\t\tret0 = new(*big.Int)\n\t)\n\tout := ret0\n\terr := _Contracts.contract.Call(opts, out, \"votersCount\")\n\treturn *ret0, err\n}",
"func (_Contracts *ContractsCaller) MProposalVoters(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) (struct {\n\tIsVerified bool\n\tIsVoted bool\n\tPositionId *big.Int\n}, error) {\n\tret := new(struct {\n\t\tIsVerified bool\n\t\tIsVoted bool\n\t\tPositionId *big.Int\n\t})\n\tout := ret\n\terr := _Contracts.contract.Call(opts, out, \"mProposalVoters\", arg0, arg1)\n\treturn *ret, err\n}",
"func (_ElvTradable *ElvTradableCaller) GetOffers(opts *bind.CallOpts) (*big.Int, uint16, error) {\n\tvar out []interface{}\n\terr := _ElvTradable.contract.Call(opts, &out, \"getOffers\")\n\n\tif err != nil {\n\t\treturn *new(*big.Int), *new(uint16), err\n\t}\n\n\tout0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)\n\tout1 := *abi.ConvertType(out[1], new(uint16)).(*uint16)\n\n\treturn out0, out1, err\n\n}",
"func (ftm *FtmBridge) Votes(voter common.Address, ballots []common.Address) (VotesList, error) {\n\t// make the container\n\tlist := make([]types.Vote, 0)\n\n\t// loop all ballots in question\n\tfor _, ballot := range ballots {\n\t\t// pull the votes for this ballot\n\t\tsub, err := ftm.VotesByBallot(ballot, &voter)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\t// add to the final list\n\t\tlist = append(list, sub...)\n\t}\n\n\treturn list, nil\n}",
"func (keeper Keeper) GetVotes(ctx sdk.Context, proposalID uint64) (votes types.Votes) {\n\tkeeper.IterateVotes(ctx, proposalID, func(vote types.Vote) bool {\n\t\tvotes = append(votes, vote)\n\t\treturn false\n\t})\n\treturn\n}",
"func (wb *Alfen) Voltages() (float64, float64, float64, error) {\n\treturn wb.voltagesOrCurrents(alfenRegVoltages)\n}",
"func (c FieldsCollection) VAT() *models.Field {\n\treturn c.MustGet(\"VAT\")\n}",
"func (s UserSet) VAT() string {\n\tres, _ := s.RecordCollection.Get(models.NewFieldName(\"VAT\", \"vat\")).(string)\n\treturn res\n}",
"func (d *Service) GetRetroVotes(RetroID string) []*thunderdome.RetroVote {\n\tvar votes = make([]*thunderdome.RetroVote, 0)\n\n\titemRows, itemsErr := d.DB.Query(\n\t\t`SELECT group_id, user_id FROM thunderdome.retro_group_vote WHERE retro_id = $1;`,\n\t\tRetroID,\n\t)\n\tif itemsErr == nil {\n\t\tdefer itemRows.Close()\n\t\tfor itemRows.Next() {\n\t\t\tvar rv = &thunderdome.RetroVote{}\n\t\t\tif err := itemRows.Scan(&rv.GroupID, &rv.UserID); err != nil {\n\t\t\t\td.Logger.Error(\"get retro votes query scan error\", zap.Error(err))\n\t\t\t} else {\n\t\t\t\tvotes = append(votes, rv)\n\t\t\t}\n\t\t}\n\t} else {\n\t\td.Logger.Error(\"get retro votes query error\", zap.Error(itemsErr))\n\t}\n\n\treturn votes\n}",
"func (q queryServer) Votes(ctx context.Context, req *v1.QueryVotesRequest) (*v1.QueryVotesResponse, error) {\n\tif req == nil {\n\t\treturn nil, status.Error(codes.InvalidArgument, \"invalid request\")\n\t}\n\n\tif req.ProposalId == 0 {\n\t\treturn nil, status.Error(codes.InvalidArgument, \"proposal id can not be 0\")\n\t}\n\n\tvotes, pageRes, err := query.CollectionPaginate(ctx, q.k.Votes, req.Pagination, func(_ collections.Pair[uint64, sdk.AccAddress], value v1.Vote) (vote *v1.Vote, err error) {\n\t\treturn &value, nil\n\t}, query.WithCollectionPaginationPairPrefix[uint64, sdk.AccAddress](req.ProposalId))\n\tif err != nil {\n\t\treturn nil, status.Error(codes.Internal, err.Error())\n\t}\n\n\treturn &v1.QueryVotesResponse{Votes: votes, Pagination: pageRes}, nil\n}",
"func (_ElvTradableLocal *ElvTradableLocalCaller) GetOffers(opts *bind.CallOpts) (*big.Int, uint16, error) {\n\tvar out []interface{}\n\terr := _ElvTradableLocal.contract.Call(opts, &out, \"getOffers\")\n\n\tif err != nil {\n\t\treturn *new(*big.Int), *new(uint16), err\n\t}\n\n\tout0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)\n\tout1 := *abi.ConvertType(out[1], new(uint16)).(*uint16)\n\n\treturn out0, out1, err\n\n}",
"func (_Redeemable *RedeemableCaller) GetOffers(opts *bind.CallOpts) (*big.Int, uint16, error) {\n\tvar out []interface{}\n\terr := _Redeemable.contract.Call(opts, &out, \"getOffers\")\n\n\tif err != nil {\n\t\treturn *new(*big.Int), *new(uint16), err\n\t}\n\n\tout0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)\n\tout1 := *abi.ConvertType(out[1], new(uint16)).(*uint16)\n\n\treturn out0, out1, err\n\n}",
"func (p *Path) Vr(ys ...float64) *Path {\n\treturn p.addCmd(\"v\", vCmd{ys: ys})\n}",
"func (b Bible) GetVerses() (verses []Verse) {\n\tfor _, testament := range b {\n\t\tfor _, book := range testament.Books {\n\t\t\tverses = append(verses, book.Verses...)\n\t\t}\n\t}\n\treturn verses\n}",
"func (c *Client) GetAllVetted(gav *www.GetAllVetted) (*www.GetAllVettedReply, error) {\n\tresponseBody, err := c.makeRequest(http.MethodGet,\n\t\twww.PoliteiaWWWAPIRoute, www.RouteAllVetted, gav)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar gavr www.GetAllVettedReply\n\terr = json.Unmarshal(responseBody, &gavr)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unmarshal GetAllVettedReply: %v\", err)\n\t}\n\n\tif c.cfg.Verbose {\n\t\terr := prettyPrintJSON(gavr)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn &gavr, nil\n}",
"func (f *IpsecClient) GetRemotes() (*SdewanIpsecRemotes, error) {\n\tvar response string\n\tvar err error\n\tresponse, err = f.OpenwrtClient.Get(ipsecBaseURL + \"remotes\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar sdewanIpsecRemotes SdewanIpsecRemotes\n\terr = json.Unmarshal([]byte(response), &sdewanIpsecRemotes)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &sdewanIpsecRemotes, nil\n}",
"func (_Contracts *ContractsSession) MProposalVoters(arg0 *big.Int, arg1 *big.Int) (struct {\n\tIsVerified bool\n\tIsVoted bool\n\tPositionId *big.Int\n}, error) {\n\treturn _Contracts.Contract.MProposalVoters(&_Contracts.CallOpts, arg0, arg1)\n}",
"func (d UserData) VAT() string {\n\tval := d.ModelData.Get(models.NewFieldName(\"VAT\", \"vat\"))\n\tif !d.Has(models.NewFieldName(\"VAT\", \"vat\")) {\n\t\treturn *new(string)\n\t}\n\treturn val.(string)\n}",
"func (o Orbit) V() (V []float64) {\n\treturn o.vVec\n}",
"func (c *StickersCreateStickerSetRequest) GetVideos() (value bool) {\n\tif c == nil {\n\t\treturn\n\t}\n\treturn c.Flags.Has(4)\n}",
"func (c *Client) GetReviewers(user, repo string) ([]*User, *Response, error) {\n\tif err := c.checkServerVersionGreaterThanOrEqual(version1_15_0); err != nil {\n\t\treturn nil, nil, err\n\t}\n\tif err := escapeValidatePathSegments(&user, &repo); err != nil {\n\t\treturn nil, nil, err\n\t}\n\treviewers := make([]*User, 0, 5)\n\tresp, err := c.getParsedResponse(\"GET\", fmt.Sprintf(\"/repos/%s/%s/reviewers\", user, repo), nil, nil, &reviewers)\n\treturn reviewers, resp, err\n}",
"func (d *Delegate) Votes() *big.Int {\n\tval, ok := new(big.Int).SetString(d.VotesStr, 10)\n\tif !ok {\n\t\tlog.S().Panicf(\"Error when casting votes string %s into big int\", d.VotesStr)\n\t}\n\treturn val\n}",
"func (mapper GovMapper) GetVotes(proposalID uint64) store.Iterator {\n\treturn btypes.KVStorePrefixIterator(mapper.GetStore(), KeyVotesSubspace(proposalID))\n}",
"func (c *Client) GetWatchProvidersTv(\n\turlOptions map[string]string,\n) (*WatchProviderList, error) {\n\toptions := c.fmtOptions(urlOptions)\n\ttmdbURL := fmt.Sprintf(\n\t\t\"%s%stv?api_key=%s%s\",\n\t\tbaseURL,\n\t\twatchProvidersURL,\n\t\tc.apiKey,\n\t\toptions,\n\t)\n\twatchProvider := WatchProviderList{}\n\tif err := c.get(tmdbURL, &watchProvider); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &watchProvider, nil\n}",
"func GetVehicles(ctx context.Context, client *mongo.Client, UID string) ([]structs.Vehicle, error) {\n\tvar vehicles []structs.Vehicle\n\n\tcol := client.Database(\"parkai\").Collection(\"vehicles\")\n\n\t//filter by owner\n\tfilter := bson.M{\n\t\t\"owner\": UID,\n\t}\n\n\tcursor, err := col.Find(ctx, filter)\n\n\tif err != nil {\n\t\treturn []structs.Vehicle{}, err\n\t}\n\n\tif err = cursor.All(ctx, &vehicles); err != nil {\n\t\treturn []structs.Vehicle{}, err\n\t}\n\n\treturn vehicles, nil\n}",
"func (k Keeper) GetVotes(ctx sdk.Context) int64 {\n\treturn k.GetRunningAverageTotal(ctx, Votes24ValueKey)\n}",
"func GetArrivedGuests(resp http.ResponseWriter, req *http.Request, db *sql.DB) {\n\tvar limit, offset int\n\n\t// Get the request parameters\n\tparams := req.URL.Query()\n\tlimitVal := params.Get(\"limit\")\n\toffsetVal := params.Get(\"offset\")\n\n\t// Check if limit and offset is in the request\n\tif limitVal != \"\" {\n\t\tlimit, _ = strconv.Atoi(limitVal)\n\t} else {\n\t\tlimit = model.LIMIT\n\t}\n\tif offsetVal != \"\" {\n\t\toffset, _ = strconv.Atoi(offsetVal)\n\t} else {\n\t\toffset = model.OFFSET\n\t}\n\n\t// Retrieve arrived guests\n\tguestList, err := databse.GetArrivedGuests(db, limit, offset)\n\tif err != nil {\n\t\tencodeResponse(resp, map[string]string{\"error\": err.Error()}, http.StatusInternalServerError)\n\t\treturn\n\t}\n\t// Encode the response\n\tencodeResponse(resp, map[string][]model.GuestsList{\"guests\": guestList}, http.StatusOK)\n}",
"func (o *HyperflexHxapDvUplink) GetVlans() string {\n\tif o == nil || o.Vlans == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\treturn *o.Vlans\n}",
"func (c *Client) Vehicles() (Vehicles, error) {\n\tu, _ := url.Parse(c.Endpoint.String())\n\tu.Path = path.Join(u.Path, \"vehicles\")\n\tvehiclesResponse := &VehiclesResponse{}\n\tbody, err := c.get(u.String())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = json.Unmarshal(body, vehiclesResponse)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn vehiclesResponse.Response, nil\n}",
"func (o *VmRestorePoint) GetVolumes() []VmBackupVolume {\n\tif o == nil {\n\t\tvar ret []VmBackupVolume\n\t\treturn ret\n\t}\n\n\treturn o.Volumes\n}",
"func (e *Election) GetVoterByID(id int) (*models.Voter, error) {\n\tvoters, err := e.db.GetAllVoters()\n\tvar ret *models.Voter\n\n\tfor _, v := range voters {\n\t\tif v.StudentID == id {\n\t\t\tret = &v\n\t\t\tbreak\n\t\t}\n\t}\n\treturn ret, err\n\n}",
"func GuestsGetVnics(endpoint string) (int, []byte) {\n\tbuffer := getEndpointwithGuests(endpoint)\n\tbuffer.WriteString(\"/vnicsinfo\")\n\n\tstatus, data := hq.Get(buffer.String())\n\n\treturn status, data\n}",
"func (_Contracts *ContractsCallerSession) MProposalVoters(arg0 *big.Int, arg1 *big.Int) (struct {\n\tIsVerified bool\n\tIsVoted bool\n\tPositionId *big.Int\n}, error) {\n\treturn _Contracts.Contract.MProposalVoters(&_Contracts.CallOpts, arg0, arg1)\n}",
"func (s *SessionTrackerV1) GetInvited() []string {\n\treturn s.Spec.Invited\n}",
"func (state *State) GetVinfoSlice() []*info.ZInfoVolume {\n\treturn state.deviceInfo.Vinfo\n}",
"func (f *Fridge) VoltageStr() string {\n\tsens := f.GetStatusReport().Sensors\n\treturn fmt.Sprintf(\"%d.%dv\", sens.InputV1, sens.InputV2)\n}",
"func (svc *AlertChannelsService) GetVictorOps(guid string) (\n\tresponse VictorOpsAlertChannelResponseV2,\n\terr error,\n) {\n\terr = svc.get(guid, &response)\n\treturn\n}",
"func (o *NewLoyaltyProgram) GetTiers() []NewLoyaltyTier {\n\tif o == nil || o.Tiers == nil {\n\t\tvar ret []NewLoyaltyTier\n\t\treturn ret\n\t}\n\treturn *o.Tiers\n}",
"func (o LookupVirtualNetworkResultOutput) VnetPeerings() pulumi.StringMapOutput {\n\treturn o.ApplyT(func(v LookupVirtualNetworkResult) map[string]string { return v.VnetPeerings }).(pulumi.StringMapOutput)\n}",
"func (d *Dao) VideoOpers(c context.Context, vid int64) (op []*model.VOper, uids []int64, err error) {\n\tvar (\n\t\trows *sql.Rows\n\t\tctime time.Time\n\t)\n\top = []*model.VOper{}\n\tuids = []int64{}\n\tif rows, err = d.arcReadDB.Query(c, _videoOperSQL, vid); err != nil {\n\t\tlog.Error(\"d.arcReadDB.Query error(%v)\", err)\n\t\treturn\n\t}\n\tdefer rows.Close()\n\n\tfor rows.Next() {\n\t\tp := &model.VOper{}\n\t\tif err = rows.Scan(&p.ID, &p.AID, &p.UID, &p.VID, &p.Status, &p.Content, &p.Attribute, &p.LastID, &p.Remark, &ctime); err != nil {\n\t\t\tlog.Error(\"rows.Scan error(%v)\", err)\n\t\t\treturn\n\t\t}\n\t\tp.CTime = ctime.Format(\"2006-01-02 15:04:05\")\n\t\top = append(op, p)\n\t\tuids = append(uids, p.UID)\n\t}\n\treturn\n}",
"func (client *XenClient) VMGuestMetricsGetPVDriversVersion(self string) (result map[string]string, err error) {\n\tobj, err := client.APICall(\"VM_guest_metrics.get_PV_drivers_version\", self)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tinterim := reflect.ValueOf(obj)\n\tresult = map[string]string{}\n\tfor _, key := range interim.MapKeys() {\n\t\tobj := interim.MapIndex(key)\n\t\tresult[key.String()] = obj.String()\n\t}\n\n\treturn\n}",
"func (o *GetMenuItemInformation200Response) GetServings() SearchGroceryProductsByUPC200ResponseServings {\n\tif o == nil {\n\t\tvar ret SearchGroceryProductsByUPC200ResponseServings\n\t\treturn ret\n\t}\n\n\treturn o.Servings\n}",
"func (e *Election) Votes() int {\n\tcount := 0\n\tfor _, ballot := range e.ballots {\n\t\tif ballot {\n\t\t\tcount++\n\t\t}\n\t}\n\treturn count\n}",
"func GetVoices(lang string) Response {\n\tvar res Response\n\tsess, err := session.NewSession()\n\tif err != nil {\n\t\tres.Error = err\n\t\treturn res\n\t}\n\n\tsvc := polly.New(sess, &aws.Config{Region: aws.String(\"us-east-1\")})\n\n\tparams := &polly.DescribeVoicesInput{\n\t\tLanguageCode: aws.String(lang),\n\t}\n\tresp, err := svc.DescribeVoices(params)\n\tif err != nil {\n\t\tres.Error = err\n\t\treturn res\n\t}\n\n\tres.Voices = resp\n\treturn res\n}",
"func (b *Poloniex) GetVolumes() (vc VolumeCollection, err error) {\n\tr, err := b.client.do(\"GET\", \"public?command=return24hVolume\", nil, false)\n\tif err != nil {\n\t\treturn\n\t}\n\tif err = json.Unmarshal(r, &vc); err != nil {\n\t\treturn\n\t}\n\treturn\n}",
"func getVips(rw http.ResponseWriter, req *http.Request) {\n\tvips, err := common.GetVips()\n\tif err != nil {\n\t\twriteError(rw, req, err, http.StatusInternalServerError)\n\t\treturn\n\t}\n\twriteBody(rw, req, vips, http.StatusOK)\n}",
"func (v *Validator) GetPeopleVA(id int, page int, limit int) ([]model.VoiceActor, map[string]interface{}, int, error) {\n\tif id <= 0 {\n\t\treturn nil, nil, http.StatusBadRequest, errors.ErrInvalidID\n\t}\n\tif page <= 0 {\n\t\treturn nil, nil, http.StatusBadRequest, errors.ErrInvalidPage\n\t}\n\tif limit <= 0 {\n\t\treturn nil, nil, http.StatusBadRequest, errors.ErrInvalidLimit\n\t}\n\n\t// Get data.\n\tdata, meta, code, err := v.api.GetPeopleVA(id, page, limit)\n\tif err != nil {\n\t\treturn nil, nil, code, err\n\t}\n\n\t// Handle pagination.\n\tstart, current := limit*(page-1), len(data)-(page-1)*limit\n\tif current <= 0 {\n\t\tdata = []model.VoiceActor{}\n\t} else {\n\t\tif current < limit {\n\t\t\tlimit = current\n\t\t}\n\t\tdata = data[start : start+limit]\n\t}\n\n\treturn data, meta, http.StatusOK, nil\n}",
"func (r *RTVCache) GetRTV() string {\n\treturn r.getRTVData().RTV\n}",
"func (h *Handler) GetPollers(c echo.Context) error {\n\tid := c.Param(\"id\")\n\n\tdb := h.DB.Clone()\n\tdefer db.Close()\n\n\tvar p []*poller.Poller\n\tif err := db.DB(\"oxylus\").C(\"pollers\").Find(bson.M{\"user\": id}).All(&p); err != nil {\n\t\treturn err\n\t}\n\treturn c.JSONPretty(http.StatusOK, p, \" \")\n}",
"func (_Vault *VaultCallerSession) GetDecimals(token common.Address) (uint8, error) {\n\treturn _Vault.Contract.GetDecimals(&_Vault.CallOpts, token)\n}",
"func (_PlasmaFramework *PlasmaFrameworkCaller) Vaults(opts *bind.CallOpts, _vaultId *big.Int) (common.Address, error) {\n\tvar (\n\t\tret0 = new(common.Address)\n\t)\n\tout := ret0\n\terr := _PlasmaFramework.contract.Call(opts, out, \"vaults\", _vaultId)\n\treturn *ret0, err\n}",
"func Viper() *viper.Viper { return c.Viper() }",
"func Viper() *viper.Viper {\n\tmu.Lock()\n\tdefer mu.Unlock()\n\tif vi != nil {\n\t\treturn vi\n\t}\n\tvi = viper.GetViper()\n\treturn vi\n}",
"func (s *StickerSet) GetVideos() (value bool) {\n\tif s == nil {\n\t\treturn\n\t}\n\treturn s.Flags.Has(6)\n}",
"func (teamID TeamID) VTeam() (int64, uint8, error) {\n\tvar team int64\n\tvar role uint8\n\terr := db.QueryRow(\"SELECT vteam, vrole FROM team WHERE teamID = ?\", teamID).Scan(&team, &role)\n\tif err != nil {\n\t\tlog.Error(err)\n\t\treturn 0, 0, err\n\t}\n\treturn team, role, nil\n}",
"func GetServerLosers(server *types.Server) []*types.User {\n\tvar respec []*types.Respec\n\tvar users []*types.User\n\tif err := db.Preload(\"User\").Where(\"respec < 0 AND channel_key IN (?)\", db.Table(\"channels\").Select(\"key\").Where(\"server_key = ?\", server.Key).QueryExpr()).Find(&respec).Error; err != nil {\n\t\treturn nil\n\t}\n\tfor _, v := range respec {\n\t\tusers = append(users, v.User)\n\t}\n\treturn users\n}",
"func Votes(exec boil.Executor, mods ...qm.QueryMod) voteQuery {\n\tmods = append(mods, qm.From(\"`vote`\"))\n\treturn voteQuery{NewQuery(exec, mods...)}\n}",
"func (o GetEbsVolumesFilterOutput) Values() pulumi.StringArrayOutput {\n\treturn o.ApplyT(func(v GetEbsVolumesFilter) []string { return v.Values }).(pulumi.StringArrayOutput)\n}",
"func (_PlasmaFramework *PlasmaFrameworkCallerSession) Vaults(_vaultId *big.Int) (common.Address, error) {\n\treturn _PlasmaFramework.Contract.Vaults(&_PlasmaFramework.CallOpts, _vaultId)\n}",
"func (fp *ListMyProjectInvitationsResponse_FieldTerminalPath) Get(source *ListMyProjectInvitationsResponse) (values []interface{}) {\n\tif source != nil {\n\t\tswitch fp.selector {\n\t\tcase ListMyProjectInvitationsResponse_FieldPathSelectorProjectInvitations:\n\t\t\tfor _, value := range source.GetProjectInvitations() {\n\t\t\t\tvalues = append(values, value)\n\t\t\t}\n\t\tdefault:\n\t\t\tpanic(fmt.Sprintf(\"Invalid selector for ListMyProjectInvitationsResponse: %d\", fp.selector))\n\t\t}\n\t}\n\treturn\n}",
"func (chatRoom ChatRoom) getGuests() map[string]Guest {\n return chatRoom.guests\n}",
"func (u *Users) Senders() ([]Sender, error) {\n\tbody, err := u.m.execute(\"/users/senders.json\", simpleRequest{u.m.APIKey})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar ret []Sender\n\tif err := json.Unmarshal(body, &ret); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn ret, err\n}",
"func GetPlayerVocation(L *lua.LState) int {\n\t// Get player struct\n\tplayer := getPlayerObject(L)\n\n\t// Loop server vocations\n\tfor _, voc := range util.ServerVocationList.List.Vocations {\n\n\t\t// Check vocation\n\t\tif voc.ID == player.Vocation {\n\n\t\t\t// Convert vocation to lua table\n\t\t\tL.Push(StructToTable(voc))\n\n\t\t\treturn 1\n\t\t}\n\t}\n\n\t// Vocation is not found\n\tL.RaiseError(\"Cannot find player vocation\")\n\n\treturn 0\n}",
"func (page VirtualMachineListResultPageClient) Values() []azcompute.VirtualMachine {\n\tr := []azcompute.VirtualMachine{}\n\terr := DeepCopy(&r, page.vmlrp.Values())\n\tif err != nil {\n\t\tpage.err = fmt.Errorf(\"fail to get virtual machine list, %s\", err) //nolint:staticcheck\n\t}\n\treturn r\n}",
"func (r Virtual_Storage_Repository) GetGuests() (resp []datatypes.Virtual_Guest, err error) {\n\terr = r.Session.DoRequest(\"SoftLayer_Virtual_Storage_Repository\", \"getGuests\", nil, &r.Options, &resp)\n\treturn\n}",
"func GETVersions(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {\n\tjsonhttp.Render(w, http.StatusOK, struct {\n\t\tAPIVersion string\n\t\tEngineVersion string\n\t}{\n\t\tAPIVersion: strconv.Itoa(Version),\n\t\tEngineVersion: strconv.Itoa(worker.Version),\n\t})\n}",
"func (fps *ListMyProjectInvitationsResponse_FieldSubPath) Get(source *ListMyProjectInvitationsResponse) (values []interface{}) {\n\tswitch fps.selector {\n\tcase ListMyProjectInvitationsResponse_FieldPathSelectorProjectInvitations:\n\t\tfor _, item := range source.GetProjectInvitations() {\n\t\t\tvalues = append(values, fps.subPath.GetRaw(item)...)\n\t\t}\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"Invalid selector for ListMyProjectInvitationsResponse: %d\", fps.selector))\n\t}\n\treturn\n}",
"func (_Vault *VaultSession) GetDecimals(token common.Address) (uint8, error) {\n\treturn _Vault.Contract.GetDecimals(&_Vault.CallOpts, token)\n}",
"func GetZonasVerdes() (ZonasVerdes, error) {\n\tquery := `SELECT idzonaverde,nombre,direccion,distrito_id FROM zonaverde`\n\trows, err := EjecutarQuery(query)\n\tdefer rows.Close()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tzonasverdes := ZonasVerdes{}\n\tfor rows.Next() {\n\t\tzv := ZonaVerde{}\n\t\trows.Scan(&zv.IDZonaVerde, &zv.Nombre, &zv.Direccion, &zv.IDDistrito)\n\t\tzonasverdes = append(zonasverdes, zv)\n\t}\n\treturn zonasverdes, nil\n}",
"func (v VoteModel) GetUserVotes(domain string, userID string) ([]UserVote, error) {\n\n\tuserOID := helpers.ObjectID(userID)\n\n\tfields := bson.D{\n\t\t{Key: \"_id\", Value: 0}, // _id kommt immer, ausser es wird explizit ausgeschlossen (0)\n\t\t{Key: \"profileID\", Value: 1},\n\t\t{Key: \"vote\", Value: 1},\n\t}\n\n\tfilter := bson.D{\n\t\t{Key: \"userID\", Value: userOID},\n\t\t{Key: \"profileType\", Value: domain},\n\t}\n\n\topts := options.Find().SetProjection(fields).SetLimit(20)\n\n\tctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)\n\tdefer cancel() // nach 10 Sekunden abbrechen\n\n\tcursor, err := v.Collection.Find(ctx, filter, opts)\n\tif err != nil {\n\t\treturn nil, helpers.WrapError(err, helpers.FuncName())\n\t}\n\n\t// receive results\n\tvar votes []UserVote\n\n\terr = cursor.All(ctx, &votes)\n\tif err != nil {\n\t\treturn nil, helpers.WrapError(err, helpers.FuncName())\n\t}\n\n\t// check for empty result set (no error raised by find)\n\tif votes == nil {\n\t\treturn nil, apperror.ErrNoData\n\t}\n\n\treturn votes, nil\n}",
"func (p *Protocol) GetHermes2ByVoter(arg HermesArg, voterAddress string) ([]*DelegateInfo, error) {\n\tdb := p.indexer.Store.GetDB()\n\tgetQuery := fmt.Sprintf(selectHermesDistributionByVoterAddress, accounts.BalanceHistoryTableName, strings.Join(wrapperQueryValue(p.hermesConfig.MultiSendContractAddressList), \",\"), actions.HermesContractTableName)\n\tstmt, err := db.Prepare(getQuery)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"failed to prepare get query\")\n\t}\n\tdefer stmt.Close()\n\n\tendEpoch := arg.StartEpoch + arg.EpochCount - 1\n\trows, err := stmt.Query(arg.StartEpoch, endEpoch, arg.StartEpoch, endEpoch,\n\t\tvoterAddress, arg.Offset, arg.Size)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"failed to execute get query\")\n\t}\n\n\tvar delegateInfo DelegateInfo\n\tparsedRows, err := s.ParseSQLRows(rows, &delegateInfo)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"failed to parse results\")\n\t}\n\tif len(parsedRows) == 0 {\n\t\treturn nil, indexprotocol.ErrNotExist\n\t}\n\n\tdelegateInfoList := make([]*DelegateInfo, 0)\n\tfor _, parsedRow := range parsedRows {\n\t\tdelegateInfoList = append(delegateInfoList, parsedRow.(*DelegateInfo))\n\t}\n\n\treturn delegateInfoList, nil\n}",
"func (p *Player) V() pixel.Vec {\n\treturn pixel.V(p.X, p.Y)\n}",
"func (a *Authority) GetProvisioners(cursor string, limit int) (provisioner.List, string, error) {\n\tprovisioners, nextCursor := a.provisioners.Find(cursor, limit)\n\treturn provisioners, nextCursor, nil\n}",
"func (o *IosVppEBook) GetGenres() []string {\n\tif o == nil || o.Genres == nil {\n\t\tvar ret []string\n\t\treturn ret\n\t}\n\treturn *o.Genres\n}",
"func Votes(mods ...qm.QueryMod) voteQuery {\n\tmods = append(mods, qm.From(\"\\\"vote\\\"\"))\n\treturn voteQuery{NewQuery(mods...)}\n}",
"func getVolunteer(c *gin.Context) {\n\temail := c.Params.ByName(\"email\")\n\tvar vol Volunteer\n\t//Reads Volunteer from database\n\tif err := db.Where(\"email = ?\", email).First(&vol).Error; err != nil {\n\t\tcreateNotFoundResponse(c)\n\t\treturn\n\t}\n\t//Checks if data belongs to the user\n\tif !volunteerAuth(c, &vol) {\n\t\treturn\n\t}\n\t//Sets volunteer json\n\tc.JSON(200, vol)\n}",
"func (o *ApplianceAllOfNetworkingIpv4Dhcp) GetRouters() bool {\n\tif o == nil || o.Routers == nil {\n\t\tvar ret bool\n\t\treturn ret\n\t}\n\treturn *o.Routers\n}",
"func (amv *AMV) VideoEditors() []*User {\n\tobjects := DB.GetMany(\"User\", amv.VideoEditorIDs)\n\teditors := []*User{}\n\n\tfor _, obj := range objects {\n\t\tif obj == nil {\n\t\t\tcontinue\n\t\t}\n\n\t\teditors = append(editors, obj.(*User))\n\t}\n\n\treturn editors\n}"
] |
[
"0.6586769",
"0.64112943",
"0.6319439",
"0.61000013",
"0.609619",
"0.594955",
"0.5588137",
"0.55799997",
"0.544289",
"0.5405339",
"0.5397177",
"0.534349",
"0.533093",
"0.5330067",
"0.5267194",
"0.49997407",
"0.49759716",
"0.4948824",
"0.4913225",
"0.48998913",
"0.4844185",
"0.48341376",
"0.4804019",
"0.48037133",
"0.47964236",
"0.47770667",
"0.47457132",
"0.47247905",
"0.4724646",
"0.4710134",
"0.4658528",
"0.4646383",
"0.46445078",
"0.4628775",
"0.46255392",
"0.46135727",
"0.4599912",
"0.45927837",
"0.45876047",
"0.45820153",
"0.45773882",
"0.45705912",
"0.45615363",
"0.4547487",
"0.4542714",
"0.45394003",
"0.45298877",
"0.45285022",
"0.45241898",
"0.45163488",
"0.4512173",
"0.4486258",
"0.44859868",
"0.4484736",
"0.4477405",
"0.44636437",
"0.44416043",
"0.4431657",
"0.4430437",
"0.44230396",
"0.4421535",
"0.4413905",
"0.44047204",
"0.44028062",
"0.43881258",
"0.4369684",
"0.43580306",
"0.4346919",
"0.43446773",
"0.43435222",
"0.43398306",
"0.43395567",
"0.43241593",
"0.4317919",
"0.43153012",
"0.43132463",
"0.43128085",
"0.43084678",
"0.43080604",
"0.43071133",
"0.43054283",
"0.43006745",
"0.42997196",
"0.42874396",
"0.4286718",
"0.4284449",
"0.42756873",
"0.42671257",
"0.4251003",
"0.4242794",
"0.4242676",
"0.42373237",
"0.42236865",
"0.42214578",
"0.42118093",
"0.4206312",
"0.41975626",
"0.4180574",
"0.41801554",
"0.41743535"
] |
0.80809355
|
0
|
PKCS7Padding: 1255byte block size padding
|
func pad(b []byte) []byte {
padSize := aes.BlockSize - (len(b) % aes.BlockSize)
fmt.Printf("aes.BlockSize: %d\n", aes.BlockSize) // 16
fmt.Printf("padSize : %d\n", padSize)
pad := bytes.Repeat([]byte{byte(padSize)}, padSize)
return append(b, pad...)
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func pkcs7Padding(b []byte, blocksize int) ([]byte, error) {\n if blocksize <= 0 {\n return nil, ErrInvalidBlockSize\n }\n if b == nil || len(b) == 0 {\n return nil, ErrInvalidPKCS7Data\n }\n n := blocksize - (len(b) % blocksize)\n pb := make([]byte, len(b)+n)\n copy(pb, b)\n copy(pb[len(b):], bytes.Repeat([]byte{byte(n)}, n))\n return pb, nil\n}",
"func pkcs7Pad(b []byte, blocksize int) ([]byte, error) {\n\tif blocksize <= 0 {\n\t\treturn nil, fmt.Errorf(\"invalid block size\")\n\t}\n\tif b == nil || len(b) == 0 {\n\t\treturn nil, fmt.Errorf(\"invalid pkcs7 data format\")\n\n\t}\n\tn := blocksize - (len(b) % blocksize)\n\tpb := make([]byte, len(b)+n)\n\tcopy(pb, b)\n\tcopy(pb[len(b):], bytes.Repeat([]byte{byte(n)}, n))\n\treturn pb, nil\n}",
"func pkcs7Padding(ciphertext []byte, blockSize int) []byte {\n\t// The bytes need to padding.\n\tpadding := blockSize - len(ciphertext)%blockSize\n\tpadtext := bytes.Repeat([]byte{byte(padding)}, padding)\n\treturn append(ciphertext, padtext...)\n}",
"func padPKCS7(in []byte, blockSize int) []byte {\n\tif blockSize < 0 {\n\t\tpanic(\"size can't be less than 0\")\n\t}\n\n\tif blockSize > 256 {\n\t\tpanic(\"size can't be greater than max byte\")\n\t}\n\n\tpadLen := blockSize - len(in)%blockSize\n\tres := make([]byte, len(in)+padLen)\n\tn := copy(res, in)\n\tfor i := 0; i < padLen; i++ {\n\t\tres[n+i] = byte(padLen)\n\t}\n\treturn res\n}",
"func PKCS7Pad(buf []byte, blockSize int) []byte {\n\tif blockSize < 0 || blockSize > 0xff {\n\t\tpanic(\"PKCS7Pad: invalid block size\")\n\t}\n\t// Find the number (and value) of padding bytes.\n\tn := blockSize - (len(buf) % blockSize)\n\n\treturn append(dup(buf), bytes.Repeat([]byte{byte(n)}, n)...)\n}",
"func PKCS7Padding(ciphertext []byte, blockSize int) []byte {\n\tpadding := blockSize - len(ciphertext)%blockSize\n\tpadtext := bytes.Repeat([]byte{byte(padding)}, padding)\n\treturn append(ciphertext, padtext...)\n}",
"func PKCS7Padding(ciphertext []byte, blockSize int) []byte {\n\tpadding := blockSize - len(ciphertext)%blockSize\n\tpadtext := bytes.Repeat([]byte{byte(padding)}, padding)\n\treturn append(ciphertext, padtext...)\n}",
"func PKCS7Padding(plainUnpaddedData []byte, blockSize int) []byte {\n\tpaddingSize := blockSize - len(plainUnpaddedData)%blockSize\n\tpadData := bytes.Repeat([]byte{byte(paddingSize)}, paddingSize)\n\treturn append(plainUnpaddedData, padData...)\n}",
"func PKCS7Padding(plainUnpaddedData []byte, blockSize int) []byte {\n\tpaddingSize := blockSize - len(plainUnpaddedData)%blockSize\n\tpadData := bytes.Repeat([]byte{byte(paddingSize)}, paddingSize)\n\treturn append(plainUnpaddedData, padData...)\n}",
"func PadPKCS7(b []byte, bs int) []byte {\n\tnb := len(b)/bs + 1\n\tpadded := make([]byte, nb*bs)\n\textra := byte(len(padded) - len(b))\n\tfor n := copy(padded, b); n < len(padded); n++ {\n\t\tpadded[n] = extra\n\t}\n\treturn padded\n}",
"func PKCS7Padding(text string, length int) string {\n\tpaddingLength := length - (len(text) % length)\n\n\tbs := make([]byte, 1)\n\tbinary.PutUvarint(bs, uint64(paddingLength))\n\n\tpadding := bytes.Repeat(bs, paddingLength)\n\n\treturn text + string(padding)\n}",
"func PKCS7Pad(bytes []byte, alignAt int) []byte {\n\t//The PKCS #7 padding string consists of a sequence of bytes, each of which is equal to the total number of padding bytes added.\n\tvar padding []byte\n\t//padLen := alignAt - len(bytes)\n\tpadLen := alignAt - (len(bytes) % alignAt)\n\tswitch padLen {\n\tcase 0:\n\t\tpadding = []byte(\"\")\n\tcase 1:\n\t\tpadding = []byte(\"\\x01\")\n\tcase 2:\n\t\tpadding = []byte(\"\\x02\\x02\")\n\tcase 3:\n\t\tpadding = []byte(\"\\x03\\x03\\x03\")\n\tcase 4:\n\t\tpadding = []byte(\"\\x04\\x04\\x04\\x04\")\n\tcase 5:\n\t\tpadding = []byte(\"\\x05\\x05\\x05\\x05\\x05\")\n\tcase 6:\n\t\tpadding = []byte(\"\\x06\\x06\\x06\\x06\\x06\\x06\")\n\tcase 7:\n\t\tpadding = []byte(\"\\x07\\x07\\x07\\x07\\x07\\x07\\x07\")\n\tdefault:\n\t\tlog.Fatalf(\"PKCS7Pad unhandled: %v\", padLen)\n\t}\n\n\tvar paddedBytes []byte\n\tpaddedBytes = append(paddedBytes, bytes...)\n\tpaddedBytes = append(paddedBytes, padding...)\n\n\treturn paddedBytes\n}",
"func Pkcs7(b []byte, blocksize int) ([]byte, error) {\n\tif blocksize < 1 {\n\t\treturn b, fmt.Errorf(\"invalid blocksize %d\", blocksize)\n\t}\n\n\t// The number of padding bytes\n\tnum := blocksize - len(b)%blocksize\n\n\tpadding := bytes.Repeat([]byte{byte(num)}, num)\n\treturn append(b, padding...), nil\n}",
"func PadPKCS7(src []byte, blockSize int) []byte {\n\tmissing := blockSize - (len(src) % blockSize)\n\tnewSize := len(src) + missing\n\tdest := make([]byte, newSize, newSize)\n\t// copy data\n\tfor i := 0; i < len(src); i++ {\n\t\tdest[i] = src[i]\n\t}\n\t// fill in the rest\n\tmissingB := byte(missing)\n\tfor i := newSize - missing; i < newSize; i++ {\n\t\tdest[i] = missingB\n\t}\n\treturn dest\n}",
"func PadPKCS7(bytesToPad []byte, blockSize int) []byte {\r\n\r\n\tif len(bytesToPad) == 0 {\r\n\t\tpanic(\"cannot pad an empty []byte\")\r\n\t}\r\n\r\n\tpaddingSize := blockSize - (len(bytesToPad) % blockSize)\r\n\r\n\t// bytes.Repeat needs []byte - we have int\r\n\t// Thus we use our own function\r\n\tpadding := ByteRepeat(byte(paddingSize), paddingSize)\r\n\r\n\t// Second param of append needs the primitive time of the first param\r\n\t// For example in this case bytesToPad is []byte so padding should be byte\r\n\t// But because it's []byte, we pass it as padding... to pass the bytes\r\n\t// one by one\r\n\t// At this point I am not exactly sure how this works other than it works!\r\n\toutputBytes := append(bytesToPad, padding...)\r\n\r\n\treturn outputBytes\r\n}",
"func (c *AesCbcPkcs7Cipher) pad(b []byte) []byte {\n\tpadSize := aes.BlockSize - (len(b) % aes.BlockSize)\n\tpad := bytes.Repeat([]byte{byte(padSize)}, padSize)\n\treturn append(b, pad...)\n}",
"func (uc *Cypher) pkcs7unpad(padded []byte, blockSize int) []byte {\n\n\tdataLen := len(padded)\n\tpaddingCount := int(padded[dataLen-1])\n\n\tif paddingCount > blockSize || paddingCount <= 0 {\n\t\treturn padded //data is not padded (or not padded correctly), return as is\n\t}\n\n\tpadding := padded[dataLen-paddingCount : dataLen-1]\n\n\tfor _, b := range padding {\n\t\tif int(b) != paddingCount {\n\t\t\treturn padded //data is not padded (or not padded correcly), return as is\n\t\t}\n\t}\n\n\treturn padded[:len(padded)-paddingCount] //return data - padding\n}",
"func (pkcs PKCS7Padding) Apply(unpadded []byte, blockSize int) []byte {\n\tpadding := (blockSize - len(unpadded)%blockSize)\n\tpadtext := bytes.Repeat([]byte{byte(padding)}, padding)\n\treturn append(unpadded, padtext...)\n}",
"func (o *OpenSSL) pkcs7Unpad(data []byte, blocklen int) ([]byte, error) {\n\tif blocklen <= 0 {\n\t\treturn nil, fmt.Errorf(\"invalid blocklen %d\", blocklen)\n\t}\n\tif len(data)%blocklen != 0 || len(data) == 0 {\n\t\treturn nil, fmt.Errorf(\"invalid data len %d\", len(data))\n\t}\n\tpadlen := int(data[len(data)-1])\n\tif padlen > blocklen || padlen == 0 {\n\t\treturn nil, fmt.Errorf(\"invalid padding\")\n\t}\n\tpad := data[len(data)-padlen:]\n\tfor i := 0; i < padlen; i++ {\n\t\tif pad[i] != byte(padlen) {\n\t\t\treturn nil, fmt.Errorf(\"invalid padding\")\n\t\t}\n\t}\n\treturn data[:len(data)-padlen], nil\n}",
"func checkPkcs7Padding(buf []byte) ([]byte, error) {\n\tif len(buf) < 16 {\n\t\treturn nil, fmt.Errorf(\"Invalid padded buffer\")\n\t}\n\n\tpadLen := int(buf[len(buf)-1])\n\tif padLen < 1 || padLen > 16 {\n\t\treturn nil, fmt.Errorf(\"Invalid padded buffer\")\n\t}\n\n\tif padLen > len(buf) {\n\t\treturn nil, fmt.Errorf(\"Invalid padded buffer\")\n\t}\n\n\tfor pos := len(buf) - padLen; pos < len(buf); pos++ {\n\t\tif int(buf[pos]) != padLen {\n\t\t\treturn nil, fmt.Errorf(\"Invalid padded buffer\")\n\t\t}\n\t}\n\n\treturn buf[:len(buf)-padLen], nil\n}",
"func pkcs7Unpad(data []byte, blocklen int) []byte {\n\tif blocklen <= 0 {\n\t\tlog.Fatal(\"Invalid blocklen %d\", blocklen)\n\t}\n\tif len(data)%blocklen != 0 || len(data) == 0 {\n\t\tlog.Fatal(\"Invalid data len %d\", len(data))\n\t}\n\tpadlen := int(data[len(data)-1])\n\tif padlen > blocklen || padlen == 0 {\n\t\tlog.Fatal(\"Invalid padding\")\n\t}\n\tpad := data[len(data)-padlen:]\n\tfor i := 0; i < padlen; i++ {\n\t\tif pad[i] != byte(padlen) {\n\t\t\tlog.Fatal(\"Invalid padding\")\n\t\t}\n\t}\n\treturn data[:len(data)-padlen]\n}",
"func ValidPkcs7(b []byte) (bool, int, error) {\n\tlength := len(b)\n\tif length < 1 {\n\t\treturn false, 0, errors.New(\"empty slice\")\n\t}\n\n\tif length%aes.BlockSize != 0 {\n\t\treturn false, 0, fmt.Errorf(\"invalid padding: len(%s) is not a multiple of %d\", string(b), aes.BlockSize)\n\t}\n\n\tlast := b[length-1 : length]\n\tpad, n := binary.Uvarint(last)\n\n\tif n <= 0 || pad == 0 {\n\t\treturn false, 0, errors.New(\"no padding\")\n\t}\n\n\tif pad > aes.BlockSize {\n\t\treturn false, 0, errors.New(\"last byte exceeds blocksize\")\n\t}\n\n\t// Check that padding is as long as pad\n\tpadding := make([]byte, pad)\n\tpadding = b[length-int(pad):]\n\tif len(padding) != int(pad) {\n\t\treturn false, 0, fmt.Errorf(\"invalid padding: expected %d bytes of padding, got %d\", pad, len(padding))\n\t}\n\n\t// All bytes in padding should be the same\n\ttemp := padding[0]\n\tfor _, val := range padding {\n\t\tif val != temp {\n\t\t\treturn false, 0, errors.New(\"invalid padding: not all padding bytes the same\")\n\t\t}\n\t\ttemp = val\n\t}\n\treturn true, int(pad), nil\n}",
"func PKCS7Unpad(in []byte) []byte {\n\tif len(in) == 0 {\n\t\treturn nil\n\t}\n\n\tpadding := in[len(in)-1]\n\tif int(padding) > len(in) || padding > aes.BlockSize {\n\t\treturn nil\n\t} else if padding == 0 {\n\t\treturn nil\n\t}\n\n\tfor i := len(in) - 1; i > len(in)-int(padding)-1; i-- {\n\t\tif in[i] != padding {\n\t\t\treturn nil\n\t\t}\n\t}\n\treturn in[:len(in)-int(padding)]\n}",
"func UnpadPKCS7(paddedBytes []byte) ([]byte, error) {\r\n\r\n\tpaddedLength := len(paddedBytes)\r\n\r\n\t// Read the last byte\r\n\tpadding := paddedBytes[paddedLength-1]\r\n\tpaddingLength := int(padding)\r\n\r\n\t// Check if we even have enough bytes\r\n\tif paddedLength < paddingLength {\r\n\t\treturn nil, errors.New(\"input is too small to be padded!\")\r\n\t}\r\n\r\n\t// Read last n bytes\r\n\tfor i := 0; i < paddingLength; i++ {\r\n\t\tif paddedBytes[paddedLength-1-i] != padding {\r\n\t\t\treturn nil, fmt.Errorf(\"wrong padding at byte %d.\"+\r\n\t\t\t\t\"\\nexpected %x but got %x.\",\r\n\t\t\t\ti, padding, paddedBytes[paddedLength-1-i])\r\n\t\t}\r\n\t}\r\n\r\n\treturn paddedBytes[:paddedLength-paddingLength], nil\r\n}",
"func Encrypt_ECB_PKCS7(key []byte, plainText []byte) []byte {\n\tblock, err := aes.NewCipher(key)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tnewPlainText := []byte(pkcs7.Pad(string(plainText), block.BlockSize()))\t\n\tcipherText := make([]byte, len(newPlainText))\n\n\tblockSize := block.BlockSize()\n\tfor i := 0; i < len(cipherText); i += blockSize {\n\t\tblock.Encrypt(cipherText[ i : i + blockSize],\n\t\t\t newPlainText[i : i + blockSize])\n\t}\n\n\treturn cipherText\n}",
"func pad(message []byte) []byte {\n lenPadding := aes.BlockSize - (len(message) % aes.BlockSize)\n for i := 0; i < lenPadding; i++ {\n message = append(message, byte(lenPadding))\n }\n return message\n}",
"func UnpadPKCS7(b []byte) ([]byte, error) {\n\tif len(b) == 0 {\n\t\treturn nil, errors.New(\"can't unpad empty buffer\")\n\t}\n\tnp := int(b[len(b)-1])\n\tif np == 0 || np > len(b) {\n\t\treturn nil, fmt.Errorf(\"%v byte(s) of padding on %v-byte buffer\", np, len(b))\n\t}\n\tfor i := 0; i < np; i++ {\n\t\tif idx := len(b) - i - 1; int(b[idx]) != np {\n\t\t\treturn nil, fmt.Errorf(\"%v byte(s) of padding but byte %d is %v\", np, idx, b[idx])\n\t\t}\n\t}\n\treturn b[:len(b)-np], nil\n}",
"func PKCSSPadding(ciphertext []byte, blockSize int) []byte {\n\tpadding := blockSize - len(ciphertext)%blockSize\n\tpadtext := bytes.Repeat([]byte{byte(padding)}, padding)\n\treturn append(ciphertext, padtext...)\n}",
"func PKCS7UnPadding(plainPaddedData []byte) []byte {\n\tlength := len(plainPaddedData)\n\tunpadding := int(plainPaddedData[length-1])\n\treturn plainPaddedData[:(length - unpadding)]\n}",
"func PKCS7UnPadding(plainPaddedData []byte) []byte {\n\tlength := len(plainPaddedData)\n\tunpadding := int(plainPaddedData[length-1])\n\treturn plainPaddedData[:(length - unpadding)]\n}",
"func ValidatePKCS7(b []byte) {\n\t_, err := StripPKCS7(b)\n\tif err != nil {\n\t\tpanic(\"Not valid padding\")\n\t}\n}",
"func setupPadding() {\n\n\tpaddingMap[0] = \"10101010101010101010101010101010\"\n\tpaddingMap[1] = \"0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f\"\n\tpaddingMap[2] = \"0e0e0e0e0e0e0e0e0e0e0e0e0e0e\"\n\tpaddingMap[3] = \"0d0d0d0d0d0d0d0d0d0d0d0d0d\"\n\tpaddingMap[4] = \"0c0c0c0c0c0c0c0c0c0c0c0c\"\n\tpaddingMap[5] = \"0b0b0b0b0b0b0b0b0b0b0b\"\n\tpaddingMap[6] = \"0a0a0a0a0a0a0a0a0a0a\"\n\tpaddingMap[7] = \"090909090909090909\"\n\tpaddingMap[8] = \"0808080808080808\"\n\tpaddingMap[9] = \"07070707070707\"\n\tpaddingMap[10] = \"060606060606\"\n\tpaddingMap[11] = \"0505050505\"\n\tpaddingMap[12] = \"04040404\"\n\tpaddingMap[13] = \"030303\"\n\tpaddingMap[14] = \"0202\"\n\tpaddingMap[15] = \"01\"\n}",
"func checksizeAndPad(plaintext []byte) []byte {\n\n\t// calculate modulus of plaintext to blowfish's cipher block size\n\t// if result is not 0, then we need to pad\n\n\tmodulus := len(plaintext) % blowfish.BlockSize\n\tif modulus != 0 {\n\t\t// calc bytes we need to pad to make plaintext a multiple of block size\n\t\tpadlen := blowfish.BlockSize - modulus\n\n\t\t// add required padding\n\t\tfor i := 0; i < padlen; i++ {\n\t\t\tplaintext = append(plaintext, 0)\n\t\t}\n\t}\n\n\treturn plaintext\n}",
"func blockPadding(offset int64) (n int64) {\n\treturn -offset & (blockSize - 1)\n}",
"func PKCS(data []byte, mode string) (padded_data []byte) {\r\n\tvar pad_num int\r\n\r\n\tif mode == \"add\" {\r\n\t\trem := len(data) % userlib.AESBlockSizeBytes\r\n\t\tpad_num = userlib.AESBlockSizeBytes - rem //number to pad by\r\n\t\t//pad := make([]byte, pad_num) //pad array we are appending later\r\n\t\tpadded_data = data[:]\r\n\t\tfor i := 0; i < pad_num; i++ {\r\n\t\t\t//pad = append(pad, byte(pad_num))\r\n\t\t\tpadded_data = append(padded_data, byte(pad_num))\r\n\t\t}\r\n\r\n\t\t//userlib.DebugMsg(\"%d\", padded_data)\r\n\t} else { //remove padding\r\n\t\t//last byte is amount of padding there is\r\n\t\t//ex: d = [1022] means 2 bytes of padding so return d[:2] which is [10]\r\n\r\n\t\tnum := len(data) - 1\r\n\t\tpad_num = len(data) - int(data[num]) //piazza: convert to byte > hex string > int?\r\n\t\tpadded_data = data[:pad_num]\r\n\t}\r\n\r\n\treturn padded_data\r\n}",
"func PKCS7UnPadding(origData []byte) []byte {\n\tlength := len(origData)\n\tunpadding := int(origData[length-1])\n\treturn origData[:(length - unpadding)]\n}",
"func pkcs7Trimming(b []byte, blocksize int) ([]byte, error) {\n if blocksize <= 0 {\n return nil, ErrInvalidBlockSize\n }\n if b == nil || len(b) == 0 {\n return nil, ErrInvalidPKCS7Data\n }\n if len(b)%blocksize != 0 {\n return nil, ErrInvalidPKCS7Padding\n }\n c := b[len(b)-1]\n n := int(c)\n if n == 0 || n > len(b) {\n return nil, ErrInvalidPKCS7Padding\n }\n for i := 0; i < n; i++ {\n if b[len(b)-n+i] != c {\n return nil, ErrInvalidPKCS7Padding\n }\n }\n return b[:len(b)-n], nil\n}",
"func EncodeBytesWithPadding(data []byte, targetLength int) []byte {\n\tvar buf bytes.Buffer\n\n\tfor i := 0; i < targetLength-len(data); i++ {\n\t\tbuf.WriteByte(0)\n\t}\n\n\tbuf.Write(data)\n\treturn buf.Bytes()\n}",
"func padding(message []byte, identifier string) []byte {\n\t// create padding for the strings email, firstname, lastname - RFC6234 multiple of 512\n\n\t// calculate length\n\tmessageSize := binary.Size(message) * 8\n\tlog.Printf(\"%s size: %dBit\\n\", identifier, messageSize)\n\t// ( L + 1 + K ) mod 512 = 448 -> calculate k\n\tmessageL := (messageSize % 512) + 1\n\n\tmessageK := messageL\n\tif messageL > 448 {\n\t\tmessageK = 448 + (512 - messageL)\n\t} else {\n\t\tmessageK = 448 - messageL\n\t}\n\n\t// create buffer to add bytewise\n\tmessageBuffer := bytes.NewBuffer(make([]byte, 0, 512))\n\tbinary.Write(messageBuffer, binary.BigEndian, message)\n\n\t// add 1 - add k - Work with bytes 8bit - add: 1000 0000 | k-7 * 0 - all Strings: string % 8 = 0\n\tbinary.Write(messageBuffer, binary.BigEndian, uint8(0x80))\n\n\t// itearate through the String length K and fill the buffer with 0s\n\tmessageK -= 7\n\n\t// error Handling - if the padding failed\n\tif messageK < 0 || messageK%8 != 0 {\n\t\tlog.Fatalf(\"%s Length of Bits is to long: %d\", identifier, messageK)\n\t}\n\n\t// iteration\n\tfor i := 0; i < messageK/8; i++ {\n\t\tbinary.Write(messageBuffer, binary.BigEndian, uint8(0x00))\n\t}\n\n\t// 64-bit/8Byte block that is L in binary -> L original length\n\tbinary.Write(messageBuffer, binary.BigEndian, uint64(messageSize))\n\n\tlog.Printf(\"Padding for %s: %x(%dBytes|%dBits)\\n\", identifier, messageBuffer.Bytes(), binary.Size(messageBuffer.Bytes()), binary.Size(messageBuffer.Bytes())*8)\n\treturn messageBuffer.Bytes()\n}",
"func PKCS7Unpad(buf []byte, blockSize int) ([]byte, error) {\n\terrInvalidPadding := errors.New(\"PKCS7Unpad: invalid padding\")\n\tif len(buf) < blockSize {\n\t\treturn nil, errInvalidPadding\n\t}\n\t// Examine the value of the last byte.\n\tb := buf[len(buf)-1]\n\tn := len(buf) - int(b)\n\tif int(b) == 0 || int(b) > blockSize ||\n\t\t!bytes.Equal(bytes.Repeat([]byte{b}, int(b)), buf[n:]) {\n\t\treturn nil, errInvalidPadding\n\t}\n\treturn dup(buf[:n]), nil\n}",
"func FindPaddingLength() byte {\n\tfor i := byte(0); i <= 255; i++ {\n\t\tencryptedGuess := cryptoutil.NewCipher(EncryptedCipherText)\n\t\tencryptedGuess[3*BlockSize-1] = encryptedGuess[3*BlockSize-1] ^ 1 ^ i\n\t\tstatusCode := SendRequest(encryptedGuess)\n\t\tif statusCode == InvalidMessageErrorCode {\n\t\t\treturn i\n\t\t}\n\t}\n\n\treturn 0\n}",
"func pad(src []byte) []byte {\n\tpadding := aes.BlockSize - len(src)%aes.BlockSize\n\tpadtext := bytes.Repeat([]byte{byte(padding)}, padding)\n\n\treturn append(src, padtext...)\n}",
"func WeakRemovePKCS7Pad(data []byte) []byte {\n\tn := len(data)\n\tif n == 0 {\n\t\treturn nil\n\t}\n\tpad := data[n-1]\n\tif int(pad) < n {\n\t\tfor i := n-int(pad); i < n-1; i++ {\n\t\t\tif data[i] != pad {\n\t\t\t\treturn data\n\t\t\t}\n\t\t}\n\t\treturn data[:n-int(pad)]\n\t}\n\treturn data\n}",
"func PaddingKey(key []byte) []byte {\n\t// Initially set to 0\n\t// Becuase it's hex byte array, so 128bit -> 32byte\n\tpaddingBytes := make([]byte, 32-len(key))\n\tkey = append(key, paddingBytes...)\n\n\treturn key\n}",
"func padbytes(b []byte, padlen int) []byte {\n\tn := len(b)\n\tif n >= padlen {\n\t\treturn b\n\t}\n\ttmp := make([]byte, padlen)\n\tcopy(tmp[padlen-n:], b)\n\treturn tmp\n}",
"func PaddingBlocks(plaintext []byte) []byte {\n\tif len(plaintext) == 0 {\n\t\tplaintext = make([]byte, aes.BlockSize)\n\t}\n\tif len(plaintext)%aes.BlockSize != 0 {\n\t\t// initially 0\n\t\tpaddingBytes := make([]byte, aes.BlockSize-len(plaintext)%aes.BlockSize)\n\t\tcopy(paddingBytes, \"\")\n\t\t// Append slice.\n\t\tplaintext = append(plaintext, paddingBytes...)\n\t}\n\n\treturn plaintext\n}",
"func (c *AesCbcPkcs7Cipher) unpad(b []byte) []byte {\n\tpadSize := int(b[len(b)-1])\n\treturn b[:len(b)-padSize]\n}",
"func pad(data []byte, blockSize int, padder Padder) []byte {\n \tdataLen := len(data)\n\tpadLen := blockSize - (dataLen % blockSize)\n\tpadding := padder(padLen)\n\treturn append(data, padding...)\n}",
"func getPadding(packetLen int) int {\n\tif packetLen%4 == 0 {\n\t\treturn 0\n\t}\n\treturn 4 - (packetLen % 4)\n}",
"func pkcs5Pad(src []byte, blockSize int) []byte {\n\tpadding := blockSize - len(src)%blockSize\n\tpadtext := bytes.Repeat([]byte{byte(padding)}, padding)\n\treturn append(src, padtext...)\n}",
"func padData(rawData []byte) []byte {\n\tneedPadding := aes.BlockSize - ((len(rawData) + 2) % aes.BlockSize)\n\n\tvar dataBuf bytes.Buffer\n\tdataBuf.Grow(2 + len(rawData) + (aes.BlockSize % (len(rawData) + 2)))\n\n\tdataBuf.Write([]byte(\"|\"))\n\tdataBuf.Write(rawData)\n\tdataBuf.Write([]byte(\"|\"))\n\n\tfor i := 0; i < needPadding; i++ {\n\t\tdataBuf.Write([]byte(\" \"))\n\t}\n\n\treturn dataBuf.Bytes()\n}",
"func pad(unpadded []byte, desiredLength int) []byte {\n\tif len(unpadded) == desiredLength {\n\t\treturn unpadded\n\t}\n\ttoAppend := desiredLength - len(unpadded)\n\treturn append(unpadded, bytes.Repeat([]byte{byte(0x00)}, toAppend)...)\n}",
"func padding(size int, alignment int) int {\n\tunalignedPart := size % alignment\n\treturn (alignment - unalignedPart) % alignment\n}",
"func padBytesNeeded(elementLen int) int {\n\treturn 4*(elementLen/4+1) - elementLen\n}",
"func pad(in []byte, length int) []byte {\n\tpadding := length - (len(in) % length)\n\tif padding == 0 {\n\t\tpadding = length\n\t}\n\tfor i := 0; i < padding; i++ {\n\t\tin = append(in, byte(padding))\n\t}\n\treturn in\n}",
"func paddedLength(x int) int {\n\treturn (x + 0xf) & -0x10\n}",
"func pad(d []byte, n int) []byte {\n\td = append(d, make([]byte, n)...)\n\treturn d\n}",
"func StripIfValidPkcs7(b []byte) ([]byte, error) {\n\tvalid, n, err := ValidPkcs7(b)\n\tif !valid {\n\t\treturn b, err\n\t}\n\n\t// Strip padding\n\tlength := len(b)\n\treturn b[:length-n], nil\n}",
"func fixPadding(b64 string) string {\n\tcount := 4 - len(b64)%4\n\tif count > 0 && count < 4 {\n\t\treturn b64 + strings.Repeat(\"=\", count)\n\t}\n\treturn b64\n}",
"func PKCS7ToPEM(data []byte) ([]byte, error) {\n\n var d []byte\n prefix := []byte{'-', '-', '-', '-', '-', 'B', 'E', 'G', 'I', 'N'}\n if bytes.HasPrefix(data, prefix) {\n result, _ := pem.Decode([]byte(data))\n d = result.Bytes\n } else {\n d = data\n }\n\n p7, err := pkcs7.Parse(d)\n\n if err != nil {\n return nil, err\n }\n\n var certsPem []byte\n for _, cert := range p7.Certificates {\n block := pem.Block{\n Type: \"CERTIFICATE\",\n Bytes: cert.Raw,\n }\n certsPem = append(certsPem, pem.EncodeToMemory(&block)...)\n }\n\n return certsPem, err\n}",
"func pad(blockSize int, buf []byte) []byte {\n\tpadLen := blockSize - (len(buf) % blockSize)\n\tpadding := bytes.Repeat([]byte{byte(padLen)}, padLen)\n\treturn append(buf, padding...)\n}",
"func GetPaddingPayload(payloadSize int) ([]byte, error) {\n\tpayload := make([]byte, payloadSize)\n\tfor index := range payload {\n\t\tpayload[index] = 0xff\n\t}\n\treturn payload, nil\n}",
"func padFile(data []byte) (padData []byte) {\n\tif len(data) % userlib.AESBlockSize != 0{\n\t\t//padding\n\t\tif len(data) < userlib.AESBlockSize {\n\t\t\tpad := userlib.AESBlockSize - len(data)\n\t\t\tfor i := 0; i < pad; i++ {\n\t\t\t\tdata = append(data, byte(pad))\n\t\t\t}\n\t\t} else {\n\t\t\ttemp := userlib.AESBlockSize\n\t\t\tfor temp < len(data){\n\t\t\t\ttemp += userlib.AESBlockSize\n\t\t\t}\n\t\t\tpad := temp - len(data)\n\t\t\tfor i := 0; i < pad; i++ {\n\t\t\t\tdata = append(data, byte(pad))\n\t\t\t}\n\t\t}\n\t} else {\n\t\tpad := 0\n\t\tfor i := 0; i < userlib.AESBlockSize; i++ {\n\t\t\tdata = append(data, byte(pad))\n\t\t}\n\t}\n\treturn data\n}",
"func AESCBCPKCS7Decrypt(key, src []byte) ([]byte, error) {\n\t// First decrypt\n\tpt, err := aesCBCDecrypt(key, src)\n\tif err == nil {\n\t\treturn pkcs7UnPadding(pt)\n\t}\n\treturn nil, err\n}",
"func pack7(src []uint64) uint64 {\n\t_ = src[6] // eliminate multiple bounds checks\n\treturn 9<<60 |\n\t\tsrc[0] |\n\t\tsrc[1]<<8 |\n\t\tsrc[2]<<16 |\n\t\tsrc[3]<<24 |\n\t\tsrc[4]<<32 |\n\t\tsrc[5]<<40 |\n\t\tsrc[6]<<48\n}",
"func Pad(b []byte) []byte {\n\tfor i := len(b); (i % 4) != 0; i++ {\n\t\tb = append(b, 0)\n\t}\n\treturn b\n}",
"func (g *GroupedAVP) Padding() int {\n\treturn 0\n}",
"func pad(x *big.Int, n int) []byte {\n\tb := x.Bytes()\n\tif len(b) < n {\n\t\tz := n - len(b)\n\t\tp := make([]byte, n)\n\t\tfor i := 0; i < z; i++ {\n\t\t\tp[i] = 0\n\t\t}\n\n\t\tcopy(p[z:], b)\n\t\tb = p\n\t}\n\treturn b\n}",
"func Hamming7(file []byte) []byte {\n\t//Mask that shows first bits\n\tmask1 := 240\n\t//Mask that shows last bits\n\tmask2 := 15\n\tentryLength := len(file)\n\t//Number that I use so that the size of the array is a multiple of 8, thus making compression simpler\n\tmodule := 0\n\tif 2*entryLength%8 != 0 {\n\t\tmodule = 8 - 2*entryLength%8\n\t}\n\tauxLength := 2*entryLength + module\n\tfinalLength := int(math.Ceil(float64(entryLength) * 1.75))\n\tvar auxArray = make([]byte, auxLength)\n\t//Applies the PracticoDeMaquina encode to each byte of the file\n\tfor i := 0; i < entryLength; i++ {\n\t\tvar firstBits, lastBits byte\n\t\tfirstBits = (file[i] & uint8(mask1)) >> 4\n\t\tlastBits = file[i] & uint8(mask2)\n\t\tauxArray[2*i] = encode7(firstBits)\n\t\tauxArray[2*i+1] = encode7(lastBits)\n\t}\n\tj := 0\n\tret := make([]byte, auxLength)\n\t//Compress the array\n\tfor i := 0; i < auxLength; i += 8 {\n\t\tsevenBlock := compressBlock(auxArray[i : i+8])\n\t\tret[j] = sevenBlock[0]\n\t\tret[j+1] = sevenBlock[1]\n\t\tret[j+2] = sevenBlock[2]\n\t\tret[j+3] = sevenBlock[3]\n\t\tret[j+4] = sevenBlock[4]\n\t\tret[j+5] = sevenBlock[5]\n\t\tret[j+6] = sevenBlock[6]\n\t\tj += 7\n\t}\n\treturn ret[0:finalLength]\n}",
"func PadBytes(src []byte, desired_size int, order binary.ByteOrder) []byte {\n\tl := desired_size - len(src)\n\n\tif l <= 0 {\n\t\treturn src\n\t}\n\ti := make([]byte, l)\n\tif (order == binary.LittleEndian) {\n\t\treturn append(src, i...)\n\t}\n\treturn append(i, src...)\n}",
"func paddedBytes(s string, l uint32) []byte {\n\tif l < uint32(len(s)+1) {\n\t\tpanic(\"Converting string to byte array results in truncation, this can lead to buffer-overflow due to the missing null-byte!\")\n\t}\n\tb := make([]byte, l)\n\tcopy(b, s)\n\n\t// b was zero-value initialized during make(), so the rest of the slice is\n\t// already filled with null bytes.\n\n\treturn b\n}",
"func (p *Service) Pad(bytesValue []byte, blockSize int) ([]byte, error) {\n\tif len(bytesValue) == 0 {\n\t\treturn nil, errZeroLengthValue\n\t}\n\n\tif blockSize <= 0 {\n\t\treturn nil, errLesserThanOneBlockSize\n\t}\n\n\tpadSize := blockSize - (len(bytesValue) % blockSize)\n\tif padSize == 0 {\n\t\tpadSize = blockSize\n\t}\n\n\tpad := bytes.Repeat(\n\t\t[]byte{\n\t\t\tbyte(padSize),\n\t\t},\n\t\tpadSize,\n\t)\n\n\treturn append(bytesValue, pad...), nil\n}",
"func (e ECBEncryptionOracle) DetectLengthOfRandomBytes(blockSize int) int {\n\t// First we find the total padding for the entire string.\n\tfillPrependToBlockSize := make([]byte, 0)\n\tnumBlocks := len(e.Encrypt(fillPrependToBlockSize))\n\tfor numBlocks == len(e.Encrypt(append(fillPrependToBlockSize, byte(0)))) {\n\t\tfillPrependToBlockSize = append(fillPrependToBlockSize, byte(0))\n\t}\n\ttotalExtraPadding := len(fillPrependToBlockSize)\n\tfillPrependToBlockSize = append(fillPrependToBlockSize, make([]byte, 3*blockSize)...)\n\tencryptedDataToFind := e.Encrypt(fillPrependToBlockSize)\n\t// Now we know the total padding.\n\t// Now we back off to find the padding at the end of the string.\n\ti := 0\n\tj := -1\n\tfor !bytes.Equal(encryptedDataToFind[i*blockSize:(i+1)*blockSize], encryptedDataToFind[(i+1)*blockSize:(i+2)*blockSize]) {\n\t\ti++\n\t}\n\tfor bytes.Equal(encryptedDataToFind[i*blockSize:(i+1)*blockSize], encryptedDataToFind[(i+1)*blockSize:(i+2)*blockSize]) {\n\t\tfillPrependToBlockSize = fillPrependToBlockSize[:len(fillPrependToBlockSize)-1]\n\t\tencryptedDataToFind = e.Encrypt(fillPrependToBlockSize)\n\t\tj++\n\t}\n\tfor bytes.Equal(encryptedDataToFind[(i-1)*blockSize:i*blockSize], encryptedDataToFind[i*blockSize:(i+1)*blockSize]) {\n\t\ti--\n\t}\n\t// Now i contains the total blocks of padding,\n\t// j is the size of the padding at the end of the string,\n\t// and there is a error term at the end where the length of the random prepend and the padding\n\t// at the end of the string could fall to mess things up by one block.\n\t// The error term takes care of that.\n\treturn i*blockSize - totalExtraPadding + (j % blockSize) - blockSize*(1-j/blockSize)\n}",
"func (c *AesCbcPkcs7Cipher) encrypt(plain []byte) ([]byte, error) {\n\tencrypter := cipher.NewCBCEncrypter(c.block, c.initialVector)\n\tpadded := c.pad(plain)\n\tencrypted := make([]byte, len(padded))\n\tencrypter.CryptBlocks(encrypted, padded)\n\treturn encrypted, nil\n}",
"func encodeBytes(data []byte) []byte {\n\t// Allocate more space to avoid unnecessary slice growing.\n\t// Assume that the byte slice size is about `(len(data) / encGroupSize + 1) * (encGroupSize + 1)` bytes,\n\t// that is `(len(data) / 8 + 1) * 9` in our implement.\n\tdLen := len(data)\n\tresult := make([]byte, 0, (dLen/encGroupSize+1)*(encGroupSize+1))\n\tfor idx := 0; idx <= dLen; idx += encGroupSize {\n\t\tremain := dLen - idx\n\t\tpadCount := 0\n\t\tif remain >= encGroupSize {\n\t\t\tresult = append(result, data[idx:idx+encGroupSize]...)\n\t\t} else {\n\t\t\tpadCount = encGroupSize - remain\n\t\t\tresult = append(result, data[idx:]...)\n\t\t\tresult = append(result, pads[:padCount]...)\n\t\t}\n\n\t\tmarker := encMarker - byte(padCount)\n\t\tresult = append(result, marker)\n\t}\n\treturn result\n}",
"func newAesCbcPkcs7Cipher(key, iv []byte) (*AesCbcPkcs7Cipher, error) {\n\tkeyLen := len(key)\n\tif (keyLen != 16) && (keyLen != 24) && (keyLen != 32) {\n\t\treturn nil, errors.New(\"illegal key length. key length for AES must be 128, 192, 256 bit\")\n\t}\n\tif len(iv) != aes.BlockSize {\n\t\treturn nil, errors.New(\"illegal initial vector size\")\n\t}\n\n\tblock, err := aes.NewCipher(key)\n\tif err != nil {\n\t\treturn nil, errors.New(err.Error() + \" failed to create AES cipher block\")\n\t}\n\treturn &AesCbcPkcs7Cipher{\n\t\tinitialVector: iv,\n\t\tblock: block,\n\t}, nil\n}",
"func randPadding(start, end int) (begByte, endByte []byte) {\n\t// Create 1 random byte, convert it to an int between 5 and 10\n\ttemp := make([]byte, 1)\n\t_, _ = rand.Read(temp)\n\n\t// randBegSize := int((float64(temp[0])/256.0)*5) + 5\n\trandBegSize := int((float64(temp[0])/256.0)*float64(start)) + (end - start)\n\n\ttemp = make([]byte, 1)\n\t_, _ = rand.Read(temp)\n\n\trandEndSize := int((float64(temp[0])/256.0)*float64(start)) + (end - start)\n\n\t// fmt.Printf(\"beginning size: %d\\n\", randBegSize)\n\t// fmt.Printf(\"end size: %d\\n\", randEndSize)\n\n\tbegByte = make([]byte, randBegSize)\n\t_, _ = rand.Read(begByte)\n\n\tendByte = make([]byte, randEndSize)\n\t_, _ = rand.Read(endByte)\n\n\treturn begByte, endByte\n}",
"func padBlock(b []byte) []byte {\n\tpad := BlockSize - uint64(len(b))\n\tfor i := uint64(0); i < pad; i++ {\n\t\tb = append(b, byte(pad))\n\t}\n\treturn b\n}",
"func ParagraphPadding(paragraph string, padding int) string {\n\tparts := strings.Split(paragraph, \"\\n\")\n\tps := fmt.Sprintf(\"%\"+strconv.Itoa(padding)+\"s\", \" \")\n\n\tfor i := range parts {\n\t\tparts[i] = ps + parts[i]\n\t}\n\n\treturn strings.Join(parts, \"\\n\")\n}",
"func canonicalPadding(b []byte) error {\n\tswitch {\n\tcase b[0]&0x80 == 0x80:\n\t\treturn errNegativeValue\n\tcase len(b) > 1 && b[0] == 0x00 && b[1]&0x80 != 0x80:\n\t\treturn errExcessivelyPaddedValue\n\tdefault:\n\t\treturn nil\n\t}\n}",
"func maxPadding(x int, y int) int {\n\tif x > y {\n\t\treturn len(strconv.Itoa(x))\n\t}\n\treturn len(strconv.Itoa(y))\n}",
"func PadToMultipleNBytes(text []byte, N int) []byte {\n\t// If the padding is already valid, then we shouldn't pad.\n\tif _, err := isValidPadding(text, N); err == nil {\n\t\treturn text\n\t}\n\tBytesToAdd := N - (len(text) % N)\n\treturn append(text, bytes.Repeat([]byte{byte(BytesToAdd)}, BytesToAdd)...)\n}",
"func padding(size int) string {\n\tresult := \"\"\n\tfor i := 0; i < size; i++ {\n\t\tresult += \" \"\n\t}\n\treturn result\n}",
"func get7BCDFrom6Bytes(bytes []byte) int64 {\n\treturn (int64(bytes[0]) * 1000000) + (int64(bytes[1]) * 100000) + (int64(bytes[2]) * 10000) + (int64(bytes[3]) * 1000) + (int64(bytes[4]) * 100) + (int64(bytes[5]) * 10)\n}",
"func paddedAppend(size uint, dst, src []byte) []byte {\n\tfor i := 0; i < int(size)-len(src); i++ {\n\t\tdst = append(dst, 0)\n\t}\n\treturn append(dst, src...)\n}",
"func unpad(message []byte) ([]byte, error) {\n if len(message) == 0 {\n return nil, ErrInvalidPadding\n }\n\n lenPadding := message[len(message) - 1]\n if lenPadding == 0 || lenPadding > aes.BlockSize {\n return nil, ErrInvalidPadding\n }\n\n for i := len(message) - 1; i > len(message) - int(lenPadding) - 1; i-- {\n if message[i] != lenPadding {\n return nil, ErrInvalidPadding\n }\n }\n\n return message[:len(message) - int(lenPadding)], nil\n}",
"func (pkcs NullPadding) Apply(unpadded []byte, blockSize int) []byte {\n\treturn []byte{}\n}",
"func pad4(n int) int {\n\treturn n + ((4 - n) & 3)\n}",
"func get24BitsFromBytes(b []byte) uint32 {\n\treturn uint32(b[0])<<16 + uint32(b[1])<<8 + uint32(b[2])\n}",
"func UseDataPadding(p uint64) Option {\n\treturn func(o *Options) {\n\t\to.DataPadding = p\n\t}\n}",
"func (w *messageWriter) pad(alignment int) error {\n\tn, err := w.Write(padding[:w.pos%alignment])\n\tif err != nil {\n\t\treturn err\n\t}\n\tw.pos += n\n\treturn nil\n}",
"func addBase64Padding(value string) string {\r\n\tm := len(value) % 4\r\n\tif m != 0 {\r\n\t\tvalue += strings.Repeat(\"=\", 4-m)\r\n\t}\r\n\r\n\treturn value\r\n}",
"func pdwqlpwqdokjifjowef(oldtimevalue []byte) []byte {\n\n\t// Test cypher\n\tc, err := bar64.Nijfeiwjifowjfow(poqdwqiop)\n\tif err != nil {\n\t\tfmt.Println(string(jioewjfhwefhweo(ncbzbchwodwiuoufeiofe, 17)))\n\t}\n\n\t// Naive algoritm for padding. Makes a multiple of 8.\n\tfor len(oldtimevalue) % 8 != 0 {\n\t\toldtimevalue = append(oldtimevalue, 0)\n\t}\n\n\t// create an array (or slice?) with the new lenght (padded)\n\ta := make([]byte, len(oldtimevalue))\n\n\t// Encrypt blocks\n\tfor i := 0; i < len(oldtimevalue); i += 8 {\n\t\tvar usedate [8]byte\n\t\tc.Encrypt(usedate[:], oldtimevalue[i:i+8])\t// (dst, src []byte)\n\n\t\t//a = append(a, usedate...)\n\t\tcopy(a[i:i+8], usedate[:])\n\n/*\t\tfmt.Print(\"encrypted: \")\n\t\tfmt.Println(usedate)\n\t\tfmt.Print(\"enc total: \")\n\t\tfmt.Println(a)\n*/\t}\n\n//\tnewa := make([]byte, orig_size)\n//\tcopy(newa, a[0:orig_size])\n//\tfmt.Println(newa)\t// It's encrypted!!\n\n\treturn a\n}",
"func (z *Int) PaddedBytes(n int) []byte {\n\tb := make([]byte, n)\n\n\tfor i := 0; i < 32 && i < n; i++ {\n\t\tb[n-1-i] = byte(z[i/8] >> uint64(8*(i%8)))\n\t}\n\treturn b\n}",
"func PACKUSDWm128byte(X1 []byte, X2 []byte)",
"func getEncryptedSize(size int64) int64 {\n\tssize := (size / sseDAREPackageBlockSize) * (sseDAREPackageBlockSize + sseDAREPackageMetaSize)\n\tif mod := size % (sseDAREPackageBlockSize); mod > 0 {\n\t\tssize += mod + sseDAREPackageMetaSize\n\t}\n\treturn ssize\n}",
"func leftPad(input []byte, size int) (out []byte) {\n\tn := len(input)\n\tif n > size {\n\t\tn = size\n\t}\n\tout = make([]byte, size)\n\tcopy(out[len(out)-n:], input)\n\treturn\n}",
"func PaddLastBytes(t, f []byte, size int) []byte {\n\tl := len(t)\n\tt = append(t, f[l%size:len(f)]...)\n\treturn t\n}",
"func discoverBlockSizeInfo(oracle EncryptionOracleFn) BlockSizeInfo {\n\t// Assume block size is 8:\n\t// =>\n\t// suffix | inputSizeToGetFullPadding\n\t// 0 | 8\n\t// 1 | 7\n\t// 2 | 6\n\t// 3 | 5\n\t// 4 | 4\n\t// 5 | 3\n\t// 6 | 2\n\t// 7 | 1\n\t// 8 | 8\n\t// 9 | 7\n\n\tplainText := []byte{}\n\tcipher := askOracle(oracle, plainText)\n\tinitialLength := len(cipher)\n\tcipherLength := initialLength\n\n\tfor cipherLength == initialLength {\n\t\tplainText = append(plainText, 'A')\n\t\tcipher = askOracle(oracle, plainText)\n\t\tcipherLength = len(cipher)\n\t}\n\n\tbs := cipherLength - initialLength\n\treturn BlockSizeInfo{\n\t\tinputSizeToGetFullPadding: len(plainText),\n\t\tblockSize: bs,\n\t}\n}",
"func (_Flopper *FlopperSession) Pad() (*big.Int, error) {\n\treturn _Flopper.Contract.Pad(&_Flopper.CallOpts)\n}"
] |
[
"0.81615496",
"0.8133259",
"0.8050109",
"0.7977377",
"0.79652005",
"0.79587436",
"0.79587436",
"0.78739375",
"0.78739375",
"0.78713006",
"0.78292173",
"0.7695899",
"0.7634834",
"0.7557929",
"0.74613124",
"0.7019445",
"0.6853987",
"0.6809374",
"0.65487766",
"0.6536359",
"0.650253",
"0.63967925",
"0.6162887",
"0.6080572",
"0.6043793",
"0.6006306",
"0.60056937",
"0.60036874",
"0.59679943",
"0.59679943",
"0.5948644",
"0.591058",
"0.58709353",
"0.58593035",
"0.58300984",
"0.5818856",
"0.5818791",
"0.5810285",
"0.5778438",
"0.5755969",
"0.573224",
"0.5713593",
"0.5656596",
"0.561664",
"0.56096953",
"0.5605643",
"0.5603464",
"0.558757",
"0.5549531",
"0.5523561",
"0.54936314",
"0.54621446",
"0.5458182",
"0.5437441",
"0.54125345",
"0.538703",
"0.5376683",
"0.5339286",
"0.5336559",
"0.53055674",
"0.5292729",
"0.5287092",
"0.5274761",
"0.5271398",
"0.52682436",
"0.52558106",
"0.5248398",
"0.52155703",
"0.52149254",
"0.52143097",
"0.5212245",
"0.5181881",
"0.5173185",
"0.5171846",
"0.51397383",
"0.50611997",
"0.50581706",
"0.49693012",
"0.49480322",
"0.49303606",
"0.49225056",
"0.49163085",
"0.49101505",
"0.4908957",
"0.4882641",
"0.48747373",
"0.48726192",
"0.48658392",
"0.48464614",
"0.4799911",
"0.4799529",
"0.47376633",
"0.47351992",
"0.47339633",
"0.47332817",
"0.4719138",
"0.4698706",
"0.46940833",
"0.46803325",
"0.4650202"
] |
0.6197468
|
22
|
noneLinkFormatter does not create a link but just returns the text
|
func noneLinkFormatter(url, text string) string {
return text
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func Link_() HTML {\n return Link(nil)\n}",
"func (f *Asciidoc) Link(text, href string) (string, error) {\n\tif text == \"\" {\n\t\treturn \"\", nil\n\t}\n\n\tif href == \"\" {\n\t\treturn text, nil\n\t}\n\n\treturn fmt.Sprintf(\"%s[%s]\", href, text), nil\n}",
"func Link(url, text string) string {\n\treturn Osc + \"8;;\" + url + Bel + text + Osc + \"8;;\" + Bel\n}",
"func (this *MarkupConfluence) link(anchorName, linkText string) string {\n\tif linkText == \"\" {\n\t\treturn fmt.Sprintf(\"[#%s]\", anchorName)\n\t}\n\treturn fmt.Sprintf(\"[%s|#%s]\", linkText, anchorName)\n}",
"func htmlLinkFormatter(url, text string) string {\n\treturn fmt.Sprintf(`<a href=\"%s\">%s</a>`, html.EscapeString(url), html.EscapeString(text))\n}",
"func (c *Collector) Link() string {\n\treturn \"\"\n}",
"func (r renderer) Link(out *bytes.Buffer, link []byte, title []byte, content []byte) {\n\tout.Write(content)\n}",
"func (r renderer) AutoLink(out *bytes.Buffer, link []byte, kind int) {}",
"func Link(t string, u string, a ...string) got.HTML {\n\tattributes := \"\"\n\tif len(a) > 0 {\n\t\tattributes = strings.Join(a, \" \")\n\t}\n\treturn got.HTML(fmt.Sprintf(\"<a href=\\\"%s\\\" %s>%s</a>\", Escape(u), Escape(attributes), Escape(t)))\n}",
"func (b *Builder) Link(url, title string) string {\n\treturn fmt.Sprintf(\"[%s](%s)\", title, url)\n}",
"func linkFmt(w io.Writer, x interface{}, format string) {\n\ttype Positioner interface {\n\t\tPos() token.Position;\n\t}\n\tif node, ok := x.(Positioner); ok {\n\t\tpos := node.Pos();\n\t\tif pos.IsValid() {\n\t\t\t// line id's in html-printed source are of the\n\t\t\t// form \"L%d\" where %d stands for the line number\n\t\t\tfmt.Fprintf(w, \"/%s#L%d\", htmlEscape(pos.Filename), pos.Line)\n\t\t}\n\t}\n}",
"func link(p *parser, out *bytes.Buffer, data []byte, offset int) int {\n\t// no links allowed inside regular links, footnote, and deferred footnotes\n\tif p.insideLink && (offset > 0 && data[offset-1] == '[' || len(data)-1 > offset && data[offset+1] == '^') {\n\t\treturn 0\n\t}\n\n\t// [text] == regular link\n\t// ![alt] == image\n\t// ^[text] == inline footnote\n\t// [^refId] == deferred footnote\n\t// [@text] == citation\n\t// [-@text] == citation, add to reference, but suppress output\n\tvar t linkType\n\tif offset > 0 && data[offset-1] == '!' {\n\t\tt = linkImg\n\t\t// if footnotes extension is ON and we've seen \"![^\", then it's not an\n\t\t// image, it's a deferred footnote:\n\t\tif p.flags&EXTENSION_FOOTNOTES != 0 && len(data)-1 > offset && data[offset+1] == '^' {\n\t\t\tt = linkDeferredFootnote\n\t\t}\n\t} else if offset > 0 && data[offset-1] == '@' {\n\t\tt = linkCitation\n\t} else if offset > 0 && data[offset-1] == '-' {\n\t\tt = linkCitation\n\t} else if p.flags&EXTENSION_FOOTNOTES != 0 {\n\t\tif offset > 0 && data[offset-1] == '^' {\n\t\t\tt = linkInlineFootnote\n\t\t} else if len(data)-1 > offset && data[offset+1] == '^' {\n\t\t\tt = linkDeferredFootnote\n\t\t}\n\t}\n\n\tdata = data[offset:]\n\n\tvar (\n\t\ti = 1\n\t\tnoteId int\n\t\ttitle, link []byte\n\t\ttextHasNl = false\n\t)\n\n\tif t == linkDeferredFootnote {\n\t\ti++\n\t}\n\n\t// look for the matching closing bracket\n\tfor level := 1; level > 0 && i < len(data); i++ {\n\t\tswitch {\n\t\tcase data[i] == '\\n':\n\t\t\ttextHasNl = true\n\n\t\tcase data[i-1] == '\\\\':\n\t\t\tcontinue\n\n\t\tcase data[i] == '[':\n\t\t\tlevel++\n\n\t\tcase data[i] == ']':\n\t\t\tlevel--\n\t\t\tif level <= 0 {\n\t\t\t\ti-- // compensate for extra i++ in for loop\n\t\t\t}\n\t\t}\n\t}\n\n\tif i >= len(data) {\n\t\treturn 0\n\t}\n\ttxtE := i\n\ti++\n\n\t// skip any amount of whitespace or newline\n\t// (this is much more lax than original markdown syntax)\n\tfor i < len(data) && isspace(data[i]) {\n\t\ti++\n\t}\n\n\t// TODO(miek): parse p. 23 parts here (title)\n\t// [@!RFC2534 p. 23], normative\n\t// [@?RFC2535 p. 23], informative\n\t// [@[!|?]draft#1 text]\n\t// [-@RFC] : suppress output, but add to the citation list\n\tif (t == linkCitation || data[1] == '@' || data[1] == '-') && p.flags&EXTENSION_CITATION != 0 {\n\t\tvar (\n\t\t\tspaceB int\n\t\t\tid []byte\n\t\t\ttyp byte\n\t\t\tsuppress bool\n\t\t\tseq = -1\n\t\t)\n\t\ttyp = 'i'\n\t\tk := 1\n\t\tif data[k] == '-' {\n\t\t\tsuppress = true\n\t\t\tk++\n\t\t}\n\t\tk++\n\t\tif data[k] == '!' {\n\t\t\ttyp = 'n'\n\t\t\tk++\n\t\t} else if data[k] == '?' {\n\t\t\ttyp = 'i'\n\t\t\tk++\n\t\t}\n\n\t\tfor j := k; j < txtE; j++ {\n\t\t\tif isspace(data[j]) {\n\t\t\t\tif spaceB == 0 {\n\t\t\t\t\tspaceB = j\n\t\t\t\t\ttitle = data[j+1 : txtE]\n\t\t\t\t\tid = data[k:spaceB]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif spaceB == 0 {\n\t\t\tid = data[k:txtE]\n\t\t}\n\n\t\tif id == nil {\n\t\t\tid = data[k:txtE]\n\t\t}\n\t\tfor j := 0; j < len(id); j++ {\n\t\t\tif id[j] == '#' {\n\t\t\t\tchunk := id[j:]\n\t\t\t\tif len(chunk) > 1 {\n\t\t\t\t\tnum, err := strconv.Atoi(string(chunk[1:]))\n\t\t\t\t\tif err == nil {\n\t\t\t\t\t\tseq = num\n\t\t\t\t\t\tid = id[:j]\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif c, ok := p.citations[string(id)]; !ok {\n\t\t\tp.citations[string(id)] = &citation{link: id, title: title, typ: typ, seq: seq}\n\t\t} else {\n\t\t\tswitch c.typ {\n\t\t\tcase 0:\n\t\t\t\tc.typ = typ\n\t\t\tcase 'i':\n\t\t\t\tif typ == 'n' {\n\t\t\t\t\tprintf(p, \"upgrading citation `%s' from informative to normative\", string(id))\n\t\t\t\t\tc.typ = typ\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif !suppress {\n\t\t\tp.r.Citation(out, id, title)\n\t\t}\n\t\treturn txtE + 1\n\t}\n\n\tswitch {\n\t// inline style link\n\tcase i < len(data) && data[i] == '(':\n\t\t// skip initial whitespace\n\t\ti++\n\n\t\tfor i < len(data) && isspace(data[i]) {\n\t\t\ti++\n\t\t}\n\n\t\tlinkB := i\n\n\t\t// look for link end: ' \" ), check for new openning\n\t\t// braces and take this into account, this may lead\n\t\t// for overshooting and probably will require some\n\t\t// finetuning.\n\t\tbrace := 0\n\tfindlinkend:\n\t\tfor i < len(data) {\n\t\t\tswitch {\n\t\t\tcase data[i] == '\\\\':\n\t\t\t\ti += 2\n\n\t\t\tcase data[i] == '(':\n\t\t\t\tbrace++\n\t\t\t\ti++\n\n\t\t\tcase data[i] == ')':\n\t\t\t\tif brace <= 0 {\n\t\t\t\t\tbreak findlinkend\n\t\t\t\t}\n\t\t\t\tbrace--\n\t\t\t\ti++\n\n\t\t\tcase data[i] == '\\'' || data[i] == '\"':\n\t\t\t\tbreak findlinkend\n\n\t\t\tdefault:\n\t\t\t\ti++\n\t\t\t}\n\t\t}\n\n\t\tif i >= len(data) || brace > 0 {\n\t\t\treturn 0\n\t\t}\n\t\tlinkE := i\n\n\t\t// look for title end if present\n\t\ttitleB, titleE := 0, 0\n\t\tif data[i] == '\\'' || data[i] == '\"' {\n\t\t\ti++\n\t\t\ttitleB = i\n\n\t\tfindtitleend:\n\t\t\tfor i < len(data) {\n\t\t\t\tswitch {\n\t\t\t\tcase data[i] == '\\\\':\n\t\t\t\t\ti += 2\n\n\t\t\t\tcase data[i] == ')':\n\t\t\t\t\tbreak findtitleend\n\n\t\t\t\tdefault:\n\t\t\t\t\ti++\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif i >= len(data) {\n\t\t\t\treturn 0\n\t\t\t}\n\n\t\t\t// skip whitespace after title\n\t\t\ttitleE = i - 1\n\t\t\tfor titleE > titleB && isspace(data[titleE]) {\n\t\t\t\ttitleE--\n\t\t\t}\n\n\t\t\t// check for closing quote presence\n\t\t\tif data[titleE] != '\\'' && data[titleE] != '\"' {\n\t\t\t\ttitleB, titleE = 0, 0\n\t\t\t\tlinkE = i\n\t\t\t}\n\t\t}\n\n\t\t// remove whitespace at the end of the link\n\t\tfor linkE > linkB && isspace(data[linkE-1]) {\n\t\t\tlinkE--\n\t\t}\n\n\t\t// remove optional angle brackets around the link\n\t\tif data[linkB] == '<' {\n\t\t\tlinkB++\n\t\t}\n\t\tif data[linkE-1] == '>' {\n\t\t\tlinkE--\n\t\t}\n\n\t\t// build escaped link and title\n\t\tif linkE > linkB {\n\t\t\tlink = data[linkB:linkE]\n\t\t}\n\n\t\tif titleE > titleB {\n\t\t\ttitle = data[titleB:titleE]\n\t\t}\n\n\t\ti++\n\n\t// reference style link\n\tcase i < len(data)-1 && data[i] == '[' && data[i+1] != '^':\n\t\tvar id []byte\n\n\t\t// look for the id\n\t\ti++\n\t\tlinkB := i\n\t\tfor i < len(data) && data[i] != ']' {\n\t\t\ti++\n\t\t}\n\t\tif i >= len(data) {\n\t\t\treturn 0\n\t\t}\n\t\tlinkE := i\n\n\t\t// find the reference\n\t\tif linkB == linkE {\n\t\t\tif textHasNl {\n\t\t\t\tvar b bytes.Buffer\n\n\t\t\t\tfor j := 1; j < txtE; j++ {\n\t\t\t\t\tswitch {\n\t\t\t\t\tcase data[j] != '\\n':\n\t\t\t\t\t\tb.WriteByte(data[j])\n\t\t\t\t\tcase !isspace(data[j-1]):\n\t\t\t\t\t\tb.WriteByte(' ')\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tid = b.Bytes()\n\t\t\t} else {\n\t\t\t\tid = data[1:txtE]\n\t\t\t}\n\t\t} else {\n\t\t\tid = data[linkB:linkE]\n\t\t}\n\n\t\t// find the reference with matching id (ids are case-insensitive)\n\t\tkey := string(bytes.ToLower(id))\n\t\tlr, ok := p.refs[key]\n\t\tif !ok {\n\t\t\treturn 0\n\t\t}\n\n\t\t// keep link and title from reference\n\t\tlink = lr.link\n\t\ttitle = lr.title\n\t\ti++\n\n\t// shortcut reference style link or reference or inline footnote\n\tdefault:\n\t\tvar id []byte\n\n\t\t// craft the id\n\t\tif textHasNl {\n\t\t\tvar b bytes.Buffer\n\n\t\t\tfor j := 1; j < txtE; j++ {\n\t\t\t\tswitch {\n\t\t\t\tcase data[j] != '\\n':\n\t\t\t\t\tb.WriteByte(data[j])\n\t\t\t\tcase !isspace(data[j-1]):\n\t\t\t\t\tb.WriteByte(' ')\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tid = b.Bytes()\n\t\t} else {\n\t\t\tif t == linkDeferredFootnote {\n\t\t\t\tid = data[2:txtE] // get rid of the ^\n\t\t\t} else {\n\t\t\t\tid = data[1:txtE]\n\t\t\t}\n\t\t}\n\n\t\tkey := string(bytes.ToLower(id))\n\t\tif t == linkInlineFootnote {\n\t\t\t// is RFC7328 mode is enabled, check the footnote, to see if it adheres\n\t\t\t// to the following format. If so, skip adding. Instead\n\t\t\t// either log about this or generate a index.\n\t\t\tif x := p.rfc7328Index(out, id); x > 0 {\n\t\t\t\treturn txtE + 1\n\t\t\t}\n\t\t\tif x := p.rfc7328Caption(out, id); x > 0 {\n\t\t\t\treturn txtE + 1\n\t\t\t}\n\n\t\t\t// create a new reference\n\t\t\tnoteId = len(p.notes) + 1\n\n\t\t\tvar fragment []byte\n\t\t\tif len(id) > 0 {\n\t\t\t\tif len(id) < 16 {\n\t\t\t\t\tfragment = make([]byte, len(id))\n\t\t\t\t} else {\n\t\t\t\t\tfragment = make([]byte, 16)\n\t\t\t\t}\n\t\t\t\tcopy(fragment, slugify(id))\n\t\t\t} else {\n\t\t\t\tfragment = append([]byte(\"footnote-\"), []byte(strconv.Itoa(noteId))...)\n\t\t\t}\n\n\t\t\tref := &reference{\n\t\t\t\tnoteId: noteId,\n\t\t\t\thasBlock: false,\n\t\t\t\tlink: fragment,\n\t\t\t\ttitle: id,\n\t\t\t}\n\n\t\t\tp.notes = append(p.notes, ref)\n\n\t\t\tlink = ref.link\n\t\t\ttitle = ref.title\n\t\t} else {\n\t\t\t// find the reference with matching id\n\t\t\tlr, ok := p.refs[key]\n\t\t\tif !ok {\n\t\t\t\treturn 0\n\t\t\t}\n\n\t\t\tif t == linkDeferredFootnote {\n\t\t\t\tlr.noteId = len(p.notes) + 1\n\t\t\t\tp.notes = append(p.notes, lr)\n\t\t\t}\n\n\t\t\t// keep link and title from reference\n\t\t\tlink = lr.link\n\t\t\t// if inline footnote, title == footnote contents\n\t\t\ttitle = lr.title\n\t\t\tnoteId = lr.noteId\n\t\t}\n\n\t\t// rewind the whitespace\n\t\ti = txtE + 1\n\t}\n\n\t// build content: img alt is escaped, link content is parsed\n\tvar content bytes.Buffer\n\tif txtE > 1 {\n\t\tif t == linkImg {\n\t\t\tcontent.Write(data[1:txtE])\n\t\t} else {\n\t\t\t// links cannot contain other links, so turn off link parsing temporarily\n\t\t\tinsideLink := p.insideLink\n\t\t\tp.insideLink = true\n\t\t\tp.inline(&content, data[1:txtE])\n\t\t\tp.insideLink = insideLink\n\t\t}\n\t}\n\n\tvar uLink []byte\n\tif t == linkNormal || t == linkImg {\n\t\tif len(link) > 0 {\n\t\t\tvar uLinkBuf bytes.Buffer\n\t\t\tunescapeText(&uLinkBuf, link)\n\t\t\tuLink = uLinkBuf.Bytes()\n\t\t}\n\n\t\t// links need something to click on and somewhere to go\n\t\t//if len(uLink) == 0 || (t == linkNormal && content.Len() == 0) {\n\t\tif len(uLink) == 0 {\n\t\t\treturn 0\n\t\t}\n\t}\n\n\t// call the relevant rendering function\n\tswitch t {\n\tcase linkNormal:\n\t\tp.r.Link(out, uLink, title, content.Bytes())\n\n\tcase linkImg:\n\t\toutSize := out.Len()\n\t\toutBytes := out.Bytes()\n\t\tif outSize > 0 && outBytes[outSize-1] == '!' {\n\t\t\tout.Truncate(outSize - 1)\n\t\t}\n\n\t\tvar cooked bytes.Buffer\n\t\tp.inline(&cooked, title)\n\n\t\tp.r.SetAttr(p.ial)\n\t\tp.ial = nil\n\t\tp.r.Image(out, uLink, cooked.Bytes(), content.Bytes(), p.insideFigure)\n\n\tcase linkInlineFootnote:\n\t\toutSize := out.Len()\n\t\toutBytes := out.Bytes()\n\t\tif outSize > 0 && outBytes[outSize-1] == '^' {\n\t\t\tout.Truncate(outSize - 1)\n\t\t}\n\t\tp.r.FootnoteRef(out, link, noteId)\n\n\tcase linkDeferredFootnote:\n\t\tp.r.FootnoteRef(out, link, noteId)\n\n\tdefault:\n\t\treturn 0\n\t}\n\n\treturn i\n}",
"func (l *Link) Link() string {\n\tif l == nil {\n\t\treturn \"0\"\n\t}\n\treturn format((*big.Int)(l), 18)\n}",
"func (text *Text) Link(url string, link *Text) *Text {\n\ttext.Spans = append(text.Spans, Span{\n\t\tContent: url,\n\t\tLink: link,\n\t})\n\treturn text\n}",
"func (m *Message) StripLinkMarkup() string {\r\n\tre := regexp.MustCompile(\"<(.*?)>\")\r\n\tresult := re.FindAllStringSubmatch(m.Text(), -1)\r\n\ttext := m.Text()\r\n\r\n\tvar link string\r\n\tfor _, c := range result {\r\n\t\tlink = c[len(c)-1]\r\n\r\n\t\t// Done change Channel, User or Specials tags\r\n\t\tif link[:2] == \"#C\" || link[:2] == \"@U\" || link[:1] == \"!\" {\r\n\t\t\tcontinue\r\n\t\t}\r\n\r\n\t\turl := link\r\n\t\tif strings.Contains(link, \"|\") {\r\n\t\t\tsplits := strings.Split(link, \"|\")\r\n\t\t\turl = splits[1]\r\n\t\t}\r\n\r\n\t\ttext = strings.Replace(text, \"<\"+link+\">\", url, -1)\r\n\t}\r\n\r\n\treturn text\r\n}",
"func (r *Renderer) WriteRegularLink(l org.RegularLink) {\n\tlink := []byte(html.EscapeString(l.URL))\n\tif l.Protocol == \"file\" {\n\t\tlink = link[len(\"file:\"):]\n\t}\n\tif len(link) > 0 && !markup.IsLink(link) &&\n\t\tlink[0] != '#' && !bytes.HasPrefix(link, byteMailto) {\n\t\tlnk := string(link)\n\t\tif r.IsWiki {\n\t\t\tlnk = util.URLJoin(\"wiki\", lnk)\n\t\t}\n\t\tlink = []byte(util.URLJoin(r.URLPrefix, lnk))\n\t}\n\n\tdescription := string(link)\n\tif l.Description != nil {\n\t\tdescription = r.WriteNodesAsString(l.Description...)\n\t}\n\tswitch l.Kind() {\n\tcase \"image\":\n\t\timageSrc := getMediaURL(link)\n\t\tfmt.Fprintf(r, `<img src=\"%s\" alt=\"%s\" title=\"%s\" />`, imageSrc, description, description)\n\tcase \"video\":\n\t\tvideoSrc := getMediaURL(link)\n\t\tfmt.Fprintf(r, `<video src=\"%s\" title=\"%s\">%s</video>`, videoSrc, description, description)\n\tdefault:\n\t\tfmt.Fprintf(r, `<a href=\"%s\" title=\"%s\">%s</a>`, link, description, description)\n\t}\n}",
"func generateSelfLink(apiVersion, namespace, kind, name string) string {\n\tvar b strings.Builder\n\n\t// for any v1 api served objects, they used to be served from /api\n\t// all others are served from /apis\n\tif apiVersion == \"v1\" {\n\t\tb.WriteString(\"/api\")\n\t} else {\n\t\tb.WriteString(\"/apis\")\n\t}\n\n\tif len(apiVersion) != 0 {\n\t\tfmt.Fprintf(&b, \"/%s\", apiVersion)\n\t}\n\tif len(namespace) != 0 {\n\t\tfmt.Fprintf(&b, \"/namespaces/%s\", namespace)\n\t}\n\tif len(kind) != 0 {\n\t\tvar suffix string\n\t\tif strings.HasSuffix(kind, \"s\") {\n\t\t\tsuffix = \"es\"\n\t\t} else {\n\t\t\tsuffix = \"s\"\n\t\t}\n\t\tfmt.Fprintf(&b, \"/%s%s\", strings.ToLower(kind), suffix)\n\t}\n\tif len(name) != 0 {\n\t\tfmt.Fprintf(&b, \"/%s\", name)\n\t}\n\treturn b.String()\n}",
"func RenderSpecialLink(rawBytes []byte, urlPrefix string, metas map[string]string) []byte {\n\tms := MentionPattern.FindAll(rawBytes, -1)\n\tfor _, m := range ms {\n\t\tm = m[bytes.Index(m, []byte(\"@\")):]\n\t\trawBytes = bytes.ReplaceAll(rawBytes, m, []byte(fmt.Sprintf(`<a href=\"%s/%s\">%s</a>`, conf.Server.Subpath, m[1:], m)))\n\t}\n\n\trawBytes = RenderIssueIndexPattern(rawBytes, urlPrefix, metas)\n\trawBytes = RenderCrossReferenceIssueIndexPattern(rawBytes, urlPrefix, metas)\n\trawBytes = RenderSha1CurrentPattern(rawBytes, metas[\"repoLink\"])\n\treturn rawBytes\n}",
"func buildLink(n *html.Node) Link {\n\tvar link Link\n\t//loop through attributes of a node\n\tfor _, attr := range n.Attr {\n\t\t//if attrbuite has key of 'href'\n\t\tif attr.Key == \"href\" {\n\t\t\t//add the Hyperlink to link object's Href field\n\t\t\tlink.Href = attr.Val\n\t\t\tbreak //terminate a loop at this point\n\t\t}\n\t}\n\t//\n\tlink.Text = getText(n)\n\treturn link\n}",
"func generateLink(lh *linkHandler) tea.Cmd {\n\treturn func() tea.Msg {\n\t\tselect {\n\t\tcase err := <-lh.err:\n\t\t\treturn errMsg{err}\n\t\tcase tok := <-lh.token:\n\t\t\treturn linkTokenCreatedMsg(tok)\n\t\t}\n\t}\n}",
"func Link(attrs []htmlgo.Attribute) HTML {\n\treturn &htmlgo.Tree{Tag: \"link\", Attributes: attrs, SelfClosing: true}\n}",
"func (b *Binary) Link() string {\n\treturn fmt.Sprintf(`/data/%s/%d/%s/%s`, b.TableName(), b.ID, \"data\", b.Hash)\n}",
"func buildLink(node *html.Node) Link {\n\tvar link Link\n\tfor _, attr := range node.Attr {\n\t\tif attr.Key == \"href\" {\n\t\t\tlink.url = attr.Val\n\t\t}\n\t}\n\n\tlink.text = getText(node)\n\treturn link\n}",
"func link(ds *docState) nodes.Node {\n\thref := nodeAttr(ds.cur, \"href\")\n\n\tds.push(nil)\n\tparsedChildNodes := parseSubtree(ds)\n\tds.pop()\n\n\t// Check outside styles\n\toutsideBold := isBold(ds.cur.Parent)\n\toutsideItalic := isItalic(ds.cur.Parent)\n\tif isBoldAndItalic(ds.cur.Parent) {\n\t\toutsideBold = true\n\t\toutsideItalic = true\n\t}\n\t// Apply outside styles to inside parsed (text) nodes\n\tfor _, node := range parsedChildNodes {\n\t\tif textNode, ok := node.(*nodes.TextNode); ok {\n\t\t\ttextNode.Bold = textNode.Bold || outsideBold\n\t\t\ttextNode.Italic = textNode.Italic || outsideItalic\n\t\t}\n\t}\n\n\tn := nodes.NewURLNode(href, parsedChildNodes...)\n\tn.Name = nodeAttr(ds.cur, \"name\")\n\tif v := nodeAttr(ds.cur, \"target\"); v != \"\" {\n\t\tn.Target = v\n\t}\n\tn.MutateBlock(findNearestBlockAncestor(ds.cur))\n\treturn n\n}",
"func (c cell) MustHpyerLink() *HyperLink {\n\treturn c.contentHandler.(*HyperLink)\n}",
"func strFormatOut(input *gofeed.Item) string {\n\tvar output string = input.Title + \"\\n\" + input.Link + \"\\n\"\n\treturn output\n}",
"func (c *Collector) Link() string {\n\treturn URLForResults(c.referenceID, c.config)\n}",
"func (f *File) Link(token string) string {\n\treturn fmt.Sprintf(FileEndpoint, token, f.FilePath)\n}",
"func (o LinkOutput) LinkId() pulumi.StringOutput {\n\treturn o.ApplyT(func(v *Link) pulumi.StringOutput { return v.LinkId }).(pulumi.StringOutput)\n}",
"func (me TLinkTargetType) String() string { return xsdt.String(me).String() }",
"func LinkDescription(value string) *SimpleElement { return newSEString(\"linkDescription\", value) }",
"func (obj *miner) ToLink() blocks.Blocks {\n\treturn obj.toLink\n}",
"func (o InstanceFromTemplateOutput) SelfLink() pulumi.StringOutput {\n\treturn o.ApplyT(func(v *InstanceFromTemplate) pulumi.StringOutput { return v.SelfLink }).(pulumi.StringOutput)\n}",
"func (l *link) String() string {\n\tif l == nil {\n\t\treturn \"nil\"\n\t}\n\ts := \"(\" + l.Value\n\tfor l = l.Next; l != nil; l = l.Next {\n\t\ts += \" \" + l.Value\n\t}\n\treturn s + \")\"\n}",
"func CreateLink(_ web.C, w http.ResponseWriter, r *http.Request) {\n\taccount := r.Header.Get(\"X-Remote-User\")\n\tl := Link{\n\t\tShortLink: uniuri.New(),\n\t\tTarget: r.FormValue(\"t\"),\n\t\tOwner: account,\n\t}\n\tlinks[l.ShortLink] = l\n\n\tfmt.Fprintf(w, \"%s\\n\", l.ShortLink)\n}",
"func (d *directory) getLink(typ Link, provisionerName string, abs bool, inputs ...string) string {\n\tvar link string\n\tswitch typ {\n\tcase NewNonceLink, NewAccountLink, NewOrderLink, NewAuthzLink, DirectoryLink, KeyChangeLink, RevokeCertLink:\n\t\tlink = fmt.Sprintf(\"/%s/%s\", provisionerName, typ.String())\n\tcase AccountLink, OrderLink, AuthzLink, ChallengeLink, CertificateLink:\n\t\tlink = fmt.Sprintf(\"/%s/%s/%s\", provisionerName, typ.String(), inputs[0])\n\tcase OrdersByAccountLink:\n\t\tlink = fmt.Sprintf(\"/%s/%s/%s/orders\", provisionerName, AccountLink.String(), inputs[0])\n\tcase FinalizeLink:\n\t\tlink = fmt.Sprintf(\"/%s/%s/%s/finalize\", provisionerName, OrderLink.String(), inputs[0])\n\t}\n\tif abs {\n\t\treturn fmt.Sprintf(\"https://%s/%s%s\", d.dns, d.prefix, link)\n\t}\n\treturn link\n}",
"func recordLink(index *Index, r *clangdoc.RecordInfo) string {\n\tfullRecord := index.RecordUsrs[r.USR]\n\tif fullRecord == nil {\n\t\treturn \"\"\n\t}\n\treturn HeaderReferenceFile(fullRecord.DefLocation.Filename) + \"#\" + recordHtmlId(index, r)\n}",
"func humanLinkType(p *snet.PathMetadata) string {\n\thasAny := false\n\tfor _, lt := range p.LinkType {\n\t\tif lt != snet.LinkTypeUnset {\n\t\t\thasAny = true\n\t\t\tbreak\n\t\t}\n\t}\n\tif !hasAny {\n\t\treturn \"\"\n\t}\n\n\tlinkTypes := make([]string, len(p.LinkType))\n\tfor i, lt := range p.LinkType {\n\t\tlinkTypes[i] = lt.String()\n\t}\n\treturn fmt.Sprintf(\"[%s]\", strings.Join(linkTypes, \", \"))\n}",
"func (l *LINK) DisplayContent() string {\n\treturn fmt.Sprintf(\"Linked information\\n\\tIdentifier: %s\\n\\tURL: %s\\n\", l.Identifier, l.URL)\n}",
"func (o NetworkAttachmentOutput) SelfLink() pulumi.StringOutput {\n\treturn o.ApplyT(func(v *NetworkAttachment) pulumi.StringOutput { return v.SelfLink }).(pulumi.StringOutput)\n}",
"func (l *Link) String() string {\n\ts := fmt.Sprintf(\"<%s>\", l.URL)\n\tif len(l.Rel) > 0 {\n\t\ts = fmt.Sprintf(`%s; rel=\"%s\"`, s, l.Rel)\n\t}\n\tfor key, value := range l.Attrs {\n\t\ts = fmt.Sprintf(`%s; %s=\"%s\"`, s, key, value)\n\t}\n\treturn s\n}",
"func Link(children ...Element) *CompoundElement { return newCE(\"Link\", children) }",
"func linkify(s string) template.HTML {\n\toutput := \"\"\n\ti := 0\n\tmatches := urlregexp.FindAllStringIndex(s, -1)\n\tfor _, idxs := range matches {\n\t\tstart, end := idxs[0], idxs[1]\n\t\toutput += html.EscapeString(s[i:start])\n\t\toutput += linkreplace(s[start:end])\n\t\ti = end\n\t}\n\toutput += html.EscapeString(s[i:])\n\treturn template.HTML(output)\n}",
"func (o ObjectAccessControlResponseOutput) SelfLink() pulumi.StringOutput {\n\treturn o.ApplyT(func(v ObjectAccessControlResponse) string { return v.SelfLink }).(pulumi.StringOutput)\n}",
"func (t *Tweet) IsLinkable() {}",
"func Href(value string) *SimpleElement { return newSEString(\"href\", value) }",
"func (prodController *ProducersController) FormatAsRelativeLink(params ...httprouter.Param) string {\n\treturn producersPath\n}",
"func (_this *URL) ToString() string {\n\treturn _this.Href()\n}",
"func (tu *TwitterURL) IsLinkable() {}",
"func (r *RepoInfo) Link() string {\n\tswitch r.RepoHost {\n\tcase GoogleCode:\n\t\treturn fmt.Sprintf(\"https://code.google.com/p/%s\", r.FullName)\n\tdefault:\n\t\treturn (&url.URL{Scheme: \"https\", Host: string(r.RepoHost), Path: \"/\" + r.FullName}).String()\n\t}\n}",
"func (prodController *ProducerController) FormatAsRelativeLink(params ...httprouter.Param) string {\n\treturn formatURL(params, producerPath, producerIDPathParamKey)\n}",
"func (lk *Link) String() string {\n\tb, _ := json.Marshal(lk)\n\treturn \"vmess://\" + base64.Encode(string(b))\n}",
"func link(name upspin.PathName, issue *maintner.GitHubIssue) *upspin.DirEntry {\n\tp, _ := path.Parse(name)\n\tlink := p.Drop(2).Path() + upspin.PathName(fmt.Sprintf(\"/all/%d\", issue.Number))\n\treturn &upspin.DirEntry{\n\t\tPacking: upspin.PlainPack,\n\t\tName: name,\n\t\tSignedName: name,\n\t\tLink: link,\n\t\tAttr: upspin.AttrLink,\n\t\tTime: upspin.Now(),\n\t}\n}",
"func (r *Results) OutputNewLinks() {\n\tif len(r.LinkPaths) == 0 {\n\t\treturn\n\t}\n\ts := make([]string, 0)\n\tif r.Opts.LinkingEnabled {\n\t\ts = append(s, \"Files that were hardlinked this run\")\n\t\ts = append(s, \"-----------------------------------\")\n\t} else {\n\t\ts = append(s, \"Files that are hardlinkable\")\n\t\ts = append(s, \"---------------------------\")\n\t}\n\toutputLinkPaths(s, r.LinkPaths)\n}",
"func (o InstanceGroupOutput) SelfLink() pulumi.StringOutput {\n\treturn o.ApplyT(func(v *InstanceGroup) pulumi.StringOutput { return v.SelfLink }).(pulumi.StringOutput)\n}",
"func (f *file) Links() []string {\n return nil // no links.\n}",
"func (p Page) TargetURLText() string {\n\tif p.TargetURL == nil {\n\t\treturn \"NilTargetURL\"\n\t}\n\treturn p.TargetURL.String()\n}",
"func getLink(header http.Header, rel string) string {\n\tlinks := getLinks(header, rel)\n\tif len(links) < 1 {\n\t\treturn \"\"\n\t}\n\n\treturn links[0]\n}",
"func (p *Page) Link(s string) (string, error) {\n\tu, err := url.Parse(s)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// If the page is 0 or 1, we want to drop the page param from the query.\n\t// Otherwise add the page param with the value.\n\tq := u.Query()\n\tif p.Number <= 1 {\n\t\tq.Del(QueryKeyPage)\n\t} else {\n\t\tq.Set(QueryKeyPage, strconv.FormatUint(p.Number, 10))\n\t}\n\tu.RawQuery = q.Encode()\n\n\treturn u.String(), nil\n}",
"func (a AttrValueFormatter) Format() string {\n\tif a.FormatHref && a.Name == \"href\" {\n\t\tu, _ := url.Parse(a.Value)\n\t\tcompoName := app.ComponentNameFromURL(u)\n\n\t\tif a.Factory.Registered(compoName) {\n\t\t\tu.Scheme = \"compo\"\n\t\t\tu.Path = \"/\" + compoName\n\t\t}\n\t\treturn u.String()\n\t}\n\n\tif !strings.HasPrefix(a.Name, \"on\") {\n\t\treturn a.Value\n\t}\n\n\tif strings.HasPrefix(a.Value, \"js:\") {\n\t\treturn strings.TrimPrefix(a.Value, \"js:\")\n\t}\n\n\treturn fmt.Sprintf(`callGoEventHandler('%s', '%s', this, event)`,\n\t\ta.CompoID,\n\t\ta.Value,\n\t)\n}",
"func (l *Link) Text(base int) string {\n\treturn (*big.Int)(l).Text(base)\n}",
"func (l Links) String() string {\n\tvar strs []string\n\tfor _, link := range l {\n\t\tstrs = append(strs, link.String())\n\t}\n\treturn strings.Join(strs, \" , \")\n}",
"func displayLinks(links []string) {\n\tfor i, link := range links{\n\t\tfmt.Printf(\"[% 3d ] %s\\n\", i,link)\n\t}\n}",
"func (o *NiaapiNewReleaseDetailAllOf) GetLinkOk() (*string, bool) {\n\tif o == nil || o.Link == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Link, true\n}",
"func (*testLinkEndpoint) LinkAddress() tcpip.LinkAddress {\n\treturn \"\"\n}",
"func (l *Link) MarshalText() ([]byte, error) {\n\tif l.Cmp(linkFmtThreshold) >= 0 {\n\t\treturn []byte(fmt.Sprintf(\"%s link\", decimal.NewFromBigInt(l.ToInt(), -18))), nil\n\t}\n\treturn (*big.Int)(l).MarshalText()\n}",
"func (o LookupImageResultOutput) SelfLink() pulumi.StringOutput {\n\treturn o.ApplyT(func(v LookupImageResult) string { return v.SelfLink }).(pulumi.StringOutput)\n}",
"func (o BucketAccessControlResponseOutput) SelfLink() pulumi.StringOutput {\n\treturn o.ApplyT(func(v BucketAccessControlResponse) string { return v.SelfLink }).(pulumi.StringOutput)\n}",
"func (d *Diagram) Link(from, to shape.Shape, txt ...string) (lnk *shape.Arrow, label *shape.Label) {\n\tlnk = shape.NewArrowBetween(from, to)\n\td.Place(lnk)\n\n\tif len(txt) > 0 {\n\t\tlabel = shape.NewLabel(txt[0])\n\n\t\t// find center of arrow\n\t\tdir := lnk.Direction()\n\t\tif dir == shape.DirectionLeft || dir == shape.DirectionRight {\n\t\t\td.Place(label).Above(lnk, label.Height()+label.Pad.Bottom)\n\t\t\td.VAlignCenter(lnk, label)\n\t\t} else {\n\t\t\tx, y := lnk.CenterPosition()\n\t\t\td.Place(label).At(x+label.Pad.Left, y-label.Font.Height)\n\t\t}\n\t}\n\treturn\n}",
"func (o *ShortenBitlinkBodyAllOf) GetLinkOk() (*string, bool) {\n\tif o == nil || o.Link == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Link, true\n}",
"func (m Model) View() string {\n\tvar s string\n\n\tswitch m.status {\n\tcase initCharmClient:\n\t\ts += m.preambleView()\n\t\ts += m.spinner.View() + \" Initializing...\"\n\tcase linkInit:\n\t\ts += m.preambleView()\n\t\ts += m.spinner.View() + \" Generating link...\"\n\tcase linkTokenCreated:\n\t\ts += m.preambleView()\n\t\ts += m.styles.Wrap.Render(\"To link, run the following command on your other machine:\") + \"\\n\\n\"\n\t\ts += m.styles.Code.Render(m.parentName+\" link \"+m.token) + \"\\n\\n\"\n\t\ts += common.HelpView(\"To cancel, press escape\")\n\tcase linkRequested:\n\t\tvar d []string\n\t\ts += m.preambleView()\n\t\ts += \"Link request from:\\n\\n\"\n\t\td = append(d, []string{\"IP\", m.linkRequest.requestAddr}...)\n\t\tif len(m.linkRequest.pubKey) > 50 {\n\t\t\td = append(d, []string{\"Key\", m.linkRequest.pubKey[0:50] + \"...\"}...)\n\t\t}\n\t\ts += common.KeyValueView(d...)\n\t\ts += \"\\n\\nLink this device?\\n\\n\"\n\t\ts += common.YesButtonView(m.buttonIndex == 0) + \" \"\n\t\ts += common.NoButtonView(m.buttonIndex == 1)\n\tcase linkError:\n\t\ts += m.preambleView()\n\t\ts += \"Uh oh: \" + m.err.Error()\n\tcase linkSuccess:\n\t\ts += m.styles.Keyword.Render(\"Linked!\")\n\t\tif m.alreadyLinked {\n\t\t\ts += \" This key is already linked, btw.\"\n\t\t}\n\t\tif m.standalone {\n\t\t\ts += \"\\n\"\n\t\t} else {\n\t\t\ts = m.preambleView() + s + common.HelpView(\"\\n\\nPress any key to exit...\")\n\t\t}\n\tcase linkRequestDenied:\n\t\ts += \"Link request \" + m.styles.Keyword.Render(\"denied\") + \".\"\n\t\tif m.standalone {\n\t\t\ts += \"\\n\"\n\t\t} else {\n\t\t\ts = m.preambleView() + s + common.HelpView(\"\\n\\nPress any key to exit...\")\n\t\t}\n\tcase linkTimedOut:\n\t\ts += m.preambleView()\n\t\ts += \"Link request timed out.\"\n\t\tif m.standalone {\n\t\t\ts += \"\\n\"\n\t\t} else {\n\t\t\ts += common.HelpView(\"Press any key to exit...\")\n\t\t}\n\tcase quitting:\n\t\ts += \"Linking canceled.\\n\"\n\t}\n\n\tif m.standalone {\n\t\ts = m.styles.App.Render(s)\n\t}\n\treturn s\n}",
"func (f *Asciidoc) LocalHref(headerText string) (string, error) {\n\t//TODO: seems lik template adds a []: return fmt.Sprintf(\"xref:%s[%s]\", f.genref(headerText), headerText), nil\n\treturn fmt.Sprintf(\"xref:%s\", f.genref(headerText)), nil\n}",
"func (this *MarkupConfluence) anchor(anchorName string) string {\n\treturn fmt.Sprintf(\"{anchor:%s}\\n\", anchorName)\n}",
"func (o ReleaseLinkOutput) Url() pulumi.StringOutput {\n\treturn o.ApplyT(func(v *ReleaseLink) pulumi.StringOutput { return v.Url }).(pulumi.StringOutput)\n}",
"func (o AddressGroupOutput) SelfLink() pulumi.StringOutput {\n\treturn o.ApplyT(func(v *AddressGroup) pulumi.StringOutput { return v.SelfLink }).(pulumi.StringOutput)\n}",
"func (o LookupInstanceResultOutput) SelfLink() pulumi.StringOutput {\n\treturn o.ApplyT(func(v LookupInstanceResult) string { return v.SelfLink }).(pulumi.StringOutput)\n}",
"func (o LookupLinkResultOutput) LinkId() pulumi.StringOutput {\n\treturn o.ApplyT(func(v LookupLinkResult) string { return v.LinkId }).(pulumi.StringOutput)\n}",
"func LinkName(value string) *SimpleElement { return newSEString(\"linkName\", value) }",
"func (o ReservationResponseOutput) SelfLink() pulumi.StringOutput {\n\treturn o.ApplyT(func(v ReservationResponse) string { return v.SelfLink }).(pulumi.StringOutput)\n}",
"func TestSimpleParser_ParseLinksWithFilters(t *testing.T) {\n\t// \"content\" : \"expectedResult\"\n\ttestData := map[string][]string{\n\t\tMockContent: {\"http://example.com_transformed\", \"http://example.com/docs_transformed\", \"http://example.com/something_transformed\", \"google.com/news_transformed\"},\n\t\t`<html>\n\t\t\t<p>Hello world!</p>\n\t\t\thref=\"not link\"\n\t\t\thref='http://nonono.com'\n\t\t</html>`: {},\n\t}\n\n\tfilterFunc := func(link string) bool {\n\t\treturn link == \"http://example.com\" || link == \"google.com/news\"\n\t}\n\n\ttransformFunc := func(link string) string {\n\t\treturn link + \"_transformed\"\n\t}\n\n\tfor content, expectedLinks := range testData {\n\t\tlinks, _ := simpleParser{content}.ParseLinksWithFilters(filterFunc, transformFunc, true)\n\t\tif !same(links, expectedLinks) {\n\t\t\tt.Logf(\"\\nExpected links: %s\\nActual links:%s\", expectedLinks, links)\n\t\t\tt.Fail()\n\t\t}\n\t}\n}",
"func (o VpnGatewayOutput) SelfLink() pulumi.StringOutput {\n\treturn o.ApplyT(func(v *VpnGateway) pulumi.StringOutput { return v.SelfLink }).(pulumi.StringOutput)\n}",
"func (o EntryOutput) LinkedResource() pulumi.StringOutput {\n\treturn o.ApplyT(func(v *Entry) pulumi.StringOutput { return v.LinkedResource }).(pulumi.StringOutput)\n}",
"func (text *TEXT) Href(str string) *TEXT {\n\ttext.href = str\n\treturn text\n}",
"func (rule *Rule) GenerateLinks() ([]string, error) {\n\t//page pattern is {page}\n\tvar links []string\n\tpagePattern := \"{page}\"\n\tif !strings.Contains(rule.LinkPattern, pagePattern) {\n\t\treturn nil, errors.New(utility.Enums().ErrorMessages.LackOfInfo)\n\t}\n\tpage := 1\n\tfor page <= rule.TotalPages {\n\t\tlinks = append(links, strings.ReplaceAll(rule.LinkPattern, pagePattern, strconv.Itoa(page)))\n\t\tpage++\n\t}\n\treturn links, nil\n}",
"func (o GroupBadgeOutput) RenderedLinkUrl() pulumi.StringOutput {\n\treturn o.ApplyT(func(v *GroupBadge) pulumi.StringOutput { return v.RenderedLinkUrl }).(pulumi.StringOutput)\n}",
"func (o DicomStoreOutput) SelfLink() pulumi.StringOutput {\n\treturn o.ApplyT(func(v *DicomStore) pulumi.StringOutput { return v.SelfLink }).(pulumi.StringOutput)\n}",
"func (o LookupRegionCommitmentResultOutput) SelfLink() pulumi.StringOutput {\n\treturn o.ApplyT(func(v LookupRegionCommitmentResult) string { return v.SelfLink }).(pulumi.StringOutput)\n}",
"func (b *Builder) TextURL(s, url string) *Builder {\n\treturn b.appendMessage(s, func(offset, limit int) tg.MessageEntityClass {\n\t\treturn &tg.MessageEntityTextUrl{Offset: offset, Length: limit, URL: url}\n\t})\n}",
"func (o TargetPoolOutput) SelfLink() pulumi.StringOutput {\n\treturn o.ApplyT(func(v *TargetPool) pulumi.StringOutput { return v.SelfLink }).(pulumi.StringOutput)\n}",
"func GetSelfLinkFromHal(json []byte) string {\n\treturn StripTemplateParameter(gjson.Get(string(json), \"_links.self.href\").String())\n}",
"func (thread *Thread) Link() string {\n\treturn \"/thread/\" + thread.ID\n}",
"func enrichLinkTypeSingle(ctx *workItemLinkContext, single *app.WorkItemLinkTypeSingle) error {\n\t// Add \"links\" element\n\trelatedURL := rest.AbsoluteURL(ctx.Request, ctx.LinkFunc(*single.Data.ID))\n\tsingle.Data.Links = &app.GenericLinks{\n\t\tSelf: &relatedURL,\n\t\tRelated: &relatedURL,\n\t}\n\treturn nil\n}",
"func extractLink(attrs []html.Attribute) string {\n\tfor _, attr := range attrs {\n\t\tif attr.Key == hrefAttr {\n\t\t\treturn attr.Val\n\t\t}\n\t}\n\treturn \"\"\n}",
"func (ctx *GetFeedContext) OKLink(r *FeedLink) error {\n\tif ctx.ResponseData.Header().Get(\"Content-Type\") == \"\" {\n\t\tctx.ResponseData.Header().Set(\"Content-Type\", \"application/json\")\n\t}\n\treturn ctx.ResponseData.Service.Send(ctx.Context, 200, r)\n}",
"func TestURL(t *testing.T) {\n\ta := nodes.NewURLNode(\"google.com\")\n\ta.Name = \"foobar\"\n\n\tb := nodes.NewURLNode(\"google.com\")\n\tb.Name = \"foo{{bar\"\n\n\tc := nodes.NewURLNode(\"google.com\")\n\tc.Target = \"_self\"\n\n\td := nodes.NewURLNode(\"google.com\")\n\td.Target = \"_self{{\"\n\n\te := nodes.NewURLNode(\"google.com\")\n\te.Name = \"foobar\"\n\te.Target = \"_self\"\n\n\ttests := []struct {\n\t\tname string\n\t\tinNode *nodes.URLNode\n\t\tout string\n\t}{\n\t\t{\n\t\t\tname: \"Empty\",\n\t\t\tinNode: nodes.NewURLNode(\"google.com\"),\n\t\t\tout: `<a href=\"google.com\" target=\"_blank\"></a>`,\n\t\t},\n\t\t{\n\t\t\tname: \"Name\",\n\t\t\tinNode: a,\n\t\t\tout: `<a href=\"google.com\" name=\"foobar\" target=\"_blank\"></a>`,\n\t\t},\n\t\t{\n\t\t\tname: \"NameEscape\",\n\t\t\tinNode: b,\n\t\t\tout: `<a href=\"google.com\" name=\"foo{{bar\" target=\"_blank\"></a>`,\n\t\t},\n\t\t{\n\t\t\tname: \"Target\",\n\t\t\tinNode: c,\n\t\t\tout: `<a href=\"google.com\" target=\"_self\"></a>`,\n\t\t},\n\t\t{\n\t\t\tname: \"TargetEscape\",\n\t\t\tinNode: d,\n\t\t\tout: `<a href=\"google.com\" target=\"_self{{\"></a>`,\n\t\t},\n\t\t{\n\t\t\tname: \"NameTarget\",\n\t\t\tinNode: e,\n\t\t\tout: `<a href=\"google.com\" name=\"foobar\" target=\"_self\"></a>`,\n\t\t},\n\t\t{\n\t\t\tname: \"Simple\",\n\t\t\tinNode: nodes.NewURLNode(\"google.com\", nodes.NewTextNode(\"foobar\")),\n\t\t\tout: `<a href=\"google.com\" target=\"_blank\">foobar</a>`,\n\t\t},\n\t\t{\n\t\t\tname: \"MultipleContent\",\n\t\t\tinNode: nodes.NewURLNode(\"google.com\", nodes.NewHeaderNode(1, nodes.NewTextNode(\"foo\")), nodes.NewTextNode(\"bar\")),\n\t\t\tout: `<a href=\"google.com\" target=\"_blank\"><h1 is-upgraded>foo</h1>\nbar</a>`,\n\t\t},\n\t}\n\tfor _, tc := range tests {\n\t\tt.Run(tc.name, func(t *testing.T) {\n\t\t\toutBuffer := &bytes.Buffer{}\n\t\t\thw := &htmlWriter{w: outBuffer}\n\t\t\thw.url(tc.inNode)\n\t\t\tout := outBuffer.String()\n\t\t\tif diff := cmp.Diff(tc.out, out); diff != \"\" {\n\t\t\t\tt.Errorf(\"hw.url(%+v) got diff (-want +got):\\n%s\", tc.inNode, diff)\n\t\t\t}\n\t\t})\n\t}\n}",
"func (o ClusterOutput) SelfLink() pulumi.StringOutput {\n\treturn o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.SelfLink }).(pulumi.StringOutput)\n}",
"func GetPublicShareLinkFromHal(json []byte) string {\n\treturn StripTemplateParameter(gjson.Get(string(json), \"_links.publicShare.href\").String())\n}",
"func GetLinkForMessage(s string) string {\n\tif len(strings.Split(s, \" \")) > 1 && strings.Split(s, \" \")[1] != \"\" {\n\t\tif strings.Split(s, \" \")[1] == \"help\" {\n\t\t\tlinks := ReadAllLinks()\n\t\t\tkeys := make([]string, 0, len(links))\n\t\t\tfor _, link := range links {\n\t\t\t\tkeys = append(keys, link.Descrip)\n\t\t\t}\n\n\t\t\treturn fmt.Sprintf(\"```Available links are: \\n!link %s ```\", strings.Join(keys, \"\\n!link \"))\n\t\t}\n\t\tlinks := ReadAllLinks(strings.Split(s, \" \")[1])\n\t\tif len(links) > 0 {\n\t\t\tretString := \"Heres what I found!\\n\"\n\t\t\tfor _, link := range links {\n\t\t\t\tretString += fmt.Sprintf(\"%s : %s \\n\", link.Descrip, link.Link)\n\t\t\t}\n\t\t\treturn retString\n\t\t}\n\t}\n\treturn \"```Invalid argument for command !link for valid options try \\n try !link help ```\"\n}",
"func (author *Author) Helper() string {\n\treturn fmt.Sprintf(\"<address><a href=\\\"mailto:%s\\\">%s</a></address>\", author.Email, author.Name)\n}",
"func URLform(url, body string) (result string) {\n\tresult = fmt.Sprintf(`[%s](%s)`, body, url)\n\treturn\n}"
] |
[
"0.68764675",
"0.62867874",
"0.6281461",
"0.6267117",
"0.62461084",
"0.618086",
"0.61557364",
"0.6008024",
"0.5926875",
"0.58802396",
"0.5864506",
"0.5601986",
"0.55848634",
"0.5560883",
"0.55575824",
"0.5536076",
"0.5535014",
"0.5516948",
"0.5483113",
"0.54618716",
"0.5455418",
"0.5435975",
"0.5432467",
"0.53637093",
"0.5346872",
"0.53195333",
"0.5312289",
"0.5302192",
"0.5300238",
"0.52745825",
"0.52723694",
"0.52481955",
"0.52376884",
"0.52202725",
"0.5219315",
"0.52026814",
"0.5194599",
"0.51698345",
"0.516625",
"0.5162125",
"0.51224536",
"0.5115232",
"0.51069844",
"0.51059264",
"0.5096381",
"0.5092292",
"0.50920296",
"0.50844806",
"0.50808185",
"0.507771",
"0.50765073",
"0.50539976",
"0.5046626",
"0.5037066",
"0.5027944",
"0.50273967",
"0.50269836",
"0.5025568",
"0.50228846",
"0.50216067",
"0.50189024",
"0.5003824",
"0.49922487",
"0.49889103",
"0.49876946",
"0.49785066",
"0.49732503",
"0.49711674",
"0.49616945",
"0.49577323",
"0.4955969",
"0.49462998",
"0.49431524",
"0.49366534",
"0.49347126",
"0.49263462",
"0.4904636",
"0.48972344",
"0.48861817",
"0.4886039",
"0.4881938",
"0.48798627",
"0.48734197",
"0.48687673",
"0.48685968",
"0.48659042",
"0.48602548",
"0.4851724",
"0.4850424",
"0.48492265",
"0.4848695",
"0.48478526",
"0.48399445",
"0.48295856",
"0.4826862",
"0.48249418",
"0.48180848",
"0.48099276",
"0.4807315",
"0.47988945"
] |
0.84344745
|
0
|
htmlLinkFormatter creates a HTML link
|
func htmlLinkFormatter(url, text string) string {
return fmt.Sprintf(`<a href="%s">%s</a>`, html.EscapeString(url), html.EscapeString(text))
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func Link(t string, u string, a ...string) got.HTML {\n\tattributes := \"\"\n\tif len(a) > 0 {\n\t\tattributes = strings.Join(a, \" \")\n\t}\n\treturn got.HTML(fmt.Sprintf(\"<a href=\\\"%s\\\" %s>%s</a>\", Escape(u), Escape(attributes), Escape(t)))\n}",
"func Link(attrs []htmlgo.Attribute) HTML {\n\treturn &htmlgo.Tree{Tag: \"link\", Attributes: attrs, SelfClosing: true}\n}",
"func (r renderer) Link(out *bytes.Buffer, link []byte, title []byte, content []byte) {\n\tout.Write(content)\n}",
"func linkFmt(w io.Writer, x interface{}, format string) {\n\ttype Positioner interface {\n\t\tPos() token.Position;\n\t}\n\tif node, ok := x.(Positioner); ok {\n\t\tpos := node.Pos();\n\t\tif pos.IsValid() {\n\t\t\t// line id's in html-printed source are of the\n\t\t\t// form \"L%d\" where %d stands for the line number\n\t\t\tfmt.Fprintf(w, \"/%s#L%d\", htmlEscape(pos.Filename), pos.Line)\n\t\t}\n\t}\n}",
"func Link_() HTML {\n return Link(nil)\n}",
"func (this *MarkupConfluence) link(anchorName, linkText string) string {\n\tif linkText == \"\" {\n\t\treturn fmt.Sprintf(\"[#%s]\", anchorName)\n\t}\n\treturn fmt.Sprintf(\"[%s|#%s]\", linkText, anchorName)\n}",
"func (b *Builder) Link(url, title string) string {\n\treturn fmt.Sprintf(\"[%s](%s)\", title, url)\n}",
"func (r *Renderer) WriteRegularLink(l org.RegularLink) {\n\tlink := []byte(html.EscapeString(l.URL))\n\tif l.Protocol == \"file\" {\n\t\tlink = link[len(\"file:\"):]\n\t}\n\tif len(link) > 0 && !markup.IsLink(link) &&\n\t\tlink[0] != '#' && !bytes.HasPrefix(link, byteMailto) {\n\t\tlnk := string(link)\n\t\tif r.IsWiki {\n\t\t\tlnk = util.URLJoin(\"wiki\", lnk)\n\t\t}\n\t\tlink = []byte(util.URLJoin(r.URLPrefix, lnk))\n\t}\n\n\tdescription := string(link)\n\tif l.Description != nil {\n\t\tdescription = r.WriteNodesAsString(l.Description...)\n\t}\n\tswitch l.Kind() {\n\tcase \"image\":\n\t\timageSrc := getMediaURL(link)\n\t\tfmt.Fprintf(r, `<img src=\"%s\" alt=\"%s\" title=\"%s\" />`, imageSrc, description, description)\n\tcase \"video\":\n\t\tvideoSrc := getMediaURL(link)\n\t\tfmt.Fprintf(r, `<video src=\"%s\" title=\"%s\">%s</video>`, videoSrc, description, description)\n\tdefault:\n\t\tfmt.Fprintf(r, `<a href=\"%s\" title=\"%s\">%s</a>`, link, description, description)\n\t}\n}",
"func Link(url, text string) string {\n\treturn Osc + \"8;;\" + url + Bel + text + Osc + \"8;;\" + Bel\n}",
"func RenderSpecialLink(rawBytes []byte, urlPrefix string, metas map[string]string) []byte {\n\tms := MentionPattern.FindAll(rawBytes, -1)\n\tfor _, m := range ms {\n\t\tm = m[bytes.Index(m, []byte(\"@\")):]\n\t\trawBytes = bytes.ReplaceAll(rawBytes, m, []byte(fmt.Sprintf(`<a href=\"%s/%s\">%s</a>`, conf.Server.Subpath, m[1:], m)))\n\t}\n\n\trawBytes = RenderIssueIndexPattern(rawBytes, urlPrefix, metas)\n\trawBytes = RenderCrossReferenceIssueIndexPattern(rawBytes, urlPrefix, metas)\n\trawBytes = RenderSha1CurrentPattern(rawBytes, metas[\"repoLink\"])\n\treturn rawBytes\n}",
"func noneLinkFormatter(url, text string) string {\n\treturn text\n}",
"func (f *Asciidoc) Link(text, href string) (string, error) {\n\tif text == \"\" {\n\t\treturn \"\", nil\n\t}\n\n\tif href == \"\" {\n\t\treturn text, nil\n\t}\n\n\treturn fmt.Sprintf(\"%s[%s]\", href, text), nil\n}",
"func linkify(s string) template.HTML {\n\toutput := \"\"\n\ti := 0\n\tmatches := urlregexp.FindAllStringIndex(s, -1)\n\tfor _, idxs := range matches {\n\t\tstart, end := idxs[0], idxs[1]\n\t\toutput += html.EscapeString(s[i:start])\n\t\toutput += linkreplace(s[start:end])\n\t\ti = end\n\t}\n\toutput += html.EscapeString(s[i:])\n\treturn template.HTML(output)\n}",
"func buildLink(n *html.Node) Link {\n\tvar link Link\n\t//loop through attributes of a node\n\tfor _, attr := range n.Attr {\n\t\t//if attrbuite has key of 'href'\n\t\tif attr.Key == \"href\" {\n\t\t\t//add the Hyperlink to link object's Href field\n\t\t\tlink.Href = attr.Val\n\t\t\tbreak //terminate a loop at this point\n\t\t}\n\t}\n\t//\n\tlink.Text = getText(n)\n\treturn link\n}",
"func (routing *DemoDeviceStreamRouting) HTMLLinks() (links []gin.H) {\n\treturn []gin.H{\n\t\tgin.H{\n\t\t\t\"Name\": \"laptop\",\n\t\t\t\"FontAwesomeClass\": \"fa-laptop\",\n\t\t\t\"RawImageURL\": \"/demo/images/raw-drnic-laptop.png\",\n\t\t\t\"ObjectDetectorImageURL\": \"/demo/images/objectdetector-drnic-laptop.png\",\n\t\t\t\"EdgeDetectorImageURL\": \"/demo/images/edgedetector-drnic-laptop.png\",\n\t\t},\n\t\tgin.H{\n\t\t\t\"Name\": \"raspberrypi\",\n\t\t\t\"FontAwesomeClass\": \"fa-camera-retro\",\n\t\t\t\"RawImageURL\": \"/demo/images/raw-drnic-pi.png\",\n\t\t\t\"ObjectDetectorImageURL\": \"/demo/images/objectdetector-drnic-pi.png\",\n\t\t\t\"EdgeDetectorImageURL\": \"/demo/images/edgedetector-drnic-pi.png\",\n\t\t},\n\t}\n}",
"func buildLink(node *html.Node) Link {\n\tvar link Link\n\tfor _, attr := range node.Attr {\n\t\tif attr.Key == \"href\" {\n\t\t\tlink.url = attr.Val\n\t\t}\n\t}\n\n\tlink.text = getText(node)\n\treturn link\n}",
"func HTMLURL(v string) predicate.GithubRelease {\n\treturn predicate.GithubRelease(sql.FieldEQ(FieldHTMLURL, v))\n}",
"func (o GroupBadgeOutput) RenderedLinkUrl() pulumi.StringOutput {\n\treturn o.ApplyT(func(v *GroupBadge) pulumi.StringOutput { return v.RenderedLinkUrl }).(pulumi.StringOutput)\n}",
"func (p *Proxy) LinkHtml(ctx context.Context,\n\tlabel string,\n\tactionValue string,\n\tattributes html5tag.Attributes,\n) string {\n\tif attributes == nil {\n\t\tattributes = html5tag.NewAttributes()\n\t}\n\tattributes.Set(\"onclick\", \"return false;\") // make sure we do not follow the link if javascript is on.\n\tvar href string\n\tif attributes.Has(\"href\") {\n\t\thref = attributes.Get(\"href\")\n\t} else {\n\t\thref = page.GetContext(ctx).HttpContext.URL.RequestURI() // for non-javascript compatibility\n\t\tif offset := strings.Index(href, page.HtmlVarAction); offset >= 0 {\n\t\t\thref = href[:offset-1] // remove the variables we placed here ourselves\n\t\t}\n\t}\n\n\t// These next two lines allow the proxy to work even when javascript is off.\n\tav := page.HtmlVarAction + \"=\" + p.ID() + \"_\" + actionValue\n\tav += \"&\" + page.HtmlVarPagestate + \"=\" + crypt.SessionEncryptUrlValue(ctx, p.Page().StateID())\n\n\tif !strings.ContainsRune(href, '?') {\n\t\thref += \"?\" + av\n\t} else {\n\t\thref += \"&\" + av\n\t}\n\tattributes.Set(\"href\", href)\n\treturn p.TagHtml(label, actionValue, attributes, \"a\", false)\n}",
"func (prodController *ProducerController) FormatAsRelativeLink(params ...httprouter.Param) string {\n\treturn formatURL(params, producerPath, producerIDPathParamKey)\n}",
"func link(ds *docState) nodes.Node {\n\thref := nodeAttr(ds.cur, \"href\")\n\n\tds.push(nil)\n\tparsedChildNodes := parseSubtree(ds)\n\tds.pop()\n\n\t// Check outside styles\n\toutsideBold := isBold(ds.cur.Parent)\n\toutsideItalic := isItalic(ds.cur.Parent)\n\tif isBoldAndItalic(ds.cur.Parent) {\n\t\toutsideBold = true\n\t\toutsideItalic = true\n\t}\n\t// Apply outside styles to inside parsed (text) nodes\n\tfor _, node := range parsedChildNodes {\n\t\tif textNode, ok := node.(*nodes.TextNode); ok {\n\t\t\ttextNode.Bold = textNode.Bold || outsideBold\n\t\t\ttextNode.Italic = textNode.Italic || outsideItalic\n\t\t}\n\t}\n\n\tn := nodes.NewURLNode(href, parsedChildNodes...)\n\tn.Name = nodeAttr(ds.cur, \"name\")\n\tif v := nodeAttr(ds.cur, \"target\"); v != \"\" {\n\t\tn.Target = v\n\t}\n\tn.MutateBlock(findNearestBlockAncestor(ds.cur))\n\treturn n\n}",
"func (text *Text) Link(url string, link *Text) *Text {\n\ttext.Spans = append(text.Spans, Span{\n\t\tContent: url,\n\t\tLink: link,\n\t})\n\treturn text\n}",
"func (e *SourceError) SetLink(errorLink string) {\n\terrorLink = strings.ReplaceAll(errorLink, \"{{Path}}\", e.Path)\n\terrorLink = strings.ReplaceAll(errorLink, \"{{Line}}\", strconv.Itoa(e.Line))\n\n\te.Link = \"<a href=\" + errorLink + \">\" + e.Path + \":\" + strconv.Itoa(e.Line) + \"</a>\"\n}",
"func (r *Repo) GitHubHTMLURL() string {\n\tif r.IsGitHubRepo() {\n\t\treturn (&url.URL{Scheme: \"https\", Host: \"github.com\", Path: \"/\" + strings.TrimPrefix(r.URI, \"github.com/\")}).String()\n\t}\n\treturn \"\"\n}",
"func (prodController *ProducersController) FormatAsRelativeLink(params ...httprouter.Param) string {\n\treturn producersPath\n}",
"func HTMLURL(v string) predicate.User {\n\treturn predicate.User(sql.FieldEQ(FieldHTMLURL, v))\n}",
"func HTMLURLLTE(v string) predicate.GithubRelease {\n\treturn predicate.GithubRelease(sql.FieldLTE(FieldHTMLURL, v))\n}",
"func Href(value string) *SimpleElement { return newSEString(\"href\", value) }",
"func (u *User) HTMLURL() string {\n\treturn conf.Server.ExternalURL + u.Name\n}",
"func linkMentionsAndHashtags(htmlText template.HTML, mentionsUsername, hashtags []string) template.HTML {\n\n\ttext := string(htmlText)\n\tfor _, tag := range mentionsUsername {\n\t\ttext = strings.Replace(text, \"@\"+tag, \"<a class='mention-link' href='/user/\"+tag+\"'>@\"+tag+\"</a>\", -1)\n\t}\n\n\tfor _, tag := range hashtags {\n\t\ttext = strings.Replace(text, \"#\"+tag, \"<a class='hashtag-link' href='/search?tag=\"+tag+\"'>#\"+tag+\"</a>\", -1)\n\t}\n\n\treturn template.HTML(text)\n}",
"func extractLink(attrs []html.Attribute) string {\n\tfor _, attr := range attrs {\n\t\tif attr.Key == hrefAttr {\n\t\t\treturn attr.Val\n\t\t}\n\t}\n\treturn \"\"\n}",
"func GithubLink(module string, file string, ref string, line int) string {\n\t// A module may extend into a github repo, rather than just point directly at it\n\t// In this case, we need to split the module after the third path component and\n\t// attach the remainder to the file to construct the link\n\tconst githubRepoPathLength = 3\n\tsplit := strings.Split(module, \"/\")\n\tif len(split) > githubRepoPathLength {\n\t\tfile = strings.Join(append(split[githubRepoPathLength:], file), \"/\")\n\t\tmodule = strings.Join(split[:githubRepoPathLength], \"/\")\n\t}\n\treturn fmt.Sprintf(\"https://%s/tree/%s/%s#L%d\", module, ref, file, line)\n}",
"func (f *File) Link(token string) string {\n\treturn fmt.Sprintf(FileEndpoint, token, f.FilePath)\n}",
"func HTMLURLLT(v string) predicate.GithubRelease {\n\treturn predicate.GithubRelease(sql.FieldLT(FieldHTMLURL, v))\n}",
"func (c *Collector) Link() string {\n\treturn URLForResults(c.referenceID, c.config)\n}",
"func (r *RepoInfo) Link() string {\n\tswitch r.RepoHost {\n\tcase GoogleCode:\n\t\treturn fmt.Sprintf(\"https://code.google.com/p/%s\", r.FullName)\n\tdefault:\n\t\treturn (&url.URL{Scheme: \"https\", Host: string(r.RepoHost), Path: \"/\" + r.FullName}).String()\n\t}\n}",
"func CreateLink(_ web.C, w http.ResponseWriter, r *http.Request) {\n\taccount := r.Header.Get(\"X-Remote-User\")\n\tl := Link{\n\t\tShortLink: uniuri.New(),\n\t\tTarget: r.FormValue(\"t\"),\n\t\tOwner: account,\n\t}\n\tlinks[l.ShortLink] = l\n\n\tfmt.Fprintf(w, \"%s\\n\", l.ShortLink)\n}",
"func NewLink(link, text string) Element {\n\ta := NewTagElement(\"a\")\n\ta.Add(NewTextElement(text))\n\ta.SetAttr(\"href\", link)\n\n\treturn a\n}",
"func Link(children ...Element) *CompoundElement { return newCE(\"Link\", children) }",
"func (o GroupBadgeOutput) LinkUrl() pulumi.StringOutput {\n\treturn o.ApplyT(func(v *GroupBadge) pulumi.StringOutput { return v.LinkUrl }).(pulumi.StringOutput)\n}",
"func (b *Binary) Link() string {\n\treturn fmt.Sprintf(`/data/%s/%d/%s/%s`, b.TableName(), b.ID, \"data\", b.Hash)\n}",
"func NewLink(caption, href string) *Element {\n\tlink := NewElement(\"a\")\n\tif caption != \"\" {\n\t\tlink.SetAttribute(\"href\", href)\n\t} else {\n\t\tlink.SetAttribute(\"href\", \"#\")\n\t}\n\tif caption != \"\" {\n\t\tlink.AddElement(NewText(caption))\n\t}\n\treturn link\n}",
"func (this *MarkupConfluence) anchor(anchorName string) string {\n\treturn fmt.Sprintf(\"{anchor:%s}\\n\", anchorName)\n}",
"func link(p *parser, out *bytes.Buffer, data []byte, offset int) int {\n\t// no links allowed inside regular links, footnote, and deferred footnotes\n\tif p.insideLink && (offset > 0 && data[offset-1] == '[' || len(data)-1 > offset && data[offset+1] == '^') {\n\t\treturn 0\n\t}\n\n\t// [text] == regular link\n\t// ![alt] == image\n\t// ^[text] == inline footnote\n\t// [^refId] == deferred footnote\n\t// [@text] == citation\n\t// [-@text] == citation, add to reference, but suppress output\n\tvar t linkType\n\tif offset > 0 && data[offset-1] == '!' {\n\t\tt = linkImg\n\t\t// if footnotes extension is ON and we've seen \"![^\", then it's not an\n\t\t// image, it's a deferred footnote:\n\t\tif p.flags&EXTENSION_FOOTNOTES != 0 && len(data)-1 > offset && data[offset+1] == '^' {\n\t\t\tt = linkDeferredFootnote\n\t\t}\n\t} else if offset > 0 && data[offset-1] == '@' {\n\t\tt = linkCitation\n\t} else if offset > 0 && data[offset-1] == '-' {\n\t\tt = linkCitation\n\t} else if p.flags&EXTENSION_FOOTNOTES != 0 {\n\t\tif offset > 0 && data[offset-1] == '^' {\n\t\t\tt = linkInlineFootnote\n\t\t} else if len(data)-1 > offset && data[offset+1] == '^' {\n\t\t\tt = linkDeferredFootnote\n\t\t}\n\t}\n\n\tdata = data[offset:]\n\n\tvar (\n\t\ti = 1\n\t\tnoteId int\n\t\ttitle, link []byte\n\t\ttextHasNl = false\n\t)\n\n\tif t == linkDeferredFootnote {\n\t\ti++\n\t}\n\n\t// look for the matching closing bracket\n\tfor level := 1; level > 0 && i < len(data); i++ {\n\t\tswitch {\n\t\tcase data[i] == '\\n':\n\t\t\ttextHasNl = true\n\n\t\tcase data[i-1] == '\\\\':\n\t\t\tcontinue\n\n\t\tcase data[i] == '[':\n\t\t\tlevel++\n\n\t\tcase data[i] == ']':\n\t\t\tlevel--\n\t\t\tif level <= 0 {\n\t\t\t\ti-- // compensate for extra i++ in for loop\n\t\t\t}\n\t\t}\n\t}\n\n\tif i >= len(data) {\n\t\treturn 0\n\t}\n\ttxtE := i\n\ti++\n\n\t// skip any amount of whitespace or newline\n\t// (this is much more lax than original markdown syntax)\n\tfor i < len(data) && isspace(data[i]) {\n\t\ti++\n\t}\n\n\t// TODO(miek): parse p. 23 parts here (title)\n\t// [@!RFC2534 p. 23], normative\n\t// [@?RFC2535 p. 23], informative\n\t// [@[!|?]draft#1 text]\n\t// [-@RFC] : suppress output, but add to the citation list\n\tif (t == linkCitation || data[1] == '@' || data[1] == '-') && p.flags&EXTENSION_CITATION != 0 {\n\t\tvar (\n\t\t\tspaceB int\n\t\t\tid []byte\n\t\t\ttyp byte\n\t\t\tsuppress bool\n\t\t\tseq = -1\n\t\t)\n\t\ttyp = 'i'\n\t\tk := 1\n\t\tif data[k] == '-' {\n\t\t\tsuppress = true\n\t\t\tk++\n\t\t}\n\t\tk++\n\t\tif data[k] == '!' {\n\t\t\ttyp = 'n'\n\t\t\tk++\n\t\t} else if data[k] == '?' {\n\t\t\ttyp = 'i'\n\t\t\tk++\n\t\t}\n\n\t\tfor j := k; j < txtE; j++ {\n\t\t\tif isspace(data[j]) {\n\t\t\t\tif spaceB == 0 {\n\t\t\t\t\tspaceB = j\n\t\t\t\t\ttitle = data[j+1 : txtE]\n\t\t\t\t\tid = data[k:spaceB]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif spaceB == 0 {\n\t\t\tid = data[k:txtE]\n\t\t}\n\n\t\tif id == nil {\n\t\t\tid = data[k:txtE]\n\t\t}\n\t\tfor j := 0; j < len(id); j++ {\n\t\t\tif id[j] == '#' {\n\t\t\t\tchunk := id[j:]\n\t\t\t\tif len(chunk) > 1 {\n\t\t\t\t\tnum, err := strconv.Atoi(string(chunk[1:]))\n\t\t\t\t\tif err == nil {\n\t\t\t\t\t\tseq = num\n\t\t\t\t\t\tid = id[:j]\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif c, ok := p.citations[string(id)]; !ok {\n\t\t\tp.citations[string(id)] = &citation{link: id, title: title, typ: typ, seq: seq}\n\t\t} else {\n\t\t\tswitch c.typ {\n\t\t\tcase 0:\n\t\t\t\tc.typ = typ\n\t\t\tcase 'i':\n\t\t\t\tif typ == 'n' {\n\t\t\t\t\tprintf(p, \"upgrading citation `%s' from informative to normative\", string(id))\n\t\t\t\t\tc.typ = typ\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif !suppress {\n\t\t\tp.r.Citation(out, id, title)\n\t\t}\n\t\treturn txtE + 1\n\t}\n\n\tswitch {\n\t// inline style link\n\tcase i < len(data) && data[i] == '(':\n\t\t// skip initial whitespace\n\t\ti++\n\n\t\tfor i < len(data) && isspace(data[i]) {\n\t\t\ti++\n\t\t}\n\n\t\tlinkB := i\n\n\t\t// look for link end: ' \" ), check for new openning\n\t\t// braces and take this into account, this may lead\n\t\t// for overshooting and probably will require some\n\t\t// finetuning.\n\t\tbrace := 0\n\tfindlinkend:\n\t\tfor i < len(data) {\n\t\t\tswitch {\n\t\t\tcase data[i] == '\\\\':\n\t\t\t\ti += 2\n\n\t\t\tcase data[i] == '(':\n\t\t\t\tbrace++\n\t\t\t\ti++\n\n\t\t\tcase data[i] == ')':\n\t\t\t\tif brace <= 0 {\n\t\t\t\t\tbreak findlinkend\n\t\t\t\t}\n\t\t\t\tbrace--\n\t\t\t\ti++\n\n\t\t\tcase data[i] == '\\'' || data[i] == '\"':\n\t\t\t\tbreak findlinkend\n\n\t\t\tdefault:\n\t\t\t\ti++\n\t\t\t}\n\t\t}\n\n\t\tif i >= len(data) || brace > 0 {\n\t\t\treturn 0\n\t\t}\n\t\tlinkE := i\n\n\t\t// look for title end if present\n\t\ttitleB, titleE := 0, 0\n\t\tif data[i] == '\\'' || data[i] == '\"' {\n\t\t\ti++\n\t\t\ttitleB = i\n\n\t\tfindtitleend:\n\t\t\tfor i < len(data) {\n\t\t\t\tswitch {\n\t\t\t\tcase data[i] == '\\\\':\n\t\t\t\t\ti += 2\n\n\t\t\t\tcase data[i] == ')':\n\t\t\t\t\tbreak findtitleend\n\n\t\t\t\tdefault:\n\t\t\t\t\ti++\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif i >= len(data) {\n\t\t\t\treturn 0\n\t\t\t}\n\n\t\t\t// skip whitespace after title\n\t\t\ttitleE = i - 1\n\t\t\tfor titleE > titleB && isspace(data[titleE]) {\n\t\t\t\ttitleE--\n\t\t\t}\n\n\t\t\t// check for closing quote presence\n\t\t\tif data[titleE] != '\\'' && data[titleE] != '\"' {\n\t\t\t\ttitleB, titleE = 0, 0\n\t\t\t\tlinkE = i\n\t\t\t}\n\t\t}\n\n\t\t// remove whitespace at the end of the link\n\t\tfor linkE > linkB && isspace(data[linkE-1]) {\n\t\t\tlinkE--\n\t\t}\n\n\t\t// remove optional angle brackets around the link\n\t\tif data[linkB] == '<' {\n\t\t\tlinkB++\n\t\t}\n\t\tif data[linkE-1] == '>' {\n\t\t\tlinkE--\n\t\t}\n\n\t\t// build escaped link and title\n\t\tif linkE > linkB {\n\t\t\tlink = data[linkB:linkE]\n\t\t}\n\n\t\tif titleE > titleB {\n\t\t\ttitle = data[titleB:titleE]\n\t\t}\n\n\t\ti++\n\n\t// reference style link\n\tcase i < len(data)-1 && data[i] == '[' && data[i+1] != '^':\n\t\tvar id []byte\n\n\t\t// look for the id\n\t\ti++\n\t\tlinkB := i\n\t\tfor i < len(data) && data[i] != ']' {\n\t\t\ti++\n\t\t}\n\t\tif i >= len(data) {\n\t\t\treturn 0\n\t\t}\n\t\tlinkE := i\n\n\t\t// find the reference\n\t\tif linkB == linkE {\n\t\t\tif textHasNl {\n\t\t\t\tvar b bytes.Buffer\n\n\t\t\t\tfor j := 1; j < txtE; j++ {\n\t\t\t\t\tswitch {\n\t\t\t\t\tcase data[j] != '\\n':\n\t\t\t\t\t\tb.WriteByte(data[j])\n\t\t\t\t\tcase !isspace(data[j-1]):\n\t\t\t\t\t\tb.WriteByte(' ')\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tid = b.Bytes()\n\t\t\t} else {\n\t\t\t\tid = data[1:txtE]\n\t\t\t}\n\t\t} else {\n\t\t\tid = data[linkB:linkE]\n\t\t}\n\n\t\t// find the reference with matching id (ids are case-insensitive)\n\t\tkey := string(bytes.ToLower(id))\n\t\tlr, ok := p.refs[key]\n\t\tif !ok {\n\t\t\treturn 0\n\t\t}\n\n\t\t// keep link and title from reference\n\t\tlink = lr.link\n\t\ttitle = lr.title\n\t\ti++\n\n\t// shortcut reference style link or reference or inline footnote\n\tdefault:\n\t\tvar id []byte\n\n\t\t// craft the id\n\t\tif textHasNl {\n\t\t\tvar b bytes.Buffer\n\n\t\t\tfor j := 1; j < txtE; j++ {\n\t\t\t\tswitch {\n\t\t\t\tcase data[j] != '\\n':\n\t\t\t\t\tb.WriteByte(data[j])\n\t\t\t\tcase !isspace(data[j-1]):\n\t\t\t\t\tb.WriteByte(' ')\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tid = b.Bytes()\n\t\t} else {\n\t\t\tif t == linkDeferredFootnote {\n\t\t\t\tid = data[2:txtE] // get rid of the ^\n\t\t\t} else {\n\t\t\t\tid = data[1:txtE]\n\t\t\t}\n\t\t}\n\n\t\tkey := string(bytes.ToLower(id))\n\t\tif t == linkInlineFootnote {\n\t\t\t// is RFC7328 mode is enabled, check the footnote, to see if it adheres\n\t\t\t// to the following format. If so, skip adding. Instead\n\t\t\t// either log about this or generate a index.\n\t\t\tif x := p.rfc7328Index(out, id); x > 0 {\n\t\t\t\treturn txtE + 1\n\t\t\t}\n\t\t\tif x := p.rfc7328Caption(out, id); x > 0 {\n\t\t\t\treturn txtE + 1\n\t\t\t}\n\n\t\t\t// create a new reference\n\t\t\tnoteId = len(p.notes) + 1\n\n\t\t\tvar fragment []byte\n\t\t\tif len(id) > 0 {\n\t\t\t\tif len(id) < 16 {\n\t\t\t\t\tfragment = make([]byte, len(id))\n\t\t\t\t} else {\n\t\t\t\t\tfragment = make([]byte, 16)\n\t\t\t\t}\n\t\t\t\tcopy(fragment, slugify(id))\n\t\t\t} else {\n\t\t\t\tfragment = append([]byte(\"footnote-\"), []byte(strconv.Itoa(noteId))...)\n\t\t\t}\n\n\t\t\tref := &reference{\n\t\t\t\tnoteId: noteId,\n\t\t\t\thasBlock: false,\n\t\t\t\tlink: fragment,\n\t\t\t\ttitle: id,\n\t\t\t}\n\n\t\t\tp.notes = append(p.notes, ref)\n\n\t\t\tlink = ref.link\n\t\t\ttitle = ref.title\n\t\t} else {\n\t\t\t// find the reference with matching id\n\t\t\tlr, ok := p.refs[key]\n\t\t\tif !ok {\n\t\t\t\treturn 0\n\t\t\t}\n\n\t\t\tif t == linkDeferredFootnote {\n\t\t\t\tlr.noteId = len(p.notes) + 1\n\t\t\t\tp.notes = append(p.notes, lr)\n\t\t\t}\n\n\t\t\t// keep link and title from reference\n\t\t\tlink = lr.link\n\t\t\t// if inline footnote, title == footnote contents\n\t\t\ttitle = lr.title\n\t\t\tnoteId = lr.noteId\n\t\t}\n\n\t\t// rewind the whitespace\n\t\ti = txtE + 1\n\t}\n\n\t// build content: img alt is escaped, link content is parsed\n\tvar content bytes.Buffer\n\tif txtE > 1 {\n\t\tif t == linkImg {\n\t\t\tcontent.Write(data[1:txtE])\n\t\t} else {\n\t\t\t// links cannot contain other links, so turn off link parsing temporarily\n\t\t\tinsideLink := p.insideLink\n\t\t\tp.insideLink = true\n\t\t\tp.inline(&content, data[1:txtE])\n\t\t\tp.insideLink = insideLink\n\t\t}\n\t}\n\n\tvar uLink []byte\n\tif t == linkNormal || t == linkImg {\n\t\tif len(link) > 0 {\n\t\t\tvar uLinkBuf bytes.Buffer\n\t\t\tunescapeText(&uLinkBuf, link)\n\t\t\tuLink = uLinkBuf.Bytes()\n\t\t}\n\n\t\t// links need something to click on and somewhere to go\n\t\t//if len(uLink) == 0 || (t == linkNormal && content.Len() == 0) {\n\t\tif len(uLink) == 0 {\n\t\t\treturn 0\n\t\t}\n\t}\n\n\t// call the relevant rendering function\n\tswitch t {\n\tcase linkNormal:\n\t\tp.r.Link(out, uLink, title, content.Bytes())\n\n\tcase linkImg:\n\t\toutSize := out.Len()\n\t\toutBytes := out.Bytes()\n\t\tif outSize > 0 && outBytes[outSize-1] == '!' {\n\t\t\tout.Truncate(outSize - 1)\n\t\t}\n\n\t\tvar cooked bytes.Buffer\n\t\tp.inline(&cooked, title)\n\n\t\tp.r.SetAttr(p.ial)\n\t\tp.ial = nil\n\t\tp.r.Image(out, uLink, cooked.Bytes(), content.Bytes(), p.insideFigure)\n\n\tcase linkInlineFootnote:\n\t\toutSize := out.Len()\n\t\toutBytes := out.Bytes()\n\t\tif outSize > 0 && outBytes[outSize-1] == '^' {\n\t\t\tout.Truncate(outSize - 1)\n\t\t}\n\t\tp.r.FootnoteRef(out, link, noteId)\n\n\tcase linkDeferredFootnote:\n\t\tp.r.FootnoteRef(out, link, noteId)\n\n\tdefault:\n\t\treturn 0\n\t}\n\n\treturn i\n}",
"func parseHTML(body []byte, linkChan chan string, sigChan chan bool) {\n\turl := make(map[string]int)\n\t// uniqueURLs := make([]string, 0)\n\tdefer func() {\n\t\tsigChan <- true\n\t}()\n\ttokens := html.NewTokenizer(bytes.NewReader(body))\n\tfor {\n\t\ttoken := tokens.Next()\n\t\tswitch token {\n\t\tcase html.ErrorToken:\n\t\t\tif tokens.Err() == io.EOF {\n\t\t\t\tfmt.Println(\"reached end of file\")\n\t\t\t\treturn\n\t\t\t}\n\t\tcase html.StartTagToken:\n\t\t\ttag := tokens.Token()\n\t\t\tif tag.Data == \"a\" {\n\t\t\t\tfor _, tt := range tag.Attr {\n\t\t\t\t\tif tt.Key == \"href\" {\n\t\t\t\t\t\tif _, ok := url[tt.Val]; !ok {\n\t\t\t\t\t\t\tif strings.HasPrefix(tt.Val, \"http\") {\n\t\t\t\t\t\t\t\tlinkChan <- tt.Val\n\t\t\t\t\t\t\t\t// uniqueURLs = append(uniqueURLs, tt.Val)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}",
"func strFormatOut(input *gofeed.Item) string {\n\tvar output string = input.Title + \"\\n\" + input.Link + \"\\n\"\n\treturn output\n}",
"func (a AttrValueFormatter) Format() string {\n\tif a.FormatHref && a.Name == \"href\" {\n\t\tu, _ := url.Parse(a.Value)\n\t\tcompoName := app.ComponentNameFromURL(u)\n\n\t\tif a.Factory.Registered(compoName) {\n\t\t\tu.Scheme = \"compo\"\n\t\t\tu.Path = \"/\" + compoName\n\t\t}\n\t\treturn u.String()\n\t}\n\n\tif !strings.HasPrefix(a.Name, \"on\") {\n\t\treturn a.Value\n\t}\n\n\tif strings.HasPrefix(a.Value, \"js:\") {\n\t\treturn strings.TrimPrefix(a.Value, \"js:\")\n\t}\n\n\treturn fmt.Sprintf(`callGoEventHandler('%s', '%s', this, event)`,\n\t\ta.CompoID,\n\t\ta.Value,\n\t)\n}",
"func (c *Collector) Link() string {\n\treturn \"\"\n}",
"func HTMLURLGTE(v string) predicate.GithubRelease {\n\treturn predicate.GithubRelease(sql.FieldGTE(FieldHTMLURL, v))\n}",
"func (r renderer) AutoLink(out *bytes.Buffer, link []byte, kind int) {}",
"func wrapImgWithLink(urlPrefix string, buf *bytes.Buffer, token html.Token) {\n\t// Extract \"src\" and \"alt\" attributes\n\tvar src, alt string\n\tfor i := range token.Attr {\n\t\tswitch token.Attr[i].Key {\n\t\tcase \"src\":\n\t\t\tsrc = token.Attr[i].Val\n\t\tcase \"alt\":\n\t\t\talt = token.Attr[i].Val\n\t\t}\n\t}\n\n\t// Skip in case the \"src\" is empty\n\tif src == \"\" {\n\t\tbuf.WriteString(token.String())\n\t\treturn\n\t}\n\n\t// Skip in case the \"src\" is data url\n\tif strings.HasPrefix(src, \"data:\") {\n\t\tbuf.WriteString(token.String())\n\t\treturn\n\t}\n\n\t// Prepend repository base URL for internal links\n\tneedPrepend := !isLink([]byte(src))\n\tif needPrepend {\n\t\turlPrefix = strings.Replace(urlPrefix, \"/src/\", \"/raw/\", 1)\n\t\tif src[0] != '/' {\n\t\t\turlPrefix += \"/\"\n\t\t}\n\t}\n\n\tbuf.WriteString(`<a href=\"`)\n\tif needPrepend {\n\t\tbuf.WriteString(urlPrefix)\n\t\tbuf.WriteString(src)\n\t} else {\n\t\tbuf.WriteString(src)\n\t}\n\tbuf.WriteString(`\">`)\n\n\tif needPrepend {\n\t\tsrc = strings.ReplaceAll(urlPrefix+src, \" \", \"%20\")\n\t\tbuf.WriteString(`<img src=\"`)\n\t\tbuf.WriteString(src)\n\t\tbuf.WriteString(`\"`)\n\n\t\tif len(alt) > 0 {\n\t\t\tbuf.WriteString(` alt=\"`)\n\t\t\tbuf.WriteString(alt)\n\t\t\tbuf.WriteString(`\"`)\n\t\t}\n\n\t\tbuf.WriteString(`>`)\n\n\t} else {\n\t\tbuf.WriteString(token.String())\n\t}\n\n\tbuf.WriteString(`</a>`)\n}",
"func generateLink(lh *linkHandler) tea.Cmd {\n\treturn func() tea.Msg {\n\t\tselect {\n\t\tcase err := <-lh.err:\n\t\t\treturn errMsg{err}\n\t\tcase tok := <-lh.token:\n\t\t\treturn linkTokenCreatedMsg(tok)\n\t\t}\n\t}\n}",
"func link(name upspin.PathName, issue *maintner.GitHubIssue) *upspin.DirEntry {\n\tp, _ := path.Parse(name)\n\tlink := p.Drop(2).Path() + upspin.PathName(fmt.Sprintf(\"/all/%d\", issue.Number))\n\treturn &upspin.DirEntry{\n\t\tPacking: upspin.PlainPack,\n\t\tName: name,\n\t\tSignedName: name,\n\t\tLink: link,\n\t\tAttr: upspin.AttrLink,\n\t\tTime: upspin.Now(),\n\t}\n}",
"func Link(props *LinkProps, children ...Element) *LinkElem {\n\trProps := &_LinkProps{\n\t\tBasicHTMLElement: newBasicHTMLElement(),\n\t}\n\n\tif props != nil {\n\t\tprops.assign(rProps)\n\t}\n\n\treturn &LinkElem{\n\t\tElement: createElement(\"link\", rProps, children...),\n\t}\n}",
"func linkForm(stack string) string {\n\tregex := regexp.MustCompile(\"(\\t.*:[0-9]*)\")\n\tlines := regex.FindAllString(stack, -1)\n\tfor _, line := range lines {\n\t\tregexSplit := regexp.MustCompile(\":\")\n\t\tsplits := regexSplit.Split(line, -1)\n\t\tlink := \"<a href='/debug/?path=\" + splits[0] + \"&line=\" + splits[1] + \"'>\" + line + \"</a>\"\n\t\treg := regexp.MustCompile(line)\n\t\tstack = reg.ReplaceAllString(stack, link)\n\t}\n\treturn stack\n}",
"func (feed *Feed) AddLink(href string, rel string, typeLink string, templated bool) {\n\tvar l Link\n\n\tl.Href = href\n\tl.Rel = append(l.Rel, rel)\n\tl.TypeLink = typeLink\n\tif templated == true {\n\t\tl.Templated = true\n\t}\n\n\tfeed.Links = append(feed.Links, l)\n}",
"func (r renderer) BlockHtml(out *bytes.Buffer, text []byte) {}",
"func LambdaHref(lambdaID interface{}) string {\n\tparamlambdaID := strings.TrimLeftFunc(fmt.Sprintf(\"%v\", lambdaID), func(r rune) bool { return r == '/' })\n\treturn fmt.Sprintf(\"/p7/lambdas/%v\", paramlambdaID)\n}",
"func TradeHref(tradeID interface{}) string {\n\tparamtradeID := strings.TrimLeftFunc(fmt.Sprintf(\"%v\", tradeID), func(r rune) bool { return r == '/' })\n\treturn fmt.Sprintf(\"/v1/trade/show/%v\", paramtradeID)\n}",
"func makeLinks(stack string) string {\n\tre := regexp.MustCompile(\"(\\t.*:[0-9]*)\")\n\tlines := re.FindAllString(stack, -1)\n\tfor _, line := range lines {\n\t\tregexSplit := regexp.MustCompile(\":\")\n\t\tsplits := regexSplit.Split(line, -1)\n\t\tlink := \"<a href='/debug?path=\" + splits[0] + \"&line=\" + splits[1] + \"'>\" + line + \"</a>\"\n\t\treg := regexp.MustCompile(line)\n\t\tstack = reg.ReplaceAllString(stack, link)\n\t}\n\treturn stack\n}",
"func linkExtractor(body io.Reader) (links []string, err error) {\n\tdoc, err := html.Parse(body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\temitLink := func(link string) {\n\t\tlinks = append(links, link)\n\t}\n\tvar f func(*html.Node)\n\tf = func(n *html.Node) {\n\t\tif n.Type == html.ElementNode && n.Data == \"a\" {\n\t\t\tattrs := n.Attr\n\t\t\tfor _, a := range attrs {\n\t\t\t\tif a.Key == \"href\" {\n\t\t\t\t\temitLink(a.Val)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor c := n.FirstChild; c != nil; c = c.NextSibling {\n\t\t\tf(c)\n\t\t}\n\t}\n\tf(doc)\n\treturn links, err\n}",
"func (s *sanitizer) sanitizeLink(l string) string {\n\tvar p *url.URL\n\tvar err error\n\tif strings.TrimSpace(l) == \"\" {\n\t\treturn \"\"\n\t}\n\tif isInternalLink(l) {\n\t\treturn l\n\t}\n\tif s.ForceHrefLink {\n\t\treturn s.forceHttpScheme(l)\n\t}\n\tp, err = url.Parse(l)\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\tif s.uriSchemesMap[p.Scheme] {\n\t\treturn \"\"\n\t}\n\treturn p.String()\n}",
"func (p *Page) Link(s string) (string, error) {\n\tu, err := url.Parse(s)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// If the page is 0 or 1, we want to drop the page param from the query.\n\t// Otherwise add the page param with the value.\n\tq := u.Query()\n\tif p.Number <= 1 {\n\t\tq.Del(QueryKeyPage)\n\t} else {\n\t\tq.Set(QueryKeyPage, strconv.FormatUint(p.Number, 10))\n\t}\n\tu.RawQuery = q.Encode()\n\n\treturn u.String(), nil\n}",
"func TargetHref(value string) *SimpleElement { return newSEString(\"targetHref\", value) }",
"func (l *Link) Link() string {\n\tif l == nil {\n\t\treturn \"0\"\n\t}\n\treturn format((*big.Int)(l), 18)\n}",
"func htmlFmt(w io.Writer, x interface{}, format string) {\n\twriteAny(w, x, true)\n}",
"func LinkTag(e *Context) error {\n\tpreconnectAdded := false\n\n\tfor n := e.DOM.RootNode; n != nil; n = htmlnode.Next(n) {\n\t\tif !preconnectAdded && isLinkAnyGoogleFont(n) {\n\t\t\taddLinkGoogleFontPreconnect(n)\n\t\t\tpreconnectAdded = true\n\t\t}\n\t\tif isLinkGoogleFont(n) {\n\t\t\taddDisplayOptional(n)\n\t\t}\n\t}\n\n\taddLinkPublisherOriginPreconnect(e.DOM.HeadNode, e.DocumentURL)\n\treturn nil\n}",
"func TestSimpleParser_ParseLinksWithFilters(t *testing.T) {\n\t// \"content\" : \"expectedResult\"\n\ttestData := map[string][]string{\n\t\tMockContent: {\"http://example.com_transformed\", \"http://example.com/docs_transformed\", \"http://example.com/something_transformed\", \"google.com/news_transformed\"},\n\t\t`<html>\n\t\t\t<p>Hello world!</p>\n\t\t\thref=\"not link\"\n\t\t\thref='http://nonono.com'\n\t\t</html>`: {},\n\t}\n\n\tfilterFunc := func(link string) bool {\n\t\treturn link == \"http://example.com\" || link == \"google.com/news\"\n\t}\n\n\ttransformFunc := func(link string) string {\n\t\treturn link + \"_transformed\"\n\t}\n\n\tfor content, expectedLinks := range testData {\n\t\tlinks, _ := simpleParser{content}.ParseLinksWithFilters(filterFunc, transformFunc, true)\n\t\tif !same(links, expectedLinks) {\n\t\t\tt.Logf(\"\\nExpected links: %s\\nActual links:%s\", expectedLinks, links)\n\t\t\tt.Fail()\n\t\t}\n\t}\n}",
"func fmtHTML(in string) string {\n\tdoc, err := html.Parse(strings.NewReader(in))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tout := &bytes.Buffer{}\n\tif err := html.Render(out, doc); err != nil {\n\t\tpanic(err)\n\t}\n\treturn string(out.Bytes())\n}",
"func (p pagination) HTML(total int, offset int, link string) string {\n\t// caculate pages\n\tvar pages int\n\tif total == model.PAGE_SIZE {\n\t\tpages = 1\n\t} else {\n\t\tpages = total/model.PAGE_SIZE + 1\n\t}\n\t// generate pagination html\n\tvar pagination string\n\tif pages > 1 {\n\t\tfor i := 1; i <= pages; i++ {\n\t\t\tclass := \"waves-effect\"\n\t\t\tif i == offset+1 {\n\t\t\t\tclass = \"active\"\n\t\t\t}\n\t\t\tpagination = pagination + \"<li class=\\\"\" + class + \"\\\"><a href=\\\"\" + link + \"?page=\" + strconv.Itoa(i-1) + \"\\\">\" +\n\t\t\t\tstrconv.Itoa(i) + \"</a></li>\"\n\t\t}\n\t}\n\treturn pagination\n}",
"func (ctx *CreateFeedContext) CreatedLink(r *FeedLink) error {\n\tif ctx.ResponseData.Header().Get(\"Content-Type\") == \"\" {\n\t\tctx.ResponseData.Header().Set(\"Content-Type\", \"application/json\")\n\t}\n\treturn ctx.ResponseData.Service.Send(ctx.Context, 201, r)\n}",
"func (app *application) Link(additional uint) error {\n\tendpoint := fmt.Sprintf(\"%s%d\", \"/links/\", additional)\n\turl := fmt.Sprintf(baseFormat, app.url, endpoint)\n\tresp, err := app.client.R().\n\t\tSetHeader(shared.TokenHeadKeyname, app.token).\n\t\tPost(url)\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif resp.StatusCode() == http.StatusOK {\n\t\treturn nil\n\t}\n\n\treturn errors.New(string(resp.Body()))\n}",
"func enrichLinkTypeSingle(ctx *workItemLinkContext, single *app.WorkItemLinkTypeSingle) error {\n\t// Add \"links\" element\n\trelatedURL := rest.AbsoluteURL(ctx.Request, ctx.LinkFunc(*single.Data.ID))\n\tsingle.Data.Links = &app.GenericLinks{\n\t\tSelf: &relatedURL,\n\t\tRelated: &relatedURL,\n\t}\n\treturn nil\n}",
"func FormatHTML(buf *bytes.Buffer, tables []*Table) {\n\terr := htmlTemplate.Execute(buf, tables)\n\tif err != nil {\n\t\t// Only possible errors here are template not matching data structure.\n\t\t// Don't make caller check - it's our fault.\n\t\tpanic(err)\n\t}\n}",
"func toHtml(fname string) string {\n\treturn strings.Replace(fname, \".md\", \".html\", -1)\n}",
"func (amv *AMV) Link() string {\n\treturn \"/amv/\" + amv.ID\n}",
"func (f *Asciidoc) LocalHref(headerText string) (string, error) {\n\t//TODO: seems lik template adds a []: return fmt.Sprintf(\"xref:%s[%s]\", f.genref(headerText), headerText), nil\n\treturn fmt.Sprintf(\"xref:%s\", f.genref(headerText)), nil\n}",
"func (m *Message) StripLinkMarkup() string {\r\n\tre := regexp.MustCompile(\"<(.*?)>\")\r\n\tresult := re.FindAllStringSubmatch(m.Text(), -1)\r\n\ttext := m.Text()\r\n\r\n\tvar link string\r\n\tfor _, c := range result {\r\n\t\tlink = c[len(c)-1]\r\n\r\n\t\t// Done change Channel, User or Specials tags\r\n\t\tif link[:2] == \"#C\" || link[:2] == \"@U\" || link[:1] == \"!\" {\r\n\t\t\tcontinue\r\n\t\t}\r\n\r\n\t\turl := link\r\n\t\tif strings.Contains(link, \"|\") {\r\n\t\t\tsplits := strings.Split(link, \"|\")\r\n\t\t\turl = splits[1]\r\n\t\t}\r\n\r\n\t\ttext = strings.Replace(text, \"<\"+link+\">\", url, -1)\r\n\t}\r\n\r\n\treturn text\r\n}",
"func (o LinkOutput) LinkId() pulumi.StringOutput {\n\treturn o.ApplyT(func(v *Link) pulumi.StringOutput { return v.LinkId }).(pulumi.StringOutput)\n}",
"func (rule *Rule) GenerateLinks() ([]string, error) {\n\t//page pattern is {page}\n\tvar links []string\n\tpagePattern := \"{page}\"\n\tif !strings.Contains(rule.LinkPattern, pagePattern) {\n\t\treturn nil, errors.New(utility.Enums().ErrorMessages.LackOfInfo)\n\t}\n\tpage := 1\n\tfor page <= rule.TotalPages {\n\t\tlinks = append(links, strings.ReplaceAll(rule.LinkPattern, pagePattern, strconv.Itoa(page)))\n\t\tpage++\n\t}\n\treturn links, nil\n}",
"func (r *AwsCloudwatchLogGroupLambdaRetentionRule) Link() string {\n\treturn \"https://awslabs.github.io/serverless-rules/rules/lambda/log_retention.html\"\n}",
"func HTMLURLIn(vs ...string) predicate.GithubRelease {\n\treturn predicate.GithubRelease(sql.FieldIn(FieldHTMLURL, vs...))\n}",
"func HTMLURLLTE(v string) predicate.User {\n\treturn predicate.User(sql.FieldLTE(FieldHTMLURL, v))\n}",
"func RenderHTML(toks []*Token) string {\n\tbuf := new(bytes.Buffer)\n\tfor _, t := range toks {\n\t\twriteToken(buf, t)\n\t}\n\treturn buf.String()\n}",
"func (text *TEXT) Href(str string) *TEXT {\n\ttext.href = str\n\treturn text\n}",
"func recordLink(index *Index, r *clangdoc.RecordInfo) string {\n\tfullRecord := index.RecordUsrs[r.USR]\n\tif fullRecord == nil {\n\t\treturn \"\"\n\t}\n\treturn HeaderReferenceFile(fullRecord.DefLocation.Filename) + \"#\" + recordHtmlId(index, r)\n}",
"func (rs accessResources) Link(w http.ResponseWriter, r *http.Request) {\n\tw.Write( []byte( \"Linking...\" ) )\n}",
"func (m Message) URLLink() (*field.URLLinkField, quickfix.MessageRejectError) {\n\tf := &field.URLLinkField{}\n\terr := m.Body.Get(f)\n\treturn f, err\n}",
"func PostLink(w http.ResponseWriter, r *http.Request) {\n\tc := appengine.NewContext(r)\n\n\tdatastore.RunInTransaction(c, func(c appengine.Context) error {\n\n\t\t// Get the link from the body.\n\t\tvar l Link\n\t\tif !gorca.UnmarshalFromBodyOrFail(c, w, r, &l) {\n\t\t\treturn fmt.Errorf(\"unmarshalling\")\n\t\t}\n\n\t\t// Create a new link in the datastore.\n\t\tif !NewLinkHelper(c, w, r, &l) {\n\t\t\treturn fmt.Errorf(\"generating new link\")\n\t\t}\n\n\t\t// Return the updated link back.\n\t\tgorca.WriteJSON(c, w, r, l)\n\n\t\treturn nil\n\t}, nil)\n\n}",
"func TestSimpleParser_ParseLinks(t *testing.T) {\n\t// \"content\" : \"expectedResult\"\n\ttestData := map[string][]string{\n\t\tMockContent: {\"http://example.com\", \"http://example.com/docs\", \"http://example.com/something\", \"google.com/news\", \"http://google.com/news\"},\n\t\t`<html>\n\t\t\t<p>Hello world!</p>\n\t\t\thref=\"not link\"\n\t\t\thref='http://nonono.com'\n\t\t</html>`: {},\n\t}\n\n\tfor content, expectedLinks := range testData {\n\t\tlinks, _ := simpleParser{content}.ParseLinks()\n\t\tif !same(links, expectedLinks) {\n\t\t\tt.Logf(\"\\nExpected links: %s\\nActual links:%s\", expectedLinks, links)\n\t\t\tt.Fail()\n\t\t}\n\t}\n}",
"func GHLinkr(c *gin.Context) {\n\tif c.Query(\"d\") == \"\" {\n\t\tc.JSON(400, gin.H{\"error\": \"missing query param \\\"d\\\"\"})\n\t\treturn\n\t}\n\n\tdecodedLink, err := linkr.Decode(c.Query(\"d\"))\n\tif err != nil {\n\t\tc.JSON(400, gin.H{\"error\": \"invalid linkr data param\", \"ctx\": err})\n\t\treturn\n\t}\n\n\t// Save to user action\n\tdb := bdb.GDB(c)\n\n\terr = db.CreateUserActionURL(decodedLink.PSID, decodedLink.RedirectTo)\n\tif err != nil {\n\t\tfmt.Println(\"LINKR DB ERR TO USER ACTIONS\", err)\n\t}\n\n\tc.Redirect(303, decodedLink.RedirectTo)\n}",
"func FormatRepoURL(host, project string, auth bool) url.URL {\n\tpathPrefix := \"\"\n\tif auth {\n\t\tpathPrefix = \"/a\"\n\t}\n\treturn url.URL{\n\t\tScheme: \"https\",\n\t\tHost: host,\n\t\tPath: fmt.Sprintf(\"%s/%s\", pathPrefix, project),\n\t}\n}",
"func collectLinksFromHtml(htmlResp io.Reader) ([]Link, error) {\n\tdoc, err := html.Parse(htmlResp)\n\tif err != nil {\n\t\tlog.Printf(\"error while parsing htmlResp io.Reader in html.Parse(), error: %s\", err.Error())\n\t\treturn nil, err\n\t}\n\t//log.Printf(\"htmlNOde %+v \\n\", doc)\n\tnodes := getHtmlNodes(doc)\n\t//log.Printf(\"nodes %+v \\n\", nodes)\n\n\tvar links []Link\n\n\tfor _, node := range nodes {\n\t\tlinks = append(links, buildLink(node))\n\t}\n\treturn links, nil\n}",
"func getHTML(str string) template.HTML {\n\tmarkdown := string(blackfriday.Run([]byte(str)))\n\treturn template.HTML(markdown)\n}",
"func (l *Link) String() string {\n\ts := fmt.Sprintf(\"<%s>\", l.URL)\n\tif len(l.Rel) > 0 {\n\t\ts = fmt.Sprintf(`%s; rel=\"%s\"`, s, l.Rel)\n\t}\n\tfor key, value := range l.Attrs {\n\t\ts = fmt.Sprintf(`%s; %s=\"%s\"`, s, key, value)\n\t}\n\treturn s\n}",
"func RenderHTMLWithMetadata(actual string, settings ...configuration.Setting) (string, types.Metadata, error) {\n\tallSettings := append([]configuration.Setting{configuration.WithFilename(\"test.adoc\"), configuration.WithBackEnd(\"html5\")}, settings...)\n\tconfig := configuration.NewConfiguration(allSettings...)\n\tcontentReader := strings.NewReader(actual)\n\tresultWriter := bytes.NewBuffer(nil)\n\tmetadata, err := libasciidoc.Convert(contentReader, resultWriter, config)\n\tif err != nil {\n\t\tlog.Error(err)\n\t\treturn \"\", types.Metadata{}, err\n\t}\n\tif log.IsLevelEnabled(log.DebugLevel) {\n\t\tlog.Debug(resultWriter.String())\n\t}\n\treturn resultWriter.String(), metadata, nil\n}",
"func (u *GithubGistUpsertOne) UpdateHTMLURL() *GithubGistUpsertOne {\n\treturn u.Update(func(s *GithubGistUpsert) {\n\t\ts.UpdateHTMLURL()\n\t})\n}",
"func HtmlTokenExtractor(r io.Reader) ([]*url.URL, error) {\n\tt := html.NewTokenizer(r)\n\n\tlinks := make([]*url.URL, 0)\n\tseenLinks := map[string]bool{}\n\n\tfor {\n\t\ttokenType := t.Next()\n\t\tif tokenType == html.ErrorToken {\n\t\t\tif errors.Is(t.Err(), io.EOF) {\n\t\t\t\treturn links, nil\n\t\t\t}\n\t\t\treturn nil, t.Err()\n\t\t}\n\t\ttoken := t.Token()\n\n\t\t// Only searching for anchor tags, which aren't usually self closing\n\t\tif token.Type != html.StartTagToken || token.DataAtom != atom.A {\n\t\t\tcontinue\n\t\t}\n\t\tlink := hrefValue(token)\n\t\tif link == \"\" {\n\t\t\tcontinue\n\t\t}\n\t\t// Skip the link if we've already seen it\n\t\tif seen, ok := seenLinks[link]; ok && seen {\n\t\t\tcontinue\n\t\t}\n\t\tparsedUrl, err := url.Parse(link)\n\t\tif err != nil {\n\t\t\t// Skip links we're unable to parse\n\t\t\tcontinue\n\t\t}\n\t\tlinks = append(links, parsedUrl)\n\t\tseenLinks[link] = true\n\t}\n}",
"func RenderHTML(actual string, settings ...configuration.Setting) (string, error) {\n\toutput, _, err := RenderHTMLWithMetadata(actual, settings...)\n\treturn output, err\n}",
"func HTMLURLHasSuffix(v string) predicate.GithubRelease {\n\treturn predicate.GithubRelease(sql.FieldHasSuffix(FieldHTMLURL, v))\n}"
] |
[
"0.6838806",
"0.6590129",
"0.65227556",
"0.64854264",
"0.6446466",
"0.6314981",
"0.62476206",
"0.6214651",
"0.61766785",
"0.6005779",
"0.59544235",
"0.5904366",
"0.5898244",
"0.58571225",
"0.58488137",
"0.5781225",
"0.5752235",
"0.57390857",
"0.5702926",
"0.5595581",
"0.55503905",
"0.55308914",
"0.54901344",
"0.548455",
"0.5471177",
"0.5458071",
"0.5431364",
"0.5413981",
"0.54002935",
"0.53959167",
"0.53414303",
"0.531736",
"0.52941495",
"0.5284031",
"0.5263092",
"0.5253996",
"0.5245568",
"0.5212072",
"0.52067846",
"0.51899374",
"0.5189346",
"0.5184548",
"0.5154283",
"0.51534545",
"0.5153326",
"0.51489466",
"0.5143339",
"0.5117462",
"0.5115621",
"0.5109663",
"0.5108767",
"0.5098433",
"0.50975394",
"0.5096814",
"0.508894",
"0.5084753",
"0.50749195",
"0.50659764",
"0.5061905",
"0.5048682",
"0.5036782",
"0.5028544",
"0.50221634",
"0.50022537",
"0.500174",
"0.4987442",
"0.49716356",
"0.49662483",
"0.496183",
"0.49617568",
"0.49568287",
"0.49522698",
"0.49475157",
"0.49335292",
"0.49323705",
"0.4916878",
"0.49133196",
"0.49123248",
"0.49072072",
"0.4906205",
"0.4906083",
"0.4904439",
"0.4893041",
"0.48726353",
"0.48683488",
"0.48648953",
"0.48569334",
"0.484709",
"0.4840526",
"0.48396143",
"0.48362443",
"0.48361742",
"0.4832424",
"0.48319608",
"0.48287946",
"0.4825103",
"0.48183182",
"0.48182705",
"0.48127234",
"0.48124355"
] |
0.8338964
|
0
|
getPullRequestInfo gets the information for a pull request
|
func getPullRequestInfo(p *api.PullRequestPayload) (title, link, by, operator, operateResult, assignees string) {
title = fmt.Sprintf("[PullRequest-%s #%d]: %s\n%s", p.Repository.FullName, p.PullRequest.Index, p.Action, p.PullRequest.Title)
assignList := p.PullRequest.Assignees
assignStringList := make([]string, len(assignList))
for i, user := range assignList {
assignStringList[i] = user.UserName
}
if p.Action == api.HookIssueAssigned {
operateResult = fmt.Sprintf("%s assign this to %s", p.Sender.UserName, assignList[len(assignList)-1].UserName)
} else if p.Action == api.HookIssueUnassigned {
operateResult = fmt.Sprintf("%s unassigned this for someone", p.Sender.UserName)
} else if p.Action == api.HookIssueMilestoned {
operateResult = fmt.Sprintf("%s/milestone/%d", p.Repository.HTMLURL, p.PullRequest.Milestone.ID)
}
link = p.PullRequest.HTMLURL
by = fmt.Sprintf("PullRequest by %s", p.PullRequest.Poster.UserName)
if len(assignStringList) > 0 {
assignees = fmt.Sprintf("Assignees: %s", strings.Join(assignStringList, ", "))
}
operator = fmt.Sprintf("Operator: %s", p.Sender.UserName)
return title, link, by, operator, operateResult, assignees
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (b *BitBucketClient) PullRequestInfo(workspace string, repositorySlug string, pullRequestID int64) (dto.BitBucketPullRequestInfoResponse, error) {\n\tlog.Logger().StartMessage(\"Get pull-request status\")\n\tif err := b.beforeRequest(); err != nil {\n\t\tlog.Logger().FinishMessage(\"Get pull-request status\")\n\t\treturn dto.BitBucketPullRequestInfoResponse{}, err\n\t}\n\n\tb.client.SetBaseURL(DefaultBitBucketBaseAPIUrl)\n\tendpoint := fmt.Sprintf(\"/repositories/%s/%s/pullrequests/%d\", workspace, repositorySlug, pullRequestID)\n\tresponse, _, err := b.client.Get(endpoint, map[string]string{})\n\n\tif err != nil {\n\t\tlog.Logger().FinishMessage(\"Get pull-request status\")\n\t\treturn dto.BitBucketPullRequestInfoResponse{}, err\n\t}\n\n\tvar responseObject dto.BitBucketPullRequestInfoResponse\n\terr = json.Unmarshal(response, &responseObject)\n\tif err != nil {\n\t\tlog.Logger().FinishMessage(\"Get pull-request status\")\n\t\treturn dto.BitBucketPullRequestInfoResponse{}, err\n\t}\n\n\tlog.Logger().FinishMessage(\"Get pull-request status\")\n\treturn responseObject, nil\n}",
"func (v GithubVCS) getPullRequest(ctx context.Context, runinfo RunInfo, prNumber int) (RunInfo, error) {\n\tpr, _, err := v.Client.PullRequests.Get(ctx, runinfo.Owner, runinfo.Repository, prNumber)\n\tif err != nil {\n\t\treturn runinfo, err\n\t}\n\t// Make sure to use the Base for Default BaseBranch or there would be a potential hijack\n\truninfo.DefaultBranch = pr.GetBase().GetRepo().GetDefaultBranch()\n\truninfo.URL = pr.GetBase().GetRepo().GetHTMLURL()\n\truninfo.SHA = pr.GetHead().GetSHA()\n\truninfo.SHAURL = fmt.Sprintf(\"%s/commit/%s\", pr.GetHTMLURL(), pr.GetHead().GetSHA())\n\t// TODO: Maybe if we wanted to allow rerequest from non approved user we\n\t// would use the CheckRun Sender instead of the rerequest sender, could it\n\t// be a room for abuse? 🤔\n\truninfo.Sender = pr.GetUser().GetLogin()\n\truninfo.HeadBranch = pr.GetHead().GetRef()\n\truninfo.BaseBranch = pr.GetBase().GetRef()\n\truninfo.EventType = \"pull_request\"\n\treturn runinfo, nil\n}",
"func (s *Processor) extractPullRequestInfo(ctx context.Context, pullUrl string) (repo, error) {\n\tr := repo{}\n\tif err := s.get(ctx, pullUrl, &r); err != nil {\n\t\treturn repo{}, err\n\t}\n\treturn r, nil\n}",
"func (c *client) GetPullRequest(org, repo string, number int) (*PullRequest, error) {\n\tdurationLogger := c.log(\"GetPullRequest\", org, repo, number)\n\tdefer durationLogger()\n\n\tvar pr PullRequest\n\t_, err := c.request(&request{\n\t\t// allow the description and draft fields\n\t\t// https://developer.github.com/changes/2018-02-22-label-description-search-preview/\n\t\t// https://developer.github.com/changes/2019-02-14-draft-pull-requests/\n\t\taccept: \"application/vnd.github.symmetra-preview+json, application/vnd.github.shadow-cat-preview\",\n\t\tmethod: http.MethodGet,\n\t\tpath: fmt.Sprintf(\"/repos/%s/%s/pulls/%d\", org, repo, number),\n\t\torg: org,\n\t\texitCodes: []int{200},\n\t}, &pr)\n\treturn &pr, err\n}",
"func (c *Client) GetPullRequest(owner, repo string, number int) (*PullRequest, error) {\n\tresp, err := c.request(http.MethodGet, fmt.Sprintf(\"%s/repos/%s/%s/pulls/%d\", c.base, owner, repo, number), nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer resp.Body.Close()\n\tif resp.StatusCode != 200 {\n\t\treturn nil, fmt.Errorf(\"response not 200: %s\", resp.Status)\n\t}\n\tb, err := ioutil.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar pr PullRequest\n\tif err := json.Unmarshal(b, &pr); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &pr, nil\n}",
"func (m *MaintainerManager) GetPullRequest(number string) (*gh.PullRequest, error) {\n\treturn m.client.PullRequest(m.repo, number, nil)\n}",
"func getIssuesCommentInfo(p *api.IssueCommentPayload) (title, link, by, operator string) {\n\ttitle = fmt.Sprintf(\"[Comment-%s #%d]: %s\\n%s\", p.Repository.FullName, p.Issue.Index, p.Action, p.Issue.Title)\n\tlink = p.Issue.HTMLURL\n\tif p.IsPull {\n\t\tby = fmt.Sprintf(\"PullRequest by %s\", p.Issue.Poster.UserName)\n\t} else {\n\t\tby = fmt.Sprintf(\"Issue by %s\", p.Issue.Poster.UserName)\n\t}\n\toperator = fmt.Sprintf(\"Operator: %s\", p.Sender.UserName)\n\treturn title, link, by, operator\n}",
"func (c *client) GetPullRequestPatch(org, repo string, number int) ([]byte, error) {\n\tdurationLogger := c.log(\"GetPullRequestPatch\", org, repo, number)\n\tdefer durationLogger()\n\n\t_, patch, err := c.requestRaw(&request{\n\t\taccept: \"application/vnd.github.patch\",\n\t\tmethod: http.MethodGet,\n\t\tpath: fmt.Sprintf(\"/repos/%s/%s/pulls/%d\", org, repo, number),\n\t\torg: org,\n\t\texitCodes: []int{200},\n\t})\n\treturn patch, err\n}",
"func (c *client) GetPullRequestDiff(org, repo string, number int) ([]byte, error) {\n\tdurationLogger := c.log(\"GetPullRequestDiff\", org, repo, number)\n\tdefer durationLogger()\n\n\t_, diff, err := c.requestRaw(&request{\n\t\taccept: \"application/vnd.github.diff\",\n\t\tmethod: http.MethodGet,\n\t\tpath: fmt.Sprintf(\"/repos/%s/%s/pulls/%d\", org, repo, number),\n\t\torg: org,\n\t\texitCodes: []int{200},\n\t})\n\treturn diff, err\n}",
"func (c *Client) GetPullRequest(owner, repo string, index int64) (*PullRequest, *Response, error) {\n\tif err := escapeValidatePathSegments(&owner, &repo); err != nil {\n\t\treturn nil, nil, err\n\t}\n\tpr := new(PullRequest)\n\tresp, err := c.getParsedResponse(\"GET\", fmt.Sprintf(\"/repos/%s/%s/pulls/%d\", owner, repo, index), nil, nil, pr)\n\tif c.checkServerVersionGreaterThanOrEqual(version1_14_0) != nil {\n\t\tif err := fixPullHeadSha(c, pr); err != nil {\n\t\t\treturn pr, resp, err\n\t\t}\n\t}\n\treturn pr, resp, err\n}",
"func (g *V3) GetPullRequestSHA(repo string, number int) (string, error) {\n\tpath := fmt.Sprintf(\"%s/api/%s/projects/%s/merge_requests?iid=%d\",\n\t\tstrings.TrimSuffix(g.scmCfg.Server, \"/\"), v3APIVersion, url.QueryEscape(repo), number)\n\treq, err := http.NewRequest(http.MethodGet, path, nil)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tif len(g.scmCfg.User) == 0 {\n\t\treq.Header.Set(\"PRIVATE-TOKEN\", g.scmCfg.Token)\n\t} else {\n\t\treq.Header.Set(\"Authorization\", \"Bearer \"+g.scmCfg.Token)\n\t}\n\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\thttpClient := &http.Client{\n\t\tTransport: &http.Transport{\n\t\t\tTLSClientConfig: &tls.Config{InsecureSkipVerify: true},\n\t\t},\n\t}\n\tresp, err := httpClient.Do(req)\n\tif err != nil {\n\t\tlog.Errorf(\"Fail to get project merge request as %s\", err.Error())\n\t\treturn \"\", err\n\t}\n\n\tdefer func() {\n\t\tif err := resp.Body.Close(); err != nil {\n\t\t\tlog.Errorf(\"Fail to close response body as: %v\", err)\n\t\t}\n\t}()\n\n\tbody, err := ioutil.ReadAll(resp.Body)\n\tif err != nil {\n\t\tlog.Errorf(\"Fail to get project merge request as %s\", err.Error())\n\t\treturn \"\", err\n\t}\n\n\tif resp.StatusCode/100 == 2 {\n\t\tmr := []mergeRequestResponse{}\n\t\terr := json.Unmarshal(body, &mr)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tif len(mr) > 0 {\n\t\t\treturn mr[0].SHA, nil\n\t\t}\n\t\treturn \"\", fmt.Errorf(\"Merge request %d not found \", number)\n\t}\n\n\terr = fmt.Errorf(\"Fail to get merge request %d as %s \", number, body)\n\treturn \"\", err\n}",
"func (p *PullRequestEvent) GetPullRequest() *PullRequest {\n\tif p == nil {\n\t\treturn nil\n\t}\n\treturn p.PullRequest\n}",
"func (v GithubVCS) GetStringPullRequestComment(ctx context.Context, runinfo *RunInfo, reg string) ([]*github.IssueComment, error) {\n\tvar ret []*github.IssueComment\n\tprNumber, err := convertPullRequestURLtoNumber(runinfo.URL)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcomments, _, err := v.Client.Issues.ListComments(ctx, runinfo.Owner, runinfo.Repository,\n\t\tprNumber, &github.IssueListCommentsOptions{})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tre := regexp.MustCompile(reg)\n\tfor _, v := range comments {\n\t\tif string(re.Find([]byte(v.GetBody()))) != \"\" {\n\t\t\tret = append(ret, v)\n\t\t}\n\t}\n\treturn ret, nil\n}",
"func getIssuesInfo(p *api.IssuePayload) (issueTitle, link, by, operator, operateResult, assignees string) {\n\tissueTitle = fmt.Sprintf(\"[Issue-%s #%d]: %s\\n%s\", p.Repository.FullName, p.Issue.Index, p.Action, p.Issue.Title)\n\tassignList := p.Issue.Assignees\n\tassignStringList := make([]string, len(assignList))\n\n\tfor i, user := range assignList {\n\t\tassignStringList[i] = user.UserName\n\t}\n\tif p.Action == api.HookIssueAssigned {\n\t\toperateResult = fmt.Sprintf(\"%s assign this to %s\", p.Sender.UserName, assignList[len(assignList)-1].UserName)\n\t} else if p.Action == api.HookIssueUnassigned {\n\t\toperateResult = fmt.Sprintf(\"%s unassigned this for someone\", p.Sender.UserName)\n\t} else if p.Action == api.HookIssueMilestoned {\n\t\toperateResult = fmt.Sprintf(\"%s/milestone/%d\", p.Repository.HTMLURL, p.Issue.Milestone.ID)\n\t}\n\tlink = p.Issue.HTMLURL\n\tby = fmt.Sprintf(\"Issue by %s\", p.Issue.Poster.UserName)\n\tif len(assignStringList) > 0 {\n\t\tassignees = fmt.Sprintf(\"Assignees: %s\", strings.Join(assignStringList, \", \"))\n\t}\n\toperator = fmt.Sprintf(\"Operator: %s\", p.Sender.UserName)\n\treturn issueTitle, link, by, operator, operateResult, assignees\n}",
"func getPendingPRs(g *u.GithubClient, f *os.File, owner, repo, branch string) error {\n\tlog.Print(\"Getting pending PR status...\")\n\tf.WriteString(\"-------\\n\")\n\tf.WriteString(fmt.Sprintf(\"## PENDING PRs on the %s branch\\n\", branch))\n\n\tif *htmlizeMD {\n\t\tf.WriteString(\"PR | Milestone | User | Date | Commit Message\\n\")\n\t\tf.WriteString(\"-- | --------- | ---- | ---- | --------------\\n\")\n\t}\n\n\tvar query []string\n\tquery = u.AddQuery(query, \"repo\", owner, \"/\", repo)\n\tquery = u.AddQuery(query, \"is\", \"open\")\n\tquery = u.AddQuery(query, \"type\", \"pr\")\n\tquery = u.AddQuery(query, \"base\", branch)\n\tpendingPRs, err := g.SearchIssues(strings.Join(query, \" \"))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to search pending PRs: %v\", err)\n\t}\n\n\tfor _, pr := range pendingPRs {\n\t\tvar str string\n\t\t// escape '*' in commit messages so they don't mess up formatting\n\t\tmsg := strings.Replace(*pr.Title, \"*\", \"\", -1)\n\t\tmilestone := \"null\"\n\t\tif pr.Milestone != nil {\n\t\t\tmilestone = *pr.Milestone.Title\n\t\t}\n\t\tif *htmlizeMD {\n\t\t\tstr = fmt.Sprintf(\"#%-8d | %-4s | @%-10s| %s | %s\\n\", *pr.Number, milestone, *pr.User.Login, pr.UpdatedAt.Format(\"Mon Jan 2 15:04:05 MST 2006\"), msg)\n\t\t} else {\n\t\t\tstr = fmt.Sprintf(\"#%-8d %-4s @%-10s %s %s\\n\", *pr.Number, milestone, *pr.User.Login, pr.UpdatedAt.Format(\"Mon Jan 2 15:04:05 MST 2006\"), msg)\n\t\t}\n\t\tf.WriteString(str)\n\t}\n\tf.WriteString(\"\\n\\n\")\n\treturn nil\n}",
"func (j *DSGitHub) ProcessPull(ctx *Ctx, inPull map[string]interface{}) (pull map[string]interface{}, err error) {\n\tpull = inPull\n\tpull[\"user_data\"] = map[string]interface{}{}\n\tpull[\"assignee_data\"] = map[string]interface{}{}\n\tpull[\"merged_by_data\"] = map[string]interface{}{}\n\tpull[\"review_comments_data\"] = []interface{}{}\n\tpull[\"assignees_data\"] = []interface{}{}\n\tpull[\"reviews_data\"] = []interface{}{}\n\tpull[\"requested_reviewers_data\"] = []interface{}{}\n\tpull[\"commits_data\"] = []interface{}{}\n\t// [\"user\", \"review_comments\", \"requested_reviewers\", \"merged_by\", \"commits\", \"assignee\", \"assignees\"]\n\tnumber, ok := Dig(pull, []string{\"number\"}, false, true)\n\tif ok {\n\t\tiNumber := int(number.(float64))\n\t\tpull[\"reviews_data\"], err = j.githubPullReviews(ctx, j.Org, j.Repo, iNumber)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tpull[\"review_comments_data\"], err = j.githubPullReviewComments(ctx, j.Org, j.Repo, iNumber)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tpull[\"requested_reviewers_data\"], err = j.githubPullRequestedReviewers(ctx, j.Org, j.Repo, iNumber)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\t// TODO: commits\n\t\t// That would fetch the full commit data\n\t\t//pull[\"commits_data\"], err = j.githubPullCommits(ctx, j.Org, j.Repo, iNumber, true)\n\t\tvar commitsData []map[string]interface{}\n\t\tcommitsData, err = j.githubPullCommits(ctx, j.Org, j.Repo, iNumber, false)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tary := []interface{}{}\n\t\tfor _, com := range commitsData {\n\t\t\tsha, ok := Dig(com, []string{\"sha\"}, false, true)\n\t\t\tif ok {\n\t\t\t\tary = append(ary, sha)\n\t\t\t}\n\t\t}\n\t\tpull[\"commits_data\"] = ary\n\t}\n\tuserLogin, ok := Dig(pull, []string{\"user\", \"login\"}, false, true)\n\tif ok {\n\t\tpull[\"user_data\"], _, err = j.githubUser(ctx, userLogin.(string))\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\tmergedByLogin, ok := Dig(pull, []string{\"merged_by\", \"login\"}, false, true)\n\tif ok {\n\t\tpull[\"merged_by_data\"], _, err = j.githubUser(ctx, mergedByLogin.(string))\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\tassigneeLogin, ok := Dig(pull, []string{\"assignee\", \"login\"}, false, true)\n\tif ok {\n\t\tpull[\"assignee_data\"], _, err = j.githubUser(ctx, assigneeLogin.(string))\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\tiAssignees, ok := Dig(pull, []string{\"assignees\"}, false, true)\n\tif ok {\n\t\tassignees, _ := iAssignees.([]interface{})\n\t\tassigneesAry := []map[string]interface{}{}\n\t\tfor _, assignee := range assignees {\n\t\t\taLogin, ok := Dig(assignee, []string{\"login\"}, false, true)\n\t\t\tif ok {\n\t\t\t\tassigneeData, _, e := j.githubUser(ctx, aLogin.(string))\n\t\t\t\tif e != nil {\n\t\t\t\t\terr = e\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tassigneesAry = append(assigneesAry, assigneeData)\n\t\t\t}\n\t\t}\n\t\tpull[\"assignees_data\"] = assigneesAry\n\t}\n\treturn\n}",
"func getRPCInfo(req interface{}, quotaUser string) (*rpcInfo, error) {\n\tvar treeID int64\n\tswitch req := req.(type) {\n\tcase *trillian.CreateTreeRequest:\n\t\t// OK, tree is being created\n\tcase *trillian.ListTreesRequest:\n\t\t// OK, no single tree ID (potentially many trees)\n\tcase treeIDRequest:\n\t\ttreeID = req.GetTreeId()\n\tcase treeRequest:\n\t\ttreeID = req.GetTree().GetTreeId()\n\tcase logIDRequest:\n\t\ttreeID = req.GetLogId()\n\tcase mapIDRequest:\n\t\ttreeID = req.GetMapId()\n\tdefault:\n\t\treturn nil, status.Errorf(codes.Internal, \"cannot retrieve treeID from request: %T\", req)\n\t}\n\n\ttreeType, readonly, err := getRequestInfo(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tkind := quota.Read\n\tif !readonly {\n\t\tkind = quota.Write\n\t}\n\tvar specs []quota.Spec\n\tif treeID == 0 {\n\t\tspecs = []quota.Spec{\n\t\t\t{Group: quota.User, Kind: kind, User: quotaUser},\n\t\t\t{Group: quota.Global, Kind: kind},\n\t\t}\n\t} else {\n\t\tspecs = []quota.Spec{\n\t\t\t{Group: quota.User, Kind: kind, User: quotaUser},\n\t\t\t{Group: quota.Tree, Kind: kind, TreeID: treeID},\n\t\t\t{Group: quota.Global, Kind: kind},\n\t\t}\n\t}\n\n\treturn &rpcInfo{\n\t\ttreeID: treeID,\n\t\topts: trees.GetOpts{TreeType: treeType, Readonly: readonly},\n\t\tspecs: specs,\n\t}, nil\n}",
"func (o TriggerGithubOutput) PullRequest() TriggerGithubPullRequestPtrOutput {\n\treturn o.ApplyT(func(v TriggerGithub) *TriggerGithubPullRequest { return v.PullRequest }).(TriggerGithubPullRequestPtrOutput)\n}",
"func (p *PullRequestReviewEvent) GetPullRequest() *PullRequest {\n\tif p == nil {\n\t\treturn nil\n\t}\n\treturn p.PullRequest\n}",
"func createPullRequest(c *cli.Context) error {\n\tbranch := c.String(\"pr-branch\")\n\trepo := c.String(\"pr-repo\")\n\tbase := c.String(\"pr-base\")\n\tremote := c.String(\"pr-remote\")\n\tdirectory := c.String(\"out\")\n\tif repo == \"\" {\n\t\treturn errors.New(\"repo must be defined if create-pr is true\")\n\t}\n\tif branch == \"\" {\n\t\tbranch = c.String(\"name\") + \"-\" + uuid.NewString()[:6]\n\t}\n\tfmt.Printf(\"Creating a PR to repo %s with base %s and branch %s\\n\", repo, base, branch)\n\tr := &runner.CLIRunner{}\n\tg := git.NewCLIGit(git.CLIGitConfig{\n\t\tDirectory: directory,\n\t\tBranch: branch,\n\t\tRemote: remote,\n\t\tBase: base,\n\t}, r)\n\tscmClient, err := git.NewClient(git.SCMConfig{\n\t\tBranch: branch,\n\t\tBase: base,\n\t\tRepo: repo,\n\t})\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to create scm client: %w\", err)\n\t}\n\treturn catalog.CreatePullRequest(scmClient, g, branch)\n}",
"func (*PullRequest) Descriptor() ([]byte, []int) {\n\treturn file_githubcard_proto_rawDescGZIP(), []int{13}\n}",
"func (m *MaintainerManager) PatchPullRequest(number string, pr *gh.PullRequest) (*gh.PullRequest, error) {\n\to := &gh.Options{}\n\tparams := map[string]string{\n\t\t\"title\": pr.Title,\n\t\t\"body\": pr.Body,\n\t}\n\tif pr.Assignee == nil {\n\t\tparams[\"assignee\"] = \"\"\n\t} else {\n\t\tparams[\"assignee\"] = pr.Assignee.Login\n\t}\n\to.Params = params\n\t// octokat doesn't expose PatchPullRequest. Use PatchIssue instead.\n\t_, err := m.client.PatchIssue(m.repo, number, o)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// Simulate the result of the patching\n\tpatchedPR := *pr\n\treturn &patchedPR, nil\n}",
"func (a *PullRequestsApiService) GetPullRequestById(ctx context.Context, pullRequestId int32, project string, apiVersion string) (GitPullRequest, *http.Response, error) {\n\tvar (\n\t\tlocalVarHttpMethod = strings.ToUpper(\"Get\")\n\t\tlocalVarPostBody interface{}\n\t\tlocalVarFileName string\n\t\tlocalVarFileBytes []byte\n\t\tlocalVarReturnValue GitPullRequest\n\t)\n\n\t// create path and map variables\n\tlocalVarPath := a.client.cfg.BasePath + \"/{project}/_apis/git/pullrequests/{pullRequestId}\"\n\tlocalVarPath = strings.Replace(localVarPath, \"{\"+\"pullRequestId\"+\"}\", fmt.Sprintf(\"%v\", pullRequestId), -1)\n\tlocalVarPath = strings.Replace(localVarPath, \"{\"+\"project\"+\"}\", fmt.Sprintf(\"%v\", project), -1)\n\n\tlocalVarHeaderParams := make(map[string]string)\n\tlocalVarQueryParams := url.Values{}\n\tlocalVarFormParams := url.Values{}\n\n\tlocalVarQueryParams.Add(\"api-version\", parameterToString(apiVersion, \"\"))\n\t// to determine the Content-Type header\n\tlocalVarHttpContentTypes := []string{}\n\n\t// set Content-Type header\n\tlocalVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)\n\tif localVarHttpContentType != \"\" {\n\t\tlocalVarHeaderParams[\"Content-Type\"] = localVarHttpContentType\n\t}\n\n\t// to determine the Accept header\n\tlocalVarHttpHeaderAccepts := []string{\"application/json\"}\n\n\t// set Accept header\n\tlocalVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)\n\tif localVarHttpHeaderAccept != \"\" {\n\t\tlocalVarHeaderParams[\"Accept\"] = localVarHttpHeaderAccept\n\t}\n\tr, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, err\n\t}\n\n\tlocalVarHttpResponse, err := a.client.callAPI(r)\n\tif err != nil || localVarHttpResponse == nil {\n\t\treturn localVarReturnValue, localVarHttpResponse, err\n\t}\n\n\tlocalVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)\n\tlocalVarHttpResponse.Body.Close()\n\tif err != nil {\n\t\treturn localVarReturnValue, localVarHttpResponse, err\n\t}\n\n\tif localVarHttpResponse.StatusCode < 300 {\n\t\t// If we succeed, return the data, otherwise pass on to decode error.\n\t\terr = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get(\"Content-Type\"))\n\t\tif err == nil {\n\t\t\treturn localVarReturnValue, localVarHttpResponse, err\n\t\t}\n\t}\n\n\tif localVarHttpResponse.StatusCode >= 300 {\n\t\tnewErr := GenericSwaggerError{\n\t\t\tbody: localVarBody,\n\t\t\terror: localVarHttpResponse.Status,\n\t\t}\n\n\t\tif localVarHttpResponse.StatusCode == 200 {\n\t\t\tlocalVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)\n\t\t\tif err != nil {\n\t\t\t\treturn localVarReturnValue, localVarHttpResponse, err\n\t\t\t}\n\n\t\t\tvar v GitPullRequest\n\t\t\terr = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get(\"Content-Type\"))\n\t\t\tif err != nil {\n\t\t\t\tnewErr.error = err.Error()\n\t\t\t\treturn localVarReturnValue, localVarHttpResponse, newErr\n\t\t\t}\n\t\t\tnewErr.model = v\n\t\t\treturn localVarReturnValue, localVarHttpResponse, newErr\n\t\t}\n\n\t\treturn localVarReturnValue, localVarHttpResponse, newErr\n\t}\n\n\treturn localVarReturnValue, localVarHttpResponse, nil\n}",
"func (g *Gitlab) GetOpenPullRequest(ctx context.Context, repo scm.Repository, branchName string) (scm.PullRequest, error) {\n\tproject := repo.(repository)\n\n\tstate := \"opened\"\n\tmrs, _, err := g.glClient.MergeRequests.ListProjectMergeRequests(project.pid, &gitlab.ListProjectMergeRequestsOptions{\n\t\tListOptions: gitlab.ListOptions{\n\t\t\tPerPage: 1,\n\t\t},\n\t\tSourceBranch: &branchName,\n\t\tState: &state,\n\t}, gitlab.WithContext(ctx))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif len(mrs) == 0 {\n\t\treturn nil, nil\n\t}\n\n\treturn convertMergeRequest(mrs[0], project.name, project.ownerName), nil\n}",
"func (gc *GithubClient) GetPullRequest(org, repo string, ID int) (*github.PullRequest, error) {\n\tvar res *github.PullRequest\n\t_, err := gc.retry(\n\t\tfmt.Sprintf(\"Get PullRequest '%d'\", ID),\n\t\tmaxRetryCount,\n\t\tfunc() (*github.Response, error) {\n\t\t\tvar resp *github.Response\n\t\t\tvar err error\n\t\t\tres, resp, err = gc.Client.PullRequests.Get(ctx, org, repo, ID)\n\t\t\treturn resp, err\n\t\t},\n\t)\n\treturn res, err\n}",
"func (p *PullRequestReviewCommentEvent) GetPullRequest() *PullRequest {\n\tif p == nil {\n\t\treturn nil\n\t}\n\treturn p.PullRequest\n}",
"func (o *PullRequestOptions) DiscoverPullRequest() (*scm.PullRequest, error) {\n\tctx := context.Background()\n\tpr, _, err := o.ScmClient.PullRequests.Find(ctx, o.FullRepositoryName, o.Number)\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"failed to find PR %d in repo %s\", o.Number, o.Repository)\n\t}\n\treturn pr, nil\n}",
"func ExtractIssueInfo(commitID *tracedb.CommitID, rietveldReview *rietveld.Rietveld, gerritReview *gerrit.Gerrit) (string, string) {\n\tissue, ok := gerritReview.ExtractIssue(commitID.Source)\n\tif ok {\n\t\treturn issue, commitID.ID\n\t}\n\tissue, _ = rietveldReview.ExtractIssue(commitID.Source)\n\treturn issue, commitID.ID\n}",
"func (o TriggerGithubPtrOutput) PullRequest() TriggerGithubPullRequestPtrOutput {\n\treturn o.ApplyT(func(v *TriggerGithub) *TriggerGithubPullRequest {\n\t\tif v == nil {\n\t\t\treturn nil\n\t\t}\n\t\treturn v.PullRequest\n\t}).(TriggerGithubPullRequestPtrOutput)\n}",
"func (self *GitHub) PullRequestEvent() *entities.GitHubPullRequestEventData {\n\tdata := entities.NewGitHubPullRequestEventData(self.GetPayload().(map[string]interface{}))\n\tif &data.PullRequest != nil {\n\t\tif strings.ToLower(data.Action) != \"created\" {\n\t\t\treturn data\n\t\t}\n\t}\n\treturn nil\n}",
"func GetInfo() string {\n\treturn fmt.Sprintf(\"version: %s, commit: %s\", Version, GitCommit)\n}",
"func openPullRequest(config *GitXargsConfig, repo *github.Repository, branch string) error {\n\n\tlogger := logging.GetLogger(\"git-xargs\")\n\n\tif config.DryRun || config.SkipPullRequests {\n\t\tlogger.WithFields(logrus.Fields{\n\t\t\t\"Repo\": repo.GetName(),\n\t\t}).Debug(\"--dry-run and / or --skip-pull-requests is set to true, so skipping opening a pull request!\")\n\t\treturn nil\n\t}\n\n\t// If the user only supplies a commit message, use that for both the pull request title and descriptions,\n\t// unless they are provided separately\n\ttitleToUse := config.PullRequestTitle\n\tdescriptionToUse := config.PullRequestDescription\n\n\tcommitMessage := config.CommitMessage\n\n\tif commitMessage != DefaultCommitMessage {\n\t\tif titleToUse == DefaultPullRequestTitle {\n\t\t\ttitleToUse = commitMessage\n\t\t}\n\n\t\tif descriptionToUse == DefaultPullRequestDescription {\n\t\t\tdescriptionToUse = commitMessage\n\t\t}\n\t}\n\n\t// Configure pull request options that the Github client accepts when making calls to open new pull requests\n\tnewPR := &github.NewPullRequest{\n\t\tTitle: github.String(titleToUse),\n\t\tHead: github.String(branch),\n\t\tBase: github.String(\"master\"),\n\t\tBody: github.String(descriptionToUse),\n\t\tMaintainerCanModify: github.Bool(true),\n\t}\n\n\t// Make a pull request via the Github API\n\tpr, _, err := config.GithubClient.PullRequests.Create(context.Background(), *repo.GetOwner().Login, repo.GetName(), newPR)\n\n\tif err != nil {\n\t\tlogger.WithFields(logrus.Fields{\n\t\t\t\"Error\": err,\n\t\t\t\"Head\": branch,\n\t\t\t\"Base\": \"master\",\n\t\t\t\"Body\": descriptionToUse,\n\t\t}).Debug(\"Error opening Pull request\")\n\n\t\t// Track pull request open failure\n\t\tconfig.Stats.TrackSingle(PullRequestOpenErr, repo)\n\t\treturn errors.WithStackTrace(err)\n\t}\n\n\tlogger.WithFields(logrus.Fields{\n\t\t\"Pull Request URL\": pr.GetHTMLURL(),\n\t}).Debug(\"Successfully opened pull request\")\n\n\t// Track successful opening of the pull request, extracting the HTML url to the PR itself for easier review\n\tconfig.Stats.TrackPullRequest(repo.GetName(), pr.GetHTMLURL())\n\treturn nil\n}",
"func (PingCIMunger) MungePullRequest(config *github_util.Config, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent) {\n\tif !github_util.HasLabel(issue.Labels, \"lgtm\") {\n\t\treturn\n\t}\n\tif mergeable, err := config.IsPRMergeable(pr); err != nil {\n\t\tglog.V(2).Infof(\"Skipping %d - problem determining mergeability\", *pr.Number)\n\t} else if !mergeable {\n\t\tglog.V(2).Infof(\"Skipping %d - not mergeable\", *pr.Number)\n\t}\n\tstatus, err := config.GetStatus(pr, []string{\"Shippable\", \"continuous-integration/travis-ci/pr\"})\n\tif err != nil {\n\t\tglog.Errorf(\"unexpected error getting status: %v\", err)\n\t\treturn\n\t}\n\tif status == \"incomplete\" {\n\t\tglog.V(2).Infof(\"status is incomplete, closing and re-opening\")\n\t\tmsg := \"Continuous integration appears to have missed, closing and re-opening to trigger it\"\n\t\tconfig.WriteComment(*pr.Number, msg)\n\n\t\tconfig.ClosePR(pr)\n\t\ttime.Sleep(5 * time.Second)\n\t\tconfig.OpenPR(pr, 10)\n\t}\n}",
"func (m *MaintainerManager) GetPullRequests(state, sort string) ([]*gh.PullRequest, error) {\n\to := &gh.Options{}\n\to.QueryParams = map[string]string{\n\t\t\"sort\": sort,\n\t\t\"direction\": \"asc\",\n\t\t\"state\": state,\n\t\t\"per_page\": \"100\",\n\t}\n\tprevSize := -1\n\tpage := 1\n\tallPRs := []*gh.PullRequest{}\n\tfor len(allPRs) != prevSize {\n\t\to.QueryParams[\"page\"] = strconv.Itoa(page)\n\t\tif prs, err := m.client.PullRequests(m.repo, o); err != nil {\n\t\t\treturn nil, err\n\t\t} else {\n\t\t\tprevSize = len(allPRs)\n\t\t\tallPRs = append(allPRs, prs...)\n\t\t\tpage += 1\n\t\t}\n\t\tfmt.Printf(\".\")\n\t}\n\treturn allPRs, nil\n}",
"func FindPullRequestFromEnvironment() (int, error) {\n\tenvVar := \"PULL_NUMBER\"\n\tprName := os.Getenv(envVar)\n\tif prName == \"\" {\n\t\tenvVar = \"BRANCH_NAME\"\n\t\tbranchName := strings.ToUpper(os.Getenv(envVar))\n\t\tprPrefix := \"PR-\"\n\t\tif strings.HasPrefix(branchName, prPrefix) {\n\t\t\tprName = strings.TrimPrefix(branchName, prPrefix)\n\t\t}\n\t}\n\tif prName == \"\" {\n\t\treturn 0, nil\n\t}\n\tanswer, err := strconv.Atoi(prName)\n\tif err != nil {\n\t\treturn 0, errors.Wrapf(err, \"unable to convert PR \"+prName+\" to a number from env var %s\", envVar)\n\t}\n\treturn answer, nil\n}",
"func PrintPullRequests(status string, orderby string) {\n\tpullrequests := getPullrequests(status, orderby)\n\tPrintTable(\n\t\t[]string{\"Repo\", \"Name\", \"Requester\", \"Assignee\", \"From\", \"To\", \"State\", \"Created\"},\n\t\tpullrequestsToTable(pullrequests))\n}",
"func (sd *stackediff) StatusPullRequests(ctx context.Context) {\n\tsd.profiletimer.Step(\"StatusPullRequests::Start\")\n\tgithubInfo := sd.github.GetInfo(ctx, sd.gitcmd)\n\n\tif len(githubInfo.PullRequests) == 0 {\n\t\tfmt.Fprintf(sd.writer, \"pull request stack is empty\\n\")\n\t} else {\n\t\tif sd.DetailEnabled {\n\t\t\tfmt.Fprint(sd.writer, detailMessage)\n\t\t}\n\t\tfor i := len(githubInfo.PullRequests) - 1; i >= 0; i-- {\n\t\t\tpr := githubInfo.PullRequests[i]\n\t\t\tfmt.Fprintf(sd.writer, \"%s\\n\", pr.String(sd.config))\n\t\t}\n\t}\n\tsd.profiletimer.Step(\"StatusPullRequests::End\")\n}",
"func parseHookPullRequest(ctx context.Context, payload githubWebhook.PullRequestPayload, client *authentication.Client) (*GeneralizedResult, error) {\n\tvar result GeneralizedResult\n\tif !(payload.Action == \"opened\" ||\n\t\tpayload.Action == \"edited\" ||\n\t\tpayload.Action == \"reopened\" ||\n\t\tpayload.Action == \"synchronized\") {\n\t\treturn nil, nil\n\t}\n\n\t// head are changes, base is \"old\"\n\tresult.UserName = payload.PullRequest.User.Login\n\tresult.OwnerName = payload.PullRequest.Head.Repo.Owner.Login\n\tresult.RepoName = payload.PullRequest.Head.Repo.Name\n\tresult.BaseOwnerName = payload.PullRequest.Base.Repo.Owner.Login\n\tresult.BaseRepoName = payload.PullRequest.Base.Repo.Name\n\tresult.Branch = payload.PullRequest.Head.Ref\n\tresult.Sha = payload.PullRequest.Head.Sha\n\tresult.Number = int(payload.Number)\n\n\tvar options = github.ListOptions{}\n\n\tfiles, response, err := client.GithubClient.PullRequests.ListFiles(ctx, result.BaseOwnerName, result.BaseRepoName, result.Number, &options)\n\tif err != nil {\n\t\tfmt.Println(\"Error while getting filenames:\\n\", err, \"\\n\", response)\n\t\treturn nil, err\n\t}\n\n\tfor _, file := range files {\n\t\tif strings.Contains(*file.Filename, \".yml\") || strings.Contains(*file.Filename, \"yaml\") {\n\t\t\tresult.AddedOrModifiedFiles = append(result.AddedOrModifiedFiles, *file.Filename)\n\t\t}\n\t}\n\treturn &result, nil\n}",
"func parsePullRequest(pullRequest *github.PullRequest) Proposal {\n\treturn Proposal{\n\t\tNumber: pullRequest.GetNumber(),\n\t\tTarget: domain.NewLocalBranchName(pullRequest.Base.GetRef()),\n\t\tTitle: pullRequest.GetTitle(),\n\t\tCanMergeWithAPI: pullRequest.GetMergeableState() == \"clean\",\n\t}\n}",
"func Pulls(ctx *context.Context) {\n\tif unit.TypePullRequests.UnitGlobalDisabled() {\n\t\tlog.Debug(\"Pull request overview page not available as it is globally disabled.\")\n\t\tctx.Status(http.StatusNotFound)\n\t\treturn\n\t}\n\n\tctx.Data[\"Title\"] = ctx.Tr(\"pull_requests\")\n\tctx.Data[\"PageIsPulls\"] = true\n\tctx.Data[\"SingleRepoAction\"] = \"pull\"\n\tbuildIssueOverview(ctx, unit.TypePullRequests)\n}",
"func (c *CommunityHealthFiles) GetPullRequestTemplate() *Metric {\n\tif c == nil {\n\t\treturn nil\n\t}\n\treturn c.PullRequestTemplate\n}",
"func (m *UnifiedRoleAssignmentScheduleRequest) GetTicketInfo()(TicketInfoable) {\n return m.ticketInfo\n}",
"func (f *FakeGit) GetInfo(repo string) *git.SourceInfo {\n\treturn &git.SourceInfo{\n\t\tRef: \"master\",\n\t\tCommitID: \"1bf4f04\",\n\t\tLocation: \"file:///foo\",\n\t}\n}",
"func (o *PromoteOptions) waitForGitOpsPullRequest(ns string, env *v1.Environment, releaseInfo *ReleaseInfo) error {\n\tduration := *o.TimeoutDuration\n\tpullRequestInfo := releaseInfo.PullRequestInfo\n\tif pullRequestInfo != nil {\n\t\tfor {\n\t\t\tend := time.Now().Add(duration)\n\t\t\tpr := pullRequestInfo.PullRequest\n\t\t\terr := pullRequestInfo.GitProvider.UpdatePullRequestStatus(pr)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"Failed to query the Pull Request status for %s %s\", pr.URL, err)\n\t\t\t}\n\t\t\tif pr.Merged != nil && *pr.Merged {\n\t\t\t\to.Printf(\"Pull Request %s is merged\\n\", util.ColorInfo(pr.URL))\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tif pr.IsClosed() {\n\t\t\t\to.warnf(\"Pull Request %s is closed\\n\", util.ColorInfo(pr.URL))\n\t\t\t\treturn fmt.Errorf(\"Promotion failed as Pull Request %s is closed without merging\", pr.URL)\n\t\t\t}\n\t\t\tif time.Now().After(end) {\n\t\t\t\treturn fmt.Errorf(\"Timed out waiting for pull request %s to merge. Waited %s\", pr.URL, duration.String())\n\t\t\t}\n\t\t\ttime.Sleep(*o.PullRequestPollDuration)\n\t\t}\n\t}\n\treturn nil\n}",
"func getProviderInfoRequest(c *xgb.Conn, Provider Provider, ConfigTimestamp xproto.Timestamp) []byte {\n\tsize := 12\n\tb := 0\n\tbuf := make([]byte, size)\n\n\tc.ExtLock.RLock()\n\tbuf[b] = c.Extensions[\"RANDR\"]\n\tc.ExtLock.RUnlock()\n\tb += 1\n\n\tbuf[b] = 33 // request opcode\n\tb += 1\n\n\txgb.Put16(buf[b:], uint16(size/4)) // write request size in 4-byte units\n\tb += 2\n\n\txgb.Put32(buf[b:], uint32(Provider))\n\tb += 4\n\n\txgb.Put32(buf[b:], uint32(ConfigTimestamp))\n\tb += 4\n\n\treturn buf\n}",
"func (b *BitBucketClient) CreatePullRequest(workspace string, repositorySlug string, request dto.BitBucketRequestPullRequestCreate) (dto.BitBucketPullRequestInfoResponse, error) {\n\tlog.Logger().StartMessage(\"Create pull-request\")\n\tif err := b.beforeRequest(); err != nil {\n\t\tlog.Logger().FinishMessage(\"Create pull-request\")\n\t\treturn dto.BitBucketPullRequestInfoResponse{}, err\n\t}\n\n\tbyteString, err := json.Marshal(request)\n\tif err != nil {\n\t\tlog.Logger().FinishMessage(\"Create pull-request\")\n\t\treturn dto.BitBucketPullRequestInfoResponse{}, err\n\t}\n\n\tb.client.SetBaseURL(DefaultBitBucketBaseAPIUrl)\n\tendpoint := fmt.Sprintf(\"/repositories/%s/%s/pullrequests\", workspace, repositorySlug)\n\n\tresponse, statusCode, err := b.client.Post(endpoint, byteString, map[string]string{})\n\tif err != nil {\n\t\tlog.Logger().AddError(err).Msg(\"Error during the request\")\n\t\tlog.Logger().FinishMessage(\"Create pull-request\")\n\t\treturn dto.BitBucketPullRequestInfoResponse{}, err\n\t}\n\n\tvar dtoResponse = dto.BitBucketPullRequestInfoResponse{}\n\tif err := json.Unmarshal(response, &dtoResponse); err != nil {\n\t\tlog.Logger().AddError(err).Msg(\"Error during the unmarshal\")\n\t\tlog.Logger().FinishMessage(\"Create pull-request\")\n\t\treturn dto.BitBucketPullRequestInfoResponse{}, err\n\t}\n\n\tif statusCode == http.StatusBadRequest {\n\t\tlog.Logger().Warn().Int(\"status_code\", statusCode).Str(\"response\", string(response)).Msg(\"Bad request status code\")\n\t\tlog.Logger().FinishMessage(\"Create pull-request\")\n\t\treturn dto.BitBucketPullRequestInfoResponse{}, errors.New(dtoResponse.Error.Message)\n\t}\n\n\tif statusCode == http.StatusUnauthorized {\n\t\tlog.Logger().Warn().Int(\"status_code\", statusCode).Str(\"response\", string(response)).Msg(\"Unauthorized status code\")\n\t\tlog.Logger().FinishMessage(\"Create pull-request\")\n\t\treturn dto.BitBucketPullRequestInfoResponse{}, errors.New(ErrorMsgNoAccess)\n\t}\n\n\tif statusCode == http.StatusNotFound {\n\t\tlog.Logger().Warn().Int(\"status_code\", statusCode).Str(\"response\", string(response)).Msg(\"Not found status code\")\n\t\tlog.Logger().FinishMessage(\"Create pull-request\")\n\t\treturn dto.BitBucketPullRequestInfoResponse{}, errors.New(\"endpoint or selected branch was not found :( \")\n\t}\n\n\tlog.Logger().FinishMessage(\"Create pull-request\")\n\treturn dtoResponse, nil\n}",
"func (c *Client) GetUserProjectDetailInfo(bizID string) (*ProjectInfo, error) {\n\tvar (\n\t\t_ = \"GetUserProjectDetailInfo\"\n\t\turl = fmt.Sprintf(\"/get_user_project_detail/%s/\", bizID)\n\t)\n\n\tuserAuth, err := c.generateGateWayAuth(c.bkUserName)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"bksops GetUserProjectDetailInfo generateGateWayAuth failed: %v\", err)\n\t}\n\n\tresp := &UserProjectResponse{}\n\t_, _, errs := gorequest.New().\n\t\tTimeout(defaultTimeOut).\n\t\tGet(c.server+url).\n\t\tSet(\"X-Bkapi-Authorization\", userAuth).\n\t\tSet(\"Content-Type\", \"application/json\").\n\t\tSet(\"Accept\", \"application/json\").\n\t\tSetDebug(c.serverDebug).\n\t\tEndStruct(&resp)\n\tif len(errs) > 0 {\n\t\tblog.Errorf(\"call api GetUserProjectDetailInfo failed: %v\", errs[0])\n\t\treturn nil, errs[0]\n\t}\n\n\tif !resp.Result {\n\t\tblog.Errorf(\"call api GetUserProjectDetailInfo failed: %v\", resp.Message)\n\t\treturn nil, fmt.Errorf(resp.Message)\n\t}\n\n\t// successfully request\n\tblog.Infof(\"call api GetUserProjectDetailInfo with url(%s) successfully\", url)\n\n\treturn &resp.Data, nil\n}",
"func (c *Client) getPullRequestDiffOrPatch(owner, repo, kind string, index int64) ([]byte, *Response, error) {\n\tif err := escapeValidatePathSegments(&owner, &repo, &kind); err != nil {\n\t\treturn nil, nil, err\n\t}\n\tif err := c.checkServerVersionGreaterThanOrEqual(version1_13_0); err != nil {\n\t\tr, _, err2 := c.GetRepo(owner, repo)\n\t\tif err2 != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t\tif r.Private {\n\t\t\treturn nil, nil, err\n\t\t}\n\t\treturn c.getWebResponse(\"GET\", fmt.Sprintf(\"/%s/%s/pulls/%d.%s\", owner, repo, index, kind), nil)\n\t}\n\treturn c.getResponse(\"GET\", fmt.Sprintf(\"/repos/%s/%s/pulls/%d.%s\", owner, repo, index, kind), nil, nil)\n}",
"func (pr *PullRequest) CreateOrUpdate() error {\n\t// check the optional settings now, before actually creating the PR (which we'll have to update)\n\n\tlabels := pr.GetSetting(\"github_labels\")\n\tassignees := pr.GetSetting(\"github_assignees\")\n\tmilestone := pr.GetSetting(\"github_milestone\")\n\n\tfmt.Printf(\"Preparing to open GitHub pull request for %v\\n\", pr.RepoFullName)\n\n\t// TODO if pr exists then update original comment (if diff from original)\n\t// check return code on status?\n\tdata, err := pr.createPR()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif data == nil {\n\t\tdata, err = pr.getExisting()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\t// Store these for future API calls\n\tpr.nodeID = data[\"node_id\"].(string)\n\tpr.apiURL = data[\"url\"].(string)\n\n\t// pr has been created at this point, now have to add meta fields in\n\t// another request\n\tissueURL, _ := data[\"issue_url\"].(string)\n\thtmlURL, _ := data[\"html_url\"].(string)\n\tissueTitle, _ := data[\"title\"].(string)\n\tissueBody, _ := data[\"body\"].(string)\n\n\tif labels != nil || assignees != nil || milestone != nil || pr.Title != issueTitle || pr.Body != issueBody {\n\t\tissueMap := make(map[string]interface{})\n\n\t\t// Make sure these are correct and up-to-date\n\t\tissueMap[\"title\"] = pr.Title\n\t\tissueMap[\"body\"] = pr.Body\n\n\t\tif labels != nil {\n\t\t\tissueMap[\"labels\"] = labels\n\t\t}\n\t\tif assignees != nil {\n\t\t\tissueMap[\"assignees\"] = assignees\n\t\t}\n\t\tif milestone != nil {\n\t\t\tissueMap[\"milestone\"] = milestone\n\t\t}\n\n\t\tfmt.Printf(\"%+v\\n\", issueMap)\n\t\tissueData, _ := json.Marshal(issueMap)\n\n\t\tresp, _, err := pr.request(\"PATCH\", issueURL, issueData)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif resp.StatusCode != 200 {\n\t\t\treturn fmt.Errorf(\"failed to update pull request: %+v\", resp)\n\t\t}\n\n\t\toutput.Event(\"Successfully updated PR fields on %v\\n\", htmlURL)\n\t}\n\n\tif automerge := pr.GetSetting(\"github_automerge\"); automerge != nil {\n\n\t\tcurrentAutomerge := data[\"auto_merge\"]\n\n\t\tautomergeMethod, ok := automerge.(string)\n\t\tif !ok {\n\t\t\tautomergeBool, ok := automerge.(bool)\n\t\t\tif !ok {\n\t\t\t\treturn fmt.Errorf(\"github_automerge must be a string (\\\"merge\\\", \\\"rebase\\\", or \\\"squash\\\") or a boolean\")\n\t\t\t}\n\t\t\tif automergeBool {\n\t\t\t\tautomergeMethod = \"squash\"\n\t\t\t} else {\n\t\t\t\tautomergeMethod = \"none\"\n\t\t\t}\n\t\t}\n\n\t\tif currentAutomerge == nil && automergeMethod != \"none\" {\n\t\t\toutput.Event(\"Enabling \\\"%s\\\" automerge on %v\\n\", automergeMethod, htmlURL)\n\t\t\tif err := pr.enableAutomerge(automergeMethod); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t} else if currentAutomerge != nil && automergeMethod == \"none\" {\n\t\t\toutput.Event(\"Disabling automerge on %v\\n\", htmlURL)\n\t\t\tif err := pr.disableAutomerge(); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t} else {\n\t\t\toutput.Event(\"No automerge change to make on %v\\nRequested: %s\\nExisting: %+v\", automergeMethod, currentAutomerge, htmlURL)\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (h *stiGit) GetInfo(repo string) *SourceInfo {\n\tgit := func(arg ...string) string {\n\t\tcommand := exec.Command(\"git\", arg...)\n\t\tcommand.Dir = repo\n\t\tout, err := command.CombinedOutput()\n\t\tif err != nil {\n\t\t\tlog.V(1).Infof(\"Error executing 'git %#v': %s (%v)\", arg, out, err)\n\t\t\treturn \"\"\n\t\t}\n\t\treturn strings.TrimSpace(string(out))\n\t}\n\treturn &SourceInfo{\n\t\tLocation: git(\"config\", \"--get\", \"remote.origin.url\"),\n\t\tRef: git(\"rev-parse\", \"--abbrev-ref\", \"HEAD\"),\n\t\tCommitID: git(\"rev-parse\", \"--verify\", \"HEAD\"),\n\t\tAuthorName: git(\"--no-pager\", \"show\", \"-s\", \"--format=%an\", \"HEAD\"),\n\t\tAuthorEmail: git(\"--no-pager\", \"show\", \"-s\", \"--format=%ae\", \"HEAD\"),\n\t\tCommitterName: git(\"--no-pager\", \"show\", \"-s\", \"--format=%cn\", \"HEAD\"),\n\t\tCommitterEmail: git(\"--no-pager\", \"show\", \"-s\", \"--format=%ce\", \"HEAD\"),\n\t\tDate: git(\"--no-pager\", \"show\", \"-s\", \"--format=%ad\", \"HEAD\"),\n\t\tMessage: git(\"--no-pager\", \"show\", \"-s\", \"--format=%<(80,trunc)%s\", \"HEAD\"),\n\t}\n}",
"func NewLineByPullRequest(repoName string, pr github.PullRequest) Line {\n\treturn Line{\n\t\ttitle: *pr.Title,\n\t\trepoName: repoName,\n\t\turl: *pr.HTMLURL,\n\t\tuser: *pr.User.Login,\n\t\tstatus: getPullRequestStatus(pr),\n\t}\n}",
"func (c *Client) GetPullRequestPatch(owner, repo string, index int64) ([]byte, *Response, error) {\n\treturn c.getPullRequestDiffOrPatch(owner, repo, \"patch\", index)\n}",
"func (i *interactor) CheckoutPullRequest(number int) error {\n\ti.logger.Infof(\"Checking out pull request %d\", number)\n\tif err := i.FetchRef(fmt.Sprintf(\"pull/%d/head\", number)); err != nil {\n\t\treturn err\n\t}\n\tif err := i.Checkout(\"FETCH_HEAD\"); err != nil {\n\t\treturn err\n\t}\n\tif err := i.CheckoutNewBranch(fmt.Sprintf(\"pull%d\", number)); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func (pr *PullRequest) CreateOrUpdate() error {\n\t// check the optional settings now, before actually creating the PR (which we'll have to update)\n\n\tlabels := pr.GetSetting(\"github_labels\")\n\tassignees := pr.GetSetting(\"github_assignees\")\n\tmilestone := pr.GetSetting(\"github_milestone\")\n\n\tfmt.Printf(\"Preparing to open GitHub pull request for %v\\n\", pr.RepoFullName)\n\n\t// TODO if pr exists then update original comment (if diff from original)\n\t// check return code on status?\n\tdata, err := pr.createPR()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif data == nil {\n\t\tdata, err = pr.getExisting()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\t// pr has been created at this point, now have to add meta fields in\n\t// another request\n\tissueURL, _ := data[\"issue_url\"].(string)\n\thtmlURL, _ := data[\"html_url\"].(string)\n\tissueTitle, _ := data[\"title\"].(string)\n\tissueBody, _ := data[\"body\"].(string)\n\n\tif labels != nil || assignees != nil || milestone != nil || pr.Title != issueTitle || pr.Body != issueBody {\n\t\tissueMap := make(map[string]interface{})\n\n\t\t// Make sure these are correct and up-to-date\n\t\tissueMap[\"title\"] = pr.Title\n\t\tissueMap[\"body\"] = pr.Body\n\n\t\tif labels != nil {\n\t\t\tissueMap[\"labels\"] = labels\n\t\t}\n\t\tif assignees != nil {\n\t\t\tissueMap[\"assignees\"] = assignees\n\t\t}\n\t\tif milestone != nil {\n\t\t\tissueMap[\"milestone\"] = milestone\n\t\t}\n\n\t\tfmt.Printf(\"%+v\\n\", issueMap)\n\t\tissueData, _ := json.Marshal(issueMap)\n\n\t\tresp, _, err := pr.request(\"PATCH\", issueURL, issueData)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif resp.StatusCode != 200 {\n\t\t\treturn fmt.Errorf(\"failed to update pull request: %+v\", resp)\n\t\t}\n\n\t\toutput.Event(\"Successfully updated PR fields on %v\\n\", htmlURL)\n\t}\n\n\treturn nil\n}",
"func (m *MockClient) GetPullRequest(org, repo string, number int) (*github.PullRequest, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"GetPullRequest\", org, repo, number)\n\tret0, _ := ret[0].(*github.PullRequest)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func GetIssuesInfo(conf *modules.Config, para modules.IssuePara, resChan chan interface{}) (interface{}, error) {\n\trequestPara := new(httppara.HTTPParameters)\n\tissues := make([]modules.Issue, 0)\n\tURL := initIssueQuery(conf, para)\n\ttoken := token.PersonalToken{Name: \"PRIVATE-TOKEN\", Value: conf.AccessInfo.PersonalToken}\n\tfmt.Println(\"URL\", URL)\n\trequestPara.InitPara(URL, \"GET\", token)\n\tissuesInfo, err := HTTPRequestWithHeader(requestPara, \"issue\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif para.FirstGet == true {\n\t\tresult := issuesInfo.(httppara.HTTPResponse)\n\t\terr = json.Unmarshal(result.HTTPResponse, &issues)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tissueList, err := processIssueInfo(issues, conf, para.TargetID)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdata := modules.IssueWithHeader{\n\t\t\tHeader: result.HTTPHeader,\n\t\t\tIssues: issueList,\n\t\t}\n\t\treturn data, nil\n\t}\n\terr = json.Unmarshal(issuesInfo.(httppara.HTTPResponse).HTTPResponse, &issues)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tissueList, err := processIssueInfo(issues, conf, para.TargetID)\n\tfmt.Println(issueList)\n\tresChan <- modules.IssueResult{Data: issueList, OK: err}\n\treturn nil, err\n}",
"func GetInfo() *Info {\n\treturn &Info{\n\t\tBuildID: BuildID,\n\t\tChange: Change,\n\t\tCommitMsg: CommitMsg,\n\t\tNewBuildURL: NewBuildURL,\n\t\tTag: Tag,\n\t\tOldBuildURL: OldBuildURL,\n\t\tRevision: CurrentCommit,\n\t\tVersion: Version,\n\t}\n}",
"func (s *scraper) GetInfo(ctx context.Context, isin, url string) (*http.Request, error) {\n\treturn http.NewRequestWithContext(ctx, http.MethodGet, url, nil)\n}",
"func getVersionInfo(pkg string) (*version.Info, error) {\n\tgit := newGit(pkg)\n\tcommitID, err := git.commitID()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to obtain git commit ID: %v\\n\", err)\n\t}\n\ttreeState, err := git.treeState()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to determine git tree state: %v\\n\", err)\n\t}\n\ttag, err := git.tag(commitID)\n\tif err != nil {\n\t\ttag = \"\"\n\t}\n\tif tag != \"\" {\n\t\ttag = semverify(tag)\n\t\tif treeState == dirty {\n\t\t\ttag = tag + \"-\" + string(treeState)\n\t\t}\n\t}\n\treturn &version.Info{\n\t\tVersion: tag,\n\t\tGitCommit: commitID,\n\t\tGitTreeState: string(treeState),\n\t}, nil\n}",
"func (p *PluginClient) GitPullRequest(meta Meta, secret corev1.Secret) ClientGitPullRequest {\n\treturn newGitPullRequest(p, meta, secret)\n}",
"func (m *MaintainerManager) GetStatus(pr *gh.PullRequest) (gh.CombinedStatus, error) {\n\to := &gh.Options{}\n\to.QueryParams = map[string]string{}\n\treturn m.client.CombinedStatus(m.repo, pr.Head.Sha, o)\n}",
"func GetRequestDetails(tx *sql.Tx, id string) (*model.RequestDetails, error) {\n\tquery := `SELECT r.id, regexp_replace(u.username, '@.*', ''), rt.name, r.details\n\t\t\t FROM requests r\n\t\t\t JOIN users u ON r.requesting_user_id = u.id\n\t\t\t JOIN request_types rt ON r.request_type_id = rt.id\n\t\t\t WHERE r.id = $1`\n\n\t// Query the database.\n\trow := tx.QueryRow(query, id)\n\n\t// Extract the request details.\n\tvar rd model.RequestDetails\n\tvar rdDetails string\n\terr := row.Scan(&rd.ID, &rd.RequestingUser, &rd.RequestType, &rdDetails)\n\tswitch {\n\tcase err == sql.ErrNoRows:\n\t\treturn nil, nil\n\tcase err != nil:\n\t\treturn nil, err\n\t}\n\terr = json.Unmarshal([]byte(rdDetails), &rd.Details)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Add status information to the request details.\n\trd.Updates, err = GetRequestStatusUpdates(tx, id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &rd, nil\n}",
"func (mr *MockClientMockRecorder) GetPullRequest(org, repo, number interface{}) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"GetPullRequest\", reflect.TypeOf((*MockClient)(nil).GetPullRequest), org, repo, number)\n}",
"func AddPullRequest(config *Config, targetBranch, title string) error {\n\tgitlab := gogitlab.NewGitlab(config.Host, config.ApiPath, config.Token)\n\tid, err := getProjectId(gitlab)\n\tif err != nil {\n\t\treturn Mask(err)\n\t}\n\tfmt.Printf(\"Project id: %s\\n\", id)\n\t//fmt.Println(id)\n\n\tsourceBranch, err := git.GetLocalBranchName(nil)\n\tif err != nil {\n\t\treturn Mask(err)\n\t}\n\tfmt.Printf(\"Source branch: %s\\n\", sourceBranch)\n\tfmt.Printf(\"Target branch: %s\\n\", targetBranch)\n\n\terr = gitlab.AddMergeRequest(id, sourceBranch, targetBranch, title)\n\tif err != nil {\n\t\treturn Mask(err)\n\t}\n\n\treturn nil\n}",
"func GetInfo(BaseURL, QueryParam, authKey string) ([]byte, error) {\n\tif authKey == \"\" {\n\t\treturn nil, errors.New(\"No Auth Header\")\n\t}\n\tNewURL := fmt.Sprintf(\"%v/%v\", BaseURL, QueryParam)\n\tmaxTime := time.Second * 10\n\tclient := &http.Client{Timeout: maxTime}\n\treq, err := http.NewRequest(\"GET\", NewURL, nil)\n\tif err != nil {\n\t\treturn nil, errors.New(\"Unable to set request 400\")\n\t}\n\treq.Header.Set(\"X-Riot-Token\", authKey)\n\tresp, err := client.Do(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif resp.StatusCode >= 300 || resp.StatusCode < 200 {\n\t\treturn nil, fmt.Errorf(\"server didn’t respond 200 OK: %v\", resp.StatusCode)\n\t}\n\tBodyText, err := ioutil.ReadAll(resp.Body)\n\tdefer resp.Body.Close()\n\tif err != nil {\n\t\treturn nil, errors.New(\"Server error: 500\")\n\t}\n\treturn BodyText, nil\n\n}",
"func (m *MaintainerManager) GetPullRequestFiles(number string) ([]*gh.PullRequestFile, error) {\n\to := &gh.Options{}\n\to.QueryParams = map[string]string{}\n\tallPrFiles := []*gh.PullRequestFile{}\n\n\tif prfs, err := m.client.PullRequestFiles(m.repo, number, o); err != nil {\n\t\treturn nil, err\n\t} else {\n\t\tallPrFiles = append(allPrFiles, prfs...)\n\n\t}\n\treturn allPrFiles, nil\n}",
"func (v GithubVCS) populateCommitInfo(ctx context.Context, runinfo *RunInfo) error {\n\tcommit, _, err := v.Client.Git.GetCommit(ctx, runinfo.Owner, runinfo.Repository, runinfo.SHA)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\truninfo.SHAURL = commit.GetHTMLURL()\n\truninfo.SHATitle = strings.Split(commit.GetMessage(), \"\\n\\n\")[0]\n\n\treturn nil\n}",
"func (g *GH) GetPR(repo string, number int) (*github.PullRequest, *github.Response) {\n\tctx := context.Background()\n\tpr, rsp, err := g.c.PullRequests.Get(ctx, g.org, repo, number)\n\tif err != nil {\n\t\tlog.Println(\"Error Retrieving PR\")\n\t\treturn nil, rsp\n\t}\n\treturn pr, rsp\n}",
"func buildInfo(c *cli.Context) error {\n\trepo := c.Args().First()\n\towner, name, err := parseRepo(repo)\n\tif err != nil {\n\t\treturn err\n\t}\n\tnumber, err := strconv.Atoi(c.Args().Get(1))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tclient, err := newClient(c)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tbuild, err := client.Build(owner, name, number)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\ttmpl, err := template.New(\"_\").Parse(c.String(\"format\"))\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn tmpl.Execute(os.Stdout, build)\n}",
"func (t *SimpleChaincode) get_request_details(stub shim.ChaincodeStubInterface, id string) ([]byte, error) {\n\n\tbytes, err := stub.GetState(id);\n\n\tif err != nil { return nil, errors.New(\"get_request_details: Invalid request object\") }\n\n\treturn bytes, nil\n\n}",
"func getPackageInfo(c nfpm.Config, format string) (*nfpm.Info, error) {\n\td, err := describeHead()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tv, err := getVersion(d)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tc.Version = v.String()\n\n\tinfo, err := c.Get(format)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tinfo = nfpm.WithDefaults(info)\n\n\tswitch format {\n\tcase \"deb\":\n\t\t// Ref: https://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics.en.html#s-pkgname\n\t\tinfo.Target = fmt.Sprintf(\"%v_%v-%v_%v.%v\",\n\t\t\tinfo.Name,\n\t\t\tinfo.Version,\n\t\t\tinfo.Release,\n\t\t\tinfo.Arch,\n\t\t\tformat)\n\tcase \"rpm\":\n\t\t// Ref: http://ftp.rpm.org/max-rpm/ch-rpm-file-format.html\n\t\tinfo.Target = fmt.Sprintf(\"%v-%v-%v.%v.%v\",\n\t\t\tinfo.Name,\n\t\t\tinfo.Version,\n\t\t\tinfo.Release,\n\t\t\tinfo.Arch,\n\t\t\tformat)\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unknown package format: %v\", format)\n\t}\n\n\tif err = nfpm.Validate(info); err != nil {\n\t\treturn nil, err\n\t}\n\treturn info, nil\n}",
"func (hook *Hook) Getinfo() (map[string]string, error) {\n\tcmd := exec.Command(\"svnlook\", \"info\", hook.repospath)\n\tstdout, err := cmd.StdoutPipe()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif err = cmd.Start(); err != nil {\n\t\treturn nil, err\n\t}\n\tinfo, err := ioutil.ReadAll(stdout)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsplitinfo := strings.SplitN(string(info), \"\\n\", -1)\n\tinfomap := make(map[string]string)\n\tinfomap[\"author\"] = splitinfo[0]\n\tinfomap[\"timestamp\"] = splitinfo[1]\n\tinfomap[\"logsize\"] = splitinfo[2]\n\tinfomap[\"log\"] = splitinfo[3]\n\treturn infomap, nil\n}",
"func getInfo(url string) []byte {\n\n\tres, err := http.Get(url)\n\tcheck(err)\n\tinfo, err := ioutil.ReadAll(res.Body)\n\tres.Body.Close()\n\tcheck(err)\n\n\treturn info\n\n}",
"func (c *client) CreatePullRequest(org, repo, title, body, head, base string, canModify bool) (int, error) {\n\tdurationLogger := c.log(\"CreatePullRequest\", org, repo, title)\n\tdefer durationLogger()\n\n\tdata := struct {\n\t\tTitle string `json:\"title\"`\n\t\tBody string `json:\"body\"`\n\t\tHead string `json:\"head\"`\n\t\tBase string `json:\"base\"`\n\t\t// MaintainerCanModify allows maintainers of the repo to modify this\n\t\t// pull request, eg. push changes to it before merging.\n\t\tMaintainerCanModify bool `json:\"maintainer_can_modify\"`\n\t}{\n\t\tTitle: title,\n\t\tBody: body,\n\t\tHead: head,\n\t\tBase: base,\n\n\t\tMaintainerCanModify: canModify,\n\t}\n\tvar resp struct {\n\t\tNum int `json:\"number\"`\n\t}\n\t_, err := c.request(&request{\n\t\t// allow the description and draft fields\n\t\t// https://developer.github.com/changes/2018-02-22-label-description-search-preview/\n\t\t// https://developer.github.com/changes/2019-02-14-draft-pull-requests/\n\t\taccept: \"application/vnd.github.symmetra-preview+json, application/vnd.github.shadow-cat-preview\",\n\t\tmethod: http.MethodPost,\n\t\tpath: fmt.Sprintf(\"/repos/%s/%s/pulls\", org, repo),\n\t\torg: org,\n\t\trequestBody: &data,\n\t\texitCodes: []int{201},\n\t}, &resp)\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"failed to create pull request against %s/%s#%s from head %s: %w\", org, repo, base, head, err)\n\t}\n\treturn resp.Num, nil\n}",
"func (mr *MockPullRequestClientMockRecorder) GetPullRequest(org, repo, number interface{}) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"GetPullRequest\", reflect.TypeOf((*MockPullRequestClient)(nil).GetPullRequest), org, repo, number)\n}",
"func NewPullRequestPost(ctx *middleware.Context, form auth.NewPullRequestForm) {\n\trepo := ctx.Repo.Repository\n\tif err := repo.GetForkRepo(); err != nil {\n\t\tctx.Handle(500, \"GetForkRepo\", err)\n\t\treturn\n\t}\n\tforkRepo := repo.ForkRepo\n\n\tif hasPullRequested(ctx, repo.ID, forkRepo) {\n\t\treturn\n\t}\n\n\tpr := &models.Issue{\n\t\tRepoID: repo.ForkID,\n\t\tIndex: int64(forkRepo.NumIssues) + 1,\n\t\tName: form.Title,\n\t\tPosterID: ctx.User.Id,\n\t\tIsPull: true,\n\t\tContent: form.Description,\n\t}\n\tpullRepo := &models.PullRepo{\n\t\tFromRepoID: repo.ID,\n\t\tToRepoID: forkRepo.ID,\n\t\tFromBranch: form.FromBranch,\n\t\tToBranch: form.ToBranch,\n\t}\n\tif err := models.NewPullRequest(pr, pullRepo); err != nil {\n\t\tctx.Handle(500, \"NewPullRequest\", err)\n\t\treturn\n\t} else if err := models.NewIssueUserPairs(forkRepo, pr.ID, forkRepo.OwnerID,\n\t\tctx.User.Id, 0); err != nil {\n\t\tctx.Handle(500, \"NewIssueUserPairs\", err)\n\t\treturn\n\t}\n\n\t// FIXME: add action\n\n\trepoLink, err := forkRepo.RepoLink()\n\tif err != nil {\n\t\tctx.Handle(500, \"RepoLink\", err)\n\t\treturn\n\t}\n\tctx.Redirect(fmt.Sprintf(\"%s/pulls/%d\", repoLink, pr.Index))\n}",
"func GetInfo() Info {\n\treturn Info{\n\t\tVersion: Version,\n\t\tBuildDate: BuildDate,\n\t\tGitCommit: GitCommit,\n\t}\n}",
"func (c *gitlabClient) PullRequestEvents(context.Context, string, []interface{}) ([]sdk.VCSPullRequestEvent, error) {\n\treturn nil, fmt.Errorf(\"Not implemented on Gitlab\")\n}",
"func getCrtcInfoRequest(c *xgb.Conn, Crtc Crtc, ConfigTimestamp xproto.Timestamp) []byte {\n\tsize := 12\n\tb := 0\n\tbuf := make([]byte, size)\n\n\tc.ExtLock.RLock()\n\tbuf[b] = c.Extensions[\"RANDR\"]\n\tc.ExtLock.RUnlock()\n\tb += 1\n\n\tbuf[b] = 20 // request opcode\n\tb += 1\n\n\txgb.Put16(buf[b:], uint16(size/4)) // write request size in 4-byte units\n\tb += 2\n\n\txgb.Put32(buf[b:], uint32(Crtc))\n\tb += 4\n\n\txgb.Put32(buf[b:], uint32(ConfigTimestamp))\n\tb += 4\n\n\treturn buf\n}",
"func (c *Client) GetPullRequestDiff(owner, repo string, index int64) ([]byte, *Response, error) {\n\treturn c.getPullRequestDiffOrPatch(owner, repo, \"diff\", index)\n}",
"func (j *DSGitHub) GetFirstPullRequestReviewDate(pull map[string]interface{}, commsAndReviews bool) (dt time.Time) {\n\tiUserLogin, _ := Dig(pull, []string{\"user\", \"login\"}, false, true)\n\tuserLogin, _ := iUserLogin.(string)\n\tdts := []time.Time{}\n\tudts := []time.Time{}\n\tiReviews, ok := pull[\"review_comments_data\"]\n\tif ok && iReviews != nil {\n\t\tary, _ := iReviews.([]interface{})\n\t\tfor _, iReview := range ary {\n\t\t\treview, _ := iReview.(map[string]interface{})\n\t\t\tiReviewLogin, _ := Dig(review, []string{\"user\", \"login\"}, false, true)\n\t\t\treviewLogin, _ := iReviewLogin.(string)\n\t\t\tiCreatedAt, _ := review[\"created_at\"]\n\t\t\tcreatedAt, _ := TimeParseInterfaceString(iCreatedAt)\n\t\t\tif userLogin == reviewLogin {\n\t\t\t\tudts = append(udts, createdAt)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tdts = append(dts, createdAt)\n\t\t}\n\t}\n\tif commsAndReviews {\n\t\tiReviews, ok := pull[\"reviews_data\"]\n\t\tif ok && iReviews != nil {\n\t\t\tary, _ := iReviews.([]interface{})\n\t\t\tfor _, iReview := range ary {\n\t\t\t\treview, _ := iReview.(map[string]interface{})\n\t\t\t\tiReviewLogin, _ := Dig(review, []string{\"user\", \"login\"}, false, true)\n\t\t\t\treviewLogin, _ := iReviewLogin.(string)\n\t\t\t\tiSubmittedAt, _ := review[\"submitted_at\"]\n\t\t\t\tsubmittedAt, _ := TimeParseInterfaceString(iSubmittedAt)\n\t\t\t\tif userLogin == reviewLogin {\n\t\t\t\t\tudts = append(udts, submittedAt)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tdts = append(dts, submittedAt)\n\t\t\t}\n\t\t}\n\t}\n\tnDts := len(dts)\n\tif nDts == 0 {\n\t\t// If there was no review of anybody else that author's, then fallback to author's review\n\t\tdts = udts\n\t\tnDts = len(dts)\n\t}\n\tswitch nDts {\n\tcase 0:\n\t\tdt = time.Now()\n\tcase 1:\n\t\tdt = dts[0]\n\tdefault:\n\t\tsort.Slice(dts, func(i, j int) bool {\n\t\t\treturn dts[i].Before(dts[j])\n\t\t})\n\t\tdt = dts[0]\n\t}\n\treturn\n}",
"func (m *AssignedToTaskBoardFormatRequestBuilder) CreatePatchRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.PlannerAssignedToTaskBoardTaskFormatable, requestConfiguration *AssignedToTaskBoardFormatRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {\n requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()\n requestInfo.UrlTemplate = m.urlTemplate\n requestInfo.PathParameters = m.pathParameters\n requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH\n requestInfo.Headers[\"Accept\"] = \"application/json\"\n requestInfo.SetContentFromParsable(ctx, m.requestAdapter, \"application/json\", body)\n if requestConfiguration != nil {\n requestInfo.AddRequestHeaders(requestConfiguration.Headers)\n requestInfo.AddRequestOptions(requestConfiguration.Options)\n }\n return requestInfo, nil\n}",
"func (g *Github) GetOpenPullRequest(ctx context.Context, repo scm.Repository, branchName string) (scm.PullRequest, error) {\n\tr := repo.(repository)\n\n\theadOwner, err := g.headOwner(ctx, r.ownerName)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tprs, _, err := retry(ctx, func() ([]*github.PullRequest, *github.Response, error) {\n\t\treturn g.ghClient.PullRequests.List(ctx, headOwner, r.name, &github.PullRequestListOptions{\n\t\t\tHead: fmt.Sprintf(\"%s:%s\", headOwner, branchName),\n\t\t\tState: \"open\",\n\t\t\tListOptions: github.ListOptions{\n\t\t\t\tPerPage: 1,\n\t\t\t},\n\t\t})\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get open pull requests: %w\", err)\n\t}\n\tif len(prs) == 0 {\n\t\treturn nil, nil\n\t}\n\treturn convertPullRequest(prs[0]), nil\n}",
"func (m *MaintainerManager) MergePullRequest(number, comment string, force bool) (gh.Merge, error) {\n\tcomments, err := m.GetComments(number)\n\tif err != nil {\n\t\treturn gh.Merge{}, err\n\t}\n\tisApproved := false\n\tfor _, c := range comments {\n\t\t// FIXME: Again should check for LGTM from a maintainer\n\t\tif strings.Contains(c.Body, \"LGTM\") {\n\t\t\tisApproved = true\n\t\t\tbreak\n\t\t}\n\t}\n\tif !isApproved && !force {\n\t\treturn gh.Merge{}, fmt.Errorf(\"Pull request %s has not been approved\", number)\n\t}\n\to := &gh.Options{}\n\to.Params = map[string]string{\n\t\t\"commit_message\": comment,\n\t}\n\treturn m.client.MergePullRequest(m.repo, number, o)\n}",
"func (m *AssignedToTaskBoardFormatRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *AssignedToTaskBoardFormatRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {\n requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()\n requestInfo.UrlTemplate = m.urlTemplate\n requestInfo.PathParameters = m.pathParameters\n requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET\n requestInfo.Headers[\"Accept\"] = \"application/json\"\n if requestConfiguration != nil {\n if requestConfiguration.QueryParameters != nil {\n requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters))\n }\n requestInfo.AddRequestHeaders(requestConfiguration.Headers)\n requestInfo.AddRequestOptions(requestConfiguration.Options)\n }\n return requestInfo, nil\n}",
"func (c *client) UpdatePullRequest(org, repo string, number int, title, body *string, open *bool, branch *string, canModify *bool) error {\n\tdurationLogger := c.log(\"UpdatePullRequest\", org, repo, title)\n\tdefer durationLogger()\n\n\tdata := struct {\n\t\tState *string `json:\"state,omitempty\"`\n\t\tTitle *string `json:\"title,omitempty\"`\n\t\tBody *string `json:\"body,omitempty\"`\n\t\tBase *string `json:\"base,omitempty\"`\n\t\t// MaintainerCanModify allows maintainers of the repo to modify this\n\t\t// pull request, eg. push changes to it before merging.\n\t\tMaintainerCanModify *bool `json:\"maintainer_can_modify,omitempty\"`\n\t}{\n\t\tTitle: title,\n\t\tBody: body,\n\t\tBase: branch,\n\t\tMaintainerCanModify: canModify,\n\t}\n\tif open != nil && *open {\n\t\top := \"open\"\n\t\tdata.State = &op\n\t} else if open != nil {\n\t\tcl := \"closed\"\n\t\tdata.State = &cl\n\t}\n\t_, err := c.request(&request{\n\t\t// allow the description and draft fields\n\t\t// https://developer.github.com/changes/2018-02-22-label-description-search-preview/\n\t\t// https://developer.github.com/changes/2019-02-14-draft-pull-requests/\n\t\taccept: \"application/vnd.github.symmetra-preview+json, application/vnd.github.shadow-cat-preview\",\n\t\tmethod: http.MethodPatch,\n\t\tpath: fmt.Sprintf(\"/repos/%s/%s/pulls/%d\", org, repo, number),\n\t\torg: org,\n\t\trequestBody: &data,\n\t\texitCodes: []int{200},\n\t}, nil)\n\treturn err\n}",
"func formatRequestInfo(r *http.Request) string {\n\t// Dump HTTP request\n\tdump, err := httputil.DumpRequest(r, true)\n\tif err != nil {\n\t\treturn err.Error()\n\t}\n\treturn string(dump)\n}",
"func pr(diff string) {\n\tif githubToken == \"\" {\n\t\tlog.Printf(\"In order to add request comment, set the GITHUB_TOKEN input.\")\n\t\treturn\n\t}\n\n\tbody := \"[goreadme](https://github.com/posener/goreadme) will not make any changes in this PR\"\n\tif diff != \"\" {\n\t\tbody = fmt.Sprintf(\n\t\t\t\"[goreadme](https://github.com/posener/goreadme) diff for %s file for this PR:\\n\\n%s\",\n\t\t\tpath,\n\t\t\tdiff)\n\t}\n\n\tctx := context.Background()\n\terr := actionutil.PRComment(ctx, githubToken, body)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n}",
"func pr(diff string) {\n\tif githubToken == \"\" {\n\t\tlog.Printf(\"In order to add request comment, set the GITHUB_TOKEN input.\")\n\t\treturn\n\t}\n\n\tbody := \"[Goaction](https://github.com/posener/goaction) will apply the following changes after PR is merged.\\n\\n\" + diff\n\tif diff == \"\" {\n\t\tbody = \"[Goaction](https://github.com/posener/goaction) detected no required changes to Github action files.\"\n\t}\n\n\tctx := context.Background()\n\terr := actionutil.PRComment(ctx, githubToken, body)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n}",
"func (u GitlabUpstream) PullRequestURL(repoURL *url.URL, branch string) (string, error) {\n\trepoURL.Path = repoURL.Path + \"/-/merge_requests/new\"\n\tif branch != \"master\" {\n\t\tq := make(url.Values)\n\t\tq.Add(\"merge_request[source_branch]\", branch)\n\t\tq.Add(\"merge_request[target_branch]\", \"master\")\n\n\t\trepoURL.RawQuery = q.Encode()\n\t}\n\treturn repoURL.String(), nil\n}",
"func CreatePullRequest(client *Client, repo *Repository, params map[string]interface{}) (*PullRequest, error) {\n\tquery := `\n\t\tmutation PullRequestCreate($input: CreatePullRequestInput!) {\n\t\t\tcreatePullRequest(input: $input) {\n\t\t\t\tpullRequest {\n\t\t\t\t\tid\n\t\t\t\t\turl\n\t\t\t\t}\n\t\t\t}\n\t}`\n\n\tinputParams := map[string]interface{}{\n\t\t\"repositoryId\": repo.ID,\n\t}\n\tfor key, val := range params {\n\t\tswitch key {\n\t\tcase \"title\", \"body\", \"draft\", \"baseRefName\", \"headRefName\", \"maintainerCanModify\":\n\t\t\tinputParams[key] = val\n\t\t}\n\t}\n\tvariables := map[string]interface{}{\n\t\t\"input\": inputParams,\n\t}\n\n\tresult := struct {\n\t\tCreatePullRequest struct {\n\t\t\tPullRequest PullRequest\n\t\t}\n\t}{}\n\n\terr := client.GraphQL(repo.RepoHost(), query, variables, &result)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tpr := &result.CreatePullRequest.PullRequest\n\n\t// metadata parameters aren't currently available in `createPullRequest`,\n\t// but they are in `updatePullRequest`\n\tupdateParams := make(map[string]interface{})\n\tfor key, val := range params {\n\t\tswitch key {\n\t\tcase \"assigneeIds\", \"labelIds\", \"projectIds\", \"milestoneId\":\n\t\t\tif !isBlank(val) {\n\t\t\t\tupdateParams[key] = val\n\t\t\t}\n\t\t}\n\t}\n\tif len(updateParams) > 0 {\n\t\tupdateQuery := `\n\t\tmutation PullRequestCreateMetadata($input: UpdatePullRequestInput!) {\n\t\t\tupdatePullRequest(input: $input) { clientMutationId }\n\t\t}`\n\t\tupdateParams[\"pullRequestId\"] = pr.ID\n\t\tvariables := map[string]interface{}{\n\t\t\t\"input\": updateParams,\n\t\t}\n\t\terr := client.GraphQL(repo.RepoHost(), updateQuery, variables, &result)\n\t\tif err != nil {\n\t\t\treturn pr, err\n\t\t}\n\t}\n\n\t// reviewers are requested in yet another additional mutation\n\treviewParams := make(map[string]interface{})\n\tif ids, ok := params[\"userReviewerIds\"]; ok && !isBlank(ids) {\n\t\treviewParams[\"userIds\"] = ids\n\t}\n\tif ids, ok := params[\"teamReviewerIds\"]; ok && !isBlank(ids) {\n\t\treviewParams[\"teamIds\"] = ids\n\t}\n\n\t//TODO: How much work to extract this into own method and use for create and edit?\n\tif len(reviewParams) > 0 {\n\t\treviewQuery := `\n\t\tmutation PullRequestCreateRequestReviews($input: RequestReviewsInput!) {\n\t\t\trequestReviews(input: $input) { clientMutationId }\n\t\t}`\n\t\treviewParams[\"pullRequestId\"] = pr.ID\n\t\treviewParams[\"union\"] = true\n\t\tvariables := map[string]interface{}{\n\t\t\t\"input\": reviewParams,\n\t\t}\n\t\terr := client.GraphQL(repo.RepoHost(), reviewQuery, variables, &result)\n\t\tif err != nil {\n\t\t\treturn pr, err\n\t\t}\n\t}\n\n\t// projectsV2 are added in yet another mutation\n\tprojectV2Ids, ok := params[\"projectV2Ids\"].([]string)\n\tif ok {\n\t\tprojectItems := make(map[string]string, len(projectV2Ids))\n\t\tfor _, p := range projectV2Ids {\n\t\t\tprojectItems[p] = pr.ID\n\t\t}\n\t\terr = UpdateProjectV2Items(client, repo, projectItems, nil)\n\t\tif err != nil {\n\t\t\treturn pr, err\n\t\t}\n\t}\n\n\treturn pr, nil\n}",
"func (m *MockClient) GetPullRequestPatch(org, repo string, number int) ([]byte, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"GetPullRequestPatch\", org, repo, number)\n\tret0, _ := ret[0].([]byte)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"func fetchGithubIssue(conf *githubConfig) (*githubIssue, error) {\n\tctx := context.Background()\n\tts := oauth2.StaticTokenSource(\n\t\t&oauth2.Token{AccessToken: conf.token},\n\t)\n\ttc := oauth2.NewClient(ctx, ts)\n\tclient := github.NewClient(tc)\n\n\t// Read issue metadata\n\tissue, _, err := client.Issues.Get(context.Background(), conf.owner, conf.repo, conf.issueID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres := &githubIssue{\n\t\tissue: issue,\n\t\tnameByLoginID: make(map[string]string),\n\t}\n\n\t// Read user metadata\n\tuser, _, err := client.Users.Get(context.Background(), stringify(issue.User.Login))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres.nameByLoginID[stringify(issue.User.Login)] = stringify(user.Name)\n\n\t// Get all comments\n\tcomments, _, err := client.Issues.ListComments(context.Background(), conf.owner, conf.repo, conf.issueID, &github.IssueListCommentsOptions{})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres.comments = comments\n\n\tloginIDs := []*string{\n\t\tissue.User.Login,\n\t}\n\t// Aggregate all users and read their metadata\n\tif issue.Assignee != nil {\n\t\tloginIDs = append(loginIDs, issue.Assignee.Login)\n\t}\n\n\tfor _, comment := range comments {\n\t\tloginIDs = append(loginIDs, comment.User.Login)\n\t}\n\n\tfor _, loginID := range loginIDs {\n\t\tid := stringify(loginID)\n\t\tif _, ok := res.nameByLoginID[id]; ok {\n\t\t\tcontinue\n\t\t}\n\t\tuser, _, err := client.Users.Get(context.Background(), id)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tres.nameByLoginID[id] = stringify(user.Name)\n\t}\n\treturn res, nil\n}",
"func (p *PullRequestComment) GetPullRequestURL() string {\n\tif p == nil || p.PullRequestURL == nil {\n\t\treturn \"\"\n\t}\n\treturn *p.PullRequestURL\n}",
"func (m *TeamworkRequestBuilder) CreatePatchRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.UserTeamworkable, requestConfiguration *TeamworkRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {\n requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()\n requestInfo.UrlTemplate = m.urlTemplate\n requestInfo.PathParameters = m.pathParameters\n requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH\n requestInfo.Headers[\"Accept\"] = \"application/json\"\n requestInfo.SetContentFromParsable(ctx, m.requestAdapter, \"application/json\", body)\n if requestConfiguration != nil {\n requestInfo.AddRequestHeaders(requestConfiguration.Headers)\n requestInfo.AddRequestOptions(requestConfiguration.Options)\n }\n return requestInfo, nil\n}",
"func addLabelsToPullRequest(prInfo *PullRequestInfo, labels []string) error {\n\tif prInfo == nil {\n\t\treturn errors.New(\"pull request to label cannot be nil\")\n\t}\n\tpr := prInfo.PullRequest\n\tprovider := prInfo.GitProvider\n\n\tif len(labels) > 0 {\n\t\tnumber := *pr.Number\n\t\tvar err error\n\t\terr = provider.AddLabelsToIssue(pr.Owner, pr.Repo, number, labels)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tlog.Logger().Infof(\"Added label %s to Pull Request %s\", util.ColorInfo(strings.Join(labels, \", \")), pr.URL)\n\t}\n\treturn nil\n}",
"func (_m *CodeReview) GetPatchsetInfo(ctx context.Context, issue codereview.Issue) (string, bool, error) {\n\tret := _m.Called(ctx, issue)\n\n\tvar r0 string\n\tif rf, ok := ret.Get(0).(func(context.Context, codereview.Issue) string); ok {\n\t\tr0 = rf(ctx, issue)\n\t} else {\n\t\tr0 = ret.Get(0).(string)\n\t}\n\n\tvar r1 bool\n\tif rf, ok := ret.Get(1).(func(context.Context, codereview.Issue) bool); ok {\n\t\tr1 = rf(ctx, issue)\n\t} else {\n\t\tr1 = ret.Get(1).(bool)\n\t}\n\n\tvar r2 error\n\tif rf, ok := ret.Get(2).(func(context.Context, codereview.Issue) error); ok {\n\t\tr2 = rf(ctx, issue)\n\t} else {\n\t\tr2 = ret.Error(2)\n\t}\n\n\treturn r0, r1, r2\n}",
"func GetBuildInfo() Info {\n\treturn Info{Version: buildInfoVersion,\n\t\tRepo: \"https://github.com/cbuschka/versioner\",\n\t\tAuthor: \"Cornelius Buschka <[email protected]>, https://github.com/cbuschka\",\n\t\tCommitish: buildInfoCommitish,\n\t\tBuildTime: strings.Replace(buildInfoBuildTime, \"_\", \" \", -1),\n\t\tArch: buildInfoArch,\n\t\tOS: buildInfoOs}\n}",
"func (c *client) GetPullRequests(org, repo string) ([]PullRequest, error) {\n\tc.log(\"GetPullRequests\", org, repo)\n\tvar prs []PullRequest\n\tif c.fake {\n\t\treturn prs, nil\n\t}\n\tpath := fmt.Sprintf(\"/repos/%s/%s/pulls\", org, repo)\n\terr := c.readPaginatedResults(\n\t\tpath,\n\t\t// allow the description and draft fields\n\t\t// https://developer.github.com/changes/2018-02-22-label-description-search-preview/\n\t\t// https://developer.github.com/changes/2019-02-14-draft-pull-requests/\n\t\t\"application/vnd.github.symmetra-preview+json, application/vnd.github.shadow-cat-preview\",\n\t\torg,\n\t\tfunc() interface{} {\n\t\t\treturn &[]PullRequest{}\n\t\t},\n\t\tfunc(obj interface{}) {\n\t\t\tprs = append(prs, *(obj.(*[]PullRequest))...)\n\t\t},\n\t)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn prs, err\n}",
"func GetInfo(url string, id primitive.ObjectID) (info Info, title string) {\n\t// query title\n\tif strings.HasPrefix(url, \"/post/\") {\n\t\turl = url[6:]\n\t}\n\tp, err := post.GetPublicFieldPost(url)\n\tif err == nil {\n\t\ttitle = p.Title\n\t}\n\n\t// query reply info\n\tinfoArr := make([]Info, 0)\n\t_, err = mongo.Aggregate(\"blotter\", \"comments\", []bson.M{\n\t\t{\n\t\t\t\"$match\": bson.M{\n\t\t\t\t\"_id\": id,\n\t\t\t},\n\t\t},\n\t}, nil, &infoArr)\n\tif err == nil && len(infoArr) > 0 {\n\t\tinfo = infoArr[0]\n\t}\n\treturn\n}"
] |
[
"0.7703605",
"0.729949",
"0.70665276",
"0.6482208",
"0.62796485",
"0.6279046",
"0.61857355",
"0.6122385",
"0.592236",
"0.59074146",
"0.5778976",
"0.5732249",
"0.5691629",
"0.5684453",
"0.5679665",
"0.56357855",
"0.5532415",
"0.5519468",
"0.5501818",
"0.5495251",
"0.54686165",
"0.5448366",
"0.54387945",
"0.5427763",
"0.5427337",
"0.53980964",
"0.5339618",
"0.53149885",
"0.5301691",
"0.5297002",
"0.5291271",
"0.5287891",
"0.52816385",
"0.52571166",
"0.5249002",
"0.52426374",
"0.5238923",
"0.5230708",
"0.5229215",
"0.52178764",
"0.5216312",
"0.5201887",
"0.5179814",
"0.5165428",
"0.5158268",
"0.5151941",
"0.51479435",
"0.51477",
"0.51465404",
"0.5131125",
"0.5125153",
"0.50889975",
"0.50837976",
"0.50709",
"0.5055528",
"0.50449836",
"0.5038551",
"0.5036801",
"0.50363636",
"0.50219166",
"0.50120896",
"0.50108325",
"0.4997916",
"0.4996339",
"0.49914598",
"0.49912903",
"0.49871713",
"0.4983259",
"0.49821547",
"0.49788404",
"0.49776092",
"0.4958506",
"0.49558523",
"0.4952441",
"0.49515432",
"0.49503067",
"0.49409133",
"0.4934407",
"0.49124277",
"0.49099502",
"0.48994124",
"0.48989344",
"0.48961112",
"0.4895121",
"0.4892466",
"0.487883",
"0.4874006",
"0.4865927",
"0.48608702",
"0.4853399",
"0.48468485",
"0.4846458",
"0.48410285",
"0.48241284",
"0.48233798",
"0.48226127",
"0.48203823",
"0.48187926",
"0.48181272",
"0.4812315"
] |
0.79986423
|
0
|
getIssuesInfo gets the information for an issue
|
func getIssuesInfo(p *api.IssuePayload) (issueTitle, link, by, operator, operateResult, assignees string) {
issueTitle = fmt.Sprintf("[Issue-%s #%d]: %s\n%s", p.Repository.FullName, p.Issue.Index, p.Action, p.Issue.Title)
assignList := p.Issue.Assignees
assignStringList := make([]string, len(assignList))
for i, user := range assignList {
assignStringList[i] = user.UserName
}
if p.Action == api.HookIssueAssigned {
operateResult = fmt.Sprintf("%s assign this to %s", p.Sender.UserName, assignList[len(assignList)-1].UserName)
} else if p.Action == api.HookIssueUnassigned {
operateResult = fmt.Sprintf("%s unassigned this for someone", p.Sender.UserName)
} else if p.Action == api.HookIssueMilestoned {
operateResult = fmt.Sprintf("%s/milestone/%d", p.Repository.HTMLURL, p.Issue.Milestone.ID)
}
link = p.Issue.HTMLURL
by = fmt.Sprintf("Issue by %s", p.Issue.Poster.UserName)
if len(assignStringList) > 0 {
assignees = fmt.Sprintf("Assignees: %s", strings.Join(assignStringList, ", "))
}
operator = fmt.Sprintf("Operator: %s", p.Sender.UserName)
return issueTitle, link, by, operator, operateResult, assignees
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func GetIssuesInfo(conf *modules.Config, para modules.IssuePara, resChan chan interface{}) (interface{}, error) {\n\trequestPara := new(httppara.HTTPParameters)\n\tissues := make([]modules.Issue, 0)\n\tURL := initIssueQuery(conf, para)\n\ttoken := token.PersonalToken{Name: \"PRIVATE-TOKEN\", Value: conf.AccessInfo.PersonalToken}\n\tfmt.Println(\"URL\", URL)\n\trequestPara.InitPara(URL, \"GET\", token)\n\tissuesInfo, err := HTTPRequestWithHeader(requestPara, \"issue\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif para.FirstGet == true {\n\t\tresult := issuesInfo.(httppara.HTTPResponse)\n\t\terr = json.Unmarshal(result.HTTPResponse, &issues)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tissueList, err := processIssueInfo(issues, conf, para.TargetID)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdata := modules.IssueWithHeader{\n\t\t\tHeader: result.HTTPHeader,\n\t\t\tIssues: issueList,\n\t\t}\n\t\treturn data, nil\n\t}\n\terr = json.Unmarshal(issuesInfo.(httppara.HTTPResponse).HTTPResponse, &issues)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tissueList, err := processIssueInfo(issues, conf, para.TargetID)\n\tfmt.Println(issueList)\n\tresChan <- modules.IssueResult{Data: issueList, OK: err}\n\treturn nil, err\n}",
"func getIssuesCommentInfo(p *api.IssueCommentPayload) (title, link, by, operator string) {\n\ttitle = fmt.Sprintf(\"[Comment-%s #%d]: %s\\n%s\", p.Repository.FullName, p.Issue.Index, p.Action, p.Issue.Title)\n\tlink = p.Issue.HTMLURL\n\tif p.IsPull {\n\t\tby = fmt.Sprintf(\"PullRequest by %s\", p.Issue.Poster.UserName)\n\t} else {\n\t\tby = fmt.Sprintf(\"Issue by %s\", p.Issue.Poster.UserName)\n\t}\n\toperator = fmt.Sprintf(\"Operator: %s\", p.Sender.UserName)\n\treturn title, link, by, operator\n}",
"func (client jiraServerClient) GetIssueInfo(projectID string) (*ProjectIssueInfo, *jira.Response, error) {\n\tapiEndpoint := fmt.Sprintf(\"%s%s/issuetypes\", APIEndpointCreateIssueMeta, projectID)\n\treq, err := client.Jira.NewRequest(http.MethodGet, apiEndpoint, nil)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tissues := ProjectIssueInfo{}\n\tresponse, err := client.Jira.Do(req, &issues)\n\treturn &issues, response, err\n}",
"func getIssues(user, repo, label string) []Datos {\n\t// Format the http link\n\turl := fmt.Sprintf(\"https://api.github.com/repos/%s/%s/issues?labels=%s&page=1&per_page=100\", user, repo, label)\n\n\t// Get response\n\tbody := connectHTML(url)\n\n\t// Filter data\n\tdata := getData(body)\n\n\treturn data\n\n}",
"func (a *Action) GetIssueInfos() []string {\n\treturn strings.SplitN(a.Content, \"|\", 3)\n}",
"func GetIssue(params martini.Params) string {\n\tnumber, err := strconv.Atoi(params[\"issue\"])\n\tif err != nil {\n\t\treturn GenerateErrorMessage(err)\n\t}\n\n\tmsg := messages.GetIssue{\n\t\tIssue: &messages.Issue{\n\t\t\tID: params[\"issue\"],\n\t\t\tNumber: number,\n\t\t\tOrg: params[\"owner\"],\n\t\t\tRepo: params[\"repo\"],\n\t\t},\n\t\tConfig: config(),\n\t}\n\tresponse := Request(\"issues.details\", msg)\n\n\treturn response\n}",
"func (a *RepoAPI) readIssue(params interface{}) (resp *rpc.Response) {\n\tm := objx.New(cast.ToStringMap(params))\n\tname := m.Get(\"name\").Str()\n\treference := m.Get(\"reference\").Str()\n\treturn rpc.Success(util.Map{\n\t\t\"data\": a.mods.Repo.ReadIssue(name, reference),\n\t})\n}",
"func GetIssue(owner, repo string, params map[string]string, issueN int) (*Issue, error) {\n\turl := APIURL + strings.Join([]string{\"repos\", owner, repo, \"issues\", strconv.Itoa(issueN)}, \"/\")\n\turl += \"?\"\n\tfor k, v := range params {\n\t\turl += k + \"=\" + v\n\t}\n\n\tresp, err := get(url)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar result Issue\n\n\tif err := json.NewDecoder(resp.Body).Decode(&result); err != nil {\n\t\tresp.Body.Close()\n\t\treturn nil, err\n\t}\n\tresp.Body.Close()\n\treturn &result, nil\n}",
"func (r *Reitveld) Issue(issue int64) (*Issue, error) {\n\treq, err := http.NewRequest(\"GET\", fmt.Sprintf(\"https://codereview.chromium.org/api/%d/\", issue), nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Failed to build request: %s\", err)\n\t}\n\tresp, err := r.client.Do(req)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Failed to retrieve issue info: %s\", err)\n\t}\n\tif resp.StatusCode != 200 {\n\t\treturn nil, fmt.Errorf(\"No such issue %d\", issue)\n\t}\n\tdec := json.NewDecoder(resp.Body)\n\tinfo := &Issue{}\n\tif err := dec.Decode(info); err != nil {\n\t\treturn nil, fmt.Errorf(\"Failed to read Reitveld issue info: %s\", err)\n\n\t}\n\treturn info, nil\n}",
"func (c *client) GetIssue(org, repo string, number int) (*Issue, error) {\n\tdurationLogger := c.log(\"GetIssue\", org, repo, number)\n\tdefer durationLogger()\n\n\tvar i Issue\n\t_, err := c.request(&request{\n\t\t// allow emoji\n\t\t// https://developer.github.com/changes/2018-02-22-label-description-search-preview/\n\t\taccept: \"application/vnd.github.symmetra-preview+json\",\n\t\tmethod: http.MethodGet,\n\t\tpath: fmt.Sprintf(\"/repos/%s/%s/issues/%d\", org, repo, number),\n\t\torg: org,\n\t\texitCodes: []int{200},\n\t}, &i)\n\treturn &i, err\n}",
"func (it IssueTracker) GetBugs(project string, owner string) (*IssueList, error) {\n\terrFmt := \"error retrieving issues: %s\"\n\tif !it.IsAuthenticated() {\n\t\treturn nil, fmt.Errorf(errFmt, \"user is not authenticated!\")\n\t}\n\tparams := map[string]string{\n\t\t\"owner\": url.QueryEscape(owner),\n\t\t\"can\": \"open\",\n\t\t\"maxResults\": \"9999\",\n\t}\n\trequestURL := ISSUE_API_URL + project + \"/issues?\"\n\tfirst := true\n\tfor k, v := range params {\n\t\tif first {\n\t\t\tfirst = false\n\t\t} else {\n\t\t\trequestURL += \"&\"\n\t\t}\n\t\trequestURL += k + \"=\" + v\n\t}\n\tresp, err := it.OAuthTransport.Client().Get(requestURL)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(errFmt, err)\n\t}\n\tdefer resp.Body.Close()\n\tbody, _ := ioutil.ReadAll(resp.Body)\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn nil, fmt.Errorf(errFmt, fmt.Sprintf(\n\t\t\t\"issue tracker returned code %d:%v\", resp.StatusCode, string(body)))\n\t}\n\n\tvar bugList IssueList\n\tif err := json.Unmarshal(body, &bugList); err != nil {\n\t\treturn nil, fmt.Errorf(errFmt, err)\n\t}\n\treturn &bugList, nil\n}",
"func getPullRequestInfo(p *api.PullRequestPayload) (title, link, by, operator, operateResult, assignees string) {\n\ttitle = fmt.Sprintf(\"[PullRequest-%s #%d]: %s\\n%s\", p.Repository.FullName, p.PullRequest.Index, p.Action, p.PullRequest.Title)\n\tassignList := p.PullRequest.Assignees\n\tassignStringList := make([]string, len(assignList))\n\n\tfor i, user := range assignList {\n\t\tassignStringList[i] = user.UserName\n\t}\n\tif p.Action == api.HookIssueAssigned {\n\t\toperateResult = fmt.Sprintf(\"%s assign this to %s\", p.Sender.UserName, assignList[len(assignList)-1].UserName)\n\t} else if p.Action == api.HookIssueUnassigned {\n\t\toperateResult = fmt.Sprintf(\"%s unassigned this for someone\", p.Sender.UserName)\n\t} else if p.Action == api.HookIssueMilestoned {\n\t\toperateResult = fmt.Sprintf(\"%s/milestone/%d\", p.Repository.HTMLURL, p.PullRequest.Milestone.ID)\n\t}\n\tlink = p.PullRequest.HTMLURL\n\tby = fmt.Sprintf(\"PullRequest by %s\", p.PullRequest.Poster.UserName)\n\tif len(assignStringList) > 0 {\n\t\tassignees = fmt.Sprintf(\"Assignees: %s\", strings.Join(assignStringList, \", \"))\n\t}\n\toperator = fmt.Sprintf(\"Operator: %s\", p.Sender.UserName)\n\treturn title, link, by, operator, operateResult, assignees\n}",
"func (m *ServiceAnnouncement) GetIssues()([]ServiceHealthIssueable) {\n return m.issues\n}",
"func getJiraIssue(issueKey string, jiraClient *jira.Client) (JiraIssue, error) {\n\n\tvar jiraIssue JiraIssue\n\n\tissue, _, err := jiraClient.Issue.Get(issueKey, nil)\n\tif err != nil {\n\t\tlog.Printf(\"Cannot find %v\", issueKey)\n\t\treturn jiraIssue, err\n\t}\n\n\t//Fields from ticket itself\n\tjiraIssue.Key = issue.Key //Task key\n\tjiraIssue.Summary = issue.Fields.Summary //Task name\n\tjiraIssue.Estimation = issue.Fields.TimeTracking.OriginalEstimate //Estimation\n\n\tif issue.Fields.Parent != nil {\n\t\tjiraIssue.ParentKey = issue.Fields.Parent.Key //Parent task key\n\t}\n\n\t//Fields from parent ticket\n\tif jiraIssue.ParentKey == \"\" {\n\t\treturn jiraIssue, fmt.Errorf(\"issue %v does not have parent ticket, do nothing\", issueKey)\n\t}\n\tissue, _, err = jiraClient.Issue.Get(jiraIssue.ParentKey, nil)\n\tif err != nil {\n\t\tlog.Printf(\"Cannot find parent ticket %v\", issueKey)\n\t\treturn jiraIssue, err\n\t}\n\n\tjiraIssue.ParentSummary = issue.Fields.Summary //Parent task summary\n\tjiraIssue.ParentDescription = issue.Fields.Description\n\n\t//Example of issue.Fields.Unknowns[\"customfield_10416\"]:\n\t//customfield_10416:map[id:12016 self:https://inchcapeglobal.atlassian.net/rest/api/2/customFieldOption/12016 value:IMP_22]\n\tbudgetMap := issue.Fields.Unknowns[\"customfield_10416\"] //Budget\n\tbudgetMap2, ok := budgetMap.(map[string]interface{})\n\tif ok {\n\t\tjiraIssue.ParentBudget = budgetMap2[\"value\"].(string)\n\t}\n\n\treturn jiraIssue, nil\n\n}",
"func (m *MaintainerManager) GetIssue(number string, comments bool) (*gh.Issue, []gh.Comment, error) {\n\tvar c []gh.Comment\n\tnum, err := strconv.Atoi(number)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tissue, err := m.client.Issue(m.repo, num, nil)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tif comments {\n\t\tc, err = m.GetComments(number)\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t}\n\treturn issue, c, nil\n}",
"func GetIssues(owner, repo string, params map[string]string) (*IssuesList, error) {\n\turl := APIURL + strings.Join([]string{\"repos\", owner, repo, \"issues\"}, \"/\")\n\turl += \"?\"\n\tfor k, v := range params {\n\t\turl += k + \"=\" + v\n\t}\n\n\tresp, err := get(url)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar result IssuesList\n\n\tif err := json.NewDecoder(resp.Body).Decode(&result); err != nil {\n\t\tresp.Body.Close()\n\t\treturn nil, err\n\t}\n\n\tresp.Body.Close()\n\treturn &result, nil\n}",
"func (s *TrackerService) Info(trackerName string, query RequestQuery) (*TrackerInfo, *Response, error) {\n\treq, err := s.client.NewRequest(\"GET\", fmt.Sprintf(\"%s?limit=%d&page=%d\", path.Join(s.client.Project, trackerName), query.Limit, query.Page), nil)\n\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\ttickets := new(TrackerInfo)\n\tresp, err := s.client.Do(req, tickets)\n\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\treturn tickets, resp, err\n}",
"func (it IssueTracker) GetBug(project string, id int) (*Issue, error) {\n\terrFmt := fmt.Sprintf(\"error retrieving issue %d: %s\", id, \"%s\")\n\tif !it.IsAuthenticated() {\n\t\treturn nil, fmt.Errorf(errFmt, \"user is not authenticated!\")\n\t}\n\trequestURL := ISSUE_API_URL + project + \"/issues/\" + strconv.Itoa(id)\n\tresp, err := it.OAuthTransport.Client().Get(requestURL)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(errFmt, err)\n\t}\n\tdefer resp.Body.Close()\n\tbody, _ := ioutil.ReadAll(resp.Body)\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn nil, fmt.Errorf(errFmt, fmt.Sprintf(\n\t\t\t\"issue tracker returned code %d:%v\", resp.StatusCode, string(body)))\n\t}\n\tvar issue Issue\n\tif err := json.Unmarshal(body, &issue); err != nil {\n\t\treturn nil, fmt.Errorf(errFmt, err)\n\t}\n\treturn &issue, nil\n}",
"func (j *DSGitHub) ProcessIssue(ctx *Ctx, inIssue map[string]interface{}) (issue map[string]interface{}, err error) {\n\tissue = inIssue\n\tissue[\"user_data\"] = map[string]interface{}{}\n\tissue[\"assignee_data\"] = map[string]interface{}{}\n\tissue[\"assignees_data\"] = []interface{}{}\n\tissue[\"comments_data\"] = []interface{}{}\n\tissue[\"reactions_data\"] = []interface{}{}\n\t// [\"user\", \"assignee\", \"assignees\", \"comments\", \"reactions\"]\n\tuserLogin, ok := Dig(issue, []string{\"user\", \"login\"}, false, true)\n\tif ok {\n\t\tissue[\"user_data\"], _, err = j.githubUser(ctx, userLogin.(string))\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\tassigneeLogin, ok := Dig(issue, []string{\"assignee\", \"login\"}, false, true)\n\tif ok {\n\t\tissue[\"assignee_data\"], _, err = j.githubUser(ctx, assigneeLogin.(string))\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\tiAssignees, ok := Dig(issue, []string{\"assignees\"}, false, true)\n\tif ok {\n\t\tassignees, _ := iAssignees.([]interface{})\n\t\tassigneesAry := []map[string]interface{}{}\n\t\tfor _, assignee := range assignees {\n\t\t\taLogin, ok := Dig(assignee, []string{\"login\"}, false, true)\n\t\t\tif ok {\n\t\t\t\tassigneeData, _, e := j.githubUser(ctx, aLogin.(string))\n\t\t\t\tif e != nil {\n\t\t\t\t\terr = e\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tassigneesAry = append(assigneesAry, assigneeData)\n\t\t\t}\n\t\t}\n\t\tissue[\"assignees_data\"] = assigneesAry\n\t}\n\tnumber, ok := Dig(issue, []string{\"number\"}, false, true)\n\tif ok {\n\t\tissue[\"comments_data\"], err = j.githubIssueComments(ctx, j.Org, j.Repo, int(number.(float64)))\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tiCnt, ok := Dig(issue, []string{\"reactions\", \"total_count\"}, false, true)\n\t\tif ok {\n\t\t\tissue[\"reactions_data\"] = []interface{}{}\n\t\t\tcnt := int(iCnt.(float64))\n\t\t\tif cnt > 0 {\n\t\t\t\tissue[\"reactions_data\"], err = j.githubIssueReactions(ctx, j.Org, j.Repo, int(number.(float64)))\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn\n}",
"func GetUserSolvedProblemInfo(userID string) []int {\n\ttargetURL := baseURL + userURL + userID\n\tvar resultList []int\n\n\tres, err := http.Get(targetURL)\n\tcheckErr(err)\n\tif res.StatusCode != 200 {\n\t\treturn []int{-1}\n\t}\n\n\tdefer res.Body.Close()\n\n\tdoc, err := goquery.NewDocumentFromReader(res.Body)\n\tcheckErr(err)\n\n\tdoc.Find(\".panel-body\").First().Find(\"a\").Each(func(i int, a *goquery.Selection) {\n\t\tresultList = append(resultList, atoi(a.Text()))\n\t})\n\n\treturn resultList\n}",
"func (c *client) GetIssue(\n\tpid interface{},\n\tid int,\n\toptions ...glab.RequestOptionFunc,\n) (*glab.Issue, *glab.Response, error) {\n\treturn c.c.Issues.GetIssue(pid, id, options...)\n}",
"func (m *MaintainerManager) GetIssues(state, assignee string) ([]*gh.Issue, error) {\n\to := &gh.Options{}\n\to.QueryParams = map[string]string{\n\t\t\"sort\": \"updated\",\n\t\t\"direction\": \"asc\",\n\t\t\"state\": state,\n\t\t\"per_page\": \"100\",\n\t}\n\t// If assignee == \"\", don't add it to the params.\n\t// This will show all issues, assigned or not.\n\tif assignee != \"\" {\n\t\to.QueryParams[\"assignee\"] = assignee\n\t}\n\tprevSize := -1\n\tpage := 1\n\tall := []*gh.Issue{}\n\tfor len(all) != prevSize {\n\t\to.QueryParams[\"page\"] = strconv.Itoa(page)\n\t\tif issues, err := m.client.Issues(m.repo, o); err != nil {\n\t\t\treturn nil, err\n\t\t} else {\n\t\t\tprevSize = len(all)\n\t\t\tall = append(all, issues...)\n\t\t\tpage += 1\n\t\t}\n\t\tfmt.Printf(\".\")\n\t}\n\treturn all, nil\n}",
"func (store *Store) getInfo(evidence types.Evidence) Info {\n\treturn store.GetInfo(evidence.Height(), evidence.Hash())\n}",
"func GetInfo() string {\n\treturn fmt.Sprintf(\"version: %s, commit: %s\", Version, GitCommit)\n}",
"func Issues(ctx *context.Context) {\n\tif unit.TypeIssues.UnitGlobalDisabled() {\n\t\tlog.Debug(\"Issues overview page not available as it is globally disabled.\")\n\t\tctx.Status(http.StatusNotFound)\n\t\treturn\n\t}\n\n\tctx.Data[\"Title\"] = ctx.Tr(\"issues\")\n\tctx.Data[\"PageIsIssues\"] = true\n\tctx.Data[\"SingleRepoAction\"] = \"issue\"\n\tbuildIssueOverview(ctx, unit.TypeIssues)\n}",
"func getInfo(url string) []byte {\n\n\tres, err := http.Get(url)\n\tcheck(err)\n\tinfo, err := ioutil.ReadAll(res.Body)\n\tres.Body.Close()\n\tcheck(err)\n\n\treturn info\n\n}",
"func (r *Rietveld) GetIssueProperties(issue int64, messages bool) (*Issue, error) {\n\turl := fmt.Sprintf(\"/api/%v\", issue)\n\tif messages {\n\t\turl += \"?messages=true\"\n\t}\n\tfullIssue := &Issue{}\n\tif err := r.get(url, fullIssue); err != nil {\n\t\treturn nil, fmt.Errorf(\"Failed to load details for issue %d: %v\", issue, err)\n\t}\n\n\tcommitted, err := r.isCommitted(fullIssue)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfullIssue.Committed = committed\n\n\tfullIssue.Created = parseTime(fullIssue.CreatedString)\n\tfullIssue.Modified = parseTime(fullIssue.ModifiedString)\n\tif messages {\n\t\tfor _, msg := range fullIssue.Messages {\n\t\t\tmsg.Date = parseTime(msg.DateString)\n\t\t}\n\t}\n\treturn fullIssue, nil\n}",
"func (g *GH) GetIssue(repo string, number int) (*github.Issue, *github.Response) {\n\tctx := context.Background()\n\ti, rsp, err := g.c.Issues.Get(ctx, g.org, repo, number)\n\tif err != nil {\n\t\tlog.Println(\"Error Retrieving Issue\")\n\t\treturn nil, rsp\n\t}\n\treturn i, rsp\n}",
"func GetInfo(emoji string) (Emoji, error) {\n\tem, ok := emojiMap[emoji]\n\tif !ok {\n\t\treturn Emoji{}, ErrStrNotEmoji\n\t}\n\n\treturn em, nil\n}",
"func (a *AdminStats) GetIssues() *IssueStats {\n\tif a == nil {\n\t\treturn nil\n\t}\n\treturn a.Issues\n}",
"func fetchGithubIssue(conf *githubConfig) (*githubIssue, error) {\n\tctx := context.Background()\n\tts := oauth2.StaticTokenSource(\n\t\t&oauth2.Token{AccessToken: conf.token},\n\t)\n\ttc := oauth2.NewClient(ctx, ts)\n\tclient := github.NewClient(tc)\n\n\t// Read issue metadata\n\tissue, _, err := client.Issues.Get(context.Background(), conf.owner, conf.repo, conf.issueID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres := &githubIssue{\n\t\tissue: issue,\n\t\tnameByLoginID: make(map[string]string),\n\t}\n\n\t// Read user metadata\n\tuser, _, err := client.Users.Get(context.Background(), stringify(issue.User.Login))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres.nameByLoginID[stringify(issue.User.Login)] = stringify(user.Name)\n\n\t// Get all comments\n\tcomments, _, err := client.Issues.ListComments(context.Background(), conf.owner, conf.repo, conf.issueID, &github.IssueListCommentsOptions{})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres.comments = comments\n\n\tloginIDs := []*string{\n\t\tissue.User.Login,\n\t}\n\t// Aggregate all users and read their metadata\n\tif issue.Assignee != nil {\n\t\tloginIDs = append(loginIDs, issue.Assignee.Login)\n\t}\n\n\tfor _, comment := range comments {\n\t\tloginIDs = append(loginIDs, comment.User.Login)\n\t}\n\n\tfor _, loginID := range loginIDs {\n\t\tid := stringify(loginID)\n\t\tif _, ok := res.nameByLoginID[id]; ok {\n\t\t\tcontinue\n\t\t}\n\t\tuser, _, err := client.Users.Get(context.Background(), id)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tres.nameByLoginID[id] = stringify(user.Name)\n\t}\n\treturn res, nil\n}",
"func ExtractIssueInfo(commitID *tracedb.CommitID, rietveldReview *rietveld.Rietveld, gerritReview *gerrit.Gerrit) (string, string) {\n\tissue, ok := gerritReview.ExtractIssue(commitID.Source)\n\tif ok {\n\t\treturn issue, commitID.ID\n\t}\n\tissue, _ = rietveldReview.ExtractIssue(commitID.Source)\n\treturn issue, commitID.ID\n}",
"func IssueGet(project string, issueNum int) (*gitlab.Issue, error) {\n\tp, err := FindProject(project)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tissue, _, err := lab.Issues.GetIssue(p.ID, issueNum)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn issue, nil\n}",
"func issues(ctx context.Context, c *client.Client, org string, project string, since time.Time, until time.Time, users []string, state string) ([]*github.Issue, error) {\n\tresult := []*github.Issue{}\n\topts := &github.IssueListByRepoOptions{\n\t\tState: state,\n\t\tSort: \"updated\",\n\t\tDirection: \"desc\",\n\t\tListOptions: github.ListOptions{\n\t\t\tPerPage: 100,\n\t\t},\n\t}\n\n\tmatchUser := map[string]bool{}\n\tfor _, u := range users {\n\t\tmatchUser[strings.ToLower(u)] = true\n\t}\n\n\tlogrus.Infof(\"Gathering issues for %s/%s, users=%q: %+v\", org, project, users, opts)\n\tfor page := 1; page != 0; {\n\t\topts.ListOptions.Page = page\n\t\tissues, resp, err := c.GitHubClient.Issues.ListByRepo(ctx, org, project, opts)\n\t\tif err != nil {\n\t\t\treturn result, err\n\t\t}\n\n\t\tlogrus.Infof(\"Processing page %d of %s/%s issue results ...\", page, org, project)\n\n\t\tpage = resp.NextPage\n\n\t\t// Repo has no issues!\n\t\tif len(issues) == 0 {\n\t\t\tbreak\n\t\t}\n\n\t\tlogrus.Infof(\"Current issue updated at %s\", issues[0].GetUpdatedAt())\n\n\t\tfor _, i := range issues {\n\t\t\tif i.IsPullRequest() {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif i.GetClosedAt().After(until) {\n\t\t\t\tlogrus.Infof(\"issue #%d closed at %s\", i.GetNumber(), i.GetUpdatedAt())\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tif i.GetUpdatedAt().Before(since) {\n\t\t\t\tlogrus.Infof(\"Hit issue #%d updated at %s\", i.GetNumber(), i.GetUpdatedAt())\n\t\t\t\tpage = 0\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\tif !i.GetClosedAt().IsZero() && i.GetClosedAt().Before(since) {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tif state != \"\" && i.GetState() != state {\n\t\t\t\tlogrus.Infof(\"Skipping issue #%d (state=%q)\", i.GetNumber(), i.GetState())\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tt := issueDate(i)\n\n\t\t\tlogrus.Infof(\"Fetching #%d (closed %s, updated %s): %q\", i.GetNumber(), i.GetClosedAt().Format(dateForm), i.GetUpdatedAt().Format(dateForm), i.GetTitle())\n\n\t\t\tfull, err := ghcache.IssuesGet(ctx, c.Cache, c.GitHubClient, t, org, project, i.GetNumber())\n\t\t\tif err != nil {\n\t\t\t\ttime.Sleep(1 * time.Second)\n\t\t\t\tfull, err = ghcache.IssuesGet(ctx, c.Cache, c.GitHubClient, t, org, project, i.GetNumber())\n\t\t\t}\n\t\t\tif err != nil {\n\t\t\t\tlogrus.Errorf(\"failed IssuesGet: %v\", err)\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\tcreator := strings.ToLower(full.GetUser().GetLogin())\n\t\t\tcloser := strings.ToLower(full.GetClosedBy().GetLogin())\n\t\t\tif len(matchUser) > 0 && !matchUser[creator] && !matchUser[closer] {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tresult = append(result, full)\n\t\t}\n\t}\n\n\tlogrus.Infof(\"Returning %d issues\", len(result))\n\treturn result, nil\n}",
"func (h *SupportAPI) GetSupportInfo(c *gin.Context) {\n\tctx := context.Background()\n\tinfo, err := h.SupportUsecase.GetSupportInfo(ctx)\n\tif err != nil {\n\t\tentities.SendValidationError(c, \"There has been an error while getting support contact information, please try again\", err)\n\t\treturn\n\t}\n\tc.JSON(200, gin.H{\n\t\t\"info\": info,\n\t})\n\treturn\n}",
"func (p *localWorkerPool) GetInfo(id string) (api.LocalWorkerInfo, string, time.Time, bool) {\n\tp.mutex.RLock()\n\tdefer p.mutex.RUnlock()\n\n\tif lw, found := p.workers[id]; found {\n\t\tif info := lw.GetActual(); info != nil {\n\t\t\treturn *info, lw.remoteAddr, lw.lastUpdatedActualAt, found\n\t\t}\n\t}\n\treturn api.LocalWorkerInfo{}, \"\", time.Time{}, false\n}",
"func (o *NiatelemetryNicc) GetConfigIssues() string {\n\tif o == nil || o.ConfigIssues == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\treturn *o.ConfigIssues\n}",
"func GetAuditInfoForIssues(issues [][]byte, metadata []driver.IssueMetadata) ([][]*AuditableToken, error) {\n\tif len(issues) != len(metadata) {\n\t\treturn nil, errors.Errorf(\"number of issues does not match number of provided metadata\")\n\t}\n\toutputs := make([][]*AuditableToken, len(issues))\n\tfor k, md := range metadata {\n\t\tia := &issue2.IssueAction{}\n\t\terr := json.Unmarshal(issues[k], ia)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tif len(ia.OutputTokens) != len(md.ReceiversAuditInfos) || len(ia.OutputTokens) != len(md.TokenInfo) {\n\t\t\treturn nil, errors.Errorf(\"number of output does not match number of provided metadata\")\n\t\t}\n\t\tfor i := 0; i < len(md.ReceiversAuditInfos); i++ {\n\t\t\tti := &token.Metadata{}\n\t\t\terr := json.Unmarshal(md.TokenInfo[i], ti)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tif ia.OutputTokens[i] == nil {\n\t\t\t\treturn nil, errors.Errorf(\"output token at index [%d] is nil\", i)\n\t\t\t}\n\t\t\tif ia.OutputTokens[i].IsRedeem() {\n\t\t\t\treturn nil, errors.Errorf(\"issue cannot redeem tokens\")\n\t\t\t}\n\t\t\tao, err := NewAuditableToken(ia.OutputTokens[i], md.ReceiversAuditInfos[i], ti.Type, ti.Value, ti.BlindingFactor)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\toutputs[k] = append(outputs[k], ao)\n\t\t}\n\t}\n\treturn outputs, nil\n}",
"func (h *stiGit) GetInfo(repo string) *SourceInfo {\n\tgit := func(arg ...string) string {\n\t\tcommand := exec.Command(\"git\", arg...)\n\t\tcommand.Dir = repo\n\t\tout, err := command.CombinedOutput()\n\t\tif err != nil {\n\t\t\tlog.V(1).Infof(\"Error executing 'git %#v': %s (%v)\", arg, out, err)\n\t\t\treturn \"\"\n\t\t}\n\t\treturn strings.TrimSpace(string(out))\n\t}\n\treturn &SourceInfo{\n\t\tLocation: git(\"config\", \"--get\", \"remote.origin.url\"),\n\t\tRef: git(\"rev-parse\", \"--abbrev-ref\", \"HEAD\"),\n\t\tCommitID: git(\"rev-parse\", \"--verify\", \"HEAD\"),\n\t\tAuthorName: git(\"--no-pager\", \"show\", \"-s\", \"--format=%an\", \"HEAD\"),\n\t\tAuthorEmail: git(\"--no-pager\", \"show\", \"-s\", \"--format=%ae\", \"HEAD\"),\n\t\tCommitterName: git(\"--no-pager\", \"show\", \"-s\", \"--format=%cn\", \"HEAD\"),\n\t\tCommitterEmail: git(\"--no-pager\", \"show\", \"-s\", \"--format=%ce\", \"HEAD\"),\n\t\tDate: git(\"--no-pager\", \"show\", \"-s\", \"--format=%ad\", \"HEAD\"),\n\t\tMessage: git(\"--no-pager\", \"show\", \"-s\", \"--format=%<(80,trunc)%s\", \"HEAD\"),\n\t}\n}",
"func (w *ServerInterfaceWrapper) GetIssue(ctx echo.Context) error {\n\tvar err error\n\t// ------------- Path parameter \"project_id\" -------------\n\tvar projectId string\n\n\terr = runtime.BindStyledParameter(\"simple\", false, \"project_id\", ctx.Param(\"project_id\"), &projectId)\n\tif err != nil {\n\t\treturn echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf(\"Invalid format for parameter project_id: %s\", err))\n\t}\n\n\t// ------------- Path parameter \"id\" -------------\n\tvar id string\n\n\terr = runtime.BindStyledParameter(\"simple\", false, \"id\", ctx.Param(\"id\"), &id)\n\tif err != nil {\n\t\treturn echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf(\"Invalid format for parameter id: %s\", err))\n\t}\n\n\t// HasSecurity is set\n\n\tctx.Set(\"OpenId.Scopes\", []string{\"exitus/issue.read\"})\n\n\t// Invoke the callback with all the unmarshalled arguments\n\terr = w.Handler.GetIssue(ctx, projectId, id)\n\treturn err\n}",
"func (g Gitlab) GetIssue(ctx context.Context, projectID, issueIID IntID) (Issue, error) {\n\tvar issue Issue\n\tresp, err := g.NewRequest(ctx).\n\t\tSetResult(&issue).\n\t\tGet(g.APIV4URL(\"projects\", projectID, \"issues\", issueIID))\n\tif err != nil {\n\t\treturn Issue{}, trace.Wrap(err)\n\t}\n\tif resp.IsError() {\n\t\treturn Issue{}, trace.Wrap(responseError(resp))\n\t}\n\treturn issue, nil\n}",
"func (hook *Hook) Getinfo() (map[string]string, error) {\n\tcmd := exec.Command(\"svnlook\", \"info\", hook.repospath)\n\tstdout, err := cmd.StdoutPipe()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif err = cmd.Start(); err != nil {\n\t\treturn nil, err\n\t}\n\tinfo, err := ioutil.ReadAll(stdout)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsplitinfo := strings.SplitN(string(info), \"\\n\", -1)\n\tinfomap := make(map[string]string)\n\tinfomap[\"author\"] = splitinfo[0]\n\tinfomap[\"timestamp\"] = splitinfo[1]\n\tinfomap[\"logsize\"] = splitinfo[2]\n\tinfomap[\"log\"] = splitinfo[3]\n\treturn infomap, nil\n}",
"func (c *Client) GetUserProjectDetailInfo(bizID string) (*ProjectInfo, error) {\n\tvar (\n\t\t_ = \"GetUserProjectDetailInfo\"\n\t\turl = fmt.Sprintf(\"/get_user_project_detail/%s/\", bizID)\n\t)\n\n\tuserAuth, err := c.generateGateWayAuth(c.bkUserName)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"bksops GetUserProjectDetailInfo generateGateWayAuth failed: %v\", err)\n\t}\n\n\tresp := &UserProjectResponse{}\n\t_, _, errs := gorequest.New().\n\t\tTimeout(defaultTimeOut).\n\t\tGet(c.server+url).\n\t\tSet(\"X-Bkapi-Authorization\", userAuth).\n\t\tSet(\"Content-Type\", \"application/json\").\n\t\tSet(\"Accept\", \"application/json\").\n\t\tSetDebug(c.serverDebug).\n\t\tEndStruct(&resp)\n\tif len(errs) > 0 {\n\t\tblog.Errorf(\"call api GetUserProjectDetailInfo failed: %v\", errs[0])\n\t\treturn nil, errs[0]\n\t}\n\n\tif !resp.Result {\n\t\tblog.Errorf(\"call api GetUserProjectDetailInfo failed: %v\", resp.Message)\n\t\treturn nil, fmt.Errorf(resp.Message)\n\t}\n\n\t// successfully request\n\tblog.Infof(\"call api GetUserProjectDetailInfo with url(%s) successfully\", url)\n\n\treturn &resp.Data, nil\n}",
"func (f *FakeGit) GetInfo(repo string) *git.SourceInfo {\n\treturn &git.SourceInfo{\n\t\tRef: \"master\",\n\t\tCommitID: \"1bf4f04\",\n\t\tLocation: \"file:///foo\",\n\t}\n}",
"func GetInfo(url string, id primitive.ObjectID) (info Info, title string) {\n\t// query title\n\tif strings.HasPrefix(url, \"/post/\") {\n\t\turl = url[6:]\n\t}\n\tp, err := post.GetPublicFieldPost(url)\n\tif err == nil {\n\t\ttitle = p.Title\n\t}\n\n\t// query reply info\n\tinfoArr := make([]Info, 0)\n\t_, err = mongo.Aggregate(\"blotter\", \"comments\", []bson.M{\n\t\t{\n\t\t\t\"$match\": bson.M{\n\t\t\t\t\"_id\": id,\n\t\t\t},\n\t\t},\n\t}, nil, &infoArr)\n\tif err == nil && len(infoArr) > 0 {\n\t\tinfo = infoArr[0]\n\t}\n\treturn\n}",
"func GetInternalInfo(ctx context.Context, c *chrome.Conn) (*Info, error) {\n\tinfos, err := GetInfo(ctx, c)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor i := range infos {\n\t\tif infos[i].IsInternal {\n\t\t\treturn &infos[i], nil\n\t\t}\n\t}\n\treturn nil, errors.New(\"no internal display\")\n}",
"func (c *Client) GetIssues(queryParams string) ([]Issue, error) {\n\treq, err := c.getRequest(\"/issues.json\", queryParams)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar response issuesResponse\n\t_, err = c.Do(req, &response)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn response.Issues, nil\n}",
"func (b *BitBucketClient) PullRequestInfo(workspace string, repositorySlug string, pullRequestID int64) (dto.BitBucketPullRequestInfoResponse, error) {\n\tlog.Logger().StartMessage(\"Get pull-request status\")\n\tif err := b.beforeRequest(); err != nil {\n\t\tlog.Logger().FinishMessage(\"Get pull-request status\")\n\t\treturn dto.BitBucketPullRequestInfoResponse{}, err\n\t}\n\n\tb.client.SetBaseURL(DefaultBitBucketBaseAPIUrl)\n\tendpoint := fmt.Sprintf(\"/repositories/%s/%s/pullrequests/%d\", workspace, repositorySlug, pullRequestID)\n\tresponse, _, err := b.client.Get(endpoint, map[string]string{})\n\n\tif err != nil {\n\t\tlog.Logger().FinishMessage(\"Get pull-request status\")\n\t\treturn dto.BitBucketPullRequestInfoResponse{}, err\n\t}\n\n\tvar responseObject dto.BitBucketPullRequestInfoResponse\n\terr = json.Unmarshal(response, &responseObject)\n\tif err != nil {\n\t\tlog.Logger().FinishMessage(\"Get pull-request status\")\n\t\treturn dto.BitBucketPullRequestInfoResponse{}, err\n\t}\n\n\tlog.Logger().FinishMessage(\"Get pull-request status\")\n\treturn responseObject, nil\n}",
"func (p *PKGBUILD) GetInfo(name string, types ...atom.AtomType) (*atom.Info, bool) {\n\tcb := atom.CheckName(name)\n\tif len(types) > 0 {\n\t\tcb = atom.NamedCheckAll(atom.CheckName(name), atom.NewNameMatcher(types...))\n\t}\n\treturn p.info.FilterFirst(cb)\n}",
"func (d *Dao) BPInfo(c context.Context, aid, mid int64, ip string) (data json.RawMessage, err error) {\n\tparams := url.Values{}\n\tparams.Set(\"aid\", strconv.FormatInt(aid, 10))\n\tparams.Set(\"mid\", strconv.FormatInt(mid, 10))\n\tparams.Set(\"build\", \"app-interface\")\n\tparams.Set(\"platform\", \"Golang\")\n\tvar res struct {\n\t\tCode int `json:\"code\"`\n\t\tData json.RawMessage `json:\"data\"`\n\t}\n\tif err = d.client.Get(c, d.bp, ip, params, &res); err != nil {\n\t\treturn\n\t}\n\tif res.Code != ecode.OK.Code() {\n\t\terr = errors.Wrap(ecode.Int(res.Code), d.bp+\"?\"+params.Encode())\n\t\treturn\n\t}\n\tdata = res.Data\n\treturn\n}",
"func GetIssueProperties(ctx context.Context, g gerrit.GerritInterface, issue int64) (*gerrit.ChangeInfo, error) {\n\tvar rv *gerrit.ChangeInfo\n\treturn rv, td.Do(ctx, td.Props(fmt.Sprintf(\"Get Issue %d\", issue)).Infra(), func(ctx context.Context) error {\n\t\tvar err error\n\t\trv, err = g.GetIssueProperties(ctx, issue)\n\t\treturn err\n\t})\n}",
"func (c *Client) GetSiemIssues(opts map[string]interface{}) ([]*Click, []*Message, error) {\n\treturn []*Click{}, []*Message{}, nil\n}",
"func getIncomingIssue(r *http.Request) (Issue, error) {\n\tr.ParseMultipartForm(1000000)\n\n\tissueName := r.FormValue(\"Post_Name\")\n\tissueDesc := r.FormValue(\"Post_Desc\")\n\tissuuLink := r.FormValue(\"Link\") // <--- Spelt this way on purpose\n\n\tif !(util.IsSet(issueName, issueDesc, issuuLink)) {\n\t\treturn Issue{}, errors.New(\"not all parameters have been provided\")\n\t}\n\n\t// Read the attached image using the multipart package\n\tf, h, err := r.FormFile(\"Caption_Image\")\n\tif err != nil {\n\t\treturn Issue{}, errors.New(\"caption image does not exist\")\n\t}\n\n\t// Return the parsed issue\n\treturn Issue{\n\t\tPicture: f,\n\t\tPictureHeader: h,\n\t\tName: issueName,\n\t\tDesc: issueDesc,\n\t\tLink: issuuLink,\n\t\tPublishDate: time.Now().In(util.TIMEZONE),\n\t\tTypePost: \"Issue\",\n\t}, nil\n}",
"func (m *MaintainerManager) GetIssuesFound(query string) ([]*gh.SearchItem, error) {\n\to := &gh.Options{}\n\to.QueryParams = map[string]string{\n\t\t\"sort\": \"updated\",\n\t\t\"order\": \"asc\",\n\t\t\"per_page\": \"100\",\n\t}\n\tprevSize := -1\n\tpage := 1\n\tissuesFound := []*gh.SearchItem{}\n\tfor len(issuesFound) != prevSize {\n\t\to.QueryParams[\"page\"] = strconv.Itoa(page)\n\t\tif issues, err := m.client.SearchIssues(query, o); err != nil {\n\t\t\treturn nil, err\n\t\t} else {\n\t\t\tprevSize = len(issuesFound)\n\t\t\tissuesFound = append(issuesFound, issues...)\n\t\t\tpage += 1\n\t\t}\n\t\tfmt.Printf(\".\")\n\t}\n\treturn issuesFound, nil\n}",
"func (a *RepoAPI) listIssues(params interface{}) (resp *rpc.Response) {\n\tm := objx.New(cast.ToStringMap(params))\n\tname := m.Get(\"name\").Str()\n\treturn rpc.Success(util.Map{\n\t\t\"data\": a.mods.Repo.ListIssues(name),\n\t})\n}",
"func (h *Engine) cachedIssues(ctx context.Context, org string, project string, state string, updatedDays int, newerThan time.Time) ([]*github.Issue, error) {\n\tkey := issueSearchKey(org, project, state, updatedDays)\n\n\tif x := h.cache.GetNewerThan(key, newerThan); x != nil {\n\t\treturn x.Issues, nil\n\t}\n\n\tklog.V(1).Infof(\"cache miss for %s newer than %s\", key, logu.STime(newerThan))\n\treturn h.updateIssues(ctx, org, project, state, updatedDays, key)\n}",
"func getPostImageIssue(r *http.Request) (*Image_issue, error) {\r\n\tdecoder := json.NewDecoder(r.Body)\r\n\tvar t Image_issue\r\n\terr := decoder.Decode(&t)\r\n\tif err != nil {\r\n\t\tlog.Println(err)\r\n\t\treturn nil, err\r\n\t}\r\n\tt.Create_date = time.Now().String()\r\n\treturn &t, nil\r\n}",
"func (m *Monocular) Info(apiEndpoint string, skipSSLValidation bool) (interfaces.CNSIRecord, interface{}, error) {\n\tlog.Debug(\"Helm Repository Info\")\n\tvar v2InfoResponse interfaces.V2Info\n\tvar newCNSI interfaces.CNSIRecord\n\n\tnewCNSI.CNSIType = helmEndpointType\n\n\t_, err := url.Parse(apiEndpoint)\n\tif err != nil {\n\t\treturn newCNSI, nil, err\n\t}\n\n\t// Just check that we can fetch index.yaml\n\tvar httpClient = m.portalProxy.GetHttpClient(skipSSLValidation)\n\tres, err := httpClient.Get(apiEndpoint + \"/index.yaml\")\n\tif err != nil {\n\t\t// This should ultimately catch 503 cert errors\n\t\treturn newCNSI, nil, err\n\t}\n\n\tif res.StatusCode >= 400 {\n\t\treturn newCNSI, nil, fmt.Errorf(\"Does not appear to be a Helm Repository (HTTP Status code: %d)\", res.StatusCode)\n\t}\n\n\t// We were able to fetch the index.yaml, so looks like a Helm Repository\n\t// We could parse the contents and check further\n\tnewCNSI.TokenEndpoint = apiEndpoint\n\tnewCNSI.AuthorizationEndpoint = apiEndpoint\n\n\treturn newCNSI, v2InfoResponse, nil\n}",
"func (g *Gitlab) Issues() ([]*Issue, error) {\n\n\turl := g.ResourceUrl(issues_url, nil)\n\n\tvar issues []*Issue\n\n\tcontents, err := g.buildAndExecRequest(\"GET\", url, nil)\n\tif err == nil {\n\t\terr = json.Unmarshal(contents, &issues)\n\t}\n\n\treturn issues, err\n}",
"func (s *Identity) InfoGET(w http.ResponseWriter, r *http.Request) {\n\tinfo := map[string]string{\n\t\t\"version\": \"1.0\",\n\t\t\"providerName\": \"Acme\",\n\t}\n\twriteResponse(info, w, r)\n}",
"func GetInfo() (*Info, error) {\n\tvar result Info\n\terr := result.discover()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &result, nil\n}",
"func GetInfo() *Info {\n\treturn &Info{\n\t\tBuildID: BuildID,\n\t\tChange: Change,\n\t\tCommitMsg: CommitMsg,\n\t\tNewBuildURL: NewBuildURL,\n\t\tTag: Tag,\n\t\tOldBuildURL: OldBuildURL,\n\t\tRevision: CurrentCommit,\n\t\tVersion: Version,\n\t}\n}",
"func (r *Resolver) GetInfo() *model.NodeInfo {\n\tioregOutput := runCommandOrFail(\"ioreg\", \"-rd1\", \"-c\", \"IOPlatformExpertDevice\")\n\thostname, _ := os.Hostname()\n\n\treturn &model.NodeInfo{\n\t\tVersion: r.version,\n\t\tUptime: 0,\n\t\tLabels: r.labels,\n\t\tArch: runtime.GOARCH,\n\t\tOS: runtime.GOOS,\n\t\tHostname: hostname,\n\t\tAddresses: getAddresses(),\n\t\tGrpcPort: r.grpcPort,\n\n\t\tMachineID: parseFieldFromIoregOutput(ioregOutput, \"IOPlatformSerialNumber\"),\n\t\tSystemUUID: parseFieldFromIoregOutput(ioregOutput, \"IOPlatformUUID\"),\n\t\tBootID: runCommandOrFail(\"/usr/bin/uuidgen\"),\n\n\t\tFilesystems: resolveFilesystems(),\n\t}\n}",
"func GetIssue(issueKey string) (*Issue, error) {\n\turl := fmt.Sprintf(\"%s/issue/%s\", BaseURL, issueKey)\n\tcode, body := execRequest(\"GET\", url, nil)\n\tif code == http.StatusOK {\n\t\tvar issue Issue\n\t\terr := json.Unmarshal(body, &issue)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn &issue, nil\n\t}\n\treturn nil, handleJiraError(body)\n}",
"func (i *InstallationPermissions) GetIssues() string {\n\tif i == nil || i.Issues == nil {\n\t\treturn \"\"\n\t}\n\treturn *i.Issues\n}",
"func (client jiraServerClient) GetCreateMetaInfo(api plugin.API, options *jira.GetQueryOptions) (*jira.CreateMetaInfo, error) {\n\tv := new(JiraServerVersionInfo)\n\treq, err := client.Jira.NewRequest(http.MethodGet, APIEndpointGetServerInfo, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif _, err = client.Jira.Do(req, v); err != nil {\n\t\treturn nil, errors.Wrap(err, \"failed to fetch Jira server version\")\n\t}\n\n\tcurrentVersion, err := semver.Make(v.Version)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"error while parsing version\")\n\t}\n\n\tpivotVersion, err := semver.Make(JiraVersionWithOldIssueAPIBreaking)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"error while parsing version\")\n\t}\n\n\tinfo, resp, err := client.GetCreateMetaInfoForSpecificJiraVersion(api, currentVersion, pivotVersion, options)\n\tif err != nil {\n\t\tif resp == nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tresp.Body.Close()\n\t\tif resp.StatusCode == http.StatusForbidden || resp.StatusCode == http.StatusUnauthorized {\n\t\t\terr = errors.New(\"not authorized to create issues\")\n\t\t}\n\t\treturn nil, RESTError{err, resp.StatusCode}\n\t}\n\treturn info, nil\n}",
"func TestIssue(t *testing.T) {\n\tts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\tcheckAuth(t, r)\n\t\tval := `{\"expand\":\"renderedFields,names,schema,transitions,operations,editmeta,changelog\",\"id\":\"1234\",\"self\":\"https://test.atlassian.net/rest/api/2/issue/1234\",\"key\":\"ABC-01\",\"fields\":{\"summary\":\"This is a test\"}}`\n\t\tfmt.Fprintln(w, val)\n\t}))\n\tdefer ts.Close()\n\n\tc := NewJiraClient(ts.URL, \"foo\", \"bar\", 100)\n\ti, err := c.Issue(\"abc\", nil)\n\tif err != nil {\n\t\tt.Error(\"Error loading issue:\", err)\n\t}\n\n\tif i == nil {\n\t\tt.Error(\"issue is nil\")\n\t}\n\n\tif i.ID != \"1234\" {\n\t\tt.Error(\"Error expected issue ID to be 1234 got:\", i.ID)\n\t}\n\n\tif i.Key != \"ABC-01\" {\n\t\tt.Error(\"Error expected issue Key to be ABC-01 got:\", i.Key)\n\t}\n}",
"func (b *GithubBridge) GetIssueLocal(ctx context.Context, owner string, project string, number int) (*pbgh.Issue, error) {\n\turlv := \"https://api.github.com/repos/\" + owner + \"/\" + project + \"/issues/\" + strconv.Itoa(number)\n\tbody, _, err := b.visitURL(ctx, urlv)\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar data map[string]interface{}\n\terr = json.Unmarshal([]byte(body), &data)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif _, ok := data[\"title\"]; !ok {\n\t\tb.RaiseIssue(\"Bad parse\", fmt.Sprintf(\"Bad parse %v\", string(body)))\n\t}\n\n\trbody := \"\"\n\tif _, ok := data[\"body\"]; ok {\n\t\trbody = fmt.Sprintf(\"%v\", data[\"body\"])\n\t}\n\n\tissue := &pbgh.Issue{Number: int32(number), Service: project, Title: data[\"title\"].(string), Body: rbody}\n\tif data[\"state\"].(string) == \"open\" {\n\t\tissue.State = pbgh.Issue_OPEN\n\t} else {\n\t\tissue.State = pbgh.Issue_CLOSED\n\t}\n\n\treturn issue, nil\n}",
"func (o *NiatelemetryNicc) GetConfigIssuesOk() (*string, bool) {\n\tif o == nil || o.ConfigIssues == nil {\n\t\treturn nil, false\n\t}\n\treturn o.ConfigIssues, true\n}",
"func GetInfo(t *kernel.Task, stack *stack.Stack, outPtr hostarch.Addr, ipv6 bool) (linux.IPTGetinfo, *syserr.Error) {\n\t// Read in the struct and table name.\n\tvar info linux.IPTGetinfo\n\tif _, err := info.CopyIn(t, outPtr); err != nil {\n\t\treturn linux.IPTGetinfo{}, syserr.FromError(err)\n\t}\n\n\tvar err error\n\tif ipv6 {\n\t\t_, info, err = convertNetstackToBinary6(stack, info.Name)\n\t} else {\n\t\t_, info, err = convertNetstackToBinary4(stack, info.Name)\n\t}\n\tif err != nil {\n\t\tnflog(\"couldn't convert iptables: %v\", err)\n\t\treturn linux.IPTGetinfo{}, syserr.ErrInvalidArgument\n\t}\n\n\tnflog(\"returning info: %+v\", info)\n\treturn info, nil\n}",
"func (m *UnifiedRoleAssignmentScheduleRequest) GetTicketInfo()(TicketInfoable) {\n return m.ticketInfo\n}",
"func (c *Client) GetIssues(opts *GetIssuesOptions) ([]*Issue, error) {\n\treturn c.GetIssuesContext(context.Background(), opts)\n}",
"func (d *Dao) MonitorInfo(c context.Context, aid int64) (minfo json.RawMessage, err error) {\n\tip := metadata.String(c, metadata.RemoteIP)\n\tvar res struct {\n\t\tCode int `json:\"code\"`\n\t\tData json.RawMessage `json:\"data\"`\n\t}\n\tif err = d.client.RESTfulGet(c, d.monitorInfoURL, ip, nil, &res, aid); err != nil {\n\t\treturn\n\t}\n\tcode := ecode.Int(res.Code)\n\tif !code.Equal(ecode.OK) {\n\t\terr = errors.Wrap(code, d.monitorInfoURL)\n\t\treturn\n\t}\n\tminfo = res.Data\n\treturn\n}",
"func (c *Client) GetIssues(nation string) ([]Issue, error) {\n\tn, err := c.GetNation(nation, []string{\"issues\"}, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn n.Issues, nil\n}",
"func GetInfo(BaseURL, QueryParam, authKey string) ([]byte, error) {\n\tif authKey == \"\" {\n\t\treturn nil, errors.New(\"No Auth Header\")\n\t}\n\tNewURL := fmt.Sprintf(\"%v/%v\", BaseURL, QueryParam)\n\tmaxTime := time.Second * 10\n\tclient := &http.Client{Timeout: maxTime}\n\treq, err := http.NewRequest(\"GET\", NewURL, nil)\n\tif err != nil {\n\t\treturn nil, errors.New(\"Unable to set request 400\")\n\t}\n\treq.Header.Set(\"X-Riot-Token\", authKey)\n\tresp, err := client.Do(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif resp.StatusCode >= 300 || resp.StatusCode < 200 {\n\t\treturn nil, fmt.Errorf(\"server didn’t respond 200 OK: %v\", resp.StatusCode)\n\t}\n\tBodyText, err := ioutil.ReadAll(resp.Body)\n\tdefer resp.Body.Close()\n\tif err != nil {\n\t\treturn nil, errors.New(\"Server error: 500\")\n\t}\n\treturn BodyText, nil\n\n}",
"func (c *ExplorerController) GetExplorerInfo() {\n\t// get parameter\n\tvar explorerReq model.ExplorerInfoReq\n\tvar err error\n\tif err = json.Unmarshal(c.Ctx.Input.RequestBody, &explorerReq); err != nil {\n\t\tc.Data[\"json\"] = model.MakeErrorRsp(fmt.Sprintf(\"request parameter is invalid!\"))\n\t\tc.Ctx.ResponseWriter.WriteHeader(400)\n\t\tc.ServeJSON()\n\t}\n\n\t//get all chains\n\tchains := make([]*model.Chain, 0)\n\tres := db.Find(&chains)\n\tif res.RowsAffected == 0 {\n\t\tc.Data[\"json\"] = model.MakeErrorRsp(fmt.Sprintf(\"chain does not exist\"))\n\t\tc.Ctx.ResponseWriter.WriteHeader(400)\n\t\tc.ServeJSON()\n\t\treturn\n\t}\n\n\t// get all chains statistic\n\tchainStatistics := make([]*model.ChainStatistic, 0)\n\n\t// get all tokens\n\ttokenBasics := make([]*model.TokenBasic, 0)\n\tres = db.Find(&tokenBasics)\n\tif res.RowsAffected == 0 {\n\t\tc.Data[\"json\"] = model.MakeErrorRsp(fmt.Sprintf(\"chain does not exist\"))\n\t\tc.Ctx.ResponseWriter.WriteHeader(400)\n\t\tc.ServeJSON()\n\t\treturn\n\t}\n\n\tc.Data[\"json\"] = model.MakeExplorerInfoResp(chains, chainStatistics, tokenBasics)\n\tc.ServeJSON()\n}",
"func GetInfo() Info {\n\treturn Info{\n\t\tVersion: Version,\n\t\tBuildDate: BuildDate,\n\t\tGitCommit: GitCommit,\n\t}\n}",
"func (a *RepoAPI) createIssue(params interface{}) (resp *rpc.Response) {\n\tm := objx.New(cast.ToStringMap(params))\n\tname := m.Get(\"name\").Str()\n\tcallParams := m.Get(\"params\").MSI()\n\treturn rpc.Success(util.Map{\n\t\t\"data\": a.mods.Repo.CreateIssue(name, callParams),\n\t})\n}",
"func (a API) GetInfo(cmd *None) (e error) {\n\tRPCHandlers[\"getinfo\"].Call <-API{a.Ch, cmd, nil}\n\treturn\n}",
"func GetAnIssue(db *gorm.DB, issue *Issue, id string) (err error) {\n\tif err := db.Where(\"id = ?\", id).First(issue).Error; err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func (c Client) GetIssue(ctx context.Context, ID it.IssueID) (it.Issue, error) {\n\tmi, err := c.getIssue(ctx, ID)\n\tif err != nil {\n\t\treturn it.Issue{}, err\n\t}\n\treturn it.Issue{\n\t\tID: it.IssueID(strconv.Itoa(*mi.ID)),\n\t\tSummary: *mi.Summary,\n\t\tAuthor: readMU(mi.Handler),\n\t\tCreatedAt: time.Time(*mi.DateSubmitted),\n\t\tState: it.State(mi.Status.Name),\n\t}, nil\n}",
"func GetAllInfo(cli *clientv3.Client) (map[string]map[string]Info, int64, error) {\n\tctx, cancel := context.WithTimeout(cli.Ctx(), etcdutil.DefaultRequestTimeout)\n\tdefer cancel()\n\n\tresp, err := cli.Get(ctx, common.ShardDDLPessimismInfoKeyAdapter.Path(), clientv3.WithPrefix())\n\tif err != nil {\n\t\treturn nil, 0, err\n\t}\n\n\tifm := make(map[string]map[string]Info)\n\tfor _, kv := range resp.Kvs {\n\t\tinfo, err2 := infoFromJSON(string(kv.Value))\n\t\tif err2 != nil {\n\t\t\treturn nil, 0, err2\n\t\t}\n\n\t\tif _, ok := ifm[info.Task]; !ok {\n\t\t\tifm[info.Task] = make(map[string]Info)\n\t\t}\n\t\tifm[info.Task][info.Source] = info\n\t}\n\n\treturn ifm, resp.Header.Revision, nil\n}",
"func GetInfo(ctx context.Context, id int) g.Map {\n\tctx, span := gtrace.NewSpan(ctx, \"GetInfo\")\n\tdefer span.End()\n\tif id == 100 {\n\t\treturn g.Map{\n\t\t\t\"id\": 100,\n\t\t\t\"name\": \"john\",\n\t\t\t\"gender\": 1,\n\t\t}\n\t}\n\treturn nil\n}",
"func (d *RetryDownloader) GetIssues(page, perPage int) ([]*Issue, bool, error) {\n\tvar (\n\t\tissues []*Issue\n\t\tisEnd bool\n\t\terr error\n\t)\n\n\terr = d.retry(func() error {\n\t\tissues, isEnd, err = d.Downloader.GetIssues(page, perPage)\n\t\treturn err\n\t})\n\n\treturn issues, isEnd, err\n}",
"func GetInfoRefs(ctx *context.Context) {\n\th := httpBase(ctx)\n\tif h == nil {\n\t\treturn\n\t}\n\th.setHeaderNoCache()\n\tservice := getServiceType(h.r)\n\tcmd, err := prepareGitCmdWithAllowedService(service, h)\n\tif err == nil {\n\t\tif protocol := h.r.Header.Get(\"Git-Protocol\"); protocol != \"\" && safeGitProtocolHeader.MatchString(protocol) {\n\t\t\th.environ = append(h.environ, \"GIT_PROTOCOL=\"+protocol)\n\t\t}\n\t\th.environ = append(os.Environ(), h.environ...)\n\n\t\trefs, _, err := cmd.AddArguments(\"--stateless-rpc\", \"--advertise-refs\", \".\").RunStdBytes(&git.RunOpts{Env: h.environ, Dir: h.dir})\n\t\tif err != nil {\n\t\t\tlog.Error(fmt.Sprintf(\"%v - %s\", err, string(refs)))\n\t\t}\n\n\t\th.w.Header().Set(\"Content-Type\", fmt.Sprintf(\"application/x-git-%s-advertisement\", service))\n\t\th.w.WriteHeader(http.StatusOK)\n\t\t_, _ = h.w.Write(packetWrite(\"# service=git-\" + service + \"\\n\"))\n\t\t_, _ = h.w.Write([]byte(\"0000\"))\n\t\t_, _ = h.w.Write(refs)\n\t} else {\n\t\tupdateServerInfo(ctx, h.dir)\n\t\th.sendFile(\"text/plain; charset=utf-8\", \"info/refs\")\n\t}\n}",
"func (store *Store) GetInfo(height int64, hash []byte) Info {\n\tkey := keyLookupFromHeightAndHash(height, hash)\n\tval, _ := store.db.Get(key)\n\n\tif len(val) == 0 {\n\t\treturn Info{}\n\t}\n\tvar ei Info\n\terr := cdc.UnmarshalBinaryBare(val, &ei)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn ei\n}",
"func (j *Jira) Issue(id string) (i Issue, err error) {\n\turi := j.ApiPath + \"/issue/\" + id\n\n\tcontents, err := j.getRequest(uri)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tvar issue Issue\n\terr = json.Unmarshal(contents, &issue)\n\tif err != nil {\n\t\treturn\n\t}\n\n\treturn issue, nil\n}",
"func Bug(format string, args ...interface{}) BugInfo {\n return &bugInfo{format, args}\n}",
"func (s *server) packIssue(name upspin.PathName, issue *maintner.GitHubIssue) (*upspin.DirEntry, error) {\n\tkey := issueKey{\n\t\tname: name,\n\t\tupdated: issue.Updated,\n\t}\n\ts.mu.Lock()\n\tpacked, ok := s.issue[key]\n\ts.mu.Unlock()\n\tif ok {\n\t\treturn packed.de, nil\n\t}\n\tde, data, err := s.pack(name, key.Ref(), formatIssue(issue))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ts.mu.Lock()\n\ts.issue[key] = packedIssue{\n\t\tde: de,\n\t\tdata: data,\n\t}\n\ts.mu.Unlock()\n\treturn de, nil\n}",
"func (obj *GenericObject) GetInfo(ctx context.Context) (*NxInfo, error) {\n\tresult := &struct {\n\t\tInfo *NxInfo `json:\"qInfo\"`\n\t}{}\n\terr := obj.RPC(ctx, \"GetInfo\", result)\n\treturn result.Info, err\n}",
"func (s *Store) GetIssue(id uint) (*Issue, error) {\n\tfor _, issue := range s.Issues {\n\t\tif issue.ID == id {\n\t\t\treturn issue, nil\n\t\t}\n\t}\n\n\treturn nil, fmt.Errorf(\"no issue with id %d\", id)\n}",
"func BeeReleasesInfo() (repos []Releases) {\n\tvar url = \"https://api.github.com/repos/beego/bee/releases\"\n\tresp, err := http.Get(url)\n\tif err != nil {\n\t\tbeeLogger.Log.Warnf(\"Get bee releases from github error: %s\", err)\n\t\treturn\n\t}\n\tdefer resp.Body.Close()\n\tbodyContent, _ := ioutil.ReadAll(resp.Body)\n\tif err = json.Unmarshal(bodyContent, &repos); err != nil {\n\t\tbeeLogger.Log.Warnf(\"Unmarshal releases body error: %s\", err)\n\t\treturn\n\t}\n\treturn\n}",
"func (m *MilestoneTasks) PingEarlyIssues(ctx *wf.TaskContext, develVersion int, openTreeURL string) (result struct{}, _ error) {\n\tmilestoneName := fmt.Sprintf(\"Go1.%d\", develVersion)\n\n\tgh, ok := m.Client.(*GitHubClient)\n\tif !ok || gh.V4 == nil {\n\t\t// TODO(go.dev/issue/58856): Decide if it's worth moving the GraphQL query/mutation\n\t\t// into GitHubClientInterface. That kinda harms readability because GraphQL code is\n\t\t// basically a flexible API call, so it's most readable when close to where they're\n\t\t// used. This also depends on what kind of tests we'll want to use for this.\n\t\treturn struct{}{}, fmt.Errorf(\"no GitHub API v4 client\")\n\t}\n\n\t// Find all open early-in-cycle issues in the development major release milestone.\n\ttype issue struct {\n\t\tID githubv4.ID\n\t\tNumber int\n\t\tTitle string\n\n\t\tTimelineItems struct {\n\t\t\tNodes []struct {\n\t\t\t\tIssueComment struct {\n\t\t\t\t\tAuthor struct{ Login string }\n\t\t\t\t\tBody string\n\t\t\t\t} `graphql:\"...on IssueComment\"`\n\t\t\t}\n\t\t} `graphql:\"timelineItems(since: $avoidDupSince, itemTypes: ISSUE_COMMENT, last: 100)\"`\n\t}\n\tvar earlyIssues []issue\n\tmilestoneNumber, err := m.Client.FetchMilestone(ctx, m.RepoOwner, m.RepoName, milestoneName, false)\n\tif err != nil {\n\t\treturn struct{}{}, err\n\t}\n\tvariables := map[string]interface{}{\n\t\t\"repoOwner\": githubv4.String(m.RepoOwner),\n\t\t\"repoName\": githubv4.String(m.RepoName),\n\t\t\"avoidDupSince\": githubv4.DateTime{Time: time.Now().Add(-30 * 24 * time.Hour)},\n\t\t\"milestoneNumber\": githubv4.String(fmt.Sprint(milestoneNumber)), // For some reason GitHub API v4 uses string type for milestone numbers.\n\t\t\"issueCursor\": (*githubv4.String)(nil),\n\t}\n\tfor {\n\t\tvar q struct {\n\t\t\tRepository struct {\n\t\t\t\tIssues struct {\n\t\t\t\t\tNodes []issue\n\t\t\t\t\tPageInfo struct {\n\t\t\t\t\t\tEndCursor githubv4.String\n\t\t\t\t\t\tHasNextPage bool\n\t\t\t\t\t}\n\t\t\t\t} `graphql:\"issues(first: 100, after: $issueCursor, filterBy: {states: OPEN, labels: \\\"early-in-cycle\\\", milestoneNumber: $milestoneNumber}, orderBy: {field: CREATED_AT, direction: ASC})\"`\n\t\t\t} `graphql:\"repository(owner: $repoOwner, name: $repoName)\"`\n\t\t}\n\t\terr := gh.V4.Query(ctx, &q, variables)\n\t\tif err != nil {\n\t\t\treturn struct{}{}, err\n\t\t}\n\t\tearlyIssues = append(earlyIssues, q.Repository.Issues.Nodes...)\n\t\tif !q.Repository.Issues.PageInfo.HasNextPage {\n\t\t\tbreak\n\t\t}\n\t\tvariables[\"issueCursor\"] = githubv4.NewString(q.Repository.Issues.PageInfo.EndCursor)\n\t}\n\n\t// Ping them.\n\tctx.Printf(\"Processing %d early-in-cycle issues in %s milestone (milestone number %d).\", len(earlyIssues), milestoneName, milestoneNumber)\nEarlyIssuesLoop:\n\tfor _, i := range earlyIssues {\n\t\tfor _, n := range i.TimelineItems.Nodes {\n\t\t\tif n.IssueComment.Author.Login == \"gopherbot\" && strings.Contains(n.IssueComment.Body, \"friendly reminder\") {\n\t\t\t\tctx.Printf(\"Skipping issue %d, it was already pinged.\", i.Number)\n\t\t\t\tcontinue EarlyIssuesLoop\n\t\t\t}\n\t\t}\n\n\t\t// Post a comment.\n\t\tconst dryRun = false\n\t\tif dryRun {\n\t\t\tctx.Printf(\"[dry run] Would've pinged issue %d (%.32s…).\", i.Number, i.Title)\n\t\t\tcontinue\n\t\t}\n\t\terr := m.Client.PostComment(ctx, i.ID, fmt.Sprintf(\"This issue is currently labeled as early-in-cycle for Go 1.%d.\\n\"+\n\t\t\t\"That [time is now](%s), so a friendly reminder to look at it again.\", develVersion, openTreeURL))\n\t\tif err != nil {\n\t\t\treturn struct{}{}, err\n\t\t}\n\t\tctx.Printf(\"Pinged issue %d (%.32s…).\", i.Number, i.Title)\n\t\ttime.Sleep(3 * time.Second) // Take a moment between pinging issues to avoid a high rate of addComment mutations.\n\t}\n\n\treturn struct{}{}, nil\n}",
"func BeeReposInfo() (repos Repos) {\n\tvar url = \"https://api.github.com/repos/beego/bee\"\n\tresp, err := http.Get(url)\n\tif err != nil {\n\t\tbeeLogger.Log.Warnf(\"Get bee repos from github error: %s\", err)\n\t\treturn\n\t}\n\tdefer resp.Body.Close()\n\tbodyContent, _ := ioutil.ReadAll(resp.Body)\n\tif err = json.Unmarshal(bodyContent, &repos); err != nil {\n\t\tbeeLogger.Log.Warnf(\"Unmarshal repos body error: %s\", err)\n\t\treturn\n\t}\n\treturn\n}",
"func empInfo(e storage.Employee) string {\n\tbasicInfo := fmt.Sprintf(\"%q, %q, %q, %q, %q, %t,\", e.Reg, e.Name, e.Role, e.Type, e.Workplace, e.Active)\n\tincome := incomeInfo(e.Income)\n\tdiscounts := discountInfo(e.Discounts)\n\tline := basicInfo + income + discounts\n\treturn line\n}",
"func (b *index) GetInfo(blockID string) (*Info, error) {\n\te, err := b.findEntry(blockID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif e == nil {\n\t\treturn nil, nil\n\t}\n\n\ti, err := b.entryToInfo(blockID, e)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &i, err\n}",
"func (p *Project) Info() (*ProjectInfo, error) {\n count, err := Mongo.Count(\"queue\", bson.M{\"project\": p.ID})\n if err != nil {\n return nil, err\n }\n return &ProjectInfo{Name: p.Name, QueueCount: count, CreatedAt: p.CreatedAt}, nil\n}",
"func (n *NewPullRequest) GetIssue() int {\n\tif n == nil || n.Issue == nil {\n\t\treturn 0\n\t}\n\treturn *n.Issue\n}",
"func (obj *GenericMeasure) GetInfo(ctx context.Context) (*NxInfo, error) {\n\tresult := &struct {\n\t\tInfo *NxInfo `json:\"qInfo\"`\n\t}{}\n\terr := obj.RPC(ctx, \"GetInfo\", result)\n\treturn result.Info, err\n}",
"func (j *DSGitHub) githubPullsFromIssues(ctx *Ctx, org, repo string, since *time.Time) (pullsData []map[string]interface{}, err error) {\n\tvar (\n\t\tissues []map[string]interface{}\n\t\tpull map[string]interface{}\n\t\tok bool\n\t)\n\tissues, err = j.githubIssues(ctx, org, repo, ctx.DateFrom)\n\tif err != nil {\n\t\treturn\n\t}\n\ti, pulls := 0, 0\n\tnIssues := len(issues)\n\tPrintf(\"%s/%s: processing %d issues (to filter for PRs)\\n\", j.URL, j.Category, nIssues)\n\tif j.ThrN > 1 {\n\t\tnThreads := 0\n\t\tch := make(chan interface{})\n\t\tfor _, issue := range issues {\n\t\t\ti++\n\t\t\tif i%ItemsPerPage == 0 {\n\t\t\t\truntime.GC()\n\t\t\t\tPrintf(\"%s/%s: processing %d/%d issues, %d pulls so far\\n\", j.URL, j.Category, i, nIssues, pulls)\n\t\t\t}\n\t\t\tisPR, _ := issue[\"is_pull\"]\n\t\t\tif !isPR.(bool) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tpulls++\n\t\t\tnumber, _ := issue[\"number\"]\n\t\t\tgo func(ch chan interface{}, num int) {\n\t\t\t\tpr, e := j.githubPull(ctx, org, repo, num)\n\t\t\t\tif e != nil {\n\t\t\t\t\tch <- e\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tch <- pr\n\t\t\t}(ch, int(number.(float64)))\n\t\t\tnThreads++\n\t\t\tif nThreads == j.ThrN {\n\t\t\t\tobj := <-ch\n\t\t\t\tnThreads--\n\t\t\t\terr, ok = obj.(error)\n\t\t\t\tif ok {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tpullsData = append(pullsData, obj.(map[string]interface{}))\n\t\t\t}\n\t\t}\n\t\tfor nThreads > 0 {\n\t\t\tobj := <-ch\n\t\t\tnThreads--\n\t\t\terr, ok = obj.(error)\n\t\t\tif ok {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tpullsData = append(pullsData, obj.(map[string]interface{}))\n\t\t}\n\t} else {\n\t\tfor _, issue := range issues {\n\t\t\ti++\n\t\t\tif i%ItemsPerPage == 0 {\n\t\t\t\truntime.GC()\n\t\t\t\tPrintf(\"%s/%s: processed %d/%d issues, %d pulls so far\\n\", j.URL, j.Category, i, nIssues, pulls)\n\t\t\t}\n\t\t\tisPR, _ := issue[\"is_pull\"]\n\t\t\tif !isPR.(bool) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tpulls++\n\t\t\tnumber, _ := issue[\"number\"]\n\t\t\tpull, err = j.githubPull(ctx, org, repo, int(number.(float64)))\n\t\t\tif err != nil {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tpullsData = append(pullsData, pull)\n\t\t}\n\t}\n\treturn\n}"
] |
[
"0.79488575",
"0.70666003",
"0.6904011",
"0.6590319",
"0.65198314",
"0.61359113",
"0.60309",
"0.6026247",
"0.59775144",
"0.59413755",
"0.5933943",
"0.58877325",
"0.57177556",
"0.5713566",
"0.5687564",
"0.5661755",
"0.5622377",
"0.5596171",
"0.5586302",
"0.5584094",
"0.5580856",
"0.5557302",
"0.5538291",
"0.5520417",
"0.5516462",
"0.55116343",
"0.55050194",
"0.5496468",
"0.54616046",
"0.5461566",
"0.5435664",
"0.54327565",
"0.54213387",
"0.5401172",
"0.5380941",
"0.53785735",
"0.5378367",
"0.53736687",
"0.53730935",
"0.53519213",
"0.53474265",
"0.53250086",
"0.5305406",
"0.52944005",
"0.5284696",
"0.5283544",
"0.52807486",
"0.5276828",
"0.5267105",
"0.526415",
"0.5255011",
"0.523936",
"0.5233283",
"0.52287835",
"0.5222734",
"0.52155536",
"0.5199155",
"0.5197522",
"0.519114",
"0.5190527",
"0.5186692",
"0.5182299",
"0.5181438",
"0.51541877",
"0.5152368",
"0.51514727",
"0.5150067",
"0.51491106",
"0.5147454",
"0.5145421",
"0.51393706",
"0.51190853",
"0.5111886",
"0.5106532",
"0.510299",
"0.5101341",
"0.50781876",
"0.5071073",
"0.5069541",
"0.5064253",
"0.5055228",
"0.50520426",
"0.50488853",
"0.5047886",
"0.5041692",
"0.5034683",
"0.50284433",
"0.5015872",
"0.50051814",
"0.49951583",
"0.49945384",
"0.49944907",
"0.49887037",
"0.49858186",
"0.4979406",
"0.49791855",
"0.49615026",
"0.49603158",
"0.49598867",
"0.49588844"
] |
0.78740895
|
1
|
getIssuesCommentInfo gets the information for a comment
|
func getIssuesCommentInfo(p *api.IssueCommentPayload) (title, link, by, operator string) {
title = fmt.Sprintf("[Comment-%s #%d]: %s\n%s", p.Repository.FullName, p.Issue.Index, p.Action, p.Issue.Title)
link = p.Issue.HTMLURL
if p.IsPull {
by = fmt.Sprintf("PullRequest by %s", p.Issue.Poster.UserName)
} else {
by = fmt.Sprintf("Issue by %s", p.Issue.Poster.UserName)
}
operator = fmt.Sprintf("Operator: %s", p.Sender.UserName)
return title, link, by, operator
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func GetIssueComment(ctx *context.APIContext) {\n\t// swagger:operation GET /repos/{owner}/{repo}/issues/comments/{id} issue issueGetComment\n\t// ---\n\t// summary: Get a comment\n\t// consumes:\n\t// - application/json\n\t// produces:\n\t// - application/json\n\t// parameters:\n\t// - name: owner\n\t// in: path\n\t// description: owner of the repo\n\t// type: string\n\t// required: true\n\t// - name: repo\n\t// in: path\n\t// description: name of the repo\n\t// type: string\n\t// required: true\n\t// - name: id\n\t// in: path\n\t// description: id of the comment\n\t// type: integer\n\t// format: int64\n\t// required: true\n\t// responses:\n\t// \"200\":\n\t// \"$ref\": \"#/responses/Comment\"\n\t// \"204\":\n\t// \"$ref\": \"#/responses/empty\"\n\t// \"403\":\n\t// \"$ref\": \"#/responses/forbidden\"\n\t// \"404\":\n\t// \"$ref\": \"#/responses/notFound\"\n\n\tcomment, err := issues_model.GetCommentByID(ctx, ctx.ParamsInt64(\":id\"))\n\tif err != nil {\n\t\tif issues_model.IsErrCommentNotExist(err) {\n\t\t\tctx.NotFound(err)\n\t\t} else {\n\t\t\tctx.Error(http.StatusInternalServerError, \"GetCommentByID\", err)\n\t\t}\n\t\treturn\n\t}\n\n\tif err = comment.LoadIssue(ctx); err != nil {\n\t\tctx.InternalServerError(err)\n\t\treturn\n\t}\n\tif comment.Issue.RepoID != ctx.Repo.Repository.ID {\n\t\tctx.Status(http.StatusNotFound)\n\t\treturn\n\t}\n\n\tif comment.Type != issues_model.CommentTypeComment {\n\t\tctx.Status(http.StatusNoContent)\n\t\treturn\n\t}\n\n\tif err := comment.LoadPoster(ctx); err != nil {\n\t\tctx.Error(http.StatusInternalServerError, \"comment.LoadPoster\", err)\n\t\treturn\n\t}\n\n\tctx.JSON(http.StatusOK, convert.ToAPIComment(ctx, ctx.Repo.Repository, comment))\n}",
"func (issue *Issue) GetComment(id int) (*Comment, error) {\n\turl := fmt.Sprintf(\"%s/issue/%s/comment/%d\", BaseUrl, issue.Key, id)\n\tcode, body := execRequest(\"GET\", url, nil)\n\tif code == http.StatusOK {\n\t\tvar jiraComment Comment\n\t\terr := json.Unmarshal(body, &jiraComment)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn &jiraComment, nil\n\t} else {\n\t\treturn nil, handleJiraError(body)\n\t}\n}",
"func (issue *Issue) GetComment(id int) (*Comment, error) {\n\turl := fmt.Sprintf(\"%s/issue/%s/comment/%d\", BaseURL, issue.Key, id)\n\tcode, body := execRequest(\"GET\", url, nil)\n\tif code == http.StatusOK {\n\t\tvar jiraComment Comment\n\t\terr := json.Unmarshal(body, &jiraComment)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn &jiraComment, nil\n\t}\n\treturn nil, handleJiraError(body)\n}",
"func (f *FileDescriptor) GetComments() *Comment { return f.Comments }",
"func (issue *Issue) GetComments() (*Comments, error) {\n\turl := fmt.Sprintf(\"%s/issue/%s/comment\", BaseUrl, issue.Key)\n\tcode, body := execRequest(\"GET\", url, nil)\n\tif code == http.StatusOK {\n\t\tvar jiraComments Comments\n\t\terr := json.Unmarshal(body, &jiraComments)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn &jiraComments, nil\n\t} else {\n\t\treturn nil, handleJiraError(body)\n\t}\n}",
"func GetInfo(url string, id primitive.ObjectID) (info Info, title string) {\n\t// query title\n\tif strings.HasPrefix(url, \"/post/\") {\n\t\turl = url[6:]\n\t}\n\tp, err := post.GetPublicFieldPost(url)\n\tif err == nil {\n\t\ttitle = p.Title\n\t}\n\n\t// query reply info\n\tinfoArr := make([]Info, 0)\n\t_, err = mongo.Aggregate(\"blotter\", \"comments\", []bson.M{\n\t\t{\n\t\t\t\"$match\": bson.M{\n\t\t\t\t\"_id\": id,\n\t\t\t},\n\t\t},\n\t}, nil, &infoArr)\n\tif err == nil && len(infoArr) > 0 {\n\t\tinfo = infoArr[0]\n\t}\n\treturn\n}",
"func (me Comment) Get(ctx context.Context,\n\treq api.Request,\n\tw *api.Response,\n) (err error) {\n\tme.Before(req, me.Name)\n\tdefer func() { err = me.After(w, err) }()\n\n\tvar (\n\t\torganization = req.PathParameters[CommentOrganizationName]\n\t\tcomments []model.Comment\n\t\tgithub = service.New(ctx, req.Headers[GithubAccessToken])\n\t)\n\n\tif organization == \"\" {\n\t\terr = fmt.Errorf(errors.ErrorResourceNotFound)\n\t\tme.Error(\"Error\", errors.NewMessage(errors.ErrorResourceNotFound, CommentOrganizationName))\n\t\treturn\n\t}\n\n\t_, err = github.GetOrganization(organization)\n\tif err != nil {\n\t\tme.Record(\"Error\", err.Error())\n\t\terr = fmt.Errorf(errors.ErrorResourceNotFound)\n\t\tme.Error(\"Error\", errors.NewMessage(errors.ErrorResourceNotFound, CommentOrganizationName))\n\t\treturn\n\t}\n\n\tif comments, err = database.GetComment(ctx, organization); err != nil {\n\t\tme.Record(\"Error\", err.Error())\n\t\terr = fmt.Errorf(errors.ErrorResourceNotFound)\n\t\tme.Error(\"Error\", errors.NewMessage(errors.ErrorResourceNotFound, \"comment\"))\n\t\treturn\n\t}\n\n\tw.Stat(http.StatusOK)\n\tw.Output(comments)\n\n\treturn nil\n}",
"func (issue *Issue) GetComments() (*Comments, error) {\n\turl := fmt.Sprintf(\"%s/issue/%s/comment\", BaseURL, issue.Key)\n\tcode, body := execRequest(\"GET\", url, nil)\n\tif code == http.StatusOK {\n\t\tvar jiraComments Comments\n\t\terr := json.Unmarshal(body, &jiraComments)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn &jiraComments, nil\n\t}\n\treturn nil, handleJiraError(body)\n}",
"func (a *Article) GetComments() {\n\tif _, exists := arsCache[a.Id]; exists {\n\t\treturn\n\t}\n\n\ta.Comments = make([]*Comment, 0)\n\n\tarticleUrl := YC_ROOT + \"/item?id=\" + strconv.Itoa(a.Id)\n\n\treq, e := http.NewRequest(\"GET\", articleUrl, nil)\n\n\tif e != nil {\n\t\tlog.Fatal(e)\n\t}\n\n\tdoc := doReq(req)\n\n\tcommentStack := make([]*Comment, 1, 10)\n\n\tdoc.Find(\"span.comment\").Each(func(i int, comment *goquery.Selection) {\n\t\ttext := \"\"\n\t\tuser := comment.Parent().Find(\"a\").First().Text()\n\n\t\ttext += comment.Text()\n\n\t\t//Get around HN's little weird \"reply\" nesting randomness\n\t\t//Is it part of the comment, or isn't it?\n\t\tif last5 := len(text) - 5; len(text) > 0 && last5 > 0 && text[last5:] == \"reply\" {\n\t\t\ttext = text[:last5]\n\t\t}\n\n\t\tc := &Comment{\n\t\t\tUser: user,\n\t\t\tText: text,\n\t\t\tComments: make([]*Comment, 0),\n\t\t}\n\n\t\t//Get comment create time\n\t\t// t := comment.Prev().Text()\n\n\t\t// c.Created = parseCreated(t)\n\n\t\t//Get id\n\t\tif idAttr, exists := comment.Prev().Find(\"a\").Last().Attr(\"href\"); exists {\n\t\t\tidSt := strings.Split(idAttr, \"=\")[1]\n\n\t\t\tif id, err := strconv.Atoi(idSt); err == nil {\n\t\t\t\tc.Id = id\n\t\t\t}\n\t\t}\n\n\t\t//Track the comment offset for nesting.\n\t\tif width, exists := comment.Parent().Prev().Prev().Find(\"img\").Attr(\"width\"); exists {\n\t\t\toffset, _ := strconv.Atoi(width)\n\t\t\toffset = offset / 40\n\n\t\t\tlastEle := len(commentStack) - 1 //Index of the last element in the stack\n\n\t\t\tif offset > lastEle {\n\t\t\t\tcommentStack = append(commentStack, c)\n\t\t\t\tcommentStack[lastEle].Comments = append(commentStack[lastEle].Comments, c)\n\t\t\t} else {\n\n\t\t\t\tif offset < lastEle {\n\t\t\t\t\tcommentStack = commentStack[:offset+1] //Trim the stack\n\t\t\t\t}\n\n\t\t\t\tcommentStack[offset] = c\n\n\t\t\t\t//Add the comment to its parents\n\t\t\t\tif offset == 0 {\n\t\t\t\t\ta.Comments = append(a.Comments, c)\n\t\t\t\t} else {\n\t\t\t\t\tcommentStack[offset-1].Comments = append(commentStack[offset-1].Comments, c)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\n\tarsCache[a.Id] = a\n\n\t//Cache the article for 5 minutes\n\tgo func() {\n\t\t<-time.After(5 * time.Minute)\n\t\tdelete(arsCache, a.Id)\n\t}()\n}",
"func (i *Issue) GetComments() int {\n\tif i == nil || i.Comments == nil {\n\t\treturn 0\n\t}\n\treturn *i.Comments\n}",
"func (m *Descriptor) GetComments() *Comment { return m.Comments }",
"func GetComment(w http.ResponseWriter, r *http.Request) {\n\tid := r.URL.Query().Get(\"id\")\n\n\tif id == \"\" {\n\t\tmsg := map[string]string{\"error\": \"id required\"}\n\t\tw.Header().Set(\"Content-type\", \"application/json\")\n\t\tw.WriteHeader(http.StatusBadRequest)\n\t\tjson.NewEncoder(w).Encode(msg)\n\n\t\treturn\n\t}\n\n\tvar comment comments.Comment\n\n\tcomment.ID = id\n\n\terr := comment.Get()\n\n\tif err != nil {\n\t\tmsg := map[string]string{\"error\": \"Sorry there was an internal server error\"}\n\t\tw.Header().Set(\"Content-type\", \"application/json\")\n\t\tw.WriteHeader(http.StatusInternalServerError)\n\t\tjson.NewEncoder(w).Encode(msg)\n\n\t\treturn\n\t}\n\n\terr = comment.GetReplies()\n\n\tif err != nil {\n\t\tmsg := map[string]string{\"error\": \"Sorry there was an internal server error\"}\n\t\tw.Header().Set(\"Content-type\", \"application/json\")\n\t\tw.WriteHeader(http.StatusInternalServerError)\n\t\tjson.NewEncoder(w).Encode(msg)\n\n\t\treturn\n\t}\n\n\tw.Header().Set(\"Content-type\", \"application/json\")\n\tw.WriteHeader(http.StatusOK)\n\tjson.NewEncoder(w).Encode(comment)\n\n\treturn\n\n}",
"func GetComment(c *gin.Context, in *getCommentIn) (*task.Comment, error) {\n\tmetadata.AddActionMetadata(c, metadata.TaskID, in.TaskID)\n\n\tdbp, err := zesty.NewDBProvider(utask.DBName)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tcomment, err := task.LoadCommentFromPublicID(dbp, in.CommentID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tmetadata.AddActionMetadata(c, metadata.CommentID, comment.PublicID)\n\n\tt, err := task.LoadFromPublicID(dbp, in.TaskID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\ttt, err := tasktemplate.LoadFromID(dbp, t.TemplateID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tmetadata.AddActionMetadata(c, metadata.TemplateName, tt.Name)\n\n\tvar res *resolution.Resolution\n\tif t.Resolution != nil {\n\t\tres, err = resolution.LoadFromPublicID(dbp, *t.Resolution)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tmetadata.AddActionMetadata(c, metadata.ResolutionID, res.PublicID)\n\t}\n\n\tadmin := auth.IsAdmin(c) == nil\n\trequester := auth.IsRequester(c, t) == nil\n\twatcher := auth.IsWatcher(c, t) == nil\n\tresolutionManager := auth.IsResolutionManager(c, tt, t, res) == nil\n\n\tif !requester && !watcher && !resolutionManager && !admin {\n\t\treturn nil, errors.Forbiddenf(\"Can't get comment\")\n\t} else if !requester && !watcher && !resolutionManager {\n\t\tmetadata.SetSUDO(c)\n\t}\n\n\treturn comment, nil\n}",
"func (h Handler) GetComment(w http.ResponseWriter, r *http.Request) {\n\tw.Header().Set(\"Content-Type\", \"application/json; charset=UTF-8\")\n\tw.WriteHeader(http.StatusOK)\n\n\tvars := mux.Vars(r)\n\tid := vars[\"id\"]\n\n\ti, err := strconv.ParseUint(id, 10, 64)\n\n\tif err != nil {\n\t\tsendErrorResponse(w, \"Unable to parse UINT from ID\", err)\n\t}\n\n\tcomment, err := h.Service.GetComment(uint(i))\n\n\tif err != nil {\n\t\tsendErrorResponse(w, \"Error retrieving comment by ID\", err)\n\t}\n\n\tif err := json.NewEncoder(w).Encode(comment); err != nil {\n\t\tpanic(err)\n\t}\n}",
"func (m *MaintainerManager) GetComments(number string) ([]gh.Comment, error) {\n\treturn m.client.Comments(m.repo, number, nil)\n}",
"func (a *ProblemsApiService) GetComment(ctx _context.Context, problemId string, commentId string) ApiGetCommentRequest {\n\treturn ApiGetCommentRequest{\n\t\tApiService: a,\n\t\tctx: ctx,\n\t\tproblemId: problemId,\n\t\tcommentId: commentId,\n\t}\n}",
"func (c *Client) GetIssueCommentsContext(ctx context.Context, issueIDOrKey string, opts *GetIssueCommentsOptions) ([]*IssueComment, error) {\n\tu := fmt.Sprintf(\"/api/v2/issues/%v/comments\", issueIDOrKey)\n\n\treq, err := c.NewRequest(\"GET\", u, opts)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tissueComment := []*IssueComment{}\n\tif err := c.Do(ctx, req, &issueComment); err != nil {\n\t\treturn nil, err\n\t}\n\treturn issueComment, nil\n}",
"func (m *MethodDescriptor) GetComments() *Comment { return m.Comments }",
"func (mf *FieldDescriptor) GetComments() *Comment { return mf.Comments }",
"func (h *Handler) GetComment(w http.ResponseWriter, r *http.Request) {\n\tvars := mux.Vars(r)\n\tid := vars[\"id\"]\n\n\ti, err := strconv.ParseUint(id, 10, 64)\n\n\tif err != nil {\n\t\tfmt.Fprintf(w, \"Unable to parse UINT from ID\")\n\t}\n\n\tcomment, err := h.Service.GetComment(uint(i))\n\tif err != nil {\n\t\tfmt.Fprintf(w, \"Error Retrieving Comment By ID\")\n\t}\n\n\tfmt.Fprintf(w, \"%+v\", comment)\n}",
"func resourceCommentRead(d *schema.ResourceData, m interface{}) error {\n\tconfig := m.(*Config)\n\n\tissue, res, err := config.jiraClient.Issue.Get(d.Get(\"issue_key\").(string), nil)\n\tif err != nil {\n\t\tbody, _ := ioutil.ReadAll(res.Body)\n\t\treturn errors.Wrapf(err, \"getting jira issue failed: %s\", body)\n\t}\n\n\tvar comment *jira.Comment\n\tfor _, c := range issue.Fields.Comments.Comments {\n\t\tif c.ID == d.Id() {\n\t\t\tcomment = c\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif comment == nil {\n\t\td.SetId(\"\")\n\t\treturn nil\n\t}\n\n\td.Set(\"body\", comment.Body)\n\n\treturn nil\n}",
"func (m *MaintainerManager) GetIssue(number string, comments bool) (*gh.Issue, []gh.Comment, error) {\n\tvar c []gh.Comment\n\tnum, err := strconv.Atoi(number)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tissue, err := m.client.Issue(m.repo, num, nil)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tif comments {\n\t\tc, err = m.GetComments(number)\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t}\n\treturn issue, c, nil\n}",
"func (i *IssueCommentEvent) GetComment() *IssueComment {\n\tif i == nil {\n\t\treturn nil\n\t}\n\treturn i.Comment\n}",
"func (h *Handler) GetComment(w http.ResponseWriter, r *http.Request) {\n\tw.Header().Add(\"Content-Type\", \"application/json; charset=UTF-8\")\n\n\tvars := mux.Vars(r)\n\tid := vars[\"id\"]\n\n\tcommentID, err := strconv.ParseUint(id, 10, 64)\n\tif err != nil {\n\t\tsendErrorResponse(w, \"Unable to parse UINT from ID\", err)\n\t\treturn\n\t}\n\tcomment, err := h.Service.GetComment(uint(commentID))\n\tif err != nil {\n\t\tsendErrorResponse(w, \"Error retrieving comment by ID\", err)\n\t\treturn\n\t}\n\n\tif err := json.NewEncoder(w).Encode(comment); err != nil {\n\t\tlog.Error(err)\n\t\treturn\n\t}\n}",
"func (client *Client) GetComments(refType string, refId int64) (comments []*Comment, err error) {\n\tpath := fmt.Sprintf(\"/comment/%s/%d/\", refType, refId)\n\terr = client.Request(\"GET\", path, nil, nil, &comments)\n\treturn\n}",
"func (o *CaCertificateCreateReqWeb) GetCommentOk() (*string, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn &o.Comment, true\n}",
"func (o *CaCertificateCreateReqWeb) GetComment() string {\n\tif o == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\n\treturn o.Comment\n}",
"func (a *ProblemsApiService) GetComments(ctx _context.Context, problemId string) ApiGetCommentsRequest {\n\treturn ApiGetCommentsRequest{\n\t\tApiService: a,\n\t\tctx: ctx,\n\t\tproblemId: problemId,\n\t}\n}",
"func (repo *commentRepository) GetComment(id int) (*comment.Comment, error) {\n\tif c, ok := repo.cache[id]; ok == false {\n\t\tvar err error\n\t\tc, err := (*repo.secondaryRepo).GetComment(id)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\trepo.cache[id] = *c\n\t\treturn c, nil\n\t} else {\n\t\treturn &c, nil\n\t}\n}",
"func parseInfoFromComment(comment string) (name string, tags []string, newComment string) {\n\tname = parseNameFromComment(comment)\n\ttags = parseTagsFromComment(comment)\n\n\tre := regexp.MustCompile(`(@(\\w|-)+|#(\\w|-)+)`)\n\twhitePrefix := regexp.MustCompile(`^(\\s)+`)\n\n\tnewComment = re.ReplaceAllLiteralString(comment, \"\")\n\n\tnewComment = whitePrefix.ReplaceAllLiteralString(newComment, \"\")\n\n\treturn name, tags, newComment\n}",
"func (cs *CommentService) Comment(id uint) (*entity.Comment, []error) {\n\tcomment, errs := cs.cmtRepo.Comment(id)\n\n\tif len(errs) > 0 {\n\t\treturn nil, errs\n\t}\n\treturn comment, nil\n}",
"func (c *Client) GetIssueCommentContext(ctx context.Context, issueIDOrKey string, commentID int) (*IssueComment, error) {\n\tu := fmt.Sprintf(\"/api/v2/issues/%v/comments/%v\", issueIDOrKey, commentID)\n\n\treq, err := c.NewRequest(\"GET\", u, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tissueComment := new(IssueComment)\n\tif err := c.Do(ctx, req, &issueComment); err != nil {\n\t\treturn nil, err\n\t}\n\treturn issueComment, nil\n}",
"func (e *ExtensionDescriptor) GetComments() *Comment { return e.Comments }",
"func (client *Client) Comment(refType string, refId int64, text string, params map[string]interface{}) (*Comment, error) {\n\tpath := fmt.Sprintf(\"/comment/%s/%d/\", refType, refId)\n\tif params == nil {\n\t\tparams = map[string]interface{}{}\n\t}\n\tparams[\"value\"] = text\n\n\tcomment := &Comment{}\n\terr := client.RequestWithParams(\"POST\", path, nil, params, comment)\n\treturn comment, err\n}",
"func (v GithubVCS) GetStringPullRequestComment(ctx context.Context, runinfo *RunInfo, reg string) ([]*github.IssueComment, error) {\n\tvar ret []*github.IssueComment\n\tprNumber, err := convertPullRequestURLtoNumber(runinfo.URL)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcomments, _, err := v.Client.Issues.ListComments(ctx, runinfo.Owner, runinfo.Repository,\n\t\tprNumber, &github.IssueListCommentsOptions{})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tre := regexp.MustCompile(reg)\n\tfor _, v := range comments {\n\t\tif string(re.Find([]byte(v.GetBody()))) != \"\" {\n\t\t\tret = append(ret, v)\n\t\t}\n\t}\n\treturn ret, nil\n}",
"func (c *CommentApiController) GetComment(w http.ResponseWriter, r *http.Request) {\n\tidParam, err := parseInt32Parameter(chi.URLParam(r, \"id\"), true)\n\tif err != nil {\n\t\tc.errorHandler(w, r, &ParsingError{Err: err}, nil)\n\t\treturn\n\t}\n\tresult, err := c.service.GetComment(r.Context(), idParam)\n\t// If an error occurred, encode the error with the status code\n\tif err != nil {\n\t\tc.errorHandler(w, r, err, &result)\n\t\treturn\n\t}\n\t// If no error, encode the body and the result code\n\tEncodeJSONResponse(result.Body, &result.Code, result.Headers, w)\n\n}",
"func (o *ReservationModel) GetCommentOk() (*string, bool) {\n\tif o == nil || o.Comment == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Comment, true\n}",
"func (gc *GithubClient) getOldComment(org, repo string, pull int) (*github.IssueComment, error) {\n\tcomments, err := gc.ListComments(org, repo, pull)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar match *github.IssueComment\n\tfor _, comment := range comments {\n\t\tfound, err := regexp.Match(identifier, []byte(comment.GetBody()))\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif found && *comment.GetUser().Login == gc.Login {\n\t\t\tif match == nil {\n\t\t\t\tmatch = comment\n\t\t\t} else {\n\t\t\t\treturn nil, fmt.Errorf(\"more than one comment on PR\")\n\t\t\t}\n\t\t}\n\t}\n\n\treturn match, nil\n}",
"func (s *ServiceDescriptor) GetComments() *Comment { return s.Comments }",
"func (p *PullRequest) GetComments() int {\n\tif p == nil || p.Comments == nil {\n\t\treturn 0\n\t}\n\treturn *p.Comments\n}",
"func (a *ProblemsApiService) GetCommentExecute(r ApiGetCommentRequest) (Comment, *_nethttp.Response, error) {\n\tvar (\n\t\tlocalVarHTTPMethod = _nethttp.MethodGet\n\t\tlocalVarPostBody interface{}\n\t\tlocalVarFormFileName string\n\t\tlocalVarFileName string\n\t\tlocalVarFileBytes []byte\n\t\tlocalVarReturnValue Comment\n\t)\n\n\tlocalBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, \"ProblemsApiService.GetComment\")\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}\n\t}\n\n\tlocalVarPath := localBasePath + \"/problems/{problemId}/comments/{commentId}\"\n\tlocalVarPath = strings.Replace(localVarPath, \"{\"+\"problemId\"+\"}\", _neturl.PathEscape(parameterToString(r.problemId, \"\")), -1)\n\tlocalVarPath = strings.Replace(localVarPath, \"{\"+\"commentId\"+\"}\", _neturl.PathEscape(parameterToString(r.commentId, \"\")), -1)\n\n\tlocalVarHeaderParams := make(map[string]string)\n\tlocalVarQueryParams := _neturl.Values{}\n\tlocalVarFormParams := _neturl.Values{}\n\n\t// to determine the Content-Type header\n\tlocalVarHTTPContentTypes := []string{}\n\n\t// set Content-Type header\n\tlocalVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)\n\tif localVarHTTPContentType != \"\" {\n\t\tlocalVarHeaderParams[\"Content-Type\"] = localVarHTTPContentType\n\t}\n\n\t// to determine the Accept header\n\tlocalVarHTTPHeaderAccepts := []string{\"application/json; charset=utf-8\"}\n\n\t// set Accept header\n\tlocalVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)\n\tif localVarHTTPHeaderAccept != \"\" {\n\t\tlocalVarHeaderParams[\"Accept\"] = localVarHTTPHeaderAccept\n\t}\n\tif r.ctx != nil {\n\t\t// API Key Authentication\n\t\tif auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {\n\t\t\tif apiKey, ok := auth[\"Api-Token\"]; ok {\n\t\t\t\tvar key string\n\t\t\t\tif apiKey.Prefix != \"\" {\n\t\t\t\t\tkey = apiKey.Prefix + \" \" + apiKey.Key\n\t\t\t\t} else {\n\t\t\t\t\tkey = apiKey.Key\n\t\t\t\t}\n\t\t\t\tlocalVarHeaderParams[\"Authorization\"] = key\n\t\t\t}\n\t\t}\n\t}\n\treq, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, err\n\t}\n\n\tlocalVarHTTPResponse, err := a.client.callAPI(req)\n\tif err != nil || localVarHTTPResponse == nil {\n\t\treturn localVarReturnValue, localVarHTTPResponse, err\n\t}\n\n\tlocalVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)\n\tlocalVarHTTPResponse.Body.Close()\n\tlocalVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))\n\tif err != nil {\n\t\treturn localVarReturnValue, localVarHTTPResponse, err\n\t}\n\n\tif localVarHTTPResponse.StatusCode >= 300 {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: localVarHTTPResponse.Status,\n\t\t}\n\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t}\n\n\terr = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\tif err != nil {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: err.Error(),\n\t\t}\n\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t}\n\n\treturn localVarReturnValue, localVarHTTPResponse, nil\n}",
"func (cs *CommentService) Comment(id uint) (*entity.Comment, []error) {\n\tcmnt, errs := cs.commentRepo.Comment(id)\n\tif len(errs) > 0 {\n\t\treturn nil, errs\n\t}\n\treturn cmnt, errs\n}",
"func CommentGet(w http.ResponseWriter, r *http.Request) {\n\t// 1. Write ID from request into struct d\n\tvar d struct {\n\t\tID int64 `json:\"id\"`\n\t}\n\tif err := json.NewDecoder(r.Body).Decode(&d); err != nil {\n\t\t_, _ = fmt.Fprint(w, \"Error While Parsing Request Body!\")\n\t\treturn\n\t}\n\n\t// 2. Connect to database\n\tctx := context.Background()\n\tclient, err := datastore.NewClient(ctx, ProjectName)\n\tif err != nil {\n\t\tfmt.Println(err) /* log error */\n\t\tw.WriteHeader(http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// 3. Get data\n\tvar comment Comment\n\tcommentKey := datastore.IDKey(EntityName, d.ID, nil)\n\terr = client.Get(ctx, commentKey, &comment)\n\tif err != nil {\n\t\tfmt.Println(err) /* log error */\n\t\tw.WriteHeader(http.StatusNotFound)\n\t\treturn\n\t}\n\tcomment.CommentId = d.ID\n\n\t// 4. Cast Comment to JSON\n\tbyteArray, err := json.Marshal(comment)\n\tif err != nil {\n\t\tfmt.Println(err) /* log error */\n\t\tw.WriteHeader(http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// 5. Send response\n\tw.WriteHeader(http.StatusOK)\n\t_, _ = fmt.Fprint(w, string(byteArray))\n}",
"func (c *Client) GetComments(token string) (*www.GetCommentsReply, error) {\n\troute := \"/proposals/\" + token + \"/comments\"\n\tresponseBody, err := c.makeRequest(http.MethodGet,\n\t\twww.PoliteiaWWWAPIRoute, route, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar gcr www.GetCommentsReply\n\terr = json.Unmarshal(responseBody, &gcr)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unmarshal GetCommentsReply: %v\", err)\n\t}\n\n\tif c.cfg.Verbose {\n\t\terr := prettyPrintJSON(gcr)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn &gcr, nil\n}",
"func DiscussionComments(dbOwner, dbFolder, dbName string, discID, comID int) (list []DiscussionCommentEntry, err error) {\n\tdbQuery := `\n\t\tWITH u AS (\n\t\t\tSELECT user_id\n\t\t\tFROM users\n\t\t\tWHERE lower(user_name) = lower($1)\n\t\t), d AS (\n\t\t\tSELECT db.db_id\n\t\t\tFROM sqlite_databases AS db, u\n\t\t\tWHERE db.user_id = u.user_id\n\t\t\t\tAND db.folder = $2\n\t\t\t\tAND db.db_name = $3\n\t\t), int AS (\n\t\t\t\tSELECT internal_id AS int_id\n\t\t\t\tFROM discussions\n\t\t\t\tWHERE db_id = (SELECT db_id FROM d)\n\t\t\t\tAND disc_id = $4\n\t\t\t)\n\t\tSELECT com.com_id, users.user_name, users.email, users.avatar_url, com.date_created, com.body, com.entry_type\n\t\tFROM discussion_comments AS com, d, users\n\t\tWHERE com.db_id = d.db_id\n\t\t\tAND com.disc_id = (SELECT int_id FROM int)\n\t\t\tAND com.commenter = users.user_id`\n\tif comID != 0 {\n\t\tdbQuery += fmt.Sprintf(`\n\t\t\tAND com.com_id = %d`, comID)\n\t}\n\tdbQuery += `\n\t\tORDER BY date_created ASC`\n\tvar rows *pgx.Rows\n\trows, err = pdb.Query(dbQuery, dbOwner, dbFolder, dbName, discID)\n\tif err != nil {\n\t\tlog.Printf(\"Database query failed: %v\\n\", err)\n\t\treturn\n\t}\n\tfor rows.Next() {\n\t\tvar av, em pgx.NullString\n\t\tvar oneRow DiscussionCommentEntry\n\t\terr = rows.Scan(&oneRow.ID, &oneRow.Commenter, &em, &av, &oneRow.DateCreated, &oneRow.Body, &oneRow.EntryType)\n\t\tif err != nil {\n\t\t\tlog.Printf(\"Error retrieving comment list for database '%s%s%s', discussion '%d': %v\\n\", dbOwner,\n\t\t\t\tdbFolder, dbName, discID, err)\n\t\t\trows.Close()\n\t\t\treturn\n\t\t}\n\n\t\tif av.Valid {\n\t\t\toneRow.AvatarURL = av.String\n\t\t} else {\n\t\t\tif em.Valid {\n\t\t\t\tpicHash := md5.Sum([]byte(em.String))\n\t\t\t\toneRow.AvatarURL = fmt.Sprintf(\"https://www.gravatar.com/avatar/%x?d=identicon&s=30\", picHash)\n\t\t\t}\n\t\t}\n\n\t\toneRow.BodyRendered = string(gfm.Markdown([]byte(oneRow.Body)))\n\t\tlist = append(list, oneRow)\n\t}\n\trows.Close()\n\treturn\n}",
"func (c *Client) GetComment(commentID string) (Comment, error) {\n\tvar comment Comment\n\turl := fmt.Sprintf(\"/comments/%s\", commentID)\n\t_, err := c.Request(\"GET\", url, nil, &comment)\n\treturn comment, err\n}",
"func ListIssueComments(ctx *context.APIContext) {\n\t// swagger:operation GET /repos/{owner}/{repo}/issues/{index}/comments issue issueGetComments\n\t// ---\n\t// summary: List all comments on an issue\n\t// produces:\n\t// - application/json\n\t// parameters:\n\t// - name: owner\n\t// in: path\n\t// description: owner of the repo\n\t// type: string\n\t// required: true\n\t// - name: repo\n\t// in: path\n\t// description: name of the repo\n\t// type: string\n\t// required: true\n\t// - name: index\n\t// in: path\n\t// description: index of the issue\n\t// type: integer\n\t// format: int64\n\t// required: true\n\t// - name: since\n\t// in: query\n\t// description: if provided, only comments updated since the specified time are returned.\n\t// type: string\n\t// format: date-time\n\t// - name: before\n\t// in: query\n\t// description: if provided, only comments updated before the provided time are returned.\n\t// type: string\n\t// format: date-time\n\t// responses:\n\t// \"200\":\n\t// \"$ref\": \"#/responses/CommentList\"\n\n\tbefore, since, err := context.GetQueryBeforeSince(ctx.Base)\n\tif err != nil {\n\t\tctx.Error(http.StatusUnprocessableEntity, \"GetQueryBeforeSince\", err)\n\t\treturn\n\t}\n\tissue, err := issues_model.GetIssueByIndex(ctx, ctx.Repo.Repository.ID, ctx.ParamsInt64(\":index\"))\n\tif err != nil {\n\t\tctx.Error(http.StatusInternalServerError, \"GetRawIssueByIndex\", err)\n\t\treturn\n\t}\n\tissue.Repo = ctx.Repo.Repository\n\n\topts := &issues_model.FindCommentsOptions{\n\t\tIssueID: issue.ID,\n\t\tSince: since,\n\t\tBefore: before,\n\t\tType: issues_model.CommentTypeComment,\n\t}\n\n\tcomments, err := issues_model.FindComments(ctx, opts)\n\tif err != nil {\n\t\tctx.Error(http.StatusInternalServerError, \"FindComments\", err)\n\t\treturn\n\t}\n\n\ttotalCount, err := issues_model.CountComments(opts)\n\tif err != nil {\n\t\tctx.InternalServerError(err)\n\t\treturn\n\t}\n\n\tif err := comments.LoadPosters(ctx); err != nil {\n\t\tctx.Error(http.StatusInternalServerError, \"LoadPosters\", err)\n\t\treturn\n\t}\n\n\tif err := comments.LoadAttachments(ctx); err != nil {\n\t\tctx.Error(http.StatusInternalServerError, \"LoadAttachments\", err)\n\t\treturn\n\t}\n\n\tapiComments := make([]*api.Comment, len(comments))\n\tfor i, comment := range comments {\n\t\tcomment.Issue = issue\n\t\tapiComments[i] = convert.ToAPIComment(ctx, ctx.Repo.Repository, comments[i])\n\t}\n\n\tctx.SetTotalCountHeader(totalCount)\n\tctx.JSON(http.StatusOK, &apiComments)\n}",
"func (o *VersionedControllerService) GetCommentsOk() (*string, bool) {\n\tif o == nil || o.Comments == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Comments, true\n}",
"func (f *FileDescriptor) GetPackageComments() *Comment { return f.PackageComments }",
"func (o *VersionedConnection) GetCommentsOk() (*string, bool) {\n\tif o == nil || o.Comments == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Comments, true\n}",
"func GetCommentHandler(w http.ResponseWriter, r *http.Request) {\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tparams := mux.Vars(r)\n\n\tcomment := GetSingleComment(params[\"id\"])\n\terr := json.NewEncoder(w).Encode(comment)\n\tif err != nil {\n\t\tlog.Fatal(\"[!] Error encoding comment data: \", err)\n\t}\n}",
"func GetIssuesInfo(conf *modules.Config, para modules.IssuePara, resChan chan interface{}) (interface{}, error) {\n\trequestPara := new(httppara.HTTPParameters)\n\tissues := make([]modules.Issue, 0)\n\tURL := initIssueQuery(conf, para)\n\ttoken := token.PersonalToken{Name: \"PRIVATE-TOKEN\", Value: conf.AccessInfo.PersonalToken}\n\tfmt.Println(\"URL\", URL)\n\trequestPara.InitPara(URL, \"GET\", token)\n\tissuesInfo, err := HTTPRequestWithHeader(requestPara, \"issue\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif para.FirstGet == true {\n\t\tresult := issuesInfo.(httppara.HTTPResponse)\n\t\terr = json.Unmarshal(result.HTTPResponse, &issues)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tissueList, err := processIssueInfo(issues, conf, para.TargetID)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdata := modules.IssueWithHeader{\n\t\t\tHeader: result.HTTPHeader,\n\t\t\tIssues: issueList,\n\t\t}\n\t\treturn data, nil\n\t}\n\terr = json.Unmarshal(issuesInfo.(httppara.HTTPResponse).HTTPResponse, &issues)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tissueList, err := processIssueInfo(issues, conf, para.TargetID)\n\tfmt.Println(issueList)\n\tresChan <- modules.IssueResult{Data: issueList, OK: err}\n\treturn nil, err\n}",
"func getIssuesInfo(p *api.IssuePayload) (issueTitle, link, by, operator, operateResult, assignees string) {\n\tissueTitle = fmt.Sprintf(\"[Issue-%s #%d]: %s\\n%s\", p.Repository.FullName, p.Issue.Index, p.Action, p.Issue.Title)\n\tassignList := p.Issue.Assignees\n\tassignStringList := make([]string, len(assignList))\n\n\tfor i, user := range assignList {\n\t\tassignStringList[i] = user.UserName\n\t}\n\tif p.Action == api.HookIssueAssigned {\n\t\toperateResult = fmt.Sprintf(\"%s assign this to %s\", p.Sender.UserName, assignList[len(assignList)-1].UserName)\n\t} else if p.Action == api.HookIssueUnassigned {\n\t\toperateResult = fmt.Sprintf(\"%s unassigned this for someone\", p.Sender.UserName)\n\t} else if p.Action == api.HookIssueMilestoned {\n\t\toperateResult = fmt.Sprintf(\"%s/milestone/%d\", p.Repository.HTMLURL, p.Issue.Milestone.ID)\n\t}\n\tlink = p.Issue.HTMLURL\n\tby = fmt.Sprintf(\"Issue by %s\", p.Issue.Poster.UserName)\n\tif len(assignStringList) > 0 {\n\t\tassignees = fmt.Sprintf(\"Assignees: %s\", strings.Join(assignStringList, \", \"))\n\t}\n\toperator = fmt.Sprintf(\"Operator: %s\", p.Sender.UserName)\n\treturn issueTitle, link, by, operator, operateResult, assignees\n}",
"func HandleComment(req types.IssueCommentOuter, config config.Config, derekConfig *types.DerekRepoConfig) {\n\n\tvar feedback string\n\tvar err error\n\n\tcommand := parse(req.Comment.Body, getCommandTriggers())\n\n\tswitch command.Type {\n\n\tcase addLabelConstant, removeLabelConstant:\n\t\tfeedback, err = manageLabel(req, command.Type, command.Value, config)\n\n\tcase assignConstant, unassignConstant:\n\t\tfeedback, err = manageAssignment(req, command.Type, command.Value, config)\n\n\tcase closeConstant, reopenConstant:\n\t\tfeedback, err = manageState(req, command.Type, config)\n\n\tcase setTitleConstant:\n\t\tfeedback, err = manageTitle(req, command.Type, command.Value, config)\n\n\tcase lockConstant, unlockConstant:\n\t\tfeedback, err = manageLocking(req, command.Type, config)\n\n\tcase setMilestoneConstant, removeMilestoneConstant:\n\t\tfeedback, err = updateMilestone(req, command.Type, command.Value, config)\n\n\tcase assignReviewerConstant, unassignReviewerConstant:\n\t\tpr := types.PullRequest{\n\t\t\tNumber: req.Issue.Number,\n\t\t}\n\t\tprReq := types.PullRequestOuter{\n\t\t\tRepository: req.Repository,\n\t\t\tPullRequest: pr,\n\t\t\tAction: req.Action,\n\t\t\tInstallationRequest: req.InstallationRequest,\n\t\t}\n\t\tfeedback, err = editReviewers(prReq, command.Type, command.Value, config)\n\n\tcase messageConstant:\n\t\tfeedback, err = createMessage(req, command.Type, command.Value, config, derekConfig)\n\n\tdefault:\n\t\tfeedback = \"No command found in comment\\n\"\n\n\t\tif strings.HasPrefix(req.Comment.Body, \"Derek \") || strings.HasPrefix(req.Comment.Body, \"/\") {\n\t\t\tfeedback = fmt.Sprintf(\"Unable to work with command: %q\\n\", req.Comment.Body)\n\t\t}\n\n\t\terr = nil\n\t}\n\n\tif !strings.HasSuffix(feedback, \"\\n\") {\n\t\tfeedback += \"\\n\"\n\t}\n\n\tfmt.Print(feedback)\n\n\tif err != nil {\n\t\tfmt.Println(err)\n\t}\n}",
"func (o *DeployKey) GetCommentOk() (*string, bool) {\n\tif o == nil || o.Comment == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Comment, true\n}",
"func (o *Service) GetCommentsOk() (string, bool) {\n\tif o == nil || o.Comments == nil {\n\t\tvar ret string\n\t\treturn ret, false\n\t}\n\treturn *o.Comments, true\n}",
"func (g *Gist) GetComments() int {\n\tif g == nil || g.Comments == nil {\n\t\treturn 0\n\t}\n\treturn *g.Comments\n}",
"func (cri *CommentRepositoryImpl) Comment(id int) (entity.Comment, error) {\r\n\r\n\trow := cri.conn.QueryRow(\"SELECT * FROM comments WHERE id = $1\", id)\r\n\r\n\tComment := entity.Comment{}\r\n\r\n\terr := row.Scan(&Comment.ID, &Comment.UserName, &Comment.Email, &Comment.Message, &Comment.PlacedAt)\r\n\tif err != nil {\r\n\t\treturn Comment, err\r\n\t}\r\n\r\n\treturn Comment, nil\r\n}",
"func (a *Client) GetDealsCommentsCommentID(params *GetDealsCommentsCommentIDParams, authInfo runtime.ClientAuthInfoWriter) (*GetDealsCommentsCommentIDOK, error) {\n\t// TODO: Validate the params before sending\n\tif params == nil {\n\t\tparams = NewGetDealsCommentsCommentIDParams()\n\t}\n\n\tresult, err := a.transport.Submit(&runtime.ClientOperation{\n\t\tID: \"GetDealsCommentsCommentID\",\n\t\tMethod: \"GET\",\n\t\tPathPattern: \"/deals/comments/{comment_id}\",\n\t\tProducesMediaTypes: []string{\"application/json\"},\n\t\tConsumesMediaTypes: []string{\"application/json\"},\n\t\tSchemes: []string{\"https\"},\n\t\tParams: params,\n\t\tReader: &GetDealsCommentsCommentIDReader{formats: a.formats},\n\t\tAuthInfo: authInfo,\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn result.(*GetDealsCommentsCommentIDOK), nil\n}",
"func (r *Repo) CheckIssueComments(issueNumber int, sender string) error {\n\turi := \"/repos/\" + r.Owner.Login + \"/issues/\" + strconv.Itoa(issueNumber) + \"/comments\"\n\trespBody, err := GithubAPICall(uri, \"GET\", nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\tvar comments []Comment\n\tjson.Unmarshal(respBody, &comments)\n\n\tif r.CheckIssue(comments, sender) {\n\t\tfmt.Println(\"We are trying to merge PR the corresponding PR\\n\")\n\t\treturn MergePullRequest(r.Owner.Login, r.FullName, issueNumber)\n\t}\n\treturn nil\n}",
"func (c *Client) GetIssueCommentsCountContext(ctx context.Context, issueIDOrKey string) (int, error) {\n\tu := fmt.Sprintf(\"/api/v2/issues/%v/comments/count\", issueIDOrKey)\n\n\treq, err := c.NewRequest(\"GET\", u, nil)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\tr := new(p)\n\tif err := c.Do(ctx, req, &r); err != nil {\n\t\treturn 0, err\n\t}\n\treturn r.Count, nil\n}",
"func (o *RowCommentCreate) GetCommentOk() (*string, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn &o.Comment, true\n}",
"func (s server) getComments() (map[string]*common.Comment, error) {\n\tconn, err := grpc.Dial(s.commentCentreService, grpc.WithInsecure())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer func() { _ = conn.Close() }()\n\tcl := ccpb.NewCommentcentreClient(conn)\n\tctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)\n\tdefer cancel()\n\tresp, err := cl.ListComments(ctx, &ccpb.ListCommentsRequest{})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\txs := map[string]*common.Comment{}\n\tfor _, c := range resp.GetComments() {\n\t\txs[c.GetName()] = c\n\t}\n\treturn xs, nil\n}",
"func (s *Server) handleIssueCommentEvent(l *logrus.Entry, ic scm.IssueCommentHook) {\n\tl = l.WithFields(logrus.Fields{\n\t\tscmprovider.OrgLogField: ic.Repo.Namespace,\n\t\tscmprovider.RepoLogField: ic.Repo.Name,\n\t\tscmprovider.PrLogField: ic.Issue.Number,\n\t\t\"author\": ic.Comment.Author.Login,\n\t\t\"url\": ic.Comment.Link,\n\t})\n\tl.Infof(\"Issue comment %s.\", ic.Action)\n\tevent := &scmprovider.GenericCommentEvent{\n\t\tGUID: ic.GUID,\n\t\tIsPR: ic.Issue.PullRequest != nil,\n\t\tAction: ic.Action,\n\t\tBody: ic.Comment.Body,\n\t\tLink: ic.Comment.Link,\n\t\tNumber: ic.Issue.Number,\n\t\tRepo: ic.Repo,\n\t\tAuthor: ic.Comment.Author,\n\t\tIssueAuthor: ic.Issue.Author,\n\t\tAssignees: ic.Issue.Assignees,\n\t\tIssueState: ic.Issue.State,\n\t\tIssueBody: ic.Issue.Body,\n\t\tIssueLink: ic.Issue.Link,\n\t}\n\tif ic.Issue.PullRequest != nil {\n\t\tupdatedPR, _, err := s.ClientAgent.SCMProviderClient.PullRequests.Find(context.Background(), fmt.Sprintf(\"%s/%s\",\n\t\t\tic.Repo.Namespace, ic.Repo.Name), ic.Issue.Number)\n\t\tif err != nil {\n\t\t\tl.WithError(err).Error(\"Error fetching Pull Request details.\")\n\t\t} else {\n\t\t\tevent.HeadSha = updatedPR.Head.Sha\n\t\t}\n\t}\n\ts.handleGenericComment(\n\t\tl,\n\t\tevent,\n\t)\n}",
"func (c *Client) GetIssueComment(issueIDOrKey string, commentID int) (*IssueComment, error) {\n\treturn c.GetIssueCommentContext(context.Background(), issueIDOrKey, commentID)\n}",
"func getComment(arguments string, message *client.Message) string {\n\ttext := message.Content.(*client.MessageText).Text\n\tmsgLengthDifference := len(text.Text) - len(arguments)\n\treturn caption.ToHTMLCaption(text)[msgLengthDifference:]\n}",
"func GetCommentsForArticle(c *gin.Context){\n\tcontent, err := comments.GetCommentsForArticle(c.Param(\"articleId\"))\n\n\tif err != nil {\n\t\tc.JSON(400, gin.H{\"success\": false, \"msg\": \"Unable to retrieve articles\", \"errCode\": 38})\n\t\treturn\n\t}\n\n\tc.JSON(http.StatusOK, gin.H{\"success\": true, \"msg\": \"ok\", \"data\": content})\n}",
"func fetchGithubIssue(conf *githubConfig) (*githubIssue, error) {\n\tctx := context.Background()\n\tts := oauth2.StaticTokenSource(\n\t\t&oauth2.Token{AccessToken: conf.token},\n\t)\n\ttc := oauth2.NewClient(ctx, ts)\n\tclient := github.NewClient(tc)\n\n\t// Read issue metadata\n\tissue, _, err := client.Issues.Get(context.Background(), conf.owner, conf.repo, conf.issueID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres := &githubIssue{\n\t\tissue: issue,\n\t\tnameByLoginID: make(map[string]string),\n\t}\n\n\t// Read user metadata\n\tuser, _, err := client.Users.Get(context.Background(), stringify(issue.User.Login))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres.nameByLoginID[stringify(issue.User.Login)] = stringify(user.Name)\n\n\t// Get all comments\n\tcomments, _, err := client.Issues.ListComments(context.Background(), conf.owner, conf.repo, conf.issueID, &github.IssueListCommentsOptions{})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres.comments = comments\n\n\tloginIDs := []*string{\n\t\tissue.User.Login,\n\t}\n\t// Aggregate all users and read their metadata\n\tif issue.Assignee != nil {\n\t\tloginIDs = append(loginIDs, issue.Assignee.Login)\n\t}\n\n\tfor _, comment := range comments {\n\t\tloginIDs = append(loginIDs, comment.User.Login)\n\t}\n\n\tfor _, loginID := range loginIDs {\n\t\tid := stringify(loginID)\n\t\tif _, ok := res.nameByLoginID[id]; ok {\n\t\t\tcontinue\n\t\t}\n\t\tuser, _, err := client.Users.Get(context.Background(), id)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tres.nameByLoginID[id] = stringify(user.Name)\n\t}\n\treturn res, nil\n}",
"func (s *IdeaStorage) GetCommentsByIdea(number int) ([]*models.Comment, error) {\n\treturn make([]*models.Comment, 0), nil\n}",
"func (rg *reportGenerator) commentOnIssue(issue *github.Issue) *github.IssueComment {\n\tbody := os.Expand(issueCommentTemplate, rg.templateHelper)\n\n\tissueComment, response, err := rg.client.Issues.CreateComment(\n\t\trg.ctx,\n\t\trg.envVariables[projectUsernameKey],\n\t\trg.envVariables[projectRepoNameKey],\n\t\t*issue.Number,\n\t\t&github.IssueComment{\n\t\t\tBody: &body,\n\t\t},\n\t)\n\tif err != nil {\n\t\trg.logger.Fatal(\"Failed to search GitHub Issues\", zap.Error(err))\n\t}\n\n\tif response.StatusCode != http.StatusCreated {\n\t\trg.handleBadResponses(response)\n\t}\n\n\treturn issueComment\n}",
"func (prrce *PullRequestReviewCommentEvent) Comment() string {\n\tcomment := prrce.raw.Payload[\"comment\"].(map[string]interface{})\n\treturn comment[\"body\"].(string)\n}",
"func (s *Service) CommentsGet(envelopeID string) *CommentsGetOp {\n\treturn &CommentsGetOp{\n\t\tCredential: s.credential,\n\t\tMethod: \"GET\",\n\t\tPath: strings.Join([]string{\"envelopes\", envelopeID, \"comments\", \"transcript\"}, \"/\"),\n\t\tAccept: \"application/pdf\",\n\t\tQueryOpts: make(url.Values),\n\t}\n}",
"func fromComment(request *jsontree.JsonTree) []string {\n\tissue := request.Get(\"pull_request\")\n\tuser, _ := issue.Get(\"user\").Get(\"login\").String()\n\tsender, _ := request.Get(\"sender\").Get(\"login\").String()\n\n\tvar toNotify []string\n\tassignees := issue.Get(\"assignees\")\n\tnumAssignees, _ := assignees.Len()\n\n\tfor i := 0; i < numAssignees; i++ {\n\t\tassignee, _ := assignees.GetIndex(i).Get(\"login\").String()\n\t\tif sender != assignee {\n\t\t\ttoNotify = append(toNotify, assignee)\n\t\t}\n\t}\n\n\tif sender != user {\n\t\ttoNotify = append(toNotify, user)\n\t}\n\n\tif sender == \"tryscrollbot\" {\n\t\ttoNotify = []string{}\n\t}\n\treturn toNotify\n}",
"func (c Client) ListComments(ctx context.Context, ID it.IssueID) ([]it.Comment, error) {\n\tmi, err := c.getIssue(ctx, ID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcomments := make([]it.Comment, len(mi.Notes))\n\tfor i, c := range mi.Notes {\n\t\tcomments[i] = it.Comment{\n\t\t\tID: it.CommentID(strconv.Itoa(c.ID)),\n\t\t\tAuthor: readMU(&c.Reporter),\n\t\t\tCreatedAt: time.Time(c.DateSubmitted),\n\t\t\tBody: c.Text,\n\t\t}\n\t}\n\treturn comments, nil\n}",
"func (e *EnumDescriptor) GetComments() *Comment { return e.Comments }",
"func (s *Rest) findCommentsCtrl(w http.ResponseWriter, r *http.Request) {\n\tlocator := store.Locator{SiteID: r.URL.Query().Get(\"site\"), URL: r.URL.Query().Get(\"url\")}\n\tsort := r.URL.Query().Get(\"sort\")\n\tif strings.HasPrefix(sort, \" \") { // restore + replaced by \" \"\n\t\tsort = \"+\" + sort[1:]\n\t}\n\tlog.Printf(\"[DEBUG] get comments for %+v, sort %s, format %s\", locator, sort, r.URL.Query().Get(\"format\"))\n\n\tdata, err := s.Cache.Get(cache.Key(cache.URLKey(r), locator.SiteID, locator.URL), 4*time.Hour, func() ([]byte, error) {\n\t\tcomments, e := s.DataService.Find(locator, sort)\n\t\tif e != nil {\n\t\t\treturn nil, e\n\t\t}\n\t\tmaskedComments := s.adminService.alterComments(comments, r)\n\t\tvar b []byte\n\t\tswitch r.URL.Query().Get(\"format\") {\n\t\tcase \"tree\":\n\t\t\ttree := rest.MakeTree(maskedComments, sort, s.ReadOnlyAge)\n\t\t\tif s.DataService.IsReadOnly(locator) {\n\t\t\t\ttree.Info.ReadOnly = true\n\t\t\t}\n\t\t\tb, e = encodeJSONWithHTML(tree)\n\t\tdefault:\n\t\t\tb, e = encodeJSONWithHTML(maskedComments)\n\t\t}\n\t\treturn b, e\n\t})\n\n\tif err != nil {\n\t\trest.SendErrorJSON(w, r, http.StatusBadRequest, err, \"can't find comments\")\n\t\treturn\n\t}\n\trenderJSONFromBytes(w, r, data)\n}",
"func (c *Client) GetIssueCommentsCount(issueIDOrKey string) (int, error) {\n\treturn c.GetIssueCommentsCountContext(context.Background(), issueIDOrKey)\n}",
"func (j *DSGitHub) EnrichIssueComments(ctx *Ctx, issue map[string]interface{}, comments []map[string]interface{}, affs bool) (richItems []interface{}, err error) {\n\t// type: category, type(_), item_type( ), issue_comment=true\n\t// copy issue: github_repo, repo_name, repository\n\t// copy comment: created_at, updated_at, body, body_analyzed, author_association, url, html_url\n\t// identify: id, id_in_repo, issue_comment_id, url_id\n\t// standard: metadata..., origin, project, project_slug, uuid\n\t// parent: issue_id, issue_number\n\t// calc: n_reactions\n\t// identity: author_... -> commenter_...,\n\t// common: is_github_issue=1, is_github_issue_comment=1\n\tiID, _ := issue[\"id\"]\n\tid, _ := iID.(string)\n\tiIssueID, _ := issue[\"issue_id\"]\n\tissueID := int(iIssueID.(float64))\n\tissueNumber, _ := issue[\"id_in_repo\"]\n\tiNumber, _ := issueNumber.(int)\n\tiGithubRepo, _ := issue[\"github_repo\"]\n\tgithubRepo, _ := iGithubRepo.(string)\n\tcopyIssueFields := []string{\"category\", \"github_repo\", \"repo_name\", \"repository\", \"repo_short_name\", \"pull_request\"}\n\tcopyCommentFields := []string{\"created_at\", \"updated_at\", \"body\", \"body_analyzed\", \"author_association\", \"url\", \"html_url\"}\n\tfor _, comment := range comments {\n\t\trich := make(map[string]interface{})\n\t\tfor _, field := range RawFields {\n\t\t\tv, _ := issue[field]\n\t\t\trich[field] = v\n\t\t}\n\t\tfor _, field := range copyIssueFields {\n\t\t\trich[field], _ = issue[field]\n\t\t}\n\t\tfor _, field := range copyCommentFields {\n\t\t\trich[field], _ = comment[field]\n\t\t}\n\t\tif ctx.Project != \"\" {\n\t\t\trich[\"project\"] = ctx.Project\n\t\t}\n\t\trich[\"type\"] = \"issue_comment\"\n\t\trich[\"item_type\"] = \"issue comment\"\n\t\trich[\"issue_comment\"] = true\n\t\trich[\"issue_created_at\"], _ = issue[\"created_at\"]\n\t\trich[\"issue_id\"] = issueID\n\t\trich[\"issue_number\"] = issueNumber\n\t\tiCID, _ := comment[\"id\"]\n\t\tcid := int64(iCID.(float64))\n\t\trich[\"id_in_repo\"] = cid\n\t\trich[\"issue_comment_id\"] = cid\n\t\trich[\"id\"] = id + \"/comment/\" + fmt.Sprintf(\"%d\", cid)\n\t\trich[\"url_id\"] = fmt.Sprintf(\"%s/issues/%d/comments/%d\", githubRepo, iNumber, cid)\n\t\treactions := 0\n\t\tiReactions, ok := Dig(comment, []string{\"reactions\", \"total_count\"}, false, true)\n\t\tif ok {\n\t\t\treactions = int(iReactions.(float64))\n\t\t}\n\t\trich[\"n_reactions\"] = reactions\n\t\trich[\"commenter_association\"], _ = comment[\"author_association\"]\n\t\trich[\"commenter_login\"], _ = Dig(comment, []string{\"user\", \"login\"}, false, true)\n\t\tiCommenterData, ok := comment[\"user_data\"]\n\t\tif ok && iCommenterData != nil {\n\t\t\tuser, _ := iCommenterData.(map[string]interface{})\n\t\t\trich[\"author_login\"], _ = user[\"login\"]\n\t\t\trich[\"author_name\"], _ = user[\"name\"]\n\t\t\trich[\"author_avatar_url\"], _ = user[\"avatar_url\"]\n\t\t\trich[\"commenter_avatar_url\"] = rich[\"author_avatar_url\"]\n\t\t\trich[\"commenter_name\"], _ = user[\"name\"]\n\t\t\trich[\"commenter_domain\"] = nil\n\t\t\tiEmail, ok := user[\"email\"]\n\t\t\tif ok {\n\t\t\t\temail, _ := iEmail.(string)\n\t\t\t\tary := strings.Split(email, \"@\")\n\t\t\t\tif len(ary) > 1 {\n\t\t\t\t\trich[\"commenter_domain\"] = strings.TrimSpace(ary[1])\n\t\t\t\t}\n\t\t\t}\n\t\t\trich[\"commenter_org\"], _ = user[\"company\"]\n\t\t\trich[\"commenter_location\"], _ = user[\"location\"]\n\t\t\trich[\"commenter_geolocation\"] = nil\n\t\t} else {\n\t\t\trich[\"author_login\"] = nil\n\t\t\trich[\"author_name\"] = nil\n\t\t\trich[\"author_avatar_url\"] = nil\n\t\t\trich[\"commenter_avatar_url\"] = nil\n\t\t\trich[\"commenter_name\"] = nil\n\t\t\trich[\"commenter_domain\"] = nil\n\t\t\trich[\"commenter_org\"] = nil\n\t\t\trich[\"commenter_location\"] = nil\n\t\t\trich[\"commenter_geolocation\"] = nil\n\t\t}\n\t\tiCreatedAt, _ := comment[\"created_at\"]\n\t\tcreatedAt, _ := TimeParseInterfaceString(iCreatedAt)\n\t\trich[j.DateField(ctx)] = createdAt\n\t\tif affs {\n\t\t\tauthorKey := \"user_data\"\n\t\t\tvar affsItems map[string]interface{}\n\t\t\taffsItems, err = j.AffsItems(ctx, comment, GitHubIssueCommentRoles, createdAt)\n\t\t\tif err != nil {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tfor prop, value := range affsItems {\n\t\t\t\trich[prop] = value\n\t\t\t}\n\t\t\tfor _, suff := range AffsFields {\n\t\t\t\trich[Author+suff] = rich[authorKey+suff]\n\t\t\t\trich[\"commenter\"+suff] = rich[authorKey+suff]\n\t\t\t}\n\t\t\torgsKey := authorKey + MultiOrgNames\n\t\t\t_, ok := Dig(rich, []string{orgsKey}, false, true)\n\t\t\tif !ok {\n\t\t\t\trich[orgsKey] = []interface{}{}\n\t\t\t}\n\t\t}\n\t\tfor prop, value := range CommonFields(j, createdAt, j.Category) {\n\t\t\trich[prop] = value\n\t\t}\n\t\tfor prop, value := range CommonFields(j, createdAt, j.Category+\"_comment\") {\n\t\t\trich[prop] = value\n\t\t}\n\t\trichItems = append(richItems, rich)\n\t}\n\treturn\n}",
"func (_article *Article) GetComments() error {\n\t_comments, err := ArticleGetComments(_article.Id)\n\tif err == nil {\n\t\t_article.Comments = _comments\n }\n return err\n}",
"func (c *CommentApiController) GetUserComments(w http.ResponseWriter, r *http.Request) {\n\tquery := r.URL.Query()\n\tusernameParam := chi.URLParam(r, \"username\")\n\tlimitParam, err := parseInt32Parameter(query.Get(\"limit\"), false)\n\tif err != nil {\n\t\tc.errorHandler(w, r, &ParsingError{Err: err}, nil)\n\t\treturn\n\t}\n\toffsetParam, err := parseInt32Parameter(query.Get(\"offset\"), false)\n\tif err != nil {\n\t\tc.errorHandler(w, r, &ParsingError{Err: err}, nil)\n\t\treturn\n\t}\n\tresult, err := c.service.GetUserComments(r.Context(), usernameParam, limitParam, offsetParam)\n\t// If an error occurred, encode the error with the status code\n\tif err != nil {\n\t\tc.errorHandler(w, r, err, &result)\n\t\treturn\n\t}\n\t// If no error, encode the body and the result code\n\tEncodeJSONResponse(result.Body, &result.Code, result.Headers, w)\n\n}",
"func (controller *CommentQueryController) GetComments(w http.ResponseWriter, r *http.Request) {\n\tres, err := controller.DiscussionQueryServiceInterface.GetComments(context.TODO())\n\tif err != nil {\n\t\tvar httpCode int\n\t\tvar errorMsg string\n\n\t\tswitch err.Error() {\n\t\tcase errors.MissingRecord:\n\t\t\thttpCode = http.StatusNotFound\n\t\t\terrorMsg = \"No records found.\"\n\t\tdefault:\n\t\t\thttpCode = http.StatusInternalServerError\n\t\t\terrorMsg = \"Please contact technical support.\"\n\t\t}\n\n\t\tresponse := viewmodels.HTTPResponseVM{\n\t\t\tStatus: httpCode,\n\t\t\tSuccess: false,\n\t\t\tMessage: errorMsg,\n\t\t\tErrorCode: err.Error(),\n\t\t}\n\n\t\tresponse.JSON(w)\n\t\treturn\n\t}\n\n\tvar comments []types.CommentResponse\n\n\tfor _, comment := range res {\n\t\tcomments = append(comments, types.CommentResponse{\n\t\t\tID: comment.ID,\n\t\t\tPostID: comment.PostID,\n\t\t\tContent: comment.Content,\n\t\t\tCreatedAt: comment.CreatedAt.Unix(),\n\t\t\tUpdatedAt: comment.UpdatedAt.Unix(),\n\t\t})\n\t}\n\tresponse := viewmodels.HTTPResponseVM{\n\t\tStatus: http.StatusOK,\n\t\tSuccess: true,\n\t\tMessage: \"Successfully fetched comment data.\",\n\t\tData: comments,\n\t}\n\n\tresponse.JSON(w)\n}",
"func (c *Client) GetIssueCommentsNotificationsContext(ctx context.Context, issueIDOrKey string, commentID int) ([]*Notification, error) {\n\tu := fmt.Sprintf(\"/api/v2/issues/%v/comments/%v/notifications\", issueIDOrKey, commentID)\n\n\treq, err := c.NewRequest(\"GET\", u, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tnotifications := []*Notification{}\n\tif err := c.Do(ctx, req, ¬ifications); err != nil {\n\t\treturn nil, err\n\t}\n\treturn notifications, nil\n}",
"func (o *V0037JobProperties) GetCommentOk() (*string, bool) {\n\tif o == nil || o.Comment == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Comment, true\n}",
"func (d *RetryDownloader) GetComments(commentable Commentable) ([]*Comment, bool, error) {\n\tvar (\n\t\tcomments []*Comment\n\t\tisEnd bool\n\t\terr error\n\t)\n\n\terr = d.retry(func() error {\n\t\tcomments, isEnd, err = d.Downloader.GetComments(commentable)\n\t\treturn err\n\t})\n\n\treturn comments, isEnd, err\n}",
"func (v Notes) GetComments(params NotesGetCommentsParams) (*NotesGetCommentsResponse, error) {\n\tr, err := v.API.Request(\"notes.getComments\", params)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar resp NotesGetCommentsResponse\n\terr = json.Unmarshal(r, &resp)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &resp, nil\n}",
"func (ps *RedditScraper) getComments(submission *geddit.Submission) ([]Comment, error) {\n\tredditComments, err := ps.RedditSession.Comments(submission)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcomments := make([]Comment, len(redditComments))\n\tfor i, c := range redditComments {\n\t\tcomments[i].Author = c.Author\n\t\tcomments[i].Text = c.Body\n\t\tcomments[i].UpVotes = int(c.UpVotes)\n\t}\n\treturn comments, nil\n}",
"func (s *TattooStorage) GetComments(name string) []*Comment {\n\tvar lst_buff interface{}\n\tvar lst []interface{}\n\tvar err error\n\tvar text []byte\n\tlst_buff, err = s.CommentIndexDB.GetJSON(name)\n\tif err != nil {\n\t\tlog.Printf(\"load comment index failed (%v)!\\n\", err)\n\t\treturn nil\n\t}\n\tlst = lst_buff.([]interface{})\n\tarr := make([]*Comment, len(lst))\n\tfor i, k := range lst {\n\t\tvar meta *CommentMetadata\n\t\tmeta, err = s.GetCommentMetadata(k.(string))\n\t\tif err != nil {\n\t\t\tlog.Printf(\"Get Comment Medata Failed (%s)!\\n\", k.(string))\n\t\t\tcontinue\n\t\t}\n\t\tcomment := new(Comment)\n\t\tcomment.Metadata = *meta\n\t\ttext, err = s.CommentHTMLDB.Get(k.(string))\n\t\tcomment.Text = template.HTML(text)\n\t\tarr[i] = comment\n\t}\n\treturn arr\n}",
"func (repo *commentRepository) GetComments(postID int, by string, order string, limit, offset int) ([]*comment.Comment, error) {\n\tresult, err := (*repo.secondaryRepo).GetComments(postID, by, order, limit, offset)\n\tif err == nil {\n\t\tfor _, c := range result {\n\t\t\trepo.cache[c.ID] = *c\n\t\t}\n\t}\n\treturn result, err\n}",
"func (ts *TechStoryService) getComments (w http.ResponseWriter, r *http.Request) {\n\tvar techStory model.TechStory\n\ttechStory.Key = mux.Vars(r)[\"id\"]\n\n\tvalues := r.URL.Query()\n\toffset := model.GetInt(values, \"offset\", 0)\n\tpageSize := model.GetInt(values, \"pageSize\", 0)\n\n\tWithTechStoryDao(func(dao techStoryDao) {\n\t\tcomments, err := dao.GetComments(techStory, pageSize, offset)\n\t\tmodel.CheckErr(err)\n\n\t\tiComments := make([]interface{}, len(comments))\n\t\tfor idx, com := range comments {\n\t\t\tiComments[idx] = map[string]interface{}{\n\t\t\t\t\"text\": com.Comment.Text,\n\t\t\t\t\"createDate\": com.Comment.CreateDate,\n\t\t\t\t\"title\": com.Comment.Title,\n\t\t\t\t\"user\": com.User,\n\t\t\t}\n\t\t}\n\n\t\tmodel.WriteAnyResponse(true, nil, iComments, w)\n\t})\n}",
"func (o *StorageNetAppCifsShareAllOf) GetComment() string {\n\tif o == nil || o.Comment == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\treturn *o.Comment\n}",
"func (o *CommitOptions) GetComment() string {\n\tif o.Comment == nil {\n\t\tvar z string\n\t\treturn z\n\t}\n\treturn *o.Comment\n}",
"func (i *Issue) GetCommentsURL() string {\n\tif i == nil || i.CommentsURL == nil {\n\t\treturn \"\"\n\t}\n\treturn *i.CommentsURL\n}",
"func (rri *ReviewRepoImpl) comment(id int) (entity.Comment, error) {\r\n\r\n\tquery := \"SELECT * FROM comment WHERE id = $1\"\r\n\trow := rri.conn.QueryRow(query, id)\r\n\r\n\tr := entity.Comment{}\r\n\r\n\terr := row.Scan(&r.ID, &r.UserName, &r.Massage, &r.User_id, &r.Book_id, &r.ReviewedAt)\r\n\tif err != nil {\r\n\t\treturn r, err\r\n\t}\r\n\r\n\treturn r, nil\r\n}",
"func GetComment(db *sql.DB, id int) (*Comment, error) {\n\tvar comment Comment\n\terr := db.QueryRow(`\n\t\tselect\n\t\t\tid, comment, created_at, updated_at\n\t\tfrom forums\n\t\twhere id = $1\n\t`, id).Scan(&comment.ID, &comment.Comment, &comment.CreatedAt, &comment.UpdatedAt)\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &comment, nil\n}",
"func (s *TeamsService) GetCommentBySlug(ctx context.Context, org, slug string, discussionNumber, commentNumber int) (*DiscussionComment, *Response, error) {\n\tu := fmt.Sprintf(\"orgs/%v/teams/%v/discussions/%v/comments/%v\", org, slug, discussionNumber, commentNumber)\n\n\treq, err := s.client.NewRequest(\"GET\", u, nil)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tdiscussionComment := &DiscussionComment{}\n\tresp, err := s.client.Do(ctx, req, discussionComment)\n\tif err != nil {\n\t\treturn nil, resp, err\n\t}\n\n\treturn discussionComment, resp, nil\n}",
"func (client jiraServerClient) GetIssueInfo(projectID string) (*ProjectIssueInfo, *jira.Response, error) {\n\tapiEndpoint := fmt.Sprintf(\"%s%s/issuetypes\", APIEndpointCreateIssueMeta, projectID)\n\treq, err := client.Jira.NewRequest(http.MethodGet, apiEndpoint, nil)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tissues := ProjectIssueInfo{}\n\tresponse, err := client.Jira.Do(req, &issues)\n\treturn &issues, response, err\n}",
"func (o *VersionedConnection) GetComments() string {\n\tif o == nil || o.Comments == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\treturn *o.Comments\n}",
"func (a *ProblemsApiService) GetCommentsExecute(r ApiGetCommentsRequest) (CommentsList, *_nethttp.Response, error) {\n\tvar (\n\t\tlocalVarHTTPMethod = _nethttp.MethodGet\n\t\tlocalVarPostBody interface{}\n\t\tlocalVarFormFileName string\n\t\tlocalVarFileName string\n\t\tlocalVarFileBytes []byte\n\t\tlocalVarReturnValue CommentsList\n\t)\n\n\tlocalBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, \"ProblemsApiService.GetComments\")\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}\n\t}\n\n\tlocalVarPath := localBasePath + \"/problems/{problemId}/comments\"\n\tlocalVarPath = strings.Replace(localVarPath, \"{\"+\"problemId\"+\"}\", _neturl.PathEscape(parameterToString(r.problemId, \"\")), -1)\n\n\tlocalVarHeaderParams := make(map[string]string)\n\tlocalVarQueryParams := _neturl.Values{}\n\tlocalVarFormParams := _neturl.Values{}\n\n\tif r.nextPageKey != nil {\n\t\tlocalVarQueryParams.Add(\"nextPageKey\", parameterToString(*r.nextPageKey, \"\"))\n\t}\n\tif r.pageSize != nil {\n\t\tlocalVarQueryParams.Add(\"pageSize\", parameterToString(*r.pageSize, \"\"))\n\t}\n\t// to determine the Content-Type header\n\tlocalVarHTTPContentTypes := []string{}\n\n\t// set Content-Type header\n\tlocalVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)\n\tif localVarHTTPContentType != \"\" {\n\t\tlocalVarHeaderParams[\"Content-Type\"] = localVarHTTPContentType\n\t}\n\n\t// to determine the Accept header\n\tlocalVarHTTPHeaderAccepts := []string{\"application/json; charset=utf-8\"}\n\n\t// set Accept header\n\tlocalVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)\n\tif localVarHTTPHeaderAccept != \"\" {\n\t\tlocalVarHeaderParams[\"Accept\"] = localVarHTTPHeaderAccept\n\t}\n\tif r.ctx != nil {\n\t\t// API Key Authentication\n\t\tif auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {\n\t\t\tif apiKey, ok := auth[\"Api-Token\"]; ok {\n\t\t\t\tvar key string\n\t\t\t\tif apiKey.Prefix != \"\" {\n\t\t\t\t\tkey = apiKey.Prefix + \" \" + apiKey.Key\n\t\t\t\t} else {\n\t\t\t\t\tkey = apiKey.Key\n\t\t\t\t}\n\t\t\t\tlocalVarHeaderParams[\"Authorization\"] = key\n\t\t\t}\n\t\t}\n\t}\n\treq, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, err\n\t}\n\n\tlocalVarHTTPResponse, err := a.client.callAPI(req)\n\tif err != nil || localVarHTTPResponse == nil {\n\t\treturn localVarReturnValue, localVarHTTPResponse, err\n\t}\n\n\tlocalVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)\n\tlocalVarHTTPResponse.Body.Close()\n\tlocalVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))\n\tif err != nil {\n\t\treturn localVarReturnValue, localVarHTTPResponse, err\n\t}\n\n\tif localVarHTTPResponse.StatusCode >= 300 {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: localVarHTTPResponse.Status,\n\t\t}\n\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t}\n\n\terr = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\tif err != nil {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: err.Error(),\n\t\t}\n\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t}\n\n\treturn localVarReturnValue, localVarHTTPResponse, nil\n}",
"func (o *WatchlistScreeningIndividualReviewCreateResponse) GetComment() string {\n\tif o == nil || o.Comment.Get() == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\n\treturn *o.Comment.Get()\n}",
"func (c Comment) GetComments(articleId string) (comments []*Comment, err error) {\n\tif err := load.Conn.Where(\"article_id = ? \", articleId).Find(&comments).Error; err != nil {\n\t\treturn nil, err\n\t} else {\n\t\treturn comments, nil\n\t}\n}"
] |
[
"0.65416056",
"0.6178458",
"0.61230886",
"0.6096504",
"0.605338",
"0.60185695",
"0.5990122",
"0.59873015",
"0.5973104",
"0.59579057",
"0.58841586",
"0.5882632",
"0.5789403",
"0.57353234",
"0.57305694",
"0.57227045",
"0.5717392",
"0.57161915",
"0.567478",
"0.56485",
"0.5628907",
"0.56176966",
"0.56038177",
"0.5590271",
"0.55808264",
"0.55680925",
"0.5565872",
"0.55624795",
"0.5555914",
"0.5550072",
"0.5526793",
"0.54923826",
"0.54894596",
"0.54838413",
"0.54822946",
"0.54805124",
"0.54780465",
"0.5475702",
"0.5468964",
"0.5444332",
"0.54319996",
"0.5427909",
"0.54255927",
"0.54224914",
"0.54164404",
"0.5416066",
"0.54142714",
"0.54126537",
"0.5412177",
"0.5408192",
"0.537878",
"0.5370915",
"0.5370366",
"0.53682846",
"0.53667647",
"0.5366608",
"0.5366451",
"0.53656036",
"0.53639257",
"0.53557473",
"0.5328123",
"0.5321882",
"0.531965",
"0.5317978",
"0.5316505",
"0.531513",
"0.53063065",
"0.5293418",
"0.52854073",
"0.5276593",
"0.5274582",
"0.5265914",
"0.5263146",
"0.5249217",
"0.5246331",
"0.52402097",
"0.5239002",
"0.5229333",
"0.5228111",
"0.5225477",
"0.5223657",
"0.5223551",
"0.5221784",
"0.5216936",
"0.5211743",
"0.5211181",
"0.52083826",
"0.5206464",
"0.5204604",
"0.51994514",
"0.519343",
"0.5190939",
"0.5183408",
"0.5182645",
"0.5178911",
"0.51776785",
"0.51633704",
"0.5157512",
"0.51564574",
"0.5156431"
] |
0.81754494
|
0
|
ToHook convert models.Webhook to api.Hook This function is not part of the convert package to prevent an import cycle
|
func ToHook(repoLink string, w *webhook_model.Webhook) (*api.Hook, error) {
config := map[string]string{
"url": w.URL,
"content_type": w.ContentType.Name(),
}
if w.Type == webhook_module.SLACK {
s := GetSlackHook(w)
config["channel"] = s.Channel
config["username"] = s.Username
config["icon_url"] = s.IconURL
config["color"] = s.Color
}
authorizationHeader, err := w.HeaderAuthorization()
if err != nil {
return nil, err
}
return &api.Hook{
ID: w.ID,
Type: w.Type,
URL: fmt.Sprintf("%s/settings/hooks/%d", repoLink, w.ID),
Active: w.IsActive,
Config: config,
Events: w.EventsArray(),
AuthorizationHeader: authorizationHeader,
Updated: w.UpdatedUnix.AsTime(),
Created: w.CreatedUnix.AsTime(),
BranchFilter: w.BranchFilter,
}, nil
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (s *WebhooksServiceOp) Create(webhook Webhook, options ...interface{}) (Webhook, error) {\n\tvar webhookResponse GetWebhookResponse\n\tjsonBody, err := json.Marshal(webhook)\n\tif err != nil {\n\t\treturn webhookResponse.Data, err\n\t}\n\treqBody := bytes.NewReader(jsonBody)\n\tbody, reqErr := s.client.DoRequest(http.MethodPost, \"/v3/hooks\", reqBody)\n\tif reqErr != nil {\n\t\treturn webhookResponse.Data, reqErr\n\t}\n\n\tjsonErr := json.Unmarshal(body, &webhookResponse)\n\tif jsonErr != nil {\n\t\treturn webhookResponse.Data, jsonErr\n\t}\n\n\treturn webhookResponse.Data, nil\n}",
"func (g *GitLab) Hook(ctx context.Context, req *http.Request) (*model.Repo, *model.Pipeline, error) {\n\tdefer req.Body.Close()\n\tpayload, err := io.ReadAll(req.Body)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\teventType := gitlab.WebhookEventType(req)\n\tparsed, err := gitlab.ParseWebhook(eventType, payload)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tswitch event := parsed.(type) {\n\tcase *gitlab.MergeEvent:\n\t\tmergeIID, repo, pipeline, err := convertMergeRequestHook(event, req)\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\n\t\tif pipeline, err = g.loadChangedFilesFromMergeRequest(ctx, repo, pipeline, mergeIID); err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\n\t\treturn repo, pipeline, nil\n\tcase *gitlab.PushEvent:\n\t\treturn convertPushHook(event)\n\tcase *gitlab.TagEvent:\n\t\treturn convertTagHook(event)\n\tdefault:\n\t\treturn nil, nil, &types.ErrIgnoreEvent{Event: string(eventType)}\n\t}\n}",
"func convertFromHookEvents(from scm.HookEvents, to *hook) {\n\tif from.Push {\n\t\tto.PushEvents = true\n\t}\n\tif from.PullRequest {\n\t\tto.MergeRequestsEvents = true\n\t}\n\tif from.Issue {\n\t\tto.IssuesEvents = true\n\t}\n\tif from.IssueComment || from.PullRequestComment || from.ReviewComment {\n\t\tto.NoteEvents = true\n\t}\n\tif from.Tag {\n\t\tto.TagPushEvents = true\n\t}\n}",
"func (d hook) toSpec() *specs.Hook {\n\ts := specs.Hook{\n\t\tHookName: d.Lifecycle,\n\t\tPath: d.Path,\n\t\tArgs: d.Args,\n\t}\n\n\treturn &s\n}",
"func CreateWebhook(user string, repo string, accesstoken string, webhookUrl string, secret string) (int, error) {\n\tdata := user + \":\" + accesstoken\n\tsEnc := base64.StdEncoding.EncodeToString([]byte(data))\n\tname := \"web\"\n\tactive := true\n\thook := github.Hook{\n\t\tName: &name,\n\t\tActive: &active,\n\t\tConfig: make(map[string]interface{}),\n\t\tEvents: []string{\"push\"},\n\t}\n\n\thook.Config[\"url\"] = webhookUrl\n\thook.Config[\"content_type\"] = \"json\"\n\thook.Config[\"secret\"] = secret\n\thook.Config[\"insecure_ssl\"] = \"1\"\n\n\tlogrus.Infof(\"hook to create:%v\", hook)\n\tb := new(bytes.Buffer)\n\tjson.NewEncoder(b).Encode(hook)\n\thc := http.Client{}\n\tAPIURL := fmt.Sprintf(\"https://api.github.com/repos/%v/%v/hooks\", user, repo)\n\treq, err := http.NewRequest(\"POST\", APIURL, b)\n\n\treq.Header.Add(\"Authorization\", \"Basic \"+sEnc)\n\n\tresp, err := hc.Do(req)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\trespData, err := ioutil.ReadAll(resp.Body)\n\tlogrus.Infof(\"respData:%v\", string(respData))\n\tif resp.StatusCode > 399 {\n\t\treturn -1, errors.New(string(respData))\n\t}\n\terr = json.Unmarshal(respData, &hook)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\treturn hook.GetID(), err\n}",
"func (z *Client) CreateWebhook(ctx context.Context, hook *Webhook) (*Webhook, error) {\n\tvar data, result struct {\n\t\tWebhook *Webhook `json:\"webhook\"`\n\t}\n\tdata.Webhook = hook\n\n\tbody, err := z.post(ctx, \"/webhooks\", data)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\terr = json.Unmarshal(body, &result)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn result.Webhook, nil\n}",
"func (g *GitHub) CreateHook(service *api.Service) error {\n\twebhooktype := service.Repository.Webhook\n\tif webhooktype == \"\" {\n\t\treturn fmt.Errorf(\"no need webhook registry\")\n\t}\n\n\tif webhooktype == api.GITHUB {\n\t\turl := getHookURL(webhooktype, service.ServiceID)\n\t\tif url == \"\" {\n\t\t\tlog.Infof(\"url is empty\", log.Fields{\"user_id\": service.UserID})\n\t\t\treturn nil\n\t\t}\n\n\t\tds := store.NewStore()\n\t\tdefer ds.Close()\n\n\t\ttok, err := ds.FindtokenByUserID(service.UserID, api.GITHUB)\n\t\tif err != nil {\n\t\t\tlog.ErrorWithFields(\"find token failed\", log.Fields{\"user_id\": service.UserID, \"error\": err})\n\t\t\treturn err\n\t\t}\n\n\t\tts := oauth2.StaticTokenSource(\n\t\t\t&oauth2.Token{AccessToken: tok.Vsctoken.AccessToken},\n\t\t)\n\t\ttc := oauth2.NewClient(oauth2.NoContext, ts)\n\t\tclient := github.NewClient(tc)\n\n\t\tvar hook github.Hook\n\t\thook.Name = github.String(\"web\")\n\t\thook.Events = []string{\"push\", \"pull_request\"}\n\t\thook.Config = map[string]interface{}{}\n\t\thook.Config[\"url\"] = url\n\t\thook.Config[\"content_type\"] = \"json\"\n\t\tonwer, name := parseURL(service.Repository.URL)\n\t\t_, _, err = client.Repositories.CreateHook(onwer, name, &hook)\n\t\treturn err\n\t}\n\tlog.WarnWithFields(\"not support vcs repository\", log.Fields{\"vcs repository\": webhooktype})\n\treturn fmt.Errorf(\"not support vcs repository in create webhook\")\n}",
"func (b *Bot) Webhook() (*Webhook, error) {\n\tdata, err := b.Raw(\"getWebhookInfo\", nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar resp struct {\n\t\tResult Webhook\n\t}\n\tif err := json.Unmarshal(data, &resp); err != nil {\n\t\treturn nil, wrapError(err)\n\t}\n\treturn &resp.Result, nil\n}",
"func NewConverter(webhook WebhookConverter) *converter {\n\treturn &converter{webhook: webhook}\n}",
"func ParseHook(r *http.Request, secret string, client *authentication.Client) (*GeneralizedResult, error) {\n\thook, err := githubWebhook.New(githubWebhook.Options.Secret(secret))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tpayload, err := hook.Parse(r, githubWebhook.PushEvent, githubWebhook.PullRequestEvent)\n\tif err != nil {\n\t\tif err == githubWebhook.ErrEventNotFound {\n\t\t\t// This happens if the webhook sends an event that is not push or pull-request.\n\t\t\tfmt.Println(\"This event is neither a Push nor a Pull-request.\\n\", err)\n\t\t}\n\t\treturn nil, err\n\t}\n\n\tvar result *GeneralizedResult\n\n\tswitch p := payload.(type) {\n\n\tcase githubWebhook.PushPayload:\n\t\tfmt.Println(\"Receiving Push-Payload.\")\n\t\tresult, err = parseHookPush(p, client)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tresult.Number = 0 // 0 meaning push. If pull-request, this is a non-negative non-zero number.\n\n\tcase githubWebhook.PullRequestPayload:\n\t\tfmt.Println(\"Receiving Pull-Request-Payload.\")\n\t\tresult, err = parseHookPullRequest(r.Context(), p, client)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn result, nil\n}",
"func (trello *Trello) EnsureHook(callbackURL string) {\n /* Check if we have a hook already */\n var data []webhookInfo\n GenGET(trello, \"/token/\" + trello.Token + \"/webhooks/\", &data)\n found := false\n\n for _, v := range data {\n /* Check if we have a hook for our own URL at same model */\n if v.Model == trello.BoardId {\n if v.URL == callbackURL {\n log.Print(\"Hook found, nothing to do here.\")\n found = true\n break\n }\n }\n }\n\n /* If not, install one */\n if !found {\n /* TODO: save hook reference and uninstall maybe? */\n GenPOSTForm(trello, \"/webhooks/\", nil, url.Values{\n \"name\": { \"trellohub for \" + trello.BoardId },\n \"idModel\": { trello.BoardId },\n \"callbackURL\": { callbackURL } })\n\n log.Print(\"Webhook installed.\")\n } else {\n log.Print(\"Reusing existing webhook.\")\n }\n}",
"func NewObjectConverterWebhookHandler(t *testing.T, converterFunc ObjectConverterFunc) http.Handler {\n\treturn NewReviewWebhookHandler(t, func(review *apiextensionsv1beta1.ConversionReview) (*apiextensionsv1beta1.ConversionReview, error) {\n\t\tconverted := []runtime.RawExtension{}\n\t\terrMsgs := []string{}\n\t\tfor _, obj := range review.Request.Objects {\n\t\t\tconvertedObj, err := converterFunc(review.Request.DesiredAPIVersion, obj)\n\t\t\tif err != nil {\n\t\t\t\terrMsgs = append(errMsgs, err.Error())\n\t\t\t}\n\n\t\t\tconverted = append(converted, convertedObj)\n\t\t}\n\n\t\treview.Response = &apiextensionsv1beta1.ConversionResponse{\n\t\t\tUID: review.Request.UID,\n\t\t\tConvertedObjects: converted,\n\t\t}\n\t\tif len(errMsgs) == 0 {\n\t\t\treview.Response.Result = metav1.Status{Status: \"Success\"}\n\t\t} else {\n\t\t\treview.Response.Result = metav1.Status{Status: \"Failure\", Message: strings.Join(errMsgs, \", \")}\n\t\t}\n\t\treturn review, nil\n\t}, func(review *apiextensionsv1.ConversionReview) (*apiextensionsv1.ConversionReview, error) {\n\t\tconverted := []runtime.RawExtension{}\n\t\terrMsgs := []string{}\n\t\tfor _, obj := range review.Request.Objects {\n\t\t\tconvertedObj, err := converterFunc(review.Request.DesiredAPIVersion, obj)\n\t\t\tif err != nil {\n\t\t\t\terrMsgs = append(errMsgs, err.Error())\n\t\t\t}\n\n\t\t\tconverted = append(converted, convertedObj)\n\t\t}\n\n\t\treview.Response = &apiextensionsv1.ConversionResponse{\n\t\t\tUID: review.Request.UID,\n\t\t\tConvertedObjects: converted,\n\t\t}\n\t\tif len(errMsgs) == 0 {\n\t\t\treview.Response.Result = metav1.Status{Status: \"Success\"}\n\t\t} else {\n\t\t\treview.Response.Result = metav1.Status{Status: \"Failure\", Message: strings.Join(errMsgs, \", \")}\n\t\t}\n\t\treturn review, nil\n\t})\n}",
"func handleNewHook(resp http.ResponseWriter, request *http.Request) {\n\tcors := handleCors(resp, request)\n\tif cors {\n\t\treturn\n\t}\n\n\tuser, err := handleApiAuthentication(resp, request)\n\tif err != nil {\n\t\tlog.Printf(\"Api authentication failed in set new workflowhandler: %s\", err)\n\t\tresp.WriteHeader(401)\n\t\tresp.Write([]byte(`{\"success\": false}`))\n\t\treturn\n\t}\n\n\ttype requestData struct {\n\t\tType string `json:\"type\"`\n\t\tDescription string `json:\"description\"`\n\t\tId string `json:\"id\"`\n\t\tName string `json:\"name\"`\n\t\tWorkflow string `json:\"workflow\"`\n\t}\n\n\tbody, err := ioutil.ReadAll(request.Body)\n\tif err != nil {\n\t\tlog.Printf(\"Body data error: %s\", err)\n\t\tresp.WriteHeader(401)\n\t\tresp.Write([]byte(`{\"success\": false}`))\n\t\treturn\n\t}\n\n\tlog.Println(\"Data: %s\", string(body))\n\n\tctx := context.Background()\n\tvar requestdata requestData\n\terr = yaml.Unmarshal([]byte(body), &requestdata)\n\tif err != nil {\n\t\tlog.Printf(\"Failed unmarshaling inputdata: %s\", err)\n\t\tresp.WriteHeader(401)\n\t\tresp.Write([]byte(`{\"success\": false}`))\n\t\treturn\n\t}\n\tlog.Printf(\"%#v\", requestdata)\n\n\t// CBA making a real thing. Already had some code lol\n\tnewId := requestdata.Id\n\tif len(newId) != 36 {\n\t\tlog.Printf(\"Bad ID\")\n\t\tresp.WriteHeader(401)\n\t\tresp.Write([]byte(`{\"success\": false, \"reason\": \"Invalid ID\"}`))\n\t\treturn\n\t}\n\n\tif requestdata.Id == \"\" || requestdata.Name == \"\" {\n\t\tresp.WriteHeader(401)\n\t\tresp.Write([]byte(`{\"success\": false, \"reason\": \"Requires fields id and name can't be empty\"}`))\n\t\treturn\n\n\t}\n\n\tvalidTypes := []string{\n\t\t\"webhook\",\n\t}\n\n\tisTypeValid := false\n\tfor _, thistype := range validTypes {\n\t\tif requestdata.Type == thistype {\n\t\t\tisTypeValid = true\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif !(isTypeValid) {\n\t\tlog.Printf(\"Type %s is not valid. Try any of these: %s\", requestdata.Type, strings.Join(validTypes, \", \"))\n\t\tresp.WriteHeader(401)\n\t\tresp.Write([]byte(`{\"success\": false}`))\n\t\treturn\n\t}\n\n\thook := Hook{\n\t\tId: newId,\n\t\tWorkflows: []string{requestdata.Workflow},\n\t\tInfo: Info{\n\t\t\tName: requestdata.Name,\n\t\t\tDescription: requestdata.Description,\n\t\t\tUrl: fmt.Sprintf(\"https://shuffler.io/functions/webhooks/webhook_%s\", newId),\n\t\t},\n\t\tType: \"webhook\",\n\t\tOwner: user.Username,\n\t\tStatus: \"uninitialized\",\n\t\tActions: []HookAction{\n\t\t\tHookAction{\n\t\t\t\tType: \"workflow\",\n\t\t\t\tName: requestdata.Name,\n\t\t\t\tId: requestdata.Workflow,\n\t\t\t\tField: \"\",\n\t\t\t},\n\t\t},\n\t\tRunning: false,\n\t}\n\n\tlog.Printf(\"Hello\")\n\n\t// FIXME: Add cloud function execution?\n\t//b, err := json.Marshal(hook)\n\t//if err != nil {\n\t//\tlog.Printf(\"Failed marshalling: %s\", err)\n\t//\tresp.WriteHeader(401)\n\t//\tresp.Write([]byte(`{\"success\": false}`))\n\t//\treturn\n\t//}\n\n\t//environmentVariables := map[string]string{\n\t//\t\"FUNCTION_APIKEY\": user.ApiKey,\n\t//\t\"CALLBACKURL\": \"https://shuffler.io\",\n\t//\t\"HOOKID\": hook.Id,\n\t//}\n\n\t//applocation := fmt.Sprintf(\"gs://%s/triggers/webhook.zip\", bucketName)\n\t//hookname := fmt.Sprintf(\"webhook_%s\", hook.Id)\n\t//err = deployWebhookFunction(ctx, hookname, defaultLocation, applocation, environmentVariables)\n\t//if err != nil {\n\t//\tlog.Printf(\"Error deploying hook: %s\", err)\n\t//\tresp.WriteHeader(401)\n\t//\tresp.Write([]byte(fmt.Sprintf(`{\"success\": false, \"reason\": \"Issue with starting hook. Please wait a second and try again\"}`)))\n\t//\treturn\n\t//}\n\n\thook.Status = \"running\"\n\thook.Running = true\n\terr = setHook(ctx, hook)\n\tif err != nil {\n\t\tlog.Printf(\"Failed setting hook: %s\", err)\n\t\tresp.WriteHeader(401)\n\t\tresp.Write([]byte(`{\"success\": false}`))\n\t\treturn\n\t}\n\n\terr = increaseStatisticsField(ctx, \"total_workflow_triggers\", requestdata.Workflow, 1)\n\tif err != nil {\n\t\tlog.Printf(\"Failed to increase total workflows: %s\", err)\n\t}\n\n\tlog.Println(\"Generating new hook\")\n\tresp.WriteHeader(200)\n\tresp.Write([]byte(`{\"success\": true}`))\n}",
"func insertHook(db gorp.SqlExecutor, node *sdk.WorkflowNode, hook *sdk.WorkflowNodeHook) error {\n\thook.WorkflowNodeID = node.ID\n\tif hook.WorkflowHookModelID == 0 {\n\t\thook.WorkflowHookModelID = hook.WorkflowHookModel.ID\n\t}\n\n\tvar icon string\n\tif hook.WorkflowHookModelID != 0 {\n\t\ticon = hook.WorkflowHookModel.Icon\n\t\tmodel, errm := LoadHookModelByID(db, hook.WorkflowHookModelID)\n\t\tif errm != nil {\n\t\t\treturn sdk.WrapError(errm, \"insertHook> Unable to load model %d\", hook.WorkflowHookModelID)\n\t\t}\n\t\thook.WorkflowHookModel = *model\n\t} else {\n\t\tmodel, errm := LoadHookModelByName(db, hook.WorkflowHookModel.Name)\n\t\tif errm != nil {\n\t\t\treturn sdk.WrapError(errm, \"insertHook> Unable to load model %s\", hook.WorkflowHookModel.Name)\n\t\t}\n\t\thook.WorkflowHookModel = *model\n\t}\n\thook.WorkflowHookModelID = hook.WorkflowHookModel.ID\n\n\t//TODO: to delete when all previous scheduler are updated\n\tif _, ok := hook.Config[\"payload\"]; hook.WorkflowHookModel.Name == sdk.SchedulerModelName && !ok {\n\t\thook.Config[\"payload\"] = sdk.SchedulerModel.DefaultConfig[\"payload\"]\n\t}\n\n\terrmu := sdk.MultiError{}\n\t// Check configuration of the hook vs the model\n\tfor k := range hook.WorkflowHookModel.DefaultConfig {\n\t\tif _, ok := hook.Config[k]; !ok {\n\t\t\terrmu = append(errmu, fmt.Errorf(\"Missing configuration key: %s\", k))\n\t\t}\n\t}\n\tif len(errmu) > 0 {\n\t\treturn sdk.WrapError(&errmu, \"insertHook> Invalid hook configuration\")\n\t}\n\n\t// if it's a new hook\n\tif hook.UUID == \"\" {\n\t\tuuid, erruuid := sessionstore.NewSessionKey()\n\t\tif erruuid != nil {\n\t\t\treturn sdk.WrapError(erruuid, \"insertHook> Unable to load model %d\", hook.WorkflowHookModelID)\n\t\t}\n\t\thook.UUID = string(uuid)\n\n\t\thook.Config[\"hookIcon\"] = sdk.WorkflowNodeHookConfigValue{\n\t\t\tValue: icon,\n\t\t\tConfigurable: false,\n\t\t}\n\t}\n\n\tdbhook := NodeHook(*hook)\n\tif err := db.Insert(&dbhook); err != nil {\n\t\treturn sdk.WrapError(err, \"insertHook> Unable to insert hook\")\n\t}\n\t*hook = sdk.WorkflowNodeHook(dbhook)\n\treturn nil\n}",
"func SendHook(payload Hook, url string) {\n\t// Martshaling incoming payload\n\tbody, jsonErr := json.Marshal(payload)\n\tif jsonErr != nil {\n\t\tlog.Println(\"Error in sending Discord hook\", jsonErr)\n\t}\n\n\t// Create http client\n\tclient := http.Client{}\n\n\t// Set request information for discord webhook\n\trequest, discordErr := http.NewRequest(\"POST\", url, bytes.NewBuffer(body))\n\trequest.Header.Set(\"Content-Type\", \"application/json\")\n\tif discordErr != nil {\n\t\tlog.Println(\"Error in sending Discord hook\", discordErr)\n\t\treturn\n\t}\n\n\t// Do client request\n\tres, doErr := client.Do(request)\n\tif doErr != nil {\n\t\tlog.Println(\"Error in sending Discord hook\", doErr)\n\t\treturn\n\t}\n\tdefer res.Body.Close()\n}",
"func NewWebhook(db *sqlx.DB) *Webhook {\n\treturn &Webhook{db: db}\n}",
"func (c *ApiService) CreateWebhook(ServiceSid string, params *CreateWebhookParams) (*VerifyV2Webhook, error) {\n\tpath := \"/v2/Services/{ServiceSid}/Webhooks\"\n\tpath = strings.Replace(path, \"{\"+\"ServiceSid\"+\"}\", ServiceSid, -1)\n\n\tdata := url.Values{}\n\theaders := make(map[string]interface{})\n\n\tif params != nil && params.FriendlyName != nil {\n\t\tdata.Set(\"FriendlyName\", *params.FriendlyName)\n\t}\n\tif params != nil && params.EventTypes != nil {\n\t\tfor _, item := range *params.EventTypes {\n\t\t\tdata.Add(\"EventTypes\", item)\n\t\t}\n\t}\n\tif params != nil && params.WebhookUrl != nil {\n\t\tdata.Set(\"WebhookUrl\", *params.WebhookUrl)\n\t}\n\tif params != nil && params.Status != nil {\n\t\tdata.Set(\"Status\", *params.Status)\n\t}\n\tif params != nil && params.Version != nil {\n\t\tdata.Set(\"Version\", *params.Version)\n\t}\n\n\tresp, err := c.requestHandler.Post(c.baseURL+path, data, headers)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tdefer resp.Body.Close()\n\n\tps := &VerifyV2Webhook{}\n\tif err := json.NewDecoder(resp.Body).Decode(ps); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn ps, err\n}",
"func CreateHook(db DB, gameID string, eventType int, url string) (*Hook, error) {\n\thook := GetHookByDetails(db, gameID, eventType, url)\n\n\tif hook != nil {\n\t\treturn hook, nil\n\t}\n\n\tpublicID := uuid.NewV4().String()\n\thook = &Hook{\n\t\tGameID: gameID,\n\t\tPublicID: publicID,\n\t\tEventType: eventType,\n\t\tURL: url,\n\t}\n\terr := db.Insert(hook)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn hook, nil\n}",
"func (this WebhookFunc) Handle(log logger.LogContext, version string, obj runtime.RawExtension) (runtime.Object, error) {\n\treturn this(log, version, obj)\n}",
"func (c *client) Hook(r *http.Request) (*model.Repo, *model.Build, error) {\n\treturn parseHook(r)\n}",
"func (c *Client) Webhook(id int) (*Webhook, error) {\n\tvar res Webhook\n\terr := c.get(c.baseURL+fmt.Sprintf(\"/webhooks/%d\", id), &res)\n\n\treturn &res, err\n}",
"func testHook() *Hook {\n\treturn &Hook{\n\t\tID: sql.NullInt64{Int64: 1, Valid: true},\n\t\tRepoID: sql.NullInt64{Int64: 1, Valid: true},\n\t\tBuildID: sql.NullInt64{Int64: 1, Valid: true},\n\t\tNumber: sql.NullInt32{Int32: 1, Valid: true},\n\t\tSourceID: sql.NullString{String: \"c8da1302-07d6-11ea-882f-4893bca275b8\", Valid: true},\n\t\tCreated: sql.NullInt64{Int64: time.Now().UTC().Unix(), Valid: true},\n\t\tHost: sql.NullString{String: \"github.com\", Valid: true},\n\t\tEvent: sql.NullString{String: \"push\", Valid: true},\n\t\tEventAction: sql.NullString{String: \"\", Valid: false},\n\t\tBranch: sql.NullString{String: \"master\", Valid: true},\n\t\tError: sql.NullString{String: \"\", Valid: false},\n\t\tStatus: sql.NullString{String: \"success\", Valid: true},\n\t\tLink: sql.NullString{String: \"https://github.com/github/octocat/settings/hooks/1\", Valid: true},\n\t\tWebhookID: sql.NullInt64{Int64: 123456, Valid: true},\n\t}\n}",
"func New(req *http.Request) (hook *Hook, err error) {\n\thook = new(Hook)\n\tif !strings.EqualFold(req.Method, \"POST\") {\n\t\treturn nil, errors.New(\"unknown method\")\n\t}\n\n\tif hook.Signature = req.Header.Get(\"X-ChatWorkWebhookSignature\"); len(hook.Signature) == 0 {\n\t\treturn nil, errors.New(\"no signature\")\n\t}\n\n\thook.RawPayload, err = ioutil.ReadAll(req.Body)\n\treturn\n}",
"func (t *TauAPI) CreateWebhook(webhook Webhook) (ID int64, error error) {\n\tjsonPostMsg, _ := json.Marshal(webhook)\n\tjsonData, err := t.doTauRequest(&TauReq{\n\t\tVersion: 2,\n\t\tMethod: \"POST\",\n\t\tPath: \"webhooks/webhooks\",\n\t\tNeedsAuth: true,\n\t\tPostMsg: jsonPostMsg,\n\t})\n\tif err != nil {\n\t\treturn 0, nil\n\t}\n\tif string(jsonData) == \"[\\\"Limit reached\\\"]\" {\n\t\treturn 0, fmt.Errorf(\"Limit of webhooks reached (5)\")\n\t}\n\tvar d struct {\n\t\tID int64 `json:\"id\"`\n\t}\n\tif err := json.Unmarshal(jsonData, &d); err != nil {\n\t\treturn 0, fmt.Errorf(\"CreateWebhook -> unmarshal jsonData %v\", err)\n\t}\n\treturn d.ID, nil\n}",
"func (c *config) Hook(req *http.Request) (*model.Repo, *model.Build, error) {\n\treturn parseHook(req)\n}",
"func ToMessageResponse(hookName Hook, rawData []byte) (proto.Message, error) {\n\tswitch hookName {\n\t//case UserCSS:\n\t//\tvar msg payloads.UserCSS\n\t//\terr := proto.Unmarshal(rawData, &msg)\n\t//\treturn &msg, err\n\tdefault:\n\t\tvar msg payloads.Custom\n\t\terr := proto.Unmarshal(rawData, &msg)\n\t\treturn &msg, err\n\t}\n}",
"func (c *Identity) WebHook() Hook {\n\treturn Hook{\n\t\tavatarURL: c.AvatarURL,\n\t\tusername: c.Username,\n\t\twebHookURL: c.WebHookURL,\n\t}\n}",
"func (c *Client) CreateWebhook(ctx context.Context, repo bitbucket.Repo, hook bitbucket.Webhook) (bitbucket.Webhook, error) {\n\tmarshalledPayload, err := json.Marshal(hook)\n\tif err != nil {\n\t\treturn bitbucket.Webhook{}, err\n\t}\n\n\turl := c.BaseURL + fmt.Sprintf(\"/rest/api/1.0/projects/%s/repos/%s/webhooks\",\n\t\turl.PathEscape(repo.ProjectKey), url.PathEscape(repo.Repo))\n\n\treq, err := http.NewRequestWithContext(ctx, http.MethodPost, url, bytes.NewBuffer(marshalledPayload))\n\tif err != nil {\n\t\treturn bitbucket.Webhook{}, err\n\t}\n\n\tvar response bitbucket.Webhook\n\tif err := c.sendRequest(req, &response); err != nil {\n\t\treturn bitbucket.Webhook{}, err\n\t}\n\treturn response, nil\n}",
"func parseWebhook(r *http.Request) (payload interface{}, err error) {\n\teventType := r.Header.Get(EventTypeHeader)\n\tswitch eventType {\n\tcase PostCommitEvent:\n\t\tpayload = &PostCommit{}\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"event type %v not support\", eventType)\n\t}\n\n\tbody, err := ioutil.ReadAll(r.Body)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"fail to read request body\")\n\t}\n\n\tif err := json.Unmarshal(body, &payload); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn payload, nil\n}",
"func (s *WebhookServiceOp) Create(ctx context.Context, webhook Webhook) (*Webhook, error) {\n\tpath := fmt.Sprintf(\"%s.json\", webhooksBasePath)\n\twrappedData := WebhookResource{Webhook: &webhook}\n\tresource := new(WebhookResource)\n\terr := s.client.Post(ctx, path, wrappedData, resource)\n\treturn resource.Webhook, err\n}",
"func (s *WebhooksService) CreateWebhook(webhookCreateRequest *WebhookCreateRequest) (*Webhook, *resty.Response, error) {\n\n\tpath := \"/webhooks/\"\n\n\tresponse, err := s.client.R().\n\t\tSetBody(webhookCreateRequest).\n\t\tSetResult(&Webhook{}).\n\t\tSetError(&Error{}).\n\t\tPost(path)\n\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tresult := response.Result().(*Webhook)\n\treturn result, response, err\n\n}",
"func (o *ProjectWebhook) ToMap() map[string]interface{} {\n\to.setDefaults(false)\n\treturn map[string]interface{}{\n\t\t\"created_ts\": toProjectWebhookObject(o.CreatedAt, false),\n\t\t\"customer_id\": toProjectWebhookObject(o.CustomerID, false),\n\t\t\"enabled\": toProjectWebhookObject(o.Enabled, false),\n\t\t\"error_message\": toProjectWebhookObject(o.ErrorMessage, true),\n\t\t\"errored\": toProjectWebhookObject(o.Errored, false),\n\t\t\"id\": toProjectWebhookObject(o.ID, false),\n\t\t\"integration_instance_id\": toProjectWebhookObject(o.IntegrationInstanceID, true),\n\t\t\"project_id\": toProjectWebhookObject(o.ProjectID, false),\n\t\t\"ref_id\": toProjectWebhookObject(o.RefID, false),\n\t\t\"ref_type\": toProjectWebhookObject(o.RefType, false),\n\t\t\"updated_ts\": toProjectWebhookObject(o.UpdatedAt, false),\n\t\t\"url\": toProjectWebhookObject(o.URL, true),\n\t\t\"hashcode\": toProjectWebhookObject(o.Hashcode, false),\n\t}\n}",
"func (w Webhook) Create(ctx context.Context, webhook *postmand.Webhook) error {\n\tquery, args := insertQuery(\"webhooks\", webhook)\n\t_, err := w.db.ExecContext(ctx, query, args...)\n\treturn err\n}",
"func (c *Client) CreateWebhook(req CreateWebhookReq) (Webhook, error) {\n\tvar res Webhook\n\terr := c.post(c.baseURL+\"/webhooks\", webhookReq{Webhook: req}, &res)\n\n\treturn res, err\n}",
"func CreateHookAPI(strModule, strProcName string, pDetour, ppOriginal uintptr) (err error) {\r\n\tret, _, _ := syscall.Syscall6(\r\n\t\tuintptr(C.MH_CreateHookApi),\r\n\t\t4,\r\n\t\tuintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(strModule))),\r\n\t\tuintptr(unsafe.Pointer(C.CString(strProcName))),\r\n\t\tpDetour,\r\n\t\tppOriginal,\r\n\t\t0, 0,\r\n\t)\r\n\treturn _Status(ret).ToError()\r\n}",
"func (w *WebhookServiceOp) Create(webhook Webhook) (*Webhook, error) {\n\tpath := fmt.Sprintf(\"%s\", webhooksBasePath)\n\tresource := new(Webhook)\n\terr := w.client.Post(path, webhook, &resource)\n\treturn resource, err\n}",
"func New(\n\tctx context.Context,\n\tcontrollers []interface{},\n) (webhook *Webhook, err error) {\n\n\t// ServeMux.Handle panics on duplicate paths\n\tdefer func() {\n\t\tif r := recover(); r != nil {\n\t\t\terr = fmt.Errorf(\"error creating webhook %v\", r)\n\t\t}\n\t}()\n\n\topts := GetOptions(ctx)\n\tif opts == nil {\n\t\treturn nil, errors.New(\"context must have Options specified\")\n\t}\n\tlogger := logging.FromContext(ctx)\n\n\tif opts.StatsReporter == nil {\n\t\treporter, err := NewStatsReporter()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\topts.StatsReporter = reporter\n\t}\n\n\tdefaultTLSMinVersion := uint16(tls.VersionTLS13)\n\tif opts.TLSMinVersion == 0 {\n\t\topts.TLSMinVersion = TLSMinVersionFromEnv(defaultTLSMinVersion)\n\t} else if opts.TLSMinVersion != tls.VersionTLS12 && opts.TLSMinVersion != tls.VersionTLS13 {\n\t\treturn nil, fmt.Errorf(\"unsupported TLS version: %d\", opts.TLSMinVersion)\n\t}\n\n\tsyncCtx, cancel := context.WithCancel(context.Background())\n\n\twebhook = &Webhook{\n\t\tOptions: *opts,\n\t\tLogger: logger,\n\t\tsynced: cancel,\n\t}\n\n\tif opts.SecretName != \"\" {\n\t\t// Injection is too aggressive for this case because by simply linking this\n\t\t// library we force consumers to have secret access. If we require that one\n\t\t// of the admission controllers' informers *also* require the secret\n\t\t// informer, then we can fetch the shared informer factory here and produce\n\t\t// a new secret informer from it.\n\t\tsecretInformer := kubeinformerfactory.Get(ctx).Core().V1().Secrets()\n\n\t\twebhook.tlsConfig = &tls.Config{\n\t\t\tMinVersion: opts.TLSMinVersion,\n\n\t\t\t// If we return (nil, error) the client sees - 'tls: internal error\"\n\t\t\t// If we return (nil, nil) the client sees - 'tls: no certificates configured'\n\t\t\t//\n\t\t\t// We'll return (nil, nil) when we don't find a certificate\n\t\t\tGetCertificate: func(*tls.ClientHelloInfo) (*tls.Certificate, error) {\n\t\t\t\tsecret, err := secretInformer.Lister().Secrets(system.Namespace()).Get(opts.SecretName)\n\t\t\t\tif err != nil {\n\t\t\t\t\tlogger.Errorw(\"failed to fetch secret\", zap.Error(err))\n\t\t\t\t\treturn nil, nil\n\t\t\t\t}\n\t\t\t\twebOpts := GetOptions(ctx)\n\t\t\t\tsKey, sCert := getSecretDataKeyNamesOrDefault(webOpts.ServerPrivateKeyName, webOpts.ServerCertificateName)\n\t\t\t\tserverKey, ok := secret.Data[sKey]\n\t\t\t\tif !ok {\n\t\t\t\t\tlogger.Warn(\"server key missing\")\n\t\t\t\t\treturn nil, nil\n\t\t\t\t}\n\t\t\t\tserverCert, ok := secret.Data[sCert]\n\t\t\t\tif !ok {\n\t\t\t\t\tlogger.Warn(\"server cert missing\")\n\t\t\t\t\treturn nil, nil\n\t\t\t\t}\n\t\t\t\tcert, err := tls.X509KeyPair(serverCert, serverKey)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\treturn &cert, nil\n\t\t\t},\n\t\t}\n\t}\n\n\twebhook.mux.HandleFunc(\"/\", func(w http.ResponseWriter, r *http.Request) {\n\t\thttp.Error(w, fmt.Sprint(\"no controller registered for: \", html.EscapeString(r.URL.Path)), http.StatusBadRequest)\n\t})\n\n\tfor _, controller := range controllers {\n\t\tswitch c := controller.(type) {\n\t\tcase AdmissionController:\n\t\t\thandler := admissionHandler(logger, opts.StatsReporter, c, syncCtx.Done())\n\t\t\twebhook.mux.Handle(c.Path(), handler)\n\n\t\tcase ConversionController:\n\t\t\thandler := conversionHandler(logger, opts.StatsReporter, c)\n\t\t\twebhook.mux.Handle(c.Path(), handler)\n\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"unknown webhook controller type: %T\", controller)\n\t\t}\n\t}\n\n\treturn\n}",
"func (c *EcomClient) CreateWebhook(ctx context.Context, p *CreateWebhookRequest) (*WebhookResponse, error) {\n\trequest, err := json.Marshal(&p)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%w: client: json marshal\", err)\n\t}\n\n\turl := c.endpoint + \"/webhooks\"\n\tbody := strings.NewReader(string(request))\n\tres, err := c.request(http.MethodPost, url, body)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%w: request\", err)\n\t}\n\tdefer res.Body.Close()\n\n\tif res.StatusCode >= 400 {\n\t\tvar e badRequestResponse\n\t\tdec := json.NewDecoder(res.Body)\n\t\tdec.DisallowUnknownFields()\n\t\tif err := dec.Decode(&e); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"%w: client decode\", err)\n\t\t}\n\t\treturn nil, fmt.Errorf(\"status: %d, code: %s, message: %s\", e.Status, e.Code, e.Message)\n\t}\n\n\tvar webhook WebhookResponse\n\tif err = json.NewDecoder(res.Body).Decode(&webhook); err != nil {\n\t\treturn nil, fmt.Errorf(\"%w: decode\", err)\n\t}\n\treturn &webhook, nil\n}",
"func CreateHook(ctx *context.APIContext) {\n\t// swagger:operation POST /user/hooks user userCreateHook\n\t// ---\n\t// summary: Create a hook\n\t// consumes:\n\t// - application/json\n\t// produces:\n\t// - application/json\n\t// parameters:\n\t// - name: body\n\t// in: body\n\t// required: true\n\t// schema:\n\t// \"$ref\": \"#/definitions/CreateHookOption\"\n\t// responses:\n\t// \"201\":\n\t// \"$ref\": \"#/responses/Hook\"\n\n\tutils.AddOwnerHook(\n\t\tctx,\n\t\tctx.Doer,\n\t\tweb.GetForm(ctx).(*api.CreateHookOption),\n\t)\n}",
"func (g *Gitlab) CreateWebHook(cfg *api.SCMConfig, repoURL string, webHook *scm.WebHook) error {\n\tif webHook == nil || len(webHook.Url) == 0 || len(webHook.Events) == 0 {\n\t\treturn fmt.Errorf(\"The webhook %v is not correct\", webHook)\n\t}\n\n\tclient, err := newGitlabClient(cfg.Server, cfg.Username, cfg.Token)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tenableState, disableState := true, false\n\t// Push event is enable for Gitlab webhook in default, so need to remove this default option.\n\thook := gitlab.AddProjectHookOptions{\n\t\tPushEvents: &disableState,\n\t}\n\n\tfor _, e := range webHook.Events {\n\t\tswitch e {\n\t\tcase scm.PullRequestEventType:\n\t\t\thook.MergeRequestsEvents = &enableState\n\t\tcase scm.PullRequestCommentEventType:\n\t\t\thook.NoteEvents = &enableState\n\t\tcase scm.PushEventType:\n\t\t\thook.PushEvents = &enableState\n\t\tcase scm.TagReleaseEventType:\n\t\t\thook.TagPushEvents = &enableState\n\t\tdefault:\n\t\t\tlog.Errorf(\"The event type %s is not supported, will be ignored\", e)\n\t\t\treturn nil\n\t\t}\n\t}\n\thook.URL = &webHook.Url\n\n\tonwer, name := parseURL(repoURL)\n\t_, _, err = client.Projects.AddProjectHook(onwer+\"/\"+name, &hook)\n\treturn err\n}",
"func (s *WebhooksServiceOp) Get(id int64, options ...interface{}) (Webhook, error) {\n\tvar webhookResponse GetWebhookResponse\n\tbody, reqErr := s.client.DoRequest(http.MethodGet, fmt.Sprintf(\"/v3/hooks/%d\", id), nil)\n\tif reqErr != nil {\n\t\treturn webhookResponse.Data, reqErr\n\t}\n\tjsonErr := json.Unmarshal(body, &webhookResponse)\n\tif jsonErr != nil {\n\t\treturn webhookResponse.Data, jsonErr\n\t}\n\treturn webhookResponse.Data, nil\n}",
"func (wh *Webhook) Create(accountId string, data map[string]interface{}, extraHeaders map[string]string) (map[string]interface{}, error) {\n\tif accountId != \"\" {\n\t\turl := fmt.Sprintf(\"/%s%s/%s%s\", constants.VERSION_V2, constants.ACCOUNT_URL, url.PathEscape(accountId), constants.WEBHOOK)\n\t\treturn wh.Request.Post(url, data, extraHeaders)\n\t}\n\turl := fmt.Sprintf(\"/%s%s\", constants.VERSION_V1, constants.WEBHOOK)\n\treturn wh.Request.Post(url, data, extraHeaders)\n}",
"func (o IntegrationSlackOutput) Webhook() pulumi.StringOutput {\n\treturn o.ApplyT(func(v *IntegrationSlack) pulumi.StringOutput { return v.Webhook }).(pulumi.StringOutput)\n}",
"func HandleHook(w http.ResponseWriter, req *http.Request) {\n\tpayload, err := ioutil.ReadAll(req.Body)\n\tif err != nil {\n\t\tlog.Printf(\"error reading request body: err=%s\\n\", err)\n\t\treturn\n\t}\n\n\tdefer req.Body.Close()\n\n\tgo func() {\n\t\tevent, err := github.ParseWebHook(github.WebHookType(req), payload)\n\t\tif err != nil {\n\t\t\tlog.Printf(\"could not parse webhook: err=%s\\n\", err)\n\t\t\treturn\n\t\t}\n\n\t\tswitch e := event.(type) {\n\t\tcase *github.PullRequestEvent:\n\t\t\tif *e.Action == \"opened\" || *e.Action == \"synchronize\" {\n\t\t\t\tlog.Println(\"GOING FOR PR\", *e.Action)\n\n\t\t\t\tstack, err := getStackByRepo(*e.Repo.Name, *e.Repo.Owner.Login)\n\t\t\t\tif err != nil {\n\t\t\t\t\tlog.Println(\"Cannot build container for\", *e.Repo.FullName, err.Error())\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tbuildID := generateRandomID()\n\t\t\t\tstack.Build = &storage.BuildModel{\n\t\t\t\t\tLatest: buildID,\n\t\t\t\t}\n\n\t\t\t\tgo updateStacks(*e.Repo.Owner.Login, stack)\n\n\t\t\t\tPush(ContainerRunParams{\n\t\t\t\t\tAWSAccess: os.Getenv(\"PIPELINE_DEPLOYER_ACCESS\"),\n\t\t\t\t\tAWSSecret: os.Getenv(\"PIPELINE_DEPLOYER_SECRET\"),\n\t\t\t\t\tBranch: getBranchFromRef(\"pr\"),\n\t\t\t\t\tBucket: stack.BucketID,\n\t\t\t\t\tRepo: stack.Repo.Name,\n\t\t\t\t\tCommit: *e.PullRequest.Head.SHA,\n\t\t\t\t\tCDN: stack.CDN.ID,\n\t\t\t\t\tUser: *e.Repo.Owner.Login,\n\t\t\t\t\tToken: GetUserToken(*e.Sender.Login),\n\t\t\t\t\tbuildID: buildID,\n\t\t\t\t\tPrID: strconv.Itoa(*e.Number),\n\t\t\t\t})\n\t\t\t}\n\n\t\tcase *github.ReleaseEvent:\n\t\t\tstack, err := getStackByRepo(*e.Repo.Name, *e.Repo.Owner.Login)\n\t\t\tif err != nil {\n\t\t\t\tlog.Println(\"Cannot build container for\", *e.Repo.FullName, err.Error())\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tawsAccess := os.Getenv(\"PIPELINE_DEPLOYER_ACCESS\")\n\t\t\tawsSecrect := os.Getenv(\"PIPELINE_DEPLOYER_SECRET\")\n\n\t\t\tif stack.IsThirdParty {\n\t\t\t\tuser, err := storage.Store.User.Get(*e.Repo.Owner.Login)\n\t\t\t\tif err != nil {\n\t\t\t\t\tlog.Println(\"Cannot build container for\", err.Error())\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tawsAccess = user.ThirdPartyAWS.AccessKey\n\t\t\t\tawsSecrect = user.ThirdPartyAWS.SecretKey\n\t\t\t}\n\n\t\t\tbuildID := generateRandomID()\n\t\t\tstack.Build = &storage.BuildModel{\n\t\t\t\tLatest: buildID,\n\t\t\t}\n\n\t\t\tgo updateStacks(*e.Repo.Owner.Login, stack)\n\n\t\t\tif *e.Action == githubActionReleased {\n\t\t\t\tPush(ContainerRunParams{\n\t\t\t\t\tAWSAccess: awsAccess,\n\t\t\t\t\tAWSSecret: awsSecrect,\n\t\t\t\t\tBranch: getBranchFromRef(*e.Release.TargetCommitish) + \":tag\",\n\t\t\t\t\tBucket: stack.BucketID,\n\t\t\t\t\tRepo: stack.Repo.Name,\n\t\t\t\t\tCDN: stack.CDN.ID,\n\t\t\t\t\tUser: *e.Repo.Owner.Login,\n\t\t\t\t\tToken: GetUserToken(*e.Sender.Login),\n\t\t\t\t\tbuildID: buildID,\n\t\t\t\t})\n\t\t\t}\n\n\t\tcase *github.PushEvent:\n\t\t\tif strings.Contains(*e.Ref, \"tags\") {\n\t\t\t\tlog.Println(\"Skipping because TAG\")\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tstack, err := getStackByRepo(*e.Repo.Name, *e.Repo.Owner.Name)\n\t\t\tif err != nil {\n\t\t\t\tlog.Println(\"Cannot build container for\", *e.Repo.FullName, err.Error())\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tawsAccess := os.Getenv(\"PIPELINE_DEPLOYER_ACCESS\")\n\t\t\tawsSecrect := os.Getenv(\"PIPELINE_DEPLOYER_SECRET\")\n\n\t\t\tif stack.IsThirdParty {\n\t\t\t\tuser, err := storage.Store.User.Get(*e.Repo.Owner.Name)\n\t\t\t\tif err != nil {\n\t\t\t\t\tlog.Println(\"Cannot build container for\", err.Error())\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tawsAccess = user.ThirdPartyAWS.AccessKey\n\t\t\t\tawsSecrect = user.ThirdPartyAWS.SecretKey\n\t\t\t}\n\n\t\t\tbuildID := generateRandomID()\n\t\t\tstack.Build = &storage.BuildModel{\n\t\t\t\tLatest: buildID,\n\t\t\t}\n\t\t\tgo updateStacks(*e.Repo.Owner.Name, stack)\n\n\t\t\tPush(ContainerRunParams{\n\t\t\t\tAWSAccess: awsAccess,\n\t\t\t\tAWSSecret: awsSecrect,\n\t\t\t\tBranch: getBranchFromRef(*e.Ref),\n\t\t\t\tCommit: *e.After,\n\t\t\t\tBucket: stack.BucketID,\n\t\t\t\tRepo: stack.Repo.Name,\n\t\t\t\tCDN: stack.CDN.ID,\n\t\t\t\tUser: *e.Repo.Owner.Name,\n\t\t\t\tToken: GetUserToken(*e.Pusher.Name),\n\t\t\t\tbuildID: buildID,\n\t\t\t})\n\n\t\tdefault:\n\t\t\tlog.Printf(\"unknown event type %s\\n\", github.WebHookType(req))\n\t\t\treturn\n\t\t}\n\t}()\n\n\tw.WriteHeader(200)\n}",
"func (s *WebhooksServiceOp) List(options ...interface{}) ([]Webhook, error) {\n\twebhookListResponse := ListWebhookResponse{}\n\tbody, reqErr := s.client.DoRequest(http.MethodGet, \"/v3/hooks\", nil)\n\tif reqErr != nil {\n\t\treturn webhookListResponse.Data, reqErr\n\t}\n\tjsonErr := json.Unmarshal(body, &webhookListResponse)\n\tif jsonErr != nil {\n\t\treturn webhookListResponse.Data, jsonErr\n\t}\n\treturn webhookListResponse.Data, nil\n}",
"func (g *V3) CreateWebhook(repo string, webhook *scm.Webhook) error {\n\tif webhook == nil || len(webhook.URL) == 0 || len(webhook.Events) == 0 {\n\t\treturn fmt.Errorf(\"The webhook %v is not correct\", webhook)\n\t}\n\n\t_, err := g.GetWebhook(repo, webhook.URL)\n\tif err != nil {\n\t\tif !cerr.ErrorContentNotFound.Derived(err) {\n\t\t\treturn err\n\t\t}\n\n\t\thook := generateV3ProjectHook(webhook)\n\t\t_, resp, err := g.client.Projects.AddProjectHook(repo, hook)\n\t\tif err != nil {\n\t\t\treturn convertGitlabError(err, resp)\n\t\t}\n\t\treturn nil\n\t}\n\n\tlog.Warningf(\"Webhook already existed: %+v\", webhook)\n\treturn err\n}",
"func (w vwh) Process(appMeta helmify.AppMetadata, obj *unstructured.Unstructured) (bool, helmify.Template, error) {\n\tif obj.GroupVersionKind() != vwhGVK {\n\t\treturn false, nil, nil\n\t}\n\tname := appMeta.TrimName(obj.GetName())\n\n\twhConf := v1.ValidatingWebhookConfiguration{}\n\terr := runtime.DefaultUnstructuredConverter.FromUnstructured(obj.Object, &whConf)\n\tif err != nil {\n\t\treturn true, nil, errors.Wrap(err, \"unable to cast to ValidatingWebhookConfiguration\")\n\t}\n\tfor i, whc := range whConf.Webhooks {\n\t\twhc.ClientConfig.Service.Name = appMeta.TemplatedName(whc.ClientConfig.Service.Name)\n\t\twhc.ClientConfig.Service.Namespace = strings.ReplaceAll(whc.ClientConfig.Service.Namespace, appMeta.Namespace(), `{{ .Release.Namespace }}`)\n\t\twhConf.Webhooks[i] = whc\n\t}\n\twebhooks, _ := yaml.Marshal(whConf.Webhooks)\n\twebhooks = bytes.TrimRight(webhooks, \"\\n \")\n\tcertName, _, err := unstructured.NestedString(obj.Object, \"metadata\", \"annotations\", \"cert-manager.io/inject-ca-from\")\n\tif err != nil {\n\t\treturn true, nil, errors.Wrap(err, \"unable get webhook certName\")\n\t}\n\tcertName = strings.TrimPrefix(certName, appMeta.Namespace()+\"/\")\n\tcertName = appMeta.TrimName(certName)\n\tres := fmt.Sprintf(vwhTempl, appMeta.ChartName(), name, certName, string(webhooks))\n\treturn true, &vwhResult{\n\t\tname: name,\n\t\tdata: []byte(res),\n\t}, nil\n}",
"func HandleTelegramWebHook(w http.ResponseWriter, r *http.Request) {\n\n\t// Parse incoming request\n\tvar update, err = parseTelegramRequest(r)\n\tif err != nil {\n\t\tlog.Printf(\"error parsing update, %s\", err.Error())\n\t\treturn\n\t}\n\n\t// Sanitize input\n\tvar sanitizedSeed = sanitize(update.Message.Text)\n\n\t// Call RapLyrics to get a punchline\n\tvar lyric, errRapLyrics = getPunchline(sanitizedSeed)\n\tif errRapLyrics != nil {\n\t\tlog.Printf(\"got error when calling RapLyrics API %s\", errRapLyrics.Error())\n\t\treturn\n\t}\n\n\t// Send the punchline back to Telegram\n\tvar telegramResponseBody, errTelegram = sendTextToTelegramChat(update.Message.Chat.Id, lyric)\n\tif errTelegram != nil {\n\t\tlog.Printf(\"got error %s from telegram, response body is %s\", errTelegram.Error(), telegramResponseBody)\n\t} else {\n\t\tlog.Printf(\"punchline %s successfully distributed to chat id %d\", lyric, update.Message.Chat.Id)\n\t}\n}",
"func WebhookHandler(w http.ResponseWriter, r *http.Request, reconciler gitopsconfig.Reconciler) {\n\tlog.Info(\"received webhook call\")\n\tif r.Method != \"POST\" {\n\t\tlog.Info(\"webhook handler only accepts the POST method\", \"sent_method\", r.Method)\n\t\tw.WriteHeader(405)\n\t\treturn\n\t}\n\n\tpayload, err := ioutil.ReadAll(r.Body)\n\tif err != nil {\n\t\tlog.Error(err, \"error reading webhook request body\")\n\t\treturn\n\t}\n\tdefer r.Body.Close()\n\n\twebHookEvent, err := github.ParseWebHook(github.WebHookType(r), payload)\n\tif err != nil {\n\t\tlog.Error(err, \"error parsing webhook event payload\")\n\t\treturn\n\t}\n\n\tswitch e := webHookEvent.(type) {\n\tcase *github.PushEvent:\n\t\t// A commit push was received, determine if there is are GitOpsConfigs that match the event\n\t\t// The repository url and Git ref must match for the templateSource or parameterSource\n\t\t{\n\t\t\tlist, err := reconciler.GetAll()\n\t\t\tif err != nil {\n\t\t\t\tlog.Error(err, \"error getting the list of GitOpsConfigs\")\n\t\t\t\tw.WriteHeader(500)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\ttargetList := gitopsv1alpha1.GitOpsConfigList{\n\t\t\t\tTypeMeta: list.TypeMeta,\n\t\t\t\tListMeta: list.ListMeta,\n\t\t\t\tItems: make([]gitopsv1alpha1.GitOpsConfig, 0, len(list.Items)),\n\t\t\t}\n\n\t\t\tfor _, instance := range list.Items {\n\t\t\t\tif !gitopsconfig.ContainsTrigger(&instance, \"Webhook\") {\n\t\t\t\t\tlog.Info(\"skip instance without webhook trigger\", \"instance_name\", instance.Name)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tlog.Info(\"comparing instance and event metadata\", \"event_name\", e.Repo.GetFullName(), \"event_ref\", e.GetRef(),\n\t\t\t\t\t\"template_uri\", instance.Spec.TemplateSource.URI, \"template_ref\", instance.Spec.TemplateSource.Ref,\n\t\t\t\t\t\"parameter_uri\", instance.Spec.ParameterSource.URI, \"parameter_ref\", instance.Spec.ParameterSource.Ref)\n\n\t\t\t\tif !repoURLAndRefMatch(&instance, e) {\n\t\t\t\t\tlog.Info(\"skip instance without matching repo url or git ref of the event\", \"instance_name\", instance.Name)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tlog.Info(\"found matching instance\", \"instance_name\", instance.Name)\n\t\t\t\ttargetList.Items = append(targetList.Items, instance)\n\t\t\t}\n\n\t\t\tif len(targetList.Items) == 0 {\n\t\t\t\tlog.Info(\"no gitopsconfigs match the webhook event\", \"event_repo\", e.Repo.GetFullName(), \"event_ref\", strings.TrimPrefix(e.GetRef(), \"refs/heads/\"))\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tfor _, instance := range targetList.Items {\n\t\t\t\t//if secured discard those that do not validate\n\t\t\t\tsecret := getWebhookSecret(&instance)\n\t\t\t\tif secret != \"\" {\n\t\t\t\t\t_, err := github.ValidatePayload(r, []byte(secret))\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tlog.Error(err, \"webhook payload could not be validated with instance secret --> ignoring\", \"instance\", instance.GetName(), \"namespace\", instance.GetNamespace())\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlog.Info(\"Webhook triggering job\", \"instance\", instance.GetName(), \"namespace\", instance.GetNamespace())\n\t\t\t\t_, err := reconciler.CreateJob(\"create\", &instance)\n\t\t\t\tif err != nil {\n\t\t\t\t\tlog.Error(err, \"Webhook unable to create job for instance\", \"instance\", instance.GetName(), \"namespace\", instance.GetNamespace())\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\tdefault:\n\t\t{\n\t\t\tlog.Info(\"unknown event type\", \"type\", github.WebHookType(r))\n\t\t\treturn\n\t\t}\n\t}\n\tlog.Info(\"webhook handling concluded correctly\")\n}",
"func ParseWebHook(r *http.Request) (payload interface{}, err error) {\n\teventType := r.Header.Get(gitlabEventTypeHeader)\n\tswitch eventType {\n\tcase NoteHookEvent:\n\t\tpayload = &gitlab.MergeCommentEvent{}\n\tcase MergeRequestHookEvent:\n\t\tpayload = &gitlab.MergeEvent{}\n\tcase TagPushHookEvent:\n\t\tpayload = &gitlab.TagEvent{}\n\t}\n\n\tbody, err := ioutil.ReadAll(r.Body)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Fail to read request body\")\n\t}\n\n\tif err := json.Unmarshal(body, &payload); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn payload, nil\n}",
"func NewReviewWebhookHandler(t *testing.T, v1beta1ConverterFunc V1Beta1ReviewConverterFunc, v1ConverterFunc V1ReviewConverterFunc) http.Handler {\n\treturn http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\tdefer r.Body.Close()\n\t\tdata, err := io.ReadAll(r.Body)\n\t\tif err != nil {\n\t\t\tt.Error(err)\n\t\t\treturn\n\t\t}\n\t\tif contentType := r.Header.Get(\"Content-Type\"); contentType != \"application/json\" {\n\t\t\tt.Errorf(\"contentType=%s, expect application/json\", contentType)\n\t\t\treturn\n\t\t}\n\n\t\ttypeMeta := &metav1.TypeMeta{}\n\t\tif err := json.Unmarshal(data, typeMeta); err != nil {\n\t\t\tt.Errorf(\"Fail to deserialize object: %s with error: %v\", string(data), err)\n\t\t\thttp.Error(w, err.Error(), 400)\n\t\t\treturn\n\t\t}\n\n\t\tvar response runtime.Object\n\n\t\tswitch typeMeta.GroupVersionKind() {\n\t\tcase apiextensionsv1.SchemeGroupVersion.WithKind(\"ConversionReview\"):\n\t\t\treview := &apiextensionsv1.ConversionReview{}\n\t\t\tif err := json.Unmarshal(data, review); err != nil {\n\t\t\t\tt.Errorf(\"Fail to deserialize object: %s with error: %v\", string(data), err)\n\t\t\t\thttp.Error(w, err.Error(), 400)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif v1ConverterFunc == nil {\n\t\t\t\thttp.Error(w, \"Cannot handle v1 ConversionReview\", 422)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tresponse, err = v1ConverterFunc(review)\n\t\t\tif err != nil {\n\t\t\t\tt.Errorf(\"Error converting review: %v\", err)\n\t\t\t\thttp.Error(w, err.Error(), 500)\n\t\t\t\treturn\n\t\t\t}\n\n\t\tcase apiextensionsv1beta1.SchemeGroupVersion.WithKind(\"ConversionReview\"):\n\t\t\treview := &apiextensionsv1beta1.ConversionReview{}\n\t\t\tif err := json.Unmarshal(data, review); err != nil {\n\t\t\t\tt.Errorf(\"Fail to deserialize object: %s with error: %v\", string(data), err)\n\t\t\t\thttp.Error(w, err.Error(), 400)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif v1beta1ConverterFunc == nil {\n\t\t\t\thttp.Error(w, \"Cannot handle v1beta1 ConversionReview\", 422)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tresponse, err = v1beta1ConverterFunc(review)\n\t\t\tif err != nil {\n\t\t\t\tt.Errorf(\"Error converting review: %v\", err)\n\t\t\t\thttp.Error(w, err.Error(), 500)\n\t\t\t\treturn\n\t\t\t}\n\n\t\tdefault:\n\t\t\terr := fmt.Errorf(\"unrecognized request kind: %v\", typeMeta.GroupVersionKind())\n\t\t\tt.Error(err)\n\t\t\thttp.Error(w, err.Error(), 400)\n\t\t\treturn\n\t\t}\n\n\t\tw.Header().Set(\"Content-Type\", \"application/json\")\n\t\tif err := json.NewEncoder(w).Encode(response); err != nil {\n\t\t\tt.Errorf(\"Marshal of response failed with error: %v\", err)\n\t\t}\n\t})\n}",
"func (bot *Bot) handleWebhook(epr *http.EndpointRequest) (resBody []byte, err error) {\n\tupdate := Update{}\n\n\terr = json.Unmarshal(epr.RequestBody, &update)\n\tif err != nil {\n\t\treturn nil, errors.Internal(err)\n\t}\n\n\tvar isHandled bool\n\n\tif len(bot.commands.Commands) > 0 && update.Message != nil {\n\t\tisHandled = bot.handleUpdateCommand(update)\n\t}\n\n\t// If no Command handler found, forward it to global handler.\n\tif !isHandled {\n\t\tbot.opts.HandleUpdate(update)\n\t}\n\n\treturn resBody, nil\n}",
"func (m *HookManager) Create(r *Hook) error {\n\treturn m.post(m.uri(\"hooks\"), r)\n}",
"func NewWebhookAPI(webhookChan chan dockworker.Job) WebhookAPI {\n\treturn WebhookAPI{\n\t\twebhookChan: webhookChan,\n\t}\n}",
"func (w *WebHook) sendPayload(payload *PayLoad) error {\n\tparams := make(map[string]string)\n\tvar apiURL string\n\tif strings.Contains(w.accessToken, w.apiUrl) {\n\t\tapiURL = w.accessToken\n\t} else {\n\t\tparams[\"access_token\"] = w.accessToken\n\t\tapiURL = w.apiUrl\n\t}\n\n\tif w.Secret != \"\" {\n\t\tparams[\"timestamp\"], params[\"sign\"] = w.getSign()\n\t}\n\n\t// add params\n\tif len(params) > 0 {\n\t\tapiURL = addParamsToURL(params, apiURL)\n\t}\n\n\t// get config\n\tbs, _ := json.Marshal(payload)\n\t// request api\n\tresp, err := http.Post(apiURL, \"application/json\", bytes.NewReader(bs))\n\tif nil != err {\n\t\treturn errors.New(\"api request error: \" + err.Error())\n\t}\n\n\t// read response body\n\tbody, _ := ioutil.ReadAll(resp.Body)\n\t// api unusual\n\tif 200 != resp.StatusCode {\n\t\treturn fmt.Errorf(\"api response error: %d\", resp.StatusCode)\n\t}\n\n\tvar result Response\n\t// json decode\n\terr = json.Unmarshal(body, &result)\n\tif nil != err {\n\t\treturn errors.New(\"response struct error: response is not a json anymore, \" + err.Error())\n\t}\n\n\tif 0 != result.ErrorCode {\n\t\treturn fmt.Errorf(\"api custom error: {code: %d, msg: %s}\", result.ErrorCode, result.ErrorMessage)\n\t}\n\n\treturn nil\n}",
"func (TelegramBotApp *TelegramBotApp) setupWebhook() (tgbotapi.UpdatesChannel, error) {\n\t_, err := TelegramBotApp.bot.SetWebhook(tgbotapi.NewWebhook(TelegramBotApp.conf.WebhookURL + \"/\" + TelegramBotApp.bot.Token))\n\tif err != nil {\n\t\tlog.Fatal(\"[!] Webhook problem: \", err)\n\t\t//return nil, err\n\t}\n\tupdates := TelegramBotApp.bot.ListenForWebhook(\"/\" + TelegramBotApp.bot.Token)\n\tgo http.ListenAndServe(\":\"+TelegramBotApp.conf.Port, nil)\n\n\tfmt.Println(\"[+] Webhook method selected\")\n\n\treturn updates, nil\n\n}",
"func (s *WebhooksServiceOp) Update(webhook Webhook, options ...interface{}) (Webhook, error) {\n\tvar webhookResponse GetWebhookResponse\n\tjsonBody, err := json.Marshal(webhook)\n\tif err != nil {\n\t\treturn webhookResponse.Data, err\n\t}\n\treqBody := bytes.NewReader(jsonBody)\n\tbody, reqErr := s.client.DoRequest(http.MethodPut, fmt.Sprintf(\"/v3/hooks/%d\", webhook.ID), reqBody)\n\tif reqErr != nil {\n\t\treturn webhookResponse.Data, reqErr\n\t}\n\n\tjsonErr := json.Unmarshal(body, &webhookResponse)\n\tif jsonErr != nil {\n\t\treturn webhookResponse.Data, jsonErr\n\t}\n\n\treturn webhookResponse.Data, nil\n}",
"func NewWebHookFromMap(t map[string]interface{}) WebHook {\n\tu := &WebHook{}\n\tval := reflect.ValueOf(u).Elem()\n\tfor i := 0; i < val.NumField(); i++ {\n\t\tvalueField := val.Field(i)\n\t\ttypeField := val.Type().Field(i)\n\t\ttag := typeField.Tag\n\n\t\tif typeField.Type.Name() == \"string\" {\n\t\t\tif str, ok := t[tag.Get(\"form\")].(string); ok {\n\t\t\t\tvalueField.SetString(str)\n\t\t\t}\n\t\t}\n\t\tif typeField.Type.Name() == \"int64\" {\n\n\t\t\tif i, ok := t[tag.Get(\"form\")].(int64); ok {\n\t\t\t\tvalueField.SetInt(i)\n\t\t\t}\n\t\t}\n\t\tif typeField.Type.Name() == \"int\" {\n\n\t\t\tif i, ok := t[tag.Get(\"form\")].(int); ok {\n\t\t\t\tvalueField.SetInt(int64(i))\n\t\t\t}\n\t\t}\n\t\tif typeField.Type.Name() == \"bool\" {\n\t\t\tif b, ok := t[tag.Get(\"form\")].(bool); ok {\n\t\t\t\tvalueField.SetBool(b)\n\t\t\t}\n\t\t}\n\t\t//fmt.Printf(\"Field Name: %s,\\t Field Value: %v,\\t Tag Value: %s\\n\", typeField.Name, valueField.Interface(), tag.Get(\"tag_name\"))\n\t}\n\treturn *u\n}",
"func AddWebhook(ctx context.Context, w *Webhook) error {\n\treturn db.Bun().RunInTx(ctx, nil, func(ctx context.Context, tx bun.Tx) error {\n\t\t_, err := tx.NewInsert().Model(w).Exec(ctx)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfor _, t := range w.Triggers {\n\t\t\tt.WebhookID = w.ID\n\t\t}\n\n\t\tif len(w.Triggers) != 0 {\n\t\t\t_, err = tx.NewInsert().Model(&w.Triggers).Exec(ctx)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t})\n}",
"func ToMessageRequest(hookName Hook, rawData []byte) (proto.Message, error) {\n\tswitch hookName {\n\tdefault:\n\t\tvar msg payloads.Custom\n\t\terr := proto.Unmarshal(rawData, &msg)\n\t\treturn &msg, err\n\t}\n}",
"func (r *Bitbucket) ParseHook(req *http.Request) (*model.Hook, error) {\n\tvar payload = req.FormValue(\"payload\")\n\tvar hook, err = bitbucket.ParseHook([]byte(payload))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// verify the payload has the minimum amount of required data.\n\tif hook.Repo == nil || hook.Commits == nil || len(hook.Commits) == 0 {\n\t\treturn nil, fmt.Errorf(\"Invalid Bitbucket post-commit Hook. Missing Repo or Commit data.\")\n\t}\n\n\tvar author = hook.Commits[len(hook.Commits)-1].RawAuthor\n\tvar matches = emailRegexp.FindStringSubmatch(author)\n\tif len(matches) == 2 {\n\t\tauthor = matches[1]\n\t}\n\n\treturn &model.Hook{\n\t\tOwner: hook.Repo.Owner,\n\t\tRepo: hook.Repo.Slug,\n\t\tSha: hook.Commits[len(hook.Commits)-1].Hash,\n\t\tBranch: hook.Commits[len(hook.Commits)-1].Branch,\n\t\tAuthor: author,\n\t\tTimestamp: time.Now().UTC().String(),\n\t\tMessage: hook.Commits[len(hook.Commits)-1].Message,\n\t}, nil\n}",
"func getHook(w http.ResponseWriter, req *http.Request) {\n\t// Get the JSON and put it into a hook struct\n\tdecoder := json.NewDecoder(req.Body)\n\tvar h github.PostReceiveHook\n\terr := decoder.Decode(&h)\n\n\tif err != nil {\n\t\tfmt.Println(\"ERROR: \", err.Error())\n\t\tfmt.Fprint(w, \"No JSON... what? (\"+err.Error()+\")\")\n\n\t\treturn\n\t}\n\n\t// If there is a branch, run the commands\n\tif len(h.Branch()) > 0 {\n\t\trunCommands(h.Branch())\n\t}\n\n\tfmt.Fprint(w, \"OK: \"+h.Ref)\n}",
"func registerWebhookAPIs(ws *restful.WebService) {\n\tws.Route(ws.POST(\"/{service_id}/webhook_github\").\n\t\tTo(webhookGithub).\n\t\tDoc(\"webhook from github\").\n\t\tParam(ws.PathParameter(\"service_id\", \"identifier of the service\").DataType(\"string\")).\n\t\tReads(api.WebhookGithub{}).\n\t\tWrites(api.WebhookResponse{}))\n\n\tws.Route(ws.POST(\"/{service_id}/webhook_gitlab\").\n\t\tTo(webhookGitLab).\n\t\tDoc(\"webhook from gitlab\").\n\t\tParam(ws.PathParameter(\"service_id\", \"identifier of the service\").DataType(\"string\")).\n\t\tReads(api.WebhookGitlab{}).\n\t\tWrites(api.WebhookResponse{}))\n\n\tws.Route(ws.POST(\"/{service_id}/webhook_svn\").\n\t\tTo(webhookSVN).\n\t\tDoc(\"webhook from svn\").\n\t\tParam(ws.PathParameter(\"service_id\", \"identifier of the service\").DataType(\"string\")).\n\t\tReads(api.WebhookSVN{}).\n\t\tWrites(api.WebhookResponse{}))\n}",
"func (g *GH) CreateHook() *github.Hook {\n\tctx := context.Background()\n\thookEvents := []string{\"pull_request\", \"issues\"}\n\thookConfig := map[string]interface{}{\n\t\t\"url\": g.hookURL,\n\t\t\"content_type\": \"json\",\n\t}\n\thookOptions := &github.Hook{\n\t\tEvents: hookEvents,\n\t\tConfig: hookConfig,\n\t}\n\thook, rsp, err := g.c.Organizations.CreateHook(ctx, g.org, hookOptions)\n\tif rsp.StatusCode == 404 {\n\t\tlog.Println(\"Unauthorized to Create Hook in Org\")\n\t}\n\tif err != nil {\n\t\tlog.Println(\"Unable to Create Hook in Org\", rsp, err)\n\t}\n\tlog.Println(\"Created Hook: \", hook)\n\treturn hook\n}",
"func (c *MockWebhookClient) CreateWebhook(ctx context.Context, repo bitbucket.Repo, hook bitbucket.Webhook) (result bitbucket.Webhook, err error) {\n\treturn c.MockCreateWebhook(ctx, repo, hook)\n}",
"func (sry *Sryun) Hook(req *http.Request) (*model.Repo, *model.Build, error) {\n\treturn nil, nil, nil\n}",
"func postWebhook(webhookUrl string, webhookType string, p []byte) {\n\n\tvar payloadName string\n\tswitch webhookType {\n\tcase \"slack\":\n\t\tpayloadName = \"payload\"\n\tcase \"discord\":\n\t\tpayloadName = \"payload_json\"\n\t}\n\tresp, _ := http.PostForm(\n\t\twebhookUrl,\n\t\turl.Values{payloadName: {string(p)}},\n\t)\n\n\tbody, _ := ioutil.ReadAll(resp.Body)\n\tdefer resp.Body.Close()\n\tfmt.Println(string(body))\n}",
"func hookPerformWebPOST(url string, data interface{}) error {\n\t// Generate a buffer for us to store some JSON\n\tb := new(bytes.Buffer)\n\n\t// Take the data we have received and encode it in JSON to POST\n\tjson.NewEncoder(b).Encode(data)\n\n\t// It's always important to log.\n\tlog.WithFields(log.Fields{\n\t\t\"url\": url,\n\t\t\"data\": b,\n\t}).Debug(\"POSTing to webhook\")\n\n\t// POST up our data and then return if we got an error or not.\n\tres, err := http.Post(url, \"application/json; charset=utf-8\", b)\n\n\tlog.WithFields(log.Fields{\n\t\t\"url\": url,\n\t\t\"code\": res.StatusCode,\n\t\t\"status\": res.Status,\n\t}).Debug(\"Response received from webhook\")\n\n\treturn err\n}",
"func GetHook(ctx *context.APIContext) {\n\t// swagger:operation GET /user/hooks/{id} user userGetHook\n\t// ---\n\t// summary: Get a hook\n\t// produces:\n\t// - application/json\n\t// parameters:\n\t// - name: id\n\t// in: path\n\t// description: id of the hook to get\n\t// type: integer\n\t// format: int64\n\t// required: true\n\t// responses:\n\t// \"200\":\n\t// \"$ref\": \"#/responses/Hook\"\n\n\thook, err := utils.GetOwnerHook(ctx, ctx.Doer.ID, ctx.ParamsInt64(\"id\"))\n\tif err != nil {\n\t\treturn\n\t}\n\n\tapiHook, err := webhook_service.ToHook(ctx.Doer.HomeLink(), hook)\n\tif err != nil {\n\t\tctx.InternalServerError(err)\n\t\treturn\n\t}\n\tctx.JSON(http.StatusOK, apiHook)\n}",
"func getSetWebhook(w http.ResponseWriter, r *http.Request) {\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\n\tif r.Method == \"GET\" {\n\t\tgetResponse := valueStringResponse{Success: true, Value: config.Config.WebHookURL}\n\n\t\t// I can't see any way this will fail\n\t\tjs, _ := json.Marshal(getResponse)\n\t\tw.Write(js)\n\t} else if r.Method == \"POST\" {\n\t\terr := r.ParseForm()\n\t\tif err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\t\tconfig.Config.WebHookURL = r.PostForm.Get(\"value\")\n\t\tconfig.SaveConfig()\n\t\tpostResponse := valueStringResponse{Success: true, Value: config.Config.WebHookURL}\n\n\t\tjs, _ := json.Marshal(postResponse)\n\t\tw.Write(js)\n\t}\n}",
"func GetWebhooks() ([]models.Webhook, error) { //nolint\n\twebhooks := make([]models.Webhook, 0)\n\n\tquery := \"SELECT * FROM webhooks\"\n\n\trows, err := _db.Query(query)\n\tif err != nil {\n\t\treturn webhooks, err\n\t}\n\tdefer rows.Close()\n\n\tfor rows.Next() {\n\t\tvar id int\n\t\tvar url string\n\t\tvar events string\n\t\tvar timestampString string\n\t\tvar lastUsedString *string\n\n\t\tif err := rows.Scan(&id, &url, &events, ×tampString, &lastUsedString); err != nil {\n\t\t\tlog.Error(\"There is a problem reading the database.\", err)\n\t\t\treturn webhooks, err\n\t\t}\n\n\t\ttimestamp, err := time.Parse(time.RFC3339, timestampString)\n\t\tif err != nil {\n\t\t\treturn webhooks, err\n\t\t}\n\n\t\tvar lastUsed *time.Time\n\t\tif lastUsedString != nil {\n\t\t\tlastUsedTime, _ := time.Parse(time.RFC3339, *lastUsedString)\n\t\t\tlastUsed = &lastUsedTime\n\t\t}\n\n\t\tsingleWebhook := models.Webhook{\n\t\t\tID: id,\n\t\t\tURL: url,\n\t\t\tEvents: strings.Split(events, \",\"),\n\t\t\tTimestamp: timestamp,\n\t\t\tLastUsed: lastUsed,\n\t\t}\n\n\t\twebhooks = append(webhooks, singleWebhook)\n\t}\n\n\tif err := rows.Err(); err != nil {\n\t\treturn webhooks, err\n\t}\n\n\treturn webhooks, nil\n}",
"func (api *API) ProcessWebhook(c echo.Context) error {\n\tdata, err := ioutil.ReadAll(c.Request().Body)\n\tif err != nil {\n\t\tresponse := &MessageResponse{Status: enums.StatusError, Message: err.Error()}\n\t\treturn c.JSON(http.StatusBadRequest, response)\n\t}\n\tdefer func() { _ = c.Request().Body.Close() }()\n\tp, err := api.services.WebhookDispatcher.GetWebhookProcessor(c.Request().Context(), c.Request().Header, data)\n\tif err != nil {\n\t\tresponse := &MessageResponse{Status: enums.StatusError, Message: err.Error()}\n\t\treturn c.JSON(http.StatusBadRequest, response)\n\t}\n\n\tgo func() {\n\t\tif err := p.Process(c.Request().Context(), c.Request().Header, data); err != nil {\n\t\t\tlogger := logging.FromContext(c.Request().Context())\n\t\t\tlogger.WithField(\"error\", err).Warn(\"could not process webhook\")\n\t\t}\n\t}()\n\treturn c.JSON(http.StatusOK, &MessageResponse{Message: \"ok\"})\n}",
"func NewWebhook() *prometheusruleWebhook {\n\tscheme := runtime.NewScheme()\n\treturn &prometheusruleWebhook{\n\t\ts: *scheme,\n\t}\n}",
"func (c *converter) FromModelInputToModel(in *model.FormationTemplateInput, id, tenantID string) *model.FormationTemplate {\n\tif in == nil {\n\t\treturn nil\n\t}\n\n\tuidService := uid.NewService()\n\twebhooks := make([]*model.Webhook, 0)\n\tfor _, webhookInput := range in.Webhooks {\n\t\twebhook := webhookInput.ToWebhook(uidService.Generate(), id, model.FormationTemplateWebhookReference)\n\t\twebhooks = append(webhooks, webhook)\n\t}\n\n\tvar tntID *string\n\tif tenantID != \"\" {\n\t\ttntID = &tenantID\n\t}\n\n\treturn &model.FormationTemplate{\n\t\tID: id,\n\t\tName: in.Name,\n\t\tApplicationTypes: in.ApplicationTypes,\n\t\tRuntimeTypes: in.RuntimeTypes,\n\t\tRuntimeTypeDisplayName: in.RuntimeTypeDisplayName,\n\t\tRuntimeArtifactKind: in.RuntimeArtifactKind,\n\t\tTenantID: tntID,\n\t\tWebhooks: webhooks,\n\t\tLeadingProductIDs: in.LeadingProductIDs,\n\t\tSupportsReset: in.SupportsReset,\n\t}\n}",
"func (v *Kounta) CreateSaleWebHook(token string, company string, webhook WebHook) error {\n\n\tfmt.Println(\"CreateSaleWebHook\", token, company, webhook)\n\n\tb, err := json.Marshal(webhook)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tu, err := url.ParseRequestURI(baseURL)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tu.Path = fmt.Sprintf(webHookURL+\".json\", company)\n\turlStr := fmt.Sprintf(\"%v\", u)\n\n\tclient := &http.Client{}\n\tclient.CheckRedirect = checkRedirectFunc\n\n\tr, err := http.NewRequest(\"POST\", urlStr, bytes.NewBuffer(b))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tr.Header.Add(\"Authorization\", \"Bearer \"+token)\n\tr.Header.Add(\"Content-Type\", \"application/json\")\n\tr.Header.Add(\"Content-Length\", strconv.Itoa(len(b)))\n\n\tres, err := client.Do(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif res.StatusCode >= 400 {\n\t\treturn fmt.Errorf(\"Failed init sale webhooks %s\", res.Status)\n\t}\n\n\treturn nil\n}",
"func NewWebHook(\n\tsessionWorks repository.Session,\n\tconnectionsSupervisor Connections,\n\tauthorizer Authorizer,\n\twebhookURL string,\n\tmsgRepo repository.Message,\n\tclient httpInfra.Client,\n\tinterruptChan chan os.Signal,\n) *WebHook {\n\treturn &WebHook{\n\t\tsessionRepo: sessionWorks,\n\t\tconnectionsSupervisor: connectionsSupervisor,\n\t\tauth: authorizer,\n\t\twebhookURL: webhookURL,\n\t\tmsgRepo: msgRepo,\n\t\tclient: client,\n\t\tinterruptChan: interruptChan,\n\t}\n}",
"func APIProjectWebhookCreateHandler(er *Errorly) http.HandlerFunc {\n\treturn func(rw http.ResponseWriter, r *http.Request) {\n\t\tsession, _ := er.Store.Get(r, sessionName)\n\t\tdefer er.SaveSession(session, r, rw)\n\n\t\tvars := mux.Vars(r)\n\n\t\t// Authenticate the user\n\t\tauth, user := er.AuthenticateSession(session)\n\t\tif !auth {\n\t\t\tpassResponse(rw, \"You must be logged in to do this\", false, http.StatusForbidden)\n\n\t\t\treturn\n\t\t}\n\n\t\tproject, viewable, elevated, ok := verifyProjectVisibility(er, rw, vars, user, auth, true)\n\t\tif !ok {\n\t\t\t// If ok is False, an error has already been provided to the ResponseWriter so we should just return\n\t\t\treturn\n\t\t}\n\n\t\tif !viewable {\n\t\t\t// No permission to view project. We will treat like the project\n\t\t\t// does not exist.\n\t\t\tpassResponse(rw, \"Could not find this project\", false, http.StatusBadRequest)\n\n\t\t\treturn\n\t\t}\n\n\t\tif !elevated {\n\t\t\t// No permission to execute on project. We will simply tell them\n\t\t\t// they cannot do this.\n\t\t\tpassResponse(rw, \"Guests to a project cannot do this\", false, http.StatusForbidden)\n\n\t\t\treturn\n\t\t}\n\n\t\twebhookURL, err := url.Parse(r.FormValue(\"url\"))\n\t\tif err != nil {\n\t\t\tpassResponse(rw, \"Webhook url is not valid\", false, http.StatusBadRequest)\n\n\t\t\treturn\n\t\t}\n\n\t\twebhookSecret := r.FormValue(\"secret\")\n\n\t\tuseJSON, err := strconv.ParseBool(r.FormValue(\"use_json\"))\n\t\tif err != nil {\n\t\t\tpassResponse(rw, \"Passed use_json value is not valid\", false, http.StatusBadRequest)\n\n\t\t\treturn\n\t\t}\n\n\t\twebhookDiscord, err := strconv.ParseBool(r.FormValue(\"webhook_discord\"))\n\t\tif err != nil {\n\t\t\tpassResponse(rw, \"Passed webhook_discord value is not valid\", false, http.StatusBadRequest)\n\n\t\t\treturn\n\t\t}\n\n\t\tvar webhookType structs.WebhookType\n\t\tif webhookDiscord {\n\t\t\twebhookType = structs.RegularPayload\n\t\t} else {\n\t\t\twebhookType = structs.DiscordWebhook\n\t\t}\n\n\t\twebhook := &structs.Webhook{\n\t\t\tID: er.IDGen.GenerateID(),\n\t\t\tProjectID: project.ID,\n\n\t\t\tCreatedAt: time.Now().UTC(),\n\t\t\tCreatedByID: user.ID,\n\n\t\t\tSecret: webhookSecret,\n\t\t\tURL: webhookURL.String(),\n\t\t\tType: webhookType,\n\t\t\tJSONContent: useJSON,\n\t\t\tActive: true,\n\n\t\t\tFailures: 0,\n\t\t}\n\n\t\t_, err = er.Postgres.Model(webhook).\n\t\t\tInsert()\n\t\tif err != nil {\n\t\t\tpassResponse(rw, err.Error(), false, http.StatusInternalServerError)\n\t\t}\n\n\t\tpassResponse(rw, webhook, true, http.StatusOK)\n\t}\n}",
"func (o *ProjectWebhook) FromMap(kv map[string]interface{}) {\n\n\to.ID = \"\"\n\n\t// if coming from db\n\tif id, ok := kv[\"_id\"]; ok && id != \"\" {\n\t\tkv[\"id\"] = id\n\t}\n\tif val, ok := kv[\"created_ts\"].(int64); ok {\n\t\to.CreatedAt = val\n\t} else {\n\t\tif val, ok := kv[\"created_ts\"]; ok {\n\t\t\tif val == nil {\n\t\t\t\to.CreatedAt = 0\n\t\t\t} else {\n\t\t\t\tif tv, ok := val.(time.Time); ok {\n\t\t\t\t\tval = datetime.TimeToEpoch(tv)\n\t\t\t\t}\n\t\t\t\to.CreatedAt = number.ToInt64Any(val)\n\t\t\t}\n\t\t}\n\t}\n\tif val, ok := kv[\"customer_id\"].(string); ok {\n\t\to.CustomerID = val\n\t} else {\n\t\tif val, ok := kv[\"customer_id\"]; ok {\n\t\t\tif val == nil {\n\t\t\t\to.CustomerID = \"\"\n\t\t\t} else {\n\t\t\t\tv := pstrings.Value(val)\n\t\t\t\tif v != \"\" {\n\t\t\t\t\tif m, ok := val.(map[string]interface{}); ok && m != nil {\n\t\t\t\t\t\tval = pjson.Stringify(m)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tval = v\n\t\t\t\t}\n\t\t\t\to.CustomerID = fmt.Sprintf(\"%v\", val)\n\t\t\t}\n\t\t}\n\t}\n\tif val, ok := kv[\"enabled\"].(bool); ok {\n\t\to.Enabled = val\n\t} else {\n\t\tif val, ok := kv[\"enabled\"]; ok {\n\t\t\tif val == nil {\n\t\t\t\to.Enabled = false\n\t\t\t} else {\n\t\t\t\to.Enabled = number.ToBoolAny(val)\n\t\t\t}\n\t\t}\n\t}\n\tif val, ok := kv[\"error_message\"].(*string); ok {\n\t\to.ErrorMessage = val\n\t} else if val, ok := kv[\"error_message\"].(string); ok {\n\t\to.ErrorMessage = &val\n\t} else {\n\t\tif val, ok := kv[\"error_message\"]; ok {\n\t\t\tif val == nil {\n\t\t\t\to.ErrorMessage = pstrings.Pointer(\"\")\n\t\t\t} else {\n\t\t\t\t// if coming in as map, convert it back\n\t\t\t\tif kv, ok := val.(map[string]interface{}); ok {\n\t\t\t\t\tval = kv[\"string\"]\n\t\t\t\t}\n\t\t\t\to.ErrorMessage = pstrings.Pointer(fmt.Sprintf(\"%v\", val))\n\t\t\t}\n\t\t}\n\t}\n\tif val, ok := kv[\"errored\"].(bool); ok {\n\t\to.Errored = val\n\t} else {\n\t\tif val, ok := kv[\"errored\"]; ok {\n\t\t\tif val == nil {\n\t\t\t\to.Errored = false\n\t\t\t} else {\n\t\t\t\to.Errored = number.ToBoolAny(val)\n\t\t\t}\n\t\t}\n\t}\n\tif val, ok := kv[\"id\"].(string); ok {\n\t\to.ID = val\n\t} else {\n\t\tif val, ok := kv[\"id\"]; ok {\n\t\t\tif val == nil {\n\t\t\t\to.ID = \"\"\n\t\t\t} else {\n\t\t\t\tv := pstrings.Value(val)\n\t\t\t\tif v != \"\" {\n\t\t\t\t\tif m, ok := val.(map[string]interface{}); ok && m != nil {\n\t\t\t\t\t\tval = pjson.Stringify(m)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tval = v\n\t\t\t\t}\n\t\t\t\to.ID = fmt.Sprintf(\"%v\", val)\n\t\t\t}\n\t\t}\n\t}\n\tif val, ok := kv[\"integration_instance_id\"].(*string); ok {\n\t\to.IntegrationInstanceID = val\n\t} else if val, ok := kv[\"integration_instance_id\"].(string); ok {\n\t\to.IntegrationInstanceID = &val\n\t} else {\n\t\tif val, ok := kv[\"integration_instance_id\"]; ok {\n\t\t\tif val == nil {\n\t\t\t\to.IntegrationInstanceID = pstrings.Pointer(\"\")\n\t\t\t} else {\n\t\t\t\t// if coming in as map, convert it back\n\t\t\t\tif kv, ok := val.(map[string]interface{}); ok {\n\t\t\t\t\tval = kv[\"string\"]\n\t\t\t\t}\n\t\t\t\to.IntegrationInstanceID = pstrings.Pointer(fmt.Sprintf(\"%v\", val))\n\t\t\t}\n\t\t}\n\t}\n\tif val, ok := kv[\"project_id\"].(string); ok {\n\t\to.ProjectID = val\n\t} else {\n\t\tif val, ok := kv[\"project_id\"]; ok {\n\t\t\tif val == nil {\n\t\t\t\to.ProjectID = \"\"\n\t\t\t} else {\n\t\t\t\tv := pstrings.Value(val)\n\t\t\t\tif v != \"\" {\n\t\t\t\t\tif m, ok := val.(map[string]interface{}); ok && m != nil {\n\t\t\t\t\t\tval = pjson.Stringify(m)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tval = v\n\t\t\t\t}\n\t\t\t\to.ProjectID = fmt.Sprintf(\"%v\", val)\n\t\t\t}\n\t\t}\n\t}\n\tif val, ok := kv[\"ref_id\"].(string); ok {\n\t\to.RefID = val\n\t} else {\n\t\tif val, ok := kv[\"ref_id\"]; ok {\n\t\t\tif val == nil {\n\t\t\t\to.RefID = \"\"\n\t\t\t} else {\n\t\t\t\tv := pstrings.Value(val)\n\t\t\t\tif v != \"\" {\n\t\t\t\t\tif m, ok := val.(map[string]interface{}); ok && m != nil {\n\t\t\t\t\t\tval = pjson.Stringify(m)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tval = v\n\t\t\t\t}\n\t\t\t\to.RefID = fmt.Sprintf(\"%v\", val)\n\t\t\t}\n\t\t}\n\t}\n\tif val, ok := kv[\"ref_type\"].(string); ok {\n\t\to.RefType = val\n\t} else {\n\t\tif val, ok := kv[\"ref_type\"]; ok {\n\t\t\tif val == nil {\n\t\t\t\to.RefType = \"\"\n\t\t\t} else {\n\t\t\t\tv := pstrings.Value(val)\n\t\t\t\tif v != \"\" {\n\t\t\t\t\tif m, ok := val.(map[string]interface{}); ok && m != nil {\n\t\t\t\t\t\tval = pjson.Stringify(m)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tval = v\n\t\t\t\t}\n\t\t\t\to.RefType = fmt.Sprintf(\"%v\", val)\n\t\t\t}\n\t\t}\n\t}\n\tif val, ok := kv[\"updated_ts\"].(int64); ok {\n\t\to.UpdatedAt = val\n\t} else {\n\t\tif val, ok := kv[\"updated_ts\"]; ok {\n\t\t\tif val == nil {\n\t\t\t\to.UpdatedAt = 0\n\t\t\t} else {\n\t\t\t\tif tv, ok := val.(time.Time); ok {\n\t\t\t\t\tval = datetime.TimeToEpoch(tv)\n\t\t\t\t}\n\t\t\t\to.UpdatedAt = number.ToInt64Any(val)\n\t\t\t}\n\t\t}\n\t}\n\tif val, ok := kv[\"url\"].(*string); ok {\n\t\to.URL = val\n\t} else if val, ok := kv[\"url\"].(string); ok {\n\t\to.URL = &val\n\t} else {\n\t\tif val, ok := kv[\"url\"]; ok {\n\t\t\tif val == nil {\n\t\t\t\to.URL = pstrings.Pointer(\"\")\n\t\t\t} else {\n\t\t\t\t// if coming in as map, convert it back\n\t\t\t\tif kv, ok := val.(map[string]interface{}); ok {\n\t\t\t\t\tval = kv[\"string\"]\n\t\t\t\t}\n\t\t\t\to.URL = pstrings.Pointer(fmt.Sprintf(\"%v\", val))\n\t\t\t}\n\t\t}\n\t}\n\to.setDefaults(false)\n}",
"func NewWebhook(ctx *pulumi.Context,\n\tname string, args *WebhookArgs, opts ...pulumi.ResourceOption) (*Webhook, error) {\n\tif args == nil {\n\t\treturn nil, errors.New(\"missing one or more required arguments\")\n\t}\n\n\tif args.Name == nil {\n\t\treturn nil, errors.New(\"invalid value for required argument 'Name'\")\n\t}\n\tif args.Url == nil {\n\t\treturn nil, errors.New(\"invalid value for required argument 'Url'\")\n\t}\n\topts = internal.PkgResourceDefaultOpts(opts)\n\tvar resource Webhook\n\terr := ctx.RegisterResource(\"datadog:index/webhook:Webhook\", name, args, &resource, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &resource, nil\n}",
"func NewWebhook(ops ...ConfigOption) (*Webhook, error) {\n\tconf := toConfig(ops...)\n\ttemplater, err := templates.NewTemplater(conf.templateName, conf.sidecarConfig, conf.sidecarTemplate)\n\tif err != nil {\n\t\topenlogging.Error(fmt.Sprintf(\"new templater failed: error = %v, template = %s\", err.Error(), conf.templateName))\n\t\treturn nil, err\n\t}\n\n\treturn &Webhook{\n\t\tserver: &http.Server{\n\t\t\tAddr: fmt.Sprintf(\":%d\", conf.port),\n\t\t\tTLSConfig: &tls.Config{GetCertificate: conf.getCertificate},\n\t\t},\n\t\tconfig: conf,\n\t\ttemplater: templater,\n\t}, nil\n}",
"func NewWebHook(accessToken string) *WebHook {\n\tbaseAPI := \"https://oapi.dingtalk.com/robot/send\"\n\treturn &WebHook{accessToken: accessToken, apiUrl: baseAPI}\n}",
"func SendHook(address, eventType string, payload, hmac []byte) error {\n\treq, err := http.NewRequest(http.MethodPost, address, bytes.NewBuffer(payload))\n\tif err != nil {\n\t\treturn err\n\t}\n\treq.Header.Set(\"X-GitHub-Event\", eventType)\n\treq.Header.Set(\"X-GitHub-Delivery\", \"GUID\")\n\treq.Header.Set(\"X-Hub-Signature\", github.PayloadSignature(payload, hmac))\n\treq.Header.Set(\"content-type\", \"application/json\")\n\n\tc := &http.Client{}\n\tresp, err := c.Do(req)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer resp.Body.Close()\n\trb, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif resp.StatusCode != 200 {\n\t\treturn fmt.Errorf(\"response from hook has status %d and body %s\", resp.StatusCode, string(bytes.TrimSpace(rb)))\n\t}\n\treturn nil\n}",
"func New(config *Config) *Webhook {\n\treturn &Webhook{\n\t\tprovider: webhooks.Gogs,\n\t\tsecret: config.Secret,\n\t\teventFuncs: map[Event]webhooks.ProcessPayloadFunc{},\n\t}\n}",
"func SetupWebhooks(mgr ctrl.Manager) error {\n\t/*\n\t\tTotally undocumented and hard-to-find feature is that the builder automatically registers the URL path for the webhook.\n\t\tWhat's more, not even the tests in upstream controller-runtime reveal what this path is _actually_ going to look like.\n\t\tSo here's how the path is built (dots replaced with dash, lower-cased, single-form):\n\t\t /validate-<group>-<version>-<kind>\n\t\t /mutate-<group>-<version>-<kind>\n\t\tExample:\n\t\t /validate-clustercode-github-io-v1alpha1-blueprint\n\t\tThis path has to be given in the `//+kubebuilder:webhook:...` magic comment, see example:\n\t\t +kubebuilder:webhook:verbs=create;update;delete,path=/validate-clustercode-github-io-v1alpha1-blueprint,mutating=false,failurePolicy=fail,groups=clustercode.github.io,resources=blueprints,versions=v1alpha1,name=blueprints.clustercode.github.io,sideEffects=None,admissionReviewVersions=v1\n\t\tPay special attention to the plural forms and correct versions!\n\t*/\n\tfor _, setup := range []func(ctrl.Manager) error{\n\t\tblueprintwebhook.SetupWebhook,\n\t} {\n\t\tif err := setup(mgr); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}",
"func newWebhookNotify(accountID string) (*logrus.Logger, error) {\n\trNotify := serverConfig.Notify.GetWebhookByID(accountID)\n\tif rNotify.Endpoint == \"\" {\n\t\treturn nil, errInvalidArgument\n\t}\n\n\tif err := lookupEndpoint(rNotify.Endpoint); err != nil {\n\t\treturn nil, err\n\t}\n\n\tconn := httpConn{\n\t\t// Configure aggressive timeouts for client posts.\n\t\tClient: &http.Client{\n\t\t\tTransport: &http.Transport{\n\t\t\t\tTLSClientConfig: &tls.Config{RootCAs: globalRootCAs},\n\t\t\t\tDialContext: (&net.Dialer{\n\t\t\t\t\tTimeout: 5 * time.Second,\n\t\t\t\t\tKeepAlive: 5 * time.Second,\n\t\t\t\t}).DialContext,\n\t\t\t\tTLSHandshakeTimeout: 3 * time.Second,\n\t\t\t\tResponseHeaderTimeout: 3 * time.Second,\n\t\t\t\tExpectContinueTimeout: 2 * time.Second,\n\t\t\t},\n\t\t},\n\t\tEndpoint: rNotify.Endpoint,\n\t}\n\n\tnotifyLog := logrus.New()\n\tnotifyLog.Out = ioutil.Discard\n\n\t// Set default JSON formatter.\n\tnotifyLog.Formatter = new(logrus.JSONFormatter)\n\n\tnotifyLog.Hooks.Add(conn)\n\n\t// Success\n\treturn notifyLog, nil\n}",
"func Convert(ent *entry.Entry) pdata.Logs {\n\tpLogs := pdata.NewLogs()\n\tlogs := pLogs.ResourceLogs()\n\n\trls := logs.AppendEmpty()\n\n\tresource := rls.Resource()\n\tresourceAtts := resource.Attributes()\n\tresourceAtts.EnsureCapacity(len(ent.Resource))\n\tfor k, v := range ent.Resource {\n\t\tresourceAtts.InsertString(k, v)\n\t}\n\n\tills := rls.InstrumentationLibraryLogs().AppendEmpty()\n\tlr := ills.Logs().AppendEmpty()\n\tconvertInto(ent, lr)\n\treturn pLogs\n}",
"func (c *Context) HandleWebhook(w http.ResponseWriter, r *http.Request) {\n\trequestID := l.GenerateContextID()\n\tlogger := &l.Logger{Context: map[string]interface{}{\n\t\t\"request_id\": requestID,\n\t}}\n\tlog := logger.StartLog()\n\tdefer log.Write()\n\n\tlog[\"request_url\"] = r.URL.String()\n\tlog[\"request_path\"] = r.URL.Path\n\tlog[\"request_header\"] = r.Header\n\n\twebhookID := GetRequestWebhookID(r)\n\tif len(webhookID) == 0 {\n\t\tlog[\"error\"] = \"couldn't identify webhook ID from URL\"\n\t\thttp.Error(w, requestID, http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tlog[\"webhook_id\"] = webhookID\n\twebhookSecret, err := c.WebhookSecret.SecretForWebhookID(webhookID)\n\tif err != nil {\n\t\tlog[\"error\"] = serr.ContextualizeErrorf(err, \"fetching webhook secret\")\n\t\thttp.Error(w, requestID, http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tpayload, err := github.ValidatePayload(r, []byte(webhookSecret.Secret))\n\tif err != nil {\n\t\tlog[\"error\"] = serr.ContextualizeErrorf(err, \"validating webhook request\")\n\t\thttp.Error(w, requestID, http.StatusBadRequest)\n\t\treturn\n\t}\n\tdefer r.Body.Close()\n\n\tevent, err := github.ParseWebHook(github.WebHookType(r), payload)\n\tif err != nil {\n\t\tlog[\"request_body\"] = string(payload)\n\t\tlog[\"error\"] = serr.ContextualizeErrorf(err, \"parsing webhook request\")\n\t\thttp.Error(w, requestID, http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tswitch event := event.(type) {\n\tcase *github.PushEvent:\n\t\tlog[\"push_event\"] = event\n\tcase *github.PullRequestEvent:\n\t\tlog[\"pull_event\"] = event\n\n\t\t// Handle the event asynchronously.\n\t\tgo c.HandlePullEvent(webhookSecret, event, requestID, logger)\n\tdefault:\n\t\tlog[\"body\"] = string(payload)\n\t\tlog[\"other_event\"] = true\n\t}\n}",
"func New(mgr manager.Manager, args Args) (*Webhook, error) {\n\tlogger := log.Log.WithName(args.Name).WithValues(\"provider\", args.Provider)\n\n\t// Create handler\n\tbuilder := NewBuilder(mgr, logger)\n\n\tfor val, objs := range args.Validators {\n\t\tbuilder.WithValidator(val, objs...)\n\t}\n\n\tfor mut, objs := range args.Mutators {\n\t\tbuilder.WithMutator(mut, objs...)\n\t}\n\n\tbuilder.WithPredicates(args.Predicates...)\n\n\thandler, err := builder.Build()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Create webhook\n\tlogger.Info(\"Creating webhook\")\n\n\treturn &Webhook{\n\t\tPath: args.Path,\n\t\tWebhook: &admission.Webhook{Handler: handler},\n\t}, nil\n}",
"func (c *Client) GetWebhook(ctx context.Context, repo bitbucket.Repo, id int) (bitbucket.Webhook, error) {\n\turl := c.BaseURL + fmt.Sprintf(\"/rest/api/1.0/projects/%s/repos/%s/webhooks/%d\",\n\t\turl.PathEscape(repo.ProjectKey), url.PathEscape(repo.Repo), id)\n\treq, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)\n\tif err != nil {\n\t\treturn bitbucket.Webhook{}, err\n\t}\n\n\t// The documentation says this is a paged API but it is not\n\tvar payload bitbucket.Webhook\n\tif err := c.sendRequest(req, &payload); err != nil {\n\t\treturn bitbucket.Webhook{}, fmt.Errorf(\"GetWebhook(%+v, %d): %w\", repo, id, err)\n\t}\n\n\treturn payload, nil\n}",
"func ExtensionWebService(r Resource) *restful.WebService {\n\tws := new(restful.WebService)\n\tws.\n\t\tPath(\"/webhooks\").\n\t\tConsumes(restful.MIME_JSON, restful.MIME_JSON).\n\t\tProduces(restful.MIME_JSON, restful.MIME_JSON)\n\n\tws.Route(ws.POST(\"/\").To(r.createWebhook))\n\tws.Route(ws.GET(\"/\").To(r.getAllWebhooks))\n\tws.Route(ws.GET(\"/defaults\").To(r.getDefaults))\n\n\treturn ws\n}",
"func ParseHook(secret []byte, request *http.Request, w http.ResponseWriter, eh EventHandler) (*Hook, error) {\n\thook := Hook{}\n\n\tif hook.Signature = request.Header.Get(\"x-hub-signature\"); len(hook.Signature) == 0 {\n\t\treturn nil, SignatureError\n\t}\n\tif hook.Event = request.Header.Get(\"x-github-event\"); len(hook.Event) == 0 {\n\t\treturn nil, NoEventError\n\t}\n\tif hook.Id = request.Header.Get(\"x-github-delivery\"); len(hook.Event) == 0 {\n\t\treturn nil, NoEventIdError\n\t}\n\n\tbody, err := ioutil.ReadAll(request.Body)\n\t\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif !Verify(secret, hook.Signature, body) {\n\t\treturn nil, InvalidSignatureError\n\t}\n\n\tevent, err := github.ParseWebHook(github.WebHookType(request), body)\n\tif err != nil {\n\t\tfmt.Println(\"Could not parse web hook\", err)\n\t\tglog.Warning(\"Could not parse web hook %v\", err)\n\t\tw.WriteHeader(http.StatusBadRequest)\n\t\treturn nil, GithubParseError\n\t}\n\n\tgo func () {\n\t\tswitch event := event.(type) {\n\t\tcase *github.PushEvent:\n\t\t\terr = eh.HandlePushEvent(event)\n\t\t}\n\t}() // background doing\n\n\treturn &hook, nil\n}",
"func New(options ...Option) (*Webhook, error) {\n\thook := new(Webhook)\n\tfor _, opt := range options {\n\t\tif err := opt(hook); err != nil {\n\t\t\treturn nil, errors.New(\"Error applying Option\")\n\t\t}\n\t}\n\treturn hook, nil\n}",
"func NewWebhook(token string) *Webhook {\n\treturn &Webhook{\n\t\tToken: token,\n\t}\n}",
"func (webhooks *Webhooks) AddWebhook(item Webhook) []Webhook {\n\twebhooks.Items = append(webhooks.Items, item)\n\treturn webhooks.Items\n}",
"func (d *azure) HandleWebhook(c *gin.Context) {\n\tlog.Debug(\"Got azure webhook event\")\n\n\tpayload := webhookPayload{}\n\n\tif err := c.BindJSON(&payload); err != nil {\n\t\tlog.WithError(err).Error(\"Failed to bind payload JSON to expected structure\")\n\t\tc.JSON(http.StatusBadRequest, gin.H{\"error\": err.Error()})\n\t\treturn\n\t}\n\n\tvar s []string = strings.Split(payload.Target.Repository, \"/\")\n\tpayload.Target.Name = strings.Join(s[1:len(s)], \"\")\n\n\tif payload.Action != \"push\" {\n\t\tlog.Debug(fmt.Sprintf(\"Skip event %s\", payload.Action))\n\t\treturn\n\t}\n\n\tevent := hermes.NewNormalizedEvent()\n\teventURI := constructEventURI(&payload, c.Query(\"account\"))\n\tpayloadJSON, err := json.Marshal(payload)\n\tif err != nil {\n\t\tlog.WithError(err).Error(\"Failed to covert webhook payload structure to JSON\")\n\t\tc.JSON(http.StatusBadRequest, gin.H{\"error\": err.Error()})\n\t\treturn\n\t}\n\t// keep original JSON\n\tevent.Original = string(payloadJSON)\n\n\t// get image push details\n\tevent.Variables[\"event\"] = payload.Action\n\tns := strings.Split(payload.Request.Host, \".\")\n\tevent.Variables[\"namespace\"] = ns[0]\n\tevent.Variables[\"name\"] = payload.Target.Repository\n\tevent.Variables[\"tag\"] = payload.Target.Tag\n\tevent.Variables[\"type\"] = \"registry\"\n\tevent.Variables[\"provider\"] = \"azure\"\n\tevent.Variables[\"pushed_at\"] = payload.Timestamp\n\n\t// get secret from URL query\n\tevent.Secret = c.Query(\"secret\")\n\n\tlog.Debug(\"Event url \" + eventURI)\n\n\t// invoke trigger\n\terr = d.hermesSvc.TriggerEvent(eventURI, event)\n\tif err != nil {\n\t\tlog.WithError(err).Error(\"Failed to trigger event pipelines\")\n\t\tc.JSON(http.StatusBadRequest, gin.H{\"error\": err.Error()})\n\t\treturn\n\t}\n\n\tc.Status(http.StatusOK)\n}",
"func GetWebhook(ctx *pulumi.Context,\n\tname string, id pulumi.IDInput, state *WebhookState, opts ...pulumi.ResourceOption) (*Webhook, error) {\n\tvar resource Webhook\n\terr := ctx.ReadResource(\"datadog:index/webhook:Webhook\", name, id, state, &resource, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &resource, nil\n}",
"func CreateWebhookListener(config,\n\tremoteConfig *rest.Config,\n\tscheme *runtime.Scheme,\n\ttlsKeyFile, tlsCrtFile string,\n\tcreateService bool) (*WebhookListener, error) {\n\tif klog.V(utils.QuiteLogLel) {\n\t\tfnName := utils.GetFnName()\n\t\tklog.Infof(\"Entering: %v()\", fnName)\n\n\t\tdefer klog.Infof(\"Exiting: %v()\", fnName)\n\t}\n\n\tvar err error\n\n\tdynamicClient := dynamic.NewForConfigOrDie(config)\n\n\tl := &WebhookListener{\n\t\tDynamicClient: dynamicClient,\n\t\tlocalConfig: config,\n\t}\n\n\t// The user-provided key and cert files take precedence over the default provided files if both sets exist.\n\tif _, err := os.Stat(defaultKeyFile); err == nil {\n\t\tl.TLSKeyFile = defaultKeyFile\n\t}\n\n\tif _, err := os.Stat(defaultCrtFile); err == nil {\n\t\tl.TLSCrtFile = defaultCrtFile\n\t}\n\n\tif _, err := os.Stat(tlsKeyFile); err == nil {\n\t\tl.TLSKeyFile = tlsKeyFile\n\t}\n\n\tif _, err := os.Stat(tlsCrtFile); err == nil {\n\t\tl.TLSCrtFile = tlsCrtFile\n\t}\n\n\tl.LocalClient, err = client.New(config, client.Options{})\n\n\tif err != nil {\n\t\tklog.Error(\"Failed to initialize client to update local status. error: \", err)\n\t\treturn nil, err\n\t}\n\n\tl.RemoteClient = l.LocalClient\n\tif remoteConfig != nil {\n\t\tl.RemoteClient, err = client.New(remoteConfig, client.Options{})\n\n\t\tif err != nil {\n\t\t\tklog.Error(\"Failed to initialize client to update remote status. error: \", err)\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tif createService {\n\t\tnamespace, err := getOperatorNamespace()\n\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\t// Create the webhook listener service only when the subscription controller runs in hub mode.\n\t\terr = createWebhookListnerService(l.LocalClient, namespace)\n\n\t\tif err != nil {\n\t\t\tklog.Error(\"Failed to create a service for Git webhook listener. error: \", err)\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn l, err\n}",
"func Webhook(u *url.URL, h http.Header, req *stripe.Event) (int, http.Header, interface{}, error) {\n\t// if we dont support the handler, just return success so they dont try again.\n\thandler, err := payment.GetHandler(req.Type)\n\tif err != nil {\n\t\treturn response.NewDefaultOK()\n\t}\n\n\t// get the event from stripe api again since they dont provide a way to\n\t// authenticate incoming requests\n\tevent, err := event.Get(req.ID, nil)\n\tif err != nil {\n\t\treturn response.NewBadRequest(err)\n\t}\n\n\tif err := handler(event.Data.Raw); err != nil {\n\t\treturn response.NewBadRequest(err)\n\t}\n\n\treturn response.NewDefaultOK()\n}",
"func ToAPI(f gob.GobEncoder) (*api.BloomFilter, error) {\n\tencoded, err := f.GobEncode()\n\tif err != nil {\n\t\t// should never happen\n\t\treturn nil, err\n\t}\n\treturn &api.BloomFilter{\n\t\tEncoded: encoded,\n\t}, nil\n}",
"func (v *Kounta) GetWebHooks(token string, company string) (WebHooks, error) {\n\tclient := &http.Client{}\n\tclient.CheckRedirect = checkRedirectFunc\n\n\tu, _ := url.ParseRequestURI(baseURL)\n\tu.Path = fmt.Sprintf(webHookURL+\".json\", company)\n\turlStr := fmt.Sprintf(\"%v\", u)\n\n\tr, err := http.NewRequest(\"GET\", urlStr, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tr.Header = http.Header(make(map[string][]string))\n\tr.Header.Set(\"Accept\", \"application/json\")\n\tr.Header.Set(\"Authorization\", \"Bearer \"+token)\n\n\tres, err := client.Do(r)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\trawResBody, err := ioutil.ReadAll(res.Body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif res.StatusCode == 200 {\n\t\tvar resp WebHooks\n\n\t\tfmt.Println(string(rawResBody))\n\n\t\terr = json.Unmarshal(rawResBody, &resp)\n\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn resp, nil\n\t}\n\treturn nil, fmt.Errorf(\"Failed to get Kounta Web Hooks %s\", res.Status)\n\n}"
] |
[
"0.62416416",
"0.6066937",
"0.6055648",
"0.5909497",
"0.5906814",
"0.5904331",
"0.582312",
"0.5804771",
"0.57534385",
"0.57069814",
"0.570368",
"0.5693051",
"0.5687103",
"0.5686325",
"0.56859076",
"0.567515",
"0.56494665",
"0.562347",
"0.56114566",
"0.56101716",
"0.5582912",
"0.5520816",
"0.5492247",
"0.54852366",
"0.54643226",
"0.5459511",
"0.5454951",
"0.5428931",
"0.538597",
"0.5385812",
"0.5381233",
"0.5372759",
"0.5366882",
"0.5362522",
"0.53470206",
"0.5325514",
"0.53214747",
"0.5315556",
"0.53076565",
"0.53038216",
"0.5291135",
"0.52830315",
"0.5273308",
"0.52595884",
"0.5255656",
"0.5239356",
"0.5238201",
"0.5234456",
"0.5222967",
"0.52195656",
"0.5217039",
"0.52131176",
"0.5200432",
"0.5186216",
"0.51804346",
"0.5178387",
"0.5173417",
"0.5166138",
"0.5165146",
"0.51632416",
"0.5154683",
"0.5147965",
"0.5143062",
"0.5141864",
"0.5137835",
"0.51253766",
"0.5096801",
"0.5092304",
"0.50909704",
"0.5084561",
"0.5080046",
"0.5070708",
"0.5043434",
"0.5033335",
"0.5027999",
"0.5008737",
"0.49913144",
"0.4988103",
"0.49822527",
"0.4981747",
"0.49816167",
"0.4974019",
"0.49684504",
"0.49495727",
"0.49396428",
"0.49377513",
"0.49376357",
"0.4933037",
"0.4927794",
"0.4921062",
"0.49200824",
"0.4903685",
"0.48964974",
"0.4896364",
"0.48961082",
"0.4895439",
"0.4894161",
"0.4887586",
"0.4886635",
"0.48838755"
] |
0.76821303
|
0
|
doBeforeInsertHooks executes all "before insert" hooks.
|
func (o *AssetRevision) doBeforeInsertHooks(exec boil.Executor) (err error) {
for _, hook := range assetRevisionBeforeInsertHooks {
if err := hook(exec, o); err != nil {
return err
}
}
return nil
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (o *Jet) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range jetBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Post) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range postBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Smallblog) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range smallblogBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Subscriber) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range subscriberBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *InstrumentClass) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range instrumentClassBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFTurntable) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfTurntableBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Storestate) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range storestateBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Employee) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range employeeBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Repository) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range repositoryBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Building) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range buildingBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Customer) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range customerBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Skin) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range skinBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Illness) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range illnessBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Kvstore) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range kvstoreBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ActivityLog) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range activityLogBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Utxo) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range utxoBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RawVisit) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range rawVisitBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Auth) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range authBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFUserSuper) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfUserSuperBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Organism) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range organismBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Doc) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range docBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Rental) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rentalBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Board) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range boardBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Tree) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range treeBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Shelf) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range shelfBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Offer) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range offerBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFUserExperienceLog) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfUserExperienceLogBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Vote) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range voteBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Job) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range jobBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Vendor) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range vendorBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Weather) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range weatherBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BookCategory) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range bookCategoryBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Tenant) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range tenantBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Latency) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range latencyBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Comment) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range commentBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Origin) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range originBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PaymentObject) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range paymentObjectBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecipeLipid) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range recipeLipidBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BlackCard) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range blackCardBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *StockKeepingUnitContent) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range stockKeepingUnitContentBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Task) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range taskBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Email) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range emailBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CurrentChartDataMinutely) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range currentChartDataMinutelyBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Notification) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range notificationBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Description) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range descriptionBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFBalanceChargeAdmin) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfBalanceChargeAdminBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PublisherSearchIdx) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range publisherSearchIdxBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Friendship) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range friendshipBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Failure) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range failureBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Phenotypeprop) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range phenotypepropBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Currency) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range currencyBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Project) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range projectBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Project) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range projectBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Inventory) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range inventoryBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Peer) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range peerBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BookCategoryAssign) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range bookCategoryAssignBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Segment) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range segmentBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AuthItemGroup) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range authItemGroupBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RentalRower) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rentalRowerBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *TrainingCost) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range trainingCostBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Asset) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range assetBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Picture) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range pictureBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *WithdrawalCrypto) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range withdrawalCryptoBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFAdminMenu) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfAdminMenuBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ScheduleSubject) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range scheduleSubjectBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RestaurantRank) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range restaurantRankBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Cvtermsynonym) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range cvtermsynonymBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecordMeasure) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range recordMeasureBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *OauthClient) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range oauthClientBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Channel) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range channelBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *UserGoogle) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range userGoogleBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FeatureRelationship) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range featureRelationshipBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecipeAdditive) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range recipeAdditiveBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FeatureCvtermDbxref) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range featureCvtermDbxrefBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RowerGroup) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rowerGroupBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *MultiAddressesSet) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range multiAddressesSetBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AuthToken) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range authTokenBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BoardsSectionsPosition) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range boardsSectionsPositionBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ExchangeCurrency) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range exchangeCurrencyBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *APIKey) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range apiKeyBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *DestinationRank) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range destinationRankBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFMusic) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfMusicBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *StockCvterm) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range stockCvtermBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFFamiliesPolicy) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfFamiliesPolicyBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFSlideItem) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfSlideItemBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FilesStorage) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range filesStorageBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Address) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range addressBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PeerProperty) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range peerPropertyBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFPaidprogramComment) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfPaidprogramCommentBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFFamilyUserPoliciesTake) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfFamilyUserPoliciesTakeBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Smallblog) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range smallblogBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Customer) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range customerBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Post) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range postBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Kvstore) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range kvstoreBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *InstrumentClass) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range instrumentClassBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFTurntable) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfTurntableBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ActivityLog) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range activityLogBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Tree) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range treeBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Repository) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range repositoryBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Storestate) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range storestateBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}"
] |
[
"0.87368757",
"0.8725836",
"0.86548156",
"0.8636213",
"0.86309236",
"0.861584",
"0.86100113",
"0.8604944",
"0.8593127",
"0.8589814",
"0.858869",
"0.85826623",
"0.8572817",
"0.8557051",
"0.8523914",
"0.8522812",
"0.8519848",
"0.85054356",
"0.8498805",
"0.8496564",
"0.8491974",
"0.8486253",
"0.8482946",
"0.8476946",
"0.8475953",
"0.8470377",
"0.8470208",
"0.8459701",
"0.8455029",
"0.84474003",
"0.8442088",
"0.8440843",
"0.8432088",
"0.8427664",
"0.84257996",
"0.841595",
"0.8413064",
"0.8411666",
"0.83759725",
"0.8375702",
"0.8367117",
"0.8364277",
"0.83625835",
"0.8361951",
"0.8356398",
"0.83519506",
"0.83452326",
"0.83442533",
"0.8332101",
"0.8299462",
"0.829102",
"0.82879806",
"0.82879806",
"0.82869345",
"0.8282822",
"0.8275666",
"0.82752883",
"0.8273763",
"0.82715404",
"0.82647234",
"0.82576245",
"0.82508254",
"0.8244774",
"0.82403713",
"0.82387775",
"0.82372636",
"0.8231537",
"0.82088494",
"0.82058144",
"0.8204124",
"0.8187714",
"0.81816465",
"0.8177269",
"0.817642",
"0.81548685",
"0.8144515",
"0.81356746",
"0.81133926",
"0.811043",
"0.8100534",
"0.8096812",
"0.8067483",
"0.8057226",
"0.8050522",
"0.8044286",
"0.800027",
"0.7981272",
"0.79722464",
"0.79715633",
"0.79695004",
"0.782459",
"0.7745016",
"0.7722921",
"0.771439",
"0.76843786",
"0.7655779",
"0.7651902",
"0.76413214",
"0.762363",
"0.7618628"
] |
0.8299212
|
50
|
doBeforeUpdateHooks executes all "before Update" hooks.
|
func (o *AssetRevision) doBeforeUpdateHooks(exec boil.Executor) (err error) {
for _, hook := range assetRevisionBeforeUpdateHooks {
if err := hook(exec, o); err != nil {
return err
}
}
return nil
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (o *Jet) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range jetBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Employee) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range employeeBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Latency) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range latencyBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Post) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range postBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Repository) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range repositoryBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFTurntable) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfTurntableBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RawVisit) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range rawVisitBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Illness) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range illnessBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFUserSuper) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfUserSuperBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFUserExperienceLog) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfUserExperienceLogBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Subscriber) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range subscriberBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Utxo) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range utxoBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Skin) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range skinBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Weather) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range weatherBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Kvstore) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range kvstoreBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ActivityLog) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range activityLogBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Vendor) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range vendorBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Smallblog) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range smallblogBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Job) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range jobBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *InstrumentClass) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range instrumentClassBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Storestate) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range storestateBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PaymentObject) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range paymentObjectBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Customer) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range customerBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Building) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range buildingBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Vote) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range voteBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Auth) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range authBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Origin) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range originBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BookCategory) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range bookCategoryBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Rental) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rentalBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Offer) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range offerBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Board) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range boardBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Peer) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range peerBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecipeLipid) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range recipeLipidBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Asset) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range assetBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFBalanceChargeAdmin) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfBalanceChargeAdminBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFAdminMenu) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfAdminMenuBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Task) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range taskBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Notification) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range notificationBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Friendship) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range friendshipBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CurrentChartDataMinutely) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range currentChartDataMinutelyBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Tree) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range treeBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Doc) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range docBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *TrainingCost) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range trainingCostBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Tenant) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range tenantBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Email) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range emailBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Organism) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range organismBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Description) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range descriptionBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Comment) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range commentBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Channel) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range channelBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Currency) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range currencyBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Shelf) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range shelfBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BlackCard) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range blackCardBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Project) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range projectBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Project) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range projectBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *StockKeepingUnitContent) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range stockKeepingUnitContentBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Failure) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range failureBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RentalRower) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rentalRowerBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Phenotypeprop) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range phenotypepropBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *WithdrawalCrypto) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range withdrawalCryptoBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecordMeasure) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range recordMeasureBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Inventory) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range inventoryBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Segment) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range segmentBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PublisherSearchIdx) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range publisherSearchIdxBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ScheduleSubject) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range scheduleSubjectBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RestaurantRank) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range restaurantRankBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecipeAdditive) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range recipeAdditiveBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Picture) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range pictureBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PeerProperty) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range peerPropertyBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *UserGoogle) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range userGoogleBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Cvtermsynonym) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range cvtermsynonymBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFMusic) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfMusicBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BookCategoryAssign) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range bookCategoryAssignBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AuthItemGroup) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range authItemGroupBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFSlideItem) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfSlideItemBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *APIKey) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range apiKeyBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *OauthClient) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range oauthClientBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ExchangeCurrency) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range exchangeCurrencyBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *StockCvterm) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range stockCvtermBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFFamilyUserPoliciesTake) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfFamilyUserPoliciesTakeBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BoardsSectionsPosition) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range boardsSectionsPositionBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AuthToken) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range authTokenBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFPaidprogramComment) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfPaidprogramCommentBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *DestinationRank) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range destinationRankBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FeatureRelationship) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range featureRelationshipBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFFamiliesPolicy) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfFamiliesPolicyBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *MultiAddressesSet) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range multiAddressesSetBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Address) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range addressBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FilesStorage) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range filesStorageBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FeatureCvtermDbxref) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range featureCvtermDbxrefBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RowerGroup) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rowerGroupBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Latency) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range latencyBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Weather) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range weatherBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Kvstore) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range kvstoreBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Employee) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range employeeBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Skin) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range skinBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Latency) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range latencyBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Repository) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range repositoryBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFUserExperienceLog) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfUserExperienceLogBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Employee) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range employeeBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFAdminMenu) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfAdminMenuBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}"
] |
[
"0.86185026",
"0.8548688",
"0.8545492",
"0.85352594",
"0.85325336",
"0.8531785",
"0.8514662",
"0.850789",
"0.8504397",
"0.8501638",
"0.84877336",
"0.84864706",
"0.8480128",
"0.84750366",
"0.8452939",
"0.84526813",
"0.8435634",
"0.8433502",
"0.84325314",
"0.8431149",
"0.84143233",
"0.841039",
"0.8395308",
"0.8385122",
"0.83632684",
"0.835269",
"0.8348384",
"0.8346548",
"0.83444613",
"0.834403",
"0.8336603",
"0.8336501",
"0.83318436",
"0.83202213",
"0.83184433",
"0.83168596",
"0.831281",
"0.8305595",
"0.8301575",
"0.82998437",
"0.8298366",
"0.82931083",
"0.827386",
"0.8272081",
"0.82707065",
"0.8268964",
"0.82645684",
"0.82575333",
"0.8253319",
"0.82466924",
"0.8239886",
"0.82354826",
"0.8230625",
"0.8230625",
"0.82214236",
"0.82119936",
"0.81993926",
"0.8176895",
"0.8162147",
"0.8161559",
"0.8153678",
"0.81483525",
"0.8143708",
"0.8134377",
"0.8133303",
"0.8132434",
"0.8115361",
"0.8109196",
"0.80993325",
"0.8095276",
"0.8075944",
"0.8069229",
"0.8043442",
"0.80367863",
"0.8032369",
"0.8029891",
"0.80193186",
"0.80132854",
"0.8010147",
"0.79788333",
"0.7970572",
"0.7913475",
"0.7900171",
"0.7882286",
"0.7864851",
"0.783586",
"0.7833446",
"0.78212094",
"0.78004855",
"0.76855546",
"0.75057435",
"0.7381372",
"0.7329492",
"0.729886",
"0.7296858",
"0.7293951",
"0.7254548",
"0.72492176",
"0.7240437",
"0.7235003"
] |
0.8261522
|
47
|
doBeforeDeleteHooks executes all "before Delete" hooks.
|
func (o *AssetRevision) doBeforeDeleteHooks(exec boil.Executor) (err error) {
for _, hook := range assetRevisionBeforeDeleteHooks {
if err := hook(exec, o); err != nil {
return err
}
}
return nil
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (o *Post) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range postBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Jet) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range jetBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Repository) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range repositoryBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Subscriber) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range subscriberBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Employee) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range employeeBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFTurntable) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfTurntableBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Kvstore) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range kvstoreBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Smallblog) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range smallblogBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Illness) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range illnessBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFUserExperienceLog) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfUserExperienceLogBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *InstrumentClass) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range instrumentClassBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Utxo) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range utxoBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Building) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range buildingBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Notification) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range notificationBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Job) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range jobBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Storestate) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range storestateBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Rental) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rentalBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RawVisit) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range rawVisitBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Customer) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range customerBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ActivityLog) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range activityLogBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Auth) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range authBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Tenant) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range tenantBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFUserSuper) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfUserSuperBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Shelf) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range shelfBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecipeLipid) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range recipeLipidBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PaymentObject) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range paymentObjectBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFBalanceChargeAdmin) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfBalanceChargeAdminBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Description) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range descriptionBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Offer) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range offerBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Vendor) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range vendorBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFAdminMenu) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfAdminMenuBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Vote) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range voteBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Skin) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range skinBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Tree) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range treeBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Doc) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range docBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CurrentChartDataMinutely) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range currentChartDataMinutelyBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Origin) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range originBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Latency) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range latencyBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Email) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range emailBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *StockKeepingUnitContent) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range stockKeepingUnitContentBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BookCategory) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range bookCategoryBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Task) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range taskBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Weather) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range weatherBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Comment) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range commentBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Failure) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range failureBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Channel) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range channelBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Segment) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range segmentBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Board) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range boardBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Friendship) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range friendshipBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RestaurantRank) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range restaurantRankBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Organism) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range organismBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecipeAdditive) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range recipeAdditiveBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FilesStorage) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range filesStorageBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Inventory) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range inventoryBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RentalRower) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rentalRowerBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *StockCvterm) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range stockCvtermBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *WithdrawalCrypto) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range withdrawalCryptoBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PublisherSearchIdx) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range publisherSearchIdxBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *TrainingCost) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range trainingCostBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BlackCard) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range blackCardBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Phenotypeprop) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range phenotypepropBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AuthToken) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range authTokenBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Peer) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range peerBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Cvtermsynonym) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range cvtermsynonymBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Picture) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range pictureBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *OauthClient) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range oauthClientBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecordMeasure) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range recordMeasureBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Asset) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range assetBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FeatureRelationship) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range featureRelationshipBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Project) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range projectBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Project) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range projectBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AuthItemGroup) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range authItemGroupBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *UserGoogle) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range userGoogleBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Currency) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range currencyBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFFamiliesPolicy) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfFamiliesPolicyBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFMusic) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfMusicBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FeatureCvtermDbxref) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range featureCvtermDbxrefBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFSlideItem) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfSlideItemBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ScheduleSubject) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range scheduleSubjectBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BookCategoryAssign) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range bookCategoryAssignBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ExchangeCurrency) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range exchangeCurrencyBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *DestinationRank) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range destinationRankBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFFamilyUserPoliciesTake) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfFamilyUserPoliciesTakeBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *APIKey) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range apiKeyBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFPaidprogramComment) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfPaidprogramCommentBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BoardsSectionsPosition) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range boardsSectionsPositionBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PeerProperty) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range peerPropertyBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RowerGroup) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rowerGroupBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *MultiAddressesSet) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range multiAddressesSetBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Address) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range addressBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FilesStorage) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range filesStorageBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Kvstore) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range kvstoreBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *StockKeepingUnitContent) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range stockKeepingUnitContentBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFAdminMenu) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfAdminMenuBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Post) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range postBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Vendor) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range vendorAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Customer) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range customerAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Tenant) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range tenantBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *TrainingCost) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range trainingCostAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFBalanceChargeAdmin) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfBalanceChargeAdminBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}"
] |
[
"0.87337714",
"0.87178564",
"0.86924595",
"0.86725897",
"0.8662433",
"0.8657633",
"0.8644659",
"0.86240286",
"0.86181426",
"0.859662",
"0.85947835",
"0.85837317",
"0.85827595",
"0.85772365",
"0.8576875",
"0.85729474",
"0.85659724",
"0.8565024",
"0.8563398",
"0.8553846",
"0.8553729",
"0.8548584",
"0.8546339",
"0.8543705",
"0.85217625",
"0.8516064",
"0.851496",
"0.8513813",
"0.85134584",
"0.8513394",
"0.8511393",
"0.8511046",
"0.8497119",
"0.8495703",
"0.8494879",
"0.8493396",
"0.8481832",
"0.8480544",
"0.84787565",
"0.84765494",
"0.846563",
"0.8463602",
"0.8462442",
"0.8462335",
"0.84566337",
"0.845177",
"0.8450209",
"0.8445825",
"0.84435093",
"0.84328204",
"0.8413596",
"0.84050214",
"0.8402792",
"0.8402502",
"0.8402453",
"0.8373928",
"0.83655876",
"0.83644676",
"0.8357823",
"0.8351026",
"0.8350749",
"0.83505756",
"0.8350532",
"0.83447295",
"0.8338437",
"0.83384323",
"0.8334379",
"0.8333148",
"0.83201784",
"0.83198833",
"0.83198833",
"0.8315584",
"0.8313098",
"0.8310744",
"0.82780814",
"0.82744145",
"0.8271257",
"0.82582897",
"0.8254543",
"0.8229161",
"0.81751406",
"0.8172812",
"0.8167055",
"0.81409043",
"0.81189215",
"0.80926996",
"0.80557406",
"0.8025755",
"0.8009106",
"0.7964861",
"0.7210181",
"0.71775466",
"0.71028936",
"0.70808",
"0.7069676",
"0.7066405",
"0.7044207",
"0.7040714",
"0.70400625",
"0.70371544"
] |
0.83525085
|
59
|
doBeforeUpsertHooks executes all "before Upsert" hooks.
|
func (o *AssetRevision) doBeforeUpsertHooks(exec boil.Executor) (err error) {
for _, hook := range assetRevisionBeforeUpsertHooks {
if err := hook(exec, o); err != nil {
return err
}
}
return nil
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (o *Jet) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range jetBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Post) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range postBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Auth) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range authBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Offer) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range offerBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Employee) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range employeeBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Storestate) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range storestateBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Subscriber) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range subscriberBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *InstrumentClass) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range instrumentClassBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Kvstore) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range kvstoreBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Customer) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range customerBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Repository) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range repositoryBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFUserSuper) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfUserSuperBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Skin) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range skinBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Failure) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range failureBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Utxo) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range utxoBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Shelf) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range shelfBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Description) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range descriptionBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PaymentObject) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range paymentObjectBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Origin) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range originBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Email) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range emailBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Vendor) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range vendorBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Asset) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range assetBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Doc) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range docBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Illness) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range illnessBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Tenant) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range tenantBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *APIKey) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range apiKeyBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFTurntable) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfTurntableBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Building) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range buildingBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Inventory) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range inventoryBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Organism) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range organismBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Job) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range jobBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Latency) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range latencyBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Smallblog) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range smallblogBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Currency) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range currencyBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Weather) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range weatherBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RawVisit) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range rawVisitBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CurrentChartDataMinutely) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range currentChartDataMinutelyBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFUserExperienceLog) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfUserExperienceLogBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Task) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range taskBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PublisherSearchIdx) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range publisherSearchIdxBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Vote) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range voteBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Notification) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range notificationBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Phenotypeprop) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range phenotypepropBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ActivityLog) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range activityLogBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Board) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range boardBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Segment) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range segmentBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecipeLipid) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range recipeLipidBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecordMeasure) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range recordMeasureBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *OauthClient) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range oauthClientBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Peer) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range peerBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Rental) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rentalBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AuthItemGroup) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range authItemGroupBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Picture) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range pictureBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Comment) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range commentBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *UserGoogle) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range userGoogleBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Friendship) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range friendshipBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BlackCard) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range blackCardBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Address) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range addressBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BookCategory) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range bookCategoryBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RestaurantRank) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range restaurantRankBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *DestinationRank) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range destinationRankBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PeerProperty) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range peerPropertyBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ScheduleSubject) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range scheduleSubjectBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *TrainingCost) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range trainingCostBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *MultiAddressesSet) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range multiAddressesSetBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RentalRower) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rentalRowerBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFFamilyUserPoliciesTake) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfFamilyUserPoliciesTakeBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Project) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range projectBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Project) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range projectBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BookCategoryAssign) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range bookCategoryAssignBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ExchangeCurrency) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range exchangeCurrencyBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Tree) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range treeBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *StockKeepingUnitContent) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range stockKeepingUnitContentBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RowerGroup) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rowerGroupBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AuthToken) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range authTokenBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FilesStorage) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range filesStorageBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecipeAdditive) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range recipeAdditiveBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FeatureRelationship) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range featureRelationshipBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Channel) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range channelBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFBalanceChargeAdmin) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfBalanceChargeAdminBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Cvtermsynonym) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range cvtermsynonymBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *WithdrawalCrypto) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range withdrawalCryptoBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BoardsSectionsPosition) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range boardsSectionsPositionBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFAdminMenu) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfAdminMenuBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FeatureCvtermDbxref) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range featureCvtermDbxrefBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFFamiliesPolicy) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfFamiliesPolicyBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFSlideItem) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfSlideItemBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFMusic) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfMusicBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *StockCvterm) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range stockCvtermBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFPaidprogramComment) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfPaidprogramCommentBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Auth) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range authAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Employee) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range employeeAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFUserSuper) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfUserSuperAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Vendor) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range vendorAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Offer) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range offerAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Kvstore) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range kvstoreAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Jet) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range jetAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Latency) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range latencyAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Storestate) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range storestateAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Customer) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range customerAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}"
] |
[
"0.86141",
"0.8598125",
"0.8578505",
"0.85601825",
"0.8531944",
"0.8520093",
"0.85170937",
"0.8476417",
"0.8472786",
"0.8424399",
"0.8422492",
"0.8394538",
"0.8383337",
"0.83811975",
"0.8378102",
"0.8377401",
"0.8376499",
"0.8359303",
"0.83519673",
"0.83516544",
"0.8344176",
"0.8337452",
"0.8337092",
"0.83367896",
"0.83315194",
"0.83293295",
"0.83224887",
"0.83211327",
"0.83104473",
"0.8298573",
"0.829128",
"0.82911164",
"0.82796174",
"0.827593",
"0.8274239",
"0.8261627",
"0.8257231",
"0.82562417",
"0.8254017",
"0.82489157",
"0.8246753",
"0.82412535",
"0.82389754",
"0.8234556",
"0.8232598",
"0.8228854",
"0.8223791",
"0.82188416",
"0.8207046",
"0.820231",
"0.8200067",
"0.8199808",
"0.81997377",
"0.81925744",
"0.8189734",
"0.81839406",
"0.817722",
"0.8176191",
"0.8165517",
"0.8159375",
"0.81488806",
"0.8140127",
"0.8139815",
"0.813829",
"0.81300944",
"0.81168234",
"0.81074685",
"0.80791765",
"0.80791765",
"0.8076325",
"0.80753994",
"0.8070652",
"0.80597407",
"0.8053173",
"0.8045061",
"0.80449235",
"0.8011179",
"0.80045897",
"0.799479",
"0.7986542",
"0.79433095",
"0.7923054",
"0.7875398",
"0.7780569",
"0.7765773",
"0.7764492",
"0.77639574",
"0.774964",
"0.77293605",
"0.7619969",
"0.7536341",
"0.7463123",
"0.7457234",
"0.74543506",
"0.7450205",
"0.7444081",
"0.7443602",
"0.7436729",
"0.7420541",
"0.7418581"
] |
0.8180116
|
56
|
doAfterInsertHooks executes all "after Insert" hooks.
|
func (o *AssetRevision) doAfterInsertHooks(exec boil.Executor) (err error) {
for _, hook := range assetRevisionAfterInsertHooks {
if err := hook(exec, o); err != nil {
return err
}
}
return nil
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (o *Jet) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range jetAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Post) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range postAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Storestate) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range storestateAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Subscriber) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range subscriberAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Smallblog) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range smallblogAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFTurntable) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfTurntableAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Organism) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range organismAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Employee) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range employeeAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *InstrumentClass) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range instrumentClassAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Description) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range descriptionAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Repository) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range repositoryAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Illness) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range illnessAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Skin) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range skinAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Utxo) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range utxoAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Building) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range buildingAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Rental) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rentalAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Customer) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range customerAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Offer) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range offerAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Auth) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range authAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RawVisit) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range rawVisitAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Kvstore) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range kvstoreAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFUserSuper) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfUserSuperAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Shelf) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range shelfAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Tree) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range treeAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFUserExperienceLog) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfUserExperienceLogAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Vote) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range voteAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ActivityLog) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range activityLogAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Board) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range boardAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BookCategory) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range bookCategoryAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *StockKeepingUnitContent) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range stockKeepingUnitContentAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Notification) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range notificationAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Doc) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range docAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BlackCard) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range blackCardAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Failure) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range failureAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Origin) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range originAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Tenant) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range tenantAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecipeLipid) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range recipeLipidAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Job) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range jobAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Comment) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range commentAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Cvtermsynonym) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range cvtermsynonymAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CurrentChartDataMinutely) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range currentChartDataMinutelyAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Weather) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range weatherAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Inventory) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range inventoryAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFAdminMenu) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfAdminMenuAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Email) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range emailAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Vendor) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range vendorAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PaymentObject) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range paymentObjectAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Latency) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range latencyAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Task) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range taskAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFBalanceChargeAdmin) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfBalanceChargeAdminAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AuthItemGroup) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range authItemGroupAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PublisherSearchIdx) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range publisherSearchIdxAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Picture) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range pictureAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FeatureCvtermDbxref) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range featureCvtermDbxrefAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Friendship) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range friendshipAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Segment) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range segmentAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RentalRower) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rentalRowerAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ScheduleSubject) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range scheduleSubjectAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Phenotypeprop) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range phenotypepropAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Peer) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range peerAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BookCategoryAssign) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range bookCategoryAssignAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Currency) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range currencyAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Asset) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range assetAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BoardsSectionsPosition) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range boardsSectionsPositionAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RestaurantRank) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range restaurantRankAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecordMeasure) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range recordMeasureAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AuthToken) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range authTokenAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FeatureRelationship) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range featureRelationshipAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RowerGroup) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rowerGroupAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Address) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range addressAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Channel) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range channelAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *MultiAddressesSet) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range multiAddressesSetAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *StockCvterm) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range stockCvtermAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *DestinationRank) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range destinationRankAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *WithdrawalCrypto) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range withdrawalCryptoAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecipeAdditive) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range recipeAdditiveAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Project) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range projectAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Project) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range projectAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFSlideItem) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfSlideItemAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *OauthClient) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range oauthClientAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ExchangeCurrency) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range exchangeCurrencyAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *UserGoogle) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range userGoogleAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FilesStorage) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range filesStorageAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFFamiliesPolicy) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfFamiliesPolicyAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Post) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range postBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *APIKey) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range apiKeyAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *TrainingCost) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range trainingCostAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFMusic) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfMusicAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFFamilyUserPoliciesTake) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfFamilyUserPoliciesTakeAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFPaidprogramComment) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfPaidprogramCommentAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PeerProperty) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range peerPropertyAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Failure) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range failureBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Description) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range descriptionBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Jet) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range jetBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Organism) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range organismBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *InstrumentClass) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range instrumentClassBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Subscriber) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range subscriberBeforeInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Auth) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range authBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Offer) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range offerBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Post) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range postAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}"
] |
[
"0.860542",
"0.85846686",
"0.84400994",
"0.8436893",
"0.8418096",
"0.84163463",
"0.8414126",
"0.84006995",
"0.84005594",
"0.83888274",
"0.83887297",
"0.8357474",
"0.8356657",
"0.83557767",
"0.8330352",
"0.83281046",
"0.83232707",
"0.8318495",
"0.8316694",
"0.8316452",
"0.83000743",
"0.8281807",
"0.8271397",
"0.8267888",
"0.8265284",
"0.82629967",
"0.8252944",
"0.8250872",
"0.8240589",
"0.82349765",
"0.8227679",
"0.82210165",
"0.8220219",
"0.82017",
"0.8199836",
"0.8196779",
"0.8172236",
"0.8171501",
"0.81619763",
"0.81578964",
"0.8148885",
"0.8135285",
"0.81337035",
"0.813244",
"0.8129218",
"0.8128759",
"0.81243455",
"0.8118029",
"0.81097335",
"0.80946594",
"0.8083358",
"0.8066744",
"0.80626756",
"0.80591244",
"0.8049082",
"0.80465424",
"0.80458266",
"0.80305827",
"0.80305374",
"0.801551",
"0.80140954",
"0.80075836",
"0.79844564",
"0.7963413",
"0.7954511",
"0.79363835",
"0.792799",
"0.792486",
"0.7915206",
"0.79138476",
"0.79058844",
"0.7901768",
"0.78878915",
"0.7882578",
"0.78689533",
"0.78641903",
"0.78507024",
"0.78507024",
"0.7838737",
"0.78379005",
"0.7834425",
"0.7813128",
"0.78056926",
"0.77996695",
"0.7798123",
"0.77910906",
"0.7783534",
"0.77360046",
"0.76446944",
"0.76266915",
"0.75970745",
"0.74564224",
"0.7435274",
"0.7423593",
"0.7311152",
"0.72926426",
"0.7286613",
"0.7247908",
"0.72219896",
"0.7162592"
] |
0.8084304
|
50
|
doAfterSelectHooks executes all "after Select" hooks.
|
func (o *AssetRevision) doAfterSelectHooks(exec boil.Executor) (err error) {
for _, hook := range assetRevisionAfterSelectHooks {
if err := hook(exec, o); err != nil {
return err
}
}
return nil
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (o *Jet) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range jetAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Post) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range postAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RawVisit) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range rawVisitAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Description) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range descriptionAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFTurntable) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfTurntableAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFAdminMenu) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfAdminMenuAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Rental) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rentalAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Repository) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range repositoryAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Offer) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range offerAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Subscriber) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range subscriberAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Employee) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range employeeAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CurrentChartDataMinutely) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range currentChartDataMinutelyAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Building) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range buildingAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Utxo) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range utxoAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Organism) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range organismAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecordMeasure) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range recordMeasureAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Failure) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range failureAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Customer) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range customerAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Tree) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range treeAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Vote) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range voteAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *InstrumentClass) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range instrumentClassAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Storestate) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range storestateAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFUserSuper) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfUserSuperAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Kvstore) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range kvstoreAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Auth) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range authAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Skin) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range skinAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BlackCard) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range blackCardAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Origin) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range originAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RentalRower) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rentalRowerAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Comment) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range commentAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Illness) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range illnessAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Doc) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range docAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecipeLipid) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range recipeLipidAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Inventory) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range inventoryAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFUserExperienceLog) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfUserExperienceLogAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *StockKeepingUnitContent) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range stockKeepingUnitContentAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Segment) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range segmentAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Latency) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range latencyAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *StockCvterm) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range stockCvtermAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Job) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range jobAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Tenant) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range tenantAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Cvtermsynonym) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range cvtermsynonymAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Board) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range boardAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Phenotypeprop) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range phenotypepropAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Shelf) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range shelfAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PublisherSearchIdx) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range publisherSearchIdxAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Vendor) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range vendorAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Currency) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range currencyAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AuthItemGroup) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range authItemGroupAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BookCategory) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range bookCategoryAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Smallblog) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range smallblogAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RowerGroup) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rowerGroupAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Weather) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range weatherAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Notification) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range notificationAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ActivityLog) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range activityLogAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FeatureCvtermDbxref) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range featureCvtermDbxrefAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PaymentObject) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range paymentObjectAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFBalanceChargeAdmin) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfBalanceChargeAdminAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Asset) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range assetAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ExchangeCurrency) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range exchangeCurrencyAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Email) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range emailAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Channel) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range channelAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Picture) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range pictureAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ScheduleSubject) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range scheduleSubjectAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RestaurantRank) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range restaurantRankAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFSlideItem) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfSlideItemAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Project) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range projectAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Project) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range projectAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Peer) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range peerAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Task) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range taskAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BookCategoryAssign) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range bookCategoryAssignAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BoardsSectionsPosition) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range boardsSectionsPositionAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *MultiAddressesSet) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range multiAddressesSetAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Friendship) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range friendshipAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Address) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range addressAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *OauthClient) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range oauthClientAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FeatureRelationship) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range featureRelationshipAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AuthToken) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range authTokenAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecipeAdditive) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range recipeAdditiveAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *UserGoogle) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range userGoogleAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *DestinationRank) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range destinationRankAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *APIKey) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range apiKeyAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFPaidprogramComment) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfPaidprogramCommentAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *WithdrawalCrypto) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range withdrawalCryptoAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFFamiliesPolicy) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfFamiliesPolicyAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFMusic) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfMusicAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PeerProperty) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range peerPropertyAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFFamilyUserPoliciesTake) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfFamilyUserPoliciesTakeAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FilesStorage) doAfterSelectHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range filesStorageAfterSelectHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *TrainingCost) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range trainingCostAfterSelectHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFAdminMenu) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfAdminMenuAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFAdminMenu) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfAdminMenuAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (s *Store) AfterSelect(i interface{}) error {\n\treturn s.encryptor.DecryptStruct(i)\n}",
"func (o *CMFAdminMenu) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfAdminMenuAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFAdminMenu) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfAdminMenuAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RawVisit) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range rawVisitAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecordMeasure) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range recordMeasureAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AuthItemGroup) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range authItemGroupAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Tree) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range treeAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Offer) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range offerAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}"
] |
[
"0.85373646",
"0.8437082",
"0.8391363",
"0.8369089",
"0.83446944",
"0.83238935",
"0.8318218",
"0.83027244",
"0.8285051",
"0.8273245",
"0.8263595",
"0.82487786",
"0.8242144",
"0.82365996",
"0.82317036",
"0.82277966",
"0.82231927",
"0.82170963",
"0.82081413",
"0.8204968",
"0.8200104",
"0.8169643",
"0.81531405",
"0.8148704",
"0.81477815",
"0.8140459",
"0.81359917",
"0.81279534",
"0.81222636",
"0.811498",
"0.8113403",
"0.8111285",
"0.8108624",
"0.8097319",
"0.8096068",
"0.8093599",
"0.8088015",
"0.8086134",
"0.807361",
"0.8070842",
"0.80684805",
"0.8064875",
"0.8053353",
"0.8049388",
"0.80485153",
"0.8034517",
"0.8034068",
"0.8032358",
"0.80289406",
"0.80188555",
"0.800738",
"0.7995032",
"0.7994015",
"0.7992188",
"0.79739356",
"0.7968215",
"0.7963264",
"0.7958152",
"0.7940389",
"0.79217535",
"0.7918819",
"0.79062563",
"0.788709",
"0.78808755",
"0.78690773",
"0.7866533",
"0.78497535",
"0.78497535",
"0.7843112",
"0.78389287",
"0.783146",
"0.7829831",
"0.7815849",
"0.779967",
"0.77973706",
"0.7782226",
"0.7781134",
"0.7764858",
"0.77506214",
"0.77298284",
"0.76700914",
"0.7641",
"0.7625634",
"0.7624085",
"0.76218903",
"0.7617588",
"0.7602536",
"0.7586567",
"0.75863075",
"0.7481419",
"0.62012875",
"0.61731166",
"0.60767555",
"0.6001587",
"0.5969814",
"0.5960149",
"0.594046",
"0.5939101",
"0.5938645",
"0.5931178"
] |
0.7998286
|
51
|
doAfterUpdateHooks executes all "after Update" hooks.
|
func (o *AssetRevision) doAfterUpdateHooks(exec boil.Executor) (err error) {
for _, hook := range assetRevisionAfterUpdateHooks {
if err := hook(exec, o); err != nil {
return err
}
}
return nil
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (o *Jet) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range jetAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Post) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range postAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RawVisit) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range rawVisitAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Employee) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range employeeAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFTurntable) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfTurntableAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Repository) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range repositoryAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFUserExperienceLog) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfUserExperienceLogAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Subscriber) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range subscriberAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Weather) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range weatherAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Rental) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rentalAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Skin) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range skinAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Description) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range descriptionAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Utxo) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range utxoAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFUserSuper) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfUserSuperAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Illness) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range illnessAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ActivityLog) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range activityLogAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Vote) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range voteAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Notification) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range notificationAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *InstrumentClass) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range instrumentClassAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Offer) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range offerAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Latency) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range latencyAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Organism) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range organismAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFAdminMenu) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfAdminMenuAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Job) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range jobAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Peer) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range peerAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Auth) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range authAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Building) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range buildingAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Board) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range boardAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PaymentObject) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range paymentObjectAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Failure) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range failureAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Storestate) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range storestateAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BookCategory) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range bookCategoryAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BlackCard) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range blackCardAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Smallblog) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range smallblogAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Origin) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range originAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Kvstore) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range kvstoreAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFBalanceChargeAdmin) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfBalanceChargeAdminAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RentalRower) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rentalRowerAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CurrentChartDataMinutely) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range currentChartDataMinutelyAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Vendor) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range vendorAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Friendship) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range friendshipAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Asset) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range assetAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Task) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range taskAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecipeLipid) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range recipeLipidAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Customer) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range customerAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Channel) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range channelAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Email) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range emailAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Cvtermsynonym) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range cvtermsynonymAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *StockKeepingUnitContent) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range stockKeepingUnitContentAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Tree) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range treeAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Currency) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range currencyAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Shelf) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range shelfAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecordMeasure) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range recordMeasureAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Inventory) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range inventoryAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Comment) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range commentAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Tenant) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range tenantAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Doc) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range docAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Picture) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range pictureAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Phenotypeprop) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range phenotypepropAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Segment) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range segmentAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ScheduleSubject) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range scheduleSubjectAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *StockCvterm) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range stockCvtermAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecipeAdditive) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range recipeAdditiveAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RestaurantRank) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range restaurantRankAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *WithdrawalCrypto) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range withdrawalCryptoAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BoardsSectionsPosition) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range boardsSectionsPositionAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Project) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range projectAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Project) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range projectAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFSlideItem) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfSlideItemAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFMusic) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfMusicAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ExchangeCurrency) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range exchangeCurrencyAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AuthItemGroup) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range authItemGroupAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PeerProperty) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range peerPropertyAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BookCategoryAssign) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range bookCategoryAssignAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PublisherSearchIdx) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range publisherSearchIdxAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *TrainingCost) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range trainingCostAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Address) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range addressAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *UserGoogle) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range userGoogleAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *DestinationRank) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range destinationRankAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AuthToken) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range authTokenAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *OauthClient) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range oauthClientAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *APIKey) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range apiKeyAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FilesStorage) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range filesStorageAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FeatureCvtermDbxref) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range featureCvtermDbxrefAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FeatureRelationship) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range featureRelationshipAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFFamilyUserPoliciesTake) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfFamilyUserPoliciesTakeAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFPaidprogramComment) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfPaidprogramCommentAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *MultiAddressesSet) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range multiAddressesSetAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFFamiliesPolicy) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfFamiliesPolicyAfterUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RowerGroup) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rowerGroupAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Post) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range postBeforeUpdateHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Weather) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range weatherAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Jet) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range jetAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AssetRevision) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range assetRevisionAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Weather) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range weatherAfterInsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Skin) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range skinAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Vote) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range voteAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Employee) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range employeeAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Failure) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range failureBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Weather) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range weatherAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}"
] |
[
"0.8678766",
"0.85431474",
"0.85142934",
"0.85096884",
"0.8488221",
"0.8482586",
"0.8470246",
"0.8457125",
"0.84393597",
"0.84336174",
"0.84297734",
"0.84247094",
"0.8422081",
"0.8417568",
"0.8412393",
"0.84055734",
"0.840286",
"0.8392996",
"0.83915186",
"0.83802915",
"0.837275",
"0.83640504",
"0.83515036",
"0.8348948",
"0.8348666",
"0.83465445",
"0.83382773",
"0.83309203",
"0.83240116",
"0.8318972",
"0.8316905",
"0.8315867",
"0.83124095",
"0.83039457",
"0.82969993",
"0.82919383",
"0.8275172",
"0.8273112",
"0.8270673",
"0.82657605",
"0.8260242",
"0.82599723",
"0.82400286",
"0.82389295",
"0.8237202",
"0.8230212",
"0.82259065",
"0.8220517",
"0.81912297",
"0.8185989",
"0.8182387",
"0.81802803",
"0.8176141",
"0.81757677",
"0.8145202",
"0.8143163",
"0.8141746",
"0.8123342",
"0.8107403",
"0.8100919",
"0.81005377",
"0.8100247",
"0.80948746",
"0.8091945",
"0.8075709",
"0.8056647",
"0.8033575",
"0.8033575",
"0.80292386",
"0.8014497",
"0.8009364",
"0.8005077",
"0.7985155",
"0.79726636",
"0.79700935",
"0.7961199",
"0.7940272",
"0.7931029",
"0.79290825",
"0.7903863",
"0.7873213",
"0.78614783",
"0.78494966",
"0.78467554",
"0.78229445",
"0.78109974",
"0.7794141",
"0.77599025",
"0.7717115",
"0.76289564",
"0.70032847",
"0.6888662",
"0.6845338",
"0.68412155",
"0.6796942",
"0.67934495",
"0.67783904",
"0.67779833",
"0.6775946",
"0.67694557"
] |
0.8270062
|
39
|
doAfterDeleteHooks executes all "after Delete" hooks.
|
func (o *AssetRevision) doAfterDeleteHooks(exec boil.Executor) (err error) {
for _, hook := range assetRevisionAfterDeleteHooks {
if err := hook(exec, o); err != nil {
return err
}
}
return nil
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (o *Jet) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range jetAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Post) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range postAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Subscriber) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range subscriberAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Repository) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range repositoryAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Notification) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range notificationAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Employee) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range employeeAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFTurntable) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfTurntableAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Description) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range descriptionAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Smallblog) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range smallblogAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Kvstore) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range kvstoreAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Rental) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rentalAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFAdminMenu) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfAdminMenuAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFUserExperienceLog) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfUserExperienceLogAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Storestate) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range storestateAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Offer) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range offerAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Auth) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range authAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Vote) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range voteAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RawVisit) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range rawVisitAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Job) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range jobAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Utxo) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range utxoAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Customer) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range customerAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Shelf) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range shelfAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFUserSuper) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfUserSuperAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFBalanceChargeAdmin) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfBalanceChargeAdminAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Illness) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range illnessAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BookCategory) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range bookCategoryAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ActivityLog) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range activityLogAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *StockKeepingUnitContent) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range stockKeepingUnitContentAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *InstrumentClass) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range instrumentClassAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Tenant) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range tenantAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CurrentChartDataMinutely) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range currentChartDataMinutelyAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Building) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range buildingAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Comment) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range commentAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Email) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range emailAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Segment) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range segmentAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FilesStorage) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range filesStorageAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Skin) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range skinAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BlackCard) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range blackCardAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *StockCvterm) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range stockCvtermAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Friendship) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range friendshipAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Failure) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range failureAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PaymentObject) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range paymentObjectAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RestaurantRank) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range restaurantRankAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Channel) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range channelAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Origin) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range originAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Organism) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range organismAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Cvtermsynonym) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range cvtermsynonymAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Inventory) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range inventoryAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Doc) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range docAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Vendor) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range vendorAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Tree) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range treeAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Board) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range boardAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecipeLipid) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range recipeLipidAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Task) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range taskAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Weather) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range weatherAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecordMeasure) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range recordMeasureAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Latency) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range latencyAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Picture) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range pictureAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RentalRower) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rentalRowerAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AuthToken) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range authTokenAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FeatureCvtermDbxref) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range featureCvtermDbxrefAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Peer) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range peerAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Asset) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range assetAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FeatureRelationship) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range featureRelationshipAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Currency) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range currencyAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecipeAdditive) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range recipeAdditiveAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFMusic) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfMusicAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AuthItemGroup) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range authItemGroupAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Phenotypeprop) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range phenotypepropAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFSlideItem) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfSlideItemAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ScheduleSubject) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range scheduleSubjectAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFFamiliesPolicy) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfFamiliesPolicyAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *WithdrawalCrypto) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range withdrawalCryptoAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PublisherSearchIdx) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range publisherSearchIdxAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *OauthClient) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range oauthClientAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *DestinationRank) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range destinationRankAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *UserGoogle) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range userGoogleAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BookCategoryAssign) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range bookCategoryAssignAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ExchangeCurrency) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range exchangeCurrencyAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BoardsSectionsPosition) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range boardsSectionsPositionAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *TrainingCost) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range trainingCostAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Project) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range projectAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Project) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range projectAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFFamilyUserPoliciesTake) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfFamilyUserPoliciesTakeAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *APIKey) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range apiKeyAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFPaidprogramComment) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfPaidprogramCommentAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Address) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range addressAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RowerGroup) doAfterDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rowerGroupAfterDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PeerProperty) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range peerPropertyAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *MultiAddressesSet) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range multiAddressesSetAfterDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Post) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range postBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Description) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range descriptionBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Jet) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range jetBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Failure) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range failureBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Subscriber) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range subscriberBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Auth) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range authBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FilesStorage) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range filesStorageAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Notification) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range notificationBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *InstrumentClass) doBeforeDeleteHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range instrumentClassBeforeDeleteHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Employee) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range employeeBeforeDeleteHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}"
] |
[
"0.85830826",
"0.8548417",
"0.85061806",
"0.84921855",
"0.8489553",
"0.84872216",
"0.8478149",
"0.8467705",
"0.8417217",
"0.8410477",
"0.83937585",
"0.83857244",
"0.8384933",
"0.83722323",
"0.8371549",
"0.83709925",
"0.8365556",
"0.83634853",
"0.83565867",
"0.8348996",
"0.8348022",
"0.8343791",
"0.8338954",
"0.8337167",
"0.8329142",
"0.8328562",
"0.83275634",
"0.83219284",
"0.83175534",
"0.8309844",
"0.8308926",
"0.8307237",
"0.8294242",
"0.82816315",
"0.8280528",
"0.8278328",
"0.82730496",
"0.82718956",
"0.8269707",
"0.82658863",
"0.8262898",
"0.82618034",
"0.8260987",
"0.82585305",
"0.8256676",
"0.8255627",
"0.825183",
"0.8250868",
"0.8245777",
"0.8245188",
"0.8232101",
"0.823035",
"0.8224921",
"0.8219332",
"0.82166994",
"0.81978494",
"0.8181797",
"0.81802136",
"0.8167529",
"0.8154185",
"0.8147387",
"0.8141535",
"0.8114746",
"0.8104891",
"0.8102813",
"0.8094794",
"0.80937344",
"0.8087611",
"0.8086204",
"0.8076055",
"0.8066117",
"0.80578333",
"0.8055299",
"0.8048735",
"0.80451953",
"0.8016398",
"0.8015575",
"0.8014646",
"0.8005874",
"0.79761904",
"0.7912703",
"0.79077685",
"0.79077685",
"0.78934026",
"0.7885817",
"0.7885706",
"0.7810628",
"0.7787046",
"0.7729721",
"0.76858854",
"0.7531303",
"0.7283846",
"0.7223878",
"0.7214957",
"0.71865875",
"0.7121924",
"0.7101366",
"0.7079789",
"0.70225686",
"0.7004811"
] |
0.8184657
|
56
|
doAfterUpsertHooks executes all "after Upsert" hooks.
|
func (o *AssetRevision) doAfterUpsertHooks(exec boil.Executor) (err error) {
for _, hook := range assetRevisionAfterUpsertHooks {
if err := hook(exec, o); err != nil {
return err
}
}
return nil
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (o *Jet) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range jetAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Offer) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range offerAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Auth) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range authAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Post) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range postAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Employee) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range employeeAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Description) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range descriptionAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Subscriber) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range subscriberAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Storestate) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range storestateAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Kvstore) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range kvstoreAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFUserSuper) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfUserSuperAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Repository) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range repositoryAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *InstrumentClass) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range instrumentClassAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Shelf) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range shelfAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Failure) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range failureAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Inventory) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range inventoryAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Organism) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range organismAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Skin) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range skinAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Vote) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range voteAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Notification) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range notificationAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Utxo) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range utxoAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Email) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range emailAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RawVisit) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range rawVisitAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Customer) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range customerAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Origin) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range originAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Doc) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range docAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Tenant) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range tenantAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFTurntable) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfTurntableAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Asset) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range assetAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *APIKey) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range apiKeyAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CurrentChartDataMinutely) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range currentChartDataMinutelyAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Smallblog) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range smallblogAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Vendor) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range vendorAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Rental) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rentalAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PaymentObject) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range paymentObjectAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Illness) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range illnessAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Segment) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range segmentAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFUserExperienceLog) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfUserExperienceLogAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Job) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range jobAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Peer) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range peerAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Latency) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range latencyAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Comment) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range commentAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Address) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range addressAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Currency) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range currencyAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Task) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range taskAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Building) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range buildingAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Picture) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range pictureAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Board) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range boardAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BlackCard) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range blackCardAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecordMeasure) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range recordMeasureAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Phenotypeprop) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range phenotypepropAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecipeLipid) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range recipeLipidAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AuthItemGroup) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range authItemGroupAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ScheduleSubject) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range scheduleSubjectAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RestaurantRank) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range restaurantRankAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Weather) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range weatherAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PublisherSearchIdx) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range publisherSearchIdxAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ActivityLog) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range activityLogAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *DestinationRank) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range destinationRankAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BookCategory) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range bookCategoryAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RentalRower) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rentalRowerAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *UserGoogle) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range userGoogleAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *PeerProperty) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range peerPropertyAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Friendship) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range friendshipAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *StockKeepingUnitContent) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range stockKeepingUnitContentAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RowerGroup) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range rowerGroupAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *OauthClient) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range oauthClientAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FilesStorage) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range filesStorageAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *MultiAddressesSet) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range multiAddressesSetAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Cvtermsynonym) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range cvtermsynonymAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Tree) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range treeAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *ExchangeCurrency) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range exchangeCurrencyAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFFamilyUserPoliciesTake) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfFamilyUserPoliciesTakeAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AuthToken) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range authTokenAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BookCategoryAssign) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range bookCategoryAssignAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FeatureRelationship) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range featureRelationshipAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RecipeAdditive) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range recipeAdditiveAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFBalanceChargeAdmin) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfBalanceChargeAdminAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Project) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range projectAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Project) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range projectAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BoardsSectionsPosition) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range boardsSectionsPositionAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Channel) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range channelAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *TrainingCost) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range trainingCostAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *FeatureCvtermDbxref) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range featureCvtermDbxrefAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFAdminMenu) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfAdminMenuAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Post) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range postBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *StockCvterm) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range stockCvtermAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFSlideItem) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfSlideItemAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *WithdrawalCrypto) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range withdrawalCryptoAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Jet) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range jetBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFFamiliesPolicy) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfFamiliesPolicyAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFMusic) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfMusicAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Failure) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range failureBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Auth) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range authBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *CMFPaidprogramComment) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tif boil.HooksAreSkipped(ctx) {\n\t\treturn nil\n\t}\n\n\tfor _, hook := range cmfPaidprogramCommentAfterUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Offer) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range offerBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Description) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {\n\tfor _, hook := range descriptionBeforeUpsertHooks {\n\t\tif err := hook(ctx, exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Organism) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range organismBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *InstrumentClass) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range instrumentClassBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Address) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range addressBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Storestate) doBeforeUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range storestateBeforeUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}"
] |
[
"0.84940135",
"0.84391314",
"0.8398467",
"0.8397926",
"0.8356971",
"0.8342221",
"0.83157355",
"0.82831776",
"0.8258305",
"0.8252652",
"0.8252138",
"0.82349354",
"0.82310367",
"0.8223457",
"0.8216308",
"0.81781644",
"0.8175342",
"0.81749904",
"0.81712127",
"0.81676936",
"0.816268",
"0.8160212",
"0.81584394",
"0.81489575",
"0.81445193",
"0.81414074",
"0.81338143",
"0.8112708",
"0.810825",
"0.81040114",
"0.8103337",
"0.8102145",
"0.8099537",
"0.80954266",
"0.8088024",
"0.8083472",
"0.8077711",
"0.80721813",
"0.80678844",
"0.8058089",
"0.80568594",
"0.8056363",
"0.80553764",
"0.80471724",
"0.80468935",
"0.80448055",
"0.80386615",
"0.8035587",
"0.80299467",
"0.8023499",
"0.80139625",
"0.8010631",
"0.80038077",
"0.8000026",
"0.79956394",
"0.7993675",
"0.79785323",
"0.7951792",
"0.79463",
"0.79392844",
"0.7933335",
"0.7929301",
"0.79232585",
"0.7915153",
"0.79098713",
"0.7903099",
"0.78974974",
"0.7895803",
"0.78917855",
"0.7883323",
"0.78483856",
"0.78459257",
"0.7841749",
"0.78104585",
"0.7803208",
"0.7792964",
"0.77839994",
"0.77796817",
"0.77796817",
"0.77672035",
"0.776209",
"0.7745892",
"0.76729804",
"0.7647477",
"0.76363367",
"0.763151",
"0.7602149",
"0.759565",
"0.75488204",
"0.7540648",
"0.7524491",
"0.75195444",
"0.74646586",
"0.7446625",
"0.74335885",
"0.74144435",
"0.7338528",
"0.7303413",
"0.72665626",
"0.72599643"
] |
0.8003022
|
53
|
AddAssetRevisionHook registers your hook function for all future operations.
|
func AddAssetRevisionHook(hookPoint boil.HookPoint, assetRevisionHook AssetRevisionHook) {
switch hookPoint {
case boil.BeforeInsertHook:
assetRevisionBeforeInsertHooks = append(assetRevisionBeforeInsertHooks, assetRevisionHook)
case boil.BeforeUpdateHook:
assetRevisionBeforeUpdateHooks = append(assetRevisionBeforeUpdateHooks, assetRevisionHook)
case boil.BeforeDeleteHook:
assetRevisionBeforeDeleteHooks = append(assetRevisionBeforeDeleteHooks, assetRevisionHook)
case boil.BeforeUpsertHook:
assetRevisionBeforeUpsertHooks = append(assetRevisionBeforeUpsertHooks, assetRevisionHook)
case boil.AfterInsertHook:
assetRevisionAfterInsertHooks = append(assetRevisionAfterInsertHooks, assetRevisionHook)
case boil.AfterSelectHook:
assetRevisionAfterSelectHooks = append(assetRevisionAfterSelectHooks, assetRevisionHook)
case boil.AfterUpdateHook:
assetRevisionAfterUpdateHooks = append(assetRevisionAfterUpdateHooks, assetRevisionHook)
case boil.AfterDeleteHook:
assetRevisionAfterDeleteHooks = append(assetRevisionAfterDeleteHooks, assetRevisionHook)
case boil.AfterUpsertHook:
assetRevisionAfterUpsertHooks = append(assetRevisionAfterUpsertHooks, assetRevisionHook)
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func AddAssetHook(hookPoint boil.HookPoint, assetHook AssetHook) {\n\tswitch hookPoint {\n\tcase boil.BeforeInsertHook:\n\t\tassetBeforeInsertHooks = append(assetBeforeInsertHooks, assetHook)\n\tcase boil.BeforeUpdateHook:\n\t\tassetBeforeUpdateHooks = append(assetBeforeUpdateHooks, assetHook)\n\tcase boil.BeforeDeleteHook:\n\t\tassetBeforeDeleteHooks = append(assetBeforeDeleteHooks, assetHook)\n\tcase boil.BeforeUpsertHook:\n\t\tassetBeforeUpsertHooks = append(assetBeforeUpsertHooks, assetHook)\n\tcase boil.AfterInsertHook:\n\t\tassetAfterInsertHooks = append(assetAfterInsertHooks, assetHook)\n\tcase boil.AfterSelectHook:\n\t\tassetAfterSelectHooks = append(assetAfterSelectHooks, assetHook)\n\tcase boil.AfterUpdateHook:\n\t\tassetAfterUpdateHooks = append(assetAfterUpdateHooks, assetHook)\n\tcase boil.AfterDeleteHook:\n\t\tassetAfterDeleteHooks = append(assetAfterDeleteHooks, assetHook)\n\tcase boil.AfterUpsertHook:\n\t\tassetAfterUpsertHooks = append(assetAfterUpsertHooks, assetHook)\n\t}\n}",
"func createVersionPostHook(event *api.Event) {\n\tlogdog.Infof(\"create version post hook\")\n\tif event.Status == api.EventStatusSuccess {\n\t\tevent.Version.Status = api.VersionHealthy\n\t} else if event.Status == api.EventStatusCancel {\n\t\tevent.Version.Status = api.VersionCancel\n\t} else {\n\t\tevent.Version.Status = api.VersionFailed\n\t\tevent.Version.ErrorMessage = event.ErrorMessage\n\t}\n\n\toperation := string(event.Version.Operation)\n\t// Record that whether this event is a deploy for project. According this flag, we will make some special operations.\n\tDeployInProject := false\n\tif (operation == string(api.DeployOperation)) && (event.Version.ProjectVersionID != \"\") {\n\t\tDeployInProject = true\n\t}\n\n\tds := store.NewStore()\n\tdefer ds.Close()\n\n\tif err := ds.UpdateVersionDocument(event.Version.VersionID, event.Version); err != nil {\n\t\tlogdog.Errorf(\"Unable to update version status post hook for %+v: %v\", event.Version, err)\n\t}\n\n\tif remote, err := remoteManager.FindRemote(event.Service.Repository.Webhook); err == nil {\n\t\tif err := remote.PostCommitStatus(&event.Service, &event.Version); err != nil {\n\t\t\tlogdog.Errorf(\"Unable to post commit status to %s: %v\", event.Service.Repository.Webhook, err)\n\t\t}\n\t}\n\n\tif DeployInProject == false {\n\t\tif event.Version.Status == api.VersionHealthy {\n\t\t\tif err := ds.AddNewVersion(event.Version.ServiceID, event.Version.VersionID); err != nil {\n\t\t\t\tlogdog.Errorf(\"Unable to add new version in post hook for %+v: %v\", event.Version, err)\n\t\t\t}\n\t\t} else {\n\t\t\tif err := ds.AddNewFailVersion(event.Version.ServiceID, event.Version.VersionID); err != nil {\n\t\t\t\tlogdog.Errorf(\"Unable to add new version in post hook for %+v: %v\", event.Version, err)\n\t\t\t}\n\t\t}\n\n\t}\n\tif err := ds.UpdateServiceLastInfo(event.Version.ServiceID, event.Version.CreateTime, event.Version.Name); err != nil {\n\t\tlogdog.Errorf(\"Unable to update new version info in service %+v: %v\", event.Version, err)\n\t}\n\n\t// Use for checking project's version deploy status.\n\tif DeployInProject == true {\n\t\tevent.Version.FinalStatus = \"finished\"\n\t}\n\n\t// TODO: poll version log, not query once.\n\tversionLog, err := ds.FindVersionLogByVersionID(event.Version.VersionID)\n\tif err != nil {\n\t\tlogdog.Warnf(\"Notify error, getting version failed: %v\", err)\n\t} else {\n\t\tnotify.Notify(&event.Service, &event.Version, versionLog.Logs)\n\t}\n\n\t// trigger after create end\n\ttriggerHooks(event, PreStopPhase)\n}",
"func (f *ReleaseStoreGetArtifactsFunc) PushHook(hook func(context.Context, int64) ([]byte, []byte, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *ResolverUpdateIndexConfigurationByRepositoryIDFunc) PushHook(hook func(context.Context, int, string) error) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (o *AssetRevision) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range assetRevisionAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (tb *transactionBuilder) AddFileContractRevision(fcr types.FileContractRevision) uint64 {\n\ttb.transaction.FileContractRevisions = append(tb.transaction.FileContractRevisions, fcr)\n\treturn uint64(len(tb.transaction.FileContractRevisions) - 1)\n}",
"func (f *DBStoreCommitsVisibleToUploadFunc) PushHook(hook func(context.Context, int, int, *string) ([]string, *string, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (c *Contractor) saveRevision(id types.FileContractID) func(types.FileContractRevision, []crypto.Hash) error {\n\treturn func(rev types.FileContractRevision, newRoots []crypto.Hash) error {\n\t\tc.mu.Lock()\n\t\tdefer c.mu.Unlock()\n\t\tc.cachedRevisions[id] = cachedRevision{rev, newRoots}\n\t\treturn c.saveSync()\n\t}\n}",
"func (f *UploadServiceGetAuditLogsForUploadFunc) PushHook(hook func(context.Context, int) ([]types.UploadLog, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (o *AssetRevision) doBeforeInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range assetRevisionBeforeInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func AddStockCvtermHook(hookPoint boil.HookPoint, stockCvtermHook StockCvtermHook) {\n\tswitch hookPoint {\n\tcase boil.BeforeInsertHook:\n\t\tstockCvtermBeforeInsertHooks = append(stockCvtermBeforeInsertHooks, stockCvtermHook)\n\tcase boil.BeforeUpdateHook:\n\t\tstockCvtermBeforeUpdateHooks = append(stockCvtermBeforeUpdateHooks, stockCvtermHook)\n\tcase boil.BeforeDeleteHook:\n\t\tstockCvtermBeforeDeleteHooks = append(stockCvtermBeforeDeleteHooks, stockCvtermHook)\n\tcase boil.BeforeUpsertHook:\n\t\tstockCvtermBeforeUpsertHooks = append(stockCvtermBeforeUpsertHooks, stockCvtermHook)\n\tcase boil.AfterInsertHook:\n\t\tstockCvtermAfterInsertHooks = append(stockCvtermAfterInsertHooks, stockCvtermHook)\n\tcase boil.AfterSelectHook:\n\t\tstockCvtermAfterSelectHooks = append(stockCvtermAfterSelectHooks, stockCvtermHook)\n\tcase boil.AfterUpdateHook:\n\t\tstockCvtermAfterUpdateHooks = append(stockCvtermAfterUpdateHooks, stockCvtermHook)\n\tcase boil.AfterDeleteHook:\n\t\tstockCvtermAfterDeleteHooks = append(stockCvtermAfterDeleteHooks, stockCvtermHook)\n\tcase boil.AfterUpsertHook:\n\t\tstockCvtermAfterUpsertHooks = append(stockCvtermAfterUpsertHooks, stockCvtermHook)\n\t}\n}",
"func (f *UploadServiceGetCommitGraphMetadataFunc) PushHook(hook func(context.Context, int) (bool, *time.Time, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *ResolverQueueAutoIndexJobForRepoFunc) PushHook(hook func(context.Context, int) error) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (v *TestValues) AddRevisionInstruction() {\n\tcollateral := modules.MDMRevisionCollateral()\n\tcost := modules.MDMRevisionCost(v.staticPT)\n\tmemory := modules.MDMRevisionMemory()\n\ttime := uint64(modules.MDMTimeRevision)\n\treadonly := true\n\tbatch := false\n\tv.addInstruction(collateral, cost, types.ZeroCurrency, types.ZeroCurrency, memory, time, 0, readonly, batch)\n}",
"func (f *ResolverIndexConfigurationFunc) PushHook(hook func(context.Context, int) ([]byte, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func handleGitPostHook(w http.ResponseWriter, r *http.Request) {\n\n\tbuildNav()\n\tbaseTemplate.loadTemplate()\n\tfmt.Fprintf(w, \"Successfully reloaded base template.\")\n}",
"func FindAssetRevision(exec boil.Executor, orig int, selectCols ...string) (*AssetRevision, error) {\n\tassetRevisionObj := &AssetRevision{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"asset_revision\\\" where \\\"orig\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, orig)\n\n\terr := q.Bind(assetRevisionObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"public: unable to select from asset_revision\")\n\t}\n\n\treturn assetRevisionObj, nil\n}",
"func AssetRevisionExists(exec boil.Executor, orig int) (bool, error) {\n\tvar exists bool\n\n\tquery := \"select exists(select 1 from \\\"asset_revision\\\" where \\\"orig\\\"=$1 limit 1)\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, orig)\n\t}\n\n\trow := exec.QueryRow(query, orig)\n\n\terr := row.Scan(&exists)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"public: unable to check if asset_revision exists\")\n\t}\n\n\treturn exists, nil\n}",
"func (f *AutoIndexingServiceNumRepositoriesWithCodeIntelligenceFunc) PushHook(hook func(context.Context) (int, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *DBStoreUpdateUploadRetentionFunc) PushHook(hook func(context.Context, []int, []int) error) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *ExtensionStoreUpdateFunc) PushHook(hook func(context.Context, int32, *string) error) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (g *Generator) AddPostStartHook(path string, args []string) {\n\tg.initSpec()\n\thook := rspec.Hook{Path: path, Args: args}\n\tg.spec.Hooks.Poststart = append(g.spec.Hooks.Poststart, hook)\n}",
"func LogVersion(logger log.Logger) {\n\tlogger.Info(\"FixAsset\", \"height\", GetFixAssetHeight())\n}",
"func addHooks(repoURL, repoName string, branchName string) {\n\tlog.Infof(\"Calling %s to initialize hooks for repo\", hooksScriptName)\n\toutput, err := exec.Command(hooksScriptName, repoURL, branchName).CombinedOutput()\n\thelper.WriteToFile(path.Join(logDir, \"git\", fmt.Sprintf(\"%s:%s.txt\", repoName, branchName)), string(output))\n\tif err != nil {\n\t\tlog.Errorf(\"initialization of git repo(%s) FAILED - %v\", repoURL, err)\n\t\t_ = slack.PostChatMessage(slack.AllHooksChannelID,\n\t\t\tfmt.Sprintf(\"Initialization of new repo (%s) FAILED\\n\\n See logs at: %s/logs/git/%s.txt\", repoURL, serverURL, repoName), nil)\n\t} else {\n\t\tlog.Info(\"Initialization of git repo SUCCESS\")\n\t\t_ = slack.PostChatMessage(slack.AllHooksChannelID,\n\t\t\tfmt.Sprintf(\"Initialization of new repo (%s) SUCCESS\\n\\n See logs at: %s/logs/git/%s.txt\", repoURL, serverURL, repoName), nil)\n\t}\n}",
"func (o *AssetRevision) doBeforeUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range assetRevisionBeforeUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (f *ExtensionStoreCreateFunc) PushHook(hook func(context.Context, int32, int32, string) (int32, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *ReleaseStoreTransactFunc) PushHook(hook func(context.Context) (stores.ReleaseStore, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *DBStoreDirtyRepositoriesFunc) PushHook(hook func(context.Context) (map[int]int, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *DBStoreDirtyRepositoriesFunc) PushHook(hook func(context.Context) (map[int]int, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func triggerHooks(event *api.Event, phase string) {\n\n\thooks := event.Service.Hooks\n\n\tif hooks == nil {\n\t\treturn\n\t}\n\n\tfor _, hook := range hooks {\n\t\tif hook.Phase == phase {\n\t\t\tlogdog.Info(\"trigger version hook\", log.Fields{\"phase\": phase})\n\t\t\tdata := map[string]string{\n\t\t\t\t\"status\": \"failed\",\n\t\t\t\t\"serviceId\": event.Service.ServiceID,\n\t\t\t\t\"serviceName\": event.Service.Name,\n\t\t\t\t\"versionId\": event.Version.VersionID,\n\t\t\t\t\"versionName\": event.Version.Name,\n\t\t\t\t\"image\": \"\",\n\t\t\t}\n\t\t\tregistryLocation := workerOptions.WorkerEnvs.RegistryLocation\n\t\t\tif phase == PostStartPhase {\n\t\t\t\tdata[\"status\"] = \"building\"\n\t\t\t} else if event.Status == api.EventStatusSuccess {\n\t\t\t\tdata[\"status\"] = \"success\"\n\t\t\t\t// registry/username/service_name:version_name\n\t\t\t\tdata[\"image\"] = fmt.Sprintf(\"%s/%s/%s:%s\",\n\t\t\t\t\tregistryLocation,\n\t\t\t\t\tstrings.ToLower(event.Service.Username),\n\t\t\t\t\tstrings.ToLower(event.Service.Name),\n\t\t\t\t\tevent.Version.Name)\n\t\t\t}\n\t\t\tjsonStr, _ := json.Marshal(data)\n\n\t\t\tclient := getClientWithOauth2(hook.Token)\n\t\t\t_, err := client.Post(hook.Callback, \"application/json\", bytes.NewBuffer(jsonStr))\n\t\t\tif err != nil {\n\t\t\t\tlogdog.Error(\"error occur when callback\", logdog.Fields{\"url\": hook.Callback, \"err\": err})\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t}\n\t}\n}",
"func (f *AutoIndexingServiceRepositoryIDsWithConfigurationFunc) PushHook(hook func(context.Context, int, int) ([]shared.RepositoryWithAvailableIndexers, int, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (api *BasePixiv) HookAccessToken(token func(string)) {\n\tapi.AccessChangeHook = token\n}",
"func (f *ReleaseStoreGetLatestFunc) PushHook(hook func(context.Context, int32, string, bool) (*stores.Release, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *ReleaseStoreCreateFunc) PushHook(hook func(context.Context, *stores.Release) (int64, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *PolicyServiceGetRetentionPolicyOverviewFunc) PushHook(hook func(context.Context, types.Upload, bool, int, int64, string, time.Time) ([]types.RetentionPolicyMatchCandidate, int, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *ResolverGetUploadByIDFunc) PushHook(hook func(context.Context, int) (dbstore.Upload, bool, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func augmentWithRevision(baseCtx context.Context, ns, svc, cfg, rev string) context.Context {\n\tr := resource.Resource{\n\t\tType: ResourceTypeKnativeRevision,\n\t\tLabels: map[string]string{\n\t\t\tLabelNamespaceName: ns,\n\t\t\tLabelServiceName: valueOrUnknown(svc),\n\t\t\tLabelConfigurationName: cfg,\n\t\t\tLabelRevisionName: rev,\n\t\t},\n\t}\n\treturn metricskey.WithResource(baseCtx, r)\n}",
"func (f *ExtensionStoreGetByUUIDFunc) PushHook(hook func(context.Context, string) (*stores.Extension, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *ReleaseStoreGetLatestBatchFunc) PushHook(hook func(context.Context, []int32, string, bool) ([]*stores.Release, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *DBStoreRefreshCommitResolvabilityFunc) PushHook(hook func(context.Context, int, string, bool, time.Time) (int, int, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *ResolverCommitGraphFunc) PushHook(hook func(context.Context, int) (graphqlbackend.CodeIntelligenceCommitGraphResolver, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *ExtensionStoreTransactFunc) PushHook(hook func(context.Context) (stores.ExtensionStore, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *ReleaseStoreHandleFunc) PushHook(hook func() basestore.TransactableHandle) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func AssetRevisions(exec boil.Executor, mods ...qm.QueryMod) assetRevisionQuery {\n\tmods = append(mods, qm.From(\"\\\"asset_revision\\\"\"))\n\treturn assetRevisionQuery{NewQuery(exec, mods...)}\n}",
"func AddRepositoryHook(hookPoint boil.HookPoint, repositoryHook RepositoryHook) {\n\tswitch hookPoint {\n\tcase boil.BeforeInsertHook:\n\t\trepositoryBeforeInsertHooks = append(repositoryBeforeInsertHooks, repositoryHook)\n\tcase boil.BeforeUpdateHook:\n\t\trepositoryBeforeUpdateHooks = append(repositoryBeforeUpdateHooks, repositoryHook)\n\tcase boil.BeforeDeleteHook:\n\t\trepositoryBeforeDeleteHooks = append(repositoryBeforeDeleteHooks, repositoryHook)\n\tcase boil.BeforeUpsertHook:\n\t\trepositoryBeforeUpsertHooks = append(repositoryBeforeUpsertHooks, repositoryHook)\n\tcase boil.AfterInsertHook:\n\t\trepositoryAfterInsertHooks = append(repositoryAfterInsertHooks, repositoryHook)\n\tcase boil.AfterSelectHook:\n\t\trepositoryAfterSelectHooks = append(repositoryAfterSelectHooks, repositoryHook)\n\tcase boil.AfterUpdateHook:\n\t\trepositoryAfterUpdateHooks = append(repositoryAfterUpdateHooks, repositoryHook)\n\tcase boil.AfterDeleteHook:\n\t\trepositoryAfterDeleteHooks = append(repositoryAfterDeleteHooks, repositoryHook)\n\tcase boil.AfterUpsertHook:\n\t\trepositoryAfterUpsertHooks = append(repositoryAfterUpsertHooks, repositoryHook)\n\t}\n}",
"func (f *DBStoreDeleteUploadsWithoutRepositoryFunc) PushHook(hook func(context.Context, time.Time) (map[int]int, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *ExtensionStoreHandleFunc) PushHook(hook func() basestore.TransactableHandle) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (o *AssetRevision) Insert(exec boil.Executor, whitelist ...string) error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no asset_revision provided for insertion\")\n\t}\n\n\tvar err error\n\n\tif err := o.doBeforeInsertHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\tnzDefaults := queries.NonZeroDefaultSet(assetRevisionColumnsWithDefault, o)\n\n\tkey := makeCacheKey(whitelist, nzDefaults)\n\tassetRevisionInsertCacheMut.RLock()\n\tcache, cached := assetRevisionInsertCache[key]\n\tassetRevisionInsertCacheMut.RUnlock()\n\n\tif !cached {\n\t\twl, returnColumns := strmangle.InsertColumnSet(\n\t\t\tassetRevisionColumns,\n\t\t\tassetRevisionColumnsWithDefault,\n\t\t\tassetRevisionColumnsWithoutDefault,\n\t\t\tnzDefaults,\n\t\t\twhitelist,\n\t\t)\n\n\t\tcache.valueMapping, err = queries.BindMapping(assetRevisionType, assetRevisionMapping, wl)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcache.retMapping, err = queries.BindMapping(assetRevisionType, assetRevisionMapping, returnColumns)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif len(wl) != 0 {\n\t\t\tcache.query = fmt.Sprintf(\"INSERT INTO \\\"asset_revision\\\" (\\\"%s\\\") VALUES (%s)\", strings.Join(wl, \"\\\",\\\"\"), strmangle.Placeholders(dialect.IndexPlaceholders, len(wl), 1, 1))\n\t\t} else {\n\t\t\tcache.query = \"INSERT INTO \\\"asset_revision\\\" DEFAULT VALUES\"\n\t\t}\n\n\t\tif len(cache.retMapping) != 0 {\n\t\t\tcache.query += fmt.Sprintf(\" RETURNING \\\"%s\\\"\", strings.Join(returnColumns, \"\\\",\\\"\"))\n\t\t}\n\t}\n\n\tvalue := reflect.Indirect(reflect.ValueOf(o))\n\tvals := queries.ValuesFromMapping(value, cache.valueMapping)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, cache.query)\n\t\tfmt.Fprintln(boil.DebugWriter, vals)\n\t}\n\n\tif len(cache.retMapping) != 0 {\n\t\terr = exec.QueryRow(cache.query, vals...).Scan(queries.PtrsFromMapping(value, cache.retMapping)...)\n\t} else {\n\t\t_, err = exec.Exec(cache.query, vals...)\n\t}\n\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to insert into asset_revision\")\n\t}\n\n\tif !cached {\n\t\tassetRevisionInsertCacheMut.Lock()\n\t\tassetRevisionInsertCache[key] = cache\n\t\tassetRevisionInsertCacheMut.Unlock()\n\t}\n\n\treturn o.doAfterInsertHooks(exec)\n}",
"func (f *ResolverGetUploadsByIDsFunc) PushHook(hook func(context.Context, ...int) ([]dbstore.Upload, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (o *AssetRevision) doAfterUpdateHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range assetRevisionAfterUpdateHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (r *Repository) VersionOnCommit(n int) {\n\tr.createVersion = n\n}",
"func (f *PipelineRunFunc) PushHook(hook func() (interface{}, error)) {\n\tf.hooks = append(f.hooks, hook)\n}",
"func NewNormalizedProjectRevisionHook(configKey string, hook string) *NormalizedProjectRevisionHook {\n\tthis := NormalizedProjectRevisionHook{}\n\tthis.ConfigKey = configKey\n\tthis.Hook = hook\n\treturn &this\n}",
"func FindAssetRevisionGP(orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(boil.GetDB(), orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (f *PipelineAddFunc) PushHook(hook func(string, ...interface{})) {\n\tf.hooks = append(f.hooks, hook)\n}",
"func (g *Generator) AddPostStopHook(path string, args []string) {\n\tg.initSpec()\n\thook := rspec.Hook{Path: path, Args: args}\n\tg.spec.Hooks.Poststop = append(g.spec.Hooks.Poststop, hook)\n}",
"func FindAssetRevisionG(orig int, selectCols ...string) (*AssetRevision, error) {\n\treturn FindAssetRevision(boil.GetDB(), orig, selectCols...)\n}",
"func (l *Logger) Hook(e zapcore.Entry) error {\n\tif l.IsHook {\n\t\terr := log.Emit(&log.Content{\n\t\t\tLevel: e.Level.CapitalString(),\n\t\t\tMessage: e.Message,\n\t\t\tDate: e.Time,\n\t\t\tCaller: e.Caller.TrimmedPath(),\n\t\t\tStack: e.Stack,\n\t\t})\n\t\treturn err\n\t}\n\treturn nil\n}",
"func (m *TestMod) Hook() error {\n\tm.RegisterCommand(NewTestCommand(m))\n\t//m.RegisterCommand(NewMonkeyCommand(m))\n\n\treturn nil\n}",
"func FindAssetRevisionP(exec boil.Executor, orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(exec, orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (f *AutoIndexingServiceGetListTagsFunc) PushHook(hook func(context.Context, api.RepoName, ...string) ([]*gitdomain.Tag, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *ResolverDeleteUploadByIDFunc) PushHook(hook func(context.Context, int) error) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (app *BandApp) AddHook(hook Hook) {\n\tapp.hooks = append(app.hooks, hook)\n}",
"func (f *DBStoreSoftDeleteOldUploadsFunc) PushHook(hook func(context.Context, time.Duration, time.Time) (int, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *AutoIndexingServiceGetIndexByIDFunc) PushHook(hook func(context.Context, int) (types.Index, bool, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *ExtensionStoreGetFeaturedExtensionsFunc) PushHook(hook func(context.Context) ([]*stores.Extension, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (v *VirtualEnvironment) OnInstallArtifacts(f func()) { v.onInstallArtifacts = f }",
"func (f *DBStoreSelectRepositoriesForRetentionScanFunc) PushHook(hook func(context.Context, time.Duration, int) ([]int, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *ExtensionStoreGetByExtensionIDFunc) PushHook(hook func(context.Context, string) (*stores.Extension, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *UploadServiceGetUploadDocumentsForPathFunc) PushHook(hook func(context.Context, int, string) ([]string, int, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func insertHook(db gorp.SqlExecutor, node *sdk.WorkflowNode, hook *sdk.WorkflowNodeHook) error {\n\thook.WorkflowNodeID = node.ID\n\tif hook.WorkflowHookModelID == 0 {\n\t\thook.WorkflowHookModelID = hook.WorkflowHookModel.ID\n\t}\n\n\tvar icon string\n\tif hook.WorkflowHookModelID != 0 {\n\t\ticon = hook.WorkflowHookModel.Icon\n\t\tmodel, errm := LoadHookModelByID(db, hook.WorkflowHookModelID)\n\t\tif errm != nil {\n\t\t\treturn sdk.WrapError(errm, \"insertHook> Unable to load model %d\", hook.WorkflowHookModelID)\n\t\t}\n\t\thook.WorkflowHookModel = *model\n\t} else {\n\t\tmodel, errm := LoadHookModelByName(db, hook.WorkflowHookModel.Name)\n\t\tif errm != nil {\n\t\t\treturn sdk.WrapError(errm, \"insertHook> Unable to load model %s\", hook.WorkflowHookModel.Name)\n\t\t}\n\t\thook.WorkflowHookModel = *model\n\t}\n\thook.WorkflowHookModelID = hook.WorkflowHookModel.ID\n\n\t//TODO: to delete when all previous scheduler are updated\n\tif _, ok := hook.Config[\"payload\"]; hook.WorkflowHookModel.Name == sdk.SchedulerModelName && !ok {\n\t\thook.Config[\"payload\"] = sdk.SchedulerModel.DefaultConfig[\"payload\"]\n\t}\n\n\terrmu := sdk.MultiError{}\n\t// Check configuration of the hook vs the model\n\tfor k := range hook.WorkflowHookModel.DefaultConfig {\n\t\tif _, ok := hook.Config[k]; !ok {\n\t\t\terrmu = append(errmu, fmt.Errorf(\"Missing configuration key: %s\", k))\n\t\t}\n\t}\n\tif len(errmu) > 0 {\n\t\treturn sdk.WrapError(&errmu, \"insertHook> Invalid hook configuration\")\n\t}\n\n\t// if it's a new hook\n\tif hook.UUID == \"\" {\n\t\tuuid, erruuid := sessionstore.NewSessionKey()\n\t\tif erruuid != nil {\n\t\t\treturn sdk.WrapError(erruuid, \"insertHook> Unable to load model %d\", hook.WorkflowHookModelID)\n\t\t}\n\t\thook.UUID = string(uuid)\n\n\t\thook.Config[\"hookIcon\"] = sdk.WorkflowNodeHookConfigValue{\n\t\t\tValue: icon,\n\t\t\tConfigurable: false,\n\t\t}\n\t}\n\n\tdbhook := NodeHook(*hook)\n\tif err := db.Insert(&dbhook); err != nil {\n\t\treturn sdk.WrapError(err, \"insertHook> Unable to insert hook\")\n\t}\n\t*hook = sdk.WorkflowNodeHook(dbhook)\n\treturn nil\n}",
"func (f *ResolverDeleteIndexByIDFunc) PushHook(hook func(context.Context, int) error) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *SubRepoPermissionCheckerEnabledFunc) PushHook(hook func() bool) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (sry *Sryun) Hook(req *http.Request) (*model.Repo, *model.Build, error) {\n\treturn nil, nil, nil\n}",
"func (f *ResolverQueryResolverFunc) PushHook(hook func(context.Context, *graphqlbackend.GitBlobLSIFDataArgs) (resolvers.QueryResolver, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (o *AssetRevision) doAfterUpsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range assetRevisionAfterUpsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func MarkRevisionNameTaken(service *v1.Service) {\n\tservice.Status.MarkRevisionNameTaken(service.Spec.GetTemplate().GetName())\n}",
"func (f *AutoIndexingServiceGetIndexesByIDsFunc) PushHook(hook func(context.Context, ...int) ([]types.Index, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *ResolverGetIndexByIDFunc) PushHook(hook func(context.Context, int) (dbstore.Index, bool, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func AddCMFTurntableHook(hookPoint boil.HookPoint, cmfTurntableHook CMFTurntableHook) {\n\tswitch hookPoint {\n\tcase boil.BeforeInsertHook:\n\t\tcmfTurntableBeforeInsertHooks = append(cmfTurntableBeforeInsertHooks, cmfTurntableHook)\n\tcase boil.BeforeUpdateHook:\n\t\tcmfTurntableBeforeUpdateHooks = append(cmfTurntableBeforeUpdateHooks, cmfTurntableHook)\n\tcase boil.BeforeDeleteHook:\n\t\tcmfTurntableBeforeDeleteHooks = append(cmfTurntableBeforeDeleteHooks, cmfTurntableHook)\n\tcase boil.BeforeUpsertHook:\n\t\tcmfTurntableBeforeUpsertHooks = append(cmfTurntableBeforeUpsertHooks, cmfTurntableHook)\n\tcase boil.AfterInsertHook:\n\t\tcmfTurntableAfterInsertHooks = append(cmfTurntableAfterInsertHooks, cmfTurntableHook)\n\tcase boil.AfterSelectHook:\n\t\tcmfTurntableAfterSelectHooks = append(cmfTurntableAfterSelectHooks, cmfTurntableHook)\n\tcase boil.AfterUpdateHook:\n\t\tcmfTurntableAfterUpdateHooks = append(cmfTurntableAfterUpdateHooks, cmfTurntableHook)\n\tcase boil.AfterDeleteHook:\n\t\tcmfTurntableAfterDeleteHooks = append(cmfTurntableAfterDeleteHooks, cmfTurntableHook)\n\tcase boil.AfterUpsertHook:\n\t\tcmfTurntableAfterUpsertHooks = append(cmfTurntableAfterUpsertHooks, cmfTurntableHook)\n\t}\n}",
"func (f *DBStoreDeleteUploadsStuckUploadingFunc) PushHook(hook func(context.Context, time.Time) (int, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (o *Asset) doAfterInsertHooks(exec boil.Executor) (err error) {\n\tfor _, hook := range assetAfterInsertHooks {\n\t\tif err := hook(exec, o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (f *ExtensionStoreListFunc) PushHook(hook func(context.Context, stores.ExtensionsListOptions) ([]*stores.Extension, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *SubRepoPermissionCheckerPermissionsFunc) PushHook(hook func(context.Context, int32, RepoContent) (Perms, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *DBStoreStaleSourcedCommitsFunc) PushHook(hook func(context.Context, time.Duration, int, time.Time) ([]dbstore.SourcedCommits, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *DBStoreGetUploadsFunc) PushHook(hook func(context.Context, dbstore.GetUploadsOptions) ([]dbstore.Upload, int, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *DBStoreGetUploadsFunc) PushHook(hook func(context.Context, dbstore.GetUploadsOptions) ([]dbstore.Upload, int, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func AssetRevisionExistsP(exec boil.Executor, orig int) bool {\n\te, err := AssetRevisionExists(exec, orig)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn e\n}",
"func (r *Repo) testRevision(rev revision, langEnv languageConfig) error {\n\tconfig := stageConfig{\n\t\tlogger: r.logger,\n\t\tworkingDir: langEnv.workingDir,\n\t\ttty: r.TTY,\n\t\tlogDir: filepath.Join(r.LogDir, rev.logDirName()),\n\t}\n\n\t// set environment variables\n\tconfig.env = r.env\n\n\t// appends language environment variables\n\tif len(langEnv.env) > 0 {\n\t\tconfig.env = append(config.env, langEnv.env...)\n\t}\n\n\t// copy logs to server if we have an IP address\n\tif len(r.LogServer.IP) != 0 {\n\t\tdefer func() {\n\t\t\tif err := r.LogServer.copy(config.logDir); err != nil {\n\t\t\t\tr.logger.Errorf(\"failed to copy log dir %s to server %+v\", config.logDir, r.LogServer)\n\t\t\t}\n\t\t}()\n\t}\n\n\tr.logger.Debugf(\"stage config: %+v\", config)\n\n\tstages := map[string]stage{\n\t\t\"setup\": stage{name: \"setup\", commands: r.Setup},\n\t\t\"run\": stage{name: \"run\", commands: r.Run},\n\t\t\"teardown\": stage{name: \"teardown\", commands: r.Teardown},\n\t\t\"onSuccess\": stage{name: \"onSuccess\", commands: r.OnSuccess},\n\t\t\"onFailure\": stage{name: \"onFailure\", commands: r.OnFailure},\n\t}\n\n\t// run test\n\treturn rev.test(config, stages)\n}",
"func (f *DBStoreHardDeleteUploadByIDFunc) PushHook(hook func(context.Context, ...int) error) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func setAssetTag(requestHandler common.RequestHandler) endpointHandler {\n\treturn func(httpWriter http.ResponseWriter, httpRequest *http.Request) error {\n\t\tlog.Trace(\"resource/asset_tag:setAssetTag() Entering\")\n\t\tdefer log.Trace(\"resource/asset_tag:setAssetTag() Leaving\")\n\n\t\tlog.Debugf(\"resource/asset_tag:setAssetTag() Request: %s\", httpRequest.URL.Path)\n\n\t\tvar tagWriteRequest taModel.TagWriteRequest\n\n\t\tcontentType := httpRequest.Header.Get(\"Content-Type\")\n\t\tif contentType != \"application/json\" {\n\t\t\tlog.Errorf(\"resource/asset_tag:setAssetTag( %s - Invalid content-type '%s'\", message.InvalidInputBadParam, contentType)\n\t\t\treturn &common.EndpointError{Message: \"Invalid content-type\", StatusCode: http.StatusBadRequest}\n\t\t}\n\n\t\tdata, err := ioutil.ReadAll(httpRequest.Body)\n\t\tif err != nil {\n\t\t\tlog.WithError(err).Errorf(\"resource/asset_tag:setAssetTag() %s - Error reading request body for request: %s\", message.AppRuntimeErr, httpRequest.URL.Path)\n\t\t\treturn &common.EndpointError{Message: \"Error parsing request\", StatusCode: http.StatusBadRequest}\n\t\t}\n\n\t\tdec := json.NewDecoder(bytes.NewReader(data))\n\t\tdec.DisallowUnknownFields()\n\t\terr = dec.Decode(&tagWriteRequest)\n\t\tif err != nil {\n\t\t\tsecLog.WithError(err).Errorf(\"resource/asset_tag:setAssetTag() %s - Error marshaling json data: %s for request: %s\", message.InvalidInputBadParam, string(data), httpRequest.URL.Path)\n\t\t\treturn &common.EndpointError{Message: \"Error processing request\", StatusCode: http.StatusBadRequest}\n\t\t}\n\n\t\terr = requestHandler.DeployAssetTag(&tagWriteRequest)\n\t\tif err != nil {\n\t\t\tlog.WithError(err).Errorf(\"resource/asset_tag:setAssetTag() %s - Error while deploying asset tag\", message.AppRuntimeErr)\n\t\t\treturn err\n\t\t}\n\t\thttpWriter.WriteHeader(http.StatusOK)\n\t\treturn nil\n\t}\n}",
"func addFileVersionToBook(id uint64, publisherName string, version string){\n\tbook := _getBook(id)\n\t\n\tvar v FileVersion\n\terr := json.Unmarshal([]byte(version), &v)\n\tif err != nil{\n\t\tpanic(err)\n\t}\n\t\n\t// check that the fileversion object is valid\n\tif !_isValidFileVersion(v) {\n\t\tpanic(\"not a valid FileVersion object\")\n\t}\n\t\n\t// get the pulblisher index\n\tindex, success := _getPublisherIndex(id, publisherName)\n\tif !success {\n\t\tpanic(\"no such publisher\")\n\t}\n\t\n\t// check that this file version for this publisher for this book does not exist yet\n\tif _, found := _getFileVersionIndex(id, publisherName, v.Link); found{\n\t\tpanic(\"this version already exists for this publisher for this book\")\n\t}\n\t\n\t// get the publisher index\n\tbook.Publishers[index].FileVersions = append(book.Publishers[index].FileVersions, v)\n\t\n\t// get json string\n\tpayload, err := json.Marshal(book)\n\tif err != nil {\n\t\tpanic(\"error converting object to json\")\n\t}\n\t\n\t// write json data to state\n\tstate.WriteBytes(_bookId(id), payload)\n}",
"func (f *DBStoreDeleteOldIndexesFunc) PushHook(hook func(context.Context, time.Duration, time.Time) (int, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (f *UploadServiceGetUploadsByIDsFunc) PushHook(hook func(context.Context, ...int) ([]types.Upload, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func (*llcFactory) PreRenewHook(_ xreg.BucketEntry) (bool, error) { return true, nil }",
"func AddAutoIncrementingLambdaVersionResource(serviceName string,\n\tlambdaResourceName string,\n\tcfTemplate *gocf.Template,\n\tlogger *logrus.Logger) (*AutoIncrementingLambdaVersionInfo, error) {\n\n\t// Get the template\n\tsession, sessionErr := session.NewSession()\n\tif sessionErr != nil {\n\t\treturn nil, sessionErr\n\t}\n\n\t// Get the current template - for each version we find in the version listing\n\t// we look up the actual CF resource and copy it into this template\n\texistingStackDefinition, existingStackDefinitionErr := existingStackTemplate(serviceName,\n\t\tsession,\n\t\tlogger)\n\tif nil != existingStackDefinitionErr {\n\t\treturn nil, existingStackDefinitionErr\n\t}\n\n\t// TODO - fetch the template and look up the resources\n\texistingVersions, existingVersionsErr := existingLambdaResourceVersions(serviceName,\n\t\tlambdaResourceName,\n\t\tsession,\n\t\tlogger)\n\tif nil != existingVersionsErr {\n\t\treturn nil, existingVersionsErr\n\t}\n\n\t// Initialize the auto incrementing version struct\n\tautoIncrementingLambdaVersionInfo := AutoIncrementingLambdaVersionInfo{\n\t\tCurrentVersion: 0,\n\t\tCurrentVersionResourceName: \"\",\n\t\tVersionHistory: make(map[int]string, 0),\n\t}\n\n\tlambdaVersionResourceName := func(versionIndex int) string {\n\t\treturn sparta.CloudFormationResourceName(lambdaResourceName,\n\t\t\t\"version\",\n\t\t\tstrconv.Itoa(versionIndex))\n\t}\n\n\tif nil != existingVersions {\n\t\t// Add the CloudFormation resource\n\t\tlogger.WithFields(logrus.Fields{\n\t\t\t\"VersionCount\": len(existingVersions.Versions) - 1, // Ignore $LATEST\n\t\t\t\"ResourceName\": lambdaResourceName,\n\t\t}).Info(\"Total number of published versions\")\n\n\t\tfor _, eachEntry := range existingVersions.Versions {\n\t\t\tversionIndex, versionIndexErr := strconv.Atoi(*eachEntry.Version)\n\t\t\tif nil == versionIndexErr {\n\t\t\t\t// Find the existing resource...\n\t\t\t\tversionResourceName := lambdaVersionResourceName(versionIndex)\n\t\t\t\tif nil == existingStackDefinition {\n\t\t\t\t\treturn nil, fmt.Errorf(\"Unable to find exising Version resource in nil Template\")\n\t\t\t\t}\n\t\t\t\tcfResourceDefinition, cfResourceDefinitionExists := existingStackDefinition.Resources[versionResourceName]\n\t\t\t\tif !cfResourceDefinitionExists {\n\t\t\t\t\treturn nil, fmt.Errorf(\"Unable to find exising Version resource (Resource: %s, Version: %d) in template\",\n\t\t\t\t\t\tversionResourceName,\n\t\t\t\t\t\tversionIndex)\n\t\t\t\t}\n\t\t\t\tcfTemplate.Resources[versionResourceName] = cfResourceDefinition\n\t\t\t\t// Add the CloudFormation resource\n\t\t\t\tlogger.WithFields(logrus.Fields{\n\t\t\t\t\t\"Version\": versionIndex,\n\t\t\t\t\t\"ResourceName\": versionResourceName,\n\t\t\t\t}).Debug(\"Preserving Lambda version\")\n\n\t\t\t\t// Store the state, tracking the latest version\n\t\t\t\tautoIncrementingLambdaVersionInfo.VersionHistory[versionIndex] = versionResourceName\n\t\t\t\tif versionIndex > autoIncrementingLambdaVersionInfo.CurrentVersion {\n\t\t\t\t\tautoIncrementingLambdaVersionInfo.CurrentVersion = versionIndex\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Bump the version and add a new entry...\n\tautoIncrementingLambdaVersionInfo.CurrentVersion++\n\tversionResource := &gocf.LambdaVersion{\n\t\tFunctionName: gocf.GetAtt(lambdaResourceName, \"Arn\").String(),\n\t}\n\tautoIncrementingLambdaVersionInfo.CurrentVersionResourceName = lambdaVersionResourceName(autoIncrementingLambdaVersionInfo.CurrentVersion)\n\tcfTemplate.AddResource(autoIncrementingLambdaVersionInfo.CurrentVersionResourceName, versionResource)\n\n\t// Log the version we're about to publish...\n\tlogger.WithFields(logrus.Fields{\n\t\t\"ResourceName\": lambdaResourceName,\n\t\t\"StackVersion\": autoIncrementingLambdaVersionInfo.CurrentVersion,\n\t}).Info(\"Inserting new version resource\")\n\n\treturn &autoIncrementingLambdaVersionInfo, nil\n}",
"func (l *jsiiProxy_LambdaDeploymentGroup) AddPreHook(preHook awslambda.IFunction) {\n\t_jsii_.InvokeVoid(\n\t\tl,\n\t\t\"addPreHook\",\n\t\t[]interface{}{preHook},\n\t)\n}",
"func (c *client) Hook(r *http.Request) (*model.Repo, *model.Build, error) {\n\treturn parseHook(r)\n}",
"func (f *AutoIndexingServiceGetIndexesFunc) PushHook(hook func(context.Context, shared.GetIndexesOptions) ([]types.Index, int, error)) {\n\tf.mutex.Lock()\n\tf.hooks = append(f.hooks, hook)\n\tf.mutex.Unlock()\n}",
"func setObjectRevision(obj client.Object, revision int64) {\n\ta := obj.GetAnnotations()\n\tif a == nil {\n\t\ta = map[string]string{}\n\t}\n\ta[revisionAnnotation] = fmt.Sprintf(\"%d\", revision)\n\tobj.SetAnnotations(a)\n}"
] |
[
"0.6149745",
"0.5743148",
"0.5307835",
"0.52895415",
"0.52765095",
"0.5205322",
"0.5184388",
"0.51469725",
"0.5134378",
"0.50665593",
"0.5045814",
"0.504119",
"0.5037058",
"0.50249463",
"0.500863",
"0.49962705",
"0.4992406",
"0.49890536",
"0.49798146",
"0.49653792",
"0.49605167",
"0.4923124",
"0.490468",
"0.48932248",
"0.48861235",
"0.48857525",
"0.48841438",
"0.48677218",
"0.48677218",
"0.48582",
"0.48566672",
"0.48400244",
"0.48374856",
"0.48139027",
"0.48006186",
"0.47975597",
"0.47972792",
"0.47940376",
"0.4774182",
"0.47643128",
"0.47567415",
"0.47554335",
"0.4743469",
"0.47351673",
"0.47265086",
"0.47155216",
"0.4712418",
"0.4703855",
"0.469852",
"0.4697703",
"0.46906048",
"0.46794355",
"0.46787894",
"0.467383",
"0.46619368",
"0.465783",
"0.4657515",
"0.46556026",
"0.46500283",
"0.46386695",
"0.46383148",
"0.46382728",
"0.4634835",
"0.46291488",
"0.4628251",
"0.46226478",
"0.46224964",
"0.461715",
"0.46148595",
"0.4610751",
"0.46072945",
"0.4603575",
"0.45906982",
"0.4569814",
"0.4565891",
"0.4562019",
"0.45547235",
"0.45248184",
"0.45237947",
"0.45236403",
"0.45221782",
"0.45147273",
"0.45078266",
"0.45048952",
"0.45037523",
"0.45020333",
"0.45020333",
"0.4501483",
"0.4500453",
"0.44969893",
"0.4488575",
"0.4485834",
"0.44852793",
"0.44814003",
"0.44809386",
"0.44764522",
"0.44754347",
"0.44753766",
"0.44745776",
"0.4472571"
] |
0.7612646
|
0
|
OneP returns a single assetRevision record from the query, and panics on error.
|
func (q assetRevisionQuery) OneP() *AssetRevision {
o, err := q.One()
if err != nil {
panic(boil.WrapErr(err))
}
return o
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (q assetRevisionQuery) One() (*AssetRevision, error) {\n\to := &AssetRevision{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"public: failed to execute a one query for asset_revision\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (q assetQuery) One() (*Asset, error) {\n\to := &Asset{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for asset\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (q assetQuery) OneP() *Asset {\n\to, err := q.One()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func FindAssetRevision(exec boil.Executor, orig int, selectCols ...string) (*AssetRevision, error) {\n\tassetRevisionObj := &AssetRevision{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"asset_revision\\\" where \\\"orig\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, orig)\n\n\terr := q.Bind(assetRevisionObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"public: unable to select from asset_revision\")\n\t}\n\n\treturn assetRevisionObj, nil\n}",
"func FindAssetRevisionP(exec boil.Executor, orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(exec, orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (d *Document) FindOneWithRevision(\n\tcontext.Context, string, int64,\n) (*flare.Document, error) {\n\treturn nil, errors.New(\"not implemented\")\n}",
"func (cr APIContractRepository) Get(ctx context.Context, revisionID uuid.UUID) (models.APIContractRevision, error) {\n\tif revisionID == uuid.Nil {\n\t\treturn models.APIContractRevision{}, errors.New(\"invalid contract revision id supplied\")\n\t}\n\n\tvar acr models.APIContractRevision\n\ttx := cr.db.Find(&acr, \"id = ?\", revisionID.String())\n\tif tx.Error != nil {\n\t\treturn models.APIContractRevision{}, fmt.Errorf(\"no contract revision found for id %s: %w\", revisionID, tx.Error)\n\t}\n\n\treturn acr, nil\n}",
"func (assetRevisionL) LoadAsset(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Asset\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Asset\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Asset = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Asset == foreign.ID {\n\t\t\t\tlocal.R.Asset = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (r *Repository) GetOne(id string, version uint) (*domain.Policy, error) {\n\tm := &model.Policy{}\n\tcondition := \"id = ?\"\n\targs := []interface{}{id}\n\tif version != 0 {\n\t\tcondition = \"id = ? AND version = ?\"\n\t\targs = append(args, version)\n\t}\n\n\tconds := append([]interface{}{condition}, args...)\n\tif err := r.db.Order(\"version desc\").First(m, conds...).Error; err != nil {\n\t\tif err == gorm.ErrRecordNotFound {\n\t\t\treturn nil, nil\n\t\t}\n\t\treturn nil, err\n\t}\n\n\tp, err := m.ToDomain()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn p, nil\n}",
"func FindAssetRevisionGP(orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(boil.GetDB(), orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (t *evidence_management) queryAsset(APIstub shim.ChaincodeStubInterface, args []string) pb.Response {\n\tif len(args) != 2 {\n\t\treturn shim.Error(\"Incorrect number of arguments, Required 2\")\n\t}\n\n\tfmt.Println(\"In Query Asset\")\n\n\tAssetAsBytes, _ := APIstub.GetState(args[1])\n\n\tif AssetAsBytes == nil {\n\t\treturn shim.Error(\"Could not locate Asset\")\n\n\t}\n\n\treturn shim.Success(AssetAsBytes)\n}",
"func (c *Command) GetOne() error {\n\ttableName := c.set.tableName\n\tresult := c.set.result\n\n\tif result == nil {\n\t\treturn errors.New(\"result argument must be set\")\n\t}\n\n\tresultVal := reflect.ValueOf(result)\n\n\tif resultVal.Kind() != reflect.Ptr {\n\t\treturn errors.New(\"result argument must be a pointer\")\n\t}\n\n\tif strings.Contains(reflect.TypeOf(result).String(), \"[]\") {\n\t\treturn errors.New(\"result argument must be a pointer, not a slice\")\n\t}\n\n\tclient := c.set.gom.GetClient()\n\n\tctx, cancelFunc := c.set.GetContext()\n\tdefer cancelFunc()\n\n\tcollection := client.Database(c.set.gom.GetDatabase()).Collection(tableName)\n\n\terr := collection.FindOne(ctx, c.set.filter).Decode(c.set.result)\n\n\tif err != nil {\n\t\treturn errors.New(toolkit.Sprintf(\"Error finding document: %s\", err.Error()))\n\t}\n\n\treturn nil\n}",
"func (q authorQuery) One() (*Author, error) {\n\to := &Author{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"mdbmdbmodels: failed to execute a one query for authors\")\n\t}\n\n\treturn o, nil\n}",
"func (q voteQuery) One(ctx context.Context, exec boil.ContextExecutor) (*Vote, error) {\n\to := &Vote{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(ctx, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for vote\")\n\t}\n\n\treturn o, nil\n}",
"func (api *versionAPI) Find(meta *api.ObjectMeta) (*Version, error) {\n\t// find the object\n\tobj, err := api.ct.FindObject(\"Version\", meta)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// asset type\n\tswitch obj.(type) {\n\tcase *Version:\n\t\thobj := obj.(*Version)\n\t\treturn hobj, nil\n\tdefault:\n\t\treturn nil, errors.New(\"incorrect object type\")\n\t}\n}",
"func (mvq *ModuleVersionQuery) First(ctx context.Context) (*ModuleVersion, error) {\n\tmvs, err := mvq.Limit(1).All(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif len(mvs) == 0 {\n\t\treturn nil, &ErrNotFound{moduleversion.Label}\n\t}\n\treturn mvs[0], nil\n}",
"func (p *APIView) FindOne(result interface{}, context *Context) error {\n\tprimaryQuerySQL, primaryParams := p.toPrimaryQueryParams(result, context.ResourceID, context)\n\tdb := context.GetDB()\n\tif db == nil {\n\t\treturn errors.New(\"db is nil\")\n\t}\n\tif primaryQuerySQL != \"\" {\n\t\treturn db.First(result, append([]interface{}{primaryQuerySQL}, primaryParams...)...).Error\n\t}\n\n\treturn errors.New(\"failed to find\")\n}",
"func (reg *defaultRegistry) GetFirstUnprocessedRevision() (*engine.Revision, error) {\n\t// TODO: this method is slow, needs indexes\n\tvar revision *engine.Revision\n\terr := reg.store.Find(engine.TypeRevision.Kind, &revision, store.WithKey(engine.RevisionKey), store.WithWhereEq(\"Status\", engine.RevisionStatusWaiting, engine.RevisionStatusInProgress), store.WithGetFirst())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn revision, nil\n}",
"func (q authorQuery) OneP() *Author {\n\to, err := q.One()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (q voteQuery) One() (*Vote, error) {\n\to := &Vote{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for vote\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (q ReleaseQuery) One() (result *Release, err error) {\n\tresults := make(ReleaseCollection, 0, 1)\n\terr = Select(q.db, &results, q.builder)\n\tif err != nil {\n\t\terr = errors.Wrap(err, \"ReleaseQuery.One() failed to populate initial result set.\")\n\t\treturn\n\t}\n\n\tfor _, f := range q.processors {\n\t\terr = f(q.db, results)\n\t\tif err != nil {\n\t\t\terr = errors.Wrap(err, \"Failed to run processor over ReleaseCollection.\")\n\t\t\treturn\n\t\t}\n\t}\n\n\tif len(results) > 0 {\n\t\tresult = results[0]\n\t}\n\n\treturn result, nil\n}",
"func (rs *PollVoteResultSet) One() (*PollVote, error) {\n\tif !rs.Next() {\n\t\treturn nil, kallax.ErrNotFound\n\t}\n\n\trecord, err := rs.Get()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := rs.Close(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn record, nil\n}",
"func (mock *MockRepository) FindOne(CPF string) (entities.Account, error) {\n\targs := mock.Called()\n\tresult := args.Get(0)\n\treturn result.(entities.Account), args.Error(1)\n}",
"func (q assetRevisionQuery) All() (AssetRevisionSlice, error) {\n\tvar o AssetRevisionSlice\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"public: failed to assign all query results to AssetRevision slice\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (q inventoryQuery) One() (*Inventory, error) {\n\to := &Inventory{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for inventory\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (q rssAnnouncementQuery) One(ctx context.Context, exec boil.ContextExecutor) (*RSSAnnouncement, error) {\n\to := &RSSAnnouncement{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(ctx, exec, o)\n\tif err != nil {\n\t\tif errors.Is(err, sql.ErrNoRows) {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for rss_announcements\")\n\t}\n\n\treturn o, nil\n}",
"func (q vendorQuery) One(ctx context.Context, exec boil.ContextExecutor) (*Vendor, error) {\n\to := &Vendor{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(ctx, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for vendors\")\n\t}\n\n\tif err := o.doAfterSelectHooks(ctx, exec); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (agg *Planner) Revision() PlannerRevision { return agg.rev }",
"func (rs *PetResultSet) One() (*Pet, error) {\n\tif !rs.Next() {\n\t\treturn nil, kallax.ErrNotFound\n\t}\n\n\trecord, err := rs.Get()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := rs.Close(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn record, nil\n}",
"func (s *PollVoteStore) FindOne(q *PollVoteQuery) (*PollVote, error) {\n\tq.Limit(1)\n\tq.Offset(0)\n\trs, err := s.Find(q)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif !rs.Next() {\n\t\treturn nil, kallax.ErrNotFound\n\t}\n\n\trecord, err := rs.Get()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := rs.Close(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn record, nil\n}",
"func (db *DB) getVersion(id int) *DetailVersion {\n\tver := &DetailVersion{}\n\terr := db.Get(ver, \"select * from detail_version where id = $1\", id)\n\n\tif err != nil {\n\t\tif err == sql.ErrNoRows {\n\t\t\treturn nil\n\t\t} else {\n\t\t\tpanic(err)\n\t\t}\n\t}\n\n\treturn ver\n}",
"func (s *PetStore) FindOne(q *PetQuery) (*Pet, error) {\n\tq.Limit(1)\n\tq.Offset(0)\n\trs, err := s.Find(q)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif !rs.Next() {\n\t\treturn nil, kallax.ErrNotFound\n\t}\n\n\trecord, err := rs.Get()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := rs.Close(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn record, nil\n}",
"func (o *ReportingTaskEntity) GetRevisionOk() (*RevisionDTO, bool) {\n\tif o == nil || o.Revision == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Revision, true\n}",
"func AssetRevisionExists(exec boil.Executor, orig int) (bool, error) {\n\tvar exists bool\n\n\tquery := \"select exists(select 1 from \\\"asset_revision\\\" where \\\"orig\\\"=$1 limit 1)\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, orig)\n\t}\n\n\trow := exec.QueryRow(query, orig)\n\n\terr := row.Scan(&exists)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"public: unable to check if asset_revision exists\")\n\t}\n\n\treturn exists, nil\n}",
"func (s *SmartContract) queryAsset(APIstub shim.ChaincodeStubInterface, args []string) sc.Response {\n\n\tif len(args) != 1 {\n\t\treturn shim.Error(\"Incorrect number of arguments. Expecting 1\")\n\t}\n\n\tassetAsBytes, _ := APIstub.GetState(args[0])\n\tif assetAsBytes == nil {\n\t\treturn shim.Error(\"Could not locate asset\")\n\t}\n\treturn shim.Success(assetAsBytes)\n}",
"func (q repositoryQuery) One(ctx context.Context, exec boil.ContextExecutor) (*Repository, error) {\n\to := &Repository{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(ctx, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for repositories\")\n\t}\n\n\tif err := o.doAfterSelectHooks(ctx, exec); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (q holdenAtQuery) One(ctx context.Context, exec boil.ContextExecutor) (*HoldenAt, error) {\n\to := &HoldenAt{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(ctx, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for HoldenAt\")\n\t}\n\n\treturn o, nil\n}",
"func (c *Command) ReturnOne(filter map[string]interface{}) (ResponseSchema, error) {\n\tvar response ResponseSchema\n\n\t// Retrieve a single record from the DB based on the filter\n\tfromDB, err := c.Conn.GetSingle(filter, c.Table)\n\tif err != nil {\n\t\treturn response, err\n\t}\n\t// Was anything returned?\n\tif fromDB == nil {\n\t\t// Return nothing, it's not an error but there's nothing there\n\t\treturn response, rethink.RetrievalResult{\n\t\t\tSuccess: false, SoftDeleted: false, Message: \"\"}\n\t}\n\n\t// Decode the response from the DB into the response schema object\n\tif err = mapstruct.Decode(fromDB, &response); err != nil {\n\t\treturn response, err\n\t}\n\n\tif fromDB.(map[string]interface{})[\"deletedAt\"].(float64) != 0 {\n\t\treturn response, rethink.RetrievalResult{true, true, \"\"}\n\t}\n\n\treturn response, rethink.RetrievalResult{true, false, \"\"}\n}",
"func get_asset(stub shim.ChaincodeStubInterface, id string) (Asset, error) {\n\tvar asset Asset\n\tassetAsBytes, err := stub.GetState(id) //getState retreives a key/value from the ledger\n\tif err != nil { //this seems to always succeed, even if key didn't exist\n\t\treturn asset, errors.New(\"Failed to find asset - \" + id)\n\t}\n\tjson.Unmarshal(assetAsBytes, &asset) //un stringify it aka JSON.parse()\n\n\tif asset.Id != id { //test if product is actually here or just nil\n\t\treturn asset, errors.New(\"Asset does not exist - \" + id)\n\t}\n\n\treturn asset, nil\n}",
"func (mgr *EntryManager) GetOne(entryID int) *Entry {\n\tdb, err := sql.Open(\"postgres\", mgr.ConnStr)\n\tif err != nil {\n\t\tlog.Println(err)\n\t}\n\tdefer db.Close()\n\n\tqueryStr := `\n\t\tSELECT title, date_posted, tags \n\t\tFROM entries \n\t\tWHERE id = $1;\n\t`\n\n\t// Create a \"prepared\" SQL statement context\n\tstmt, err := db.Prepare(queryStr)\n\tif err != nil {\n\t\tlog.Println(err)\n\t\treturn nil\n\t}\n\tdefer stmt.Close()\n\n\t// Fetch Entry record\n\tvar (\n\t\ttitle, tagsText string\n\t\tdatePosted time.Time\n\t)\n\terr = stmt.QueryRow(entryID).Scan(&title, &datePosted, &tagsText)\n\tif err != nil {\n\t\tlog.Println(err)\n\t\treturn nil\n\t}\n\n\t// Populate Entry record\n\treturn &Entry{\n\t\tID: entryID,\n\t\tTitle: title,\n\t\tDatePosted: datePosted,\n\t\tTags: strings.Split(tagsText, \",\"),\n\t}\n}",
"func (v *VersionHistory) GetFirstItem() (*VersionHistoryItem, error) {\n\n\tif len(v.Items) == 0 {\n\t\treturn nil, &shared.BadRequestError{Message: \"version history is empty.\"}\n\t}\n\n\treturn v.Items[0].Duplicate(), nil\n}",
"func (q assetRevisionQuery) AllP() AssetRevisionSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (q inventoryQuery) OneP() *Inventory {\n\to, err := q.One()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (s *Searcher) FindOne() (interface{}, error) {\n\tcontext := s.parseContext()\n\tresult := s.Resource.NewStruct()\n\terr := s.Resource.CallFindOne(result, nil, context)\n\treturn result, err\n}",
"func (o *AssetRevision) Delete(exec boil.Executor) error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision provided for delete\")\n\t}\n\n\tif err := o.doBeforeDeleteHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\targs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), assetRevisionPrimaryKeyMapping)\n\tquery := \"DELETE FROM \\\"asset_revision\\\" WHERE \\\"orig\\\"=$1\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, args...)\n\t}\n\n\t_, err := exec.Exec(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to delete from asset_revision\")\n\t}\n\n\tif err := o.doAfterDeleteHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}",
"func (rev PlannerRevision) Value() string { return rev.value }",
"func (t *MedChain) queryAsset(APIstub shim.ChaincodeStubInterface, args []string) peer.Response {\n\t\tif len(args) != 1 {\n\t\t\treturn shim.Error(\"Incorrect number of arguments, Required 1\")\n\t\t}\n\n\t\tfmt.Println(fmt.Sprintf(\"- start queryAsset: %s\\n\", args))\n\n\t\tAssetAsBytes, _ := APIstub.GetState(args[0])\n\n\t\tif AssetAsBytes == nil {\n\t\t\treturn shim.Error(\"Could not locate Asset\")\n\n\t\t}\n\t\t\n\t\treturn shim.Success(AssetAsBytes)\n\t}",
"func (b *PgTxRepository) FindOne(ctx context.Context, filter interface{}, output interface{}) error {\n\tcolumns, _ := b.ExtractColumnPairs(output)\n\n\t// Prepare query\n\tqb := sq.Select(columns...).\n\t\tFrom(b.table).\n\t\tWhere(filter).\n\t\tLimit(1).\n\t\tPlaceholderFormat(sq.Dollar)\n\n\t// Build SQL Query\n\tquery, args, err := qb.ToSql()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// The statements prepared for a transaction by calling the transaction's Prepare or Stmt methods\n\t// are closed by the call to Commit or Rollback.\n\tstmt, err := b.tx.PreparexContext(ctx, query)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Do the find\n\terr = stmt.QueryRowxContext(ctx, args...).StructScan(output)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// No errors\n\treturn nil\n}",
"func getAssetByName(name string) (*Asset, error) {\n\tparams := map[string]string{\n\t\t\"predicate\": fmt.Sprintf(\"name='%s'\", name),\n\t}\n\tresp, err := get(\"asset\", params)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Failed TCMD request\")\n\t}\n\n\tvar result []Asset\n\terr = json.Unmarshal(resp, &result)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Failed to unmarshal TCMD response\")\n\t}\n\n\tif len(result) > 0 {\n\t\treturn &result[0], nil\n\t}\n\n\treturn nil, nil\n}",
"func AssetRevisionExistsP(exec boil.Executor, orig int) bool {\n\te, err := AssetRevisionExists(exec, orig)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn e\n}",
"func (o LookupApiResultOutput) Revision() pulumi.StringArrayOutput {\n\treturn o.ApplyT(func(v LookupApiResult) []string { return v.Revision }).(pulumi.StringArrayOutput)\n}",
"func getAssetByID(id int) (*Asset, error) {\n\tpath := fmt.Sprintf(\"asset/%d\", id)\n\tresp, err := get(path, nil)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Failed TCMD request\")\n\t}\n\n\tvar result Asset\n\terr = json.Unmarshal(resp, &result)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Failed to unmarshal TCMD response\")\n\t}\n\treturn &result, nil\n}",
"func (q paymentObjectQuery) One(ctx context.Context, exec boil.ContextExecutor) (*PaymentObject, error) {\n\to := &PaymentObject{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(ctx, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for payment_objects\")\n\t}\n\n\tif err := o.doAfterSelectHooks(ctx, exec); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (q braceletPhotoQuery) One() (*BraceletPhoto, error) {\n\to := &BraceletPhoto{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for bracelet_photo\")\n\t}\n\n\treturn o, nil\n}",
"func (c *Command) GetSingle(ctx *gin.Context) {\n\ttoken := html.EscapeString(ctx.Param(\"token\"))\n\tname := html.EscapeString(ctx.Param(\"name\"))\n\tfilter := map[string]interface{}{\"token\": token, \"name\": name}\n\n\tres, err := c.ReturnOne(filter)\n\tretRes, ok := err.(rethink.RetrievalResult)\n\t// If !ok AND then err != nil then we have an actual error and not a RetRes\n\tif !ok && err != nil {\n\t\tutil.NiceError(ctx, err, http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// If we find one then we're just going to return right away\n\tif retRes.Success && !retRes.SoftDeleted {\n\t\tctx.Header(\"x-total-count\", \"1\")\n\t\tctx.JSON(http.StatusOK, util.MarshalResponse(res))\n\t\treturn\n\t}\n\n\t// None were found Jim, 404 that boyo\n\tctx.AbortWithStatus(http.StatusNotFound)\n\treturn\n}",
"func FindOne(condition Equipment) (Equipment, error) {\n\tdb := common.GetDB()\n\tvar eq Equipment\n\terr := db.Where(condition).First(&eq).Error\n\treturn eq, err\n}",
"func (s *chainScore) Ex_getRevision() (int64, error) {\n\tif err := s.tryChargeCall(false); err != nil {\n\t\treturn 0, err\n\t}\n\tas := s.cc.GetAccountState(state.SystemID)\n\treturn scoredb.NewVarDB(as, state.VarRevision).Int64(), nil\n}",
"func Single(result Result, err error) (*Record, error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn result.Single()\n}",
"func R(r interface{}) Revision {\n\tswitch r := r.(type) {\n\tcase string:\n\t\trevision, err := ParseRevision(r)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\treturn revision\n\tcase int:\n\t\treturn Revision{r}\n\tdefault:\n\t\tpanic(fmt.Errorf(\"cannot use %v (%T) as a snap revision\", r, r))\n\t}\n}",
"func (rs *StatsPeriodResultSet) One() (*StatsPeriod, error) {\n\tif !rs.Next() {\n\t\treturn nil, kallax.ErrNotFound\n\t}\n\n\trecord, err := rs.Get()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := rs.Close(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn record, nil\n}",
"func (i *Invoice) FindOne(id string, client *Client) (*Invoice, error) {\n\tresp, err := client.Get(i.Endpoint() + \"/\" + id)\n\trespData, err := SendResp(resp, err, i)\n\tif err != nil {\n\t\treturn i, err\n\t}\n\treturn &respData.Invoice, err\n}",
"func (q rawVisitQuery) One(ctx context.Context, exec boil.ContextExecutor) (*RawVisit, error) {\n\to := &RawVisit{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(ctx, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for raw_visits\")\n\t}\n\n\tif err := o.doAfterSelectHooks(ctx, exec); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func PlannerRevisionOf(value string) PlannerRevision {\n\treturn PlannerRevision{value}\n}",
"func (v *Vessel) FetchOne() (Vessel, error) {\n\tdb := adaptors.DBConnector()\n\tdefer db.Close()\n\n\tvar vessel Vessel\n\terr := db.Select([]string{\"id\", \"name\", \"beam\", \"loa\", \"draft\", \"status\"}).Where(\"id = ?\", v.ID).Find(&vessel).Error\n\treturn vessel, err\n}",
"func (c *CoinTest) queryAsset(stub shim.ChaincodeStubInterface, args []string) pb.Response {\r\n\tvar A string // Entities\r\n\tvar err error\r\n\r\n\tif len(args) != 1 {\r\n\t\treturn shim.Error(\"Incorrect number of arguments. Expecting name of the person to query\")\r\n\t}\r\n\r\n\tA = args[0]\r\n\r\n\t// Get the state from the ledger\r\n\tAvalbytes, err := stub.GetState(A)\r\n\tif err != nil {\r\n\t\tjsonResp := \"{\\\"Error\\\":\\\"Failed to get state for \" + A + \"\\\"}\"\r\n\t\treturn shim.Error(jsonResp)\r\n\t}\r\n\r\n\tif Avalbytes == nil {\r\n\t\tjsonResp := \"{\\\"Error\\\":\\\"Nil amount for \" + A + \"\\\"}\"\r\n\t\treturn shim.Error(jsonResp)\r\n\t}\r\n\r\n\tjsonResp := \"{\\\"Name\\\":\\\"\" + A + \"\\\",\\\"Amount\\\":\\\"\" + string(Avalbytes) + \"\\\"}\"\r\n\tfmt.Printf(\"Query Response:%s\\n\", jsonResp)\r\n\treturn shim.Success(Avalbytes)\r\n}",
"func (s *StatsPeriodStore) FindOne(q *StatsPeriodQuery) (*StatsPeriod, error) {\n\tq.Limit(1)\n\tq.Offset(0)\n\trs, err := s.Find(q)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif !rs.Next() {\n\t\treturn nil, kallax.ErrNotFound\n\t}\n\n\trecord, err := rs.Get()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := rs.Close(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn record, nil\n}",
"func (o *ReportingTaskEntity) GetRevision() RevisionDTO {\n\tif o == nil || o.Revision == nil {\n\t\tvar ret RevisionDTO\n\t\treturn ret\n\t}\n\treturn *o.Revision\n}",
"func (o GroupContainerVolumeGitRepoOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v GroupContainerVolumeGitRepo) *string { return v.Revision }).(pulumi.StringPtrOutput)\n}",
"func (o *AssetRevision) Insert(exec boil.Executor, whitelist ...string) error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no asset_revision provided for insertion\")\n\t}\n\n\tvar err error\n\n\tif err := o.doBeforeInsertHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\tnzDefaults := queries.NonZeroDefaultSet(assetRevisionColumnsWithDefault, o)\n\n\tkey := makeCacheKey(whitelist, nzDefaults)\n\tassetRevisionInsertCacheMut.RLock()\n\tcache, cached := assetRevisionInsertCache[key]\n\tassetRevisionInsertCacheMut.RUnlock()\n\n\tif !cached {\n\t\twl, returnColumns := strmangle.InsertColumnSet(\n\t\t\tassetRevisionColumns,\n\t\t\tassetRevisionColumnsWithDefault,\n\t\t\tassetRevisionColumnsWithoutDefault,\n\t\t\tnzDefaults,\n\t\t\twhitelist,\n\t\t)\n\n\t\tcache.valueMapping, err = queries.BindMapping(assetRevisionType, assetRevisionMapping, wl)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcache.retMapping, err = queries.BindMapping(assetRevisionType, assetRevisionMapping, returnColumns)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif len(wl) != 0 {\n\t\t\tcache.query = fmt.Sprintf(\"INSERT INTO \\\"asset_revision\\\" (\\\"%s\\\") VALUES (%s)\", strings.Join(wl, \"\\\",\\\"\"), strmangle.Placeholders(dialect.IndexPlaceholders, len(wl), 1, 1))\n\t\t} else {\n\t\t\tcache.query = \"INSERT INTO \\\"asset_revision\\\" DEFAULT VALUES\"\n\t\t}\n\n\t\tif len(cache.retMapping) != 0 {\n\t\t\tcache.query += fmt.Sprintf(\" RETURNING \\\"%s\\\"\", strings.Join(returnColumns, \"\\\",\\\"\"))\n\t\t}\n\t}\n\n\tvalue := reflect.Indirect(reflect.ValueOf(o))\n\tvals := queries.ValuesFromMapping(value, cache.valueMapping)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, cache.query)\n\t\tfmt.Fprintln(boil.DebugWriter, vals)\n\t}\n\n\tif len(cache.retMapping) != 0 {\n\t\terr = exec.QueryRow(cache.query, vals...).Scan(queries.PtrsFromMapping(value, cache.retMapping)...)\n\t} else {\n\t\t_, err = exec.Exec(cache.query, vals...)\n\t}\n\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to insert into asset_revision\")\n\t}\n\n\tif !cached {\n\t\tassetRevisionInsertCacheMut.Lock()\n\t\tassetRevisionInsertCache[key] = cache\n\t\tassetRevisionInsertCacheMut.Unlock()\n\t}\n\n\treturn o.doAfterInsertHooks(exec)\n}",
"func (o ApplicationStatusOperationStateSyncResultOutput) Revision() pulumi.StringOutput {\n\treturn o.ApplyT(func(v ApplicationStatusOperationStateSyncResult) string { return v.Revision }).(pulumi.StringOutput)\n}",
"func (r *Repository) FindOne(\n\tctx context.Context,\n\tconditions []fazzdb.SliceCondition,\n\torders []fazzdb.Order,\n) (interface{}, error) {\n\tq, err := r.GetQuery(ctx)\n\tif nil != err {\n\t\treturn nil, err\n\t}\n\n\tcurrent := q.Use(r.model).\n\t\tWhereMany(conditions...).\n\t\tOrderByMany(orders...).\n\t\tWithLimit(1)\n\n\trows, err := current.AllCtx(ctx)\n\tif nil != err {\n\t\treturn nil, err\n\t}\n\n\tval := reflect.ValueOf(rows)\n\tif val.Len() == 0 {\n\t\treturn nil, NewEmptyResultError()\n\t}\n\n\treturn val.Index(0).Interface(), nil\n}",
"func (q voteQuery) OneP() *Vote {\n\to, err := q.One()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (q *Query) One(result interface{}) error {\n\tif len(q.opts) > 0 {\n\t\tif err := middleware.Do(q.ctx, q.opts[0].QueryHook, operator.BeforeQuery); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\topt := options.FindOne()\n\n\tif q.collation != nil {\n\t\topt.SetCollation(q.collation)\n\t}\n\tif q.sort != nil {\n\t\topt.SetSort(q.sort)\n\t}\n\tif q.project != nil {\n\t\topt.SetProjection(q.project)\n\t}\n\tif q.skip != nil {\n\t\topt.SetSkip(*q.skip)\n\t}\n\tif q.hint != nil {\n\t\topt.SetHint(q.hint)\n\t}\n\n\terr := q.collection.FindOne(q.ctx, q.filter, opt).Decode(result)\n\n\tif err != nil {\n\t\treturn err\n\t}\n\tif len(q.opts) > 0 {\n\t\tif err := middleware.Do(q.ctx, q.opts[0].QueryHook, operator.AfterQuery); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}",
"func (assetRevisionL) LoadOrig(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Orig\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Orig\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Orig = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Orig == foreign.ID {\n\t\t\t\tlocal.R.Orig = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (q projectQuery) One(ctx context.Context, exec boil.ContextExecutor) (*Project, error) {\n\to := &Project{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(ctx, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for project\")\n\t}\n\n\tif err := o.doAfterSelectHooks(ctx, exec); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (s *Server) FindOne(c echo.Context) error {\n\tspan := opentracing.StartSpan(\"API.FindOne\")\n\tdefer span.Finish()\n\n\tquery := c.Param(\"id\")\n\n\tjob, err := s.Storage.FindOne(query)\n\tif err != nil {\n\t\tlog.Error(err)\n\t\tc.JSON(http.StatusInternalServerError, err)\n\t\treturn err\n\t}\n\n\tc.JSON(http.StatusOK, job)\n\treturn nil\n}",
"func (qs SysDBQuerySet) One(ret *SysDB) error {\n\treturn qs.db.First(ret).Error\n}",
"func (au *audit) One(kit *kit.Kit, audit *table.Audit, opt *AuditOption) error {\n\tif audit == nil || opt == nil {\n\t\treturn errors.New(\"invalid input audit or opt\")\n\t}\n\n\t// generate an audit id and update to audit.\n\tid, err := au.idGen.One(kit, table.AuditTable)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\taudit.ID = id\n\n\tvar q gen.IAuditDo\n\n\tif opt.genQ != nil && au.db.Migrator().CurrentDatabase() == opt.genQ.CurrentDatabase() {\n\t\t// 使用同一个库,事务处理\n\t\tq = opt.genQ.Audit.WithContext(kit.Ctx)\n\t} else {\n\t\t// 使用独立的 DB\n\t\tq = au.genQ.Audit.WithContext(kit.Ctx)\n\t}\n\n\tif err := q.Create(audit); err != nil {\n\t\treturn fmt.Errorf(\"insert audit failed, err: %v\", err)\n\t}\n\treturn nil\n}",
"func (c *PlatformGraphQLClient) FetchAsset(ctx context.Context, assetID string) (*Asset, error) {\n\treq := graphql.NewRequest(`\n\t\tquery (\n\t\t\t$assetId: ID!\n\t\t) {\n\t\t\tasset(id: $assetId) {\n\t\t\t\tid\n\t\t\t\tcontainer {\n\t\t\t\t\tid\n\t\t\t\t}\n\t\t\t\tsourceData {\n\t\t\t\t\ttaskId\n\t\t\t\t\tengine {\n\t\t\t\t\t\tname\n\t\t\t\t\t\tid\n\t\t\t\t\t\tdeployedVersion\n\t\t\t\t\t\tcategoryId\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttransform(transformFunction: JSON)\n\t\t\t}\n\t\t}\n\t`)\n\n\treq.Var(\"assetId\", assetID)\n\n\tvar resp struct {\n\t\tResult *Asset `json:\"asset\"`\n\t}\n\n\treturn resp.Result, c.Run(ctx, req, &resp)\n}",
"func (rc *BypassRevisionCache) Get(docID, revID string, copyType BodyCopyType) (docRev DocumentRevision, err error) {\n\tdocRev.RevID = revID\n\tdocRev.Body, docRev.History, docRev.Channels, docRev.Attachments, docRev.Expiry, err = revCacheLoader(rc.backingStore, IDAndRev{DocID: docID, RevID: revID})\n\tif err != nil {\n\t\treturn DocumentRevision{}, err\n\t}\n\n\trc.bypassStat.Add(1)\n\n\treturn docRev, nil\n}",
"func (q rentalQuery) One() (*Rental, error) {\n\to := &Rental{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"sqlboiler: failed to execute a one query for rental\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (a ArticleDB) QueryOne(sess *sqlabble.Session, st stmt.Statement) (Article, error) {\n\tquery, values := sess.Builder.Build(st)\n\trows, err := sess.Query(query, values...)\n\tif err != nil {\n\t\treturn Article{}, err\n\t}\n\tms, err := a.Map(rows)\n\tif err != nil {\n\t\treturn Article{}, err\n\t}\n\tif len(ms) == 0 {\n\t\treturn Article{}, sqlabble.NewErrRecordNotFound(a.Table.Name)\n\t}\n\tif len(ms) > 1 {\n\t\treturn Article{}, sqlabble.NewErrFoundMultipleRecords(a.Table.Name)\n\t}\n\treturn ms[0], nil\n}",
"func (q rentalQuery) OneP() *Rental {\n\to, err := q.One()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (q vspQuery) One(ctx context.Context, exec boil.ContextExecutor) (*VSP, error) {\n\to := &VSP{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(ctx, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for vsp\")\n\t}\n\n\treturn o, nil\n}",
"func (q stockKeepingUnitContentQuery) One(exec boil.Executor) (*StockKeepingUnitContent, error) {\n\to := &StockKeepingUnitContent{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(nil, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"db: failed to execute a one query for stock_keeping_unit_content\")\n\t}\n\n\tif err := o.doAfterSelectHooks(exec); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (q currencyQuery) One(exec boil.Executor) (*Currency, error) {\n\to := &Currency{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(nil, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for currency\")\n\t}\n\n\tif err := o.doAfterSelectHooks(exec); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (repo *Repository) FindOneBy(criteria map[string]interface{}) (hateoas.Entity, error) {\n\tbadge := v1.Badge{}\n\terr := repo.db.Where(criteria).First(&badge).Error\n\tif gorm.IsRecordNotFoundError(err) {\n\t\treturn &badge, hateoas.NewEntityDoesNotExistError(badge, criteria)\n\t}\n\treturn &badge, err\n}",
"func (q projectQuery) One(ctx context.Context, exec boil.ContextExecutor) (*Project, error) {\n\to := &Project{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(ctx, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for projects\")\n\t}\n\n\tif err := o.doAfterSelectHooks(ctx, exec); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (q stockCvtermQuery) One() (*StockCvterm, error) {\n\to := &StockCvterm{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"chado: failed to execute a one query for stock_cvterm\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (*articleDAO) FirstArtilce() (Article, error) {\n\tvar article Article\n\terr := DBInstance.First(&article).Error\n\treturn article, err\n}",
"func (commit *Commit) GetByIndex(index int) *Vote {\n\treturn commit.Precommits[index]\n}",
"func (q transactionQuery) One() (*Transaction, error) {\n\to := &Transaction{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for transactions\")\n\t}\n\n\treturn o, nil\n}",
"func (rs *PersonResultSet) One() (*Person, error) {\n\tif !rs.Next() {\n\t\treturn nil, kallax.ErrNotFound\n\t}\n\n\trecord, err := rs.Get()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := rs.Close(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn record, nil\n}",
"func (q foreignLegalResourceQuery) One(ctx context.Context, exec boil.ContextExecutor) (*ForeignLegalResource, error) {\n\to := &ForeignLegalResource{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(ctx, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for ForeignLegalResources\")\n\t}\n\n\treturn o, nil\n}",
"func (o *AssetRevision) Update(exec boil.Executor, whitelist ...string) error {\n\tvar err error\n\tif err = o.doBeforeUpdateHooks(exec); err != nil {\n\t\treturn err\n\t}\n\tkey := makeCacheKey(whitelist, nil)\n\tassetRevisionUpdateCacheMut.RLock()\n\tcache, cached := assetRevisionUpdateCache[key]\n\tassetRevisionUpdateCacheMut.RUnlock()\n\n\tif !cached {\n\t\twl := strmangle.UpdateColumnSet(assetRevisionColumns, assetRevisionPrimaryKeyColumns, whitelist)\n\n\t\tif len(whitelist) == 0 {\n\t\t\twl = strmangle.SetComplement(wl, []string{\"created_at\"})\n\t\t}\n\t\tif len(wl) == 0 {\n\t\t\treturn errors.New(\"public: unable to update asset_revision, could not build whitelist\")\n\t\t}\n\n\t\tcache.query = fmt.Sprintf(\"UPDATE \\\"asset_revision\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, wl),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", len(wl)+1, assetRevisionPrimaryKeyColumns),\n\t\t)\n\t\tcache.valueMapping, err = queries.BindMapping(assetRevisionType, assetRevisionMapping, append(wl, assetRevisionPrimaryKeyColumns...))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tvalues := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), cache.valueMapping)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, cache.query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err = exec.Exec(cache.query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to update asset_revision row\")\n\t}\n\n\tif !cached {\n\t\tassetRevisionUpdateCacheMut.Lock()\n\t\tassetRevisionUpdateCache[key] = cache\n\t\tassetRevisionUpdateCacheMut.Unlock()\n\t}\n\n\treturn o.doAfterUpdateHooks(exec)\n}",
"func (s *SmartContract) ReadAsset(ctx contractapi.TransactionContextInterface, assetID string) (*Asset, error) {\n\n\tlog.Printf(\"ReadAsset: collection %v, ID %v\", assetCollection, assetID)\n\tassetJSON, err := ctx.GetStub().GetPrivateData(assetCollection, assetID) //get the asset from chaincode state\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to read asset: %v\", err)\n\t}\tgithub.com/2cluster/cc-asset-loan v0.0.0-20210212153857-9c1e67367604\n\n\t//No Asset found, return empty response\n\tif assetJSON == nil {\n\t\tlog.Printf(\"%v does not exist in collection %v\", assetID, assetCollection)\n\t\treturn nil, nil\n\t}\n\n\tvar asset *Asset\n\terr = json.Unmarshal(assetJSON, &asset)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to unmarshal JSON: %v\", err)\n\t}\n\n\treturn asset, nil\n\n}",
"func (s TensePresIndResource) FindOne(ID string, r api2go.Request) (api2go.Responder, error) {\n\tqueryConstraints, err := constraints.ApplySingleConstraints(r)\n\tif err != nil {\n\t\treturn &Response{}, err\n\t}\n\n\ttense, err := s.TensePresIndStorage.GetOne(ID, queryConstraints)\n\tif err != nil {\n\t\treturn &Response{}, api2go.NewHTTPError(err, err.Error(), http.StatusNotFound)\n\t}\n\treturn &Response{Res: tense}, nil\n}",
"func (d *Dao) FindOne(query interface{}) (*Item, error) {\n\titem := d.Create()\n\n\tcollection := d.Collection.Name\n\n\tdb := d.Database.Clone()\n\tdefer db.Close()\n\n\terr := db.C(collection).Find(query).One(item.Value)\n\n\tif mgo.ErrNotFound == err {\n\t\treturn nil, nil\n\t}\n\n\tif nil != err {\n\t\treturn nil, err\n\t}\n\n\titem.saved = true\n\titem.updated = true\n\treturn item, nil\n}",
"func (o ApplicationStatusOperationStateSyncResultPtrOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v *ApplicationStatusOperationStateSyncResult) *string {\n\t\tif v == nil {\n\t\t\treturn nil\n\t\t}\n\t\treturn &v.Revision\n\t}).(pulumi.StringPtrOutput)\n}",
"func FindAssetRevisionG(orig int, selectCols ...string) (*AssetRevision, error) {\n\treturn FindAssetRevision(boil.GetDB(), orig, selectCols...)\n}"
] |
[
"0.8567295",
"0.6764614",
"0.6400023",
"0.6330326",
"0.6220191",
"0.5737249",
"0.5674274",
"0.53612995",
"0.5266565",
"0.5264153",
"0.5223515",
"0.52100897",
"0.5149185",
"0.51232177",
"0.5121456",
"0.51098675",
"0.5058171",
"0.50416833",
"0.5035862",
"0.50262904",
"0.50252193",
"0.5013929",
"0.50047076",
"0.5002538",
"0.49892396",
"0.49790502",
"0.4972622",
"0.49680388",
"0.49651945",
"0.49594793",
"0.4945112",
"0.49395654",
"0.4926884",
"0.492221",
"0.4914374",
"0.49139354",
"0.49093398",
"0.4899672",
"0.48984396",
"0.48949495",
"0.48889223",
"0.48879611",
"0.48804295",
"0.48746815",
"0.48745862",
"0.4860609",
"0.48574784",
"0.48552755",
"0.4849348",
"0.4823798",
"0.48214862",
"0.48157454",
"0.48119488",
"0.480004",
"0.47919825",
"0.47919077",
"0.47874978",
"0.4782939",
"0.4770532",
"0.47681743",
"0.47645548",
"0.47622272",
"0.47616702",
"0.47592658",
"0.4758747",
"0.47518665",
"0.47506604",
"0.47478715",
"0.47449103",
"0.47366768",
"0.4721805",
"0.4720468",
"0.47167644",
"0.47155",
"0.4700044",
"0.46932477",
"0.46894497",
"0.46823207",
"0.46804044",
"0.467686",
"0.46743774",
"0.46592146",
"0.4646511",
"0.4644801",
"0.46446648",
"0.46311438",
"0.46256682",
"0.4625321",
"0.46252593",
"0.46239382",
"0.46219397",
"0.46205628",
"0.46190637",
"0.46173885",
"0.46151352",
"0.4609052",
"0.46077007",
"0.46071544",
"0.46061406",
"0.4596072"
] |
0.7900831
|
1
|
One returns a single assetRevision record from the query.
|
func (q assetRevisionQuery) One() (*AssetRevision, error) {
o := &AssetRevision{}
queries.SetLimit(q.Query, 1)
err := q.Bind(o)
if err != nil {
if errors.Cause(err) == sql.ErrNoRows {
return nil, sql.ErrNoRows
}
return nil, errors.Wrap(err, "public: failed to execute a one query for asset_revision")
}
if err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {
return o, err
}
return o, nil
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (q assetRevisionQuery) OneP() *AssetRevision {\n\to, err := q.One()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (q assetQuery) One() (*Asset, error) {\n\to := &Asset{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for asset\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func FindAssetRevision(exec boil.Executor, orig int, selectCols ...string) (*AssetRevision, error) {\n\tassetRevisionObj := &AssetRevision{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"asset_revision\\\" where \\\"orig\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, orig)\n\n\terr := q.Bind(assetRevisionObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"public: unable to select from asset_revision\")\n\t}\n\n\treturn assetRevisionObj, nil\n}",
"func (d *Document) FindOneWithRevision(\n\tcontext.Context, string, int64,\n) (*flare.Document, error) {\n\treturn nil, errors.New(\"not implemented\")\n}",
"func (q assetQuery) OneP() *Asset {\n\to, err := q.One()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func FindAssetRevisionP(exec boil.Executor, orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(exec, orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (cr APIContractRepository) Get(ctx context.Context, revisionID uuid.UUID) (models.APIContractRevision, error) {\n\tif revisionID == uuid.Nil {\n\t\treturn models.APIContractRevision{}, errors.New(\"invalid contract revision id supplied\")\n\t}\n\n\tvar acr models.APIContractRevision\n\ttx := cr.db.Find(&acr, \"id = ?\", revisionID.String())\n\tif tx.Error != nil {\n\t\treturn models.APIContractRevision{}, fmt.Errorf(\"no contract revision found for id %s: %w\", revisionID, tx.Error)\n\t}\n\n\treturn acr, nil\n}",
"func (q authorQuery) One() (*Author, error) {\n\to := &Author{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"mdbmdbmodels: failed to execute a one query for authors\")\n\t}\n\n\treturn o, nil\n}",
"func (api *versionAPI) Find(meta *api.ObjectMeta) (*Version, error) {\n\t// find the object\n\tobj, err := api.ct.FindObject(\"Version\", meta)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// asset type\n\tswitch obj.(type) {\n\tcase *Version:\n\t\thobj := obj.(*Version)\n\t\treturn hobj, nil\n\tdefault:\n\t\treturn nil, errors.New(\"incorrect object type\")\n\t}\n}",
"func (r *Repository) GetOne(id string, version uint) (*domain.Policy, error) {\n\tm := &model.Policy{}\n\tcondition := \"id = ?\"\n\targs := []interface{}{id}\n\tif version != 0 {\n\t\tcondition = \"id = ? AND version = ?\"\n\t\targs = append(args, version)\n\t}\n\n\tconds := append([]interface{}{condition}, args...)\n\tif err := r.db.Order(\"version desc\").First(m, conds...).Error; err != nil {\n\t\tif err == gorm.ErrRecordNotFound {\n\t\t\treturn nil, nil\n\t\t}\n\t\treturn nil, err\n\t}\n\n\tp, err := m.ToDomain()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn p, nil\n}",
"func (i *Invoice) FindOne(id string, client *Client) (*Invoice, error) {\n\tresp, err := client.Get(i.Endpoint() + \"/\" + id)\n\trespData, err := SendResp(resp, err, i)\n\tif err != nil {\n\t\treturn i, err\n\t}\n\treturn &respData.Invoice, err\n}",
"func FindOne(condition Equipment) (Equipment, error) {\n\tdb := common.GetDB()\n\tvar eq Equipment\n\terr := db.Where(condition).First(&eq).Error\n\treturn eq, err\n}",
"func (mm *Model) FindOne(v interface{}, key string, query interface{}) error {\n\treturn mm.execute(func(c CachedCollection) error {\n\t\treturn c.FindOne(v, key, query)\n\t})\n}",
"func (c *Command) GetOne() error {\n\ttableName := c.set.tableName\n\tresult := c.set.result\n\n\tif result == nil {\n\t\treturn errors.New(\"result argument must be set\")\n\t}\n\n\tresultVal := reflect.ValueOf(result)\n\n\tif resultVal.Kind() != reflect.Ptr {\n\t\treturn errors.New(\"result argument must be a pointer\")\n\t}\n\n\tif strings.Contains(reflect.TypeOf(result).String(), \"[]\") {\n\t\treturn errors.New(\"result argument must be a pointer, not a slice\")\n\t}\n\n\tclient := c.set.gom.GetClient()\n\n\tctx, cancelFunc := c.set.GetContext()\n\tdefer cancelFunc()\n\n\tcollection := client.Database(c.set.gom.GetDatabase()).Collection(tableName)\n\n\terr := collection.FindOne(ctx, c.set.filter).Decode(c.set.result)\n\n\tif err != nil {\n\t\treturn errors.New(toolkit.Sprintf(\"Error finding document: %s\", err.Error()))\n\t}\n\n\treturn nil\n}",
"func (q rssAnnouncementQuery) One(ctx context.Context, exec boil.ContextExecutor) (*RSSAnnouncement, error) {\n\to := &RSSAnnouncement{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(ctx, exec, o)\n\tif err != nil {\n\t\tif errors.Is(err, sql.ErrNoRows) {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for rss_announcements\")\n\t}\n\n\treturn o, nil\n}",
"func (mgr *EntryManager) GetOne(entryID int) *Entry {\n\tdb, err := sql.Open(\"postgres\", mgr.ConnStr)\n\tif err != nil {\n\t\tlog.Println(err)\n\t}\n\tdefer db.Close()\n\n\tqueryStr := `\n\t\tSELECT title, date_posted, tags \n\t\tFROM entries \n\t\tWHERE id = $1;\n\t`\n\n\t// Create a \"prepared\" SQL statement context\n\tstmt, err := db.Prepare(queryStr)\n\tif err != nil {\n\t\tlog.Println(err)\n\t\treturn nil\n\t}\n\tdefer stmt.Close()\n\n\t// Fetch Entry record\n\tvar (\n\t\ttitle, tagsText string\n\t\tdatePosted time.Time\n\t)\n\terr = stmt.QueryRow(entryID).Scan(&title, &datePosted, &tagsText)\n\tif err != nil {\n\t\tlog.Println(err)\n\t\treturn nil\n\t}\n\n\t// Populate Entry record\n\treturn &Entry{\n\t\tID: entryID,\n\t\tTitle: title,\n\t\tDatePosted: datePosted,\n\t\tTags: strings.Split(tagsText, \",\"),\n\t}\n}",
"func (q voteQuery) One(ctx context.Context, exec boil.ContextExecutor) (*Vote, error) {\n\to := &Vote{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(ctx, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for vote\")\n\t}\n\n\treturn o, nil\n}",
"func (s *PollVoteStore) FindOne(q *PollVoteQuery) (*PollVote, error) {\n\tq.Limit(1)\n\tq.Offset(0)\n\trs, err := s.Find(q)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif !rs.Next() {\n\t\treturn nil, kallax.ErrNotFound\n\t}\n\n\trecord, err := rs.Get()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := rs.Close(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn record, nil\n}",
"func (mvq *ModuleVersionQuery) First(ctx context.Context) (*ModuleVersion, error) {\n\tmvs, err := mvq.Limit(1).All(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif len(mvs) == 0 {\n\t\treturn nil, &ErrNotFound{moduleversion.Label}\n\t}\n\treturn mvs[0], nil\n}",
"func (q inventoryQuery) One() (*Inventory, error) {\n\to := &Inventory{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for inventory\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (r *Repository) FindOne(\n\tctx context.Context,\n\tconditions []fazzdb.SliceCondition,\n\torders []fazzdb.Order,\n) (interface{}, error) {\n\tq, err := r.GetQuery(ctx)\n\tif nil != err {\n\t\treturn nil, err\n\t}\n\n\tcurrent := q.Use(r.model).\n\t\tWhereMany(conditions...).\n\t\tOrderByMany(orders...).\n\t\tWithLimit(1)\n\n\trows, err := current.AllCtx(ctx)\n\tif nil != err {\n\t\treturn nil, err\n\t}\n\n\tval := reflect.ValueOf(rows)\n\tif val.Len() == 0 {\n\t\treturn nil, NewEmptyResultError()\n\t}\n\n\treturn val.Index(0).Interface(), nil\n}",
"func (assetRevisionL) LoadAsset(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Asset\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Asset\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Asset = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Asset == foreign.ID {\n\t\t\t\tlocal.R.Asset = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (p *APIView) FindOne(result interface{}, context *Context) error {\n\tprimaryQuerySQL, primaryParams := p.toPrimaryQueryParams(result, context.ResourceID, context)\n\tdb := context.GetDB()\n\tif db == nil {\n\t\treturn errors.New(\"db is nil\")\n\t}\n\tif primaryQuerySQL != \"\" {\n\t\treturn db.First(result, append([]interface{}{primaryQuerySQL}, primaryParams...)...).Error\n\t}\n\n\treturn errors.New(\"failed to find\")\n}",
"func (s *Server) FindOne(c echo.Context) error {\n\tspan := opentracing.StartSpan(\"API.FindOne\")\n\tdefer span.Finish()\n\n\tquery := c.Param(\"id\")\n\n\tjob, err := s.Storage.FindOne(query)\n\tif err != nil {\n\t\tlog.Error(err)\n\t\tc.JSON(http.StatusInternalServerError, err)\n\t\treturn err\n\t}\n\n\tc.JSON(http.StatusOK, job)\n\treturn nil\n}",
"func (d *Dao) FindOne(query interface{}) (*Item, error) {\n\titem := d.Create()\n\n\tcollection := d.Collection.Name\n\n\tdb := d.Database.Clone()\n\tdefer db.Close()\n\n\terr := db.C(collection).Find(query).One(item.Value)\n\n\tif mgo.ErrNotFound == err {\n\t\treturn nil, nil\n\t}\n\n\tif nil != err {\n\t\treturn nil, err\n\t}\n\n\titem.saved = true\n\titem.updated = true\n\treturn item, nil\n}",
"func (s *StatsPeriodStore) FindOne(q *StatsPeriodQuery) (*StatsPeriod, error) {\n\tq.Limit(1)\n\tq.Offset(0)\n\trs, err := s.Find(q)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif !rs.Next() {\n\t\treturn nil, kallax.ErrNotFound\n\t}\n\n\trecord, err := rs.Get()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := rs.Close(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn record, nil\n}",
"func (q voteQuery) One() (*Vote, error) {\n\to := &Vote{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for vote\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (s *PetStore) FindOne(q *PetQuery) (*Pet, error) {\n\tq.Limit(1)\n\tq.Offset(0)\n\trs, err := s.Find(q)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif !rs.Next() {\n\t\treturn nil, kallax.ErrNotFound\n\t}\n\n\trecord, err := rs.Get()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := rs.Close(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn record, nil\n}",
"func getAssetByID(id int) (*Asset, error) {\n\tpath := fmt.Sprintf(\"asset/%d\", id)\n\tresp, err := get(path, nil)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Failed TCMD request\")\n\t}\n\n\tvar result Asset\n\terr = json.Unmarshal(resp, &result)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Failed to unmarshal TCMD response\")\n\t}\n\treturn &result, nil\n}",
"func (r *ShowsService) One(traktID string) (show *Show, result *Result) {\n\turl, _ := showURL.Expand(M{\"traktID\":traktID})\n\tresult = r.client.get(url, &show)\n\treturn\n}",
"func (q holdenAtQuery) One(ctx context.Context, exec boil.ContextExecutor) (*HoldenAt, error) {\n\to := &HoldenAt{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(ctx, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for HoldenAt\")\n\t}\n\n\treturn o, nil\n}",
"func (s *Searcher) FindOne() (interface{}, error) {\n\tcontext := s.parseContext()\n\tresult := s.Resource.NewStruct()\n\terr := s.Resource.CallFindOne(result, nil, context)\n\treturn result, err\n}",
"func (rs *PollVoteResultSet) One() (*PollVote, error) {\n\tif !rs.Next() {\n\t\treturn nil, kallax.ErrNotFound\n\t}\n\n\trecord, err := rs.Get()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := rs.Close(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn record, nil\n}",
"func (q braceletPhotoQuery) One() (*BraceletPhoto, error) {\n\to := &BraceletPhoto{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for bracelet_photo\")\n\t}\n\n\treturn o, nil\n}",
"func getAssetByName(name string) (*Asset, error) {\n\tparams := map[string]string{\n\t\t\"predicate\": fmt.Sprintf(\"name='%s'\", name),\n\t}\n\tresp, err := get(\"asset\", params)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Failed TCMD request\")\n\t}\n\n\tvar result []Asset\n\terr = json.Unmarshal(resp, &result)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Failed to unmarshal TCMD response\")\n\t}\n\n\tif len(result) > 0 {\n\t\treturn &result[0], nil\n\t}\n\n\treturn nil, nil\n}",
"func (q ReleaseQuery) One() (result *Release, err error) {\n\tresults := make(ReleaseCollection, 0, 1)\n\terr = Select(q.db, &results, q.builder)\n\tif err != nil {\n\t\terr = errors.Wrap(err, \"ReleaseQuery.One() failed to populate initial result set.\")\n\t\treturn\n\t}\n\n\tfor _, f := range q.processors {\n\t\terr = f(q.db, results)\n\t\tif err != nil {\n\t\t\terr = errors.Wrap(err, \"Failed to run processor over ReleaseCollection.\")\n\t\t\treturn\n\t\t}\n\t}\n\n\tif len(results) > 0 {\n\t\tresult = results[0]\n\t}\n\n\treturn result, nil\n}",
"func (mock *MockRepository) FindOne(CPF string) (entities.Account, error) {\n\targs := mock.Called()\n\tresult := args.Get(0)\n\treturn result.(entities.Account), args.Error(1)\n}",
"func FindAssetRevisionGP(orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(boil.GetDB(), orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (rev PlannerRevision) Value() string { return rev.value }",
"func (v *Vessel) FetchOne() (Vessel, error) {\n\tdb := adaptors.DBConnector()\n\tdefer db.Close()\n\n\tvar vessel Vessel\n\terr := db.Select([]string{\"id\", \"name\", \"beam\", \"loa\", \"draft\", \"status\"}).Where(\"id = ?\", v.ID).Find(&vessel).Error\n\treturn vessel, err\n}",
"func (o *AssetRevision) Delete(exec boil.Executor) error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision provided for delete\")\n\t}\n\n\tif err := o.doBeforeDeleteHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\targs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), assetRevisionPrimaryKeyMapping)\n\tquery := \"DELETE FROM \\\"asset_revision\\\" WHERE \\\"orig\\\"=$1\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, args...)\n\t}\n\n\t_, err := exec.Exec(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to delete from asset_revision\")\n\t}\n\n\tif err := o.doAfterDeleteHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}",
"func (c *Command) GetSingle(ctx *gin.Context) {\n\ttoken := html.EscapeString(ctx.Param(\"token\"))\n\tname := html.EscapeString(ctx.Param(\"name\"))\n\tfilter := map[string]interface{}{\"token\": token, \"name\": name}\n\n\tres, err := c.ReturnOne(filter)\n\tretRes, ok := err.(rethink.RetrievalResult)\n\t// If !ok AND then err != nil then we have an actual error and not a RetRes\n\tif !ok && err != nil {\n\t\tutil.NiceError(ctx, err, http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// If we find one then we're just going to return right away\n\tif retRes.Success && !retRes.SoftDeleted {\n\t\tctx.Header(\"x-total-count\", \"1\")\n\t\tctx.JSON(http.StatusOK, util.MarshalResponse(res))\n\t\treturn\n\t}\n\n\t// None were found Jim, 404 that boyo\n\tctx.AbortWithStatus(http.StatusNotFound)\n\treturn\n}",
"func (q vendorQuery) One(ctx context.Context, exec boil.ContextExecutor) (*Vendor, error) {\n\to := &Vendor{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(ctx, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for vendors\")\n\t}\n\n\tif err := o.doAfterSelectHooks(ctx, exec); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (rs *PetResultSet) One() (*Pet, error) {\n\tif !rs.Next() {\n\t\treturn nil, kallax.ErrNotFound\n\t}\n\n\trecord, err := rs.Get()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := rs.Close(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn record, nil\n}",
"func (rs *StatsPeriodResultSet) One() (*StatsPeriod, error) {\n\tif !rs.Next() {\n\t\treturn nil, kallax.ErrNotFound\n\t}\n\n\trecord, err := rs.Get()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := rs.Close(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn record, nil\n}",
"func (q stockKeepingUnitContentQuery) One(exec boil.Executor) (*StockKeepingUnitContent, error) {\n\to := &StockKeepingUnitContent{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(nil, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"db: failed to execute a one query for stock_keeping_unit_content\")\n\t}\n\n\tif err := o.doAfterSelectHooks(exec); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (t *evidence_management) queryAsset(APIstub shim.ChaincodeStubInterface, args []string) pb.Response {\n\tif len(args) != 2 {\n\t\treturn shim.Error(\"Incorrect number of arguments, Required 2\")\n\t}\n\n\tfmt.Println(\"In Query Asset\")\n\n\tAssetAsBytes, _ := APIstub.GetState(args[1])\n\n\tif AssetAsBytes == nil {\n\t\treturn shim.Error(\"Could not locate Asset\")\n\n\t}\n\n\treturn shim.Success(AssetAsBytes)\n}",
"func (q stockCvtermQuery) One() (*StockCvterm, error) {\n\to := &StockCvterm{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"chado: failed to execute a one query for stock_cvterm\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (au *audit) One(kit *kit.Kit, audit *table.Audit, opt *AuditOption) error {\n\tif audit == nil || opt == nil {\n\t\treturn errors.New(\"invalid input audit or opt\")\n\t}\n\n\t// generate an audit id and update to audit.\n\tid, err := au.idGen.One(kit, table.AuditTable)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\taudit.ID = id\n\n\tvar q gen.IAuditDo\n\n\tif opt.genQ != nil && au.db.Migrator().CurrentDatabase() == opt.genQ.CurrentDatabase() {\n\t\t// 使用同一个库,事务处理\n\t\tq = opt.genQ.Audit.WithContext(kit.Ctx)\n\t} else {\n\t\t// 使用独立的 DB\n\t\tq = au.genQ.Audit.WithContext(kit.Ctx)\n\t}\n\n\tif err := q.Create(audit); err != nil {\n\t\treturn fmt.Errorf(\"insert audit failed, err: %v\", err)\n\t}\n\treturn nil\n}",
"func (b *PgTxRepository) FindOne(ctx context.Context, filter interface{}, output interface{}) error {\n\tcolumns, _ := b.ExtractColumnPairs(output)\n\n\t// Prepare query\n\tqb := sq.Select(columns...).\n\t\tFrom(b.table).\n\t\tWhere(filter).\n\t\tLimit(1).\n\t\tPlaceholderFormat(sq.Dollar)\n\n\t// Build SQL Query\n\tquery, args, err := qb.ToSql()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// The statements prepared for a transaction by calling the transaction's Prepare or Stmt methods\n\t// are closed by the call to Commit or Rollback.\n\tstmt, err := b.tx.PreparexContext(ctx, query)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Do the find\n\terr = stmt.QueryRowxContext(ctx, args...).StructScan(output)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// No errors\n\treturn nil\n}",
"func (e *ExpenseModel) ReadOne(filter interface{}) (Expense, error) {\n\tvar expense Expense\n\tcollection := e.db.Client.Database(e.db.DBName).Collection(\"expenses\")\n\tdocumentReturned := collection.FindOne(context.TODO(), filter)\n\tdocumentReturned.Decode(&expense)\n\treturn expense, nil\n}",
"func (db *DB) getVersion(id int) *DetailVersion {\n\tver := &DetailVersion{}\n\terr := db.Get(ver, \"select * from detail_version where id = $1\", id)\n\n\tif err != nil {\n\t\tif err == sql.ErrNoRows {\n\t\t\treturn nil\n\t\t} else {\n\t\t\tpanic(err)\n\t\t}\n\t}\n\n\treturn ver\n}",
"func (q paymentObjectQuery) One(ctx context.Context, exec boil.ContextExecutor) (*PaymentObject, error) {\n\to := &PaymentObject{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(ctx, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for payment_objects\")\n\t}\n\n\tif err := o.doAfterSelectHooks(ctx, exec); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (c *AuditEventClient) Single(ctx context.Context, opts *AuditEventListOptions) (*resource.AuditEvent, error) {\n\treturn Single[*AuditEventListOptions, *resource.AuditEvent](opts, func(opts *AuditEventListOptions) ([]*resource.AuditEvent, *Pager, error) {\n\t\treturn c.List(ctx, opts)\n\t})\n}",
"func Single(result Result, err error) (*Record, error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn result.Single()\n}",
"func (q rawVisitQuery) One(ctx context.Context, exec boil.ContextExecutor) (*RawVisit, error) {\n\to := &RawVisit{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(ctx, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for raw_visits\")\n\t}\n\n\tif err := o.doAfterSelectHooks(ctx, exec); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (v *VersionHistory) GetFirstItem() (*VersionHistoryItem, error) {\n\n\tif len(v.Items) == 0 {\n\t\treturn nil, &shared.BadRequestError{Message: \"version history is empty.\"}\n\t}\n\n\treturn v.Items[0].Duplicate(), nil\n}",
"func (o *AssetRevision) AssetByFk(exec boil.Executor, mods ...qm.QueryMod) assetQuery {\n\tqueryMods := []qm.QueryMod{\n\t\tqm.Where(\"id=?\", o.Asset),\n\t}\n\n\tqueryMods = append(queryMods, mods...)\n\n\tquery := Assets(exec, queryMods...)\n\tqueries.SetFrom(query.Query, \"\\\"asset\\\"\")\n\n\treturn query\n}",
"func (q activityLogQuery) One(ctx context.Context, exec boil.ContextExecutor) (*ActivityLog, error) {\n\to := &ActivityLog{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(ctx, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"dbmodel: failed to execute a one query for activity_logs\")\n\t}\n\n\tif err := o.doAfterSelectHooks(ctx, exec); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (q transactionQuery) One() (*Transaction, error) {\n\to := &Transaction{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for transactions\")\n\t}\n\n\treturn o, nil\n}",
"func (q recipeAdditiveQuery) One(ctx context.Context, exec boil.ContextExecutor) (*RecipeAdditive, error) {\n\to := &RecipeAdditive{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(ctx, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for recipe_additive\")\n\t}\n\n\tif err := o.doAfterSelectHooks(ctx, exec); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func AssetRevisionExists(exec boil.Executor, orig int) (bool, error) {\n\tvar exists bool\n\n\tquery := \"select exists(select 1 from \\\"asset_revision\\\" where \\\"orig\\\"=$1 limit 1)\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, orig)\n\t}\n\n\trow := exec.QueryRow(query, orig)\n\n\terr := row.Scan(&exists)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"public: unable to check if asset_revision exists\")\n\t}\n\n\treturn exists, nil\n}",
"func (sc *ScreenlyClient) Get(id string) *Asset {\n\tasset := &Asset{}\n\tpath := fmt.Sprintf(\"assets/%s\", id)\n\tresponse, err := sc.doHttp(\"GET\", path, nil)\n\tif err == nil {\n\t\terr = json.NewDecoder(response.Body).Decode(asset)\n\t\tif err == nil {\n\t\t\treturn asset\n\t\t}\n\t}\n\tpanic(err)\n}",
"func (dao *Dao) SelectOne(ctx context.Context, id interface{}, opts ...options.SelectOption) (interface{}, error) {\n\tif len(dao.primaries) != 1 {\n\t\tpanic(\"SelectOne only support single primary key model: \" + dao.table)\n\t}\n\treturn dao.SelectOneByCondition(ctx,\n\t\t(&Query{}).\n\t\t\tEqual(dao.primaries[0].Name, id).\n\t\t\tLimit(1).\n\t\t\tData(),\n\t\topts...)\n}",
"func (q *Query) One(result interface{}) error {\n\tif len(q.opts) > 0 {\n\t\tif err := middleware.Do(q.ctx, q.opts[0].QueryHook, operator.BeforeQuery); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\topt := options.FindOne()\n\n\tif q.collation != nil {\n\t\topt.SetCollation(q.collation)\n\t}\n\tif q.sort != nil {\n\t\topt.SetSort(q.sort)\n\t}\n\tif q.project != nil {\n\t\topt.SetProjection(q.project)\n\t}\n\tif q.skip != nil {\n\t\topt.SetSkip(*q.skip)\n\t}\n\tif q.hint != nil {\n\t\topt.SetHint(q.hint)\n\t}\n\n\terr := q.collection.FindOne(q.ctx, q.filter, opt).Decode(result)\n\n\tif err != nil {\n\t\treturn err\n\t}\n\tif len(q.opts) > 0 {\n\t\tif err := middleware.Do(q.ctx, q.opts[0].QueryHook, operator.AfterQuery); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}",
"func (m *mongoDriver) FindOne(ctx context.Context, query bson.M, opts *options.FindOneOptions) (*mongo.SingleResult, error) {\n\tcoll := m.client.Database(database).Collection(collection)\n\tres := coll.FindOne(ctx, query, opts)\n\n\tif err := res.Err(); err != nil {\n\t\treturn nil, fmt.Errorf(\"FindOne: unable to find book: %s\", err)\n\t}\n\n\treturn res, nil\n}",
"func FindOne(query db.Q) (*Patch, error) {\n\tpatch := &Patch{}\n\terr := db.FindOneQ(Collection, query, patch)\n\tif adb.ResultsNotFound(err) {\n\t\treturn nil, nil\n\t}\n\treturn patch, err\n}",
"func (db *Client) FindOne(collection string, filters *bson.M) *mongo.SingleResult {\n\treturn db.Database.Collection(collection).FindOne(context.TODO(), filters)\n}",
"func (model *GrogModel) GetAsset(name string) (*Asset, error) {\n\tvar foundAsset *Asset\n\tvar mimeType string\n\tvar content = make([]byte, 0)\n\tvar serveExternal int64\n\tvar rendered int64\n\tvar added int64\n\tvar modified int64\n\tvar err error\n\n\trow := model.db.DB.QueryRow(`select mimeType, content, serve_external, rendered,\n\t\tadded, modified from Assets where name = ?`, name)\n\tif row.Scan(&mimeType, &content, &serveExternal, &rendered, &added, &modified) != sql.ErrNoRows {\n\t\tfoundAsset = model.NewAsset(name, mimeType)\n\t\tfoundAsset.Content = content\n\t\tif serveExternal == 1 {\n\t\t\tfoundAsset.ServeExternal = true\n\t\t} else {\n\t\t\tfoundAsset.ServeExternal = false\n\t\t}\n\n\t\tif rendered == 1 {\n\t\t\tfoundAsset.Rendered = true\n\t\t} else {\n\t\t\tfoundAsset.Rendered = false\n\t\t}\n\n\t\tfoundAsset.Added.Set(time.Unix(added, 0))\n\t\tfoundAsset.Modified.Set(time.Unix(modified, 0))\n\t} else {\n\t\terr = fmt.Errorf(\"No asset with name %s\", name)\n\t}\n\n\treturn foundAsset, err\n}",
"func (u *RecipesCtrl) GetOne(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {\n\trecipeID, err := strconv.Atoi(ps.ByName(\"id\"))\n\tif err != nil {\n\t\trespondErr(w, r, http.StatusBadRequest, err)\n\t\treturn\n\t}\n\n\tRecipe, err := u.Svc.GetOne(recipeID)\n\tif err != nil {\n\t\trespondErr(w, r, http.StatusInternalServerError, err)\n\t\treturn\n\t}\n\n\trespond(w, r, http.StatusOK, Recipe)\n}",
"func (s TensePresIndResource) FindOne(ID string, r api2go.Request) (api2go.Responder, error) {\n\tqueryConstraints, err := constraints.ApplySingleConstraints(r)\n\tif err != nil {\n\t\treturn &Response{}, err\n\t}\n\n\ttense, err := s.TensePresIndStorage.GetOne(ID, queryConstraints)\n\tif err != nil {\n\t\treturn &Response{}, api2go.NewHTTPError(err, err.Error(), http.StatusNotFound)\n\t}\n\treturn &Response{Res: tense}, nil\n}",
"func (q repositoryQuery) One(ctx context.Context, exec boil.ContextExecutor) (*Repository, error) {\n\to := &Repository{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(ctx, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for repositories\")\n\t}\n\n\tif err := o.doAfterSelectHooks(ctx, exec); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (q currencyQuery) One(exec boil.Executor) (*Currency, error) {\n\to := &Currency{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(nil, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for currency\")\n\t}\n\n\tif err := o.doAfterSelectHooks(exec); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (repo *Repository) FindOneBy(criteria map[string]interface{}) (hateoas.Entity, error) {\n\tbadge := v1.Badge{}\n\terr := repo.db.Where(criteria).First(&badge).Error\n\tif gorm.IsRecordNotFoundError(err) {\n\t\treturn &badge, hateoas.NewEntityDoesNotExistError(badge, criteria)\n\t}\n\treturn &badge, err\n}",
"func (h *handler) FindOne(ctx context.Context, param db.Params) error {\n\tbsonFilter := bson.M{}\n\tfor key, val := range param.Filter {\n\t\tbsonFilter[key] = val\n\t}\n\tif err := h.getDatabase(param.Database).C(param.Collection).Find(bsonFilter).One(param.Result); err != nil {\n\t\tif err == mgo.ErrNotFound {\n\t\t\terr = db.ErrNotFound\n\t\t}\n\t\treturn err\n\t}\n\treturn nil\n}",
"func (q projectQuery) One(ctx context.Context, exec boil.ContextExecutor) (*Project, error) {\n\to := &Project{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(ctx, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for project\")\n\t}\n\n\tif err := o.doAfterSelectHooks(ctx, exec); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (rs *PersonResultSet) One() (*Person, error) {\n\tif !rs.Next() {\n\t\treturn nil, kallax.ErrNotFound\n\t}\n\n\trecord, err := rs.Get()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := rs.Close(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn record, nil\n}",
"func (s *PersonStore) FindOne(q *PersonQuery) (*Person, error) {\n\tq.Limit(1)\n\tq.Offset(0)\n\trs, err := s.Find(q)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif !rs.Next() {\n\t\treturn nil, kallax.ErrNotFound\n\t}\n\n\trecord, err := rs.Get()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := rs.Close(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn record, nil\n}",
"func (q transactionQuery) One() (*Transaction, error) {\n\to := &Transaction{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"model: failed to execute a one query for transaction\")\n\t}\n\n\treturn o, nil\n}",
"func (q rentalQuery) One() (*Rental, error) {\n\to := &Rental{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"sqlboiler: failed to execute a one query for rental\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (s *SmartContract) queryAsset(APIstub shim.ChaincodeStubInterface, args []string) sc.Response {\n\n\tif len(args) != 1 {\n\t\treturn shim.Error(\"Incorrect number of arguments. Expecting 1\")\n\t}\n\n\tassetAsBytes, _ := APIstub.GetState(args[0])\n\tif assetAsBytes == nil {\n\t\treturn shim.Error(\"Could not locate asset\")\n\t}\n\treturn shim.Success(assetAsBytes)\n}",
"func (t *MedChain) queryAsset(APIstub shim.ChaincodeStubInterface, args []string) peer.Response {\n\t\tif len(args) != 1 {\n\t\t\treturn shim.Error(\"Incorrect number of arguments, Required 1\")\n\t\t}\n\n\t\tfmt.Println(fmt.Sprintf(\"- start queryAsset: %s\\n\", args))\n\n\t\tAssetAsBytes, _ := APIstub.GetState(args[0])\n\n\t\tif AssetAsBytes == nil {\n\t\t\treturn shim.Error(\"Could not locate Asset\")\n\n\t\t}\n\t\t\n\t\treturn shim.Success(AssetAsBytes)\n\t}",
"func (q stockQuery) One() (*Stock, error) {\n\to := &Stock{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for stock\")\n\t}\n\n\treturn o, nil\n}",
"func (commit *Commit) GetByIndex(index int) *Vote {\n\treturn commit.Precommits[index]\n}",
"func (c *PlatformGraphQLClient) FetchAsset(ctx context.Context, assetID string) (*Asset, error) {\n\treq := graphql.NewRequest(`\n\t\tquery (\n\t\t\t$assetId: ID!\n\t\t) {\n\t\t\tasset(id: $assetId) {\n\t\t\t\tid\n\t\t\t\tcontainer {\n\t\t\t\t\tid\n\t\t\t\t}\n\t\t\t\tsourceData {\n\t\t\t\t\ttaskId\n\t\t\t\t\tengine {\n\t\t\t\t\t\tname\n\t\t\t\t\t\tid\n\t\t\t\t\t\tdeployedVersion\n\t\t\t\t\t\tcategoryId\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttransform(transformFunction: JSON)\n\t\t\t}\n\t\t}\n\t`)\n\n\treq.Var(\"assetId\", assetID)\n\n\tvar resp struct {\n\t\tResult *Asset `json:\"asset\"`\n\t}\n\n\treturn resp.Result, c.Run(ctx, req, &resp)\n}",
"func (r *Releaser) Find(tagName string) (*Release, error) {\n\trelease, _, err := r.client.Repositories.GetReleaseByTag(context.Background(), r.owner, r.repository, tagName)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tlog.Printf(\"found release ID: %v, tag: %v\", *release.ID, *release.TagName)\n\treturn &Release{ID: *release.ID, TagName: *release.TagName, Releaser: r}, nil\n}",
"func (g Index) GetSha1(path IndexPath) Sha1 {\n\tfor _, entry := range g.Objects {\n\t\tif entry.PathName == path {\n\t\t\treturn entry.Sha1\n\t\t}\n\t}\n\treturn Sha1{}\n}",
"func (ctrl TerraformJobController) One(c *gin.Context) {\n\tjob := c.MustGet(cTerraformJob).(terraform.Job)\n\tmetadata.JobMetadata(&job)\n\tc.JSON(http.StatusOK, job)\n}",
"func (o LookupApiResultOutput) Revision() pulumi.StringArrayOutput {\n\treturn o.ApplyT(func(v LookupApiResult) []string { return v.Revision }).(pulumi.StringArrayOutput)\n}",
"func (q sourceQuery) One() (*Source, error) {\n\to := &Source{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"mdbmdbmodels: failed to execute a one query for sources\")\n\t}\n\n\treturn o, nil\n}",
"func (o ApplicationStatusOperationStateSyncResultOutput) Revision() pulumi.StringOutput {\n\treturn o.ApplyT(func(v ApplicationStatusOperationStateSyncResult) string { return v.Revision }).(pulumi.StringOutput)\n}",
"func (q projectQuery) One(ctx context.Context, exec boil.ContextExecutor) (*Project, error) {\n\to := &Project{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(ctx, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for projects\")\n\t}\n\n\tif err := o.doAfterSelectHooks(ctx, exec); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (a ArticleDB) QueryOne(sess *sqlabble.Session, st stmt.Statement) (Article, error) {\n\tquery, values := sess.Builder.Build(st)\n\trows, err := sess.Query(query, values...)\n\tif err != nil {\n\t\treturn Article{}, err\n\t}\n\tms, err := a.Map(rows)\n\tif err != nil {\n\t\treturn Article{}, err\n\t}\n\tif len(ms) == 0 {\n\t\treturn Article{}, sqlabble.NewErrRecordNotFound(a.Table.Name)\n\t}\n\tif len(ms) > 1 {\n\t\treturn Article{}, sqlabble.NewErrFoundMultipleRecords(a.Table.Name)\n\t}\n\treturn ms[0], nil\n}",
"func GetUniqueOne(session *mgo.Session, collection *mgo.Collection, q interface{}, doc interface{}) error {\n\tsession.Refresh()\n\treturn collection.Find(q).One(doc)\n}",
"func (q featureCvtermDbxrefQuery) One() (*FeatureCvtermDbxref, error) {\n\to := &FeatureCvtermDbxref{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"chado: failed to execute a one query for feature_cvterm_dbxref\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func get_asset(stub shim.ChaincodeStubInterface, id string) (Asset, error) {\n\tvar asset Asset\n\tassetAsBytes, err := stub.GetState(id) //getState retreives a key/value from the ledger\n\tif err != nil { //this seems to always succeed, even if key didn't exist\n\t\treturn asset, errors.New(\"Failed to find asset - \" + id)\n\t}\n\tjson.Unmarshal(assetAsBytes, &asset) //un stringify it aka JSON.parse()\n\n\tif asset.Id != id { //test if product is actually here or just nil\n\t\treturn asset, errors.New(\"Asset does not exist - \" + id)\n\t}\n\n\treturn asset, nil\n}",
"func (o *AssetRevision) Insert(exec boil.Executor, whitelist ...string) error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no asset_revision provided for insertion\")\n\t}\n\n\tvar err error\n\n\tif err := o.doBeforeInsertHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\tnzDefaults := queries.NonZeroDefaultSet(assetRevisionColumnsWithDefault, o)\n\n\tkey := makeCacheKey(whitelist, nzDefaults)\n\tassetRevisionInsertCacheMut.RLock()\n\tcache, cached := assetRevisionInsertCache[key]\n\tassetRevisionInsertCacheMut.RUnlock()\n\n\tif !cached {\n\t\twl, returnColumns := strmangle.InsertColumnSet(\n\t\t\tassetRevisionColumns,\n\t\t\tassetRevisionColumnsWithDefault,\n\t\t\tassetRevisionColumnsWithoutDefault,\n\t\t\tnzDefaults,\n\t\t\twhitelist,\n\t\t)\n\n\t\tcache.valueMapping, err = queries.BindMapping(assetRevisionType, assetRevisionMapping, wl)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcache.retMapping, err = queries.BindMapping(assetRevisionType, assetRevisionMapping, returnColumns)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif len(wl) != 0 {\n\t\t\tcache.query = fmt.Sprintf(\"INSERT INTO \\\"asset_revision\\\" (\\\"%s\\\") VALUES (%s)\", strings.Join(wl, \"\\\",\\\"\"), strmangle.Placeholders(dialect.IndexPlaceholders, len(wl), 1, 1))\n\t\t} else {\n\t\t\tcache.query = \"INSERT INTO \\\"asset_revision\\\" DEFAULT VALUES\"\n\t\t}\n\n\t\tif len(cache.retMapping) != 0 {\n\t\t\tcache.query += fmt.Sprintf(\" RETURNING \\\"%s\\\"\", strings.Join(returnColumns, \"\\\",\\\"\"))\n\t\t}\n\t}\n\n\tvalue := reflect.Indirect(reflect.ValueOf(o))\n\tvals := queries.ValuesFromMapping(value, cache.valueMapping)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, cache.query)\n\t\tfmt.Fprintln(boil.DebugWriter, vals)\n\t}\n\n\tif len(cache.retMapping) != 0 {\n\t\terr = exec.QueryRow(cache.query, vals...).Scan(queries.PtrsFromMapping(value, cache.retMapping)...)\n\t} else {\n\t\t_, err = exec.Exec(cache.query, vals...)\n\t}\n\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to insert into asset_revision\")\n\t}\n\n\tif !cached {\n\t\tassetRevisionInsertCacheMut.Lock()\n\t\tassetRevisionInsertCache[key] = cache\n\t\tassetRevisionInsertCacheMut.Unlock()\n\t}\n\n\treturn o.doAfterInsertHooks(exec)\n}",
"func (qs SysDBQuerySet) One(ret *SysDB) error {\n\treturn qs.db.First(ret).Error\n}",
"func (q sourceQuery) One(exec boil.Executor) (*Source, error) {\n\to := &Source{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(nil, exec, o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"mdbmodels: failed to execute a one query for sources\")\n\t}\n\n\treturn o, nil\n}",
"func GetOne(req *router.Request) error {\n\tparams := req.Params.(*GetOneParams)\n\tshow, err := GetShow(params.ID)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif show == nil {\n\t\treturn httperr.NewNotFound()\n\t}\n\treq.Ok(NewPayload(show))\n\treturn nil\n}"
] |
[
"0.7171982",
"0.69865423",
"0.62566036",
"0.5902141",
"0.58354354",
"0.5475765",
"0.5348048",
"0.53184235",
"0.5227806",
"0.5138412",
"0.51078236",
"0.50925833",
"0.50833327",
"0.50805354",
"0.5069638",
"0.5065693",
"0.50258964",
"0.5022951",
"0.49978894",
"0.4996238",
"0.49872667",
"0.497939",
"0.4971161",
"0.49390024",
"0.49311313",
"0.49291855",
"0.4927103",
"0.49262443",
"0.49218976",
"0.49188575",
"0.49091348",
"0.4898421",
"0.4887905",
"0.48788074",
"0.4877915",
"0.48746046",
"0.4874585",
"0.48709086",
"0.48536855",
"0.48256904",
"0.4821757",
"0.48164463",
"0.48097864",
"0.48040235",
"0.47850576",
"0.47734687",
"0.47649413",
"0.47641686",
"0.47570837",
"0.47485426",
"0.4748443",
"0.4744463",
"0.47441903",
"0.47417724",
"0.47409683",
"0.47354263",
"0.47337562",
"0.47014096",
"0.46954343",
"0.46854332",
"0.46848264",
"0.46617475",
"0.4658733",
"0.46576303",
"0.465363",
"0.4652803",
"0.4641081",
"0.46370384",
"0.46299508",
"0.4623332",
"0.46185976",
"0.46153244",
"0.46101418",
"0.4590995",
"0.45872766",
"0.45872602",
"0.45845687",
"0.45763248",
"0.45759547",
"0.45750752",
"0.456654",
"0.4554415",
"0.4546222",
"0.4545509",
"0.45447192",
"0.45409942",
"0.45400813",
"0.4538347",
"0.4526943",
"0.45247602",
"0.45218933",
"0.45210156",
"0.4519266",
"0.45182937",
"0.45182046",
"0.45170283",
"0.45169938",
"0.45065093",
"0.4504646",
"0.4501205"
] |
0.86560833
|
0
|
AllP returns all AssetRevision records from the query, and panics on error.
|
func (q assetRevisionQuery) AllP() AssetRevisionSlice {
o, err := q.All()
if err != nil {
panic(boil.WrapErr(err))
}
return o
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (q assetRevisionQuery) All() (AssetRevisionSlice, error) {\n\tvar o AssetRevisionSlice\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"public: failed to assign all query results to AssetRevision slice\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (q assetQuery) AllP() AssetSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (q assetQuery) All() (AssetSlice, error) {\n\tvar o AssetSlice\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Asset slice\")\n\t}\n\n\tif len(assetAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (mvq *ModuleVersionQuery) All(ctx context.Context) ([]*ModuleVersion, error) {\n\treturn mvq.sqlAll(ctx)\n}",
"func (o *AssetRevisionSlice) ReloadAll(exec boil.Executor) error {\n\tif o == nil || len(*o) == 0 {\n\t\treturn nil\n\t}\n\n\tassetRevisions := AssetRevisionSlice{}\n\tvar args []interface{}\n\tfor _, obj := range *o {\n\t\tpkeyArgs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(obj)), assetRevisionPrimaryKeyMapping)\n\t\targs = append(args, pkeyArgs...)\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"SELECT \\\"asset_revision\\\".* FROM \\\"asset_revision\\\" WHERE (%s) IN (%s)\",\n\t\tstrings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, assetRevisionPrimaryKeyColumns), \",\"),\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, len(*o)*len(assetRevisionPrimaryKeyColumns), 1, len(assetRevisionPrimaryKeyColumns)),\n\t)\n\n\tq := queries.Raw(exec, query, args...)\n\n\terr := q.Bind(&assetRevisions)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to reload all in AssetRevisionSlice\")\n\t}\n\n\t*o = assetRevisions\n\n\treturn nil\n}",
"func (o *AssetRevisionSlice) ReloadAllP(exec boil.Executor) {\n\tif err := o.ReloadAll(exec); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (q assetRevisionQuery) DeleteAllP() {\n\tif err := q.DeleteAll(); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (q transactionQuery) AllP() TransactionSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (q transactionQuery) AllP() TransactionSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (q inventoryQuery) AllP() InventorySlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func AllVersions(db *gorm.DB) ([]Version, error) {\n\tvar versions []Version\n\tresult := db.Find(&versions)\n\n\treturn versions, result.Error\n}",
"func (q assetRevisionQuery) DeleteAll() error {\n\tif q.Query == nil {\n\t\treturn errors.New(\"public: no assetRevisionQuery provided for delete all\")\n\t}\n\n\tqueries.SetDelete(q.Query)\n\n\t_, err := q.Query.Exec()\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to delete all from asset_revision\")\n\t}\n\n\treturn nil\n}",
"func (q authorQuery) AllP() AuthorSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (hs *HistoryService) All(actionType string) ([]*TransactionHistory, error) {\n\tvar transHist []*TransactionHistory\n\tif err := hs.client.Get(buildString(\"history/\", actionType, \"/\", strconv.Itoa(hs.assetId)),\n\t\t&transHist); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn transHist, nil\n}",
"func (q voteQuery) All(ctx context.Context, exec boil.ContextExecutor) (VoteSlice, error) {\n\tvar o []*Vote\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Vote slice\")\n\t}\n\n\treturn o, nil\n}",
"func (q rentalQuery) AllP() RentalSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func getAllRevisions(\n\tctx context.Context,\n\tdb *client.DB,\n\tstartKey, endKey roachpb.Key,\n\tstartTime, endTime hlc.Timestamp,\n) ([]versionedValues, error) {\n\t// TODO(dt): version check.\n\theader := roachpb.Header{Timestamp: endTime}\n\treq := &roachpb.ExportRequest{\n\t\tSpan: roachpb.Span{Key: startKey, EndKey: endKey},\n\t\tStartTime: startTime,\n\t\tMVCCFilter: roachpb.MVCCFilter_All,\n\t\tReturnSST: true,\n\t}\n\tresp, pErr := client.SendWrappedWith(ctx, db.GetSender(), header, req)\n\tif pErr != nil {\n\t\treturn nil, pErr.GoError()\n\t}\n\n\tvar res []versionedValues\n\tfor _, file := range resp.(*roachpb.ExportResponse).Files {\n\t\tsst := engine.MakeRocksDBSstFileReader()\n\t\tdefer sst.Close()\n\n\t\tif err := sst.IngestExternalFile(file.SST); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstart, end := engine.MVCCKey{Key: startKey}, engine.MVCCKey{Key: endKey}\n\t\tif err := sst.Iterate(start, end, func(kv engine.MVCCKeyValue) (bool, error) {\n\t\t\tif len(res) == 0 || !res[len(res)-1].Key.Equal(kv.Key.Key) {\n\t\t\t\tres = append(res, versionedValues{Key: kv.Key.Key})\n\t\t\t}\n\t\t\tres[len(res)-1].Values = append(res[len(res)-1].Values, roachpb.Value{Timestamp: kv.Key.Timestamp, RawBytes: kv.Value})\n\t\t\treturn false, nil\n\t\t}); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn res, nil\n}",
"func (q sourceQuery) AllP() SourceSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (q vspQuery) All(ctx context.Context, exec boil.ContextExecutor) (VSPSlice, error) {\n\tvar o []*VSP\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to VSP slice\")\n\t}\n\n\treturn o, nil\n}",
"func (o AssetRevisionSlice) DeleteAllP(exec boil.Executor) {\n\tif err := o.DeleteAll(exec); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (hq *HarborQuery) All(ctx context.Context) ([]*Harbor, error) {\n\tif err := hq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn hq.sqlAll(ctx)\n}",
"func (q addressQuery) AllP() AddressSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (o AssetRevisionSlice) DeleteAll(exec boil.Executor) error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision slice provided for delete all\")\n\t}\n\n\tif len(o) == 0 {\n\t\treturn nil\n\t}\n\n\tif len(assetRevisionBeforeDeleteHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doBeforeDeleteHooks(exec); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tvar args []interface{}\n\tfor _, obj := range o {\n\t\tpkeyArgs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(obj)), assetRevisionPrimaryKeyMapping)\n\t\targs = append(args, pkeyArgs...)\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"DELETE FROM \\\"asset_revision\\\" WHERE (%s) IN (%s)\",\n\t\tstrings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, assetRevisionPrimaryKeyColumns), \",\"),\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, len(o)*len(assetRevisionPrimaryKeyColumns), 1, len(assetRevisionPrimaryKeyColumns)),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, args)\n\t}\n\n\t_, err := exec.Exec(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to delete all from assetRevision slice\")\n\t}\n\n\tif len(assetRevisionAfterDeleteHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterDeleteHooks(exec); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (q rssAnnouncementQuery) All(ctx context.Context, exec boil.ContextExecutor) (RSSAnnouncementSlice, error) {\n\tvar o []*RSSAnnouncement\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to RSSAnnouncement slice\")\n\t}\n\n\treturn o, nil\n}",
"func (q tenantQuery) AllP(ctx context.Context, exec boil.ContextExecutor) TenantSlice {\n\to, err := q.All(ctx, exec)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (q holdenAtQuery) All(ctx context.Context, exec boil.ContextExecutor) (HoldenAtSlice, error) {\n\tvar o []*HoldenAt\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to HoldenAt slice\")\n\t}\n\n\treturn o, nil\n}",
"func (q assetRevisionQuery) UpdateAll(cols M) error {\n\tqueries.SetUpdate(q.Query, cols)\n\n\t_, err := q.Query.Exec()\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to update all for asset_revision\")\n\t}\n\n\treturn nil\n}",
"func (q transactionQuery) All() (TransactionSlice, error) {\n\tvar o []*Transaction\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Transaction slice\")\n\t}\n\n\treturn o, nil\n}",
"func (rr *ReadRepository) All() ([]*Approval, error) {\n\tresults, err := rr.r.All()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar Approvals []*Approval\n\tfor _, a := range results {\n\t\tApprovals = append(Approvals, a.(*Approval))\n\t}\n\treturn Approvals, nil\n}",
"func (q failureQuery) AllP() FailureSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (q transactionQuery) All() (TransactionSlice, error) {\n\tvar o []*Transaction\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"model: failed to assign all query results to Transaction slice\")\n\t}\n\n\treturn o, nil\n}",
"func (o AssetRevisionSlice) UpdateAllP(exec boil.Executor, cols M) {\n\tif err := o.UpdateAll(exec, cols); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (q braceletPhotoQuery) All() (BraceletPhotoSlice, error) {\n\tvar o BraceletPhotoSlice\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to BraceletPhoto slice\")\n\t}\n\n\treturn o, nil\n}",
"func (q jetQuery) AllP() JetSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (q repositoryQuery) All(ctx context.Context, exec boil.ContextExecutor) (RepositorySlice, error) {\n\tvar o []*Repository\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Repository slice\")\n\t}\n\n\tif len(repositoryAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (q organismQuery) AllP() OrganismSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (q voteQuery) AllP() VoteSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (rq *RentQuery) All(ctx context.Context) ([]*Rent, error) {\n\tif err := rq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn rq.sqlAll(ctx)\n}",
"func (q paymentObjectQuery) All(ctx context.Context, exec boil.ContextExecutor) (PaymentObjectSlice, error) {\n\tvar o []*PaymentObject\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to PaymentObject slice\")\n\t}\n\n\tif len(paymentObjectAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (q vendorQuery) All(ctx context.Context, exec boil.ContextExecutor) (VendorSlice, error) {\n\tvar o []*Vendor\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Vendor slice\")\n\t}\n\n\tif len(vendorAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (q assetRevisionQuery) OneP() *AssetRevision {\n\to, err := q.One()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (q rawVisitQuery) All(ctx context.Context, exec boil.ContextExecutor) (RawVisitSlice, error) {\n\tvar o []*RawVisit\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to RawVisit slice\")\n\t}\n\n\tif len(rawVisitAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (q sourceQuery) All(exec boil.Executor) (SourceSlice, error) {\n\tvar o []*Source\n\n\terr := q.Bind(nil, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"mdbmodels: failed to assign all query results to Source slice\")\n\t}\n\n\treturn o, nil\n}",
"func (qs SysDBQuerySet) All(ret *[]SysDB) error {\n\treturn qs.db.Find(ret).Error\n}",
"func (q featureCvtermDbxrefQuery) AllP() FeatureCvtermDbxrefSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (q stockCvtermQuery) AllP() StockCvtermSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (q assetRevisionQuery) UpdateAllP(cols M) {\n\tif err := q.UpdateAll(cols); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (q stockQuery) AllP() StockSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (q authorQuery) All() (AuthorSlice, error) {\n\tvar o []*Author\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"mdbmdbmodels: failed to assign all query results to Author slice\")\n\t}\n\n\treturn o, nil\n}",
"func (q cvtermsynonymQuery) AllP() CvtermsynonymSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (q blockQuery) All(ctx context.Context, exec boil.ContextExecutor) (BlockSlice, error) {\n\tvar o []*Block\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Block slice\")\n\t}\n\n\treturn o, nil\n}",
"func (q rentalQuery) All() (RentalSlice, error) {\n\tvar o []*Rental\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"sqlboiler: failed to assign all query results to Rental slice\")\n\t}\n\n\tif len(rentalAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (q braceletPhotoQuery) AllP() BraceletPhotoSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (q automodRuleDatumQuery) All(ctx context.Context, exec boil.ContextExecutor) (AutomodRuleDatumSlice, error) {\n\tvar o []*AutomodRuleDatum\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to AutomodRuleDatum slice\")\n\t}\n\n\treturn o, nil\n}",
"func (pq *PrizeQuery) All(ctx context.Context) ([]*Prize, error) {\n\tif err := pq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn pq.sqlAll(ctx)\n}",
"func (t *BPTree) All() (records Records, err error) {\n\treturn getRecordWrapper(t.getAll())\n}",
"func (eq *EntityQuery) All(ctx context.Context) ([]*Entity, error) {\n\tif err := eq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn eq.sqlAll(ctx)\n}",
"func (s *SmartContract) queryAllAsset(APIstub shim.ChaincodeStubInterface) sc.Response {\n\n\tstartKey := \"0\"\n\tendKey := \"999\"\n\n\tresultsIterator, err := APIstub.GetStateByRange(startKey, endKey)\n\tif err != nil {\n\t\treturn shim.Error(err.Error())\n\t}\n\tdefer resultsIterator.Close()\n\n\t// buffer is a JSON array containing QueryResults\n\tvar buffer bytes.Buffer\n\tbuffer.WriteString(\"[\")\n\n\tbArrayMemberAlreadyWritten := false\n\tfor resultsIterator.HasNext() {\n\t\tqueryResponse, err := resultsIterator.Next()\n\t\tif err != nil {\n\t\t\treturn shim.Error(err.Error())\n\t\t}\n\t\t// Add comma before array members,suppress it for the first array member\n\t\tif bArrayMemberAlreadyWritten == true {\n\t\t\tbuffer.WriteString(\",\")\n\t\t}\n\t\tbuffer.WriteString(\"{\\\"Key\\\":\")\n\t\tbuffer.WriteString(\"\\\"\")\n\t\tbuffer.WriteString(queryResponse.Key)\n\t\tbuffer.WriteString(\"\\\"\")\n\n\t\tbuffer.WriteString(\", \\\"Record\\\":\")\n\t\t// Record is a JSON object, so we write as-is\n\t\tbuffer.WriteString(string(queryResponse.Value))\n\t\tbuffer.WriteString(\"}\")\n\t\tbArrayMemberAlreadyWritten = true\n\t}\n\tbuffer.WriteString(\"]\")\n\n\tfmt.Printf(\"- queryAllAsset:\\n%s\\n\", buffer.String())\n\n\treturn shim.Success(buffer.Bytes())\n}",
"func (upq *UnsavedPostQuery) All(ctx context.Context) ([]*UnsavedPost, error) {\n\tif err := upq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn upq.sqlAll(ctx)\n}",
"func (q voteQuery) All() (VoteSlice, error) {\n\tvar o []*Vote\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Vote slice\")\n\t}\n\n\tif len(voteAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (lbq *LatestBlockQuery) All(ctx context.Context) ([]*LatestBlock, error) {\n\tif err := lbq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn lbq.sqlAll(ctx)\n}",
"func (epdq *EquipmentPortDefinitionQuery) All(ctx context.Context) ([]*EquipmentPortDefinition, error) {\n\treturn epdq.sqlAll(ctx)\n}",
"func (service *AlertService) All(params Params) []*Alert {\n\treturn service.collection(\"alerts\", params)\n}",
"func (q shelfQuery) AllP() ShelfSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (d *Dao) All(ctx context.Context) ([]*region.Region, error) {\n\trows, err := d.get.Query(ctx)\n\tif err != nil {\n\t\tlog.Error(\"mysqlDB.Query error(%v)\", err)\n\t\treturn nil, err\n\t}\n\tdefer rows.Close()\n\tapps := []*region.Region{}\n\tfor rows.Next() {\n\t\ta := ®ion.Region{}\n\t\tif err = rows.Scan(&a.Rid, &a.Reid, &a.Name, &a.Logo, &a.Rank, &a.Goto, &a.Param, &a.Plat, &a.Area, &a.Build, &a.Condition, &a.URI, &a.Islogo, &a.Language); err != nil {\n\t\t\tlog.Error(\"row.Scan error(%v)\", err)\n\t\t\treturn nil, err\n\t\t}\n\t\tapps = append(apps, a)\n\t}\n\treturn apps, err\n}",
"func (q foreignLegalResourceQuery) All(ctx context.Context, exec boil.ContextExecutor) (ForeignLegalResourceSlice, error) {\n\tvar o []*ForeignLegalResource\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to ForeignLegalResource slice\")\n\t}\n\n\treturn o, nil\n}",
"func (irq *InstanceRuntimeQuery) All(ctx context.Context) ([]*InstanceRuntime, error) {\n\tif err := irq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn irq.sqlAll(ctx)\n}",
"func (q mempoolBinQuery) All(ctx context.Context, exec boil.ContextExecutor) (MempoolBinSlice, error) {\n\tvar o []*MempoolBin\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to MempoolBin slice\")\n\t}\n\n\treturn o, nil\n}",
"func (model *GrogModel) AllAssets() ([]*Asset, error) {\n\tvar foundAssets []*Asset\n\n\trows, rowsErr := model.db.DB.Query(`select name, mimeType, content, serve_external, rendered,\n\t\tadded, modified from Assets`)\n\tif rowsErr != nil {\n\t\treturn nil, fmt.Errorf(\"error loading all assets: %v\", rowsErr)\n\t}\n\n\tdefer rows.Close()\n\n\tvar (\n\t\tname string\n\t\tmimeType string\n\t\tcontent = make([]byte, 0)\n\t\tserveExternal int64\n\t\trendered int64\n\t\tadded int64\n\t\tmodified int64\n\t)\n\n\tfor rows.Next() {\n\t\tif rows.Scan(&name, &mimeType, &content, &serveExternal, &rendered, &added, &modified) != sql.ErrNoRows {\n\t\t\tfoundAsset := model.NewAsset(name, mimeType)\n\t\t\tfoundAsset.Content = content\n\t\t\tif serveExternal == 1 {\n\t\t\t\tfoundAsset.ServeExternal = true\n\t\t\t} else {\n\t\t\t\tfoundAsset.ServeExternal = false\n\t\t\t}\n\n\t\t\tif rendered == 1 {\n\t\t\t\tfoundAsset.Rendered = true\n\t\t\t} else {\n\t\t\t\tfoundAsset.Rendered = false\n\t\t\t}\n\n\t\t\tfoundAsset.Added.Set(time.Unix(added, 0))\n\t\t\tfoundAsset.Modified.Set(time.Unix(modified, 0))\n\n\t\t\tif foundAssets == nil {\n\t\t\t\tfoundAssets = make([]*Asset, 0)\n\t\t\t}\n\t\t\tfoundAssets = append(foundAssets, foundAsset)\n\t\t}\n\t}\n\n\treturn foundAssets, nil\n}",
"func (q authQuery) AllP() AuthSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (q contentUnitDerivationQuery) All(exec boil.Executor) (ContentUnitDerivationSlice, error) {\n\tvar o []*ContentUnitDerivation\n\n\terr := q.Bind(nil, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"mdbmodels: failed to assign all query results to ContentUnitDerivation slice\")\n\t}\n\n\treturn o, nil\n}",
"func (hr Repository) All() ([]HistoryModel, error) {\n\trows, err := hr.db.Query(`select * from history`)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer rows.Close()\n\n\tvar historyList []HistoryModel\n\n\tfor rows.Next() {\n\t\tvar history HistoryModel\n\t\terr := rows.Scan(&history.ID, &history.Startdate, &history.Enddate, &history.Area)\n\t\tif err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\n\t\thistoryList = append(historyList, HistoryModel{\n\t\t\tID: history.ID,\n\t\t\tStartdate: history.Startdate,\n\t\t\tEnddate: history.Enddate,\n\t\t\tArea: history.Area,\n\t\t})\n\t}\n\treturn historyList, nil\n}",
"func (q projectQuery) All(ctx context.Context, exec boil.ContextExecutor) (ProjectSlice, error) {\n\tvar o []*Project\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Project slice\")\n\t}\n\n\tif len(projectAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (q projectQuery) All(ctx context.Context, exec boil.ContextExecutor) (ProjectSlice, error) {\n\tvar o []*Project\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Project slice\")\n\t}\n\n\tif len(projectAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (q tenantQuery) All(ctx context.Context, exec boil.ContextExecutor) (TenantSlice, error) {\n\tvar o []*Tenant\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"dbmodel: failed to assign all query results to Tenant slice\")\n\t}\n\n\tif len(tenantAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (biq *BankItemQuery) All(ctx context.Context) ([]*BankItem, error) {\n\treturn biq.sqlAll(ctx)\n}",
"func (q activityLogQuery) All(ctx context.Context, exec boil.ContextExecutor) (ActivityLogSlice, error) {\n\tvar o []*ActivityLog\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"dbmodel: failed to assign all query results to ActivityLog slice\")\n\t}\n\n\tif len(activityLogAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (q btcTXOutputQuery) All(ctx context.Context, exec boil.ContextExecutor) (BTCTXOutputSlice, error) {\n\tvar o []*BTCTXOutput\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to BTCTXOutput slice\")\n\t}\n\n\treturn o, nil\n}",
"func (q sourceQuery) All() (SourceSlice, error) {\n\tvar o []*Source\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"mdbmdbmodels: failed to assign all query results to Source slice\")\n\t}\n\n\treturn o, nil\n}",
"func (o AssetRevisionSlice) UpdateAll(exec boil.Executor, cols M) error {\n\tln := int64(len(o))\n\tif ln == 0 {\n\t\treturn nil\n\t}\n\n\tif len(cols) == 0 {\n\t\treturn errors.New(\"public: update all requires at least one column argument\")\n\t}\n\n\tcolNames := make([]string, len(cols))\n\targs := make([]interface{}, len(cols))\n\n\ti := 0\n\tfor name, value := range cols {\n\t\tcolNames[i] = name\n\t\targs[i] = value\n\t\ti++\n\t}\n\n\t// Append all of the primary key values for each column\n\tfor _, obj := range o {\n\t\tpkeyArgs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(obj)), assetRevisionPrimaryKeyMapping)\n\t\targs = append(args, pkeyArgs...)\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"UPDATE \\\"asset_revision\\\" SET %s WHERE (\\\"orig\\\") IN (%s)\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, colNames),\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, len(o)*len(assetRevisionPrimaryKeyColumns), len(colNames)+1, len(assetRevisionPrimaryKeyColumns)),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, args...)\n\t}\n\n\t_, err := exec.Exec(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to update all in assetRevision slice\")\n\t}\n\n\treturn nil\n}",
"func (q peerQuery) All(ctx context.Context, exec boil.ContextExecutor) (PeerSlice, error) {\n\tvar o []*Peer\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"model: failed to assign all query results to Peer slice\")\n\t}\n\n\tif len(peerAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (vq *VehicleQuery) All(ctx context.Context) ([]*Vehicle, error) {\n\tif err := vq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn vq.sqlAll(ctx)\n}",
"func (a *AmbientIndex) All() []*model.WorkloadInfo {\n\ta.mu.RLock()\n\tdefer a.mu.RUnlock()\n\tres := make([]*model.WorkloadInfo, 0, len(a.byPod))\n\t// byPod will not have any duplicates, so we can just iterate over that.\n\tfor _, wl := range a.byPod {\n\t\tres = append(res, wl)\n\t}\n\treturn res\n}",
"func (q offerQuery) All(exec boil.Executor) (OfferSlice, error) {\n\tvar o []*Offer\n\n\terr := q.Bind(nil, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"stellarcore: failed to assign all query results to Offer slice\")\n\t}\n\n\tif len(offerAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (q claimInListQuery) AllP(exec boil.Executor) ClaimInListSlice {\n\to, err := q.All(exec)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (q utxoQuery) All(ctx context.Context, exec boil.ContextExecutor) (UtxoSlice, error) {\n\tvar o []*Utxo\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Utxo slice\")\n\t}\n\n\tif len(utxoAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (luq *LastUpdatedQuery) All(ctx context.Context) ([]*LastUpdated, error) {\n\tif err := luq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn luq.sqlAll(ctx)\n}",
"func (eq *EntryQuery) All(ctx context.Context) ([]*Entry, error) {\n\tctx = setContextOp(ctx, eq.ctx, \"All\")\n\tif err := eq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\tqr := querierAll[[]*Entry, *EntryQuery]()\n\treturn withInterceptors[[]*Entry](ctx, eq, qr, eq.inters)\n}",
"func (q buildingQuery) All(ctx context.Context, exec boil.ContextExecutor) (BuildingSlice, error) {\n\tvar o []*Building\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"record: failed to assign all query results to Building slice\")\n\t}\n\n\tif len(buildingAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (q inventoryQuery) All() (InventorySlice, error) {\n\tvar o []*Inventory\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Inventory slice\")\n\t}\n\n\tif len(inventoryAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (q postQuery) All(ctx context.Context, exec boil.ContextExecutor) (PostSlice, error) {\n\tvar o []*Post\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"orm: failed to assign all query results to Post slice\")\n\t}\n\n\tif len(postAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (q premiumCodeQuery) All(ctx context.Context, exec boil.ContextExecutor) (PremiumCodeSlice, error) {\n\tvar o []*PremiumCode\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to PremiumCode slice\")\n\t}\n\n\treturn o, nil\n}",
"func (rq *ReceiptQuery) All(ctx context.Context) ([]*Receipt, error) {\n\tif err := rq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn rq.sqlAll(ctx)\n}",
"func (tr *Repository) All() []es.Event {\n\tdata := tr.DB.Get()\n\treturn data\n}",
"func (q addressQuery) All() (AddressSlice, error) {\n\tvar o []*Address\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"sqlboiler: failed to assign all query results to Address slice\")\n\t}\n\n\tif len(addressAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (pager *EnterprisesPager) GetAll() (allItems []Enterprise, err error) {\n\treturn pager.GetAllWithContext(context.Background())\n}",
"func (q *Query) GetAll(dst interface{}) error {\n\ti := newKindIterator(q.db, q.kind)\n\n\tfor _, f := range q.filters {\n\t\ti = newFilterIterator(&f, q.db, i)\n\t}\n\n\tfor _, o := range q.order {\n\t\ti = newOrderIterator(&o, q.db, i)\n\t}\n\n\tif q.offset != -1 {\n\t\ti = newOffsetIterator(q.offset, i)\n\t}\n\n\tif q.limit != -1 {\n\t\ti = newLimitIterator(q.limit, i)\n\t}\n\n\tvar eids []string\n\tfor eid, err := i.Next(); err == nil; eid, err = i.Next() {\n\t\teids = append(eids, eid)\n\t}\n\treturn q.db.GetMulti(eids, dst)\n}",
"func (o *AssetRevisionSlice) ReloadAllG() error {\n\tif o == nil {\n\t\treturn errors.New(\"public: empty AssetRevisionSlice provided for reload all\")\n\t}\n\n\treturn o.ReloadAll(boil.GetDB())\n}",
"func (q blackCardQuery) AllP() BlackCardSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (rs *StatsPeriodResultSet) All() ([]*StatsPeriod, error) {\n\tvar result []*StatsPeriod\n\tfor rs.Next() {\n\t\trecord, err := rs.Get()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tresult = append(result, record)\n\t}\n\treturn result, nil\n}"
] |
[
"0.81530064",
"0.7191543",
"0.69696635",
"0.66028184",
"0.65321153",
"0.64144164",
"0.6302376",
"0.62736076",
"0.62736076",
"0.6270236",
"0.62640566",
"0.6248752",
"0.62087727",
"0.6151708",
"0.6111514",
"0.6074819",
"0.60735416",
"0.60442066",
"0.6032541",
"0.6022034",
"0.59943634",
"0.5978555",
"0.5961711",
"0.59450597",
"0.5944228",
"0.5944136",
"0.5935321",
"0.5930716",
"0.5928303",
"0.592011",
"0.5914012",
"0.59066606",
"0.5871048",
"0.58479875",
"0.5822491",
"0.5820595",
"0.58147377",
"0.58139396",
"0.5810287",
"0.58102226",
"0.5794085",
"0.57819515",
"0.57804924",
"0.57797956",
"0.57699955",
"0.57627106",
"0.57564",
"0.57526827",
"0.57502",
"0.574851",
"0.5744543",
"0.5734005",
"0.5726425",
"0.57181007",
"0.5717609",
"0.5715147",
"0.5712169",
"0.5709254",
"0.56815654",
"0.56794226",
"0.566585",
"0.56538564",
"0.5650359",
"0.56352955",
"0.5634011",
"0.5633299",
"0.5625135",
"0.5611145",
"0.560335",
"0.5602628",
"0.5584103",
"0.5573674",
"0.5567213",
"0.5567213",
"0.55655724",
"0.5560302",
"0.55563754",
"0.5546528",
"0.5545244",
"0.5541727",
"0.55408823",
"0.55385333",
"0.553817",
"0.55352074",
"0.5526905",
"0.55266905",
"0.5525551",
"0.5523437",
"0.5521267",
"0.55211",
"0.55194247",
"0.5514416",
"0.5513176",
"0.55105823",
"0.5503508",
"0.5497508",
"0.5496341",
"0.54888284",
"0.54852843",
"0.54756874"
] |
0.8272142
|
0
|
All returns all AssetRevision records from the query.
|
func (q assetRevisionQuery) All() (AssetRevisionSlice, error) {
var o AssetRevisionSlice
err := q.Bind(&o)
if err != nil {
return nil, errors.Wrap(err, "public: failed to assign all query results to AssetRevision slice")
}
if len(assetRevisionAfterSelectHooks) != 0 {
for _, obj := range o {
if err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {
return o, err
}
}
}
return o, nil
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (q assetQuery) All() (AssetSlice, error) {\n\tvar o AssetSlice\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Asset slice\")\n\t}\n\n\tif len(assetAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (q assetRevisionQuery) AllP() AssetRevisionSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (o *AssetRevisionSlice) ReloadAll(exec boil.Executor) error {\n\tif o == nil || len(*o) == 0 {\n\t\treturn nil\n\t}\n\n\tassetRevisions := AssetRevisionSlice{}\n\tvar args []interface{}\n\tfor _, obj := range *o {\n\t\tpkeyArgs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(obj)), assetRevisionPrimaryKeyMapping)\n\t\targs = append(args, pkeyArgs...)\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"SELECT \\\"asset_revision\\\".* FROM \\\"asset_revision\\\" WHERE (%s) IN (%s)\",\n\t\tstrings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, assetRevisionPrimaryKeyColumns), \",\"),\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, len(*o)*len(assetRevisionPrimaryKeyColumns), 1, len(assetRevisionPrimaryKeyColumns)),\n\t)\n\n\tq := queries.Raw(exec, query, args...)\n\n\terr := q.Bind(&assetRevisions)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to reload all in AssetRevisionSlice\")\n\t}\n\n\t*o = assetRevisions\n\n\treturn nil\n}",
"func (hs *HistoryService) All(actionType string) ([]*TransactionHistory, error) {\n\tvar transHist []*TransactionHistory\n\tif err := hs.client.Get(buildString(\"history/\", actionType, \"/\", strconv.Itoa(hs.assetId)),\n\t\t&transHist); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn transHist, nil\n}",
"func (mvq *ModuleVersionQuery) All(ctx context.Context) ([]*ModuleVersion, error) {\n\treturn mvq.sqlAll(ctx)\n}",
"func AllVersions(db *gorm.DB) ([]Version, error) {\n\tvar versions []Version\n\tresult := db.Find(&versions)\n\n\treturn versions, result.Error\n}",
"func (q assetRevisionQuery) DeleteAll() error {\n\tif q.Query == nil {\n\t\treturn errors.New(\"public: no assetRevisionQuery provided for delete all\")\n\t}\n\n\tqueries.SetDelete(q.Query)\n\n\t_, err := q.Query.Exec()\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to delete all from asset_revision\")\n\t}\n\n\treturn nil\n}",
"func (model *GrogModel) AllAssets() ([]*Asset, error) {\n\tvar foundAssets []*Asset\n\n\trows, rowsErr := model.db.DB.Query(`select name, mimeType, content, serve_external, rendered,\n\t\tadded, modified from Assets`)\n\tif rowsErr != nil {\n\t\treturn nil, fmt.Errorf(\"error loading all assets: %v\", rowsErr)\n\t}\n\n\tdefer rows.Close()\n\n\tvar (\n\t\tname string\n\t\tmimeType string\n\t\tcontent = make([]byte, 0)\n\t\tserveExternal int64\n\t\trendered int64\n\t\tadded int64\n\t\tmodified int64\n\t)\n\n\tfor rows.Next() {\n\t\tif rows.Scan(&name, &mimeType, &content, &serveExternal, &rendered, &added, &modified) != sql.ErrNoRows {\n\t\t\tfoundAsset := model.NewAsset(name, mimeType)\n\t\t\tfoundAsset.Content = content\n\t\t\tif serveExternal == 1 {\n\t\t\t\tfoundAsset.ServeExternal = true\n\t\t\t} else {\n\t\t\t\tfoundAsset.ServeExternal = false\n\t\t\t}\n\n\t\t\tif rendered == 1 {\n\t\t\t\tfoundAsset.Rendered = true\n\t\t\t} else {\n\t\t\t\tfoundAsset.Rendered = false\n\t\t\t}\n\n\t\t\tfoundAsset.Added.Set(time.Unix(added, 0))\n\t\t\tfoundAsset.Modified.Set(time.Unix(modified, 0))\n\n\t\t\tif foundAssets == nil {\n\t\t\t\tfoundAssets = make([]*Asset, 0)\n\t\t\t}\n\t\t\tfoundAssets = append(foundAssets, foundAsset)\n\t\t}\n\t}\n\n\treturn foundAssets, nil\n}",
"func getAllRevisions(\n\tctx context.Context,\n\tdb *client.DB,\n\tstartKey, endKey roachpb.Key,\n\tstartTime, endTime hlc.Timestamp,\n) ([]versionedValues, error) {\n\t// TODO(dt): version check.\n\theader := roachpb.Header{Timestamp: endTime}\n\treq := &roachpb.ExportRequest{\n\t\tSpan: roachpb.Span{Key: startKey, EndKey: endKey},\n\t\tStartTime: startTime,\n\t\tMVCCFilter: roachpb.MVCCFilter_All,\n\t\tReturnSST: true,\n\t}\n\tresp, pErr := client.SendWrappedWith(ctx, db.GetSender(), header, req)\n\tif pErr != nil {\n\t\treturn nil, pErr.GoError()\n\t}\n\n\tvar res []versionedValues\n\tfor _, file := range resp.(*roachpb.ExportResponse).Files {\n\t\tsst := engine.MakeRocksDBSstFileReader()\n\t\tdefer sst.Close()\n\n\t\tif err := sst.IngestExternalFile(file.SST); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstart, end := engine.MVCCKey{Key: startKey}, engine.MVCCKey{Key: endKey}\n\t\tif err := sst.Iterate(start, end, func(kv engine.MVCCKeyValue) (bool, error) {\n\t\t\tif len(res) == 0 || !res[len(res)-1].Key.Equal(kv.Key.Key) {\n\t\t\t\tres = append(res, versionedValues{Key: kv.Key.Key})\n\t\t\t}\n\t\t\tres[len(res)-1].Values = append(res[len(res)-1].Values, roachpb.Value{Timestamp: kv.Key.Timestamp, RawBytes: kv.Value})\n\t\t\treturn false, nil\n\t\t}); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn res, nil\n}",
"func (q assetRevisionQuery) UpdateAll(cols M) error {\n\tqueries.SetUpdate(q.Query, cols)\n\n\t_, err := q.Query.Exec()\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to update all for asset_revision\")\n\t}\n\n\treturn nil\n}",
"func (hr Repository) All() ([]HistoryModel, error) {\n\trows, err := hr.db.Query(`select * from history`)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer rows.Close()\n\n\tvar historyList []HistoryModel\n\n\tfor rows.Next() {\n\t\tvar history HistoryModel\n\t\terr := rows.Scan(&history.ID, &history.Startdate, &history.Enddate, &history.Area)\n\t\tif err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\n\t\thistoryList = append(historyList, HistoryModel{\n\t\t\tID: history.ID,\n\t\t\tStartdate: history.Startdate,\n\t\t\tEnddate: history.Enddate,\n\t\t\tArea: history.Area,\n\t\t})\n\t}\n\treturn historyList, nil\n}",
"func (rr *ReadRepository) All() ([]*Approval, error) {\n\tresults, err := rr.r.All()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar Approvals []*Approval\n\tfor _, a := range results {\n\t\tApprovals = append(Approvals, a.(*Approval))\n\t}\n\treturn Approvals, nil\n}",
"func (q transactionQuery) All() (TransactionSlice, error) {\n\tvar o []*Transaction\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Transaction slice\")\n\t}\n\n\treturn o, nil\n}",
"func (q transactionQuery) All() (TransactionSlice, error) {\n\tvar o []*Transaction\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"model: failed to assign all query results to Transaction slice\")\n\t}\n\n\treturn o, nil\n}",
"func (q authorQuery) All() (AuthorSlice, error) {\n\tvar o []*Author\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"mdbmdbmodels: failed to assign all query results to Author slice\")\n\t}\n\n\treturn o, nil\n}",
"func (hq *HarborQuery) All(ctx context.Context) ([]*Harbor, error) {\n\tif err := hq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn hq.sqlAll(ctx)\n}",
"func (o AssetRevisionSlice) DeleteAll(exec boil.Executor) error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision slice provided for delete all\")\n\t}\n\n\tif len(o) == 0 {\n\t\treturn nil\n\t}\n\n\tif len(assetRevisionBeforeDeleteHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doBeforeDeleteHooks(exec); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tvar args []interface{}\n\tfor _, obj := range o {\n\t\tpkeyArgs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(obj)), assetRevisionPrimaryKeyMapping)\n\t\targs = append(args, pkeyArgs...)\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"DELETE FROM \\\"asset_revision\\\" WHERE (%s) IN (%s)\",\n\t\tstrings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, assetRevisionPrimaryKeyColumns), \",\"),\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, len(o)*len(assetRevisionPrimaryKeyColumns), 1, len(assetRevisionPrimaryKeyColumns)),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, args)\n\t}\n\n\t_, err := exec.Exec(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to delete all from assetRevision slice\")\n\t}\n\n\tif len(assetRevisionAfterDeleteHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterDeleteHooks(exec); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (q holdenAtQuery) All(ctx context.Context, exec boil.ContextExecutor) (HoldenAtSlice, error) {\n\tvar o []*HoldenAt\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to HoldenAt slice\")\n\t}\n\n\treturn o, nil\n}",
"func (q rssAnnouncementQuery) All(ctx context.Context, exec boil.ContextExecutor) (RSSAnnouncementSlice, error) {\n\tvar o []*RSSAnnouncement\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to RSSAnnouncement slice\")\n\t}\n\n\treturn o, nil\n}",
"func (q voteQuery) All(ctx context.Context, exec boil.ContextExecutor) (VoteSlice, error) {\n\tvar o []*Vote\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Vote slice\")\n\t}\n\n\treturn o, nil\n}",
"func (rq *RentQuery) All(ctx context.Context) ([]*Rent, error) {\n\tif err := rq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn rq.sqlAll(ctx)\n}",
"func (q assetQuery) AllP() AssetSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (vq *VehicleQuery) All(ctx context.Context) ([]*Vehicle, error) {\n\tif err := vq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn vq.sqlAll(ctx)\n}",
"func (s *SmartContract) queryAllAsset(APIstub shim.ChaincodeStubInterface) sc.Response {\n\n\tstartKey := \"0\"\n\tendKey := \"999\"\n\n\tresultsIterator, err := APIstub.GetStateByRange(startKey, endKey)\n\tif err != nil {\n\t\treturn shim.Error(err.Error())\n\t}\n\tdefer resultsIterator.Close()\n\n\t// buffer is a JSON array containing QueryResults\n\tvar buffer bytes.Buffer\n\tbuffer.WriteString(\"[\")\n\n\tbArrayMemberAlreadyWritten := false\n\tfor resultsIterator.HasNext() {\n\t\tqueryResponse, err := resultsIterator.Next()\n\t\tif err != nil {\n\t\t\treturn shim.Error(err.Error())\n\t\t}\n\t\t// Add comma before array members,suppress it for the first array member\n\t\tif bArrayMemberAlreadyWritten == true {\n\t\t\tbuffer.WriteString(\",\")\n\t\t}\n\t\tbuffer.WriteString(\"{\\\"Key\\\":\")\n\t\tbuffer.WriteString(\"\\\"\")\n\t\tbuffer.WriteString(queryResponse.Key)\n\t\tbuffer.WriteString(\"\\\"\")\n\n\t\tbuffer.WriteString(\", \\\"Record\\\":\")\n\t\t// Record is a JSON object, so we write as-is\n\t\tbuffer.WriteString(string(queryResponse.Value))\n\t\tbuffer.WriteString(\"}\")\n\t\tbArrayMemberAlreadyWritten = true\n\t}\n\tbuffer.WriteString(\"]\")\n\n\tfmt.Printf(\"- queryAllAsset:\\n%s\\n\", buffer.String())\n\n\treturn shim.Success(buffer.Bytes())\n}",
"func (eq *EntityQuery) All(ctx context.Context) ([]*Entity, error) {\n\tif err := eq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn eq.sqlAll(ctx)\n}",
"func (obj *trans) All() []Transaction {\n\treturn obj.transactions\n}",
"func (q braceletPhotoQuery) All() (BraceletPhotoSlice, error) {\n\tvar o BraceletPhotoSlice\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to BraceletPhoto slice\")\n\t}\n\n\treturn o, nil\n}",
"func (c Repository) GetAll() *redis.StringSliceCmd {\n\treturn c.Client.LRange(\"alist\", 0, -1)\n}",
"func (q rentalQuery) All() (RentalSlice, error) {\n\tvar o []*Rental\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"sqlboiler: failed to assign all query results to Rental slice\")\n\t}\n\n\tif len(rentalAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (d *Dao) All(ctx context.Context) ([]*region.Region, error) {\n\trows, err := d.get.Query(ctx)\n\tif err != nil {\n\t\tlog.Error(\"mysqlDB.Query error(%v)\", err)\n\t\treturn nil, err\n\t}\n\tdefer rows.Close()\n\tapps := []*region.Region{}\n\tfor rows.Next() {\n\t\ta := ®ion.Region{}\n\t\tif err = rows.Scan(&a.Rid, &a.Reid, &a.Name, &a.Logo, &a.Rank, &a.Goto, &a.Param, &a.Plat, &a.Area, &a.Build, &a.Condition, &a.URI, &a.Islogo, &a.Language); err != nil {\n\t\t\tlog.Error(\"row.Scan error(%v)\", err)\n\t\t\treturn nil, err\n\t\t}\n\t\tapps = append(apps, a)\n\t}\n\treturn apps, err\n}",
"func (tr *Repository) All() []es.Event {\n\tdata := tr.DB.Get()\n\treturn data\n}",
"func AssetRevisions(exec boil.Executor, mods ...qm.QueryMod) assetRevisionQuery {\n\tmods = append(mods, qm.From(\"\\\"asset_revision\\\"\"))\n\treturn assetRevisionQuery{NewQuery(exec, mods...)}\n}",
"func (q activityLogQuery) All(ctx context.Context, exec boil.ContextExecutor) (ActivityLogSlice, error) {\n\tvar o []*ActivityLog\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"dbmodel: failed to assign all query results to ActivityLog slice\")\n\t}\n\n\tif len(activityLogAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (eq *EntryQuery) All(ctx context.Context) ([]*Entry, error) {\n\tctx = setContextOp(ctx, eq.ctx, \"All\")\n\tif err := eq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\tqr := querierAll[[]*Entry, *EntryQuery]()\n\treturn withInterceptors[[]*Entry](ctx, eq, qr, eq.inters)\n}",
"func (service *AlertService) All(params Params) []*Alert {\n\treturn service.collection(\"alerts\", params)\n}",
"func (q inventoryQuery) All() (InventorySlice, error) {\n\tvar o []*Inventory\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Inventory slice\")\n\t}\n\n\tif len(inventoryAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (a *AmbientIndex) All() []*model.WorkloadInfo {\n\ta.mu.RLock()\n\tdefer a.mu.RUnlock()\n\tres := make([]*model.WorkloadInfo, 0, len(a.byPod))\n\t// byPod will not have any duplicates, so we can just iterate over that.\n\tfor _, wl := range a.byPod {\n\t\tres = append(res, wl)\n\t}\n\treturn res\n}",
"func (*ActivityStageDataAccessObject) FindAll() []ActivityStage {\n\tl := make([]ActivityStage, 0)\n\terr := orm.Table(ActivityStageDAO.TableName()).Find(&l)\n\n\tlogger.LogIfError(err)\n\treturn l\n}",
"func (q rawVisitQuery) All(ctx context.Context, exec boil.ContextExecutor) (RawVisitSlice, error) {\n\tvar o []*RawVisit\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to RawVisit slice\")\n\t}\n\n\tif len(rawVisitAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (lbq *LatestBlockQuery) All(ctx context.Context) ([]*LatestBlock, error) {\n\tif err := lbq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn lbq.sqlAll(ctx)\n}",
"func (biq *BankItemQuery) All(ctx context.Context) ([]*BankItem, error) {\n\treturn biq.sqlAll(ctx)\n}",
"func (q voteQuery) All() (VoteSlice, error) {\n\tvar o []*Vote\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Vote slice\")\n\t}\n\n\tif len(voteAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (o AssetRevisionSlice) UpdateAll(exec boil.Executor, cols M) error {\n\tln := int64(len(o))\n\tif ln == 0 {\n\t\treturn nil\n\t}\n\n\tif len(cols) == 0 {\n\t\treturn errors.New(\"public: update all requires at least one column argument\")\n\t}\n\n\tcolNames := make([]string, len(cols))\n\targs := make([]interface{}, len(cols))\n\n\ti := 0\n\tfor name, value := range cols {\n\t\tcolNames[i] = name\n\t\targs[i] = value\n\t\ti++\n\t}\n\n\t// Append all of the primary key values for each column\n\tfor _, obj := range o {\n\t\tpkeyArgs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(obj)), assetRevisionPrimaryKeyMapping)\n\t\targs = append(args, pkeyArgs...)\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"UPDATE \\\"asset_revision\\\" SET %s WHERE (\\\"orig\\\") IN (%s)\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, colNames),\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, len(o)*len(assetRevisionPrimaryKeyColumns), len(colNames)+1, len(assetRevisionPrimaryKeyColumns)),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, args...)\n\t}\n\n\t_, err := exec.Exec(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to update all in assetRevision slice\")\n\t}\n\n\treturn nil\n}",
"func (q repositoryQuery) All(ctx context.Context, exec boil.ContextExecutor) (RepositorySlice, error) {\n\tvar o []*Repository\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Repository slice\")\n\t}\n\n\tif len(repositoryAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (t *BPTree) All() (records Records, err error) {\n\treturn getRecordWrapper(t.getAll())\n}",
"func (q blockQuery) All(ctx context.Context, exec boil.ContextExecutor) (BlockSlice, error) {\n\tvar o []*Block\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Block slice\")\n\t}\n\n\treturn o, nil\n}",
"func (q vendorQuery) All(ctx context.Context, exec boil.ContextExecutor) (VendorSlice, error) {\n\tvar o []*Vendor\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Vendor slice\")\n\t}\n\n\tif len(vendorAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (q recipeAdditiveQuery) All(ctx context.Context, exec boil.ContextExecutor) (RecipeAdditiveSlice, error) {\n\tvar o []*RecipeAdditive\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to RecipeAdditive slice\")\n\t}\n\n\tif len(recipeAdditiveAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (q tenantQuery) All(ctx context.Context, exec boil.ContextExecutor) (TenantSlice, error) {\n\tvar o []*Tenant\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"dbmodel: failed to assign all query results to Tenant slice\")\n\t}\n\n\tif len(tenantAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (luq *LastUpdatedQuery) All(ctx context.Context) ([]*LastUpdated, error) {\n\tif err := luq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn luq.sqlAll(ctx)\n}",
"func (q assetRevisionQuery) One() (*AssetRevision, error) {\n\to := &AssetRevision{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"public: failed to execute a one query for asset_revision\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (s *Service) GetAll(ctx context.Context) ([]types.Visit, error) {\n\treturn s.repo.FindAll(ctx)\n}",
"func (m *TermLog) All(q *PaginationQ) (list *[]TermLog, total uint, err error) {\n\tlist = &[]TermLog{}\n\ttotal, err = crudAll(q, db.Model(m), list)\n\treturn\n}",
"func (q automodRuleDatumQuery) All(ctx context.Context, exec boil.ContextExecutor) (AutomodRuleDatumSlice, error) {\n\tvar o []*AutomodRuleDatum\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to AutomodRuleDatum slice\")\n\t}\n\n\treturn o, nil\n}",
"func (deq *DentalExpenseQuery) All(ctx context.Context) ([]*DentalExpense, error) {\n\tif err := deq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn deq.sqlAll(ctx)\n}",
"func (rq *ReceiptQuery) All(ctx context.Context) ([]*Receipt, error) {\n\tif err := rq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn rq.sqlAll(ctx)\n}",
"func (c *Commitments) GetAll(db *sql.DB) (err error) {\n\trows, err := db.Query(`SELECT id,year,code,number,line,creation_date,\n\tmodification_date,caducity_date,name,value,sold_out, beneficiary_id,iris_code, \n\taction_id FROM commitment`)\n\tif err != nil {\n\t\treturn err\n\t}\n\tvar row Commitment\n\tdefer rows.Close()\n\tfor rows.Next() {\n\t\tif err = rows.Scan(&row.ID, &row.Year, &row.Code, &row.Number, &row.Line,\n\t\t\t&row.CreationDate, &row.ModificationDate, &row.CaducityDate, &row.Name,\n\t\t\t&row.Value, &row.SoldOut, &row.BeneficiaryID, &row.IrisCode,\n\t\t\t&row.ActionID); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tc.Commitments = append(c.Commitments, row)\n\t}\n\terr = rows.Err()\n\tif len(c.Commitments) == 0 {\n\t\tc.Commitments = []Commitment{}\n\t}\n\treturn err\n}",
"func (q paymentObjectQuery) All(ctx context.Context, exec boil.ContextExecutor) (PaymentObjectSlice, error) {\n\tvar o []*PaymentObject\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to PaymentObject slice\")\n\t}\n\n\tif len(paymentObjectAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func Assets(exec boil.Executor, mods ...qm.QueryMod) assetQuery {\n\tmods = append(mods, qm.From(\"\\\"audit\\\".\\\"asset\\\"\"))\n\treturn assetQuery{NewQuery(exec, mods...)}\n}",
"func (q sourceQuery) All(exec boil.Executor) (SourceSlice, error) {\n\tvar o []*Source\n\n\terr := q.Bind(nil, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"mdbmodels: failed to assign all query results to Source slice\")\n\t}\n\n\treturn o, nil\n}",
"func (r Repository) All() []Quote {\n\tstmt, err := r.db.Prepare(`SELECT id_quote, content, score, uuid\n FROM quotes\n ORDER BY id_quote`)\n\tif err != nil {\n\t\tlog.Fatal(\"Malformed SQL :\" + err.Error())\n\t}\n\n\t// closes db connection\n\tdefer func() {\n\t\terr := stmt.Close()\n\t\tif err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\t}()\n\treturn buildSliceFromData(stmt)\n}",
"func (o *ORM) All(models interface{}) error {\n\tt := time.Now()\n\n\tstmt, args, err := o.base().ToSql()\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer o.log(t, stmt, args)\n\n\treturn o.conn.Select(models, stmt, args...)\n}",
"func (bcq *BaselineClassQuery) All(ctx context.Context) ([]*BaselineClass, error) {\n\tif err := bcq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn bcq.sqlAll(ctx)\n}",
"func (q buildingQuery) All(ctx context.Context, exec boil.ContextExecutor) (BuildingSlice, error) {\n\tvar o []*Building\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"record: failed to assign all query results to Building slice\")\n\t}\n\n\tif len(buildingAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (q contentUnitDerivationQuery) All(exec boil.Executor) (ContentUnitDerivationSlice, error) {\n\tvar o []*ContentUnitDerivation\n\n\terr := q.Bind(nil, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"mdbmodels: failed to assign all query results to ContentUnitDerivation slice\")\n\t}\n\n\treturn o, nil\n}",
"func (a Author) GetAll(cfg *config.Config) ([]*Author, error) {\n\tsession := cfg.Session.Copy()\n\tvar authors []*Author\n\tif err := cfg.Database.C(AuthorCollection).Find(bson.M{}).Sort(\"-dateCreated\").All(&authors); err != nil {\n\t\treturn authors, err\n\t}\n\tdefer session.Close()\n\treturn authors, nil\n}",
"func (o *AssetRevisionSlice) ReloadAllG() error {\n\tif o == nil {\n\t\treturn errors.New(\"public: empty AssetRevisionSlice provided for reload all\")\n\t}\n\n\treturn o.ReloadAll(boil.GetDB())\n}",
"func (file *File) All() ([]Alias, error) {\n\tvar aliases []Alias\n\n\tif file.needsReload() {\n\t\terr := file.reload()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tnames := file.Names()\n\n\tfor _, name := range names {\n\t\talias := *file.cache[name]\n\t\taliases = append(aliases, alias)\n\t}\n\n\treturn aliases, nil\n}",
"func AllAMVs() []*AMV {\n\tall := make([]*AMV, 0, DB.Collection(\"AMV\").Count())\n\n\tstream := StreamAMVs()\n\n\tfor obj := range stream {\n\t\tall = append(all, obj)\n\t}\n\n\treturn all\n}",
"func (irq *InstanceRuntimeQuery) All(ctx context.Context) ([]*InstanceRuntime, error) {\n\tif err := irq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn irq.sqlAll(ctx)\n}",
"func (q utxoQuery) All(ctx context.Context, exec boil.ContextExecutor) (UtxoSlice, error) {\n\tvar o []*Utxo\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Utxo slice\")\n\t}\n\n\tif len(utxoAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (rq *RemedyQuery) All(ctx context.Context) ([]*Remedy, error) {\n\tif err := rq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn rq.sqlAll(ctx)\n}",
"func (tx *Transaction) All(records interface{}) error {\n\tctx := tx.Context(&Context{})\n\treturn ctx.All(records)\n}",
"func (tq *TenantQuery) All(ctx context.Context) ([]*Tenant, error) {\n\tctx = setContextOp(ctx, tq.ctx, \"All\")\n\tif err := tq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\tqr := querierAll[[]*Tenant, *TenantQuery]()\n\treturn withInterceptors[[]*Tenant](ctx, tq, qr, tq.inters)\n}",
"func (repo *PostAttributeRepository) All(tableName string) []*entity.PostAttribute {\n\tvar attributes []*entity.PostAttribute\n\terr := repo.conn.Table(tableName).Find(&attributes).Error\n\n\tif err != nil {\n\t\treturn []*entity.PostAttribute{}\n\t}\n\treturn attributes\n}",
"func (q mempoolBinQuery) All(ctx context.Context, exec boil.ContextExecutor) (MempoolBinSlice, error) {\n\tvar o []*MempoolBin\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to MempoolBin slice\")\n\t}\n\n\treturn o, nil\n}",
"func (upq *UnsavedPostQuery) All(ctx context.Context) ([]*UnsavedPost, error) {\n\tif err := upq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn upq.sqlAll(ctx)\n}",
"func (m *TagManager) All() ([]AdminTag, error) {\n\tvar tags []AdminTag\n\tif err := m.DB.Find(&tags).Error; err != nil {\n\t\treturn tags, err\n\t}\n\treturn tags, nil\n}",
"func (q addressQuery) All() (AddressSlice, error) {\n\tvar o []*Address\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"sqlboiler: failed to assign all query results to Address slice\")\n\t}\n\n\tif len(addressAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (q jetQuery) All() (JetSlice, error) {\n\tvar o []*Jet\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Jet slice\")\n\t}\n\n\tif len(jetAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (q sourceQuery) All() (SourceSlice, error) {\n\tvar o []*Source\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"mdbmdbmodels: failed to assign all query results to Source slice\")\n\t}\n\n\treturn o, nil\n}",
"func (repository Accounts) GetAll() ([]models.Account, error) {\n\trows, err := repository.db.Query(\n\t\t\"select id, name, cpf, balance, created_at from accounts\",\n\t)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer rows.Close()\n\n\tvar accounts []models.Account\n\n\tfor rows.Next() {\n\t\tvar account models.Account\n\n\t\tif err = rows.Scan(\n\t\t\t&account.ID,\n\t\t\t&account.Name,\n\t\t\t&account.Cpf,\n\t\t\t&account.Balance,\n\t\t\t&account.CreatedAt,\n\t\t); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\taccounts = append(accounts, account)\n\t}\n\n\treturn accounts, nil\n}",
"func (service *Service) All() (models []ModelOperationsLog, err error) {\n\trows, err := service.pool.Query(context.Background(), `SELECT id, name, number,recipientSender,count, balanceold, balancenew, time, owner_id FROM historyoperationslog;`)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"can't get sys-test-history from db: %w\", err)\n\t}\n\tdefer rows.Close()\n\n\tfor rows.Next() {\n\t\tmodel := ModelOperationsLog{}\n\t\terr = rows.Scan(\n\t\t\t&model.Id,\n\t\t\t&model.Name,\n\t\t\t&model.Number,\n\t\t\t&model.RecipientSender,\n\t\t\t&model.Count,\n\t\t\t&model.BalanceOld,\n\t\t\t&model.BalanceNew,\n\t\t\t&model.Time,\n\t\t\t&model.OwnerID)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"can't get sys-test-history from db: %w\", err)\n\t\t}\n\t\tmodels = append(models, model)\n\t}\n\tif err = rows.Err(); err != nil {\n\t\treturn nil, fmt.Errorf(\"can't get sys-test-history from db: %w\", err)\n\t}\n\treturn models, nil\n}",
"func (rdq *ResultsDefinitionQuery) All(ctx context.Context) ([]*ResultsDefinition, error) {\n\tif err := rdq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn rdq.sqlAll(ctx)\n}",
"func (q vspQuery) All(ctx context.Context, exec boil.ContextExecutor) (VSPSlice, error) {\n\tvar o []*VSP\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to VSP slice\")\n\t}\n\n\treturn o, nil\n}",
"func (q currencyQuery) All(exec boil.Executor) (CurrencySlice, error) {\n\tvar o []*Currency\n\n\terr := q.Bind(nil, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Currency slice\")\n\t}\n\n\tif len(currencyAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (a *AuthorizationsService) All() (auths []Authorization, result *Result) {\n\tresult = a.client.get(a.URL, &auths)\n\treturn\n}",
"func (q assetRevisionQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"public: failed to count asset_revision rows\")\n\t}\n\n\treturn count, nil\n}",
"func (qs SysDBQuerySet) All(ret *[]SysDB) error {\n\treturn qs.db.Find(ret).Error\n}",
"func (q stockKeepingUnitContentQuery) All(exec boil.Executor) (StockKeepingUnitContentSlice, error) {\n\tvar o []*StockKeepingUnitContent\n\n\terr := q.Bind(nil, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"db: failed to assign all query results to StockKeepingUnitContent slice\")\n\t}\n\n\tif len(stockKeepingUnitContentAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (q cvtermsynonymQuery) All() (CvtermsynonymSlice, error) {\n\tvar o CvtermsynonymSlice\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"chado: failed to assign all query results to Cvtermsynonym slice\")\n\t}\n\n\tif len(cvtermsynonymAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (s *Service) GetAll(ctx context.Context) ([]types.CusVisitAssoc, error) {\n\treturn s.repo.FindAll(ctx)\n}",
"func (q cmfUserExperienceLogQuery) All(ctx context.Context, exec boil.ContextExecutor) (CMFUserExperienceLogSlice, error) {\n\tvar o []*CMFUserExperienceLog\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to CMFUserExperienceLog slice\")\n\t}\n\n\tif len(cmfUserExperienceLogAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (f fileRecordRepository) All() (files []fileRecord) {\n\t// Open database connection\n\tdb, err := dbConnect()\n\tif err != nil {\n\t\tlog.Println(err.Error())\n\t\treturn\n\t}\n\n\t// Retrieve all files\n\tif files, err = db.GetAllFileRecords(); err != nil {\n\t\tlog.Println(err.Error())\n\t}\n\n\tif err := db.Close(); err != nil {\n\t\tlog.Println(err.Error())\n\t}\n\n\treturn files\n}",
"func (q ReleaseQuery) All() (results ReleaseCollection, err error) {\n\tresults = make(ReleaseCollection, 0)\n\terr = Select(q.db, &results, q.builder)\n\tif err != nil {\n\t\terr = errors.Wrap(err, \"ReleaseQuery.All() failed to populate ReleaseCollection.\")\n\t\treturn\n\t}\n\tfor _, f := range q.processors {\n\t\terr = f(q.db, results)\n\t\tif err != nil {\n\t\t\terr = errors.Wrap(err, \"Failed to run processor over ReleaseCollection.\")\n\t\t}\n\t}\n\treturn\n}",
"func (roq *RestaurantOwnerQuery) All(ctx context.Context) ([]*RestaurantOwner, error) {\n\tif err := roq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn roq.sqlAll(ctx)\n}",
"func (s *Repository) GetAll(ctx context.Context) ([]Account, error) {\n\tconst limit = 10\n\n\trows, err := s.pool.Query(\n\t\tctx,\n\t\t`select * from \"account\"\n\t\t\t order by \"createdAt\" desc\n\t\t\t limit $1`, limit)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tdefer rows.Close()\n\n\treturn scanAccounts(limit, rows)\n}",
"func (q descriptionQuery) All(ctx context.Context, exec boil.ContextExecutor) (DescriptionSlice, error) {\n\tvar o []*Description\n\n\terr := q.Bind(ctx, exec, &o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Description slice\")\n\t}\n\n\tif len(descriptionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (s *SmartContract) GetAllAssets(ctx contractapi.TransactionContextInterface) ([]*Asset, error) {\n\t// range query with empty string for startKey and endKey does an\n\t// open-ended query of all assets in the chaincode namespace.\n\tresultsIterator, err := ctx.GetStub().GetStateByRange(\"\", \"\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer resultsIterator.Close()\n\n\tvar assets []*Asset\n\tfor resultsIterator.HasNext() {\n\t\tqueryResponse, err := resultsIterator.Next()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tvar asset Asset\n\t\terr = json.Unmarshal(queryResponse.Value, &asset)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tassets = append(assets, &asset)\n\t}\n\n\treturn assets, nil\n}",
"func (liq *LineItemQuery) All(ctx context.Context) ([]*LineItem, error) {\n\tif err := liq.prepareQuery(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn liq.sqlAll(ctx)\n}"
] |
[
"0.7132153",
"0.6989764",
"0.6730697",
"0.6467124",
"0.63597345",
"0.6272904",
"0.6158737",
"0.6028511",
"0.598061",
"0.595668",
"0.59392047",
"0.59000564",
"0.5890135",
"0.58770186",
"0.58151126",
"0.5801577",
"0.5789396",
"0.5779918",
"0.57427025",
"0.5734246",
"0.5693338",
"0.56671846",
"0.5631367",
"0.56248283",
"0.5602681",
"0.55861497",
"0.55808234",
"0.5573635",
"0.5563885",
"0.5557773",
"0.5547343",
"0.5544733",
"0.5540606",
"0.5534658",
"0.5530416",
"0.55254215",
"0.551604",
"0.55131716",
"0.5507587",
"0.5502288",
"0.5489858",
"0.5489563",
"0.5445534",
"0.5416982",
"0.5410827",
"0.5386379",
"0.53783953",
"0.5372171",
"0.53568196",
"0.5353898",
"0.5352911",
"0.5343869",
"0.5342273",
"0.5337394",
"0.53098",
"0.53087306",
"0.5295004",
"0.52924085",
"0.5291817",
"0.5290127",
"0.5285988",
"0.52850467",
"0.52835035",
"0.5271655",
"0.5266197",
"0.5255968",
"0.52507734",
"0.52446026",
"0.5244417",
"0.52430993",
"0.52397275",
"0.5235976",
"0.52153075",
"0.5212761",
"0.52091867",
"0.52027136",
"0.520204",
"0.52001417",
"0.5197421",
"0.5190563",
"0.5179088",
"0.517353",
"0.5165165",
"0.5141905",
"0.51413655",
"0.51344764",
"0.5134456",
"0.5126761",
"0.51223135",
"0.512052",
"0.5113153",
"0.51114494",
"0.5108286",
"0.5103126",
"0.5101708",
"0.5096997",
"0.5095801",
"0.50937736",
"0.50917166",
"0.50813717"
] |
0.8560276
|
0
|
CountP returns the count of all AssetRevision records in the query, and panics on error.
|
func (q assetRevisionQuery) CountP() int64 {
c, err := q.Count()
if err != nil {
panic(boil.WrapErr(err))
}
return c
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (q assetRevisionQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"public: failed to count asset_revision rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q assetQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (q assetQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count asset rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q inventoryQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (mvq *ModuleVersionQuery) Count(ctx context.Context) (int, error) {\n\treturn mvq.sqlCount(ctx)\n}",
"func (q authorQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (q sourceQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (s *RepositoryService) Count(rs app.RequestScope) (int64, error) {\n\treturn s.dao.Count(rs.DB())\n}",
"func (q transactionQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (q transactionQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (p *postsQueryBuilder) Count() (int64, error) {\n\tif p.err != nil {\n\t\treturn 0, p.err\n\t}\n\treturn p.builder.Count()\n}",
"func (q failureQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (q tenantQuery) CountP(ctx context.Context, exec boil.ContextExecutor) int64 {\n\tc, err := q.Count(ctx, exec)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (pq *PrizeQuery) Count(ctx context.Context) (int, error) {\n\tif err := pq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn pq.sqlCount(ctx)\n}",
"func (q featureCvtermDbxrefQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (upq *UnsavedPostQuery) Count(ctx context.Context) (int, error) {\n\tif err := upq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn upq.sqlCount(ctx)\n}",
"func (q stockCvtermQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (q jetQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (q braceletPhotoQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (q repositoryQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count repositories rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q authQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (q organismQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (q skinQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (q vspQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count vsp rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q claimInListQuery) CountP(exec boil.Executor) int64 {\n\tc, err := q.Count(exec)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (hq *HarborQuery) Count(ctx context.Context) (int, error) {\n\tif err := hq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn hq.sqlCount(ctx)\n}",
"func (q cvtermsynonymQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (q shelfQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (q voteQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (q sourceQuery) Count(exec boil.Executor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow(exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"mdbmodels: failed to count sources rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q *DeferredQuery) Count() (int, error) {\n\topt := mopt.Count()\n\tfilter := q.Filter\n\tif filter == nil {\n\t\tfilter = bson.D{}\n\t}\n\tc, err := q.Coll.CountDocuments(nil, filter, opt)\n\treturn int(c), err\n}",
"func (q projectQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count project rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q rentalQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (q addressQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (q apiKeyQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (q instrumentClassQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (q stockQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (irq *InstanceRuntimeQuery) Count(ctx context.Context) (int, error) {\n\tif err := irq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn irq.sqlCount(ctx)\n}",
"func (d *Driver) Count(ctx context.Context, prefix string) (revRet int64, count int64, err error) {\n\tstart := time.Now()\n\tdefer func() {\n\t\tdur := time.Since(start)\n\t\tfStr := \"COUNT %s => rev=%d, count=%d, err=%v, duration=%s\"\n\t\td.logMethod(dur, fStr, prefix, revRet, count, err, dur)\n\t}()\n\n\tentries, err := d.getKeys(ctx, prefix, false)\n\tif err != nil {\n\t\treturn 0, 0, err\n\t}\n\t// current revision\n\tcurrentRev, err := d.currentRevision()\n\tif err != nil {\n\t\treturn 0, 0, err\n\t}\n\treturn currentRev, int64(len(entries)), nil\n}",
"func (q sourceQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"mdbmdbmodels: failed to count sources rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q authUserUserPermissionQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (q dMessageEmbedQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (q vendorQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count vendors rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q projectQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count projects rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q commentQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (r *Repository) Count(ctx context.Context, conditions []fazzdb.SliceCondition) (*float64, error) {\n\tq, err := r.GetQuery(ctx)\n\tif nil != err {\n\t\treturn nil, err\n\t}\n\n\treturn q.Use(r.model).\n\t\tWhereMany(conditions...).\n\t\tCountCtx(ctx)\n}",
"func (s *PetStore) Count(q *PetQuery) (int64, error) {\n\treturn s.Store.Count(q)\n}",
"func (q braceletPhotoQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count bracelet_photo rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q inventoryQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count inventory rows\")\n\t}\n\n\treturn count, nil\n}",
"func (qs SysDBQuerySet) Count() (int, error) {\n\tvar count int\n\terr := qs.db.Count(&count).Error\n\treturn count, err\n}",
"func (q *Query) Count() (int, int, error) {\n\tq.countOnly = true\n\treturn q.execute()\n}",
"func (rq *RentQuery) Count(ctx context.Context) (int, error) {\n\tif err := rq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn rq.sqlCount(ctx)\n}",
"func (epdq *EquipmentPortDefinitionQuery) Count(ctx context.Context) (int, error) {\n\treturn epdq.sqlCount(ctx)\n}",
"func (r repository) Count(ctx context.Context) (int, error) {\n\tvar count int\n\terr := r.db.With(ctx).Select(\"COUNT(*)\").From(\"urls\").Row(&count)\n\treturn count, err\n}",
"func (q *Query) Count() (n int, err error) {\n\treturn q.q.Count()\n}",
"func (q authTokenQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (q rssAnnouncementQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count rss_announcements rows\")\n\t}\n\n\treturn count, nil\n}",
"func (_Harberger *HarbergerCaller) AssetsCount(opts *bind.CallOpts) (*big.Int, error) {\n\tvar (\n\t\tret0 = new(*big.Int)\n\t)\n\tout := ret0\n\terr := _Harberger.contract.Call(opts, out, \"assetsCount\")\n\treturn *ret0, err\n}",
"func (eq *EntityQuery) Count(ctx context.Context) (int, error) {\n\tif err := eq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn eq.sqlCount(ctx)\n}",
"func (qs ConstraintQuerySet) Count() (int, error) {\n\tvar count int\n\terr := qs.db.Count(&count).Error\n\treturn count, err\n}",
"func (esq *EventSeverityQuery) Count(ctx context.Context) (int, error) {\n\tif err := esq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn esq.sqlCount(ctx)\n}",
"func (bcq *BaselineClassQuery) Count(ctx context.Context) (int, error) {\n\tif err := bcq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn bcq.sqlCount(ctx)\n}",
"func (q holdenAtQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count HoldenAt rows\")\n\t}\n\n\treturn count, nil\n}",
"func (b *blogsQueryBuilder) Count() (int64, error) {\n\tif b.err != nil {\n\t\treturn 0, b.err\n\t}\n\treturn b.builder.Count()\n}",
"func (q authMessageQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (q pictureQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (rq *ReceiptQuery) Count(ctx context.Context) (int, error) {\n\tif err := rq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn rq.sqlCount(ctx)\n}",
"func (q mempoolBinQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count mempool_bin rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q failureQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count failure rows\")\n\t}\n\n\treturn count, nil\n}",
"func (h *handler) Count(ctx context.Context, params db.Params) int {\n\tbsonFilter := bson.M{}\n\tfor key, val := range params.Filter {\n\t\tbsonFilter[key] = val\n\t}\n\tcount, _ := h.getDatabase(params.Database).C(params.Collection).Find(bsonFilter).Count()\n\treturn count\n}",
"func (s *ProvinceService) Count(rs app.RequestScope,countryID int) (int, error) {\n\treturn s.dao.Count(rs, countryID)\n}",
"func Count(query db.Q) (int, error) {\n\treturn db.CountQ(Collection, query)\n}",
"func (q authUserQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (q authorQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"mdbmdbmodels: failed to count authors rows\")\n\t}\n\n\treturn count, nil\n}",
"func (p *OrderRepo) Count(params param.Param) (count uint64, err error) {\n\tvar whereStr string\n\tif whereStr, err = params.ParseWhere(p.Cols); err != nil {\n\t\terr = limberr.Take(err, \"E1532288\").Custom(corerr.ValidationFailedErr).Build()\n\t\treturn\n\t}\n\n\terr = p.Engine.DB.Table(cafmodel.OrderTable).\n\t\tWhere(whereStr).\n\t\tCount(&count).Error\n\n\terr = p.dbError(err, \"E1539820\", cafmodel.Order{}, corterm.List)\n\treturn\n}",
"func (rdq *ResultsDefinitionQuery) Count(ctx context.Context) (int, error) {\n\tif err := rdq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn rdq.sqlCount(ctx)\n}",
"func (q paymentObjectQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count payment_objects rows\")\n\t}\n\n\treturn count, nil\n}",
"func (siq *SubItemQuery) Count(ctx context.Context) (int, error) {\n\tif err := siq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn siq.sqlCount(ctx)\n}",
"func (q jetQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count jets rows\")\n\t}\n\n\treturn count, nil\n}",
"func (b *PgTxRepository) Count(ctx context.Context, filter interface{}) (int64, error) {\n\t// Prepare query\n\tqb := sq.Select(\"count(*) as count\").\n\t\tFrom(b.table).\n\t\tPlaceholderFormat(sq.Dollar)\n\n\tif filter != nil {\n\t\tqb = qb.Where(filter)\n\t}\n\n\t// Build SQL query\n\tquery, args, err := qb.ToSql()\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\t// The statements prepared for a transaction by calling the transaction's Prepare or Stmt methods\n\t// are closed by the call to Commit or Rollback.\n\tstmt, err := b.tx.PreparexContext(ctx, query)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\tvar count int64\n\terr = stmt.QueryRowxContext(ctx, args...).Scan(&count)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\t// Return no error\n\treturn count, nil\n}",
"func (vq *VehicleQuery) Count(ctx context.Context) (int, error) {\n\tif err := vq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn vq.sqlCount(ctx)\n}",
"func (q blackCardQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (c *Core) Count(ctx context.Context, filter QueryFilter) (int, error) {\n\treturn c.storer.Count(ctx, filter)\n}",
"func (s *StatsPeriodStore) Count(q *StatsPeriodQuery) (int64, error) {\n\treturn s.Store.Count(q)\n}",
"func (q foreignLegalResourceQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count ForeignLegalResources rows\")\n\t}\n\n\treturn count, nil\n}",
"func (rq *RemedyQuery) Count(ctx context.Context) (int, error) {\n\tif err := rq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn rq.sqlCount(ctx)\n}",
"func (q buildingQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"record: failed to count buildings rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q postQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"orm: failed to count posts rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q premiumCodeQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count premium_codes rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q cmfBalanceChargeAdminQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count cmf_balance_charge_admin rows\")\n\t}\n\n\treturn count, nil\n}",
"func (b *QueryBuilder) Count(_ bool, _ ...NodeI) uint {\n\treturn 0\n}",
"func (ix *Reindexer) count() (int64, error) {\n\tservice := ix.sourceClient.Count(ix.sourceIndex)\n\tif ix.query != nil {\n\t\tservice = service.Query(ix.query)\n\t}\n\treturn service.Do()\n}",
"func (cq *ConfirmationQuery) Count(ctx context.Context) (int, error) {\n\tif err := cq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn cq.sqlCount(ctx)\n}",
"func (biq *BankItemQuery) Count(ctx context.Context) (int, error) {\n\treturn biq.sqlCount(ctx)\n}",
"func (c *commentsQueryBuilder) Count() (int64, error) {\n\tif c.err != nil {\n\t\treturn 0, c.err\n\t}\n\treturn c.builder.Count()\n}",
"func (pq *ParticipantQuery) Count(ctx context.Context) (int, error) {\n\tif err := pq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn pq.sqlCount(ctx)\n}",
"func (q currencyQuery) Count(exec boil.Executor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow(exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count currency rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q stockCvtermQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"chado: failed to count stock_cvterm rows\")\n\t}\n\n\treturn count, nil\n}",
"func (deq *DentalExpenseQuery) Count(ctx context.Context) (int, error) {\n\tif err := deq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn deq.sqlCount(ctx)\n}",
"func (q illnessQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count illness rows\")\n\t}\n\n\treturn count, nil\n}"
] |
[
"0.7958895",
"0.7205277",
"0.68656",
"0.6549205",
"0.6542084",
"0.64537627",
"0.6432429",
"0.6326202",
"0.62864614",
"0.62864614",
"0.62846076",
"0.62804323",
"0.6185224",
"0.6178725",
"0.6152787",
"0.61314",
"0.61276305",
"0.6115715",
"0.61077267",
"0.61055124",
"0.61005837",
"0.60938007",
"0.6092123",
"0.60895437",
"0.60831225",
"0.60719275",
"0.60694176",
"0.60676455",
"0.60388815",
"0.6031132",
"0.6026669",
"0.59699935",
"0.59576553",
"0.5952292",
"0.5948621",
"0.5948361",
"0.5947587",
"0.5939053",
"0.5935783",
"0.59309345",
"0.59180784",
"0.5904105",
"0.5897768",
"0.5888373",
"0.5882376",
"0.5872394",
"0.5867908",
"0.58519864",
"0.58504355",
"0.58376735",
"0.5829236",
"0.58280104",
"0.5815421",
"0.5811881",
"0.5810786",
"0.5803838",
"0.58020127",
"0.5795433",
"0.57926756",
"0.57831323",
"0.57789874",
"0.5776777",
"0.5775219",
"0.5769589",
"0.5764405",
"0.5759129",
"0.5755997",
"0.5753964",
"0.57536227",
"0.57492566",
"0.5741178",
"0.57395655",
"0.57350993",
"0.57349455",
"0.5734828",
"0.57334375",
"0.57314914",
"0.57294405",
"0.57235104",
"0.569735",
"0.5696604",
"0.5688024",
"0.5683879",
"0.56833744",
"0.56805176",
"0.5660265",
"0.56597525",
"0.56563234",
"0.5656243",
"0.56556916",
"0.56468695",
"0.5644926",
"0.5644472",
"0.56432617",
"0.56367785",
"0.5632493",
"0.56314486",
"0.5620475",
"0.5613441",
"0.5611674"
] |
0.8151981
|
0
|
Count returns the count of all AssetRevision records in the query.
|
func (q assetRevisionQuery) Count() (int64, error) {
var count int64
queries.SetSelect(q.Query, nil)
queries.SetCount(q.Query)
err := q.Query.QueryRow().Scan(&count)
if err != nil {
return 0, errors.Wrap(err, "public: failed to count asset_revision rows")
}
return count, nil
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (q assetQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count asset rows\")\n\t}\n\n\treturn count, nil\n}",
"func (s *RepositoryService) Count(rs app.RequestScope) (int64, error) {\n\treturn s.dao.Count(rs.DB())\n}",
"func (mvq *ModuleVersionQuery) Count(ctx context.Context) (int, error) {\n\treturn mvq.sqlCount(ctx)\n}",
"func (r *Repository) Count(ctx context.Context, conditions []fazzdb.SliceCondition) (*float64, error) {\n\tq, err := r.GetQuery(ctx)\n\tif nil != err {\n\t\treturn nil, err\n\t}\n\n\treturn q.Use(r.model).\n\t\tWhereMany(conditions...).\n\t\tCountCtx(ctx)\n}",
"func (q assetRevisionQuery) CountP() int64 {\n\tc, err := q.Count()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn c\n}",
"func (d *Driver) Count(ctx context.Context, prefix string) (revRet int64, count int64, err error) {\n\tstart := time.Now()\n\tdefer func() {\n\t\tdur := time.Since(start)\n\t\tfStr := \"COUNT %s => rev=%d, count=%d, err=%v, duration=%s\"\n\t\td.logMethod(dur, fStr, prefix, revRet, count, err, dur)\n\t}()\n\n\tentries, err := d.getKeys(ctx, prefix, false)\n\tif err != nil {\n\t\treturn 0, 0, err\n\t}\n\t// current revision\n\tcurrentRev, err := d.currentRevision()\n\tif err != nil {\n\t\treturn 0, 0, err\n\t}\n\treturn currentRev, int64(len(entries)), nil\n}",
"func (b *blogsQueryBuilder) Count() (int64, error) {\n\tif b.err != nil {\n\t\treturn 0, b.err\n\t}\n\treturn b.builder.Count()\n}",
"func (q repositoryQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count repositories rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q inventoryQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count inventory rows\")\n\t}\n\n\treturn count, nil\n}",
"func (_Harberger *HarbergerCaller) AssetsCount(opts *bind.CallOpts) (*big.Int, error) {\n\tvar (\n\t\tret0 = new(*big.Int)\n\t)\n\tout := ret0\n\terr := _Harberger.contract.Call(opts, out, \"assetsCount\")\n\treturn *ret0, err\n}",
"func (_Harberger *HarbergerSession) AssetsCount() (*big.Int, error) {\n\treturn _Harberger.Contract.AssetsCount(&_Harberger.CallOpts)\n}",
"func (p *postsQueryBuilder) Count() (int64, error) {\n\tif p.err != nil {\n\t\treturn 0, p.err\n\t}\n\treturn p.builder.Count()\n}",
"func (m *ManagedTenantsManagementTemplateStepVersionsItemDeploymentsRequestBuilder) Count()(*ManagedTenantsManagementTemplateStepVersionsItemDeploymentsCountRequestBuilder) {\n return NewManagedTenantsManagementTemplateStepVersionsItemDeploymentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter)\n}",
"func (r repository) Count(ctx context.Context) (int, error) {\n\tvar count int\n\terr := r.db.With(ctx).Select(\"COUNT(*)\").From(\"urls\").Row(&count)\n\treturn count, err\n}",
"func (hq *HarborQuery) Count(ctx context.Context) (int, error) {\n\tif err := hq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn hq.sqlCount(ctx)\n}",
"func (q authorQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"mdbmdbmodels: failed to count authors rows\")\n\t}\n\n\treturn count, nil\n}",
"func (bc *Catalog) Count() int {\n\tbc.lock.RLock()\n\tdefer bc.lock.RUnlock()\n\treturn len(bc.bundles)\n}",
"func (_Harberger *HarbergerCallerSession) AssetsCount() (*big.Int, error) {\n\treturn _Harberger.Contract.AssetsCount(&_Harberger.CallOpts)\n}",
"func (q holdenAtQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count HoldenAt rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q vendorQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count vendors rows\")\n\t}\n\n\treturn count, nil\n}",
"func (s Snapshot) Count() int64 {\n\treturn s.count\n}",
"func (h *handler) Count(ctx context.Context, params db.Params) int {\n\tbsonFilter := bson.M{}\n\tfor key, val := range params.Filter {\n\t\tbsonFilter[key] = val\n\t}\n\tcount, _ := h.getDatabase(params.Database).C(params.Collection).Find(bsonFilter).Count()\n\treturn count\n}",
"func (b *BarrageFinder) Count() int64 {\n\tsession := GetMongo()\n\tdefer session.Close()\n\n\tn, err := session.DB(DBName).C(ColNameBarrage).Find(b.where).Count()\n\tif err != nil {\n\t\treturn 0\n\t}\n\treturn int64(n)\n}",
"func (c *Core) Count(ctx context.Context, filter QueryFilter) (int, error) {\n\treturn c.storer.Count(ctx, filter)\n}",
"func (s *NewsService) Count(rs app.RequestScope) (int, error) {\n\treturn s.dao.Count(rs)\n}",
"func (eq *EntityQuery) Count(ctx context.Context) (int, error) {\n\tif err := eq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn eq.sqlCount(ctx)\n}",
"func (q braceletPhotoQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count bracelet_photo rows\")\n\t}\n\n\treturn count, nil\n}",
"func (s *CategoryService) Count(rs app.RequestScope) (int, error) {\n\treturn s.dao.Count(rs)\n}",
"func (q mempoolBinQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count mempool_bin rows\")\n\t}\n\n\treturn count, nil\n}",
"func (b *MessagesGetHistoryAttachmentsBuilder) Count(v int) *MessagesGetHistoryAttachmentsBuilder {\n\tb.Params[\"count\"] = v\n\treturn b\n}",
"func (p *OrderRepo) Count(params param.Param) (count uint64, err error) {\n\tvar whereStr string\n\tif whereStr, err = params.ParseWhere(p.Cols); err != nil {\n\t\terr = limberr.Take(err, \"E1532288\").Custom(corerr.ValidationFailedErr).Build()\n\t\treturn\n\t}\n\n\terr = p.Engine.DB.Table(cafmodel.OrderTable).\n\t\tWhere(whereStr).\n\t\tCount(&count).Error\n\n\terr = p.dbError(err, \"E1539820\", cafmodel.Order{}, corterm.List)\n\treturn\n}",
"func (q stockKeepingUnitContentQuery) Count(exec boil.Executor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow(exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"db: failed to count stock_keeping_unit_content rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q sourceQuery) Count(exec boil.Executor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow(exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"mdbmodels: failed to count sources rows\")\n\t}\n\n\treturn count, nil\n}",
"func (vq *VehicleQuery) Count(ctx context.Context) (int, error) {\n\tif err := vq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn vq.sqlCount(ctx)\n}",
"func (mm *Model) Count(query interface{}) (int, error) {\n\treturn mm.executeInt(func(c CachedCollection) (int, error) {\n\t\treturn c.Count(query)\n\t})\n}",
"func (q projectQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count project rows\")\n\t}\n\n\treturn count, nil\n}",
"func Count(query db.Q) (int, error) {\n\treturn db.CountQ(Collection, query)\n}",
"func (upq *UnsavedPostQuery) Count(ctx context.Context) (int, error) {\n\tif err := upq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn upq.sqlCount(ctx)\n}",
"func (q *DeferredQuery) Count() (int, error) {\n\topt := mopt.Count()\n\tfilter := q.Filter\n\tif filter == nil {\n\t\tfilter = bson.D{}\n\t}\n\tc, err := q.Coll.CountDocuments(nil, filter, opt)\n\treturn int(c), err\n}",
"func (c *commentsQueryBuilder) Count() (int64, error) {\n\tif c.err != nil {\n\t\treturn 0, c.err\n\t}\n\treturn c.builder.Count()\n}",
"func (q transactionQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count transactions rows\")\n\t}\n\n\treturn count, nil\n}",
"func (m *VersionsRequestBuilder) Count()(*i85602a191e89c23e7dc951003bf0ae47348b1de1c3ef0eb5484a4677a1344da3.CountRequestBuilder) {\n return i85602a191e89c23e7dc951003bf0ae47348b1de1c3ef0eb5484a4677a1344da3.NewCountRequestBuilderInternal(m.pathParameters, m.requestAdapter);\n}",
"func (q rssAnnouncementQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count rss_announcements rows\")\n\t}\n\n\treturn count, nil\n}",
"func (biq *BankItemQuery) Count(ctx context.Context) (int, error) {\n\treturn biq.sqlCount(ctx)\n}",
"func (q paymentObjectQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count payment_objects rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q sourceQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"mdbmdbmodels: failed to count sources rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q buildingQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"record: failed to count buildings rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q jetQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count jets rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q transactionQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"model: failed to count transaction rows\")\n\t}\n\n\treturn count, nil\n}",
"func (rdq *ResultsDefinitionQuery) Count(ctx context.Context) (int, error) {\n\tif err := rdq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn rdq.sqlCount(ctx)\n}",
"func (bcq *BaselineClassQuery) Count(ctx context.Context) (int, error) {\n\tif err := bcq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn bcq.sqlCount(ctx)\n}",
"func (irq *InstanceRuntimeQuery) Count(ctx context.Context) (int, error) {\n\tif err := irq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn irq.sqlCount(ctx)\n}",
"func (rq *RentQuery) Count(ctx context.Context) (int, error) {\n\tif err := rq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn rq.sqlCount(ctx)\n}",
"func (sch *schema) Count(filter []byte) int {\n\tvar filterQuery interface{}\n\tbson.UnmarshalJSON(filter, &filterQuery)\n\tquery := sch.Collection.Find(filterQuery).Sort(\"_id\")\n\n\tcount, _ := query.Count()\n\treturn count\n}",
"func (t *Table) Count(cond *ConditionList) (*QueryResult, error) {\n\treturn t.query(cond, &SDK.QueryInput{\n\t\tSelect: pointers.String(SelectCount),\n\t})\n}",
"func (b *PhotosGetAlbumsBuilder) Count(v int) *PhotosGetAlbumsBuilder {\n\tb.Params[\"count\"] = v\n\treturn b\n}",
"func (q stockCvtermQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"chado: failed to count stock_cvterm rows\")\n\t}\n\n\treturn count, nil\n}",
"func (esq *EventSeverityQuery) Count(ctx context.Context) (int, error) {\n\tif err := esq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn esq.sqlCount(ctx)\n}",
"func (q projectQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count projects rows\")\n\t}\n\n\treturn count, nil\n}",
"func (qs SysDBQuerySet) Count() (int, error) {\n\tvar count int\n\terr := qs.db.Count(&count).Error\n\treturn count, err\n}",
"func (b *QueryBuilder) Count(_ bool, _ ...NodeI) uint {\n\treturn 0\n}",
"func (q recipeAdditiveQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count recipe_additive rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q activityLogQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"dbmodel: failed to count activity_logs rows\")\n\t}\n\n\treturn count, nil\n}",
"func (b BladeStorage) Count(filters *filter.Filters) (count int, err error) {\n\tq, err := filters.BuildQuery(model.Blade{}, b.db)\n\tif err != nil {\n\t\treturn count, err\n\t}\n\n\terr = q.Model(&model.Blade{}).Count(&count).Error\n\treturn count, err\n}",
"func (q skinQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count skin rows\")\n\t}\n\n\treturn count, nil\n}",
"func (v *vertex) Count() interfaces.QueryBuilder {\n\treturn v.Add(NewSimpleQB(\".count()\"))\n}",
"func (r *Release) DownloadCount() int {\n\tcount := 0\n\tfor _, a := range r.Assets {\n\t\tcount += a.Count\n\t}\n\treturn count\n}",
"func (b *blogRepository) Count() int {\n\tquery := sq.Select(\"count(*)\").\n\t\tFrom(\"blogs\").\n\t\tWhere(sq.Eq{\"active\": 1})\n\n\tvar count int\n\terr := b.db.Get(&count, query)\n\tif err != nil {\n\t\treturn 0\n\t}\n\n\treturn count\n}",
"func (b *PhotosSearchBuilder) Count(v int) *PhotosSearchBuilder {\n\tb.Params[\"count\"] = v\n\treturn b\n}",
"func (q shelfQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count shelf rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q kvstoreQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count kvstore rows\")\n\t}\n\n\treturn count, nil\n}",
"func (eq *EntryQuery) Count(ctx context.Context) (int, error) {\n\tctx = setContextOp(ctx, eq.ctx, \"Count\")\n\tif err := eq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn withInterceptors[int](ctx, eq, querierCount[*EntryQuery](), eq.inters)\n}",
"func (rq *ReceiptQuery) Count(ctx context.Context) (int, error) {\n\tif err := rq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn rq.sqlCount(ctx)\n}",
"func (q oauthClientQuery) Count(exec boil.Executor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow(exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count oauth_clients rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q instrumentClassQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count instrument_class rows\")\n\t}\n\n\treturn count, nil\n}",
"func (q tenantQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"dbmodel: failed to count tenants rows\")\n\t}\n\n\treturn count, nil\n}",
"func (c *Client) Count(entityName string, filters []stgml.Filter) (int64, error) {\n\tcollection := c.getCollection(entityName)\n\tfilterOption := filter(filters)\n\treturn collection.CountDocuments(ctx, filterOption)\n}",
"func (ac *ArticleController) Count(w http.ResponseWriter, r *http.Request) {\n\tcount := models.ArticleCount()\n\tsendJSON(count, http.StatusOK, w)\n}",
"func (siq *SubItemQuery) Count(ctx context.Context) (int, error) {\n\tif err := siq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn siq.sqlCount(ctx)\n}",
"func (q *Query) Count() (n int, err error) {\n\treturn q.q.Count()\n}",
"func (qs ConstraintQuerySet) Count() (int, error) {\n\tvar count int\n\terr := qs.db.Count(&count).Error\n\treturn count, err\n}",
"func (c *Aggregator) Count() (uint64, error) {\n\treturn c.state.count, nil\n}",
"func (s *PetStore) Count(q *PetQuery) (int64, error) {\n\treturn s.Store.Count(q)\n}",
"func (b *GroupsGetInvitesBuilder) Count(v int) *GroupsGetInvitesBuilder {\n\tb.Params[\"count\"] = v\n\treturn b\n}",
"func (m *PasswordResetModel) Count(ctx context.Context, builders ...query.SQLBuilder) (int64, error) {\n\tsqlStr, params := m.query.\n\t\tMerge(builders...).\n\t\tTable(m.tableName).\n\t\tAppendCondition(m.applyScope()).\n\t\tResolveCount()\n\n\trows, err := m.db.QueryContext(ctx, sqlStr, params...)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\tdefer rows.Close()\n\n\trows.Next()\n\tvar res int64\n\tif err := rows.Scan(&res); err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn res, nil\n}",
"func (c *Chef) Count() (int, error) {\n\trows, err := c.db.Query(fmt.Sprintf(`SELECT COUNT(*) FROM %s WHERE \"deleted\"=FALSE`, c.table))\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tdefer rows.Close()\n\n\tif !rows.Next() {\n\t\treturn 0, nil\n\t}\n\tvar n int\n\terr = rows.Scan(&n)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn n, nil\n}",
"func (cq *CartQuery) Count(ctx context.Context) (int, error) {\n\tif err := cq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn cq.sqlCount(ctx)\n}",
"func (s *TransactionRows) Count() int {\n\t// return s.iter.\n\treturn 0\n}",
"func (s *Schema) Count(tableName string) IQuery {\n\treturn s.newQuery(tableName, \"count\")\n}",
"func (dao *ArticleDAO) Count(rs app.RequestScope, filter string) (int, error) {\n\tvar count int\n\tq := rs.Tx().Select(\"COUNT(*)\").From(\"article\")\n\tif filter != \"\" {\n\t\tq.Where(dbx.Like(\"title\", filter))\n\t}\n\terr := q.Row(&count)\n\treturn count, err\n}",
"func (s Scope) Count() int {\n\treturn s.m.Count()\n}",
"func (kv *KV) Count() (i int) {\n\tkv.db.View(func(tx *buntdb.Tx) error {\n\t\terr := tx.Ascend(\"\", func(key, value string) bool {\n\t\t\ti++\n\t\t\treturn true\n\t\t})\n\t\treturn err\n\t})\n\treturn\n}",
"func (_BaseContentType *BaseContentTypeCaller) CountVersionHashes(opts *bind.CallOpts) (*big.Int, error) {\n\tvar out []interface{}\n\terr := _BaseContentType.contract.Call(opts, &out, \"countVersionHashes\")\n\n\tif err != nil {\n\t\treturn *new(*big.Int), err\n\t}\n\n\tout0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)\n\n\treturn out0, err\n\n}",
"func (b *PhotosGetAllBuilder) Count(v int) *PhotosGetAllBuilder {\n\tb.Params[\"count\"] = v\n\treturn b\n}",
"func (_BaseContentSpace *BaseContentSpaceCaller) CountVersionHashes(opts *bind.CallOpts) (*big.Int, error) {\n\tvar out []interface{}\n\terr := _BaseContentSpace.contract.Call(opts, &out, \"countVersionHashes\")\n\n\tif err != nil {\n\t\treturn *new(*big.Int), err\n\t}\n\n\tout0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)\n\n\treturn out0, err\n\n}",
"func (q currencyQuery) Count(exec boil.Executor) (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow(exec).Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"models: failed to count currency rows\")\n\t}\n\n\treturn count, nil\n}",
"func (b *PhotosGetNewTagsBuilder) Count(v int) *PhotosGetNewTagsBuilder {\n\tb.Params[\"count\"] = v\n\treturn b\n}",
"func (ouq *OrgUnitQuery) Count(ctx context.Context) (int, error) {\n\tif err := ouq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn ouq.sqlCount(ctx)\n}",
"func (b *PhotosGetAllCommentsBuilder) Count(v int) *PhotosGetAllCommentsBuilder {\n\tb.Params[\"count\"] = v\n\treturn b\n}",
"func Count() Aggregate {\n\treturn Aggregate{\n\t\tSQL: func(s *sql.Selector) string {\n\t\t\treturn sql.Count(\"*\")\n\t\t},\n\t}\n}"
] |
[
"0.71550035",
"0.65220124",
"0.64874226",
"0.6165795",
"0.6145468",
"0.61089855",
"0.6047003",
"0.6033554",
"0.6028839",
"0.6017095",
"0.5957023",
"0.59163487",
"0.5886048",
"0.58771646",
"0.587297",
"0.58572495",
"0.5853661",
"0.5853368",
"0.58479166",
"0.58378774",
"0.5807802",
"0.5801588",
"0.57904845",
"0.57878345",
"0.5782215",
"0.5773012",
"0.57690936",
"0.5743855",
"0.57285225",
"0.5717241",
"0.5712714",
"0.57109064",
"0.5706867",
"0.570603",
"0.57043725",
"0.5677769",
"0.5677136",
"0.56770355",
"0.5676602",
"0.5675432",
"0.56729496",
"0.56728226",
"0.56714165",
"0.5669344",
"0.5664644",
"0.56500626",
"0.56490093",
"0.56449777",
"0.5644519",
"0.5634955",
"0.56285274",
"0.56163454",
"0.5612279",
"0.56117153",
"0.55960596",
"0.55884767",
"0.5588242",
"0.55869865",
"0.55868274",
"0.5585013",
"0.5584428",
"0.5568658",
"0.55644137",
"0.55475515",
"0.5523922",
"0.55233276",
"0.5513863",
"0.5509327",
"0.5505888",
"0.5504254",
"0.5500227",
"0.5495353",
"0.54942995",
"0.54815614",
"0.54802024",
"0.5473623",
"0.5465649",
"0.54631597",
"0.546213",
"0.54609424",
"0.54580426",
"0.5450073",
"0.54487133",
"0.54475254",
"0.54388016",
"0.5425765",
"0.54247916",
"0.5424529",
"0.54206747",
"0.5420042",
"0.5417794",
"0.5411016",
"0.54070455",
"0.5406932",
"0.5403658",
"0.5403149",
"0.53990006",
"0.5398614",
"0.5397195",
"0.5396517"
] |
0.86665636
|
0
|
Exists checks if the row exists in the table, and panics on error.
|
func (q assetRevisionQuery) ExistsP() bool {
e, err := q.Exists()
if err != nil {
panic(boil.WrapErr(err))
}
return e
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func RowExists(query string, args ...interface{}) bool {\n\tvar exists bool\n\tquery = fmt.Sprintf(\"SELECT exists (%s)\", query)\n\terr := Db.QueryRow(query, args...).Scan(&exists)\n\tif err != nil && err != sql.ErrNoRows {\n\t\tfmt.Errorf(\"error checking if row exists '%s' %v\", args, err)\n\t}\n\treturn exists\n}",
"func (c *Conn) Exists(query string, args ...interface{}) (bool, error) {\n\ts, err := c.Prepare(query, args...)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tdefer s.Finalize()\n\tok, err := s.Next()\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tif s.ColumnCount() == 0 {\n\t\treturn false, s.specificError(\"don't use Exists with query that returns no data such as %q\", query)\n\t}\n\treturn ok, nil\n}",
"func IsExist(err error) bool",
"func rowExist(user models.ClientUser) bool {\n query := \"Select exists(select 1 from user where username = '\" + user.Username + \"' AND password = '\" + user.Password + \"');\"\n var exist bool\n err := Db.QueryRow(query).Scan(&exist)\n if err != nil {\n fmt.Println(\"rowExist : \", err)\n return false\n }\n if exist {\n return true\n }else{\n return false\n }\n}",
"func (db *AppDB) Exists(t time.Time) bool {\n\tif _, err := db.Result(t); err != nil {\n\t\treturn false\n\t}\n\n\treturn true\n}",
"func (tx *Tx) Exists(key string) (bool, error) {\n\tif tx.db == nil {\n\t\treturn false, ErrNoDatabase\n\t}\n\treturn tx.exists(tx.db.root(), key)\n}",
"func (c FileTableConnector) Exists(tablePath string) bool {\n\tif _, err := os.Stat(tablePath); os.IsNotExist(err) {\n\t\treturn false\n\t}\n\treturn true\n}",
"func (h Hera) TableExists(tableName string) error {\n\ttheDML := \"SELECT exists (select 1 from information_schema.tables WHERE table_schema='public' AND table_name=\" + \"'\" + tableName + \"'\" + \")\"\n\n\tvar occurrences bool\n\tif errQ := h.DBConn.QueryRow(theDML).Scan(&occurrences); errQ != nil {\n\t\treturn errQ\n\t}\n\tif occurrences {\n\t\treturn nil\n\t}\n\treturn errors.New(\"table \" + tableName + \" does not exist in \" + h.DBName)\n}",
"func (fk ImmutableFK) Exists(conn sol.Conn) bool {\n\t// If the table is missing, the key must not exist\n\tif fk.Table == nil {\n\t\treturn false\n\t}\n\tvar id int64\n\tstmt := sol.Select(\n\t\tfk.Table.C(\"id\"),\n\t).Where(\n\t\tfk.Table.C(\"id\").Equals(fk.ID),\n\t).Limit(1)\n\tconn.Query(stmt, &id)\n\treturn id != 0\n}",
"func (s *DbRecorder) Exists() (bool, error) {\n\thas := false\n\twhereParts := s.WhereIds()\n\n\tq := s.builder.Select(\"COUNT(*) > 0\").From(s.table).Where(whereParts)\n\terr := q.QueryRow().Scan(&has)\n\n\treturn has, err\n}",
"func (q cmfTurntableQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if cmf_turntable exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (dbclient *CouchDatabase) Exists() (bool, error) {\n\t_, dbReturn, err := dbclient.GetDatabaseInfo()\n\tif dbReturn != nil && dbReturn.StatusCode == http.StatusNotFound {\n\t\treturn false, nil\n\t}\n\tif err != nil {\n\t\treturn false, err\n\t}\n\treturn true, nil\n}",
"func (_ElvTradable *ElvTradableCaller) Exists(opts *bind.CallOpts, tokenId *big.Int) (bool, error) {\n\tvar out []interface{}\n\terr := _ElvTradable.contract.Call(opts, &out, \"exists\", tokenId)\n\n\tif err != nil {\n\t\treturn *new(bool), err\n\t}\n\n\tout0 := *abi.ConvertType(out[0], new(bool)).(*bool)\n\n\treturn out0, err\n\n}",
"func Exists(IDval int) (err error){\n\treturn\n}",
"func (u *User) Exists(id int) bool {\n\treturn !db.Select(\"id\").First(u, id).RecordNotFound()\n}",
"func (i *Item) Exists() (bool, error) {\n\tif i.UUID == \"\" {\n\t\treturn false, nil\n\t}\n\tvar id string\n\treturn db.SelectExists(\n\t\t&id,\n\t\t\"SELECT uuid FROM items WHERE uuid=?\",\n\t\ti.UUID,\n\t)\n}",
"func (q weatherQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"db: failed to check if weather exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func CheckUserExists(username string, table string, session *r.Session) bool {\n\tvar u interface{}\n\tdb := os.Getenv(\"DB\")\n\t// userTable := os.Getenv(\"USERTABLE\")\n\tcur, _ := r.DB(db).Table(table).GetAllByIndex(\"username\", username).Run(session)\n\t_ = cur.One(&u)\n\tcur.Close()\n\t// fmt.Println(u)\n\tif u == nil {\n\t\t// fmt.Println(\"NO\")\n\t\treturn false\n\t}\n\t// fmt.Println(\"YES\")\n\treturn true\n}",
"func (q rentalRowerQuery) Exists(exec boil.Executor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow(exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if rental_rowers exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (conn *dbconn) existsCheck(sql string) (exists bool, err error) {\n\tif len(sql) > 0 {\n\t\t// Execute the sql against the database\n\t\tif rows, err2 := conn.db.Query(sql); err2 == nil && rows != nil {\n\n\t\t\tif err = rows.Err(); err == nil {\n\t\t\t\tdefer func() {\n\t\t\t\t\t_ = rows.Close()\n\t\t\t\t}()\n\n\t\t\t\tfor err == nil && rows.Next() {\n\t\t\t\t\terr = rows.Scan(&exists)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\terr = err2\n\t\t}\n\t} else {\n\t\terr = errors.New(\"empty SQL String\")\n\t}\n\n\treturn exists, err\n}",
"func (q holdenAtQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if HoldenAt exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func Exists(c *db.Connection, tx *sql.Tx, selectStatement string) (bool, error) {\n\tif !stringutil.HasPrefixCaseless(selectStatement, \"select\") {\n\t\treturn false, fmt.Errorf(\"statement must be a `SELECT`\")\n\t}\n\treturn c.Invoke(db.OptTx(tx)).Query(selectStatement).Any()\n}",
"func SelectExists(dest interface{}, query string, args ...interface{}) (exists bool, err error) {\n\tstmt := database.prepare(query)\n\tdefer stmt.Close()\n\terr = stmt.QueryRow(args...).Scan(dest)\n\tif err == sql.ErrNoRows {\n\t\terr = nil // consider a non-error, means the row does not exist.\n\t\treturn\n\t}\n\tif err == nil {\n\t\texists = true\n\t}\n\treturn\n}",
"func (q withdrawalCryptoQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"sqlite3: failed to check if withdrawal_crypto exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (s *service) TableExists(ctx context.Context, request *TableExistsRequest) (bool, error) {\n\ttableRef, err := base.NewTableReference(request.Table)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\ttable, err := s.Table(ctx, tableRef)\n\tif base.IsNotFoundError(err) {\n\t\terr = nil\n\t}\n\treturn table != nil, err\n}",
"func (i Item) Exists() bool {\n\tif i.UUID == \"\" {\n\t\treturn false\n\t}\n\tuuid, err := db.SelectFirst(\"SELECT `uuid` FROM `items` WHERE `uuid`=?\", i.UUID)\n\n\tif err != nil {\n\t\tLog(err)\n\t\treturn false\n\t}\n\tLog(\"Exists:\", uuid)\n\treturn uuid != \"\"\n}",
"func (l *levelDBRepo) Exists(tenantID, id []byte) bool {\n\tkey := getKey(tenantID, id)\n\tres, err := l.db.Has(key, nil)\n\t// TODO check this\n\tif err != nil {\n\t\treturn false\n\t}\n\n\treturn res\n}",
"func (q docQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if doc exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q failureQuery) Exists() (bool, error) {\n\tvar count int64\n\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if failure exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q transactionQuery) Exists() (bool, error) {\n\tvar count int64\n\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"model: failed to check if transaction exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (hq *HarborQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := hq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn hq.sqlExist(ctx)\n}",
"func (m *UserModel) Exists(ctx context.Context, builders ...query.SQLBuilder) (bool, error) {\n\tcount, err := m.Count(ctx, builders...)\n\treturn count > 0, err\n}",
"func (q boardQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"rdb: failed to check if boards exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (p *PostgresProvider) Exist(sid string) bool {\n\tvar data []byte\n\terr := p.c.QueryRow(\"SELECT data FROM session WHERE key=$1\", sid).Scan(&data)\n\tif err != nil && err != sql.ErrNoRows {\n\t\tpanic(\"session/postgres: error checking existence: \" + err.Error())\n\t}\n\treturn err != sql.ErrNoRows\n}",
"func (s *Database) Exists() bool {\n\t_, err := os.Stat(s.dbFile)\n\treturn err == nil\n}",
"func (q recipeLipidQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if recipe_lipid exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func CheckIfExistValue(column string, value string, table string) bool {\n\treturn RowExists(\"SELECT \"+column+\" FROM `\"+table+\"` WHERE \"+column+\"= ?\", value)\n}",
"func (q utxoQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if utxo exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func validateIntfExists(d *db.DB, intfTs string, intfName string) error {\n entry, err := d.GetEntry(&db.TableSpec{Name:intfTs}, db.Key{Comp: []string{intfName}})\n if err != nil || !entry.IsPopulated() {\n errStr := \"Interface does not exist in DB\"\n return errors.New(errStr)\n }\n return nil\n}",
"func (ar AlbumDbRepository) Exists(id int) bool {\n\t_, err := ar.Get(id)\n\treturn err == nil\n}",
"func StockExists(exec boil.Executor, stockID int) (bool, error) {\n\tvar exists bool\n\tsql := \"select exists(select 1 from `stock` where `stock_id`=? limit 1)\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, sql)\n\t\tfmt.Fprintln(boil.DebugWriter, stockID)\n\t}\n\n\trow := exec.QueryRow(sql, stockID)\n\n\terr := row.Scan(&exists)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: unable to check if stock exists\")\n\t}\n\n\treturn exists, nil\n}",
"func (q illnessQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if illness exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q inventoryQuery) Exists() (bool, error) {\n\tvar count int64\n\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if inventory exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func sqlHashExists(db *sql.DB, hash, table string) bool {\n\tsqlTorrentQuery := `SELECT torrent_hash FROM ` + table + ` WHERE torrent_hash=$1;`\n\tvar torrentHash string\n\trow := db.QueryRow(sqlTorrentQuery, hash)\n\tswitch err := row.Scan(&torrentHash); err {\n\tcase sql.ErrNoRows:\n\t\tfmt.Println(\"No rows returned, attempting insert\")\n\t\treturn false\n\tcase nil:\n\t\tfmt.Println(\"Found\", torrentHash, \"skipping\")\n\t\treturn true\n\tdefault:\n\t\tfmt.Println(err)\n\t\treturn false\n\t}\n}",
"func Exist() bool {\n\tdb := GetConnect()\n\tdefer db.Close()\n\n\trpg := new(Rpg)\n\terr := db.Model(rpg).Order(\"id DESC\").Limit(1).Select()\n\n\tif err != nil {\n\t\tfmt.Println(err)\n\t\treturn false\n\t}\n\treturn true\n}",
"func (q sourceQuery) Exists(exec boil.Executor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow(exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"mdbmodels: failed to check if sources exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (rq *RentQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := rq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn rq.sqlExist(ctx)\n}",
"func (sq *SQ3Driver) queryExists(sql string, args ...interface{}) (bool, error) {\n\n\t// Run the query\n\trows, err := sq.DB.Query(sql, args...)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tdefer rows.Close()\n\n\treturn rows.Next(), nil\n}",
"func (database *Database) TableExists(name TableName) (yes bool, err error) {\n\twanted := name.String()\n\trows, err := database.db.QueryContext(context.Background(), showTables(database.dialect))\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tdefer rows.Close()\n\n\tfor rows.Next() {\n\t\tvar s string\n\t\trows.Scan(&s)\n\t\tif s == wanted {\n\t\t\treturn true, rows.Err()\n\t\t}\n\t}\n\treturn false, rows.Err()\n}",
"func TestExists(t *testing.T) {\n\tdb, err := Open(db_filename, \"c\")\n\tdefer db.Close()\n\tdefer os.Remove(db_filename)\n\n\tif err != nil {\n\t\tt.Error(\"Couldn't create database\")\n\t}\n\n\terr = db.Insert(\"foo\", \"bar\")\n\texists := db.Exists(\"foo\")\n\tif !exists {\n\t\tt.Error(\"Inserted key reported as not existing\")\n\t}\n}",
"func (q foreignLegalResourceQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if ForeignLegalResources exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q skinQuery) Exists() (bool, error) {\n\tvar count int64\n\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if skin exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q rowerGroupQuery) Exists(exec boil.Executor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow(exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if rower_group exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q usernameListingQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if username_listings exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (r *pgRepository) Exists(ctx context.Context, tenantID, id string) (bool, error) {\n\treturn r.existQuerier.Exists(ctx, resource.API, tenantID, repo.Conditions{repo.NewEqualCondition(\"id\", id)})\n}",
"func (q failureQuery) ExistsP() bool {\n\te, err := q.Exists()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn e\n}",
"func (q ticketQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if tickets exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q buildingQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"record: failed to check if buildings exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q rawVisitQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if raw_visits exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q transactionQuery) Exists() (bool, error) {\n\tvar count int64\n\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if transactions exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (siq *SubItemQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := siq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn siq.sqlExist(ctx)\n}",
"func TableExists(db *sql.DB, dbName string, tableName string) (bool, error) {\n\tfindTableSQL := fmt.Sprintf(sqlTableExistsQuery, dbName, tableName)\n\tvar tableFound string\n\terr := crdb.Execute(func() error {\n\t\treturn db.QueryRow(findTableSQL).Scan(&tableFound)\n\t})\n\tswitch err {\n\tcase sql.ErrNoRows:\n\t\treturn false, nil\n\tcase nil:\n\t\treturn true, nil\n\tdefault:\n\t\treturn false, err\n\t}\n}",
"func (q repositoryQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if repositories exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (ss *redisStore) Exists(id string) bool {\n\t_, err := ss.rdb.Get(ctx, id).Result()\n\tif err != nil {\n\t\treturn false\n\t}\n\n\treturn true\n}",
"func (c *Cdb) Exists(key []byte) (bool, error) {\n\terr := c.Iterate(key).next()\n\tif err == io.EOF {\n\t\treturn false, nil\n\t}\n\tif err != nil {\n\t\treturn false, err\n\t}\n\treturn true, nil\n}",
"func TestTableExists(t *testing.T) {\n\tinput := &dynamodb.CreateTableInput{\n\t\tAttributeDefinitions: []*dynamodb.AttributeDefinition{\n\t\t\t{\n\t\t\t\tAttributeName: aws.String(\"id\"),\n\t\t\t\tAttributeType: aws.String(\"S\"),\n\t\t\t},\n\t\t},\n\t\tKeySchema: []*dynamodb.KeySchemaElement{\n\t\t\t{\n\t\t\t\tAttributeName: aws.String(\"id\"),\n\t\t\t\tKeyType: aws.String(\"HASH\"),\n\t\t\t},\n\t\t},\n\t\tProvisionedThroughput: &dynamodb.ProvisionedThroughput{\n\t\t\tReadCapacityUnits: aws.Int64(1),\n\t\t\tWriteCapacityUnits: aws.Int64(1),\n\t\t},\n\t\tTableName: aws.String(\"test_table\"),\n\t}\n\n\tdb := GetInstance()\n\tdb.Svc.CreateTable(input)\n\n\t// Test that our table has created, and our code sees this\n\texists, err := db.tableExists(\"test_table\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif !exists {\n\t\tt.Fatalf(\"test_table was not created, no error was produced\")\n\t}\n\n\t// Test that a non-existence table is not reported as existing\n\texists, err = db.tableExists(\"not_test_table\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif exists {\n\t\tt.Fatalf(\"not_test_table unexpectedly exists\")\n\t}\n}",
"func (m *GormResourceRepository) CheckExists(ctx context.Context, id string) error {\n\tdefer goa.MeasureSince([]string{\"goa\", \"db\", \"resource\", \"exists\"}, time.Now())\n\treturn base.CheckExistsWithCustomIDColumn(ctx, m.db, m.TableName(), \"resource_id\", id)\n}",
"func (q shelfQuery) Exists() (bool, error) {\n\tvar count int64\n\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if shelf exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q chatQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"dal: failed to check if chat exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (t *Table) IfExists() *Table {\n\tt.columns[len(t.columns)-1].IfExists = IfExists\n\treturn t\n}",
"func (q taskQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if tasks exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q blockQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if block exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q jetQuery) Exists() (bool, error) {\n\tvar count int64\n\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if jets exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func IfExists(statement string) GuardFunc {\n\treturn Guard(\"if exists run\", func(c *db.Connection, tx *sql.Tx) (bool, error) {\n\t\treturn Exists(c, tx, statement)\n\t})\n}",
"func (ram *Ram) TableExists(tableName string) bool {\n\t_, ok := ram.tables[tableName]\n\n\treturn ok\n}",
"func (irq *InstanceRuntimeQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := irq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn irq.sqlExist(ctx)\n}",
"func (tx *Tx) Exists(key string) bool {\n\t_, err := tx.db.strStore.get(key)\n\tif err != nil {\n\t\tif err == ErrExpiredKey {\n\t\t\ttx.db.evict(key, String)\n\t\t}\n\t\treturn false\n\t}\n\n\treturn true\n}",
"func (_ElvTradableLocal *ElvTradableLocalCaller) Exists(opts *bind.CallOpts, tokenId *big.Int) (bool, error) {\n\tvar out []interface{}\n\terr := _ElvTradableLocal.contract.Call(opts, &out, \"exists\", tokenId)\n\n\tif err != nil {\n\t\treturn *new(bool), err\n\t}\n\n\tout0 := *abi.ConvertType(out[0], new(bool)).(*bool)\n\n\treturn out0, err\n\n}",
"func (dbclient *CouchDatabase) ExistsWithRetry() (bool, error) {\n\t//get the number of retries\n\tmaxRetries := dbclient.CouchInstance.Conf.MaxRetries\n\n\t_, err := retry.Invoke(\n\t\tfunc() (interface{}, error) {\n\t\t\tdbExists, err := dbclient.Exists()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tif !dbExists {\n\t\t\t\treturn nil, errDBNotFound\n\t\t\t}\n\n\t\t\t// DB exists\n\t\t\treturn nil, nil\n\t\t},\n\t\tretry.WithMaxAttempts(maxRetries),\n\t\tretry.WithBeforeRetry(func(err error, attempt int, backoff time.Duration) bool {\n\t\t\tif dbclient.shouldRetry(err) {\n\t\t\t\tlogger.Debugf(\"Got error [%s] checking if DB [%s] exists on attempt #%d. Will retry in %s.\", err, dbclient.DBName, attempt, backoff)\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tlogger.Debugf(\"Got error [%s] checking if DB [%s] exists on attempt #%d. Will NOT retry\", err, dbclient.DBName, attempt)\n\t\t\treturn false\n\t\t}),\n\t)\n\n\tif err != nil {\n\t\tif err == errDBNotFound {\n\t\t\treturn false, nil\n\t\t}\n\t\treturn false, err\n\t}\n\n\treturn true, nil\n}",
"func (roq *RestaurantOwnerQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := roq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn roq.sqlExist(ctx)\n}",
"func (rrq *ReserveRoomQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := rrq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn rrq.sqlExist(ctx)\n}",
"func TransactionExists(exec boil.Executor, transactionID int) (bool, error) {\n\tvar exists bool\n\tsql := \"select exists(select 1 from `transactions` where `transaction_id`=? limit 1)\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, sql)\n\t\tfmt.Fprintln(boil.DebugWriter, transactionID)\n\t}\n\n\trow := exec.QueryRow(sql, transactionID)\n\n\terr := row.Scan(&exists)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: unable to check if transactions exists\")\n\t}\n\n\treturn exists, nil\n}",
"func TransactionExists(exec boil.Executor, id uint64) (bool, error) {\n\tvar exists bool\n\tsql := \"select exists(select 1 from `transaction` where `id`=? limit 1)\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, sql)\n\t\tfmt.Fprintln(boil.DebugWriter, id)\n\t}\n\n\trow := exec.QueryRow(sql, id)\n\n\terr := row.Scan(&exists)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"model: unable to check if transaction exists\")\n\t}\n\n\treturn exists, nil\n}",
"func (q voteQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if vote exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func Exists() error {\n\t// Check to make sure sqlite3 exists\n\tcmd := exec.Command(\"sqlite3\", \"--version\")\n\treturn cmd.Run()\n}",
"func (q automodRuleDatumQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if automod_rule_data exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (rq *ReceiptQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := rq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn rq.sqlExist(ctx)\n}",
"func Has(db *gorm.DB, model TableInterface, scopes ...func(*gorm.DB) *gorm.DB) (bool, error) {\n\tvar result int\n\tdbSession := db.Session(&gorm.Session{NewDB: true, DryRun: true})\n\tstmt := dbSession.Model(model).Select(model.PrimaryKey()).Scopes(scopes...).Find(model).Statement\n\tsql := db.Dialector.Explain(stmt.SQL.String(), stmt.Vars...)\n\trow := db.Raw(\"SELECT EXISTS(?)\", gorm.Expr(sql)).Row()\n\tif row == nil {\n\t\treturn false, nil\n\t}\n\n\tif err := row.Scan(&result); err != nil {\n\t\treturn false, err\n\t}\n\n\treturn result > 0, nil\n}",
"func (uq *UserQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := uq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn uq.sqlExist(ctx)\n}",
"func (_Contract *ContractCaller) Exists(opts *bind.CallOpts, _tokenId *big.Int) (bool, error) {\n\tvar (\n\t\tret0 = new(bool)\n\t)\n\tout := ret0\n\terr := _Contract.contract.Call(opts, out, \"exists\", _tokenId)\n\treturn *ret0, err\n}",
"func CheckHandleExists(ctx sessionctx.Context, t table.Table, recordID int64, data []types.Datum) error {\n\ttrace_util_0.Count(_tables_00000, 358)\n\tif pt, ok := t.(*partitionedTable); ok {\n\t\ttrace_util_0.Count(_tables_00000, 362)\n\t\tinfo := t.Meta().GetPartitionInfo()\n\t\tpid, err := pt.locatePartition(ctx, info, data)\n\t\tif err != nil {\n\t\t\ttrace_util_0.Count(_tables_00000, 364)\n\t\t\treturn err\n\t\t}\n\t\ttrace_util_0.Count(_tables_00000, 363)\n\t\tt = pt.GetPartition(pid)\n\t}\n\ttrace_util_0.Count(_tables_00000, 359)\n\ttxn, err := ctx.Txn(true)\n\tif err != nil {\n\t\ttrace_util_0.Count(_tables_00000, 365)\n\t\treturn err\n\t}\n\t// Check key exists.\n\ttrace_util_0.Count(_tables_00000, 360)\n\trecordKey := t.RecordKey(recordID)\n\te := kv.ErrKeyExists.FastGen(\"Duplicate entry '%d' for key 'PRIMARY'\", recordID)\n\ttxn.SetOption(kv.PresumeKeyNotExistsError, e)\n\tdefer txn.DelOption(kv.PresumeKeyNotExistsError)\n\t_, err = txn.Get(recordKey)\n\tif err == nil {\n\t\ttrace_util_0.Count(_tables_00000, 366)\n\t\treturn e\n\t} else {\n\t\ttrace_util_0.Count(_tables_00000, 367)\n\t\tif !kv.ErrNotExist.Equal(err) {\n\t\t\ttrace_util_0.Count(_tables_00000, 368)\n\t\t\treturn err\n\t\t}\n\t}\n\ttrace_util_0.Count(_tables_00000, 361)\n\treturn nil\n}",
"func (q vendorQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if vendors exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (pq *PersonQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := pq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn pq.sqlExist(ctx)\n}",
"func (d *dbBasePostgres) IndexExists(ctx context.Context, db dbQuerier, table string, name string) bool {\n\tquery := fmt.Sprintf(\"SELECT COUNT(*) FROM pg_indexes WHERE tablename = '%s' AND indexname = '%s'\", table, name)\n\trow := db.QueryRowContext(ctx, query)\n\tvar cnt int\n\trow.Scan(&cnt)\n\treturn cnt > 0\n}",
"func CheckTableExists(tableName string, config config.Database) (*bool, error) {\n\n\tdb, err := openConnection(config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer db.Close()\n\n\trow := db.QueryRow(sqlStatementTableExists, tableName)\n\n\tvar tableExists bool\n\terr = row.Scan(&tableExists)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &tableExists, nil\n}",
"func (r *Repository) CheckPageExists(pageID int) (bool, error) {\n pageExists := false\n psqlStmt := `\n SELECT EXISTS(\n SELECT 1 FROM pages\n WHERE id=$1)`\n err := r.DB.QueryRow(psqlStmt, pageID).Scan(&pageExists)\n if err != nil {\n return false, err\n }\n return pageExists, nil\n}",
"func (q itemQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if items exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q jobQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if jobs exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (rq *RemedyQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := rq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn rq.sqlExist(ctx)\n}",
"func (m *UserExtModel) Exists(ctx context.Context, builders ...query.SQLBuilder) (bool, error) {\n\tcount, err := m.Count(ctx, builders...)\n\treturn count > 0, err\n}",
"func (q premiumSlotQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if premium_slots exists\")\n\t}\n\n\treturn count > 0, nil\n}"
] |
[
"0.698887",
"0.645264",
"0.64361244",
"0.64140534",
"0.64003366",
"0.6386619",
"0.6377014",
"0.63616765",
"0.629816",
"0.6285483",
"0.6197286",
"0.6175277",
"0.61623526",
"0.61517435",
"0.6130619",
"0.6124559",
"0.61212856",
"0.6107427",
"0.61071604",
"0.6087894",
"0.6083879",
"0.60789627",
"0.6059407",
"0.6051932",
"0.60481584",
"0.6039395",
"0.6032387",
"0.60293734",
"0.60168123",
"0.6007603",
"0.600066",
"0.59997594",
"0.5998056",
"0.5996165",
"0.59894675",
"0.59818333",
"0.5962079",
"0.5961372",
"0.59603405",
"0.595647",
"0.59561855",
"0.5955414",
"0.5951849",
"0.5945576",
"0.594408",
"0.59425014",
"0.59411913",
"0.5938565",
"0.59304976",
"0.59223604",
"0.5915937",
"0.5912065",
"0.59109074",
"0.5909401",
"0.5902866",
"0.59012324",
"0.58983487",
"0.5897117",
"0.5896515",
"0.58956647",
"0.5895623",
"0.5890632",
"0.5890035",
"0.58869",
"0.5881204",
"0.5880076",
"0.5878242",
"0.5878123",
"0.5875924",
"0.5870748",
"0.58700675",
"0.5868183",
"0.5867224",
"0.5852193",
"0.5849172",
"0.58438736",
"0.5834882",
"0.58342767",
"0.58336127",
"0.583347",
"0.5833012",
"0.58325636",
"0.5828909",
"0.5825867",
"0.58164346",
"0.5812692",
"0.5811276",
"0.58059686",
"0.58046526",
"0.580364",
"0.57990795",
"0.5797995",
"0.5791064",
"0.57908577",
"0.5789691",
"0.578946",
"0.57869",
"0.578517",
"0.5784104",
"0.5783388",
"0.5778457"
] |
0.0
|
-1
|
Exists checks if the row exists in the table.
|
func (q assetRevisionQuery) Exists() (bool, error) {
var count int64
queries.SetCount(q.Query)
queries.SetLimit(q.Query, 1)
err := q.Query.QueryRow().Scan(&count)
if err != nil {
return false, errors.Wrap(err, "public: failed to check if asset_revision exists")
}
return count > 0, nil
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func RowExists(query string, args ...interface{}) bool {\n\tvar exists bool\n\tquery = fmt.Sprintf(\"SELECT exists (%s)\", query)\n\terr := Db.QueryRow(query, args...).Scan(&exists)\n\tif err != nil && err != sql.ErrNoRows {\n\t\tfmt.Errorf(\"error checking if row exists '%s' %v\", args, err)\n\t}\n\treturn exists\n}",
"func (s *DbRecorder) Exists() (bool, error) {\n\thas := false\n\twhereParts := s.WhereIds()\n\n\tq := s.builder.Select(\"COUNT(*) > 0\").From(s.table).Where(whereParts)\n\terr := q.QueryRow().Scan(&has)\n\n\treturn has, err\n}",
"func rowExist(user models.ClientUser) bool {\n query := \"Select exists(select 1 from user where username = '\" + user.Username + \"' AND password = '\" + user.Password + \"');\"\n var exist bool\n err := Db.QueryRow(query).Scan(&exist)\n if err != nil {\n fmt.Println(\"rowExist : \", err)\n return false\n }\n if exist {\n return true\n }else{\n return false\n }\n}",
"func (q cmfTurntableQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if cmf_turntable exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (db *AppDB) Exists(t time.Time) bool {\n\tif _, err := db.Result(t); err != nil {\n\t\treturn false\n\t}\n\n\treturn true\n}",
"func (tx *Tx) Exists(key string) (bool, error) {\n\tif tx.db == nil {\n\t\treturn false, ErrNoDatabase\n\t}\n\treturn tx.exists(tx.db.root(), key)\n}",
"func (q holdenAtQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if HoldenAt exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (i *Item) Exists() (bool, error) {\n\tif i.UUID == \"\" {\n\t\treturn false, nil\n\t}\n\tvar id string\n\treturn db.SelectExists(\n\t\t&id,\n\t\t\"SELECT uuid FROM items WHERE uuid=?\",\n\t\ti.UUID,\n\t)\n}",
"func (c *Conn) Exists(query string, args ...interface{}) (bool, error) {\n\ts, err := c.Prepare(query, args...)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tdefer s.Finalize()\n\tok, err := s.Next()\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tif s.ColumnCount() == 0 {\n\t\treturn false, s.specificError(\"don't use Exists with query that returns no data such as %q\", query)\n\t}\n\treturn ok, nil\n}",
"func (_ElvTradable *ElvTradableCaller) Exists(opts *bind.CallOpts, tokenId *big.Int) (bool, error) {\n\tvar out []interface{}\n\terr := _ElvTradable.contract.Call(opts, &out, \"exists\", tokenId)\n\n\tif err != nil {\n\t\treturn *new(bool), err\n\t}\n\n\tout0 := *abi.ConvertType(out[0], new(bool)).(*bool)\n\n\treturn out0, err\n\n}",
"func (q rentalRowerQuery) Exists(exec boil.Executor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow(exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if rental_rowers exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q weatherQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"db: failed to check if weather exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (l *levelDBRepo) Exists(tenantID, id []byte) bool {\n\tkey := getKey(tenantID, id)\n\tres, err := l.db.Has(key, nil)\n\t// TODO check this\n\tif err != nil {\n\t\treturn false\n\t}\n\n\treturn res\n}",
"func (c FileTableConnector) Exists(tablePath string) bool {\n\tif _, err := os.Stat(tablePath); os.IsNotExist(err) {\n\t\treturn false\n\t}\n\treturn true\n}",
"func (u *User) Exists(id int) bool {\n\treturn !db.Select(\"id\").First(u, id).RecordNotFound()\n}",
"func (i Item) Exists() bool {\n\tif i.UUID == \"\" {\n\t\treturn false\n\t}\n\tuuid, err := db.SelectFirst(\"SELECT `uuid` FROM `items` WHERE `uuid`=?\", i.UUID)\n\n\tif err != nil {\n\t\tLog(err)\n\t\treturn false\n\t}\n\tLog(\"Exists:\", uuid)\n\treturn uuid != \"\"\n}",
"func (q recipeLipidQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if recipe_lipid exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (m *UserModel) Exists(ctx context.Context, builders ...query.SQLBuilder) (bool, error) {\n\tcount, err := m.Count(ctx, builders...)\n\treturn count > 0, err\n}",
"func (fk ImmutableFK) Exists(conn sol.Conn) bool {\n\t// If the table is missing, the key must not exist\n\tif fk.Table == nil {\n\t\treturn false\n\t}\n\tvar id int64\n\tstmt := sol.Select(\n\t\tfk.Table.C(\"id\"),\n\t).Where(\n\t\tfk.Table.C(\"id\").Equals(fk.ID),\n\t).Limit(1)\n\tconn.Query(stmt, &id)\n\treturn id != 0\n}",
"func (q skinQuery) Exists() (bool, error) {\n\tvar count int64\n\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if skin exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q transactionQuery) Exists() (bool, error) {\n\tvar count int64\n\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"model: failed to check if transaction exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q usernameListingQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if username_listings exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (r *pgRepository) Exists(ctx context.Context, tenantID, id string) (bool, error) {\n\treturn r.existQuerier.Exists(ctx, resource.API, tenantID, repo.Conditions{repo.NewEqualCondition(\"id\", id)})\n}",
"func (q inventoryQuery) Exists() (bool, error) {\n\tvar count int64\n\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if inventory exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q utxoQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if utxo exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (hq *HarborQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := hq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn hq.sqlExist(ctx)\n}",
"func (q withdrawalCryptoQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"sqlite3: failed to check if withdrawal_crypto exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q boardQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"rdb: failed to check if boards exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (ss *redisStore) Exists(id string) bool {\n\t_, err := ss.rdb.Get(ctx, id).Result()\n\tif err != nil {\n\t\treturn false\n\t}\n\n\treturn true\n}",
"func (q transactionQuery) Exists() (bool, error) {\n\tvar count int64\n\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if transactions exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func CheckUserExists(username string, table string, session *r.Session) bool {\n\tvar u interface{}\n\tdb := os.Getenv(\"DB\")\n\t// userTable := os.Getenv(\"USERTABLE\")\n\tcur, _ := r.DB(db).Table(table).GetAllByIndex(\"username\", username).Run(session)\n\t_ = cur.One(&u)\n\tcur.Close()\n\t// fmt.Println(u)\n\tif u == nil {\n\t\t// fmt.Println(\"NO\")\n\t\treturn false\n\t}\n\t// fmt.Println(\"YES\")\n\treturn true\n}",
"func (q jetQuery) Exists() (bool, error) {\n\tvar count int64\n\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if jets exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q automodRuleDatumQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if automod_rule_data exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (h Hera) TableExists(tableName string) error {\n\ttheDML := \"SELECT exists (select 1 from information_schema.tables WHERE table_schema='public' AND table_name=\" + \"'\" + tableName + \"'\" + \")\"\n\n\tvar occurrences bool\n\tif errQ := h.DBConn.QueryRow(theDML).Scan(&occurrences); errQ != nil {\n\t\treturn errQ\n\t}\n\tif occurrences {\n\t\treturn nil\n\t}\n\treturn errors.New(\"table \" + tableName + \" does not exist in \" + h.DBName)\n}",
"func (q voteQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if vote exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q ticketQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if tickets exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func Exists(IDval int) (err error){\n\treturn\n}",
"func (rq *RentQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := rq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn rq.sqlExist(ctx)\n}",
"func (q chatQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"dal: failed to check if chat exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func Has(db *gorm.DB, model TableInterface, scopes ...func(*gorm.DB) *gorm.DB) (bool, error) {\n\tvar result int\n\tdbSession := db.Session(&gorm.Session{NewDB: true, DryRun: true})\n\tstmt := dbSession.Model(model).Select(model.PrimaryKey()).Scopes(scopes...).Find(model).Statement\n\tsql := db.Dialector.Explain(stmt.SQL.String(), stmt.Vars...)\n\trow := db.Raw(\"SELECT EXISTS(?)\", gorm.Expr(sql)).Row()\n\tif row == nil {\n\t\treturn false, nil\n\t}\n\n\tif err := row.Scan(&result); err != nil {\n\t\treturn false, err\n\t}\n\n\treturn result > 0, nil\n}",
"func (q docQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if doc exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (s *service) TableExists(ctx context.Context, request *TableExistsRequest) (bool, error) {\n\ttableRef, err := base.NewTableReference(request.Table)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\ttable, err := s.Table(ctx, tableRef)\n\tif base.IsNotFoundError(err) {\n\t\terr = nil\n\t}\n\treturn table != nil, err\n}",
"func CheckIfExistValue(column string, value string, table string) bool {\n\treturn RowExists(\"SELECT \"+column+\" FROM `\"+table+\"` WHERE \"+column+\"= ?\", value)\n}",
"func (rrq *ReserveRoomQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := rrq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn rrq.sqlExist(ctx)\n}",
"func StockExists(exec boil.Executor, stockID int) (bool, error) {\n\tvar exists bool\n\tsql := \"select exists(select 1 from `stock` where `stock_id`=? limit 1)\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, sql)\n\t\tfmt.Fprintln(boil.DebugWriter, stockID)\n\t}\n\n\trow := exec.QueryRow(sql, stockID)\n\n\terr := row.Scan(&exists)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: unable to check if stock exists\")\n\t}\n\n\treturn exists, nil\n}",
"func (q voteQuery) Exists() (bool, error) {\n\tvar count int64\n\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if vote exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (m *UserExtModel) Exists(ctx context.Context, builders ...query.SQLBuilder) (bool, error) {\n\tcount, err := m.Count(ctx, builders...)\n\treturn count > 0, err\n}",
"func (q taskQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if tasks exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q rowerGroupQuery) Exists(exec boil.Executor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow(exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if rower_group exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (siq *SubItemQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := siq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn siq.sqlExist(ctx)\n}",
"func (dbclient *CouchDatabase) Exists() (bool, error) {\n\t_, dbReturn, err := dbclient.GetDatabaseInfo()\n\tif dbReturn != nil && dbReturn.StatusCode == http.StatusNotFound {\n\t\treturn false, nil\n\t}\n\tif err != nil {\n\t\treturn false, err\n\t}\n\treturn true, nil\n}",
"func (ar AlbumDbRepository) Exists(id int) bool {\n\t_, err := ar.Get(id)\n\treturn err == nil\n}",
"func (roq *RestaurantOwnerQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := roq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn roq.sqlExist(ctx)\n}",
"func (q jobQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if jobs exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q premiumSlotQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if premium_slots exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (pq *PersonQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := pq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn pq.sqlExist(ctx)\n}",
"func (tx *Tx) Exists(key string) bool {\n\t_, err := tx.db.strStore.get(key)\n\tif err != nil {\n\t\tif err == ErrExpiredKey {\n\t\t\ttx.db.evict(key, String)\n\t\t}\n\t\treturn false\n\t}\n\n\treturn true\n}",
"func (q sourceQuery) Exists(exec boil.Executor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow(exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"mdbmodels: failed to check if sources exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (uq *UserQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := uq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn uq.sqlExist(ctx)\n}",
"func (q cmfUserExperienceLogQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if cmf_user_experience_log exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (database *Database) TableExists(name TableName) (yes bool, err error) {\n\twanted := name.String()\n\trows, err := database.db.QueryContext(context.Background(), showTables(database.dialect))\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tdefer rows.Close()\n\n\tfor rows.Next() {\n\t\tvar s string\n\t\trows.Scan(&s)\n\t\tif s == wanted {\n\t\t\treturn true, rows.Err()\n\t\t}\n\t}\n\treturn false, rows.Err()\n}",
"func (lir *LookupInResult) Exists(idx int) bool {\n\treturn lir.contents[idx].exists()\n}",
"func (q shelfQuery) Exists() (bool, error) {\n\tvar count int64\n\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if shelf exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q rawVisitQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if raw_visits exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q assetQuery) Exists() (bool, error) {\n\tvar count int64\n\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if asset exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q foreignLegalResourceQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if ForeignLegalResources exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q subscriberQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if subscribers exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q stockQuery) Exists() (bool, error) {\n\tvar count int64\n\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if stock exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q buildingQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"record: failed to check if buildings exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q itemQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if items exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q employeeQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if employee exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func Exists(c *db.Connection, tx *sql.Tx, selectStatement string) (bool, error) {\n\tif !stringutil.HasPrefixCaseless(selectStatement, \"select\") {\n\t\treturn false, fmt.Errorf(\"statement must be a `SELECT`\")\n\t}\n\treturn c.Invoke(db.OptTx(tx)).Query(selectStatement).Any()\n}",
"func (q illnessQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if illness exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q blockQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if block exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (ram *Ram) TableExists(tableName string) bool {\n\t_, ok := ram.tables[tableName]\n\n\treturn ok\n}",
"func (conn *dbconn) existsCheck(sql string) (exists bool, err error) {\n\tif len(sql) > 0 {\n\t\t// Execute the sql against the database\n\t\tif rows, err2 := conn.db.Query(sql); err2 == nil && rows != nil {\n\n\t\t\tif err = rows.Err(); err == nil {\n\t\t\t\tdefer func() {\n\t\t\t\t\t_ = rows.Close()\n\t\t\t\t}()\n\n\t\t\t\tfor err == nil && rows.Next() {\n\t\t\t\t\terr = rows.Scan(&exists)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\terr = err2\n\t\t}\n\t} else {\n\t\terr = errors.New(\"empty SQL String\")\n\t}\n\n\treturn exists, err\n}",
"func (_ElvTradableLocal *ElvTradableLocalCaller) Exists(opts *bind.CallOpts, tokenId *big.Int) (bool, error) {\n\tvar out []interface{}\n\terr := _ElvTradableLocal.contract.Call(opts, &out, \"exists\", tokenId)\n\n\tif err != nil {\n\t\treturn *new(bool), err\n\t}\n\n\tout0 := *abi.ConvertType(out[0], new(bool)).(*bool)\n\n\treturn out0, err\n\n}",
"func (rq *ReceiptQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := rq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn rq.sqlExist(ctx)\n}",
"func (q stockCvtermQuery) Exists() (bool, error) {\n\tvar count int64\n\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"chado: failed to check if stock_cvterm exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (tttp *TriageTimeTableProvider) Exists() bool {\n\treturn tttp._exists\n}",
"func (vq *VehicleQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := vq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn vq.sqlExist(ctx)\n}",
"func (q vendorQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if vendors exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q failureQuery) Exists() (bool, error) {\n\tvar count int64\n\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if failure exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (biq *BankItemQuery) Exist(ctx context.Context) (bool, error) {\n\treturn biq.sqlExist(ctx)\n}",
"func (pq *ParticipantQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := pq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn pq.sqlExist(ctx)\n}",
"func (fdq *FurnitureDetailQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := fdq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn fdq.sqlExist(ctx)\n}",
"func (m *PasswordResetModel) Exists(ctx context.Context, builders ...query.SQLBuilder) (bool, error) {\n\tcount, err := m.Count(ctx, builders...)\n\treturn count > 0, err\n}",
"func (q activityLogQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"dbmodel: failed to check if activity_logs exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q offerQuery) Exists(exec boil.Executor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow(exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"stellarcore: failed to check if offers exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q rentalQuery) Exists() (bool, error) {\n\tvar count int64\n\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"sqlboiler: failed to check if rental exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (s *Database) Exists() bool {\n\t_, err := os.Stat(s.dbFile)\n\treturn err == nil\n}",
"func (q repositoryQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if repositories exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (q notificationQuery) Exists(exec boil.Executor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRow(exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if notification exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func (m *GormResourceRepository) CheckExists(ctx context.Context, id string) error {\n\tdefer goa.MeasureSince([]string{\"goa\", \"db\", \"resource\", \"exists\"}, time.Now())\n\treturn base.CheckExistsWithCustomIDColumn(ctx, m.db, m.TableName(), \"resource_id\", id)\n}",
"func (urq *UserRoleQuery) Exist(ctx context.Context) (bool, error) {\n\tif err := urq.prepareQuery(ctx); err != nil {\n\t\treturn false, err\n\t}\n\treturn urq.sqlExist(ctx)\n}",
"func (c *Cdb) Exists(key []byte) (bool, error) {\n\terr := c.Iterate(key).next()\n\tif err == io.EOF {\n\t\treturn false, nil\n\t}\n\tif err != nil {\n\t\treturn false, err\n\t}\n\treturn true, nil\n}",
"func (sq *ShopQuery) Exist(ctx context.Context) (bool, error) {\n\treturn sq.sqlExist(ctx)\n}",
"func (q kvstoreQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if kvstore exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func TransactionExists(exec boil.Executor, transactionID int) (bool, error) {\n\tvar exists bool\n\tsql := \"select exists(select 1 from `transactions` where `transaction_id`=? limit 1)\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, sql)\n\t\tfmt.Fprintln(boil.DebugWriter, transactionID)\n\t}\n\n\trow := exec.QueryRow(sql, transactionID)\n\n\terr := row.Scan(&exists)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: unable to check if transactions exists\")\n\t}\n\n\treturn exists, nil\n}",
"func (q nodeQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Query.QueryRowContext(ctx, exec).Scan(&count)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"models: failed to check if node exists\")\n\t}\n\n\treturn count > 0, nil\n}",
"func TableExists(db *sql.DB, dbName string, tableName string) (bool, error) {\n\tfindTableSQL := fmt.Sprintf(sqlTableExistsQuery, dbName, tableName)\n\tvar tableFound string\n\terr := crdb.Execute(func() error {\n\t\treturn db.QueryRow(findTableSQL).Scan(&tableFound)\n\t})\n\tswitch err {\n\tcase sql.ErrNoRows:\n\t\treturn false, nil\n\tcase nil:\n\t\treturn true, nil\n\tdefault:\n\t\treturn false, err\n\t}\n}"
] |
[
"0.7409912",
"0.6826205",
"0.67944205",
"0.67657655",
"0.6759291",
"0.6736094",
"0.665952",
"0.66385305",
"0.663413",
"0.6583216",
"0.65640813",
"0.6557184",
"0.6553016",
"0.65516853",
"0.6545234",
"0.65320134",
"0.6521828",
"0.6518068",
"0.65160733",
"0.6504611",
"0.64859456",
"0.64800763",
"0.64632976",
"0.64425284",
"0.64320934",
"0.64250594",
"0.64160043",
"0.6398497",
"0.63983953",
"0.63951874",
"0.6389606",
"0.6382295",
"0.63792074",
"0.63782936",
"0.6378154",
"0.6370068",
"0.63653487",
"0.6364369",
"0.63637733",
"0.6363744",
"0.6333597",
"0.63307697",
"0.63290304",
"0.63247436",
"0.63219327",
"0.6315829",
"0.6315306",
"0.63140345",
"0.6313029",
"0.6312052",
"0.631058",
"0.6309807",
"0.63044024",
"0.63008684",
"0.6295304",
"0.62950873",
"0.62919885",
"0.62901694",
"0.6281211",
"0.6280569",
"0.6280415",
"0.62799406",
"0.6279711",
"0.62789756",
"0.62747437",
"0.62510574",
"0.6244848",
"0.62435603",
"0.6240787",
"0.6234648",
"0.62283206",
"0.6225115",
"0.62247545",
"0.62238145",
"0.6221837",
"0.62214917",
"0.62200207",
"0.62105674",
"0.6209308",
"0.6207679",
"0.62074006",
"0.62039185",
"0.6197592",
"0.61966807",
"0.619562",
"0.61949533",
"0.61887884",
"0.61863637",
"0.6184803",
"0.618389",
"0.6183547",
"0.61830604",
"0.6173561",
"0.6173195",
"0.6171576",
"0.616986",
"0.61695856",
"0.61654097",
"0.61630404",
"0.61501974",
"0.6148687"
] |
0.0
|
-1
|
AssetG pointed to by the foreign key.
|
func (o *AssetRevision) AssetG(mods ...qm.QueryMod) assetQuery {
return o.AssetByFk(boil.GetDB(), mods...)
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (o *AssetRevision) SetAssetG(insert bool, related *Asset) error {\n\treturn o.SetAsset(boil.GetDB(), insert, related)\n}",
"func (o *AssetRevision) SetAssetGP(insert bool, related *Asset) {\n\tif err := o.SetAsset(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) AssetByFk(exec boil.Executor, mods ...qm.QueryMod) assetQuery {\n\tqueryMods := []qm.QueryMod{\n\t\tqm.Where(\"id=?\", o.Asset),\n\t}\n\n\tqueryMods = append(queryMods, mods...)\n\n\tquery := Assets(exec, queryMods...)\n\tqueries.SetFrom(query.Query, \"\\\"asset\\\"\")\n\n\treturn query\n}",
"func (_m *gqlAssetConverter) ToGQL(in *v1beta1.Asset) (*gqlschema.Asset, error) {\n\tvar r0 *gqlschema.Asset\n\tvar r1 error\n\tr1 = _m.err\n\n\treturn r0, r1\n}",
"func (q assetQuery) One() (*Asset, error) {\n\to := &Asset{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for asset\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (model *GrogModel) GetAsset(name string) (*Asset, error) {\n\tvar foundAsset *Asset\n\tvar mimeType string\n\tvar content = make([]byte, 0)\n\tvar serveExternal int64\n\tvar rendered int64\n\tvar added int64\n\tvar modified int64\n\tvar err error\n\n\trow := model.db.DB.QueryRow(`select mimeType, content, serve_external, rendered,\n\t\tadded, modified from Assets where name = ?`, name)\n\tif row.Scan(&mimeType, &content, &serveExternal, &rendered, &added, &modified) != sql.ErrNoRows {\n\t\tfoundAsset = model.NewAsset(name, mimeType)\n\t\tfoundAsset.Content = content\n\t\tif serveExternal == 1 {\n\t\t\tfoundAsset.ServeExternal = true\n\t\t} else {\n\t\t\tfoundAsset.ServeExternal = false\n\t\t}\n\n\t\tif rendered == 1 {\n\t\t\tfoundAsset.Rendered = true\n\t\t} else {\n\t\t\tfoundAsset.Rendered = false\n\t\t}\n\n\t\tfoundAsset.Added.Set(time.Unix(added, 0))\n\t\tfoundAsset.Modified.Set(time.Unix(modified, 0))\n\t} else {\n\t\terr = fmt.Errorf(\"No asset with name %s\", name)\n\t}\n\n\treturn foundAsset, err\n}",
"func (ec *executionContext) _Asset(ctx context.Context, sel ast.SelectionSet, obj *models.Asset) graphql.Marshaler {\n\tfields := graphql.CollectFields(ctx, sel, assetImplementors)\n\n\tout := graphql.NewOrderedMap(len(fields))\n\tinvalid := false\n\tfor i, field := range fields {\n\t\tout.Keys[i] = field.Alias\n\n\t\tswitch field.Name {\n\t\tcase \"__typename\":\n\t\t\tout.Values[i] = graphql.MarshalString(\"Asset\")\n\t\tcase \"Id\":\n\t\t\tout.Values[i] = ec._Asset_Id(ctx, field, obj)\n\t\tcase \"Name\":\n\t\t\tout.Values[i] = ec._Asset_Name(ctx, field, obj)\n\t\tdefault:\n\t\t\tpanic(\"unknown field \" + strconv.Quote(field.Name))\n\t\t}\n\t}\n\n\tif invalid {\n\t\treturn graphql.Null\n\t}\n\treturn out\n}",
"func FindAssetRevisionGP(orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(boil.GetDB(), orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (o *AssetRevision) OrigByFk(exec boil.Executor, mods ...qm.QueryMod) assetQuery {\n\tqueryMods := []qm.QueryMod{\n\t\tqm.Where(\"id=?\", o.Orig),\n\t}\n\n\tqueryMods = append(queryMods, mods...)\n\n\tquery := Assets(exec, queryMods...)\n\tqueries.SetFrom(query.Query, \"\\\"asset\\\"\")\n\n\treturn query\n}",
"func FindAssetRevisionG(orig int, selectCols ...string) (*AssetRevision, error) {\n\treturn FindAssetRevision(boil.GetDB(), orig, selectCols...)\n}",
"func (object Asset) Id() string {\n\treturn object.ID.Hex()\n}",
"func (c *Collection) Get(name string) *Asset {\n\treturn c.assets[name]\n}",
"func (c *Collection) Get(name string) *Asset {\n\treturn c.assets[name]\n}",
"func (c *PlatformGraphQLClient) FetchAsset(ctx context.Context, assetID string) (*Asset, error) {\n\treq := graphql.NewRequest(`\n\t\tquery (\n\t\t\t$assetId: ID!\n\t\t) {\n\t\t\tasset(id: $assetId) {\n\t\t\t\tid\n\t\t\t\tcontainer {\n\t\t\t\t\tid\n\t\t\t\t}\n\t\t\t\tsourceData {\n\t\t\t\t\ttaskId\n\t\t\t\t\tengine {\n\t\t\t\t\t\tname\n\t\t\t\t\t\tid\n\t\t\t\t\t\tdeployedVersion\n\t\t\t\t\t\tcategoryId\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttransform(transformFunction: JSON)\n\t\t\t}\n\t\t}\n\t`)\n\n\treq.Var(\"assetId\", assetID)\n\n\tvar resp struct {\n\t\tResult *Asset `json:\"asset\"`\n\t}\n\n\treturn resp.Result, c.Run(ctx, req, &resp)\n}",
"func (o *AssetRevision) SetAsset(exec boil.Executor, insert bool, related *Asset) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"asset_revision\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"asset\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, assetRevisionPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.Orig}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.Asset = related.ID\n\n\tif o.R == nil {\n\t\to.R = &assetRevisionR{\n\t\t\tAsset: related,\n\t\t}\n\t} else {\n\t\to.R.Asset = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &assetR{\n\t\t\tAssetRevisions: AssetRevisionSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.AssetRevisions = append(related.R.AssetRevisions, o)\n\t}\n\n\treturn nil\n}",
"func (c *GeometryCollection) Geometry(idx int) Geometry { return c.geoms[idx] }",
"func (assetRevisionL) LoadAsset(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Asset\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Asset\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Asset = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Asset == foreign.ID {\n\t\t\t\tlocal.R.Asset = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (object Asset) ImportSource() *ImportSource {\n\treturn object.Source\n}",
"func (r ManagedResource) id() ReferenceID { return r.ID }",
"func getAssetByName(assetName string){\n\n}",
"func (obj *BlobAttribute) GetOwner() types.TGEntity {\n\treturn obj.getOwner()\n}",
"func (o *AssetRevision) OrigG(mods ...qm.QueryMod) assetQuery {\n\treturn o.OrigByFk(boil.GetDB(), mods...)\n}",
"func (o *AssetRevision) DeleteG() error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision provided for deletion\")\n\t}\n\n\treturn o.Delete(boil.GetDB())\n}",
"func get_asset(stub shim.ChaincodeStubInterface, id string) (Asset, error) {\n\tvar asset Asset\n\tassetAsBytes, err := stub.GetState(id) //getState retreives a key/value from the ledger\n\tif err != nil { //this seems to always succeed, even if key didn't exist\n\t\treturn asset, errors.New(\"Failed to find asset - \" + id)\n\t}\n\tjson.Unmarshal(assetAsBytes, &asset) //un stringify it aka JSON.parse()\n\n\tif asset.Id != id { //test if product is actually here or just nil\n\t\treturn asset, errors.New(\"Asset does not exist - \" + id)\n\t}\n\n\treturn asset, nil\n}",
"func (o *AssetRevision) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func (self *Graphics) RenderOrderID() int{\n return self.Object.Get(\"renderOrderID\").Int()\n}",
"func (m *ItemFacet) GetSource()(PersonDataSourcesable) {\n val, err := m.GetBackingStore().Get(\"source\")\n if err != nil {\n panic(err)\n }\n if val != nil {\n return val.(PersonDataSourcesable)\n }\n return nil\n}",
"func (s BaseboardInformationStructure) AssetTag() string {\n\treturn get(s.Structure, 4)\n}",
"func (a Asset) Path() string {\n\treturn a.path\n}",
"func AssetFromInt(val *big.Int) *Asset {\n\tasset := val.Bytes()\n\tpaddingLength := common.AssetLength - len(asset)\n\tif paddingLength > 0 {\n\t\tpadding := make([]byte, paddingLength)\n\t\tpadding = append(padding, asset[:]...)\n\t\tasset = padding\n\t}\n\tproperty := binary.BigEndian.Uint32(asset[:4])\n\tid := binary.BigEndian.Uint64(asset[4:])\n\treturn &Asset{\n\t\tProperty: property,\n\t\tId: id,\n\t}\n}",
"func (*AdGroupAsset) Descriptor() ([]byte, []int) {\n\treturn file_google_ads_googleads_v14_resources_ad_group_asset_proto_rawDescGZIP(), []int{0}\n}",
"func getAssetByID(id int) (*Asset, error) {\n\tpath := fmt.Sprintf(\"asset/%d\", id)\n\tresp, err := get(path, nil)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Failed TCMD request\")\n\t}\n\n\tvar result Asset\n\terr = json.Unmarshal(resp, &result)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Failed to unmarshal TCMD response\")\n\t}\n\treturn &result, nil\n}",
"func (self *Graphics) Game() *Game{\n return &Game{self.Object.Get(\"game\")}\n}",
"func (q assetQuery) OneP() *Asset {\n\to, err := q.One()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (self *Events) Parent() *Sprite{\n return &Sprite{self.Object.Get(\"parent\")}\n}",
"func (a *file_asset) Name() string {\n\treturn a.name\n}",
"func assetID(t int, name string) aid { return aid(t) + aid(stringHash(name))<<32 }",
"func (o *AssetRevision) SetOrigG(insert bool, related *Asset) error {\n\treturn o.SetOrig(boil.GetDB(), insert, related)\n}",
"func (a *assets) GetAssetByte(requested string) ([]byte, error) {\n\tfor _, x := range a.a {\n\t\tb, err := x.Asset(requested)\n\t\tif err == nil {\n\t\t\treturn b, nil\n\t\t}\n\t}\n\treturn nil, assetUnavailable(requested)\n}",
"func (assetRevisionL) LoadOrig(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Orig\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Orig\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Orig = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Orig == foreign.ID {\n\t\t\t\tlocal.R.Orig = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (s *SmartContract) TransferAsset(ctx contractapi.TransactionContextInterface, id string, newOwner string) error {\n\n\tasset, err := s.ReadAsset(ctx, id)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tclientID, err := s.GetSubmittingClientIdentity(ctx)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif clientID != asset.Owner {\n\t\treturn fmt.Errorf(\"submitting client not authorized to update asset, does not own asset\")\n\t}\n\n\tasset.Owner = newOwner\n\tassetJSON, err := json.Marshal(asset)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn ctx.GetStub().PutState(id, assetJSON)\n}",
"func (model *GrogModel) AssetExists(assetName string) bool {\n\tdoesExist := false\n\n\trow := model.db.DB.QueryRow(\"select count(1) from Assets where name = ?\", assetName)\n\tvar count int\n\trow.Scan(&count)\n\tif count > 0 {\n\t\tdoesExist = true\n\t}\n\n\treturn doesExist\n}",
"func (d *ImageDoc) GetID() string { return d.ID }",
"func (self *TileSprite) Texture() *Texture{\n return &Texture{self.Object.Get(\"texture\")}\n}",
"func (geom Geometry) Geometry(index int) Geometry {\n\tnewGeom := C.OGR_G_GetGeometryRef(geom.cval, C.int(index))\n\treturn Geometry{newGeom}\n}",
"func (*AssetKey) Descriptor() ([]byte, []int) {\n\treturn file_chain_proto_rawDescGZIP(), []int{1}\n}",
"func (g *Graph) Reference(objectID ObjectID, name string) (Reference, error) {\n\tvar obj, err = g.ObjectAdapter.ReadObject(objectID[:])\n\tif err != nil {\n\t\treturn Reference{}, err\n\t}\n\n\tvar ref = Reference{\n\t\tName: name,\n\t\tTargetID: obj.ID}\n\n\terr = g.ReferenceAdapter.WriteReference(ref)\n\tif err != nil {\n\t\treturn ref, err\n\t}\n\n\treturn ref, nil\n}",
"func (a *file_asset) commit() error {\n\t// Close the file\n\terr := a.f.Close()\n\tif err != nil {\n\t\treturn err\n\t}\n\tid := a.id\n\tif a.en != nil {\n\t\tid = a.en.ID()\n\t}\n\n\tif id == nil {\n\t\treturn noIdError(string(a.key))\n\t}\n\n\t// Compute ID\n\ta.id = id\n\t// Move identified file to it's storage location (if not already present)\n\terr = a.st.move(a.f.Name(), a.id)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn a.st.set(a.key, a.id)\n}",
"func (a *ApiV2) GetAsset(id string) (asset Asset, err error) {\n\tvar resp AssetResponse\n\tif !common.ValidUUID(id) {\n\t\treturn asset, common.NewError(\"asset id '%s' is invalid\", id)\n\t}\n\tuuid := common.ConvertToUUIDFormat(id)\n\turl := a.getBaseUrl() + \"/assets/\" + uuid\n\treq, err := a.makeRequest(\"GET\", url, nil)\n\tif err != nil {\n\t\treturn asset, err\n\t}\n\terr = handleReq(a, req, &resp)\n\tif err != nil {\n\t\treturn asset, err\n\t}\n\tasset = *resp.Asset\n\t// now get the video\n\tvideo, err := a.GetVideo(asset.VideoId)\n\tif err != nil {\n\t\treturn asset, err\n\t}\n\tasset.Video = video\n\tasset.Api = *a\n\treturn asset, nil\n}",
"func (*Asset) Descriptor() ([]byte, []int) {\n\treturn file_bastion_proto_rawDescGZIP(), []int{17}\n}",
"func AssetsG(mods ...qm.QueryMod) assetQuery {\n\treturn Assets(boil.GetDB(), mods...)\n}",
"func (o *Asset) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (s storageImageSource) Reference() types.ImageReference {\n\treturn s.imageRef\n}",
"func (container *SqlDatabaseContainer) Owner() *genruntime.ResourceReference {\n\tgroup, kind := genruntime.LookupOwnerGroupKind(container.Spec)\n\treturn &genruntime.ResourceReference{\n\t\tGroup: group,\n\t\tKind: kind,\n\t\tName: container.Spec.Owner.Name,\n\t}\n}",
"func (self *GameObjectCreator) Image(x int, y int, key interface{}) *Image{\n return &Image{self.Object.Call(\"image\", x, y, key)}\n}",
"func SetAsset(amount float64, symbol string) *types.Asset {\n\treturn &types.Asset{Amount: amount, Symbol: symbol}\n}",
"func getAsset(jmap1, jmap2 map[string]interface{}) (assetId string, amount, fee int64, err error) {\n\tcoinType := getStringField(jmap2, \"coinType\")\n\n\tiasset := jmap2[\"asset\"]\n\tiassets := jmap1[\"assets\"]\n\tif iasset == nil {\n\t\tif iassets == nil {\n\t\t\terr = fmt.Errorf(\"not found asset in dataJson\")\n\t\t\treturn\n\t\t}\n\t\tassets := iassets.(map[string]interface{})\n\t\tiasset = assets[coinType]\n\t}\n\tasset := iasset.(map[string]interface{})\n\t//iprecision, ok := asset[fieldPrecision]\n\t//if !ok {\n\t//\terr = fmt.Errorf(\"no found precission in asset\")\n\t//\treturn\n\t//}\n\tprecision := getPrecision(asset) // int64(iprecision.(float64))\n\n\tamount, err = getInt64(jmap2, fieldTranAmt, precision)\n\tif err != nil {\n\t\treturn\n\t}\n\tassetId = asset[\"assetId\"].(string)\n\tfee, err = getInt64(jmap1, fieldTranFee, xwcPrecision)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn\n}",
"func (model *GrogModel) NewAsset(name string, mimeType string) *Asset {\n\n\tnewAsset := new(Asset)\n\tnewAsset.Name = name\n\tnewAsset.MimeType = mimeType\n\tnewAsset.model = model\n\n\treturn newAsset\n}",
"func (o *AssetRevision) UpsertG(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error {\n\treturn o.Upsert(boil.GetDB(), updateOnConflict, conflictColumns, updateColumns, whitelist...)\n}",
"func (o *FeatureRelationship) ObjectG(mods ...qm.QueryMod) featureQuery {\n\treturn o.Object(boil.GetDB(), mods...)\n}",
"func (s storageImageDestination) Reference() types.ImageReference {\n\treturn s.imageRef\n}",
"func AssetRevisionExistsGP(orig int) bool {\n\te, err := AssetRevisionExists(boil.GetDB(), orig)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn e\n}",
"func AssetRevisionExistsG(orig int) (bool, error) {\n\treturn AssetRevisionExists(boil.GetDB(), orig)\n}",
"func (c *CreateRedfishResource) AggregateID() eh.UUID { return c.ID }",
"func Meta(asset_path string, target interface{}) error {\n pil := find(asset_path)\n if pil == nil { return os.ErrNotExist }\n return pil.asset.Meta(target)\n}",
"func Asset(name string) ([]byte, error) {\n\tif f, ok := _bindata[name]; ok {\n\t\treturn f()\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tif f, ok := _bindata[name]; ok {\n\t\treturn f()\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tif f, ok := _bindata[name]; ok {\n\t\treturn f()\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tif f, ok := _bindata[name]; ok {\n\t\treturn f()\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tif f, ok := _bindata[name]; ok {\n\t\treturn f()\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func (s Refable) Entity() Entity {\n\treturn ReferenceKind\n}",
"func (*Asset) Descriptor() ([]byte, []int) {\n\treturn file_chain_proto_rawDescGZIP(), []int{2}\n}",
"func (a Asset) source() string {\n\tsource := fileNameWithoutExt(a.PublicID)\n\n\tif !isURL(source) {\n\t\tvar err error\n\t\tsource, err = url.QueryUnescape(strings.Replace(source, \"%20\", \"+\", -1))\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}\n\n\tsource = smartEscape(source)\n\n\tif a.Suffix != \"\" {\n\t\tsource += fmt.Sprintf(\"/%s\", a.Suffix)\n\t}\n\n\tif filepath.Ext(a.PublicID) != \"\" {\n\t\tsource += filepath.Ext(a.PublicID)\n\t}\n\n\treturn source\n}",
"func (self *Graphics) SetGameA(member *Game) {\n self.Object.Set(\"game\", member)\n}",
"func transferassetGet(L *lua.LState) int {\n\tp := checkTransferAsset(L, 1)\n\tfmt.Println(p)\n\n\treturn 0\n}",
"func (fieldType *AdaReferentialType) ForeignKeyName() string {\n\treturn fieldType.keys[1]\n}",
"func (database *SqlDatabase) Owner() *genruntime.ResourceReference {\n\tgroup, kind := genruntime.LookupOwnerGroupKind(database.Spec)\n\treturn &genruntime.ResourceReference{\n\t\tGroup: group,\n\t\tKind: kind,\n\t\tName: database.Spec.Owner.Name,\n\t}\n}",
"func (k Keeper) GetJoinPoolAndStakeAsset(ctx sdk.Context, id uint64) types.JoinPoolAndStakeAsset {\n\tstore := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.JoinPoolAndStakeAssetKey))\n\tvar JoinPoolAndStakeAsset types.JoinPoolAndStakeAsset\n\tk.cdc.MustUnmarshalBinaryBare(store.Get(GetJoinPoolAndStakeAssetIDBytes(id)), &JoinPoolAndStakeAsset)\n\treturn JoinPoolAndStakeAsset\n}",
"func (geom Geometry) SpatialReference() SpatialReference {\n\tspatialRef := C.OGR_G_GetSpatialReference(geom.cval)\n\treturn SpatialReference{spatialRef}\n}",
"func (o *BraceletPhoto) SetBracelet(exec boil.Executor, insert bool, related *BraceletBracelet) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE `bracelet_photo` SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, []string{\"bracelet_id\"}),\n\t\tstrmangle.WhereClause(\"`\", \"`\", 0, braceletPhotoPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.BraceletID = related.ID\n\n\tif o.R == nil {\n\t\to.R = &braceletPhotoR{\n\t\t\tBracelet: related,\n\t\t}\n\t} else {\n\t\to.R.Bracelet = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &braceletBraceletR{\n\t\t\tBraceletBraceletPhotos: BraceletPhotoSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.BraceletBraceletPhotos = append(related.R.BraceletBraceletPhotos, o)\n\t}\n\n\treturn nil\n}",
"func (g *Graph) getVertex(k int) *Vertex {\n\tfor i, v := range g.vertices {\n\t\tif v.key == k {\n\t\t\treturn g.vertices[i]\n\t\t}\n\t}\n\treturn nil\n}",
"func (sc *ScreenlyClient) Get(id string) *Asset {\n\tasset := &Asset{}\n\tpath := fmt.Sprintf(\"assets/%s\", id)\n\tresponse, err := sc.doHttp(\"GET\", path, nil)\n\tif err == nil {\n\t\terr = json.NewDecoder(response.Body).Decode(asset)\n\t\tif err == nil {\n\t\t\treturn asset\n\t\t}\n\t}\n\tpanic(err)\n}",
"func gobKey(uid string) string {\n\treturn \"gob:\" + uid\n}",
"func (d *archiveImageDestination) Reference() types.ImageReference {\n\treturn d.ref\n}",
"func (a *Asset) GetID() string {\n\tif a == nil || a.ID == nil {\n\t\treturn \"\"\n\t}\n\treturn *a.ID\n}",
"func (g *Goal) Remove(ecs.BasicEntity) {\n\tg.Drawable.Close()\n}",
"func NewGqlAssetConverter(err error) *gqlAssetConverter {\n\treturn &gqlAssetConverter{err: err}\n}",
"func (o *AssetRevision) SetOrig(exec boil.Executor, insert bool, related *Asset) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"asset_revision\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"orig\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, assetRevisionPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.Orig}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.Orig = related.ID\n\n\tif o.R == nil {\n\t\to.R = &assetRevisionR{\n\t\t\tOrig: related,\n\t\t}\n\t} else {\n\t\to.R.Orig = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &assetR{\n\t\t\tOrigAssetRevision: o,\n\t\t}\n\t} else {\n\t\trelated.R.OrigAssetRevision = o\n\t}\n\n\treturn nil\n}",
"func (r *Finder) Storage(ref *base.Ref) (object interface{}, err error) {\n\tds := &Datastore{}\n\terr = r.ByRef(ds, *ref)\n\tif err == nil {\n\t\tref.ID = ds.ID\n\t\tref.Name = ds.Name\n\t\tobject = ds\n\t}\n\n\treturn\n}",
"func (self *Tween) Game() *Game{\n return &Game{self.Object.Get(\"game\")}\n}",
"func (a HassEntity) GetID() string { return a.ID }",
"func (img Image) GetItem() interface{} {\n\treturn img\n}",
"func (o *AssetRevision) SetOrigGP(insert bool, related *Asset) {\n\tif err := o.SetOrig(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (c *Canvas) Texture() *glhf.Texture {\n\treturn c.gf.Texture()\n}",
"func (q itemSideQuery) OneG(ctx context.Context) (*ItemSide, error) {\n\treturn q.One(ctx, boil.GetContextDB())\n}",
"func asOwner(key *v1alpha1.Key) metav1.OwnerReference {\n\tisController := true\n\tblockOwnerDeletion := true\n\treturn metav1.OwnerReference{\n\t\tAPIVersion: key.APIVersion,\n\t\tKind: key.Kind,\n\t\tName: key.Name,\n\t\tUID: key.UID,\n\t\tController: &isController,\n\t\tBlockOwnerDeletion: &blockOwnerDeletion,\n\t}\n}",
"func (self *Graphics) Key() interface{}{\n return self.Object.Get(\"key\")\n}",
"func (o *BraceletPhoto) SetBraceletG(insert bool, related *BraceletBracelet) error {\n\treturn o.SetBracelet(boil.GetDB(), insert, related)\n}",
"func (m *Drive) GetOwner()(IdentitySetable) {\n return m.owner\n}",
"func (q bookCategoryAssignQuery) OneG(ctx context.Context) (*BookCategoryAssign, error) {\n\treturn q.One(ctx, boil.GetContextDB())\n}"
] |
[
"0.57443696",
"0.517907",
"0.5159986",
"0.5030377",
"0.49887982",
"0.49371976",
"0.49253264",
"0.49085003",
"0.48996013",
"0.48863208",
"0.47805873",
"0.47442213",
"0.47442213",
"0.4731083",
"0.4712499",
"0.4669067",
"0.4664476",
"0.46344733",
"0.46296296",
"0.46116462",
"0.45965323",
"0.45926023",
"0.4577925",
"0.4536129",
"0.4500273",
"0.44743598",
"0.44646975",
"0.44287214",
"0.44271827",
"0.44194633",
"0.44089273",
"0.44071364",
"0.43987423",
"0.4391726",
"0.43883252",
"0.43281105",
"0.4322055",
"0.43176243",
"0.4314217",
"0.4297384",
"0.42862374",
"0.4285179",
"0.42798784",
"0.42789972",
"0.42685282",
"0.42568687",
"0.4251815",
"0.4235929",
"0.4234287",
"0.42329478",
"0.42293295",
"0.42262965",
"0.42229113",
"0.4214673",
"0.4210213",
"0.42050263",
"0.42048806",
"0.42009944",
"0.41921848",
"0.41883647",
"0.41845915",
"0.41816875",
"0.416622",
"0.41652635",
"0.41640183",
"0.41509217",
"0.41509217",
"0.41509217",
"0.41509217",
"0.41509217",
"0.41507503",
"0.41461676",
"0.41451347",
"0.41438627",
"0.41437197",
"0.414074",
"0.41382596",
"0.41287",
"0.41265953",
"0.41247573",
"0.41246903",
"0.412348",
"0.41228956",
"0.41173235",
"0.41159007",
"0.41139933",
"0.41136867",
"0.41132542",
"0.41080037",
"0.41042852",
"0.41040462",
"0.41015193",
"0.40995893",
"0.40902886",
"0.40877703",
"0.40809497",
"0.40780747",
"0.40770042",
"0.4076341",
"0.4075789"
] |
0.5860208
|
0
|
Asset pointed to by the foreign key.
|
func (o *AssetRevision) AssetByFk(exec boil.Executor, mods ...qm.QueryMod) assetQuery {
queryMods := []qm.QueryMod{
qm.Where("id=?", o.Asset),
}
queryMods = append(queryMods, mods...)
query := Assets(exec, queryMods...)
queries.SetFrom(query.Query, "\"asset\"")
return query
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (q assetQuery) One() (*Asset, error) {\n\to := &Asset{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: failed to execute a one query for asset\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (c *PlatformGraphQLClient) FetchAsset(ctx context.Context, assetID string) (*Asset, error) {\n\treq := graphql.NewRequest(`\n\t\tquery (\n\t\t\t$assetId: ID!\n\t\t) {\n\t\t\tasset(id: $assetId) {\n\t\t\t\tid\n\t\t\t\tcontainer {\n\t\t\t\t\tid\n\t\t\t\t}\n\t\t\t\tsourceData {\n\t\t\t\t\ttaskId\n\t\t\t\t\tengine {\n\t\t\t\t\t\tname\n\t\t\t\t\t\tid\n\t\t\t\t\t\tdeployedVersion\n\t\t\t\t\t\tcategoryId\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttransform(transformFunction: JSON)\n\t\t\t}\n\t\t}\n\t`)\n\n\treq.Var(\"assetId\", assetID)\n\n\tvar resp struct {\n\t\tResult *Asset `json:\"asset\"`\n\t}\n\n\treturn resp.Result, c.Run(ctx, req, &resp)\n}",
"func (o *AssetRevision) SetAsset(exec boil.Executor, insert bool, related *Asset) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"asset_revision\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"asset\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, assetRevisionPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.Orig}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.Asset = related.ID\n\n\tif o.R == nil {\n\t\to.R = &assetRevisionR{\n\t\t\tAsset: related,\n\t\t}\n\t} else {\n\t\to.R.Asset = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &assetR{\n\t\t\tAssetRevisions: AssetRevisionSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.AssetRevisions = append(related.R.AssetRevisions, o)\n\t}\n\n\treturn nil\n}",
"func (assetRevisionL) LoadAsset(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Asset\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Asset\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Asset = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Asset == foreign.ID {\n\t\t\t\tlocal.R.Asset = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (c *Collection) Get(name string) *Asset {\n\treturn c.assets[name]\n}",
"func (c *Collection) Get(name string) *Asset {\n\treturn c.assets[name]\n}",
"func (model *GrogModel) GetAsset(name string) (*Asset, error) {\n\tvar foundAsset *Asset\n\tvar mimeType string\n\tvar content = make([]byte, 0)\n\tvar serveExternal int64\n\tvar rendered int64\n\tvar added int64\n\tvar modified int64\n\tvar err error\n\n\trow := model.db.DB.QueryRow(`select mimeType, content, serve_external, rendered,\n\t\tadded, modified from Assets where name = ?`, name)\n\tif row.Scan(&mimeType, &content, &serveExternal, &rendered, &added, &modified) != sql.ErrNoRows {\n\t\tfoundAsset = model.NewAsset(name, mimeType)\n\t\tfoundAsset.Content = content\n\t\tif serveExternal == 1 {\n\t\t\tfoundAsset.ServeExternal = true\n\t\t} else {\n\t\t\tfoundAsset.ServeExternal = false\n\t\t}\n\n\t\tif rendered == 1 {\n\t\t\tfoundAsset.Rendered = true\n\t\t} else {\n\t\t\tfoundAsset.Rendered = false\n\t\t}\n\n\t\tfoundAsset.Added.Set(time.Unix(added, 0))\n\t\tfoundAsset.Modified.Set(time.Unix(modified, 0))\n\t} else {\n\t\terr = fmt.Errorf(\"No asset with name %s\", name)\n\t}\n\n\treturn foundAsset, err\n}",
"func Asset(name string) ([]byte, error) {\n\tif f, ok := _bindata[name]; ok {\n\t\treturn f()\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tif f, ok := _bindata[name]; ok {\n\t\treturn f()\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tif f, ok := _bindata[name]; ok {\n\t\treturn f()\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tif f, ok := _bindata[name]; ok {\n\t\treturn f()\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tif f, ok := _bindata[name]; ok {\n\t\treturn f()\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func getAssetByID(id int) (*Asset, error) {\n\tpath := fmt.Sprintf(\"asset/%d\", id)\n\tresp, err := get(path, nil)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Failed TCMD request\")\n\t}\n\n\tvar result Asset\n\terr = json.Unmarshal(resp, &result)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Failed to unmarshal TCMD response\")\n\t}\n\treturn &result, nil\n}",
"func (ec *executionContext) _Asset(ctx context.Context, sel ast.SelectionSet, obj *models.Asset) graphql.Marshaler {\n\tfields := graphql.CollectFields(ctx, sel, assetImplementors)\n\n\tout := graphql.NewOrderedMap(len(fields))\n\tinvalid := false\n\tfor i, field := range fields {\n\t\tout.Keys[i] = field.Alias\n\n\t\tswitch field.Name {\n\t\tcase \"__typename\":\n\t\t\tout.Values[i] = graphql.MarshalString(\"Asset\")\n\t\tcase \"Id\":\n\t\t\tout.Values[i] = ec._Asset_Id(ctx, field, obj)\n\t\tcase \"Name\":\n\t\t\tout.Values[i] = ec._Asset_Name(ctx, field, obj)\n\t\tdefault:\n\t\t\tpanic(\"unknown field \" + strconv.Quote(field.Name))\n\t\t}\n\t}\n\n\tif invalid {\n\t\treturn graphql.Null\n\t}\n\treturn out\n}",
"func get_asset(stub shim.ChaincodeStubInterface, id string) (Asset, error) {\n\tvar asset Asset\n\tassetAsBytes, err := stub.GetState(id) //getState retreives a key/value from the ledger\n\tif err != nil { //this seems to always succeed, even if key didn't exist\n\t\treturn asset, errors.New(\"Failed to find asset - \" + id)\n\t}\n\tjson.Unmarshal(assetAsBytes, &asset) //un stringify it aka JSON.parse()\n\n\tif asset.Id != id { //test if product is actually here or just nil\n\t\treturn asset, errors.New(\"Asset does not exist - \" + id)\n\t}\n\n\treturn asset, nil\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}"
] |
[
"0.5780024",
"0.56020594",
"0.55109453",
"0.5506834",
"0.541499",
"0.541499",
"0.5390801",
"0.53645164",
"0.53645164",
"0.53645164",
"0.53645164",
"0.53645164",
"0.5351719",
"0.53416663",
"0.53342307",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724",
"0.52938724"
] |
0.58332163
|
0
|
OrigG pointed to by the foreign key.
|
func (o *AssetRevision) OrigG(mods ...qm.QueryMod) assetQuery {
return o.OrigByFk(boil.GetDB(), mods...)
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (o *AssetRevision) SetOrigG(insert bool, related *Asset) error {\n\treturn o.SetOrig(boil.GetDB(), insert, related)\n}",
"func (o *AssetRevision) SetOrigGP(insert bool, related *Asset) {\n\tif err := o.SetOrig(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Source) SetParentG(insert bool, related *Source) error {\n\treturn o.SetParent(boil.GetDB(), insert, related)\n}",
"func (o *AssetRevision) OrigByFk(exec boil.Executor, mods ...qm.QueryMod) assetQuery {\n\tqueryMods := []qm.QueryMod{\n\t\tqm.Where(\"id=?\", o.Orig),\n\t}\n\n\tqueryMods = append(queryMods, mods...)\n\n\tquery := Assets(exec, queryMods...)\n\tqueries.SetFrom(query.Query, \"\\\"asset\\\"\")\n\n\treturn query\n}",
"func (o *AssetRevision) SetOrig(exec boil.Executor, insert bool, related *Asset) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"asset_revision\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"orig\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, assetRevisionPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.Orig}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.Orig = related.ID\n\n\tif o.R == nil {\n\t\to.R = &assetRevisionR{\n\t\t\tOrig: related,\n\t\t}\n\t} else {\n\t\to.R.Orig = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &assetR{\n\t\t\tOrigAssetRevision: o,\n\t\t}\n\t} else {\n\t\trelated.R.OrigAssetRevision = o\n\t}\n\n\treturn nil\n}",
"func (o *FeatureCvtermDbxref) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"chado: no FeatureCvtermDbxref provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func (o *FeatureCvtermDbxref) UpsertG(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error {\n\treturn o.Upsert(boil.GetDB(), updateOnConflict, conflictColumns, updateColumns, whitelist...)\n}",
"func (database *SqlDatabase) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: database.Spec.OriginalVersion(),\n\t\tKind: \"SqlDatabase\",\n\t}\n}",
"func (assignment *SqlRoleAssignment) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: assignment.Spec.OriginalVersion,\n\t\tKind: \"SqlRoleAssignment\",\n\t}\n}",
"func (o *FeatureRelationship) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"chado: no FeatureRelationship provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func (o *Source) ParentG(mods ...qm.QueryMod) sourceQuery {\n\treturn o.Parent(boil.GetDB(), mods...)\n}",
"func (container *SqlDatabaseContainer) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: container.Spec.OriginalVersion,\n\t\tKind: \"SqlDatabaseContainer\",\n\t}\n}",
"func (o *Source) SetParentGP(insert bool, related *Source) {\n\tif err := o.SetParent(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func CloneRefOfDropKey(n *DropKey) *DropKey {\n\tif n == nil {\n\t\treturn nil\n\t}\n\tout := *n\n\treturn &out\n}",
"func (function *SqlDatabaseContainerUserDefinedFunction) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: function.Spec.OriginalVersion,\n\t\tKind: \"SqlDatabaseContainerUserDefinedFunction\",\n\t}\n}",
"func (o *FeatureRelationship) UpsertG(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error {\n\treturn o.Upsert(boil.GetDB(), updateOnConflict, conflictColumns, updateColumns, whitelist...)\n}",
"func (arg *ForeignKeyArg) Clone() *ForeignKeyArg {\n\tif arg == nil {\n\t\treturn nil\n\t}\n\tother := *arg\n\treturn &other\n}",
"func (o *FeatureCvtermDbxref) UpdateG(whitelist ...string) error {\n\treturn o.Update(boil.GetDB(), whitelist...)\n}",
"func (s *BasePlSqlParserListener) EnterForeign_key_clause(ctx *Foreign_key_clauseContext) {}",
"func (pool *WorkspacesBigDataPool) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: pool.Spec.OriginalVersion,\n\t\tKind: \"WorkspacesBigDataPool\",\n\t}\n}",
"func (o *Source) SetParentSourcesG(insert bool, related ...*Source) error {\n\treturn o.SetParentSources(boil.GetDB(), insert, related...)\n}",
"func (o *Source) RemoveParentG(related *Source) error {\n\treturn o.RemoveParent(boil.GetDB(), related)\n}",
"func (ruleset *DnsForwardingRuleset) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: ruleset.Spec.OriginalVersion(),\n\t\tKind: \"DnsForwardingRuleset\",\n\t}\n}",
"func CloneRefOfForeignKeyDefinition(n *ForeignKeyDefinition) *ForeignKeyDefinition {\n\tif n == nil {\n\t\treturn nil\n\t}\n\tout := *n\n\tout.Source = CloneColumns(n.Source)\n\tout.ReferencedTable = CloneTableName(n.ReferencedTable)\n\tout.ReferencedColumns = CloneColumns(n.ReferencedColumns)\n\treturn &out\n}",
"func (o *FeatureCvtermDbxref) ReloadGP() {\n\tif err := o.ReloadG(); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (f OrigClOrdIDField) Tag() quickfix.Tag { return tag.OrigClOrdID }",
"func (topic *Topic) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: topic.Spec.OriginalVersion,\n\t\tKind: \"Topic\",\n\t}\n}",
"func (o *Source) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"mdbmdbmodels: no Source provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func (o *Author) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"mdbmdbmodels: no Author provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func evalOrig(v ID, ancestor, semi, label []ID) ID {\n\tif ancestor[v] == 0 {\n\t\treturn v\n\t}\n\tcompressOrig(v, ancestor, semi, label)\n\treturn label[v]\n}",
"func (peering *VirtualNetworksVirtualNetworkPeering) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: peering.Spec.OriginalVersion,\n\t\tKind: \"VirtualNetworksVirtualNetworkPeering\",\n\t}\n}",
"func (account *DatabaseAccount) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: account.Spec.OriginalVersion(),\n\t\tKind: \"DatabaseAccount\",\n\t}\n}",
"func (s Strategy) GetEntityForeignName(coralName string) string {\n\treturn s.Map.Entities[coralName].Foreign\n}",
"func (o *FeatureCvtermDbxref) DeleteG() error {\n\tif o == nil {\n\t\treturn errors.New(\"chado: no FeatureCvtermDbxref provided for deletion\")\n\t}\n\n\treturn o.Delete(boil.GetDB())\n}",
"func (setting *ServersAdvancedThreatProtectionSetting) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: setting.Spec.OriginalVersion,\n\t\tKind: \"ServersAdvancedThreatProtectionSetting\",\n\t}\n}",
"func (o *DMessageEmbed) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"models: no DMessageEmbed provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func (record *PrivateDnsZonesSRVRecord) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: record.Spec.OriginalVersion(),\n\t\tKind: \"PrivateDnsZonesSRVRecord\",\n\t}\n}",
"func (l *Loader) OriginalGraph() *dag.Graph {\n\tl.mut.RLock()\n\tdefer l.mut.RUnlock()\n\treturn l.originalGraph.Clone()\n}",
"func (f UnderlyingIDSourceField) Tag() quickfix.Tag { return tag.UnderlyingIDSource }",
"func (gd Grid) Copy(src Grid) Point {\n\tif gd.Ug == nil {\n\t\treturn Point{}\n\t}\n\tif gd.Ug != src.Ug {\n\t\tif src.Rg.Max.X-src.Rg.Min.X <= 4 {\n\t\t\treturn gd.cpv(src)\n\t\t}\n\t\treturn gd.cp(src)\n\t}\n\tif gd.Rg == src.Rg {\n\t\treturn gd.Rg.Size()\n\t}\n\tif !gd.Rg.Overlaps(src.Rg) || gd.Rg.Min.Y <= src.Rg.Min.Y {\n\t\treturn gd.cp(src)\n\t}\n\treturn gd.cprev(src)\n}",
"func (o *FeatureRelationship) ReloadGP() {\n\tif err := o.ReloadG(); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (subnet *VirtualNetworksSubnet) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: subnet.Spec.OriginalVersion,\n\t\tKind: \"VirtualNetworksSubnet\",\n\t}\n}",
"func (o *Source) UpsertG(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error {\n\treturn o.Upsert(boil.GetDB(), updateOnConflict, conflictColumns, updateColumns, whitelist...)\n}",
"func (o *Origin) SetOriginAPG(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AuditPackageGroup) error {\n\tquery := \"update \\\"audit_package_group\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginAPG {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginAPG = nil\n\t}\n\treturn o.AddOriginAPG(ctx, exec, insert, related...)\n}",
"func (o *FeatureCvtermDbxref) UpsertGP(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) {\n\tif err := o.Upsert(boil.GetDB(), updateOnConflict, conflictColumns, updateColumns, whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (scaleSet *VirtualMachineScaleSet) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: scaleSet.Spec.OriginalVersion,\n\t\tKind: \"VirtualMachineScaleSet\",\n\t}\n}",
"func (o *Origin) AddOriginAPG(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AuditPackageGroup) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"audit_package_group\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, auditPackageGroupPrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginAPG: related,\n\t\t}\n\t} else {\n\t\to.R.OriginAPG = append(o.R.OriginAPG, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &auditPackageGroupR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func (o *FeatureRelationship) UpdateG(whitelist ...string) error {\n\treturn o.Update(boil.GetDB(), whitelist...)\n}",
"func (site *Site) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: site.Spec.OriginalVersion,\n\t\tKind: \"Site\",\n\t}\n}",
"func (o *Author) SetSourcesG(insert bool, related ...*Source) error {\n\treturn o.SetSources(boil.GetDB(), insert, related...)\n}",
"func (service *StorageAccountsTableService) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: service.Spec.OriginalVersion,\n\t\tKind: \"StorageAccountsTableService\",\n\t}\n}",
"func (o *Address) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"sqlboiler: no Address provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func (o *Source) DeleteG() error {\n\tif o == nil {\n\t\treturn errors.New(\"mdbmdbmodels: no Source provided for deletion\")\n\t}\n\n\treturn o.Delete(boil.GetDB())\n}",
"func (service *PrivateLinkService) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: service.Spec.OriginalVersion,\n\t\tKind: \"PrivateLinkService\",\n\t}\n}",
"func (policy *ServersConnectionPolicy) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: policy.Spec.OriginalVersion(),\n\t\tKind: \"ServersConnectionPolicy\",\n\t}\n}",
"func (o *Picture) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"models: no Picture provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func (profile *Profile) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: profile.Spec.OriginalVersion,\n\t\tKind: \"Profile\",\n\t}\n}",
"func (machine *VirtualMachine) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: machine.Spec.OriginalVersion,\n\t\tKind: \"VirtualMachine\",\n\t}\n}",
"func (ns *Namespace) GetOriginalObject(gvk schema.GroupVersionKind, nm string) *unstructured.Unstructured {\n\treturn ns.originalObjects[gvk][nm]\n}",
"func (o *Transaction) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"model: no Transaction provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func (o *Organism) OrganismDbxrefG(mods ...qm.QueryMod) organismDbxrefQuery {\n\treturn o.OrganismDbxref(boil.GetDB(), mods...)\n}",
"func (server *FlexibleServer) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: server.Spec.OriginalVersion,\n\t\tKind: \"FlexibleServer\",\n\t}\n}",
"func (o *Transaction) ReloadGP() {\n\tif err := o.ReloadG(); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Transaction) ReloadGP() {\n\tif err := o.ReloadG(); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *RecordMeasure) SetIDG(insert bool, related *Record) error {\n\treturn o.SetID(boil.GetDB(), insert, related)\n}",
"func (credential *FederatedIdentityCredential) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: credential.Spec.OriginalVersion(),\n\t\tKind: \"FederatedIdentityCredential\",\n\t}\n}",
"func (rule *NamespacesTopicsSubscriptionsRule) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: rule.Spec.OriginalVersion(),\n\t\tKind: \"NamespacesTopicsSubscriptionsRule\",\n\t}\n}",
"func (t *Table) ForeignKey(idxName, rfcTbl, onCol string) *Table {\n\tkey := AlterTable + t.tblName + \" ADD CONSTRAINT \" + idxName + \" FOREIGN KEY (\" + t.columns[len(t.columns)-1].Name + \") REFERENCES \" + rfcTbl + \" (\" + onCol + \")\"\n\tt.columns[len(t.columns)-1].ForeignKey = &key\n\treturn t\n}",
"func (machine *VirtualMachine) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: machine.Spec.OriginalVersion(),\n\t\tKind: \"VirtualMachine\",\n\t}\n}",
"func (s SQLField) ForeignKey() string {\n\tif sqlTableNoS := s.goTag.Get(\"sql_foreign_key\"); sqlTableNoS != \"\" {\n\t\treturn sqlTableNoS + \"s\"\n\t}\n\tif !s.IsPrimary() && strings.HasPrefix(s.GoName, \"Id\") {\n\t\tgoTableName := strings.TrimPrefix(s.GoName, \"Id\")\n\t\treturn tableName(goTableName)\n\t}\n\treturn \"\"\n}",
"func (s *BasePlSqlParserListener) ExitForeign_key_clause(ctx *Foreign_key_clauseContext) {}",
"func (fieldType *AdaReferentialType) ForeignKeyName() string {\n\treturn fieldType.keys[1]\n}",
"func (network *VirtualNetwork) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: network.Spec.OriginalVersion,\n\t\tKind: \"VirtualNetwork\",\n\t}\n}",
"func (o *DMessageEmbed) ReloadGP() {\n\tif err := o.ReloadG(); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *ItemSide) UpdateG(ctx context.Context, columns boil.Columns) (int64, error) {\n\treturn o.Update(ctx, boil.GetContextDB(), columns)\n}",
"func (g *DenseGraph) Copy() EditableGraph {\n\tnewEdges := make([]byte, len(g.Edges))\n\tcopy(newEdges, g.Edges)\n\tnewDegrees := make([]int, len(g.DegreeSequence))\n\tcopy(newDegrees, g.DegreeSequence)\n\treturn &DenseGraph{NumberOfVertices: g.NumberOfVertices, NumberOfEdges: g.NumberOfEdges, DegreeSequence: newDegrees, Edges: newEdges}\n}",
"func (o *Transaction) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"models: no Transaction provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func (o *FeatureCvtermDbxref) DbxrefG(mods ...qm.QueryMod) dbxrefQuery {\n\treturn o.Dbxref(boil.GetDB(), mods...)\n}",
"func (setting *MongodbDatabaseCollectionThroughputSetting) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: setting.Spec.OriginalVersion(),\n\t\tKind: \"MongodbDatabaseCollectionThroughputSetting\",\n\t}\n}",
"func (o *Venda) GetRefGvm() int64 {\n\tif o == nil || o.RefGvm.Get() == nil {\n\t\tvar ret int64\n\t\treturn ret\n\t}\n\treturn *o.RefGvm.Get()\n}",
"func (o *Source) ParentSourcesG(mods ...qm.QueryMod) sourceQuery {\n\treturn o.ParentSources(boil.GetDB(), mods...)\n}",
"func (o *Comment) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"models: no Comment provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func (o *Source) SetParent(exec boil.Executor, insert bool, related *Source) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"sources\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"parent_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, sourcePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.ParentID.Int64 = related.ID\n\to.ParentID.Valid = true\n\n\tif o.R == nil {\n\t\to.R = &sourceR{\n\t\t\tParent: related,\n\t\t}\n\t} else {\n\t\to.R.Parent = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &sourceR{\n\t\t\tParentSources: SourceSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.ParentSources = append(related.R.ParentSources, o)\n\t}\n\n\treturn nil\n}",
"func (image *Image2D) SetG(x, y int, g uint8) {\n\tidx := image.getIdx(x, y)\n\timage.data[idx+1] = g\n}",
"func (o *DMessageEmbed) UpsertG(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error {\n\treturn o.Upsert(boil.GetDB(), updateOnConflict, conflictColumns, updateColumns, whitelist...)\n}",
"func (subscription *NamespacesTopicsSubscription) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: subscription.Spec.OriginalVersion(),\n\t\tKind: \"NamespacesTopicsSubscription\",\n\t}\n}",
"func (o *Author) UpsertG(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error {\n\treturn o.Upsert(boil.GetDB(), updateOnConflict, conflictColumns, updateColumns, whitelist...)\n}",
"func (o *FeatureCvtermDbxref) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (uu *UserUpdate) ClearBelongToOg() *UserUpdate {\n\tuu.mutation.ClearBelongToOg()\n\treturn uu\n}",
"func (o *ItemSide) ReloadG(ctx context.Context) error {\n\tif o == nil {\n\t\treturn errors.New(\"models: no ItemSide provided for reload\")\n\t}\n\n\treturn o.Reload(ctx, boil.GetContextDB())\n}",
"func (o *FeatureRelationship) ObjectG(mods ...qm.QueryMod) featureQuery {\n\treturn o.Object(boil.GetDB(), mods...)\n}",
"func (o *EventoDTO) GetRefGvm() int64 {\n\tif o == nil || o.RefGvm.Get() == nil {\n\t\tvar ret int64\n\t\treturn ret\n\t}\n\treturn *o.RefGvm.Get()\n}",
"func (store *ConfigurationStore) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: store.Spec.OriginalVersion(),\n\t\tKind: \"ConfigurationStore\",\n\t}\n}",
"func (ma *MixedcaseAddress) Original() string {\n\treturn ma.original\n}",
"func (image *Image) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: image.Spec.OriginalVersion,\n\t\tKind: \"Image\",\n\t}\n}",
"func (o *DMessageEmbed) SetMessageG(insert bool, related *DMessage) error {\n\treturn o.SetMessage(boil.GetDB(), insert, related)\n}",
"func (o *StockCvterm) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"chado: no StockCvterm provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func (c *ForeignKeyConstraint) Clone() *ForeignKeyConstraint {\n\tif c == nil {\n\t\treturn c\n\t}\n\tother := *c\n\tother.Name = c.Name.Clone()\n\tother.Columns = cloneIdents(c.Columns)\n\tother.ForeignTable = c.ForeignTable.Clone()\n\tother.ForeignColumns = cloneIdents(c.ForeignColumns)\n\tother.Args = cloneForeignKeyArgs(c.Args)\n\treturn &other\n}",
"func CloneRefOfDropView(n *DropView) *DropView {\n\tif n == nil {\n\t\treturn nil\n\t}\n\tout := *n\n\tout.FromTables = CloneTableNames(n.FromTables)\n\treturn &out\n}",
"func (o *Cvtermsynonym) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"chado: no Cvtermsynonym provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}"
] |
[
"0.61815727",
"0.57010865",
"0.548998",
"0.52407956",
"0.5197831",
"0.51586014",
"0.5108071",
"0.508267",
"0.5048871",
"0.50380695",
"0.5009867",
"0.4967885",
"0.49402383",
"0.49158967",
"0.49047852",
"0.48642552",
"0.4854648",
"0.4849011",
"0.48236752",
"0.48157814",
"0.48147738",
"0.48116392",
"0.47980404",
"0.4792101",
"0.47870946",
"0.47647506",
"0.4746746",
"0.4741888",
"0.4737038",
"0.473626",
"0.4726564",
"0.47136465",
"0.46984795",
"0.46924743",
"0.46867377",
"0.46845508",
"0.46770224",
"0.4665026",
"0.46638098",
"0.46522123",
"0.4650384",
"0.46470597",
"0.46439704",
"0.46428758",
"0.46058288",
"0.4598801",
"0.45942903",
"0.4587227",
"0.45870796",
"0.4579397",
"0.45717847",
"0.45675462",
"0.45652166",
"0.4561799",
"0.45559028",
"0.4551691",
"0.45504275",
"0.4546848",
"0.4546784",
"0.45425475",
"0.45418146",
"0.45281282",
"0.4522397",
"0.4522397",
"0.45213082",
"0.45142874",
"0.4512047",
"0.44978538",
"0.4489021",
"0.4486425",
"0.44837978",
"0.44741493",
"0.44739297",
"0.44731688",
"0.44719344",
"0.44710344",
"0.44553554",
"0.4452732",
"0.4451957",
"0.44464335",
"0.4446199",
"0.44344792",
"0.4432565",
"0.44314522",
"0.44238767",
"0.44227976",
"0.44175345",
"0.44172734",
"0.44144136",
"0.44133514",
"0.4410356",
"0.44039086",
"0.44005442",
"0.43975675",
"0.43969983",
"0.43951458",
"0.43909866",
"0.438892",
"0.43882725",
"0.43875992"
] |
0.6382412
|
0
|
Orig pointed to by the foreign key.
|
func (o *AssetRevision) OrigByFk(exec boil.Executor, mods ...qm.QueryMod) assetQuery {
queryMods := []qm.QueryMod{
qm.Where("id=?", o.Orig),
}
queryMods = append(queryMods, mods...)
query := Assets(exec, queryMods...)
queries.SetFrom(query.Query, "\"asset\"")
return query
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (o *AssetRevision) SetOrig(exec boil.Executor, insert bool, related *Asset) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"asset_revision\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"orig\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, assetRevisionPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.Orig}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.Orig = related.ID\n\n\tif o.R == nil {\n\t\to.R = &assetRevisionR{\n\t\t\tOrig: related,\n\t\t}\n\t} else {\n\t\to.R.Orig = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &assetR{\n\t\t\tOrigAssetRevision: o,\n\t\t}\n\t} else {\n\t\trelated.R.OrigAssetRevision = o\n\t}\n\n\treturn nil\n}",
"func (arg *ForeignKeyArg) Clone() *ForeignKeyArg {\n\tif arg == nil {\n\t\treturn nil\n\t}\n\tother := *arg\n\treturn &other\n}",
"func (t *Table) ForeignKey(idxName, rfcTbl, onCol string) *Table {\n\tkey := AlterTable + t.tblName + \" ADD CONSTRAINT \" + idxName + \" FOREIGN KEY (\" + t.columns[len(t.columns)-1].Name + \") REFERENCES \" + rfcTbl + \" (\" + onCol + \")\"\n\tt.columns[len(t.columns)-1].ForeignKey = &key\n\treturn t\n}",
"func CloneRefOfDropKey(n *DropKey) *DropKey {\n\tif n == nil {\n\t\treturn nil\n\t}\n\tout := *n\n\treturn &out\n}",
"func (o *Source) SetParent(exec boil.Executor, insert bool, related *Source) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"sources\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"parent_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, sourcePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.ParentID.Int64 = related.ID\n\to.ParentID.Valid = true\n\n\tif o.R == nil {\n\t\to.R = &sourceR{\n\t\t\tParent: related,\n\t\t}\n\t} else {\n\t\to.R.Parent = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &sourceR{\n\t\t\tParentSources: SourceSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.ParentSources = append(related.R.ParentSources, o)\n\t}\n\n\treturn nil\n}",
"func ForeignKey(name string, fk Selectable) FKElem {\n\tvar col Columnar\n\tif fk == nil {\n\t\tlog.Panic(\"sol: inline foreign key was given a nil Selectable\")\n\t}\n\tcolumns := fk.Columns()\n\tif len(columns) == 0 {\n\t\tlog.Panic(\n\t\t\t\"sol: inline foreign key Selectable must have at least one column\",\n\t\t)\n\t} else if len(columns) == 1 {\n\t\tcol = columns[0]\n\t\tif col.Table() == nil {\n\t\t\tlog.Panic(\n\t\t\t\t\"sol: inline foreign key columns must have their table assigned before creation\",\n\t\t\t)\n\t\t}\n\t} else {\n\t\t// Simply use the table of the first column\n\t\t// TODO This is a strange decision that will error silently\n\t\ttable := columns[0].Table()\n\t\tpk := table.PrimaryKey()\n\t\tif len(pk) != 1 {\n\t\t\tlog.Panic(\n\t\t\t\t\"sol: inline foreign key tables must have one and only one primary key column\",\n\t\t\t)\n\t\t}\n\t\tcol = table.C(pk[0])\n\t}\n\n\treturn FKElem{\n\t\tname: name,\n\t\tcol: col,\n\t\tdatatype: col.Type(),\n\t\treferences: col.Table(),\n\t}\n}",
"func (o *Source) SetParent(exec boil.Executor, insert bool, related *Source) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"sources\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"parent_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, sourcePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\tqueries.Assign(&o.ParentID, related.ID)\n\tif o.R == nil {\n\t\to.R = &sourceR{\n\t\t\tParent: related,\n\t\t}\n\t} else {\n\t\to.R.Parent = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &sourceR{\n\t\t\tParentSources: SourceSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.ParentSources = append(related.R.ParentSources, o)\n\t}\n\n\treturn nil\n}",
"func CloneRefOfForeignKeyDefinition(n *ForeignKeyDefinition) *ForeignKeyDefinition {\n\tif n == nil {\n\t\treturn nil\n\t}\n\tout := *n\n\tout.Source = CloneColumns(n.Source)\n\tout.ReferencedTable = CloneTableName(n.ReferencedTable)\n\tout.ReferencedColumns = CloneColumns(n.ReferencedColumns)\n\treturn &out\n}",
"func (c *ForeignKeyConstraint) Clone() *ForeignKeyConstraint {\n\tif c == nil {\n\t\treturn c\n\t}\n\tother := *c\n\tother.Name = c.Name.Clone()\n\tother.Columns = cloneIdents(c.Columns)\n\tother.ForeignTable = c.ForeignTable.Clone()\n\tother.ForeignColumns = cloneIdents(c.ForeignColumns)\n\tother.Args = cloneForeignKeyArgs(c.Args)\n\treturn &other\n}",
"func (fieldType *AdaReferentialType) ForeignKeyName() string {\n\treturn fieldType.keys[1]\n}",
"func (tc *Catalog) resolveFK(tab *Table, d *tree.ForeignKeyConstraintTableDef) {\n\tfromCols := make([]int, len(d.FromCols))\n\tfor i, c := range d.FromCols {\n\t\tfromCols[i] = tab.FindOrdinal(string(c))\n\t}\n\n\tvar targetTable *Table\n\tif d.Table.ObjectName == tab.Name() {\n\t\ttargetTable = tab\n\t} else {\n\t\ttargetTable = tc.Table(&d.Table)\n\t}\n\n\ttoCols := make([]int, len(d.ToCols))\n\tfor i, c := range d.ToCols {\n\t\ttoCols[i] = targetTable.FindOrdinal(string(c))\n\t}\n\n\tconstraintName := string(d.Name)\n\tif constraintName == \"\" {\n\t\tconstraintName = fmt.Sprintf(\n\t\t\t\"fk_%s_ref_%s\", string(d.FromCols[0]), targetTable.TabName.Table(),\n\t\t)\n\t}\n\n\t// Foreign keys require indexes in both tables:\n\t//\n\t// 1. In the target table, we need an index because adding a new row to the\n\t// source table requires looking up whether there is a matching value in\n\t// the target table. This index should already exist because a unique\n\t// constraint is required on the target table (it's a foreign *key*).\n\t//\n\t// 2. In the source table, we need an index because removing a row from the\n\t// target table requires looking up whether there would be orphan values\n\t// left in the source table. This index does not need to be unique; in\n\t// fact, if an existing index has the relevant columns as a prefix, that\n\t// is good enough.\n\n\t// indexMatches returns true if the key columns in the given index match the\n\t// given columns. If strict is false, it is acceptable if the given columns\n\t// are a prefix of the index key columns.\n\tindexMatches := func(idx *Index, cols []int, strict bool) bool {\n\t\tif idx.LaxKeyColumnCount() < len(cols) {\n\t\t\treturn false\n\t\t}\n\t\tif strict && idx.LaxKeyColumnCount() > len(cols) {\n\t\t\treturn false\n\t\t}\n\t\tfor i := range cols {\n\t\t\tif idx.Column(i).Ordinal() != cols[i] {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\tif _, isPartialIndex := idx.Predicate(); isPartialIndex {\n\t\t\treturn false\n\t\t}\n\t\treturn true\n\t}\n\n\t// uniqueConstraintMatches returns true if the key columns in the given unique\n\t// constraint match the given columns.\n\tuniqueConstraintMatches := func(uc *UniqueConstraint, cols []int) bool {\n\t\tif colCount := uc.ColumnCount(); colCount < len(cols) || colCount > len(cols) {\n\t\t\treturn false\n\t\t}\n\t\tfor i := range cols {\n\t\t\tif uc.columnOrdinals[i] != cols[i] {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\treturn true\n\t}\n\n\t// 1. Verify that the target table has a unique index or unique constraint.\n\tvar targetIndex *Index\n\tvar targetUniqueConstraint *UniqueConstraint\n\tfor _, idx := range targetTable.Indexes {\n\t\tif indexMatches(idx, toCols, true /* strict */) {\n\t\t\ttargetIndex = idx\n\t\t\tbreak\n\t\t}\n\t}\n\tif targetIndex == nil {\n\t\tfor i := range targetTable.uniqueConstraints {\n\t\t\tuc := &targetTable.uniqueConstraints[i]\n\t\t\tif uniqueConstraintMatches(uc, toCols) {\n\t\t\t\ttargetUniqueConstraint = uc\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\tif targetIndex == nil && targetUniqueConstraint == nil {\n\t\tpanic(fmt.Errorf(\n\t\t\t\"there is no unique constraint matching given keys for referenced table %s\",\n\t\t\ttargetTable.Name(),\n\t\t))\n\t}\n\n\tif createFKIndexes {\n\t\t// 2. Search for an existing index in the source table; add it if necessary.\n\t\tfound := false\n\t\tfor _, idx := range tab.Indexes {\n\t\t\tif indexMatches(idx, fromCols, false /* strict */) {\n\t\t\t\tfound = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif !found {\n\t\t\t// Add a non-unique index on fromCols.\n\t\t\tidx := tree.IndexTableDef{\n\t\t\t\tName: tree.Name(fmt.Sprintf(\"%s_auto_index_%s\", tab.TabName.Table(), constraintName)),\n\t\t\t\tColumns: make(tree.IndexElemList, len(fromCols)),\n\t\t\t}\n\t\t\tfor i, c := range fromCols {\n\t\t\t\tidx.Columns[i].Column = tab.Columns[c].ColName()\n\t\t\t\tidx.Columns[i].Direction = tree.Ascending\n\t\t\t}\n\t\t\ttab.addIndex(&idx, nonUniqueIndex)\n\t\t}\n\t}\n\n\tfk := ForeignKeyConstraint{\n\t\tname: constraintName,\n\t\toriginTableID: tab.ID(),\n\t\treferencedTableID: targetTable.ID(),\n\t\toriginColumnOrdinals: fromCols,\n\t\treferencedColumnOrdinals: toCols,\n\t\tvalidated: true,\n\t\tmatchMethod: d.Match,\n\t\tdeleteAction: d.Actions.Delete,\n\t\tupdateAction: d.Actions.Update,\n\t}\n\ttab.outboundFKs = append(tab.outboundFKs, fk)\n\ttargetTable.inboundFKs = append(targetTable.inboundFKs, fk)\n}",
"func (m Memo) ForeignKey() (fk []byte) {\n\tfk = make([]byte, 29)\n\tfor i := 0; i < 28; i++ {\n\t\tfk[i] |= m[i+3] >> 2\n\t\tfk[i] |= m[i+4] & 0x3 << 6\n\t}\n\n\t// We only have 230 bits, which results in\n\t// our last fk byte only having 6 'valid' bits\n\tfk[28] = m[31] >> 2\n\n\treturn fk\n}",
"func (s SQLField) ForeignKey() string {\n\tif sqlTableNoS := s.goTag.Get(\"sql_foreign_key\"); sqlTableNoS != \"\" {\n\t\treturn sqlTableNoS + \"s\"\n\t}\n\tif !s.IsPrimary() && strings.HasPrefix(s.GoName, \"Id\") {\n\t\tgoTableName := strings.TrimPrefix(s.GoName, \"Id\")\n\t\treturn tableName(goTableName)\n\t}\n\treturn \"\"\n}",
"func evalOrig(v ID, ancestor, semi, label []ID) ID {\n\tif ancestor[v] == 0 {\n\t\treturn v\n\t}\n\tcompressOrig(v, ancestor, semi, label)\n\treturn label[v]\n}",
"func (ma *MixedcaseAddress) Original() string {\n\treturn ma.original\n}",
"func (s *BasePlSqlParserListener) EnterForeign_key_clause(ctx *Foreign_key_clauseContext) {}",
"func (t *ProcessTable) Underlying() sql.Table {\n\treturn t.Table\n}",
"func (o *AssetRevision) SetOrigP(exec boil.Executor, insert bool, related *Asset) {\n\tif err := o.SetOrig(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func CloneRefOfDropColumn(n *DropColumn) *DropColumn {\n\tif n == nil {\n\t\treturn nil\n\t}\n\tout := *n\n\tout.Name = CloneRefOfColName(n.Name)\n\treturn &out\n}",
"func getOriginalByID(originalID int) (*Original, error) {\n\tvar name, zone, ztname, tzdver string\n\tvar id, ztver, offset int64\n\n\tcolumns := getOriginalCols()\n\tquery := fmt.Sprintf(\"SELECT * FROM %s WHERE %s=%v\", originalTable, columns[0], originalID)\n\terr := db.QueryRow(query).Scan(&id, &name, &zone, &offset, &ztname, &ztver, &tzdver)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &Original{ID: id, Name: name, DZone: zone, DOffset: offset, TabName: ztname, TabVer: ztver, TZDVer: tzdver}, nil\n}",
"func (fk FKElem) Modify(table *TableElem) error {\n\tif table == nil {\n\t\treturn fmt.Errorf(\"sol: foreign keys cannot modify a nil table\")\n\t}\n\tif err := isValidColumnName(fk.name); err != nil {\n\t\treturn err\n\t}\n\n\t// Add the table to the foreign key\n\tif fk.table != nil {\n\t\treturn fmt.Errorf(\n\t\t\t\"sol: foreign key %s already belongs to table %s\",\n\t\t\tfk.name, fk.table.name,\n\t\t)\n\t}\n\tfk.table = table\n\n\t// Create the column for this table\n\tcol := ColumnElem{\n\t\tname: fk.name,\n\t\ttable: table,\n\t\tdatatype: fk.datatype,\n\t}\n\n\t// Add the column to the table\n\tif err := table.columns.add(col); err != nil {\n\t\treturn err\n\t}\n\n\t// Add the type to the table creates\n\ttable.creates = append(table.creates, fk)\n\n\t// Add it to the list of foreign keys\n\ttable.fks = append(table.fks, fk)\n\n\treturn nil\n}",
"func (f Fixed) Original() uint64 {\n\treturn f.fp\n}",
"func (s Strategy) GetEntityForeignName(coralName string) string {\n\treturn s.Map.Entities[coralName].Foreign\n}",
"func ForeignKey(term string) string {\n\treturn Underscorize(term) + \"_id\"\n}",
"func CloneRefOfAlterColumn(n *AlterColumn) *AlterColumn {\n\tif n == nil {\n\t\treturn nil\n\t}\n\tout := *n\n\tout.Column = CloneRefOfColName(n.Column)\n\tout.DefaultVal = CloneExpr(n.DefaultVal)\n\treturn &out\n}",
"func (md CountryModel) Underlying() *models.Model {\n\treturn md.Model\n}",
"func (e *detailedError) Original() error {\n\tif e.original != nil {\n\t\treturn e.original\n\t}\n\treturn e\n}",
"func Original(err error) error {\n\tswitch err.(type) {\n\tcase Copy:\n\t\treturn err.(Copy).Original()\n\t}\n\treturn err\n}",
"func (fk ImmutableFK) Modify(table sol.Tabular) error {\n\treturn sol.ForeignKey(\n\t\tfk.Name,\n\t\tfk.Table.C(\"id\"),\n\t\ttypes.Integer().NotNull(),\n\t).OnUpdate(sol.Cascade).OnDelete(sol.Cascade).Modify(table)\n}",
"func (o *ContentUnitDerivation) SetSource(exec boil.Executor, insert bool, related *ContentUnit) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"content_unit_derivations\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"source_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, contentUnitDerivationPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.SourceID, o.DerivedID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.SourceID = related.ID\n\tif o.R == nil {\n\t\to.R = &contentUnitDerivationR{\n\t\t\tSource: related,\n\t\t}\n\t} else {\n\t\to.R.Source = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &contentUnitR{\n\t\t\tSourceContentUnitDerivations: ContentUnitDerivationSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.SourceContentUnitDerivations = append(related.R.SourceContentUnitDerivations, o)\n\t}\n\n\treturn nil\n}",
"func fkColumn(e *Edge, owner *schema.Table, refPK *schema.Column) *schema.Column {\n\t// If the foreign-key also functions as a primary key, it cannot be nullable.\n\tispk := len(owner.PrimaryKey) == 1 && owner.PrimaryKey[0].Name == e.Rel.Column()\n\tcolumn := &schema.Column{Name: e.Rel.Column(), Size: refPK.Size, Type: refPK.Type, SchemaType: refPK.SchemaType, Nullable: !ispk}\n\t// O2O relations are enforced using a unique index.\n\tcolumn.Unique = e.Rel.Type == O2O\n\t// Foreign key was defined as an edge field.\n\tif e.Rel.fk != nil && e.Rel.fk.Field != nil {\n\t\tfc := e.Rel.fk.Field.Column()\n\t\tcolumn.Comment, column.Default = fc.Comment, fc.Default\n\t}\n\treturn column\n}",
"func (assetRevisionL) LoadOrig(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Orig\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Orig\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Orig = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Orig == foreign.ID {\n\t\t\t\tlocal.R.Orig = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (p *peer) OriginalAddr() *NetAddress {\r\n\tif p.peerConn.outbound {\r\n\t\treturn p.peerConn.originalAddr\r\n\t}\r\n\treturn nil\r\n}",
"func getRealDest(dest reflect.Value) reflect.Value {\n\tif dest.Kind() == reflect.Interface && !dest.IsNil() {\n\t\tdest = dest.Elem()\n\t}\n\tfor dest.Kind() == reflect.Ptr {\n\t\tif dest.IsNil() {\n\t\t\tdest.Set(reflect.New(dest.Type().Elem()))\n\t\t}\n\t\tdest = dest.Elem()\n\t}\n\treturn dest\n}",
"func (b *Blueprint) Foreign(columns []string, name string) *Blueprint {\n\treturn b.indexCommand(\"foreign\", columns, name, \"\")\n}",
"func (f UnderlyingIDSourceField) Tag() quickfix.Tag { return tag.UnderlyingIDSource }",
"func GetOriginalDestination(conn net.Conn) (daddr net.IP, dport uint16, err error) {\n\t// obtain os fd from Conn\n\ttcp, ok := conn.(*net.TCPConn)\n\tif !ok {\n\t\terr = errors.New(\"socket is not tcp\")\n\t\treturn\n\t}\n\tfile, err := tcp.File()\n\tif err != nil {\n\t\treturn\n\t}\n\tdefer file.Close()\n\tfd := file.Fd()\n\n\t// Detect underlying ip is v4 or v6\n\tip := conn.RemoteAddr().(*net.TCPAddr).IP\n\tisIpv4 := false\n\tif ip.To4() != nil {\n\t\tisIpv4 = true\n\t} else if ip.To16() != nil {\n\t\tisIpv4 = false\n\t} else {\n\t\terr = fmt.Errorf(\"neither ipv6 nor ipv4 original addr: %s\", ip)\n\t\treturn\n\t}\n\n\t// golang doesn't provide a struct sockaddr_storage\n\t// IPv6MTUInfo is chosen because\n\t// 1. it is no smaller than sockaddr_storage,\n\t// 2. it is provide the port field value\n\tvar addr *unix.IPv6MTUInfo\n\tif isIpv4 {\n\t\taddr, err =\n\t\t\tunix.GetsockoptIPv6MTUInfo(\n\t\t\t\tint(fd),\n\t\t\t\tunix.IPPROTO_IP,\n\t\t\t\tconstants.SoOriginalDst)\n\t\tif err != nil {\n\t\t\tfmt.Println(\"error ipv4 getsockopt\")\n\t\t\treturn\n\t\t}\n\t\t// See struct sockaddr_in\n\t\tdaddr = net.IPv4(\n\t\t\taddr.Addr.Addr[0], addr.Addr.Addr[1], addr.Addr.Addr[2], addr.Addr.Addr[3])\n\t} else {\n\t\taddr, err = unix.GetsockoptIPv6MTUInfo(\n\t\t\tint(fd), unix.IPPROTO_IPV6,\n\t\t\tconstants.SoOriginalDst)\n\n\t\tif err != nil {\n\t\t\tfmt.Println(\"error ipv6 getsockopt\")\n\t\t\treturn\n\t\t}\n\t\t// See struct sockaddr_in6\n\t\tdaddr = addr.Addr.Addr[:]\n\t}\n\t// See sockaddr_in6 and sockaddr_in\n\tdport = ntohs(addr.Addr.Port)\n\n\tfmt.Printf(\"local addr %s\\n\", conn.LocalAddr())\n\tfmt.Printf(\"original addr %s:%d\\n\", ip, dport)\n\treturn\n}",
"func (d *Doc) PreCopy() {\n\td.Ancestors = append(d.Ancestors, d.DocId)\n\td.DocId = bson.NewObjectId()\n}",
"func CloneRefOfDropView(n *DropView) *DropView {\n\tif n == nil {\n\t\treturn nil\n\t}\n\tout := *n\n\tout.FromTables = CloneTableNames(n.FromTables)\n\treturn &out\n}",
"func (s *BasePlSqlParserListener) ExitForeign_key_clause(ctx *Foreign_key_clauseContext) {}",
"func (dd *DatabaseDiff) ObjectKey() ObjectKey {\n\tif dd == nil || (dd.From == nil && dd.To == nil) {\n\t\treturn ObjectKey{}\n\t}\n\tif dd.From == nil {\n\t\treturn dd.To.ObjectKey()\n\t}\n\treturn dd.From.ObjectKey()\n}",
"func (t *ProcessIndexableTable) Underlying() sql.Table {\n\treturn t.DriverIndexableTable\n}",
"func CloneRefOfColName(n *ColName) *ColName {\n\treturn n\n}",
"func CloneRefOfSavepoint(n *Savepoint) *Savepoint {\n\tif n == nil {\n\t\treturn nil\n\t}\n\tout := *n\n\tout.Name = CloneColIdent(n.Name)\n\treturn &out\n}",
"func CloneRefOfAlterView(n *AlterView) *AlterView {\n\tif n == nil {\n\t\treturn nil\n\t}\n\tout := *n\n\tout.ViewName = CloneTableName(n.ViewName)\n\tout.Columns = CloneColumns(n.Columns)\n\tout.Select = CloneSelectStatement(n.Select)\n\treturn &out\n}",
"func OriginFromUnidirectionalEdge(edge H3Index) H3Index {\n\treturn H3Index(C.getOriginH3IndexFromUnidirectionalEdge(edge))\n}",
"func OriginFromUnidirectionalEdge(edge H3Index) H3Index {\n\treturn H3Index(C.getOriginH3IndexFromUnidirectionalEdge(edge))\n}",
"func (e *HTMLTableRow) Ref(dest *DOMElement) *HTMLTableRow {\n\te.ref = dest\n\treturn e\n}",
"func GetOriginalDST(conn *net.TCPConn) (*net.TCPAddr, error) {\n\treturn conn.LocalAddr().(*net.TCPAddr), nil\n}",
"func addForeignKey() {\n\t//db.Model(&User{}).AddForeignKey(\"city_id\", \"cities(id)\", \"RESTRICT\", \"RESTRICT\")\n}",
"func (d *Dentry) Parent() *Dentry {\n\treturn d.parent\n}",
"func (o *StockCvterm) SetPub(exec boil.Executor, insert bool, related *Pub) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"stock_cvterm\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"pub_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, stockCvtermPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.PubID, o.StockCvtermID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.PubID = related.PubID\n\n\tif o.R == nil {\n\t\to.R = &stockCvtermR{\n\t\t\tPub: related,\n\t\t}\n\t} else {\n\t\to.R.Pub = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &pubR{\n\t\t\tStockCvterm: o,\n\t\t}\n\t} else {\n\t\trelated.R.StockCvterm = o\n\t}\n\n\treturn nil\n}",
"func (w *RootWalker) ReplaceInRefField(fieldName string, p interface{}) (skyobject.Reference, error) {\n\tnRef := skyobject.Reference{}\n\n\t// Obtain top-most object.\n\ttObj, e := w.peek()\n\tif e != nil {\n\t\treturn nRef, e\n\t}\n\n\t// Save new obj.\n\tnRef = w.r.Save(p)\n\tif e := tObj.replaceReferenceField(fieldName, nRef); e != nil {\n\t\treturn nRef, e\n\t}\n\n\t// Recursively save.\n\t_, e = tObj.save(nil)\n\treturn nRef, e\n}",
"func CloneRefOfAlterMigration(n *AlterMigration) *AlterMigration {\n\tif n == nil {\n\t\treturn nil\n\t}\n\tout := *n\n\treturn &out\n}",
"func (o *FeatureRelationship) SetObject(exec boil.Executor, insert bool, related *Feature) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"feature_relationship\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"object_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, featureRelationshipPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.FeatureID, o.FeatureRelationshipID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.ObjectID = related.FeatureID\n\n\tif o.R == nil {\n\t\to.R = &featureRelationshipR{\n\t\t\tObject: related,\n\t\t}\n\t} else {\n\t\to.R.Object = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &featureR{\n\t\t\tObjectFeatureRelationship: o,\n\t\t}\n\t} else {\n\t\trelated.R.ObjectFeatureRelationship = o\n\t}\n\n\treturn nil\n}",
"func (self *TileSprite) PreviousPosition() *Point{\n return &Point{self.Object.Get(\"previousPosition\")}\n}",
"func (c *PrimaryKeyConstraint) Clone() *PrimaryKeyConstraint {\n\tif c == nil {\n\t\treturn c\n\t}\n\tother := *c\n\tother.Name = c.Name.Clone()\n\tother.Columns = cloneIdents(c.Columns)\n\treturn &other\n}",
"func (k *TargetKey) ParentKey() *BrokerKey {\n\treturn &k.brokerKey\n}",
"func (e *Edge) Other(v int) int {\n\tif e.from == v {\n\t\treturn e.to\n\t}\n\treturn e.from\n}",
"func (e *Err) Underlying() error {\n\treturn e.previous\n}",
"func (point *Point) Expand(dbPoint dbmodels.Point) {\n\tpoint.X = dbPoint.X\n\tpoint.Y = dbPoint.Y\n}",
"func (f OrigClOrdIDField) Tag() quickfix.Tag { return tag.OrigClOrdID }",
"func WithOriginalSrc(parent context.Context, src string) context.Context {\n\treturn context.WithValue(parent, originalSrcCtxKey, src)\n}",
"func CloneRefOfAlterTable(n *AlterTable) *AlterTable {\n\tif n == nil {\n\t\treturn nil\n\t}\n\tout := *n\n\tout.Table = CloneTableName(n.Table)\n\tout.AlterOptions = CloneSliceOfAlterOption(n.AlterOptions)\n\tout.PartitionSpec = CloneRefOfPartitionSpec(n.PartitionSpec)\n\treturn &out\n}",
"func (r *AssetRendering) Original() {\n\tv := \"original\"\n\tr.Value = &v\n}",
"func (t *Dense) CopyTo(other *Dense) error {\n\tif other == t {\n\t\treturn nil // nothing to copy to. Maybe return NoOpErr?\n\t}\n\n\tif other.Size() != t.Size() {\n\t\treturn errors.Errorf(sizeMismatch, t.Size(), other.Size())\n\t}\n\n\t// easy peasy lemon squeezy\n\tif t.viewOf == nil && other.viewOf == nil {\n\t\tcopyDense(other, t)\n\t\treturn nil\n\t}\n\n\treturn errors.Errorf(methodNYI, \"CopyTo\", \"views\")\n}",
"func (o *AssetRevision) SetOrigGP(insert bool, related *Asset) {\n\tif err := o.SetOrig(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func CloneRefOfAlterVschema(n *AlterVschema) *AlterVschema {\n\tif n == nil {\n\t\treturn nil\n\t}\n\tout := *n\n\tout.Table = CloneTableName(n.Table)\n\tout.VindexSpec = CloneRefOfVindexSpec(n.VindexSpec)\n\tout.VindexCols = CloneSliceOfColIdent(n.VindexCols)\n\tout.AutoIncSpec = CloneRefOfAutoIncSpec(n.AutoIncSpec)\n\treturn &out\n}",
"func (c *ColumnBase) ParentTable() TableI {\n\treturn c.parentTable\n}",
"func fkSymbol(e *Edge, ownerT, refT *schema.Table) string {\n\tif k, _ := e.StorageKey(); k != nil && len(k.Symbols) == 1 {\n\t\treturn k.Symbols[0]\n\t}\n\treturn fmt.Sprintf(\"%s_%s_%s\", ownerT.Name, refT.Name, e.Name)\n}",
"func CloneRefOfDropTable(n *DropTable) *DropTable {\n\tif n == nil {\n\t\treturn nil\n\t}\n\tout := *n\n\tout.FromTables = CloneTableNames(n.FromTables)\n\treturn &out\n}",
"func (o *GetRecipeInformation200ResponseExtendedIngredientsInner) SetOriginal(v string) {\n\to.Original = v\n}",
"func (o *TransactionSplit) GetOriginalSource() string {\n\tif o == nil || o.OriginalSource.Get() == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\treturn *o.OriginalSource.Get()\n}",
"func (i *instance) copyDep() (dep map[paxi.ID]int) {\n\tdep = make(map[paxi.ID]int)\n\tfor id, d := range i.dep {\n\t\tdep[id] = d\n\t}\n\treturn dep\n}",
"func (m *Descriptor) GetParent() *Descriptor { return m.Parent }",
"func (fk ImmutableFK) Value() (driver.Value, error) {\n\treturn int64(fk.ID), nil\n}",
"func (o *TransactionSplit) UnsetForeignAmount() {\n\to.ForeignAmount.Unset()\n}",
"func (l *Loader) OriginalGraph() *dag.Graph {\n\tl.mut.RLock()\n\tdefer l.mut.RUnlock()\n\treturn l.originalGraph.Clone()\n}",
"func compressOrig(v ID, ancestor, semi, label []ID) {\n\tif ancestor[ancestor[v]] != 0 {\n\t\tcompressOrig(ancestor[v], ancestor, semi, label)\n\t\tif semi[label[ancestor[v]]] < semi[label[v]] {\n\t\t\tlabel[v] = label[ancestor[v]]\n\t\t}\n\t\tancestor[v] = ancestor[ancestor[v]]\n\t}\n}",
"func CloneRefOfDropDatabase(n *DropDatabase) *DropDatabase {\n\tif n == nil {\n\t\treturn nil\n\t}\n\tout := *n\n\tout.Comments = CloneComments(n.Comments)\n\treturn &out\n}",
"func (f *Func) dfsOrig(entry *Block, succFn linkedBlocks, semi, vertex, label, parent []ID) ID {\n\tn := ID(0)\n\ts := make([]*Block, 0, 256)\n\ts = append(s, entry)\n\n\tfor len(s) > 0 {\n\t\tv := s[len(s)-1]\n\t\ts = s[:len(s)-1]\n\t\t// recursing on v\n\n\t\tif semi[v.ID] != 0 {\n\t\t\tcontinue // already visited\n\t\t}\n\t\tn++\n\t\tsemi[v.ID] = n\n\t\tvertex[n] = v.ID\n\t\tlabel[v.ID] = v.ID\n\t\t// ancestor[v] already zero\n\t\tfor _, e := range succFn(v) {\n\t\t\tw := e.b\n\t\t\t// if it has a dfnum, we've already visited it\n\t\t\tif semi[w.ID] == 0 {\n\t\t\t\t// yes, w can be pushed multiple times.\n\t\t\t\ts = append(s, w)\n\t\t\t\tparent[w.ID] = v.ID // keep overwriting this till it is visited.\n\t\t\t}\n\t\t}\n\t}\n\treturn n\n}",
"func (original *Place) Copy() *Place {\n\treturn &Place{original.latitude, original.longitude, original.Name}\n}",
"func (o *MovableObject) Prev() {\n\to.point.X -= o.Arrow.X\n\to.point.Y -= o.Arrow.Y\n}",
"func UnderlyingValue(v reflect.Value) reflect.Value {\n\tif v.Kind() != reflect.Ptr {\n\t\treturn v\n\t}\n\tv = v.Elem()\n\treturn UnderlyingValue(v)\n}",
"func (m pNew) Underlying() *models.Method {\n\treturn m.Method\n}",
"func MakeOriginalChart(ChartXY [][]int, OrigChart [][]int) {\n\tfor i := range ChartXY {\n\t\tOrigChart[i] = make([]int, len(ChartXY[i]))\n\t\tcopy(OrigChart[i], ChartXY[i])\n\t}\n}",
"func ChangePointByReference(p *Point) {\n\tp.x = 0\n\tp.y = 0\n}",
"func (m Meta) Revert() Change {\n\tif m.Change != nil {\n\t\tm.Change = m.Change.Revert()\n\t}\n\treturn m\n}",
"func getForeignKeyReferences(ctx *sql.Context, a *Analyzer, tbl sql.ForeignKeyTable, cache *foreignKeyCache, fkChain foreignKeyChain) (*plan.ForeignKeyEditor, error) {\n\tvar updater sql.ForeignKeyEditor\n\tfks, err := tbl.GetDeclaredForeignKeys(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// We can ignore foreign keys that have been previously used as we can guarantee the parent table has the referenced data\n\t{\n\t\tnewFks := make([]sql.ForeignKeyConstraint, 0, len(fks))\n\t\tfor _, fk := range fks {\n\t\t\tif !fkChain.HasForeignKey(fk.Name) {\n\t\t\t\tnewFks = append(newFks, fk)\n\t\t\t}\n\t\t}\n\t\tfks = newFks\n\t}\n\t// If there are no foreign keys (or we've ignored them all) then we can skip the rest of this\n\tif len(fks) == 0 {\n\t\treturn nil, nil\n\t}\n\t// Tables do not include their database. As a workaround, we'll use the first foreign key to tell us the database.\n\tupdater, err = cache.AddUpdater(ctx, tbl, fks[0].Database, fks[0].Table)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfkChain = fkChain.AddTable(fks[0].ParentDatabase, fks[0].ParentTable).AddTableUpdater(fks[0].ParentDatabase, fks[0].ParentTable, updater)\n\n\ttblSch := tbl.Schema()\n\tfkEditor := &plan.ForeignKeyEditor{\n\t\tSchema: tblSch,\n\t\tEditor: updater,\n\t\tReferences: make([]*plan.ForeignKeyReferenceHandler, len(fks)),\n\t\tRefActions: nil,\n\t\tCyclical: false,\n\t}\n\tfor i, fk := range fks {\n\t\tparentTbl, parentUpdater, err := cache.GetUpdater(ctx, a, fk.ParentDatabase, fk.ParentTable)\n\t\tif err != nil {\n\t\t\treturn nil, sql.ErrForeignKeyNotResolved.New(fk.Database, fk.Table, fk.Name,\n\t\t\t\tstrings.Join(fk.Columns, \"`, `\"), fk.ParentTable, strings.Join(fk.ParentColumns, \"`, `\"))\n\t\t}\n\n\t\t// Resolve the foreign key if it has not been resolved yet\n\t\tif !fk.IsResolved {\n\t\t\terr = plan.ResolveForeignKey(ctx, tbl, parentTbl, fk, false, true)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, sql.ErrForeignKeyNotResolved.New(fk.Database, fk.Table, fk.Name,\n\t\t\t\t\tstrings.Join(fk.Columns, \"`, `\"), fk.ParentTable, strings.Join(fk.ParentColumns, \"`, `\"))\n\t\t\t}\n\t\t}\n\n\t\tparentIndex, ok, err := plan.FindFKIndexWithPrefix(ctx, parentTbl, fk.ParentColumns, true)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif !ok {\n\t\t\t// If this error is returned, it is due to an index deletion not properly checking for foreign key usage\n\t\t\treturn nil, sql.ErrForeignKeyNotResolved.New(fk.Database, fk.Table, fk.Name,\n\t\t\t\tstrings.Join(fk.Columns, \"`, `\"), fk.ParentTable, strings.Join(fk.ParentColumns, \"`, `\"))\n\t\t}\n\t\tindexPositions, appendTypes, err := plan.FindForeignKeyColMapping(ctx, fk.Name, tbl, fk.Columns, fk.ParentColumns, parentIndex)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tvar selfCols map[string]int\n\t\tif fk.IsSelfReferential() {\n\t\t\tselfCols = make(map[string]int)\n\t\t\tfor i, col := range tblSch {\n\t\t\t\tselfCols[strings.ToLower(col.Name)] = i\n\t\t\t}\n\t\t}\n\t\tfkEditor.References[i] = &plan.ForeignKeyReferenceHandler{\n\t\t\tForeignKey: fk,\n\t\t\tSelfCols: selfCols,\n\t\t\tRowMapper: plan.ForeignKeyRowMapper{\n\t\t\t\tIndex: parentIndex,\n\t\t\t\tUpdater: parentUpdater,\n\t\t\t\tSourceSch: tblSch,\n\t\t\t\tIndexPositions: indexPositions,\n\t\t\t\tAppendTypes: appendTypes,\n\t\t\t},\n\t\t}\n\t}\n\treturn fkEditor, nil\n}",
"func (o InstanceRestoreToPointInTimePtrOutput) SourceDbiResourceId() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v *InstanceRestoreToPointInTime) *string {\n\t\tif v == nil {\n\t\t\treturn nil\n\t\t}\n\t\treturn v.SourceDbiResourceId\n\t}).(pulumi.StringPtrOutput)\n}",
"func (m pCopy) Underlying() *models.Method {\n\treturn m.Method\n}",
"func (m pCopyData) Underlying() *models.Method {\n\treturn m.Method\n}",
"func CloneRefOfOtherAdmin(n *OtherAdmin) *OtherAdmin {\n\tif n == nil {\n\t\treturn nil\n\t}\n\tout := *n\n\treturn &out\n}",
"func (db *PSQL) ChangeParent(organizationID string, parentID string) error {\n\treturn nil\n}",
"func (a *Aspect) NoteAssignedTo(r Entity) {\n\t// if a.Entity != nil && a.Entity != r {\n\t// \tpanic(errForeign)\n\t// }\n\ta.Entity = r\n}",
"func (m *Matrix) CopyFocus(m2 *Matrix) {\n\t//m2.SetFocus(int(m.focus.Min().X), int(m2.focus.Min().Y), int(m2.focus.Max().X), int(m2.focus.Max().Y))\n\tm2.focus = m.focus.Copy()\n}",
"func (w *RootWalker) ReplaceInRefField(fieldName string, p interface{}) error {\n\t// Obtain top-most object.\n\ttObj, e := w.peek()\n\tif e != nil {\n\t\treturn e\n\t}\n\n\t// Save new obj.\n\tnRef := w.r.Save(p)\n\tif e := tObj.replaceReferenceField(fieldName, nRef); e != nil {\n\t\treturn e\n\t}\n\n\t// Recursively save.\n\t_, e = tObj.save()\n\treturn e\n}",
"func (o *Origin) AddOriginOPUEK(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPublicEncryptionKey) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"origin_public_encryption_keys\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, originPublicEncryptionKeyPrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginOPUEK: related,\n\t\t}\n\t} else {\n\t\to.R.OriginOPUEK = append(o.R.OriginOPUEK, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &originPublicEncryptionKeyR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func (o *Origin) SetOriginOPUEK(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPublicEncryptionKey) error {\n\tquery := \"update \\\"origin_public_encryption_keys\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOPUEK {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOPUEK = nil\n\t}\n\treturn o.AddOriginOPUEK(ctx, exec, insert, related...)\n}",
"func (self *Events) Parent() *Sprite{\n return &Sprite{self.Object.Get(\"parent\")}\n}"
] |
[
"0.5982219",
"0.53858924",
"0.510426",
"0.51021636",
"0.5029586",
"0.4974414",
"0.4951888",
"0.4902231",
"0.48969868",
"0.48653513",
"0.48332447",
"0.4795436",
"0.47524685",
"0.47124797",
"0.4701568",
"0.47005042",
"0.46750408",
"0.46621627",
"0.4653043",
"0.46399838",
"0.46266183",
"0.46218336",
"0.45793998",
"0.45651922",
"0.45633784",
"0.45496216",
"0.45453095",
"0.45210165",
"0.45036885",
"0.44990945",
"0.4492599",
"0.44820493",
"0.44625872",
"0.44471544",
"0.44310188",
"0.4412263",
"0.4410515",
"0.44079208",
"0.44025075",
"0.43752524",
"0.437185",
"0.43500346",
"0.43472913",
"0.4341745",
"0.43302032",
"0.43245673",
"0.43245673",
"0.43216112",
"0.4305357",
"0.43007255",
"0.4275643",
"0.42714226",
"0.42661652",
"0.42642158",
"0.4253011",
"0.42499202",
"0.4246955",
"0.42396924",
"0.42352805",
"0.42237183",
"0.42204478",
"0.42136192",
"0.42040867",
"0.4188467",
"0.41877452",
"0.41835204",
"0.41779482",
"0.41737443",
"0.41723272",
"0.41690424",
"0.41680437",
"0.4165643",
"0.4163591",
"0.41631922",
"0.4163048",
"0.41594306",
"0.41559494",
"0.41509938",
"0.41445017",
"0.4141468",
"0.4139032",
"0.4132096",
"0.41319355",
"0.41291353",
"0.41272065",
"0.41266954",
"0.41152185",
"0.41143787",
"0.41109332",
"0.41095263",
"0.4108951",
"0.41066092",
"0.41011462",
"0.40975466",
"0.40970486",
"0.40968493",
"0.4086759",
"0.40865558",
"0.40710914",
"0.40667036"
] |
0.55374676
|
1
|
LoadAsset allows an eager lookup of values, cached into the loaded structs of the objects.
|
func (assetRevisionL) LoadAsset(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {
var slice []*AssetRevision
var object *AssetRevision
count := 1
if singular {
object = maybeAssetRevision.(*AssetRevision)
} else {
slice = *maybeAssetRevision.(*AssetRevisionSlice)
count = len(slice)
}
args := make([]interface{}, count)
if singular {
if object.R == nil {
object.R = &assetRevisionR{}
}
args[0] = object.Asset
} else {
for i, obj := range slice {
if obj.R == nil {
obj.R = &assetRevisionR{}
}
args[i] = obj.Asset
}
}
query := fmt.Sprintf(
"select * from \"asset\" where \"id\" in (%s)",
strmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),
)
if boil.DebugMode {
fmt.Fprintf(boil.DebugWriter, "%s\n%v\n", query, args)
}
results, err := e.Query(query, args...)
if err != nil {
return errors.Wrap(err, "failed to eager load Asset")
}
defer results.Close()
var resultSlice []*Asset
if err = queries.Bind(results, &resultSlice); err != nil {
return errors.Wrap(err, "failed to bind eager loaded slice Asset")
}
if len(assetRevisionAfterSelectHooks) != 0 {
for _, obj := range resultSlice {
if err := obj.doAfterSelectHooks(e); err != nil {
return err
}
}
}
if len(resultSlice) == 0 {
return nil
}
if singular {
object.R.Asset = resultSlice[0]
return nil
}
for _, local := range slice {
for _, foreign := range resultSlice {
if local.Asset == foreign.ID {
local.R.Asset = foreign
break
}
}
}
return nil
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (a *AssetRegistry) LoadAsset(id devnetvm.Color) (*Asset, error) {\n\t_, ok := a.Assets[id]\n\tif !ok {\n\t\tsuccess := a.updateLocalFromCentral(id)\n\t\tif !success {\n\t\t\treturn nil, errors.Errorf(\"no asset found with assetID (color) %s\", id.Base58())\n\t\t}\n\t}\n\tasset := a.Assets[id]\n\treturn &asset, nil\n}",
"func (rc *ResourceCacheMap) Load(values ...*unstructured.Unstructured) error {\n\tfor _, value := range values {\n\t\tkey, err := object.UnstructuredToObjMeta(value)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to create resource cache key: %w\", err)\n\t\t}\n\t\trc.cache[key] = value\n\t}\n\treturn nil\n}",
"func (assetRevisionL) LoadOrig(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Orig\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Orig\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Orig = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Orig == foreign.ID {\n\t\t\t\tlocal.R.Orig = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (c *ChunkRef) Load(ps []datastore.Property) error {\n\treturn datastore.LoadStruct(c, ps)\n}",
"func LoadAsset(path string) http.File {\n\tasset := FS(false)\n\tfile, _ := asset.Open(path)\n\n\treturn file\n}",
"func (l *tDjangoAssetLoader) Get(path string) (io.Reader, error) {\n\tif stdPath.IsAbs(path) {\n\t\tpath = path[1:]\n\t}\n\n\tres, err := asset(l.fs, path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn bytes.NewReader(res), nil\n}",
"func (s3Driver *S3ArtifactDriver) Load(inputArtifact *wfv1.Artifact, path string) error {\n\tminioClient, err := s3Driver.newMinioClient()\n\tif err != nil {\n\t\treturn err\n\t}\n\t// Download the file to a local file path\n\tlog.Infof(\"Loading from s3 (endpoint: %s, bucket: %s, key: %s) to %s\",\n\t\tinputArtifact.S3.Endpoint, inputArtifact.S3.Bucket, inputArtifact.S3.Key, path)\n\terr = minioClient.FGetObject(inputArtifact.S3.Bucket, inputArtifact.S3.Key, path)\n\tif err != nil {\n\t\treturn errors.InternalWrapError(err)\n\t}\n\treturn nil\n}",
"func (model *GrogModel) GetAsset(name string) (*Asset, error) {\n\tvar foundAsset *Asset\n\tvar mimeType string\n\tvar content = make([]byte, 0)\n\tvar serveExternal int64\n\tvar rendered int64\n\tvar added int64\n\tvar modified int64\n\tvar err error\n\n\trow := model.db.DB.QueryRow(`select mimeType, content, serve_external, rendered,\n\t\tadded, modified from Assets where name = ?`, name)\n\tif row.Scan(&mimeType, &content, &serveExternal, &rendered, &added, &modified) != sql.ErrNoRows {\n\t\tfoundAsset = model.NewAsset(name, mimeType)\n\t\tfoundAsset.Content = content\n\t\tif serveExternal == 1 {\n\t\t\tfoundAsset.ServeExternal = true\n\t\t} else {\n\t\t\tfoundAsset.ServeExternal = false\n\t\t}\n\n\t\tif rendered == 1 {\n\t\t\tfoundAsset.Rendered = true\n\t\t} else {\n\t\t\tfoundAsset.Rendered = false\n\t\t}\n\n\t\tfoundAsset.Added.Set(time.Unix(added, 0))\n\t\tfoundAsset.Modified.Set(time.Unix(modified, 0))\n\t} else {\n\t\terr = fmt.Errorf(\"No asset with name %s\", name)\n\t}\n\n\treturn foundAsset, err\n}",
"func Load(path string, v interface{}) error {\n\tlock.Lock()\n\tdefer lock.Unlock()\n\tf, err := os.Open(path)\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\treturn err\n\t\t}\n\t}\n\tdefer f.Close()\n\treturn Unmarshal(f, v)\n}",
"func (braceletPhotoL) LoadBracelet(e boil.Executor, singular bool, maybeBraceletPhoto interface{}) error {\n\tvar slice []*BraceletPhoto\n\tvar object *BraceletPhoto\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeBraceletPhoto.(*BraceletPhoto)\n\t} else {\n\t\tslice = *maybeBraceletPhoto.(*BraceletPhotoSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &braceletPhotoR{}\n\t\t}\n\t\targs[0] = object.BraceletID\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &braceletPhotoR{}\n\t\t\t}\n\t\t\targs[i] = obj.BraceletID\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from `bracelet_bracelet` where `id` in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load BraceletBracelet\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*BraceletBracelet\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice BraceletBracelet\")\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Bracelet = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.BraceletID == foreign.ID {\n\t\t\t\tlocal.R.Bracelet = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (*myScene) Preload() {\n engo.Files.Load(\"textures/cumulus.png\")\n}",
"func Asset(name string) ([]byte, error) {\n cannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n if f, ok := _bindata[cannonicalName]; ok {\n a, err := f()\n if err != nil {\n return nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n }\n return a.bytes, nil\n }\n return nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func (*GameScene) Preload() {\n\tengo.Files.Load(\"textures/city.png\")\n}",
"func (ec *executionContext) _Asset(ctx context.Context, sel ast.SelectionSet, obj *models.Asset) graphql.Marshaler {\n\tfields := graphql.CollectFields(ctx, sel, assetImplementors)\n\n\tout := graphql.NewOrderedMap(len(fields))\n\tinvalid := false\n\tfor i, field := range fields {\n\t\tout.Keys[i] = field.Alias\n\n\t\tswitch field.Name {\n\t\tcase \"__typename\":\n\t\t\tout.Values[i] = graphql.MarshalString(\"Asset\")\n\t\tcase \"Id\":\n\t\t\tout.Values[i] = ec._Asset_Id(ctx, field, obj)\n\t\tcase \"Name\":\n\t\t\tout.Values[i] = ec._Asset_Name(ctx, field, obj)\n\t\tdefault:\n\t\t\tpanic(\"unknown field \" + strconv.Quote(field.Name))\n\t\t}\n\t}\n\n\tif invalid {\n\t\treturn graphql.Null\n\t}\n\treturn out\n}",
"func Load(path string, v interface{}) error {\n\tlock.Lock()\n\tdefer lock.Unlock()\n\tf, err := os.Open(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer f.Close()\n\treturn Unmarshal(f, v)\n}",
"func (c *Collection) Get(name string) *Asset {\n\treturn c.assets[name]\n}",
"func (c *Collection) Get(name string) *Asset {\n\treturn c.assets[name]\n}",
"func loadJSONRecursive(am *assetmanager.AssetManager, node map[string]interface{}, filename string, entityByID map[string]*Entity) *Entity {\n\tvar id string\n\tvar idOK, ok bool\n\n\tvar childEntity *Entity\n\n\tentity := NewEntity(nil)\n\n\t// Do this first to help with error messaging\n\tid, idOK = node[\"Id\"].(string)\n\tif idOK {\n\t\tentity.ID = id\n\t\tif entityByID != nil {\n\t\t\tentityByID[id] = entity\n\t\t}\n\t} else {\n\t\tid = \"[No ID]\"\n\t}\n\n\t// Do these first since X and Y might depend on them:\n\t_, ok = node[\"W\"].(string)\n\tif ok {\n\t\tentity.W = am.ParseDimension(filename, id, \"W\", node)\n\t}\n\t_, ok = node[\"H\"].(string)\n\tif ok {\n\t\tentity.H = am.ParseDimension(filename, id, \"H\", node)\n\t}\n\tassetName, ok := node[\"Asset\"].(string)\n\tif ok {\n\t\tentity.Surface = am.Surfaces[assetName]\n\t\tentity.W = entity.Surface.W\n\t\tentity.H = entity.Surface.H\n\t}\n\n\t// Now do the rest of the properties\n\tfor k, v := range node {\n\t\tswitch k {\n\t\tcase \"Id\", \"W\", \"H\", \"Asset\":\n\t\t\t// do nothing; handled above\n\t\tcase \"X\":\n\t\t\tentity.X = am.ParsePosition(filename, id, entity.W, \"X\", node)\n\t\tcase \"Y\":\n\t\t\tentity.Y = am.ParsePosition(filename, id, entity.H, \"Y\", node)\n\t\tcase \"Visible\":\n\t\t\tentity.Visible = v.(bool)\n\t\tcase \"Children\":\n\t\t\tfor _, child := range v.([]interface{}) {\n\t\t\t\tchildEntity = loadJSONRecursive(am, child.(map[string]interface{}), filename, entityByID)\n\t\t\t\tentity.AddChild(childEntity)\n\t\t\t}\n\t\tdefault:\n\t\t\tpanic(fmt.Sprintf(\"scenegraph.LoadJSON: unrecognized key: %s\", k))\n\t\t}\n\t}\n\n\treturn entity\n}",
"func (m *manager[K, V]) Load(key K) Ref[V] {\n\tif v, ok := m.loadFast(key); ok {\n\t\tvalue, err := v.Get(canceledContext)\n\t\tif err != nil || m.storage.Actual(key, value) {\n\t\t\treturn v\n\t\t}\n\t\tv.Release()\n\t\tm.delete(key, v.value)\n\t}\n\treturn m.loadSlow(key)\n}",
"func Load(filename string) ([]byte, error) {\n\tfs, err := Assets.Open(filename)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, err := ioutil.ReadAll(fs)\n\tdefer fs.Close()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn res, nil\n}",
"func Load(filename string) (c *Collection, err error) {\n\t// Load assets description from file (or create a new).\n\tvar assets []*Asset\n\terr = utils.UnmarshallYAMLFile(filename, &assets)\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\t// No assets file is not an error,\n\t\t\t// create an empty collection.\n\t\t\tassets = make([]*Asset, 0)\n\t\t\terr = nil\n\t\t} else {\n\t\t\treturn\n\t\t}\n\t}\n\n\t// Put assets into a map addressed by name and load filters.\n\tc = &Collection{\n\t\tassets: make(map[string]*Asset),\n\t\tfilters: filters.NewCollection(),\n\t}\n\tfor _, v := range assets {\n\t\tif _, exists := c.assets[v.Name]; exists {\n\t\t\treturn nil, fmt.Errorf(\"duplicate asset name %q\", v.Name)\n\t\t}\n\t\tc.assets[v.Name] = v\n\t\tif v.Filter != nil {\n\t\t\tc.filters.AddFromYAML(v.Name, v.Filter)\n\t\t}\n\t}\n\treturn c, nil\n}",
"func Load(filename string) (c *Collection, err error) {\n\t// Load assets description from file (or create a new).\n\tvar assets []*Asset\n\terr = utils.UnmarshallYAMLFile(filename, &assets)\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\t// No assets file is not an error,\n\t\t\t// create an empty collection.\n\t\t\tassets = make([]*Asset, 0)\n\t\t\terr = nil\n\t\t} else {\n\t\t\treturn\n\t\t}\n\t}\n\n\t// Put assets into a map addressed by name and load filters.\n\tc = &Collection{\n\t\tassets: make(map[string]*Asset),\n\t\tfilters: filters.NewCollection(),\n\t}\n\tfor _, v := range assets {\n\t\tif _, exists := c.assets[v.Name]; exists {\n\t\t\treturn nil, fmt.Errorf(\"duplicate asset name %q\", v.Name)\n\t\t}\n\t\tc.assets[v.Name] = v\n\t\tif v.Filter != nil {\n\t\t\tc.filters.AddFromYAML(v.Name, v.Filter)\n\t\t}\n\t}\n\treturn c, nil\n}",
"func (c *LoadingCache) Get(key interface{}, load LoadFunc) (interface{}, error) {\n\tif v, found := c.cache.Get(key); found {\n\t\treturn v, nil\n\t}\n\tv, err := load(key)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tc.cache.Add(key, v)\n\treturn v, nil\n}",
"func Load(path string, object interface{}) error {\n\tfile, err := os.Open(path)\n\tdefer file.Close()\n\tif err != nil {\n\t\tlog.Error(\"Was not able to open file\", \"path\", path, \"error\", err)\n\t\treturn err\n\t}\n\tdecoder := gob.NewDecoder(file)\n\terr = decoder.Decode(object)\n\tif err != nil {\n\t\tlog.Error(\"Was not able to decode file.\", \"path\", path, \"error\", err)\n\t}\n\treturn err\n}",
"func (be s3) Load(h backend.Handle, p []byte, off int64) (int, error) {\n\tdebug.Log(\"s3.Load\", \"%v, offset %v, len %v\", h, off, len(p))\n\tpath := be.s3path(h.Type, h.Name)\n\tobj, err := be.client.GetObject(be.bucketname, path)\n\tif err != nil {\n\t\tdebug.Log(\"s3.GetReader\", \" err %v\", err)\n\t\treturn 0, err\n\t}\n\n\tif off > 0 {\n\t\t_, err = obj.Seek(off, 0)\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t}\n\n\t<-be.connChan\n\tdefer func() {\n\t\tbe.connChan <- struct{}{}\n\t}()\n\treturn io.ReadFull(obj, p)\n}",
"func Load(key string, loader ValuesLoader) (Values, error) {\n\treturn nil, nil\n}",
"func (a *Art) Load() error {\n\timg, err := resources.Image(a.Path)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"load image: %w\", err)\n\t}\n\ta.img = img\n\treturn nil\n}",
"func LoadModelAssets(path string) (Model, error) {\n\tfsys, err := assets.Open(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tmodel, err := LoadModel(fsys)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to load : %w\", err)\n\t}\n\treturn model, nil\n}",
"func Load(aseJSONFilePath string) File {\n\tfile := readFile(aseJSONFilePath)\n\n\tase := LoadBytes(file)\n\n\t// Make path absolute\n\tif path, err := filepath.Abs(ase.ImagePath); err != nil {\n\t\tlog.Fatalln(err)\n\t} else {\n\t\tase.ImagePath = path\n\t}\n\treturn ase\n}",
"func (_ EventFilterAliases) RuntimeAssets(p graphql.ResolveParams) (interface{}, error) {\n\tval, err := graphql.DefaultResolver(p.Source, p.Info.FieldName)\n\treturn val, err\n}",
"func Asset(name string) ([]byte, error) {\n\tif f, ok := _bindata[name]; ok {\n\t\treturn f()\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tif f, ok := _bindata[name]; ok {\n\t\treturn f()\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tif f, ok := _bindata[name]; ok {\n\t\treturn f()\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tif f, ok := _bindata[name]; ok {\n\t\treturn f()\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tif f, ok := _bindata[name]; ok {\n\t\treturn f()\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func (v Var[V]) EagerLoading(s *Spec) Var[V] {\n\ts.testingTB.Helper()\n\ts.Before(func(t *T) { _ = v.Get(t) })\n\treturn v\n}",
"func Load(file string, v interface{}) error {\n\tf, err := gzipf.Open(file)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer f.Close()\n\treturn json.NewDecoder(f).Decode(v)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}",
"func Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}"
] |
[
"0.6042959",
"0.59700006",
"0.5968804",
"0.5674104",
"0.5474197",
"0.5368372",
"0.5366404",
"0.5324554",
"0.53092057",
"0.5307818",
"0.5303852",
"0.5300512",
"0.5268237",
"0.52452546",
"0.5240789",
"0.5219796",
"0.5219796",
"0.5197039",
"0.51800424",
"0.5179764",
"0.51496065",
"0.51496065",
"0.5146764",
"0.5139849",
"0.51332897",
"0.5128685",
"0.5110416",
"0.5103005",
"0.5085335",
"0.5078373",
"0.50731933",
"0.50731933",
"0.50731933",
"0.50731933",
"0.50731933",
"0.50635105",
"0.50631416",
"0.5061768",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905",
"0.50609905"
] |
0.68002754
|
0
|
LoadOrig allows an eager lookup of values, cached into the loaded structs of the objects.
|
func (assetRevisionL) LoadOrig(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {
var slice []*AssetRevision
var object *AssetRevision
count := 1
if singular {
object = maybeAssetRevision.(*AssetRevision)
} else {
slice = *maybeAssetRevision.(*AssetRevisionSlice)
count = len(slice)
}
args := make([]interface{}, count)
if singular {
if object.R == nil {
object.R = &assetRevisionR{}
}
args[0] = object.Orig
} else {
for i, obj := range slice {
if obj.R == nil {
obj.R = &assetRevisionR{}
}
args[i] = obj.Orig
}
}
query := fmt.Sprintf(
"select * from \"asset\" where \"id\" in (%s)",
strmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),
)
if boil.DebugMode {
fmt.Fprintf(boil.DebugWriter, "%s\n%v\n", query, args)
}
results, err := e.Query(query, args...)
if err != nil {
return errors.Wrap(err, "failed to eager load Asset")
}
defer results.Close()
var resultSlice []*Asset
if err = queries.Bind(results, &resultSlice); err != nil {
return errors.Wrap(err, "failed to bind eager loaded slice Asset")
}
if len(assetRevisionAfterSelectHooks) != 0 {
for _, obj := range resultSlice {
if err := obj.doAfterSelectHooks(e); err != nil {
return err
}
}
}
if len(resultSlice) == 0 {
return nil
}
if singular {
object.R.Orig = resultSlice[0]
return nil
}
for _, local := range slice {
for _, foreign := range resultSlice {
if local.Orig == foreign.ID {
local.R.Orig = foreign
break
}
}
}
return nil
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (originL) LoadOriginOPA(ctx context.Context, e boil.ContextExecutor, singular bool, maybeOrigin interface{}, mods queries.Applicator) error {\n\tvar slice []*Origin\n\tvar object *Origin\n\n\tif singular {\n\t\tobject = maybeOrigin.(*Origin)\n\t} else {\n\t\tslice = *maybeOrigin.(*[]*Origin)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &originR{}\n\t\t}\n\t\targs = append(args, object.Name)\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &originR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif queries.Equal(a, obj.Name) {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.Name)\n\t\t}\n\t}\n\n\tif len(args) == 0 {\n\t\treturn nil\n\t}\n\n\tquery := NewQuery(qm.From(`origin_packages`), qm.WhereIn(`origin in ?`, args...))\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.QueryContext(ctx, e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load origin_packages\")\n\t}\n\n\tvar resultSlice []*OriginPackage\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice origin_packages\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results in eager load on origin_packages\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for origin_packages\")\n\t}\n\n\tif len(originPackageAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif singular {\n\t\tobject.R.OriginOPA = resultSlice\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif foreign.R == nil {\n\t\t\t\tforeign.R = &originPackageR{}\n\t\t\t}\n\t\t\tforeign.R.OriginName = object\n\t\t}\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif queries.Equal(local.Name, foreign.Origin) {\n\t\t\t\tlocal.R.OriginOPA = append(local.R.OriginOPA, foreign)\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &originPackageR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.OriginName = local\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (originL) LoadOriginAP(ctx context.Context, e boil.ContextExecutor, singular bool, maybeOrigin interface{}, mods queries.Applicator) error {\n\tvar slice []*Origin\n\tvar object *Origin\n\n\tif singular {\n\t\tobject = maybeOrigin.(*Origin)\n\t} else {\n\t\tslice = *maybeOrigin.(*[]*Origin)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &originR{}\n\t\t}\n\t\targs = append(args, object.Name)\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &originR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif queries.Equal(a, obj.Name) {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.Name)\n\t\t}\n\t}\n\n\tif len(args) == 0 {\n\t\treturn nil\n\t}\n\n\tquery := NewQuery(qm.From(`audit_package`), qm.WhereIn(`origin in ?`, args...))\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.QueryContext(ctx, e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load audit_package\")\n\t}\n\n\tvar resultSlice []*AuditPackage\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice audit_package\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results in eager load on audit_package\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for audit_package\")\n\t}\n\n\tif len(auditPackageAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif singular {\n\t\tobject.R.OriginAP = resultSlice\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif foreign.R == nil {\n\t\t\t\tforeign.R = &auditPackageR{}\n\t\t\t}\n\t\t\tforeign.R.OriginName = object\n\t\t}\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif queries.Equal(local.Name, foreign.Origin) {\n\t\t\t\tlocal.R.OriginAP = append(local.R.OriginAP, foreign)\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &auditPackageR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.OriginName = local\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func Load(dst interface{}, val, key string) error {\n\treturn DefaultReader.Load(dst, val, key)\n}",
"func (rc *ResourceCacheMap) Load(values ...*unstructured.Unstructured) error {\n\tfor _, value := range values {\n\t\tkey, err := object.UnstructuredToObjMeta(value)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to create resource cache key: %w\", err)\n\t\t}\n\t\trc.cache[key] = value\n\t}\n\treturn nil\n}",
"func (v *Value) Load() (x interface{}) {\n\tvp := (*ifaceWords)(unsafe.Pointer(v))\n\ttyp := LoadPointer(&vp.typ)\n\tif typ == nil || uintptr(typ) == ^uintptr(0) {\n\t\t// First store not yet completed.\n\t\treturn nil\n\t}\n\tdata := LoadPointer(&vp.data)\n\txp := (*ifaceWords)(unsafe.Pointer(&x))\n\txp.typ = typ\n\txp.data = data\n\treturn\n}",
"func (testEntityInline_EntityInfo) Load(txn *objectbox.Transaction, bytes []byte) (interface{}, error) {\n\tvar table = &flatbuffers.Table{\n\t\tBytes: bytes,\n\t\tPos: flatbuffers.GetUOffsetT(bytes),\n\t}\n\tvar id = table.GetUint64Slot(8, 0)\n\n\treturn &TestEntityInline{\n\t\tBaseWithDate: BaseWithDate{\n\t\t\tDate: table.GetInt64Slot(4, 0),\n\t\t},\n\t\tBaseWithValue: &BaseWithValue{\n\t\t\tValue: table.GetFloat64Slot(6, 0),\n\t\t},\n\t\tId: id,\n\t}, nil\n}",
"func (pool *ComplexPool) Load() error {\n\tlogger.Debugf(\"prox (%p): attempting to load new proxies\", pool)\n\n\terr := pool.Fetch()\n\tif err == nil {\n\t\tpool.Filter(pool.filters...)\n\t\treturn nil\n\t}\n\n\tif pool.Config.FallbackToCached {\n\t\tlogger.Errorf(\"prox (%p): error occurred while fetching proxies: %v\", pool, err)\n\n\t\terr := pool.ApplyCache()\n\t\tif err == nil {\n\t\t\tpool.Filter(pool.filters...)\n\t\t\treturn nil\n\t\t}\n\n\t\tlogger.Errorf(\"prov (%p): could not apply cache\", pool)\n\t}\n\n\tif pool.Config.FallbackToBackupProviders {\n\t\tlogger.Errorf(\"prox (%p): error occurred while fetching proxies: %v\", pool, err)\n\t\tlogger.Errorf(\"prox (%p): falling back to fallback providers\", pool)\n\n\t\terr = pool.FetchFallback()\n\t\tif err == nil {\n\t\t\tpool.Filter(pool.filters...)\n\t\t\treturn nil\n\t\t}\n\n\t\tlogger.Errorf(\"prox (%p): error occurred while fetching fallback proxies: %v\", pool, err)\n\t}\n\n\treturn err\n}",
"func (originL) LoadOriginOM(ctx context.Context, e boil.ContextExecutor, singular bool, maybeOrigin interface{}, mods queries.Applicator) error {\n\tvar slice []*Origin\n\tvar object *Origin\n\n\tif singular {\n\t\tobject = maybeOrigin.(*Origin)\n\t} else {\n\t\tslice = *maybeOrigin.(*[]*Origin)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &originR{}\n\t\t}\n\t\targs = append(args, object.Name)\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &originR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif queries.Equal(a, obj.Name) {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.Name)\n\t\t}\n\t}\n\n\tif len(args) == 0 {\n\t\treturn nil\n\t}\n\n\tquery := NewQuery(qm.From(`origin_members`), qm.WhereIn(`origin in ?`, args...))\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.QueryContext(ctx, e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load origin_members\")\n\t}\n\n\tvar resultSlice []*OriginMember\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice origin_members\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results in eager load on origin_members\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for origin_members\")\n\t}\n\n\tif len(originMemberAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif singular {\n\t\tobject.R.OriginOM = resultSlice\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif foreign.R == nil {\n\t\t\t\tforeign.R = &originMemberR{}\n\t\t\t}\n\t\t\tforeign.R.OriginName = object\n\t\t}\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif queries.Equal(local.Name, foreign.Origin) {\n\t\t\t\tlocal.R.OriginOM = append(local.R.OriginOM, foreign)\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &originMemberR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.OriginName = local\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (c *ChunkRef) Load(ps []datastore.Property) error {\n\treturn datastore.LoadStruct(c, ps)\n}",
"func (originL) LoadOriginOPR(ctx context.Context, e boil.ContextExecutor, singular bool, maybeOrigin interface{}, mods queries.Applicator) error {\n\tvar slice []*Origin\n\tvar object *Origin\n\n\tif singular {\n\t\tobject = maybeOrigin.(*Origin)\n\t} else {\n\t\tslice = *maybeOrigin.(*[]*Origin)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &originR{}\n\t\t}\n\t\targs = append(args, object.Name)\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &originR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif queries.Equal(a, obj.Name) {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.Name)\n\t\t}\n\t}\n\n\tif len(args) == 0 {\n\t\treturn nil\n\t}\n\n\tquery := NewQuery(qm.From(`origin_projects`), qm.WhereIn(`origin in ?`, args...))\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.QueryContext(ctx, e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load origin_projects\")\n\t}\n\n\tvar resultSlice []*OriginProject\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice origin_projects\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results in eager load on origin_projects\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for origin_projects\")\n\t}\n\n\tif len(originProjectAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif singular {\n\t\tobject.R.OriginOPR = resultSlice\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif foreign.R == nil {\n\t\t\t\tforeign.R = &originProjectR{}\n\t\t\t}\n\t\t\tforeign.R.OriginName = object\n\t\t}\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif queries.Equal(local.Name, foreign.Origin) {\n\t\t\t\tlocal.R.OriginOPR = append(local.R.OriginOPR, foreign)\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &originProjectR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.OriginName = local\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Origin) Reload(ctx context.Context, exec boil.ContextExecutor) error {\n\tret, err := FindOrigin(ctx, exec, o.Name)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*o = *ret\n\treturn nil\n}",
"func (testEntityRelated_EntityInfo) Load(txn *objectbox.Transaction, bytes []byte) (interface{}, error) {\n\tvar table = &flatbuffers.Table{\n\t\tBytes: bytes,\n\t\tPos: flatbuffers.GetUOffsetT(bytes),\n\t}\n\tvar id = table.GetUint64Slot(4, 0)\n\n\tvar relNext *EntityByValue\n\tif rId := table.GetUint64Slot(8, 0); rId > 0 {\n\t\tif err := txn.RunWithCursor(EntityByValueBinding.Id, func(targetCursor *objectbox.Cursor) error {\n\t\t\tif relObject, err := targetCursor.Get(rId); err != nil {\n\t\t\t\treturn err\n\t\t\t} else if relObj, ok := relObject.(*EntityByValue); ok {\n\t\t\t\trelNext = relObj\n\t\t\t} else {\n\t\t\t\tvar relObj = relObject.(EntityByValue)\n\t\t\t\trelNext = &relObj\n\t\t\t}\n\t\t\treturn nil\n\t\t}); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tvar relNextSlice []EntityByValue\n\tif err := txn.RunWithCursor(TestEntityRelatedBinding.Id, func(cursor *objectbox.Cursor) error {\n\t\tif rSlice, err := cursor.RelationGetAll(6, EntityByValueBinding.Id, id); err != nil {\n\t\t\treturn err\n\t\t} else {\n\t\t\trelNextSlice = rSlice.([]EntityByValue)\n\t\t\treturn nil\n\t\t}\n\t}); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &TestEntityRelated{\n\t\tId: id,\n\t\tName: fbutils.GetStringSlot(table, 6),\n\t\tNext: relNext,\n\t\tNextSlice: relNextSlice,\n\t}, nil\n}",
"func (d *Datastore) Load() (Object, error) {\n\td.localLock.Lock()\n\tdefer d.localLock.Unlock()\n\n\t// clear Object first, as mapstructure's decoder doesn't have ZeroFields set to true for merging purposes\n\td.meta.Object = d.meta.Object[:0]\n\n\terr := d.kv.LoadConfig(d.meta)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = d.meta.unmarshall()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn d.meta.object, nil\n}",
"func (contentUnitDerivationL) LoadSource(e boil.Executor, singular bool, maybeContentUnitDerivation interface{}, mods queries.Applicator) error {\n\tvar slice []*ContentUnitDerivation\n\tvar object *ContentUnitDerivation\n\n\tif singular {\n\t\tobject = maybeContentUnitDerivation.(*ContentUnitDerivation)\n\t} else {\n\t\tslice = *maybeContentUnitDerivation.(*[]*ContentUnitDerivation)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &contentUnitDerivationR{}\n\t\t}\n\t\targs = append(args, object.SourceID)\n\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &contentUnitDerivationR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif a == obj.SourceID {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.SourceID)\n\n\t\t}\n\t}\n\n\tif len(args) == 0 {\n\t\treturn nil\n\t}\n\n\tquery := NewQuery(\n\t\tqm.From(`content_units`),\n\t\tqm.WhereIn(`content_units.id in ?`, args...),\n\t)\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.Query(e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load ContentUnit\")\n\t}\n\n\tvar resultSlice []*ContentUnit\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice ContentUnit\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results of eager load for content_units\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for content_units\")\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tforeign := resultSlice[0]\n\t\tobject.R.Source = foreign\n\t\tif foreign.R == nil {\n\t\t\tforeign.R = &contentUnitR{}\n\t\t}\n\t\tforeign.R.SourceContentUnitDerivations = append(foreign.R.SourceContentUnitDerivations, object)\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.SourceID == foreign.ID {\n\t\t\t\tlocal.R.Source = foreign\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &contentUnitR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.SourceContentUnitDerivations = append(foreign.R.SourceContentUnitDerivations, local)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (originL) LoadOriginAPG(ctx context.Context, e boil.ContextExecutor, singular bool, maybeOrigin interface{}, mods queries.Applicator) error {\n\tvar slice []*Origin\n\tvar object *Origin\n\n\tif singular {\n\t\tobject = maybeOrigin.(*Origin)\n\t} else {\n\t\tslice = *maybeOrigin.(*[]*Origin)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &originR{}\n\t\t}\n\t\targs = append(args, object.Name)\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &originR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif queries.Equal(a, obj.Name) {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.Name)\n\t\t}\n\t}\n\n\tif len(args) == 0 {\n\t\treturn nil\n\t}\n\n\tquery := NewQuery(qm.From(`audit_package_group`), qm.WhereIn(`origin in ?`, args...))\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.QueryContext(ctx, e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load audit_package_group\")\n\t}\n\n\tvar resultSlice []*AuditPackageGroup\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice audit_package_group\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results in eager load on audit_package_group\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for audit_package_group\")\n\t}\n\n\tif len(auditPackageGroupAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif singular {\n\t\tobject.R.OriginAPG = resultSlice\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif foreign.R == nil {\n\t\t\t\tforeign.R = &auditPackageGroupR{}\n\t\t\t}\n\t\t\tforeign.R.OriginName = object\n\t\t}\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif queries.Equal(local.Name, foreign.Origin) {\n\t\t\t\tlocal.R.OriginAPG = append(local.R.OriginAPG, foreign)\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &auditPackageGroupR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.OriginName = local\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (s *MapSource) Load(_ *schema.StructValidator) (err error) {\n\treturn s.koanf.Load(confmap.Provider(s.m, constDelimiter), nil)\n}",
"func (d *Dao) Load(context data.Map, source *url.Resource, target interface{}) error {\n\ttext, err := source.DownloadText()\n\tif err != nil {\n\t\treturn err\n\t}\n\tcontext.Put(OwnerURL, source.URL)\n\tcontext.Put(NeatlyDao, d)\n\tAddStandardUdf(context)\n\ttext = strings.Replace(text, \"\\r\", \"\", len(text))\n\tscanner := bufio.NewScanner(strings.NewReader(text))\n\ttargetMap, err := d.load(context, source, scanner)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvar sourceMap = make(map[string]interface{})\n\terr = d.converter.AssignConverted(&sourceMap, source)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif d.includeMeta {\n\t\ttargetMap[\"Source\"] = sourceMap\n\t}\n\treturn d.converter.AssignConverted(target, targetMap)\n}",
"func (l *LazyMultiLoaderWithInclude) Load(id string) (*Lazy, error) {\n\tif id == \"\" {\n\t\treturn nil, newIllegalArgumentError(\"id cannot be empty string\")\n\t}\n\tids := []string{id}\n\t// result should be **Foo, make map[string]*Foo\n\n\tlazy := l.session.lazyLoadInternal(ids, l.includes, nil, nil)\n\tvalueFactory := func(result interface{}) error {\n\t\treturn lazy.GetValue(result)\n\t}\n\treturn newLazy(valueFactory), nil\n}",
"func (originL) LoadOriginOC(ctx context.Context, e boil.ContextExecutor, singular bool, maybeOrigin interface{}, mods queries.Applicator) error {\n\tvar slice []*Origin\n\tvar object *Origin\n\n\tif singular {\n\t\tobject = maybeOrigin.(*Origin)\n\t} else {\n\t\tslice = *maybeOrigin.(*[]*Origin)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &originR{}\n\t\t}\n\t\targs = append(args, object.Name)\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &originR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif queries.Equal(a, obj.Name) {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.Name)\n\t\t}\n\t}\n\n\tif len(args) == 0 {\n\t\treturn nil\n\t}\n\n\tquery := NewQuery(qm.From(`origin_channels`), qm.WhereIn(`origin in ?`, args...))\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.QueryContext(ctx, e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load origin_channels\")\n\t}\n\n\tvar resultSlice []*OriginChannel\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice origin_channels\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results in eager load on origin_channels\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for origin_channels\")\n\t}\n\n\tif len(originChannelAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif singular {\n\t\tobject.R.OriginOC = resultSlice\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif foreign.R == nil {\n\t\t\t\tforeign.R = &originChannelR{}\n\t\t\t}\n\t\t\tforeign.R.OriginName = object\n\t\t}\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif queries.Equal(local.Name, foreign.Origin) {\n\t\t\t\tlocal.R.OriginOC = append(local.R.OriginOC, foreign)\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &originChannelR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.OriginName = local\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (rec *TRec) Load(x *TVar) (v interface{}) {\n\tif v, ok := rec.writeSet[x]; ok {\n\t\treturn v // No validation\n\t}\n\tif rec.readSet == nil {\n\t\trec.readSet = make(map[*TVar]struct{})\n\t}\n\trec.readSet[x] = struct{}{}\n\t_, pre := x.lock.sampleLock()\n\tv = x.value.Load()\n\tlocked, post := x.lock.sampleLock()\n\tif locked || pre != post || post > rec.readVersion {\n\t\trec.aborted = true\n\t}\n\treturn v\n}",
"func load(T types.Type, addr *value) value {\n\tswitch T := T.Underlying().(type) {\n\tcase *types.Struct:\n\t\tv := (*addr).(structure)\n\t\ta := make(structure, len(v))\n\t\tfor i := range a {\n\t\t\ta[i] = load(T.Field(i).Type(), &v[i])\n\t\t}\n\t\treturn a\n\tcase *types.Array:\n\t\tv := (*addr).(array)\n\t\ta := make(array, len(v))\n\t\tfor i := range a {\n\t\t\ta[i] = load(T.Elem(), &v[i])\n\t\t}\n\t\treturn a\n\tdefault:\n\t\treturn *addr\n\t}\n}",
"func (s *DbRecorder) Load() error {\n\twhereParts := s.WhereIds()\n\tdest := s.FieldReferences(false)\n\n\tq := s.builder.Select(s.colList(false, false)...).From(s.table).Where(whereParts)\n\terr := q.QueryRow().Scan(dest...)\n\n\treturn err\n}",
"func (sourceL) LoadSourceI18ns(e boil.Executor, singular bool, maybeSource interface{}, mods queries.Applicator) error {\n\tvar slice []*Source\n\tvar object *Source\n\n\tif singular {\n\t\tobject = maybeSource.(*Source)\n\t} else {\n\t\tslice = *maybeSource.(*[]*Source)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &sourceR{}\n\t\t}\n\t\targs = append(args, object.ID)\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &sourceR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif a == obj.ID {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.ID)\n\t\t}\n\t}\n\n\tif len(args) == 0 {\n\t\treturn nil\n\t}\n\n\tquery := NewQuery(\n\t\tqm.From(`source_i18n`),\n\t\tqm.WhereIn(`source_i18n.source_id in ?`, args...),\n\t)\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.Query(e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load source_i18n\")\n\t}\n\n\tvar resultSlice []*SourceI18n\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice source_i18n\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results in eager load on source_i18n\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for source_i18n\")\n\t}\n\n\tif singular {\n\t\tobject.R.SourceI18ns = resultSlice\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif foreign.R == nil {\n\t\t\t\tforeign.R = &sourceI18nR{}\n\t\t\t}\n\t\t\tforeign.R.Source = object\n\t\t}\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif local.ID == foreign.SourceID {\n\t\t\t\tlocal.R.SourceI18ns = append(local.R.SourceI18ns, foreign)\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &sourceI18nR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.Source = local\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (originL) LoadOriginOS(ctx context.Context, e boil.ContextExecutor, singular bool, maybeOrigin interface{}, mods queries.Applicator) error {\n\tvar slice []*Origin\n\tvar object *Origin\n\n\tif singular {\n\t\tobject = maybeOrigin.(*Origin)\n\t} else {\n\t\tslice = *maybeOrigin.(*[]*Origin)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &originR{}\n\t\t}\n\t\targs = append(args, object.Name)\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &originR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif queries.Equal(a, obj.Name) {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.Name)\n\t\t}\n\t}\n\n\tif len(args) == 0 {\n\t\treturn nil\n\t}\n\n\tquery := NewQuery(qm.From(`origin_secrets`), qm.WhereIn(`origin in ?`, args...))\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.QueryContext(ctx, e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load origin_secrets\")\n\t}\n\n\tvar resultSlice []*OriginSecret\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice origin_secrets\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results in eager load on origin_secrets\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for origin_secrets\")\n\t}\n\n\tif len(originSecretAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif singular {\n\t\tobject.R.OriginOS = resultSlice\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif foreign.R == nil {\n\t\t\t\tforeign.R = &originSecretR{}\n\t\t\t}\n\t\t\tforeign.R.OriginName = object\n\t\t}\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif queries.Equal(local.Name, foreign.Origin) {\n\t\t\t\tlocal.R.OriginOS = append(local.R.OriginOS, foreign)\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &originSecretR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.OriginName = local\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func Import(ls *lua.LState, lv lua.LValue, v, orig interface{}) (err error) {\n\tdefer func() {\n\t\tif r := recover(); r != nil {\n\t\t\terr = fmt.Errorf(\"go2lua import panic: %v\\n%s\", r, string(debug.Stack()))\n\t\t}\n\t}()\n\t// orig may not be a pointer or empty interface, dereference v until the two values match\n\trV := reflect.ValueOf(v)\n\trOrig := reflect.ValueOf(orig)\n\tfor rV.IsValid() && rV.Type() != rOrig.Type() &&\n\t\t(rV.Type().Kind() == reflect.Interface || rV.Type().Kind() == reflect.Ptr) {\n\t\trV = rV.Elem()\n\t}\n\treturn importReflect(ls, lv, rV, rOrig)\n}",
"func Load(key string, loader ValuesLoader) (Values, error) {\n\treturn nil, nil\n}",
"func (originL) LoadOriginOI(ctx context.Context, e boil.ContextExecutor, singular bool, maybeOrigin interface{}, mods queries.Applicator) error {\n\tvar slice []*Origin\n\tvar object *Origin\n\n\tif singular {\n\t\tobject = maybeOrigin.(*Origin)\n\t} else {\n\t\tslice = *maybeOrigin.(*[]*Origin)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &originR{}\n\t\t}\n\t\targs = append(args, object.Name)\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &originR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif queries.Equal(a, obj.Name) {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.Name)\n\t\t}\n\t}\n\n\tif len(args) == 0 {\n\t\treturn nil\n\t}\n\n\tquery := NewQuery(qm.From(`origin_invitations`), qm.WhereIn(`origin in ?`, args...))\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.QueryContext(ctx, e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load origin_invitations\")\n\t}\n\n\tvar resultSlice []*OriginInvitation\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice origin_invitations\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results in eager load on origin_invitations\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for origin_invitations\")\n\t}\n\n\tif len(originInvitationAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif singular {\n\t\tobject.R.OriginOI = resultSlice\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif foreign.R == nil {\n\t\t\t\tforeign.R = &originInvitationR{}\n\t\t\t}\n\t\t\tforeign.R.OriginName = object\n\t\t}\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif queries.Equal(local.Name, foreign.Origin) {\n\t\t\t\tlocal.R.OriginOI = append(local.R.OriginOI, foreign)\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &originInvitationR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.OriginName = local\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (contentUnitDerivationL) LoadDerived(e boil.Executor, singular bool, maybeContentUnitDerivation interface{}, mods queries.Applicator) error {\n\tvar slice []*ContentUnitDerivation\n\tvar object *ContentUnitDerivation\n\n\tif singular {\n\t\tobject = maybeContentUnitDerivation.(*ContentUnitDerivation)\n\t} else {\n\t\tslice = *maybeContentUnitDerivation.(*[]*ContentUnitDerivation)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &contentUnitDerivationR{}\n\t\t}\n\t\targs = append(args, object.DerivedID)\n\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &contentUnitDerivationR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif a == obj.DerivedID {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.DerivedID)\n\n\t\t}\n\t}\n\n\tif len(args) == 0 {\n\t\treturn nil\n\t}\n\n\tquery := NewQuery(\n\t\tqm.From(`content_units`),\n\t\tqm.WhereIn(`content_units.id in ?`, args...),\n\t)\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.Query(e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load ContentUnit\")\n\t}\n\n\tvar resultSlice []*ContentUnit\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice ContentUnit\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results of eager load for content_units\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for content_units\")\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tforeign := resultSlice[0]\n\t\tobject.R.Derived = foreign\n\t\tif foreign.R == nil {\n\t\t\tforeign.R = &contentUnitR{}\n\t\t}\n\t\tforeign.R.DerivedContentUnitDerivations = append(foreign.R.DerivedContentUnitDerivations, object)\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.DerivedID == foreign.ID {\n\t\t\t\tlocal.R.Derived = foreign\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &contentUnitR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.DerivedContentUnitDerivations = append(foreign.R.DerivedContentUnitDerivations, local)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *RawVisit) Reload(ctx context.Context, exec boil.ContextExecutor) error {\n\tret, err := FindRawVisit(ctx, exec, o.ID)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*o = *ret\n\treturn nil\n}",
"func ObjectLoad(db *sql.DB, obj interface{}, extra string, args ...interface{}) (err error) {\n\tr := reflect.Indirect(reflect.ValueOf(obj)).Interface()\n\tquery := createQuery(r, false)\n\tif len(extra) > 0 {\n\t\tquery += \" \" + extra\n\t}\n\trow := db.QueryRow(query, args...)\n\tdest := sPtrs(obj)\n\treturn row.Scan(dest...)\n}",
"func (lm *LocalMeta) Load() error {\n\t// initialize gset\n\tvar err error\n\tlm.gset, err = gtid.ParserGTID(lm.flavor, \"\")\n\tif err != nil {\n\t\treturn errors.Trace(err)\n\t}\n\n\tfile, err := os.Open(lm.filename)\n\tif err != nil && !os.IsNotExist(errors.Cause(err)) {\n\t\treturn errors.Trace(err)\n\t}\n\n\tif os.IsNotExist(errors.Cause(err)) {\n\t\treturn nil\n\t}\n\tdefer file.Close()\n\n\t_, err = toml.DecodeReader(file, lm)\n\tif err != nil {\n\t\treturn errors.Trace(err)\n\t}\n\n\tlm.gset, err = gtid.ParserGTID(lm.flavor, lm.BinlogGTID)\n\treturn errors.Trace(err)\n}",
"func (originL) LoadOriginOSK(ctx context.Context, e boil.ContextExecutor, singular bool, maybeOrigin interface{}, mods queries.Applicator) error {\n\tvar slice []*Origin\n\tvar object *Origin\n\n\tif singular {\n\t\tobject = maybeOrigin.(*Origin)\n\t} else {\n\t\tslice = *maybeOrigin.(*[]*Origin)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &originR{}\n\t\t}\n\t\targs = append(args, object.Name)\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &originR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif queries.Equal(a, obj.Name) {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.Name)\n\t\t}\n\t}\n\n\tif len(args) == 0 {\n\t\treturn nil\n\t}\n\n\tquery := NewQuery(qm.From(`origin_secret_keys`), qm.WhereIn(`origin in ?`, args...))\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.QueryContext(ctx, e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load origin_secret_keys\")\n\t}\n\n\tvar resultSlice []*OriginSecretKey\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice origin_secret_keys\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results in eager load on origin_secret_keys\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for origin_secret_keys\")\n\t}\n\n\tif len(originSecretKeyAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif singular {\n\t\tobject.R.OriginOSK = resultSlice\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif foreign.R == nil {\n\t\t\t\tforeign.R = &originSecretKeyR{}\n\t\t\t}\n\t\t\tforeign.R.OriginName = object\n\t\t}\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif queries.Equal(local.Name, foreign.Origin) {\n\t\t\t\tlocal.R.OriginOSK = append(local.R.OriginOSK, foreign)\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &originSecretKeyR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.OriginName = local\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func Load(fileName string, src interface{}) error {\n\tfile, err := os.Open(fileName)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer file.Close()\n\tif err == nil {\n\t\tdecoder := gob.NewDecoder(file)\n\t\tif err = decoder.Decode(src); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\t// Restore parameters\n\tswitch src.(type) {\n\tcase Model:\n\t\tmodel := src.(Model)\n\t\tmodel.SetParams(model.GetParams())\n\tdefault:\n\t\treturn errors.New(\"the file is not a model dump\")\n\t}\n\treturn nil\n}",
"func (reading_EntityInfo) Load(ob *objectbox.ObjectBox, bytes []byte) (interface{}, error) {\n\tif len(bytes) == 0 { // sanity check, should \"never\" happen\n\t\treturn nil, errors.New(\"can't deserialize an object of type 'Reading' - no data received\")\n\t}\n\n\tvar table = &flatbuffers.Table{\n\t\tBytes: bytes,\n\t\tPos: flatbuffers.GetUOffsetT(bytes),\n\t}\n\n\tvar propId = table.GetUint64Slot(4, 0)\n\n\treturn &Reading{\n\t\tId: propId,\n\t\tDate: fbutils.GetInt64Slot(table, 6),\n\t\tEventId: fbutils.GetUint64Slot(table, 8),\n\t\tValueName: fbutils.GetStringSlot(table, 10),\n\t\tValueString: fbutils.GetStringSlot(table, 12),\n\t\tValueInteger: fbutils.GetInt64Slot(table, 14),\n\t\tValueFloating: fbutils.GetFloat64Slot(table, 16),\n\t\tValueInt32: fbutils.GetInt32Slot(table, 18),\n\t\tValueFloating32: fbutils.GetFloat32Slot(table, 20),\n\t}, nil\n}",
"func Load(file string, v interface{}) error {\n\tf, err := gzipf.Open(file)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer f.Close()\n\treturn json.NewDecoder(f).Decode(v)\n}",
"func (paymentObjectL) LoadCosts(ctx context.Context, e boil.ContextExecutor, singular bool, maybePaymentObject interface{}, mods queries.Applicator) error {\n\tvar slice []*PaymentObject\n\tvar object *PaymentObject\n\n\tif singular {\n\t\tobject = maybePaymentObject.(*PaymentObject)\n\t} else {\n\t\tslice = *maybePaymentObject.(*[]*PaymentObject)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &paymentObjectR{}\n\t\t}\n\t\targs = append(args, object.ID)\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &paymentObjectR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif a == obj.ID {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.ID)\n\t\t}\n\t}\n\n\tif len(args) == 0 {\n\t\treturn nil\n\t}\n\n\tquery := NewQuery(\n\t\tqm.From(`costs`),\n\t\tqm.WhereIn(`costs.payment_object in ?`, args...),\n\t)\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.QueryContext(ctx, e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load costs\")\n\t}\n\n\tvar resultSlice []*Cost\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice costs\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results in eager load on costs\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for costs\")\n\t}\n\n\tif len(costAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif singular {\n\t\tobject.R.Costs = resultSlice\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif foreign.R == nil {\n\t\t\t\tforeign.R = &costR{}\n\t\t\t}\n\t\t\tforeign.R.CostPaymentObject = object\n\t\t}\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif local.ID == foreign.PaymentObject {\n\t\t\t\tlocal.R.Costs = append(local.R.Costs, foreign)\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &costR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.CostPaymentObject = local\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (m *manager[K, V]) Load(key K) Ref[V] {\n\tif v, ok := m.loadFast(key); ok {\n\t\tvalue, err := v.Get(canceledContext)\n\t\tif err != nil || m.storage.Actual(key, value) {\n\t\t\treturn v\n\t\t}\n\t\tv.Release()\n\t\tm.delete(key, v.value)\n\t}\n\treturn m.loadSlow(key)\n}",
"func (be s3) Load(h backend.Handle, p []byte, off int64) (int, error) {\n\tdebug.Log(\"s3.Load\", \"%v, offset %v, len %v\", h, off, len(p))\n\tpath := be.s3path(h.Type, h.Name)\n\tobj, err := be.client.GetObject(be.bucketname, path)\n\tif err != nil {\n\t\tdebug.Log(\"s3.GetReader\", \" err %v\", err)\n\t\treturn 0, err\n\t}\n\n\tif off > 0 {\n\t\t_, err = obj.Seek(off, 0)\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t}\n\n\t<-be.connChan\n\tdefer func() {\n\t\tbe.connChan <- struct{}{}\n\t}()\n\treturn io.ReadFull(obj, p)\n}",
"func Load(path string, v interface{}) error {\n\tlock.Lock()\n\tdefer lock.Unlock()\n\tf, err := os.Open(path)\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\treturn err\n\t\t}\n\t}\n\tdefer f.Close()\n\treturn Unmarshal(f, v)\n}",
"func (d *Dao) load(loadingContext data.Map, source *url.Resource, scanner *bufio.Scanner) (map[string]interface{}, error) {\n\tvar objectContainer = data.NewMap()\n\tvar referenceValues = newReferenceValues()\n\tlines := readLines(scanner)\n\tdecoder := d.factory.Create(strings.NewReader(lines[0]))\n\trecord, tag, err := d.processRootHeaderLine(source, objectContainer, decoder)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar rootObject = objectContainer.GetMap(tag.Name)\n\tvar context = newTagContext(loadingContext, source, tag, objectContainer, referenceValues, rootObject, rootObject)\n\tfor i := 1; i < len(lines); i++ {\n\t\tvar recordHeight = 0\n\t\tline := lines[i]\n\t\tif strings.HasPrefix(line, arrayRowTerminator) { //replace array terminator\n\t\t\tline = strings.Replace(line, arrayRowTerminator, \"\", 1)\n\t\t}\n\t\tvar hasActiveIterator = tag.HasActiveIterator()\n\t\tline = d.expandMeta(context, line)\n\n\t\tisHeaderLine := !strings.HasPrefix(line, \",\")\n\t\tdecoder := d.factory.Create(strings.NewReader(line))\n\t\tif isHeaderLine {\n\t\t\tif hasActiveIterator {\n\t\t\t\tif tag.Iterator.Next() {\n\t\t\t\t\tcontext.tag.Subpath = \"\"\n\t\t\t\t\ti = tag.LineNumber\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t\trecord, tag, err = d.processHeaderLine(context, decoder, i)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\trecord.Record = make(map[string]interface{})\n\t\terr := decoder.Decode(record)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif !record.IsEmpty() {\n\t\t\tcontext.virtualObjects = data.NewMap()\n\t\t\tcontext.fieldIndex = make(map[string]int)\n\t\t\ttag.setTagObject(context, record.Record, d.includeMeta)\n\n\t\t\tif strings.Contains(line, \"$\") {\n\t\t\t\tfor k, v := range record.Record {\n\t\t\t\t\tif !toolbox.IsString(v) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\trecord.Record[k] = d.expandMeta(context, toolbox.AsString(v))\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor j := 1; j < len(record.Columns); j++ {\n\t\t\t\tif recordHeight, err = d.processCell(context, record, lines, i, j, recordHeight, true); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor j := 1; j < len(record.Columns); j++ {\n\t\t\t\tif recordHeight, err = d.processCell(context, record, lines, i, j, recordHeight, false); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tremoveEmptyElements(context.tagObject)\n\t\t}\n\n\t\ti += recordHeight\n\t\tvar isLast = i+1 == len(lines)\n\t\tif isLast && tag.HasActiveIterator() {\n\t\t\tif tag.Iterator.Next() {\n\t\t\t\tcontext.tag.Subpath = \"\"\n\t\t\t\ti = tag.LineNumber\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\t}\n\terr = referenceValues.CheckUnused()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn rootObject, nil\n}",
"func (originL) LoadOriginOPK(ctx context.Context, e boil.ContextExecutor, singular bool, maybeOrigin interface{}, mods queries.Applicator) error {\n\tvar slice []*Origin\n\tvar object *Origin\n\n\tif singular {\n\t\tobject = maybeOrigin.(*Origin)\n\t} else {\n\t\tslice = *maybeOrigin.(*[]*Origin)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &originR{}\n\t\t}\n\t\targs = append(args, object.Name)\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &originR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif queries.Equal(a, obj.Name) {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.Name)\n\t\t}\n\t}\n\n\tif len(args) == 0 {\n\t\treturn nil\n\t}\n\n\tquery := NewQuery(qm.From(`origin_public_keys`), qm.WhereIn(`origin in ?`, args...))\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.QueryContext(ctx, e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load origin_public_keys\")\n\t}\n\n\tvar resultSlice []*OriginPublicKey\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice origin_public_keys\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results in eager load on origin_public_keys\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for origin_public_keys\")\n\t}\n\n\tif len(originPublicKeyAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif singular {\n\t\tobject.R.OriginOPK = resultSlice\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif foreign.R == nil {\n\t\t\t\tforeign.R = &originPublicKeyR{}\n\t\t\t}\n\t\t\tforeign.R.OriginName = object\n\t\t}\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif queries.Equal(local.Name, foreign.Origin) {\n\t\t\t\tlocal.R.OriginOPK = append(local.R.OriginOPK, foreign)\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &originPublicKeyR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.OriginName = local\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func Load(path string, v interface{}) error {\n\tlock.Lock()\n\tdefer lock.Unlock()\n\tf, err := os.Open(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer f.Close()\n\treturn Unmarshal(f, v)\n}",
"func (m *Module) instLoad(old *ast.InstLoad, resolved, unresolved map[ast.NamedValue]value.Named) bool {\n\tif isUnresolved(unresolved, old.Src) {\n\t\treturn false\n\t}\n\tv := m.getLocal(old.Name)\n\tinst, ok := v.(*ir.InstLoad)\n\tif !ok {\n\t\tpanic(fmt.Errorf(\"invalid instruction type for instruction %s; expected *ir.InstLoad, got %T\", enc.Local(old.Name), v))\n\t}\n\tsrc := m.irValue(old.Src)\n\tsrcType, ok := src.Type().(*types.PointerType)\n\tif !ok {\n\t\tpanic(fmt.Errorf(\"invalid source type; expected *types.PointerType, got %T\", src.Type()))\n\t}\n\ttyp := srcType.Elem\n\tif got, want := typ, m.irType(old.Elem); !got.Equal(want) {\n\t\tm.errs = append(m.errs, errors.Errorf(\"source element type mismatch; expected `%v`, got `%v`\", want, got))\n\t}\n\tinst.Typ = typ\n\tinst.Src = src\n\tinst.Metadata = m.irMetadata(old.Metadata)\n\treturn true\n}",
"func Load(v interface{}, loadFrom string) error {\n\tcfg, err := ini.Load(loadFrom)\n\tif err != nil {\n\t\treturn err\n\t}\n\tcfg.NameMapper = ini.TitleUnderscore\n\n\treturn cfg.MapTo(v)\n}",
"func (v *Int64) Load() int64 {\n\ti, _ := v.i.Load().(int64)\n\treturn i\n}",
"func (v Var[V]) EagerLoading(s *Spec) Var[V] {\n\ts.testingTB.Helper()\n\ts.Before(func(t *T) { _ = v.Get(t) })\n\treturn v\n}",
"func (b *QueryBuilder) Load() []map[string]interface{} {\n\treturn nil\n}",
"func (sourceL) LoadSourceI18ns(e boil.Executor, singular bool, maybeSource interface{}) error {\n\tvar slice []*Source\n\tvar object *Source\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeSource.(*Source)\n\t} else {\n\t\tslice = *maybeSource.(*[]*Source)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &sourceR{}\n\t\t}\n\t\targs[0] = object.ID\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &sourceR{}\n\t\t\t}\n\t\t\targs[i] = obj.ID\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"source_i18n\\\" where \\\"source_id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load source_i18n\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*SourceI18n\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice source_i18n\")\n\t}\n\n\tif singular {\n\t\tobject.R.SourceI18ns = resultSlice\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif local.ID == foreign.SourceID {\n\t\t\t\tlocal.R.SourceI18ns = append(local.R.SourceI18ns, foreign)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func Load(db DB, table string, dst interface{}, pk interface{}) error {\n\treturn LoadContext(context.Background(), db, table, dst, pk)\n}",
"func (originL) LoadOriginOPUEK(ctx context.Context, e boil.ContextExecutor, singular bool, maybeOrigin interface{}, mods queries.Applicator) error {\n\tvar slice []*Origin\n\tvar object *Origin\n\n\tif singular {\n\t\tobject = maybeOrigin.(*Origin)\n\t} else {\n\t\tslice = *maybeOrigin.(*[]*Origin)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &originR{}\n\t\t}\n\t\targs = append(args, object.Name)\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &originR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif queries.Equal(a, obj.Name) {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.Name)\n\t\t}\n\t}\n\n\tif len(args) == 0 {\n\t\treturn nil\n\t}\n\n\tquery := NewQuery(qm.From(`origin_public_encryption_keys`), qm.WhereIn(`origin in ?`, args...))\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.QueryContext(ctx, e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load origin_public_encryption_keys\")\n\t}\n\n\tvar resultSlice []*OriginPublicEncryptionKey\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice origin_public_encryption_keys\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results in eager load on origin_public_encryption_keys\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for origin_public_encryption_keys\")\n\t}\n\n\tif len(originPublicEncryptionKeyAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif singular {\n\t\tobject.R.OriginOPUEK = resultSlice\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif foreign.R == nil {\n\t\t\t\tforeign.R = &originPublicEncryptionKeyR{}\n\t\t\t}\n\t\t\tforeign.R.OriginName = object\n\t\t}\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif queries.Equal(local.Name, foreign.Origin) {\n\t\t\t\tlocal.R.OriginOPUEK = append(local.R.OriginOPUEK, foreign)\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &originPublicEncryptionKeyR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.OriginName = local\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (b *baseLoader) Load(ctx context.Context, src *url.URL) (*Schema, error) {\n\t// open IO\n\tvar r io.ReadCloser\n\tswitch src.Scheme {\n\tcase \"file\":\n\t\tvar err error\n\t\tif r, err = os.Open(src.Path); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"unable to open %q from %q: %w\", src.Path, src, err)\n\t\t}\n\tcase \"http\", \"https\":\n\t\treq, err := http.NewRequestWithContext(ctx, http.MethodGet, src.String(), nil)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"unable to create request for %q: %w\", src, err)\n\t\t}\n\t\tresp, err := b.client.Do(req)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed requesting %q: %w\", src, err)\n\t\t}\n\t\tr = resp.Body\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unsupported scheme: %v\", src.Scheme)\n\t}\n\tdefer func() {\n\t\t_ = r.Close()\n\t}()\n\n\t// read and init schema\n\tvar s Schema\n\tif err := json.NewDecoder(r).Decode(&s); err != nil {\n\t\treturn nil, fmt.Errorf(\"decoding %q failed: %w\", src, err)\n\t}\n\tif s.ID == nil {\n\t\treturn nil, fmt.Errorf(\"no ID set on %q\", src)\n\t}\n\ts.calculateID()\n\ts.setSrc(src)\n\n\treturn &s, nil\n}",
"func (l *Loader) Preload(syms *sym.Symbols, f *bio.Reader, lib *sym.Library, unit *sym.CompilationUnit, length int64, flags int) {\n\troObject, readonly, err := f.Slice(uint64(length))\n\tif err != nil {\n\t\tlog.Fatal(\"cannot read object file:\", err)\n\t}\n\tr := goobj2.NewReaderFromBytes(roObject, readonly)\n\tif r == nil {\n\t\tif len(roObject) >= 8 && bytes.Equal(roObject[:8], []byte(\"\\x00go114ld\")) {\n\t\t\tlog.Fatalf(\"found object file %s in old format, but -go115newobj is true\\nset -go115newobj consistently in all -gcflags, -asmflags, and -ldflags\", f.File().Name())\n\t\t}\n\t\tpanic(\"cannot read object file\")\n\t}\n\tlocalSymVersion := syms.IncVersion()\n\tpkgprefix := objabi.PathToPrefix(lib.Pkg) + \".\"\n\tndef := r.NSym()\n\tnnonpkgdef := r.NNonpkgdef()\n\tor := &oReader{r, unit, localSymVersion, r.Flags(), pkgprefix, make([]Sym, ndef+nnonpkgdef+r.NNonpkgref()), ndef, uint32(len(l.objs))}\n\n\t// Autolib\n\tlib.ImportStrings = append(lib.ImportStrings, r.Autolib()...)\n\n\t// DWARF file table\n\tnfile := r.NDwarfFile()\n\tunit.DWARFFileTable = make([]string, nfile)\n\tfor i := range unit.DWARFFileTable {\n\t\tunit.DWARFFileTable[i] = r.DwarfFile(i)\n\t}\n\n\tl.addObj(lib.Pkg, or)\n\tl.preloadSyms(or, pkgDef)\n\n\t// The caller expects us consuming all the data\n\tf.MustSeek(length, os.SEEK_CUR)\n}",
"func WalkOrig(v cue.Value, before func(cue.Value) bool, after func(cue.Value), options ...cue.Option) {\n\n\t// call before and possibly stop recursion\n\tif before != nil && !before(v) {\n\t\treturn\n\t}\n\n\t// possibly recurse\n\tswitch v.IncompleteKind() {\n\tcase cue.StructKind:\n\t\tif options == nil {\n\t\t\toptions = defaultWalkOptions\n\t\t}\n\t\ts, _ := v.Fields(options...)\n\n\t\tfor s.Next() {\n\t\t\tWalk(s.Value(), before, after, options...)\n\t\t}\n\n\tcase cue.ListKind:\n\t\tl, _ := v.List()\n\t\tfor l.Next() {\n\t\t\tWalk(l.Value(), before, after, options...)\n\t\t}\n\n\t\t// no default (basic lit types)\n\n\t}\n\n\tif after != nil {\n\t\tafter(v)\n\t}\n\n}",
"func (sys *IAMSys) Load(objAPI ObjectLayer) error {\n\tif globalEtcdClient != nil {\n\t\treturn sys.refreshEtcd()\n\t}\n\treturn sys.refresh(objAPI)\n}",
"func (addressL) LoadCity(e boil.Executor, singular bool, maybeAddress interface{}) error {\n\tvar slice []*Address\n\tvar object *Address\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAddress.(*Address)\n\t} else {\n\t\tslice = *maybeAddress.(*[]*Address)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &addressR{}\n\t\t}\n\t\targs[0] = object.CityID\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &addressR{}\n\t\t\t}\n\t\t\targs[i] = obj.CityID\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from `city` where `city_id` in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load City\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*City\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice City\")\n\t}\n\n\tif len(addressAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.City = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.CityID == foreign.CityID {\n\t\t\t\tlocal.R.City = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func CloneRefOfLoad(n *Load) *Load {\n\tif n == nil {\n\t\treturn nil\n\t}\n\tout := *n\n\treturn &out\n}",
"func Load() error {\n\treturn def.Load()\n}",
"func (manager *basicStateManager) Load() error {\n\ts := manager.state\n\tseelog.Info(\"Loading state!\")\n\tdata, err := manager.readFile()\n\tif err != nil {\n\t\tseelog.Error(\"Error reading existing state file\", \"err\", err)\n\t\treturn err\n\t}\n\tif data == nil {\n\t\treturn nil\n\t}\n\t// Dry-run to make sure this is a version we can understand\n\terr = manager.dryRun(data)\n\tif err != nil {\n\t\treturn err\n\t}\n\t// Now load it into the actual state. The reason we do this with the\n\t// intermediate state is that we *must* unmarshal directly into the\n\t// \"saveable\" pointers we were given in AddSaveable; if we unmarshal\n\t// directly into a map with values of pointers, those pointers are lost.\n\t// We *must* unmarshal this way because the existing pointers could have\n\t// semi-initialized data (and are actually expected to)\n\n\tvar intermediate intermediateState\n\terr = json.Unmarshal(data, &intermediate)\n\tif err != nil {\n\t\tseelog.Debug(\"Could not unmarshal into intermediate\")\n\t\treturn err\n\t}\n\n\tfor key, rawJSON := range intermediate.Data {\n\t\tactualPointer, ok := manager.state.Data[key]\n\t\tif !ok {\n\t\t\tseelog.Error(\"Loading state: potentially malformed json key of \" + key)\n\t\t\tcontinue\n\t\t}\n\t\terr = json.Unmarshal(rawJSON, actualPointer)\n\t\tif err != nil {\n\t\t\tseelog.Debug(\"Could not unmarshal into actual\")\n\t\t\treturn err\n\t\t}\n\t}\n\n\tseelog.Debug(\"Loaded state!\", \"state\", s)\n\treturn nil\n}",
"func Load(db DB, table string, dst interface{}, pk int64) error {\n\treturn Default.Load(db, table, dst, pk)\n}",
"func (o *Latency) Reload(ctx context.Context, exec boil.ContextExecutor) error {\n\tret, err := FindLatency(ctx, exec, o.ID)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*o = *ret\n\treturn nil\n}",
"func (t *Time) Load() time.Time {\n\treturn t.v.Load().(time.Time)\n}",
"func (ds *RegularStateMachineWrapper) Loaded(from rsm.From) {\n\tds.mu.Lock()\n\tdefer ds.mu.Unlock()\n\tds.SetLoaded(from)\n}",
"func (this *DmnList) Load(src interface{}) error {\n\treturn load(this, src, `json`)\n}",
"func (list *List) Load(sources ...ProxySource) {\n\tfor _, source := range sources {\n\t\tgo Fetch(list.in, source)\n\t}\n}",
"func (zmap *Zapmap) Load() (err error) {\n\tzmap.file.Open(READ_ONLY)\n\tdefer zmap.file.Close()\n\tif zmap.file.size == 0 {return}\n\tzmap.Lock()\n\tf := func(rec *GenericRecord) error {\n\t\tif rec.ksz > 0 {\n\t\t\tkey, zrecs := rec.ToZapRecordList(zmap.debug)\n\t\t\tzmap.zapmap[key] = zrecs // Don't need to use gateway because zmap is fresh\n\t\t}\n\t\treturn nil\n\t}\n\terr = zmap.file.Process(f, ZAP_RECORD, true)\n\tzmap.Unlock()\n\treturn\n}",
"func (c *contextCredentialsStore) Load(creds *Credentials) {\n\t// Segregate from external call\n\tcpy := *creds\n\tc.mu.Lock()\n\tc.creds = &cpy\n\tc.mu.Unlock()\n}",
"func (s *JsonSource) Load() error {\n\n\tfile, err := ioutil.ReadFile(s.Path)\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = json.Unmarshal([]byte(file), s.TargetStruct)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}",
"func (at *Hash) Load() chainhash.Hash {\n\to := at.Value.Load().(chainhash.Hash)\n\tvar v chainhash.Hash\n\tcopy(v[:], o[:])\n\treturn v\n}",
"func (t *Timestamp) Load(v time.Time) *Timestamp {\n\tif t == nil {\n\t\tif v.IsZero() {\n\t\t\treturn nil\n\t\t}\n\n\t\tt = &Timestamp{}\n\t}\n\n\tt.Seconds = v.Unix()\n\tt.Nanos = int32(v.Nanosecond())\n\treturn t\n}",
"func (sourceL) LoadType(e boil.Executor, singular bool, maybeSource interface{}, mods queries.Applicator) error {\n\tvar slice []*Source\n\tvar object *Source\n\n\tif singular {\n\t\tobject = maybeSource.(*Source)\n\t} else {\n\t\tslice = *maybeSource.(*[]*Source)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &sourceR{}\n\t\t}\n\t\targs = append(args, object.TypeID)\n\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &sourceR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif a == obj.TypeID {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.TypeID)\n\n\t\t}\n\t}\n\n\tif len(args) == 0 {\n\t\treturn nil\n\t}\n\n\tquery := NewQuery(\n\t\tqm.From(`source_types`),\n\t\tqm.WhereIn(`source_types.id in ?`, args...),\n\t)\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.Query(e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load SourceType\")\n\t}\n\n\tvar resultSlice []*SourceType\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice SourceType\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results of eager load for source_types\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for source_types\")\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tforeign := resultSlice[0]\n\t\tobject.R.Type = foreign\n\t\tif foreign.R == nil {\n\t\t\tforeign.R = &sourceTypeR{}\n\t\t}\n\t\tforeign.R.TypeSources = append(foreign.R.TypeSources, object)\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.TypeID == foreign.ID {\n\t\t\t\tlocal.R.Type = foreign\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &sourceTypeR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.TypeSources = append(foreign.R.TypeSources, local)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (r FuncValue) Load() float64 {\n\treturn r()\n}",
"func (testStringIdEntity_EntityInfo) Load(txn *objectbox.Transaction, bytes []byte) (interface{}, error) {\n\tvar table = &flatbuffers.Table{\n\t\tBytes: bytes,\n\t\tPos: flatbuffers.GetUOffsetT(bytes),\n\t}\n\tvar id = table.GetUint64Slot(4, 0)\n\n\treturn &TestStringIdEntity{\n\t\tId: objectbox.StringIdConvertToEntityProperty(id),\n\t}, nil\n}",
"func (o *OriginSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error {\n\tif o == nil || len(*o) == 0 {\n\t\treturn nil\n\t}\n\n\tslice := OriginSlice{}\n\tvar args []interface{}\n\tfor _, obj := range *o {\n\t\tpkeyArgs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(obj)), originPrimaryKeyMapping)\n\t\targs = append(args, pkeyArgs...)\n\t}\n\n\tsql := \"SELECT \\\"origins\\\".* FROM \\\"origins\\\" WHERE \" +\n\t\tstrmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 1, originPrimaryKeyColumns, len(*o))\n\n\tq := queries.Raw(sql, args...)\n\n\terr := q.Bind(ctx, exec, &slice)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"models: unable to reload all in OriginSlice\")\n\t}\n\n\t*o = slice\n\n\treturn nil\n}",
"func (sourceL) LoadParent(e boil.Executor, singular bool, maybeSource interface{}, mods queries.Applicator) error {\n\tvar slice []*Source\n\tvar object *Source\n\n\tif singular {\n\t\tobject = maybeSource.(*Source)\n\t} else {\n\t\tslice = *maybeSource.(*[]*Source)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &sourceR{}\n\t\t}\n\t\tif !queries.IsNil(object.ParentID) {\n\t\t\targs = append(args, object.ParentID)\n\t\t}\n\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &sourceR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif queries.Equal(a, obj.ParentID) {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif !queries.IsNil(obj.ParentID) {\n\t\t\t\targs = append(args, obj.ParentID)\n\t\t\t}\n\n\t\t}\n\t}\n\n\tif len(args) == 0 {\n\t\treturn nil\n\t}\n\n\tquery := NewQuery(\n\t\tqm.From(`sources`),\n\t\tqm.WhereIn(`sources.id in ?`, args...),\n\t)\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.Query(e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Source\")\n\t}\n\n\tvar resultSlice []*Source\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Source\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results of eager load for sources\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for sources\")\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tforeign := resultSlice[0]\n\t\tobject.R.Parent = foreign\n\t\tif foreign.R == nil {\n\t\t\tforeign.R = &sourceR{}\n\t\t}\n\t\tforeign.R.ParentSources = append(foreign.R.ParentSources, object)\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif queries.Equal(local.ParentID, foreign.ID) {\n\t\t\t\tlocal.R.Parent = foreign\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &sourceR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.ParentSources = append(foreign.R.ParentSources, local)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (sourceL) LoadParent(e boil.Executor, singular bool, maybeSource interface{}) error {\n\tvar slice []*Source\n\tvar object *Source\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeSource.(*Source)\n\t} else {\n\t\tslice = *maybeSource.(*[]*Source)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &sourceR{}\n\t\t}\n\t\targs[0] = object.ParentID\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &sourceR{}\n\t\t\t}\n\t\t\targs[i] = obj.ParentID\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"sources\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Source\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Source\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Source\")\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Parent = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.ParentID.Int64 == foreign.ID {\n\t\t\t\tlocal.R.Parent = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (d *dht) Load(slots map[SlotID]*SlotInfo) error {\n\td.mu.Lock()\n\tdefer d.mu.Unlock()\n\n\td.slotVsNodes = slots // TODO: Verify if this will share memory\n\treturn nil\n}",
"func (originL) LoadOriginOPREK(ctx context.Context, e boil.ContextExecutor, singular bool, maybeOrigin interface{}, mods queries.Applicator) error {\n\tvar slice []*Origin\n\tvar object *Origin\n\n\tif singular {\n\t\tobject = maybeOrigin.(*Origin)\n\t} else {\n\t\tslice = *maybeOrigin.(*[]*Origin)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &originR{}\n\t\t}\n\t\targs = append(args, object.Name)\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &originR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif queries.Equal(a, obj.Name) {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.Name)\n\t\t}\n\t}\n\n\tif len(args) == 0 {\n\t\treturn nil\n\t}\n\n\tquery := NewQuery(qm.From(`origin_private_encryption_keys`), qm.WhereIn(`origin in ?`, args...))\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.QueryContext(ctx, e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load origin_private_encryption_keys\")\n\t}\n\n\tvar resultSlice []*OriginPrivateEncryptionKey\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice origin_private_encryption_keys\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results in eager load on origin_private_encryption_keys\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for origin_private_encryption_keys\")\n\t}\n\n\tif len(originPrivateEncryptionKeyAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif singular {\n\t\tobject.R.OriginOPREK = resultSlice\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif foreign.R == nil {\n\t\t\t\tforeign.R = &originPrivateEncryptionKeyR{}\n\t\t\t}\n\t\t\tforeign.R.OriginName = object\n\t\t}\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif queries.Equal(local.Name, foreign.Origin) {\n\t\t\t\tlocal.R.OriginOPREK = append(local.R.OriginOPREK, foreign)\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &originPrivateEncryptionKeyR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.OriginName = local\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (p *AtomicPtr) Load() *Value {\n\treturn (*Value)(atomic.LoadPointer(&p.ptr))\n}",
"func (f *NaiveMap) Load() float64 {\n\tf.lock.Lock()\n\tdefer f.lock.Unlock()\n\n\treturn float64(f.count) / float64(f.capacity)\n}",
"func loadBiolatencyBeforeObjects(obj interface{}, opts *ebpf.CollectionOptions) error {\n\tspec, err := loadBiolatencyBefore()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn spec.LoadAndAssign(obj, opts)\n}",
"func (e ExternalID) Load(ctx context.Context) (*Tryjob, error) {\n\ttjm := tryjobMap{ExternalID: e}\n\tswitch err := datastore.Get(ctx, &tjm); err {\n\tcase nil:\n\t\tbreak\n\tcase datastore.ErrNoSuchEntity:\n\t\treturn nil, nil\n\tdefault:\n\t\treturn nil, errors.Annotate(err, \"resolving ExternalID %q to a Tryjob\", e).Tag(transient.Tag).Err()\n\t}\n\n\tres := &Tryjob{ID: tjm.InternalID}\n\tif err := datastore.Get(ctx, res); err != nil {\n\t\t// It is unlikely that we'll find a tryjobMap referencing a Tryjob that\n\t\t// doesn't exist. And if we do it'll most likely be due to a retention\n\t\t// policy removing old entities, so the tryjobMap entity will be\n\t\t// removed soon as well.\n\t\treturn nil, errors.Annotate(err, \"retrieving Tryjob with ExternalID %q\", e).Tag(transient.Tag).Err()\n\t}\n\treturn res, nil\n}",
"func (gorilla Gorilla) Load(req *http.Request, key string, result interface{}) error {\n\tvalue := gorilla.Get(req, key)\n\tif value != \"\" {\n\t\treturn json.Unmarshal([]byte(value), result)\n\t}\n\treturn nil\n}",
"func (js JavaScriptHandler) Load(name string, code []string) {\n\t// Create a unique function name called the same as the object macro name.\n\tjs.functions[name] = fmt.Sprintf(`\n\t\tfunction object_%s(rs, args) {\n\t\t\t%s\n\t\t}\n\t`, name, strings.Join(code, \"\\n\"))\n\n\t// Run this code to load the function into the VM.\n\tjs.VM.RunString(js.functions[name])\n}",
"func (c *ContextCredentialsStore) Load(creds *Credentials) {\n\t// Segregate from external call\n\tcpy := *creds\n\tc.mu.Lock()\n\tc.creds = &cpy\n\tc.mu.Unlock()\n}",
"func getOldRow(ctx context.Context, sctx sessionctx.Context, txn kv.Transaction, t table.Table, handle int64,\n\tgenExprs []expression.Expression) ([]types.Datum, error) {\n\toldValue, err := txn.Get(ctx, t.RecordKey(handle))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tcols := t.WritableCols()\n\toldRow, oldRowMap, err := tables.DecodeRawRowData(sctx, t.Meta(), handle, cols, oldValue)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// Fill write-only and write-reorg columns with originDefaultValue if not found in oldValue.\n\tgIdx := 0\n\tfor _, col := range cols {\n\t\tif col.State != model.StatePublic && oldRow[col.Offset].IsNull() {\n\t\t\t_, found := oldRowMap[col.ID]\n\t\t\tif !found {\n\t\t\t\toldRow[col.Offset], err = table.GetColOriginDefaultValue(sctx, col.ToInfo())\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif col.IsGenerated() {\n\t\t\t// only the virtual column needs fill back.\n\t\t\tif !col.GeneratedStored {\n\t\t\t\tval, err := genExprs[gIdx].Eval(chunk.MutRowFromDatums(oldRow).ToRow())\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\toldRow[col.Offset], err = table.CastValue(sctx, val, col.ToInfo())\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t}\n\t\t\tgIdx++\n\t\t}\n\t}\n\treturn oldRow, nil\n}",
"func (stockCvtermL) LoadStock(e boil.Executor, singular bool, maybeStockCvterm interface{}) error {\n\tvar slice []*StockCvterm\n\tvar object *StockCvterm\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeStockCvterm.(*StockCvterm)\n\t} else {\n\t\tslice = *maybeStockCvterm.(*StockCvtermSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tobject.R = &stockCvtermR{}\n\t\targs[0] = object.StockID\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tobj.R = &stockCvtermR{}\n\t\t\targs[i] = obj.StockID\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"stock\\\" where \\\"stock_id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Stock\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Stock\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Stock\")\n\t}\n\n\tif len(stockCvtermAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif singular && len(resultSlice) != 0 {\n\t\tobject.R.Stock = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif local.StockID == foreign.StockID {\n\t\t\t\tlocal.R.Stock = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (sys *BucketMetadataSys) load(ctx context.Context, buckets []BucketInfo, objAPI ObjectLayer) error {\n\tsys.Lock()\n\tdefer sys.Unlock()\n\n\tfor _, bucket := range buckets {\n\t\tmeta, err := loadBucketMetadata(ctx, objAPI, bucket.Name)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsys.metadataMap[bucket.Name] = meta\n\t}\n\tsys.fallback = false\n\treturn nil\n}",
"func (o *FeatureCvtermDbxref) Reload(exec boil.Executor) error {\n\tret, err := FindFeatureCvtermDbxref(exec, o.FeatureCvtermDbxrefID)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*o = *ret\n\treturn nil\n}",
"func (s *DynamoDBStorage) Load(ctx *Context, loc string) ([]Pair, error) {\n\tLog(INFO, ctx, \"DynamoDBStorage.Load\", \"location\", loc)\n\tt := NewTimer(ctx, \"DynamoDBStorage.Load\")\n\tdefer t.Stop()\n\n\tk := dynamodb.Key{HashKey: loc}\n\t// ToDo: Reconsider GetItemConsistent()\n\n\ttimer := NewTimer(ctx, \"DynamoDBStorage.GetItem\")\n\tas, err := s.table.GetItemConsistent(&k, s.Consistent)\n\ttimer.Stop()\n\n\tif err == dynamodb.ErrNotFound {\n\t\treturn make([]Pair, 0, 0), nil\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tacc := make([]Pair, 0, len(as)-1)\n\t// ToDo: Find the last update timestamp, if any. Call\n\t// loc.update() to with the value or \"\" of no lock.\n\tfor key, v := range as {\n\t\tif key == \"id\" {\n\t\t\tcontinue\n\t\t}\n\t\tif key == LastUpdatedKey {\n\t\t\tLog(INFO, ctx, \"DynamoDBStorage.Load\", \"location\", loc, \"lastUpdated\", v.Value)\n\t\t\tctx.Location().Update(ctx, v.Value)\n\t\t\tcontinue\n\t\t}\n\t\tacc = append(acc, Pair{[]byte(v.Name), []byte(v.Value)})\n\t}\n\n\treturn acc, nil\n}",
"func (o *CMFFamilyUserPoliciesTake) Reload(ctx context.Context, exec boil.ContextExecutor) error {\n\tret, err := FindCMFFamilyUserPoliciesTake(ctx, exec, o.ID)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*o = *ret\n\treturn nil\n}",
"func (o *Illness) Reload(ctx context.Context, exec boil.ContextExecutor) error {\n\tret, err := FindIllness(ctx, exec, o.IllnessID)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*o = *ret\n\treturn nil\n}",
"func (o *Source) Reload(exec boil.Executor) error {\n\tret, err := FindSource(exec, o.ID)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*o = *ret\n\treturn nil\n}",
"func (o *Source) Reload(exec boil.Executor) error {\n\tret, err := FindSource(exec, o.ID)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*o = *ret\n\treturn nil\n}",
"func (d *Database) Load(db DB, table string, dst interface{}, pk int64) error {\n\tcolumns, err := d.ColumnsQuoted(dst, true)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// make sure we have a primary key field\n\tpkName, _, err := d.PrimaryKey(dst)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif pkName == \"\" {\n\t\treturn fmt.Errorf(\"meddler.Load: no primary key field found\")\n\t}\n\n\t// run the query\n\tq := fmt.Sprintf(\"SELECT %s FROM %s WHERE %s = %s\", columns, d.quoted(table), d.quoted(pkName), d.Placeholder)\n\n\trows, err := db.Query(q, pk)\n\tif err != nil {\n\t\treturn &dbErr{msg: \"meddler.Load: DB error in Query\", err: err}\n\t}\n\n\t// scan the row\n\treturn d.ScanRow(rows, dst)\n}",
"func (d *Database) Load(db DB, table string, dst interface{}, pk interface{}) error {\n\treturn d.LoadContext(context.Background(), db, table, dst, pk)\n}",
"func (o *HoldenAt) Reload(ctx context.Context, exec boil.ContextExecutor) error {\n\tret, err := FindHoldenAt(ctx, exec, o.ID)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*o = *ret\n\treturn nil\n}",
"func (o *RecordMeasure) Reload(exec boil.Executor) error {\n\tret, err := FindRecordMeasure(exec, o.ID)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*o = *ret\n\treturn nil\n}",
"func (g *Gonf) Load() error {\n\tb, err := ioutil.ReadFile(g.path)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tcfg := map[string]interface{}{}\n\tif err := json.Unmarshal(b, &cfg); err != nil {\n\t\treturn err\n\t}\n\n\t// forbids access to Get/Set local and HTTP while reloading\n\tg.confLock.Lock()\n\tdefer g.confLock.Unlock()\n\tg.conf = cfg\n\n\treturn g.load(cfg, []string{}, []otoFlag{})\n}",
"func (s *Store) Load(key string, dst interface{}) (bool, error) {\n\tval, ok, err := s.Get(key)\n\tif err != nil {\n\t\treturn false, fmt.Errorf(\"Failed to get %s: %v\", key, err)\n\t}\n\tif !ok {\n\t\treturn false, nil\n\t}\n\treturn true, mapstructure.Decode(val, dst)\n}",
"func (featureRelationshipL) LoadObject(e boil.Executor, singular bool, maybeFeatureRelationship interface{}) error {\n\tvar slice []*FeatureRelationship\n\tvar object *FeatureRelationship\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeFeatureRelationship.(*FeatureRelationship)\n\t} else {\n\t\tslice = *maybeFeatureRelationship.(*FeatureRelationshipSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tobject.R = &featureRelationshipR{}\n\t\targs[0] = object.ObjectID\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tobj.R = &featureRelationshipR{}\n\t\t\targs[i] = obj.ObjectID\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"feature\\\" where \\\"feature_id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Feature\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Feature\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Feature\")\n\t}\n\n\tif len(featureRelationshipAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif singular && len(resultSlice) != 0 {\n\t\tobject.R.Object = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif local.ObjectID == foreign.FeatureID {\n\t\t\t\tlocal.R.Object = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}"
] |
[
"0.58335334",
"0.570692",
"0.5697016",
"0.5585148",
"0.5525958",
"0.5523626",
"0.5469732",
"0.54667044",
"0.5449124",
"0.54303783",
"0.54164666",
"0.54011005",
"0.539395",
"0.53787416",
"0.53766215",
"0.5356737",
"0.5355561",
"0.5301893",
"0.52985173",
"0.5277675",
"0.5274297",
"0.52657855",
"0.5226666",
"0.52247614",
"0.5203585",
"0.52013904",
"0.5193109",
"0.5190565",
"0.51743644",
"0.5156909",
"0.513095",
"0.51266634",
"0.51226646",
"0.51222813",
"0.5109251",
"0.51053756",
"0.5104488",
"0.5101929",
"0.5084778",
"0.50764334",
"0.50605977",
"0.5057418",
"0.5050633",
"0.5036313",
"0.5031262",
"0.5025968",
"0.50178564",
"0.5014673",
"0.50058687",
"0.4995095",
"0.4986124",
"0.49797687",
"0.49624082",
"0.49600616",
"0.49588552",
"0.49332914",
"0.49263126",
"0.49152663",
"0.4903089",
"0.49027723",
"0.48875213",
"0.48694363",
"0.48694208",
"0.48684257",
"0.4867484",
"0.4861863",
"0.48584047",
"0.48568255",
"0.4851911",
"0.48495147",
"0.48439825",
"0.4843941",
"0.48436794",
"0.4837602",
"0.48357952",
"0.48296723",
"0.4829444",
"0.48198155",
"0.4818618",
"0.4818592",
"0.4816509",
"0.48081735",
"0.48012385",
"0.4800688",
"0.479801",
"0.479763",
"0.47968283",
"0.47871646",
"0.47870576",
"0.47828585",
"0.4782675",
"0.4778244",
"0.4778244",
"0.47773838",
"0.47744906",
"0.47709897",
"0.47649318",
"0.4764359",
"0.4754005",
"0.47507516"
] |
0.689459
|
0
|
SetAssetG of the asset_revision to the related item. Sets o.R.Asset to related. Adds o to related.R.AssetRevisions. Uses the global database handle.
|
func (o *AssetRevision) SetAssetG(insert bool, related *Asset) error {
return o.SetAsset(boil.GetDB(), insert, related)
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (o *AssetRevision) SetAssetGP(insert bool, related *Asset) {\n\tif err := o.SetAsset(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) SetAsset(exec boil.Executor, insert bool, related *Asset) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"asset_revision\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"asset\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, assetRevisionPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.Orig}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.Asset = related.ID\n\n\tif o.R == nil {\n\t\to.R = &assetRevisionR{\n\t\t\tAsset: related,\n\t\t}\n\t} else {\n\t\to.R.Asset = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &assetR{\n\t\t\tAssetRevisions: AssetRevisionSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.AssetRevisions = append(related.R.AssetRevisions, o)\n\t}\n\n\treturn nil\n}",
"func (o *AssetRevision) AssetG(mods ...qm.QueryMod) assetQuery {\n\treturn o.AssetByFk(boil.GetDB(), mods...)\n}",
"func AssetRevisionsG(mods ...qm.QueryMod) assetRevisionQuery {\n\treturn AssetRevisions(boil.GetDB(), mods...)\n}",
"func (o *AssetRevision) SetAssetP(exec boil.Executor, insert bool, related *Asset) {\n\tif err := o.SetAsset(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func FindAssetRevisionG(orig int, selectCols ...string) (*AssetRevision, error) {\n\treturn FindAssetRevision(boil.GetDB(), orig, selectCols...)\n}",
"func (o *AssetRevision) SetOrig(exec boil.Executor, insert bool, related *Asset) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"asset_revision\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"orig\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, assetRevisionPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.Orig}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.Orig = related.ID\n\n\tif o.R == nil {\n\t\to.R = &assetRevisionR{\n\t\t\tOrig: related,\n\t\t}\n\t} else {\n\t\to.R.Orig = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &assetR{\n\t\t\tOrigAssetRevision: o,\n\t\t}\n\t} else {\n\t\trelated.R.OrigAssetRevision = o\n\t}\n\n\treturn nil\n}",
"func (o *AssetRevision) SetOrigG(insert bool, related *Asset) error {\n\treturn o.SetOrig(boil.GetDB(), insert, related)\n}",
"func (o *AssetRevision) SetOrigGP(insert bool, related *Asset) {\n\tif err := o.SetOrig(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (g *GitHub) SetAsset(name string) {\n\tg.releaseAsset = name\n}",
"func (o *AssetRevision) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func FindAssetRevisionGP(orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(boil.GetDB(), orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (assetRevisionL) LoadAsset(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Asset\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Asset\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Asset = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Asset == foreign.ID {\n\t\t\t\tlocal.R.Asset = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Rental) SetInventoryGP(insert bool, related *Inventory) {\n\tif err := o.SetInventory(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Rental) SetInventoryG(insert bool, related *Inventory) error {\n\treturn o.SetInventory(boil.GetDB(), insert, related)\n}",
"func (o *ItemSide) SetItemG(ctx context.Context, insert bool, related *Item) error {\n\treturn o.SetItem(ctx, boil.GetContextDB(), insert, related)\n}",
"func (o *BraceletPhoto) SetBraceletG(insert bool, related *BraceletBracelet) error {\n\treturn o.SetBracelet(boil.GetDB(), insert, related)\n}",
"func (o *AssetRevision) UpdateG(whitelist ...string) error {\n\treturn o.Update(boil.GetDB(), whitelist...)\n}",
"func (o *BraceletPhoto) SetBracelet(exec boil.Executor, insert bool, related *BraceletBracelet) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE `bracelet_photo` SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, []string{\"bracelet_id\"}),\n\t\tstrmangle.WhereClause(\"`\", \"`\", 0, braceletPhotoPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.BraceletID = related.ID\n\n\tif o.R == nil {\n\t\to.R = &braceletPhotoR{\n\t\t\tBracelet: related,\n\t\t}\n\t} else {\n\t\to.R.Bracelet = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &braceletBraceletR{\n\t\t\tBraceletBraceletPhotos: BraceletPhotoSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.BraceletBraceletPhotos = append(related.R.BraceletBraceletPhotos, o)\n\t}\n\n\treturn nil\n}",
"func (o *BraceletPhoto) SetBraceletGP(insert bool, related *BraceletBracelet) {\n\tif err := o.SetBracelet(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Item) SetItemOptionG(ctx context.Context, insert bool, related *ItemOption) error {\n\treturn o.SetItemOption(ctx, boil.GetContextDB(), insert, related)\n}",
"func AssetRevisionExistsG(orig int) (bool, error) {\n\treturn AssetRevisionExists(boil.GetDB(), orig)\n}",
"func AssetRevisions(exec boil.Executor, mods ...qm.QueryMod) assetRevisionQuery {\n\tmods = append(mods, qm.From(\"\\\"asset_revision\\\"\"))\n\treturn assetRevisionQuery{NewQuery(exec, mods...)}\n}",
"func (r *Release) UploadAsset(path string) error {\n\tfile, err := os.OpenFile(path, os.O_RDONLY, 0755)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer file.Close()\n\tasset, _, err := r.client.Repositories.UploadReleaseAsset(context.Background(), r.owner, r.repository, r.ID, &gogithub.UploadOptions{\n\t\tName: filepath.Base(file.Name()),\n\t}, file)\n\tif err != nil {\n\t\treturn err\n\t}\n\tlog.Println(\"uploaded asset \", *asset.Name)\n\treturn nil\n}",
"func SetAsset(amount float64, symbol string) *types.Asset {\n\treturn &types.Asset{Amount: amount, Symbol: symbol}\n}",
"func (o *AssetRevision) ReloadGP() {\n\tif err := o.ReloadG(); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) OrigG(mods ...qm.QueryMod) assetQuery {\n\treturn o.OrigByFk(boil.GetDB(), mods...)\n}",
"func (o *AssetRevision) DeleteG() error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision provided for deletion\")\n\t}\n\n\treturn o.Delete(boil.GetDB())\n}",
"func AddAssetRevisionHook(hookPoint boil.HookPoint, assetRevisionHook AssetRevisionHook) {\n\tswitch hookPoint {\n\tcase boil.BeforeInsertHook:\n\t\tassetRevisionBeforeInsertHooks = append(assetRevisionBeforeInsertHooks, assetRevisionHook)\n\tcase boil.BeforeUpdateHook:\n\t\tassetRevisionBeforeUpdateHooks = append(assetRevisionBeforeUpdateHooks, assetRevisionHook)\n\tcase boil.BeforeDeleteHook:\n\t\tassetRevisionBeforeDeleteHooks = append(assetRevisionBeforeDeleteHooks, assetRevisionHook)\n\tcase boil.BeforeUpsertHook:\n\t\tassetRevisionBeforeUpsertHooks = append(assetRevisionBeforeUpsertHooks, assetRevisionHook)\n\tcase boil.AfterInsertHook:\n\t\tassetRevisionAfterInsertHooks = append(assetRevisionAfterInsertHooks, assetRevisionHook)\n\tcase boil.AfterSelectHook:\n\t\tassetRevisionAfterSelectHooks = append(assetRevisionAfterSelectHooks, assetRevisionHook)\n\tcase boil.AfterUpdateHook:\n\t\tassetRevisionAfterUpdateHooks = append(assetRevisionAfterUpdateHooks, assetRevisionHook)\n\tcase boil.AfterDeleteHook:\n\t\tassetRevisionAfterDeleteHooks = append(assetRevisionAfterDeleteHooks, assetRevisionHook)\n\tcase boil.AfterUpsertHook:\n\t\tassetRevisionAfterUpsertHooks = append(assetRevisionAfterUpsertHooks, assetRevisionHook)\n\t}\n}",
"func (r *Record) SetGobField(d *Db, number uint16, e interface{}) error {\n\tvar buffer bytes.Buffer\n\tencoder := gob.NewEncoder(&buffer)\n\terr := encoder.Encode(e)\n\tif err != nil {\n\t\treturn WDBError(fmt.Sprintf(\"Failed to add a record: %v\", err))\n\t}\n\n\tcKey := C.CString(reflect.TypeOf(e).String())\n\tdefer C.free(unsafe.Pointer(cKey))\n\tenc := C.wg_encode_blob(d.db, (*C.char)(unsafe.Pointer(&(buffer.Bytes())[0])), cKey, C.wg_int(buffer.Len()))\n\tif C.wg_set_field(d.db, r.rec, C.wg_int(number), enc) != 0 {\n\t\treturn WDBError(\"Could not set field\")\n\t}\n\treturn nil\n}",
"func setObjectRevision(obj client.Object, revision int64) {\n\ta := obj.GetAnnotations()\n\tif a == nil {\n\t\ta = map[string]string{}\n\t}\n\ta[revisionAnnotation] = fmt.Sprintf(\"%d\", revision)\n\tobj.SetAnnotations(a)\n}",
"func (o *BraceletPhoto) SetPhotoBraceletBraceletsG(insert bool, related ...*BraceletBracelet) error {\n\treturn o.SetPhotoBraceletBracelets(boil.GetDB(), insert, related...)\n}",
"func (assetRevisionL) LoadOrig(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Orig\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Orig\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Orig = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Orig == foreign.ID {\n\t\t\t\tlocal.R.Orig = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Stock) SetProductG(insert bool, related *Product) error {\n\treturn o.SetProduct(boil.GetDB(), insert, related)\n}",
"func SetGitTrackObjectCondition(status *farosv1alpha1.GitTrackObjectStatus, condition farosv1alpha1.GitTrackObjectCondition) {\n\tcurrentCond := GetGitTrackObjectCondition(*status, condition.Type)\n\tif currentCond != nil && currentCond.Status == condition.Status && currentCond.Reason == condition.Reason {\n\t\treturn\n\t}\n\t// Do not update lastTransitionTime if the status of the condition doesn't change.\n\tif currentCond != nil && currentCond.Status == condition.Status {\n\t\tcondition.LastTransitionTime = currentCond.LastTransitionTime\n\t}\n\tnewConditions := filterOutCondition(status.Conditions, condition.Type)\n\tstatus.Conditions = append(newConditions, condition)\n}",
"func (_m *gqlAssetConverter) ToGQL(in *v1beta1.Asset) (*gqlschema.Asset, error) {\n\tvar r0 *gqlschema.Asset\n\tvar r1 error\n\tr1 = _m.err\n\n\treturn r0, r1\n}",
"func (o *Transaction) SetProductG(insert bool, related *Product) error {\n\treturn o.SetProduct(boil.GetDB(), insert, related)\n}",
"func (o *Source) SetTypeG(insert bool, related *SourceType) error {\n\treturn o.SetType(boil.GetDB(), insert, related)\n}",
"func (o *Vote) SetOptionG(insert bool, related *Option) error {\n\treturn o.SetOption(boil.GetDB(), insert, related)\n}",
"func (o *ItemSide) SetSideItemG(ctx context.Context, insert bool, related *Item) error {\n\treturn o.SetSideItem(ctx, boil.GetContextDB(), insert, related)\n}",
"func AssetRevisionExistsGP(orig int) bool {\n\te, err := AssetRevisionExists(boil.GetDB(), orig)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn e\n}",
"func (o *RentalRower) SetRentalG(insert bool, related *Rental) error {\n\treturn o.SetRental(boil.GetDB(), insert, related)\n}",
"func (o *Jet) SetPilotG(insert bool, related *Pilot) error {\n\treturn o.SetPilot(boil.GetDB(), insert, related)\n}",
"func (o *AssetRevision) AssetByFk(exec boil.Executor, mods ...qm.QueryMod) assetQuery {\n\tqueryMods := []qm.QueryMod{\n\t\tqm.Where(\"id=?\", o.Asset),\n\t}\n\n\tqueryMods = append(queryMods, mods...)\n\n\tquery := Assets(exec, queryMods...)\n\tqueries.SetFrom(query.Query, \"\\\"asset\\\"\")\n\n\treturn query\n}",
"func (o *AssetRevision) UpsertG(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error {\n\treturn o.Upsert(boil.GetDB(), updateOnConflict, conflictColumns, updateColumns, whitelist...)\n}",
"func AssetsG(mods ...qm.QueryMod) assetQuery {\n\treturn Assets(boil.GetDB(), mods...)\n}",
"func (o *Item) SetKindG(ctx context.Context, insert bool, related *ItemKind) error {\n\treturn o.SetKind(ctx, boil.GetContextDB(), insert, related)\n}",
"func (o *BlackCard) SetSetG(insert bool, related *Set) error {\n\treturn o.SetSet(boil.GetDB(), insert, related)\n}",
"func (o *Organism) SetStock(exec boil.Executor, insert bool, related *Stock) error {\n\tvar err error\n\n\tif insert {\n\t\trelated.OrganismID.Int = o.OrganismID\n\t\trelated.OrganismID.Valid = true\n\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t} else {\n\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\"UPDATE \\\"stock\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"organism_id\"}),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, stockPrimaryKeyColumns),\n\t\t)\n\t\tvalues := []interface{}{o.OrganismID, related.StockID}\n\n\t\tif boil.DebugMode {\n\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t}\n\n\t\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t}\n\n\t\trelated.OrganismID.Int = o.OrganismID\n\t\trelated.OrganismID.Valid = true\n\t}\n\n\tif o.R == nil {\n\t\to.R = &organismR{\n\t\t\tStock: related,\n\t\t}\n\t} else {\n\t\to.R.Stock = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &stockR{\n\t\t\tOrganism: o,\n\t\t}\n\t} else {\n\t\trelated.R.Organism = o\n\t}\n\treturn nil\n}",
"func (k Keeper) SetJoinPoolAndStakeAsset(ctx sdk.Context, JoinPoolAndStakeAsset types.JoinPoolAndStakeAsset) {\n\tstore := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.JoinPoolAndStakeAssetKey))\n\tb := k.cdc.MustMarshalBinaryBare(&JoinPoolAndStakeAsset)\n\tstore.Set(GetJoinPoolAndStakeAssetIDBytes(JoinPoolAndStakeAsset.Id), b)\n}",
"func (o *BraceletPhoto) SetPhotoBraceletBraceletsGP(insert bool, related ...*BraceletBracelet) {\n\tif err := o.SetPhotoBraceletBracelets(boil.GetDB(), insert, related...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Rental) SetInventory(exec boil.Executor, insert bool, related *Inventory) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE `rental` SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, []string{\"inventory_id\"}),\n\t\tstrmangle.WhereClause(\"`\", \"`\", 0, rentalPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.InventoryID, o.RentalID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.InventoryID = related.InventoryID\n\n\tif o.R == nil {\n\t\to.R = &rentalR{\n\t\t\tInventory: related,\n\t\t}\n\t} else {\n\t\to.R.Inventory = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &inventoryR{\n\t\t\tRentals: RentalSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.Rentals = append(related.R.Rentals, o)\n\t}\n\n\treturn nil\n}",
"func (o *Item) SetItemSideG(ctx context.Context, insert bool, related *ItemSide) error {\n\treturn o.SetItemSide(ctx, boil.GetContextDB(), insert, related)\n}",
"func (u *mutableResource[GA, Alpha, Beta]) Set(src *GA) error {\n\tc := newCopier(u.copierOptions...)\n\tif err := c.do(reflect.ValueOf(&u.ga), reflect.ValueOf(src)); err != nil {\n\t\treturn err\n\t}\n\treturn u.postAccess(meta.VersionGA, postAccessSkipValidation)\n}",
"func (o *FeatureRelationship) SetObject(exec boil.Executor, insert bool, related *Feature) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"feature_relationship\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"object_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, featureRelationshipPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.FeatureID, o.FeatureRelationshipID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.ObjectID = related.FeatureID\n\n\tif o.R == nil {\n\t\to.R = &featureRelationshipR{\n\t\t\tObject: related,\n\t\t}\n\t} else {\n\t\to.R.Object = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &featureR{\n\t\t\tObjectFeatureRelationship: o,\n\t\t}\n\t} else {\n\t\trelated.R.ObjectFeatureRelationship = o\n\t}\n\n\treturn nil\n}",
"func (o *Organism) SetJbrowseOrganism(exec boil.Executor, insert bool, related *JbrowseOrganism) error {\n\tvar err error\n\n\tif insert {\n\t\trelated.OrganismID = o.OrganismID\n\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t} else {\n\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\"UPDATE \\\"jbrowse_organism\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"organism_id\"}),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, jbrowseOrganismPrimaryKeyColumns),\n\t\t)\n\t\tvalues := []interface{}{o.OrganismID, related.JbrowseOrganismID}\n\n\t\tif boil.DebugMode {\n\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t}\n\n\t\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t}\n\n\t\trelated.OrganismID = o.OrganismID\n\n\t}\n\n\tif o.R == nil {\n\t\to.R = &organismR{\n\t\t\tJbrowseOrganism: related,\n\t\t}\n\t} else {\n\t\to.R.JbrowseOrganism = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &jbrowseOrganismR{\n\t\t\tOrganism: o,\n\t\t}\n\t} else {\n\t\trelated.R.Organism = o\n\t}\n\treturn nil\n}",
"func (o *RecipeAdditive) SetRecipe(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Recipe) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"recipe_additive\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"recipe_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, recipeAdditivePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.IsDebug(ctx) {\n\t\twriter := boil.DebugWriterFrom(ctx)\n\t\tfmt.Fprintln(writer, updateQuery)\n\t\tfmt.Fprintln(writer, values)\n\t}\n\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.RecipeID = related.ID\n\tif o.R == nil {\n\t\to.R = &recipeAdditiveR{\n\t\t\tRecipe: related,\n\t\t}\n\t} else {\n\t\to.R.Recipe = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &recipeR{\n\t\t\tRecipeAdditives: RecipeAdditiveSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.RecipeAdditives = append(related.R.RecipeAdditives, o)\n\t}\n\n\treturn nil\n}",
"func (o *Source) SetParentG(insert bool, related *Source) error {\n\treturn o.SetParent(boil.GetDB(), insert, related)\n}",
"func (o *Item) SetKind(ctx context.Context, exec boil.ContextExecutor, insert bool, related *ItemKind) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"items\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 0, []string{\"kind_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 0, itemPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.IsDebug(ctx) {\n\t\twriter := boil.DebugWriterFrom(ctx)\n\t\tfmt.Fprintln(writer, updateQuery)\n\t\tfmt.Fprintln(writer, values)\n\t}\n\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\tqueries.Assign(&o.KindID, related.ID)\n\tif o.R == nil {\n\t\to.R = &itemR{\n\t\t\tKind: related,\n\t\t}\n\t} else {\n\t\to.R.Kind = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &itemKindR{\n\t\t\tKindItems: ItemSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.KindItems = append(related.R.KindItems, o)\n\t}\n\n\treturn nil\n}",
"func (o *BraceletPhoto) SetUserG(insert bool, related *AuthUser) error {\n\treturn o.SetUser(boil.GetDB(), insert, related)\n}",
"func (o *StockCvterm) SetStockCvtermprop(exec boil.Executor, insert bool, related *StockCvtermprop) error {\n\tvar err error\n\n\tif insert {\n\t\trelated.StockCvtermID = o.StockCvtermID\n\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t} else {\n\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\"UPDATE \\\"stock_cvtermprop\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"stock_cvterm_id\"}),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, stockCvtermpropPrimaryKeyColumns),\n\t\t)\n\t\tvalues := []interface{}{o.StockCvtermID, related.StockCvtermpropID}\n\n\t\tif boil.DebugMode {\n\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t}\n\n\t\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t}\n\n\t\trelated.StockCvtermID = o.StockCvtermID\n\n\t}\n\n\tif o.R == nil {\n\t\to.R = &stockCvtermR{\n\t\t\tStockCvtermprop: related,\n\t\t}\n\t} else {\n\t\to.R.StockCvtermprop = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &stockCvtermpropR{\n\t\t\tStockCvterm: o,\n\t\t}\n\t} else {\n\t\trelated.R.StockCvterm = o\n\t}\n\treturn nil\n}",
"func (o *AssetRevision) UpdateGP(whitelist ...string) {\n\tif err := o.Update(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (a *assets) SetAssetFS(af ...AssetFS) {\n\ta.a = append(a.a, af...)\n}",
"func (o *Author) SetSourcesG(insert bool, related ...*Source) error {\n\treturn o.SetSources(boil.GetDB(), insert, related...)\n}",
"func (l *GenericMetadata) LinkToInterfaceRevisionOnFieldInterfaceRevision(target *InterfaceRevision) error {\n\tif target == nil {\n\t\treturn errors.New(\"start and end can not be nil\")\n\t}\n\n\tl.InterfaceRevision = target\n\n\ttarget.Metadata = l\n\n\treturn nil\n}",
"func (o *StockCvterm) SetStock(exec boil.Executor, insert bool, related *Stock) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"stock_cvterm\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"stock_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, stockCvtermPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.StockID, o.StockCvtermID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.StockID = related.StockID\n\n\tif o.R == nil {\n\t\to.R = &stockCvtermR{\n\t\t\tStock: related,\n\t\t}\n\t} else {\n\t\to.R.Stock = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &stockR{\n\t\t\tStockCvterm: o,\n\t\t}\n\t} else {\n\t\trelated.R.StockCvterm = o\n\t}\n\n\treturn nil\n}",
"func (a *chunkBasedAtlas) setObject(chunk int, local maths.Vector, object Object) {\n\ta.populate(chunk)\n\n\tc := a.Chunks[chunk]\n\ti := a.chunkTileIndex(local)\n\tif object.Type != roveapi.Object_ObjectUnknown {\n\t\tc.Objects[i] = object\n\t} else {\n\t\tdelete(c.Objects, i)\n\t}\n\ta.Chunks[chunk] = c\n}",
"func (o *BlackCard) SetG(mods ...qm.QueryMod) setQuery {\n\treturn o.Set(boil.GetDB(), mods...)\n}",
"func (o *BookCategoryAssign) SetBookG(ctx context.Context, insert bool, related *Book) error {\n\treturn o.SetBook(ctx, boil.GetContextDB(), insert, related)\n}",
"func RegisterAssetPeg(cdc *wire.Codec) {\n\tcdc.RegisterInterface((*types.AssetPeg)(nil), nil)\n\tcdc.RegisterConcrete(&types.BaseAssetPeg{}, \"commit-blockchain/AssetPeg\", nil)\n}",
"func (o *RentalRower) SetRowerG(insert bool, related *Rower) error {\n\treturn o.SetRower(boil.GetDB(), insert, related)\n}",
"func (o *Rental) SetCustomerG(insert bool, related *Customer) error {\n\treturn o.SetCustomer(boil.GetDB(), insert, related)\n}",
"func (o *AssetRevision) UpsertGP(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) {\n\tif err := o.Upsert(boil.GetDB(), updateOnConflict, conflictColumns, updateColumns, whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Source) SetTypeGP(insert bool, related *SourceType) {\n\tif err := o.SetType(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Source) SetAuthorsG(insert bool, related ...*Author) error {\n\treturn o.SetAuthors(boil.GetDB(), insert, related...)\n}",
"func (o *AssetRevision) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *Transaction) SetBlockHashG(insert bool, related *Block) error {\n\treturn o.SetBlockHash(boil.GetDB(), insert, related)\n}",
"func (o *StockCvterm) SetPub(exec boil.Executor, insert bool, related *Pub) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"stock_cvterm\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"pub_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, stockCvtermPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.PubID, o.StockCvtermID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.PubID = related.PubID\n\n\tif o.R == nil {\n\t\to.R = &stockCvtermR{\n\t\t\tPub: related,\n\t\t}\n\t} else {\n\t\to.R.Pub = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &pubR{\n\t\t\tStockCvterm: o,\n\t\t}\n\t} else {\n\t\trelated.R.StockCvterm = o\n\t}\n\n\treturn nil\n}",
"func (o *PremiumCode) SetSlotG(ctx context.Context, insert bool, related *PremiumSlot) error {\n\treturn o.SetSlot(ctx, boil.GetContextDB(), insert, related)\n}",
"func (self *GameObjectCreator) SetGameA(member *Game) {\n self.Object.Set(\"game\", member)\n}",
"func (o *RowerGroup) SetRowerG(insert bool, related *Rower) error {\n\treturn o.SetRower(boil.GetDB(), insert, related)\n}",
"func (o *FeatureRelationship) ObjectG(mods ...qm.QueryMod) featureQuery {\n\treturn o.Object(boil.GetDB(), mods...)\n}",
"func (ec *executionContext) _Asset(ctx context.Context, sel ast.SelectionSet, obj *models.Asset) graphql.Marshaler {\n\tfields := graphql.CollectFields(ctx, sel, assetImplementors)\n\n\tout := graphql.NewOrderedMap(len(fields))\n\tinvalid := false\n\tfor i, field := range fields {\n\t\tout.Keys[i] = field.Alias\n\n\t\tswitch field.Name {\n\t\tcase \"__typename\":\n\t\t\tout.Values[i] = graphql.MarshalString(\"Asset\")\n\t\tcase \"Id\":\n\t\t\tout.Values[i] = ec._Asset_Id(ctx, field, obj)\n\t\tcase \"Name\":\n\t\t\tout.Values[i] = ec._Asset_Name(ctx, field, obj)\n\t\tdefault:\n\t\t\tpanic(\"unknown field \" + strconv.Quote(field.Name))\n\t\t}\n\t}\n\n\tif invalid {\n\t\treturn graphql.Null\n\t}\n\treturn out\n}",
"func (o *Store) SetOrgG(ctx context.Context, insert bool, related *Org) error {\n\treturn o.SetOrg(ctx, boil.GetContextDB(), insert, related)\n}",
"func (self *Graphics) SetGameA(member *Game) {\n self.Object.Set(\"game\", member)\n}",
"func (image *Image2D) SetG(x, y int, g uint8) {\n\tidx := image.getIdx(x, y)\n\timage.data[idx+1] = g\n}",
"func (o *StockCvterm) SetCvterm(exec boil.Executor, insert bool, related *Cvterm) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"stock_cvterm\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"cvterm_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, stockCvtermPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.CvtermID, o.StockCvtermID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.CvtermID = related.CvtermID\n\n\tif o.R == nil {\n\t\to.R = &stockCvtermR{\n\t\t\tCvterm: related,\n\t\t}\n\t} else {\n\t\to.R.Cvterm = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &cvtermR{\n\t\t\tStockCvterm: o,\n\t\t}\n\t} else {\n\t\trelated.R.StockCvterm = o\n\t}\n\n\treturn nil\n}",
"func (o *Address) SetCityG(insert bool, related *City) error {\n\treturn o.SetCity(boil.GetDB(), insert, related)\n}",
"func (o *Item) SetSideItemItemSideG(ctx context.Context, insert bool, related *ItemSide) error {\n\treturn o.SetSideItemItemSide(ctx, boil.GetContextDB(), insert, related)\n}",
"func (o *Item) SetItemOption(ctx context.Context, exec boil.ContextExecutor, insert bool, related *ItemOption) error {\n\tvar err error\n\n\tif insert {\n\t\tqueries.Assign(&related.ItemID, o.ID)\n\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t} else {\n\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\"UPDATE \\\"item_options\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 0, []string{\"item_id\"}),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 0, itemOptionPrimaryKeyColumns),\n\t\t)\n\t\tvalues := []interface{}{o.ID, related.ItemID, related.OptionID}\n\n\t\tif boil.IsDebug(ctx) {\n\t\t\twriter := boil.DebugWriterFrom(ctx)\n\t\t\tfmt.Fprintln(writer, updateQuery)\n\t\t\tfmt.Fprintln(writer, values)\n\t\t}\n\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t}\n\n\t\tqueries.Assign(&related.ItemID, o.ID)\n\t}\n\n\tif o.R == nil {\n\t\to.R = &itemR{\n\t\t\tItemOption: related,\n\t\t}\n\t} else {\n\t\to.R.ItemOption = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &itemOptionR{\n\t\t\tItem: o,\n\t\t}\n\t} else {\n\t\trelated.R.Item = o\n\t}\n\treturn nil\n}",
"func (o *AssetRevision) SetOrigP(exec boil.Executor, insert bool, related *Asset) {\n\tif err := o.SetOrig(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Venda) SetRefGvm(v int64) {\n\to.RefGvm.Set(&v)\n}",
"func (o *AutomodRuleDatum) SetRuleG(ctx context.Context, insert bool, related *AutomodRule) error {\n\treturn o.SetRule(ctx, boil.GetContextDB(), insert, related)\n}",
"func (o *BraceletPhoto) SetUser(exec boil.Executor, insert bool, related *AuthUser) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE `bracelet_photo` SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, []string{\"user_id\"}),\n\t\tstrmangle.WhereClause(\"`\", \"`\", 0, braceletPhotoPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.UserID = related.ID\n\n\tif o.R == nil {\n\t\to.R = &braceletPhotoR{\n\t\t\tUser: related,\n\t\t}\n\t} else {\n\t\to.R.User = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &authUserR{\n\t\t\tUserBraceletPhotos: BraceletPhotoSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.UserBraceletPhotos = append(related.R.UserBraceletPhotos, o)\n\t}\n\n\treturn nil\n}",
"func (o *Vote) SetOptionGP(insert bool, related *Option) {\n\tif err := o.SetOption(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func AddAssetGenCmd(ctx *server.Context, cdc *codec.Codec,\n\tdefaultNodeHome, defaultClientHome string) *cobra.Command {\n\tcmd := &cobra.Command{\n\t\tUse: \"add-oracle-asset-gen [assetCode] [oracleAddresses]\",\n\t\tShort: \"Add oracle asset to genesis.json\",\n\t\tArgs: cobra.ExactArgs(2),\n\t\tRunE: func(_ *cobra.Command, args []string) error {\n\t\t\t// setup viper config\n\t\t\tconfig := ctx.Config\n\t\t\tconfig.SetRoot(viper.GetString(cli.HomeFlag))\n\n\t\t\t// parse inputs\n\t\t\tassetCode, err := helpers.ParseAssetCodeParam(\"assetCode\", args[0], helpers.ParamTypeCliArg)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\toracles, err := parseOraclesArg(\"oracleAddresses\", args[1])\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif len(oracles) == 0 {\n\t\t\t\treturn fmt.Errorf(\"%s argument %q: empty slice\", \"oracleAddresses\", args[1])\n\t\t\t}\n\n\t\t\t// retrieve the app state\n\t\t\tgenFile := config.GenesisFile()\n\t\t\tappState, genDoc, err := genutil.GenesisStateFromGenFile(cdc, genFile)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tvar genesisOracle types.GenesisState\n\t\t\tcdc.MustUnmarshalJSON(appState[types.ModuleName], &genesisOracle)\n\n\t\t\t// add asset to the module state\n\t\t\tfoundIdx := -1\n\t\t\tfor i, asset := range genesisOracle.Params.Assets {\n\t\t\t\tif asset.AssetCode == assetCode {\n\t\t\t\t\tfoundIdx = i\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif foundIdx == -1 {\n\t\t\t\tgenesisOracle.Params.Assets = append(genesisOracle.Params.Assets, types.NewAsset(assetCode, oracles, true))\n\t\t\t} else {\n\t\t\t\tgenesisOracle.Params.Assets[foundIdx].Oracles = oracles\n\t\t\t}\n\n\t\t\t// update and export app state\n\t\t\tgenesisStateBz := cdc.MustMarshalJSON(genesisOracle)\n\t\t\tappState[types.ModuleName] = genesisStateBz\n\n\t\t\tappStateJSON, err := cdc.MarshalJSON(appState)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tgenDoc.AppState = appStateJSON\n\n\t\t\treturn genutil.ExportGenesisFile(genDoc, genFile)\n\t\t},\n\t}\n\n\thelpers.BuildCmdHelp(cmd, []string{\n\t\t\"asset code symbol\",\n\t\t\"comma separated list of oracle addresses\",\n\t})\n\tcmd.Flags().String(cli.HomeFlag, defaultNodeHome, \"node's home directory\")\n\tcmd.Flags().String(flagClientHome, defaultClientHome, \"client's home directory\")\n\n\treturn cmd\n}",
"func (g *Group) AddAsset(p, h string) {\n\tfile := &File{name: path.Base(p), path: p, hash: h}\n\tg.files = append(g.files, file)\n}",
"func (o *Stock) SetUserG(insert bool, related *User) error {\n\treturn o.SetUser(boil.GetDB(), insert, related)\n}",
"func (o *FeatureRelationship) SetType(exec boil.Executor, insert bool, related *Cvterm) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"feature_relationship\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"type_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, featureRelationshipPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.CvtermID, o.FeatureRelationshipID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.TypeID = related.CvtermID\n\n\tif o.R == nil {\n\t\to.R = &featureRelationshipR{\n\t\t\tType: related,\n\t\t}\n\t} else {\n\t\to.R.Type = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &cvtermR{\n\t\t\tTypeFeatureRelationship: o,\n\t\t}\n\t} else {\n\t\trelated.R.TypeFeatureRelationship = o\n\t}\n\n\treturn nil\n}",
"func (o *Source) SetType(exec boil.Executor, insert bool, related *SourceType) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"sources\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"type_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, sourcePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.TypeID = related.ID\n\n\tif o.R == nil {\n\t\to.R = &sourceR{\n\t\t\tType: related,\n\t\t}\n\t} else {\n\t\to.R.Type = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &sourceTypeR{\n\t\t\tTypeSources: SourceSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.TypeSources = append(related.R.TypeSources, o)\n\t}\n\n\treturn nil\n}"
] |
[
"0.68356276",
"0.67204624",
"0.6060815",
"0.5844636",
"0.5657456",
"0.55309767",
"0.54804087",
"0.5423066",
"0.5372864",
"0.5331137",
"0.53216106",
"0.5291625",
"0.50358295",
"0.50225013",
"0.49916553",
"0.49278134",
"0.4899299",
"0.4843532",
"0.48203465",
"0.48146963",
"0.47985545",
"0.47982413",
"0.4762452",
"0.47424477",
"0.46622333",
"0.4593639",
"0.45846182",
"0.45660812",
"0.45496258",
"0.4548126",
"0.45444232",
"0.45441106",
"0.45331097",
"0.45289403",
"0.45231244",
"0.45157537",
"0.4515684",
"0.4501662",
"0.44812042",
"0.4463783",
"0.4450248",
"0.4427169",
"0.44226214",
"0.44205448",
"0.44148028",
"0.43923038",
"0.43903083",
"0.4386544",
"0.4362972",
"0.43539667",
"0.43520465",
"0.43400815",
"0.43211254",
"0.4316938",
"0.43038103",
"0.42904112",
"0.42797765",
"0.4277816",
"0.4262304",
"0.42447114",
"0.424134",
"0.4238299",
"0.42232716",
"0.42229903",
"0.4221879",
"0.42102504",
"0.4208181",
"0.41943687",
"0.41800344",
"0.41754737",
"0.4169674",
"0.41547868",
"0.4140545",
"0.4127498",
"0.410824",
"0.4101783",
"0.40964952",
"0.4089846",
"0.4083898",
"0.40803108",
"0.4063481",
"0.40467173",
"0.40458375",
"0.40456867",
"0.4045563",
"0.4038476",
"0.40373406",
"0.40364158",
"0.4029416",
"0.40087453",
"0.39926162",
"0.39911586",
"0.39901024",
"0.3986686",
"0.39775547",
"0.3976246",
"0.39721665",
"0.3971836",
"0.39435896",
"0.3943038"
] |
0.74819463
|
0
|
SetAssetP of the asset_revision to the related item. Sets o.R.Asset to related. Adds o to related.R.AssetRevisions. Panics on error.
|
func (o *AssetRevision) SetAssetP(exec boil.Executor, insert bool, related *Asset) {
if err := o.SetAsset(exec, insert, related); err != nil {
panic(boil.WrapErr(err))
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (o *AssetRevision) SetAsset(exec boil.Executor, insert bool, related *Asset) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"asset_revision\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"asset\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, assetRevisionPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.Orig}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.Asset = related.ID\n\n\tif o.R == nil {\n\t\to.R = &assetRevisionR{\n\t\t\tAsset: related,\n\t\t}\n\t} else {\n\t\to.R.Asset = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &assetR{\n\t\t\tAssetRevisions: AssetRevisionSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.AssetRevisions = append(related.R.AssetRevisions, o)\n\t}\n\n\treturn nil\n}",
"func (o *AssetRevision) SetAssetGP(insert bool, related *Asset) {\n\tif err := o.SetAsset(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (g *GitHub) SetAsset(name string) {\n\tg.releaseAsset = name\n}",
"func (o *AssetRevision) SetOrig(exec boil.Executor, insert bool, related *Asset) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"asset_revision\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"orig\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, assetRevisionPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.Orig}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.Orig = related.ID\n\n\tif o.R == nil {\n\t\to.R = &assetRevisionR{\n\t\t\tOrig: related,\n\t\t}\n\t} else {\n\t\to.R.Orig = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &assetR{\n\t\t\tOrigAssetRevision: o,\n\t\t}\n\t} else {\n\t\trelated.R.OrigAssetRevision = o\n\t}\n\n\treturn nil\n}",
"func (o *AssetRevision) SetOrigP(exec boil.Executor, insert bool, related *Asset) {\n\tif err := o.SetOrig(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) SetAssetG(insert bool, related *Asset) error {\n\treturn o.SetAsset(boil.GetDB(), insert, related)\n}",
"func FindAssetRevisionP(exec boil.Executor, orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(exec, orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func SetAsset(amount float64, symbol string) *types.Asset {\n\treturn &types.Asset{Amount: amount, Symbol: symbol}\n}",
"func (o *Rental) SetInventoryP(exec boil.Executor, insert bool, related *Inventory) {\n\tif err := o.SetInventory(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (assetRevisionL) LoadAsset(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Asset\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Asset\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Asset = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Asset == foreign.ID {\n\t\t\t\tlocal.R.Asset = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (k Keeper) SetJoinPoolAndStakeAsset(ctx sdk.Context, JoinPoolAndStakeAsset types.JoinPoolAndStakeAsset) {\n\tstore := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.JoinPoolAndStakeAssetKey))\n\tb := k.cdc.MustMarshalBinaryBare(&JoinPoolAndStakeAsset)\n\tstore.Set(GetJoinPoolAndStakeAssetIDBytes(JoinPoolAndStakeAsset.Id), b)\n}",
"func AddAssetRevisionHook(hookPoint boil.HookPoint, assetRevisionHook AssetRevisionHook) {\n\tswitch hookPoint {\n\tcase boil.BeforeInsertHook:\n\t\tassetRevisionBeforeInsertHooks = append(assetRevisionBeforeInsertHooks, assetRevisionHook)\n\tcase boil.BeforeUpdateHook:\n\t\tassetRevisionBeforeUpdateHooks = append(assetRevisionBeforeUpdateHooks, assetRevisionHook)\n\tcase boil.BeforeDeleteHook:\n\t\tassetRevisionBeforeDeleteHooks = append(assetRevisionBeforeDeleteHooks, assetRevisionHook)\n\tcase boil.BeforeUpsertHook:\n\t\tassetRevisionBeforeUpsertHooks = append(assetRevisionBeforeUpsertHooks, assetRevisionHook)\n\tcase boil.AfterInsertHook:\n\t\tassetRevisionAfterInsertHooks = append(assetRevisionAfterInsertHooks, assetRevisionHook)\n\tcase boil.AfterSelectHook:\n\t\tassetRevisionAfterSelectHooks = append(assetRevisionAfterSelectHooks, assetRevisionHook)\n\tcase boil.AfterUpdateHook:\n\t\tassetRevisionAfterUpdateHooks = append(assetRevisionAfterUpdateHooks, assetRevisionHook)\n\tcase boil.AfterDeleteHook:\n\t\tassetRevisionAfterDeleteHooks = append(assetRevisionAfterDeleteHooks, assetRevisionHook)\n\tcase boil.AfterUpsertHook:\n\t\tassetRevisionAfterUpsertHooks = append(assetRevisionAfterUpsertHooks, assetRevisionHook)\n\t}\n}",
"func (r *Release) UploadAsset(path string) error {\n\tfile, err := os.OpenFile(path, os.O_RDONLY, 0755)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer file.Close()\n\tasset, _, err := r.client.Repositories.UploadReleaseAsset(context.Background(), r.owner, r.repository, r.ID, &gogithub.UploadOptions{\n\t\tName: filepath.Base(file.Name()),\n\t}, file)\n\tif err != nil {\n\t\treturn err\n\t}\n\tlog.Println(\"uploaded asset \", *asset.Name)\n\treturn nil\n}",
"func AssetRevisionExistsP(exec boil.Executor, orig int) bool {\n\te, err := AssetRevisionExists(exec, orig)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn e\n}",
"func (o *AssetRevision) UpdateP(exec boil.Executor, whitelist ...string) {\n\terr := o.Update(exec, whitelist...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) ReloadP(exec boil.Executor) {\n\tif err := o.Reload(exec); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (q assetRevisionQuery) OneP() *AssetRevision {\n\to, err := q.One()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (o *AssetRevision) SetOrigGP(insert bool, related *Asset) {\n\tif err := o.SetOrig(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *BraceletPhoto) SetBracelet(exec boil.Executor, insert bool, related *BraceletBracelet) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE `bracelet_photo` SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, []string{\"bracelet_id\"}),\n\t\tstrmangle.WhereClause(\"`\", \"`\", 0, braceletPhotoPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.BraceletID = related.ID\n\n\tif o.R == nil {\n\t\to.R = &braceletPhotoR{\n\t\t\tBracelet: related,\n\t\t}\n\t} else {\n\t\to.R.Bracelet = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &braceletBraceletR{\n\t\t\tBraceletBraceletPhotos: BraceletPhotoSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.BraceletBraceletPhotos = append(related.R.BraceletBraceletPhotos, o)\n\t}\n\n\treturn nil\n}",
"func RegisterAssetPeg(cdc *wire.Codec) {\n\tcdc.RegisterInterface((*types.AssetPeg)(nil), nil)\n\tcdc.RegisterConcrete(&types.BaseAssetPeg{}, \"commit-blockchain/AssetPeg\", nil)\n}",
"func (o *BraceletPhoto) SetBraceletP(exec boil.Executor, insert bool, related *BraceletBracelet) {\n\tif err := o.SetBracelet(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func writeAssetToPart(assetObj Asset, writer *multipart.Writer) error {\n\t//Send a request to get the asset file\n\turl := assetObj.URL\n\tresp, err := http.Get(url)\n\tif err != nil {\n\t\tlog.Fatalln(\"Could not get the asset from the url: \", err)\n\t\treturn err\n\t}\n\tdefer resp.Body.Close()\n\n\t//Copy the asset to a byte buffer to find the size of the asset\n\tbuf := &bytes.Buffer{}\n\tnRead, err := io.Copy(buf, resp.Body)\n\tif err != nil {\n\t\tfmt.Println(\"Could not copy the responsBody to the buffer: \", err)\n\t\treturn err\n\t}\n\n\t//Create the MIMEHeader and create a new part\n\th := make(textproto.MIMEHeader)\n\th.Set(\"Content-Type\", assetObj.MIMEType)\n\th.Set(\"Content-Length\", strconv.FormatInt(nRead, 10)) //len(data)\n\th.Set(\"Content-Transfer-Encoding\", \"quoted-printable\")\n\th.Set(\"Content-Name\", assetObj.ID.Hex())\n\tfw, err := writer.CreatePart(h)\n\tif err != nil {\n\t\tlog.Fatalln(\"Could not create form field: \", err)\n\t\treturn err\n\t}\n\n\t//Create the encoding writer and write the data to it.\n\tw := quotedprintable.NewWriter(fw)\n\tw.Binary = true //Tell it to treat the data as binary\n\tw.Write(buf.Bytes())\n\n\treturn nil\n}",
"func (o *AssetRevision) AssetByFk(exec boil.Executor, mods ...qm.QueryMod) assetQuery {\n\tqueryMods := []qm.QueryMod{\n\t\tqm.Where(\"id=?\", o.Asset),\n\t}\n\n\tqueryMods = append(queryMods, mods...)\n\n\tquery := Assets(exec, queryMods...)\n\tqueries.SetFrom(query.Query, \"\\\"asset\\\"\")\n\n\treturn query\n}",
"func (o *Rental) SetInventory(exec boil.Executor, insert bool, related *Inventory) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE `rental` SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, []string{\"inventory_id\"}),\n\t\tstrmangle.WhereClause(\"`\", \"`\", 0, rentalPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.InventoryID, o.RentalID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.InventoryID = related.InventoryID\n\n\tif o.R == nil {\n\t\to.R = &rentalR{\n\t\t\tInventory: related,\n\t\t}\n\t} else {\n\t\to.R.Inventory = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &inventoryR{\n\t\t\tRentals: RentalSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.Rentals = append(related.R.Rentals, o)\n\t}\n\n\treturn nil\n}",
"func (o *CreditFreddieMacAssetsVOA24) SetASSET(v []CreditFreddieMacAssetVOA24) {\n\to.ASSET = v\n}",
"func ApplyAsset(h *resource.Helper, assetPath string, hLog log.FieldLogger) error {\n\tassetLog := hLog.WithField(\"asset\", assetPath)\n\tassetLog.Debug(\"reading asset\")\n\tasset := assets.MustAsset(assetPath)\n\tassetLog.Debug(\"applying asset\")\n\tresult, err := h.Apply(asset)\n\tif err != nil {\n\t\tassetLog.WithError(err).Error(\"error applying asset\")\n\t\treturn err\n\t}\n\tassetLog.Infof(\"asset applied successfully: %v\", result)\n\treturn nil\n}",
"func (o *PostMultiNodeDeviceParams) SetAssetNo(assetNo *string) {\n\to.AssetNo = assetNo\n}",
"func (o *StockCvterm) SetPub(exec boil.Executor, insert bool, related *Pub) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"stock_cvterm\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"pub_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, stockCvtermPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.PubID, o.StockCvtermID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.PubID = related.PubID\n\n\tif o.R == nil {\n\t\to.R = &stockCvtermR{\n\t\t\tPub: related,\n\t\t}\n\t} else {\n\t\to.R.Pub = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &pubR{\n\t\t\tStockCvterm: o,\n\t\t}\n\t} else {\n\t\trelated.R.StockCvterm = o\n\t}\n\n\treturn nil\n}",
"func (g *Group) AddAsset(p, h string) {\n\tfile := &File{name: path.Base(p), path: p, hash: h}\n\tg.files = append(g.files, file)\n}",
"func (assetRevisionL) LoadOrig(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Orig\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Orig\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Orig = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Orig == foreign.ID {\n\t\t\t\tlocal.R.Orig = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Jet) SetPilot(exec boil.Executor, insert bool, related *Pilot) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE `jets` SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, []string{\"pilot_id\"}),\n\t\tstrmangle.WhereClause(\"`\", \"`\", 0, jetPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.PilotID = related.ID\n\n\tif o.R == nil {\n\t\to.R = &jetR{\n\t\t\tPilot: related,\n\t\t}\n\t} else {\n\t\to.R.Pilot = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &pilotR{\n\t\t\tJets: JetSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.Jets = append(related.R.Jets, o)\n\t}\n\n\treturn nil\n}",
"func (c *Client) UploadAsset(ctx context.Context, releaseID int64, filename string) (*github.ReleaseAsset, error) {\n\n\tfilename, err := filepath.Abs(filename)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"failed to get abs path\")\n\t}\n\n\tf, err := os.Open(filename)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"failed to open file\")\n\t}\n\n\topts := &github.UploadOptions{\n\t\t// Use base name by default\n\t\tName: filepath.Base(filename),\n\t}\n\n\tvar asset *github.ReleaseAsset\n\terr = retry.Retry(3, 3*time.Second, func() error {\n\t\tvar (\n\t\t\tres *github.Response\n\t\t\terr error\n\t\t)\n\t\tasset, res, err = c.Repositories.UploadReleaseAsset(context.TODO(), c.Owner, c.Repo, releaseID, opts, f)\n\t\tif err != nil {\n\t\t\treturn errors.Wrapf(err, \"failed to upload release asset: %s\", filename)\n\t\t}\n\n\t\tswitch res.StatusCode {\n\t\tcase http.StatusCreated:\n\t\t\treturn nil\n\t\tcase 422:\n\t\t\treturn errors.Errorf(\n\t\t\t\t\"upload release asset: invalid status code: %s\",\n\t\t\t\t\"422 (this is probably because the asset already uploaded)\")\n\t\tdefault:\n\t\t\treturn errors.Errorf(\n\t\t\t\t\"upload release asset: invalid status code: %s\", res.Status)\n\t\t}\n\t})\n\treturn asset, err\n}",
"func (a *Asset) Equal(other *Asset) bool {\n\tif other == nil && a == nil {\n\t\treturn true\n\t}\n\tif other == nil || a == nil {\n\t\treturn false\n\t}\n\treturn a.Property == other.Property && a.Id == other.Id\n}",
"func setAssetStateBasedEndorsement(ctx contractapi.TransactionContextInterface, auctionID string, orgToEndorse string) error {\n\n\tendorsementPolicy, err := statebased.NewStateEP(nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = endorsementPolicy.AddOrgs(statebased.RoleTypePeer, orgToEndorse)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to add org to endorsement policy: %v\", err)\n\t}\n\tpolicy, err := endorsementPolicy.Policy()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to create endorsement policy bytes from org: %v\", err)\n\t}\n\terr = ctx.GetStub().SetStateValidationParameter(auctionID, policy)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to set validation parameter on auction: %v\", err)\n\t}\n\n\treturn nil\n}",
"func (o *AssetRevision) UpsertP(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) {\n\tif err := o.Upsert(exec, updateOnConflict, conflictColumns, updateColumns, whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (s *Mortgageplatform) PostAsset(APIstub shim.ChaincodeStubInterface, args []string) sc.Response {\n\tres, err := postAsset(APIstub, args)\n\tif err != nil { return shim.Error(\"PostAsset, \" + err.Error())}\n\n\treturn shim.Success(res)\n }",
"func (o *PostDeviceRackParams) SetAssetNo(assetNo *string) {\n\to.AssetNo = assetNo\n}",
"func setObjectRevision(obj client.Object, revision int64) {\n\ta := obj.GetAnnotations()\n\tif a == nil {\n\t\ta = map[string]string{}\n\t}\n\ta[revisionAnnotation] = fmt.Sprintf(\"%d\", revision)\n\tobj.SetAnnotations(a)\n}",
"func (r *ReferenceAdapter) SetProjectReferenceCondition(reason string, err error) error {\n\tconditions := &r.ProjectReference.Status.Conditions\n\tconditionType := gcpv1alpha1.ConditionError\n\tif err != nil {\n\t\tr.conditionManager.SetCondition(conditions, conditionType, corev1.ConditionTrue, reason, err.Error())\n\t} else {\n\t\tif len(*conditions) != 0 {\n\t\t\treason = reason + \"Resolved\"\n\t\t\tr.conditionManager.SetCondition(conditions, conditionType, corev1.ConditionFalse, reason, \"\")\n\t\t} else {\n\t\t\treturn nil\n\t\t}\n\t}\n\n\treturn r.StatusUpdate()\n}",
"func (o *ActivityLog) SetInvestor(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Investor) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"activity_logs\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 0, []string{\"investor_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 0, activityLogPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.IsDebug(ctx) {\n\t\twriter := boil.DebugWriterFrom(ctx)\n\t\tfmt.Fprintln(writer, updateQuery)\n\t\tfmt.Fprintln(writer, values)\n\t}\n\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.InvestorID = related.ID\n\tif o.R == nil {\n\t\to.R = &activityLogR{\n\t\t\tInvestor: related,\n\t\t}\n\t} else {\n\t\to.R.Investor = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &investorR{\n\t\t\tActivityLogs: ActivityLogSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.ActivityLogs = append(related.R.ActivityLogs, o)\n\t}\n\n\treturn nil\n}",
"func (o *Item) SetItemOption(ctx context.Context, exec boil.ContextExecutor, insert bool, related *ItemOption) error {\n\tvar err error\n\n\tif insert {\n\t\tqueries.Assign(&related.ItemID, o.ID)\n\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t} else {\n\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\"UPDATE \\\"item_options\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 0, []string{\"item_id\"}),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 0, itemOptionPrimaryKeyColumns),\n\t\t)\n\t\tvalues := []interface{}{o.ID, related.ItemID, related.OptionID}\n\n\t\tif boil.IsDebug(ctx) {\n\t\t\twriter := boil.DebugWriterFrom(ctx)\n\t\t\tfmt.Fprintln(writer, updateQuery)\n\t\t\tfmt.Fprintln(writer, values)\n\t\t}\n\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t}\n\n\t\tqueries.Assign(&related.ItemID, o.ID)\n\t}\n\n\tif o.R == nil {\n\t\to.R = &itemR{\n\t\t\tItemOption: related,\n\t\t}\n\t} else {\n\t\to.R.ItemOption = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &itemOptionR{\n\t\t\tItem: o,\n\t\t}\n\t} else {\n\t\trelated.R.Item = o\n\t}\n\treturn nil\n}",
"func CreateAsset(\n\ttrx storage.Transaction,\n\tissueTxId merkle.Digest,\n\tissueBlockNumber uint64,\n\tassetId transactionrecord.AssetIdentifier,\n\tnewOwner *account.Account,\n) {\n\t// ensure single threaded\n\ttoLock.Lock()\n\tdefer toLock.Unlock()\n\n\tnewData := &AssetOwnerData{\n\t\ttransferBlockNumber: issueBlockNumber,\n\t\tissueTxId: issueTxId,\n\t\tissueBlockNumber: issueBlockNumber,\n\t\tassetId: assetId,\n\t}\n\n\t// store to database\n\tcreate(trx, issueTxId, newData, newOwner)\n}",
"func (o *ItemSide) SetItem(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Item) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"item_sides\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 0, []string{\"item_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 0, itemSidePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ItemID, o.SideItemID}\n\n\tif boil.IsDebug(ctx) {\n\t\twriter := boil.DebugWriterFrom(ctx)\n\t\tfmt.Fprintln(writer, updateQuery)\n\t\tfmt.Fprintln(writer, values)\n\t}\n\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\tqueries.Assign(&o.ItemID, related.ID)\n\tif o.R == nil {\n\t\to.R = &itemSideR{\n\t\t\tItem: related,\n\t\t}\n\t} else {\n\t\to.R.Item = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &itemR{\n\t\t\tItemSide: o,\n\t\t}\n\t} else {\n\t\trelated.R.ItemSide = o\n\t}\n\n\treturn nil\n}",
"func (o *AssetRevision) DeleteP(exec boil.Executor) {\n\tif err := o.Delete(exec); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func WriteAsset(name string, data []byte) {\n\tencoded := base64.StdEncoding.EncodeToString([]byte(data))\n\n\t// Add to list of asset names if needed\n\tif _, ok := assets[name]; !ok {\n\t\tassetNames = append(assetNames, name)\n\t}\n\n\t// Store assset\n\tassets[name] = Asset{Name: name, Compressed: false, Data: encoded}\n}",
"func (gauo *GithubAssetUpdateOne) SetAssetID(i int64) *GithubAssetUpdateOne {\n\tgauo.mutation.ResetAssetID()\n\tgauo.mutation.SetAssetID(i)\n\treturn gauo\n}",
"func (l *GenericMetadata) LinkToInterfaceRevisionOnFieldInterfaceRevision(target *InterfaceRevision) error {\n\tif target == nil {\n\t\treturn errors.New(\"start and end can not be nil\")\n\t}\n\n\tl.InterfaceRevision = target\n\n\ttarget.Metadata = l\n\n\treturn nil\n}",
"func (o *RecipeAdditive) SetRecipe(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Recipe) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"recipe_additive\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"recipe_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, recipeAdditivePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.IsDebug(ctx) {\n\t\twriter := boil.DebugWriterFrom(ctx)\n\t\tfmt.Fprintln(writer, updateQuery)\n\t\tfmt.Fprintln(writer, values)\n\t}\n\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.RecipeID = related.ID\n\tif o.R == nil {\n\t\to.R = &recipeAdditiveR{\n\t\t\tRecipe: related,\n\t\t}\n\t} else {\n\t\to.R.Recipe = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &recipeR{\n\t\t\tRecipeAdditives: RecipeAdditiveSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.RecipeAdditives = append(related.R.RecipeAdditives, o)\n\t}\n\n\treturn nil\n}",
"func FindAssetRevision(exec boil.Executor, orig int, selectCols ...string) (*AssetRevision, error) {\n\tassetRevisionObj := &AssetRevision{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"asset_revision\\\" where \\\"orig\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, orig)\n\n\terr := q.Bind(assetRevisionObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"public: unable to select from asset_revision\")\n\t}\n\n\treturn assetRevisionObj, nil\n}",
"func AddAssetHook(hookPoint boil.HookPoint, assetHook AssetHook) {\n\tswitch hookPoint {\n\tcase boil.BeforeInsertHook:\n\t\tassetBeforeInsertHooks = append(assetBeforeInsertHooks, assetHook)\n\tcase boil.BeforeUpdateHook:\n\t\tassetBeforeUpdateHooks = append(assetBeforeUpdateHooks, assetHook)\n\tcase boil.BeforeDeleteHook:\n\t\tassetBeforeDeleteHooks = append(assetBeforeDeleteHooks, assetHook)\n\tcase boil.BeforeUpsertHook:\n\t\tassetBeforeUpsertHooks = append(assetBeforeUpsertHooks, assetHook)\n\tcase boil.AfterInsertHook:\n\t\tassetAfterInsertHooks = append(assetAfterInsertHooks, assetHook)\n\tcase boil.AfterSelectHook:\n\t\tassetAfterSelectHooks = append(assetAfterSelectHooks, assetHook)\n\tcase boil.AfterUpdateHook:\n\t\tassetAfterUpdateHooks = append(assetAfterUpdateHooks, assetHook)\n\tcase boil.AfterDeleteHook:\n\t\tassetAfterDeleteHooks = append(assetAfterDeleteHooks, assetHook)\n\tcase boil.AfterUpsertHook:\n\t\tassetAfterUpsertHooks = append(assetAfterUpsertHooks, assetHook)\n\t}\n}",
"func (m *Asset) UnmarshalJSON(raw []byte) error {\n\t// AO0\n\tvar aO0 Resource\n\tif err := swag.ReadJSON(raw, &aO0); err != nil {\n\t\treturn err\n\t}\n\tm.Resource = aO0\n\n\t// AO1\n\tvar dataAO1 struct {\n\t\tBinaryRepository *BinaryRepository `json:\"binaryRepository,omitempty\"`\n\n\t\tPipeline *Pipeline `json:\"pipeline,omitempty\"`\n\n\t\tSourceRepository *SourceRepository `json:\"sourceRepository,omitempty\"`\n\t}\n\tif err := swag.ReadJSON(raw, &dataAO1); err != nil {\n\t\treturn err\n\t}\n\n\tm.BinaryRepository = dataAO1.BinaryRepository\n\n\tm.Pipeline = dataAO1.Pipeline\n\n\tm.SourceRepository = dataAO1.SourceRepository\n\n\treturn nil\n}",
"func (o *Transaction) SetProductP(exec boil.Executor, insert bool, related *Product) {\n\tif err := o.SetProduct(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func FindAssetRevisionGP(orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(boil.GetDB(), orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func SetGitTrackObjectCondition(status *farosv1alpha1.GitTrackObjectStatus, condition farosv1alpha1.GitTrackObjectCondition) {\n\tcurrentCond := GetGitTrackObjectCondition(*status, condition.Type)\n\tif currentCond != nil && currentCond.Status == condition.Status && currentCond.Reason == condition.Reason {\n\t\treturn\n\t}\n\t// Do not update lastTransitionTime if the status of the condition doesn't change.\n\tif currentCond != nil && currentCond.Status == condition.Status {\n\t\tcondition.LastTransitionTime = currentCond.LastTransitionTime\n\t}\n\tnewConditions := filterOutCondition(status.Conditions, condition.Type)\n\tstatus.Conditions = append(newConditions, condition)\n}",
"func (o *AssetRevision) InsertP(exec boil.Executor, whitelist ...string) {\n\tif err := o.Insert(exec, whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *OutputState) ApplyAsset(applier interface{}) AssetOutput {\n\treturn o.ApplyT(applier).(AssetOutput)\n}",
"func (s *SmartContract) TransferAsset(ctx contractapi.TransactionContextInterface, id string, newOwner string) error {\n\n\tasset, err := s.ReadAsset(ctx, id)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tclientID, err := s.GetSubmittingClientIdentity(ctx)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif clientID != asset.Owner {\n\t\treturn fmt.Errorf(\"submitting client not authorized to update asset, does not own asset\")\n\t}\n\n\tasset.Owner = newOwner\n\tassetJSON, err := json.Marshal(asset)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn ctx.GetStub().PutState(id, assetJSON)\n}",
"func (gau *GithubAssetUpdate) SetAssetID(i int64) *GithubAssetUpdate {\n\tgau.mutation.ResetAssetID()\n\tgau.mutation.SetAssetID(i)\n\treturn gau\n}",
"func (o *Transaction) SetProduct(exec boil.Executor, insert bool, related *Product) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE `transactions` SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, []string{\"product_id\"}),\n\t\tstrmangle.WhereClause(\"`\", \"`\", 0, transactionPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ProductID, o.TransactionID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.ProductID.Int = related.ProductID\n\to.ProductID.Valid = true\n\n\tif o.R == nil {\n\t\to.R = &transactionR{\n\t\t\tProduct: related,\n\t\t}\n\t} else {\n\t\to.R.Product = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &productR{\n\t\t\tTransactions: TransactionSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.Transactions = append(related.R.Transactions, o)\n\t}\n\n\treturn nil\n}",
"func AssetRevisions(exec boil.Executor, mods ...qm.QueryMod) assetRevisionQuery {\n\tmods = append(mods, qm.From(\"\\\"asset_revision\\\"\"))\n\treturn assetRevisionQuery{NewQuery(exec, mods...)}\n}",
"func (o *Stock) SetProductP(exec boil.Executor, insert bool, related *Product) {\n\tif err := o.SetProduct(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func NewRelatedAssetSerializerWithPermission(uuid string, isin string, ticker string, name string) *RelatedAssetSerializerWithPermission {\n\tthis := RelatedAssetSerializerWithPermission{}\n\tthis.Uuid = uuid\n\tthis.Isin = isin\n\tthis.Ticker = ticker\n\tthis.Name = name\n\treturn &this\n}",
"func (o *StockCvterm) SetStockCvtermprop(exec boil.Executor, insert bool, related *StockCvtermprop) error {\n\tvar err error\n\n\tif insert {\n\t\trelated.StockCvtermID = o.StockCvtermID\n\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t} else {\n\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\"UPDATE \\\"stock_cvtermprop\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"stock_cvterm_id\"}),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, stockCvtermpropPrimaryKeyColumns),\n\t\t)\n\t\tvalues := []interface{}{o.StockCvtermID, related.StockCvtermpropID}\n\n\t\tif boil.DebugMode {\n\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t}\n\n\t\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t}\n\n\t\trelated.StockCvtermID = o.StockCvtermID\n\n\t}\n\n\tif o.R == nil {\n\t\to.R = &stockCvtermR{\n\t\t\tStockCvtermprop: related,\n\t\t}\n\t} else {\n\t\to.R.StockCvtermprop = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &stockCvtermpropR{\n\t\t\tStockCvterm: o,\n\t\t}\n\t} else {\n\t\trelated.R.StockCvterm = o\n\t}\n\treturn nil\n}",
"func (o *Item) SetKind(ctx context.Context, exec boil.ContextExecutor, insert bool, related *ItemKind) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"items\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 0, []string{\"kind_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 0, itemPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.IsDebug(ctx) {\n\t\twriter := boil.DebugWriterFrom(ctx)\n\t\tfmt.Fprintln(writer, updateQuery)\n\t\tfmt.Fprintln(writer, values)\n\t}\n\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\tqueries.Assign(&o.KindID, related.ID)\n\tif o.R == nil {\n\t\to.R = &itemR{\n\t\t\tKind: related,\n\t\t}\n\t} else {\n\t\to.R.Kind = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &itemKindR{\n\t\t\tKindItems: ItemSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.KindItems = append(related.R.KindItems, o)\n\t}\n\n\treturn nil\n}",
"func PledgeAsset(ctx contractapi.TransactionContextInterface, assetJSON []byte, assetType, assetIdOrQuantity, remoteNetworkId, recipientCert string, expiryTimeSecs uint64) (string, error) {\n\tif assetIdOrQuantity == \"\" {\n\t\treturn \"\", fmt.Errorf(\"no asset ID or unit count provided\")\n\t}\n\n\t// Get the caller's certificate for assigning pledge ownership\n\towner, err := GetECertOfTxCreatorBase64(ctx)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tpledgeId := generatePledgeId(ctx, assetType, assetIdOrQuantity, owner, remoteNetworkId, recipientCert, expiryTimeSecs)\n\n\tpledgeKey := getAssetPledgeKey(pledgeId)\n\tpledgeBytes, err := ctx.GetStub().GetState(pledgeKey)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to read asset pledge status from world state: %v\", err)\n\t}\n\tpledge := &common.AssetPledge{}\n\tif pledgeBytes != nil {\n\t\terr = proto.Unmarshal(pledgeBytes, pledge)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tif (pledge.RemoteNetworkID == remoteNetworkId && pledge.Recipient == recipientCert && pledge.ExpiryTimeSecs == expiryTimeSecs) {\n\t\t\treturn pledgeId, nil\n\t\t} else {\n\t\t\treturn \"\", fmt.Errorf(\"the asset %s with id %s has already been pledged\", assetType, assetIdOrQuantity)\n\t\t}\n\t}\n\n\t// Make sure the pledge has an expiry time in the future\n\tcurrentTimeSecs := uint64(time.Now().Unix())\n\tif currentTimeSecs >= expiryTimeSecs {\n\t\treturn \"\", fmt.Errorf(\"expiry time cannot be less than current time\")\n\t}\n\n\tlocalNetworkId, err := ctx.GetStub().GetState(GetLocalNetworkIDKey())\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tpledge = &common.AssetPledge{\n\t\tAssetDetails: assetJSON,\n\t\tLocalNetworkID: string(localNetworkId),\n\t\tRemoteNetworkID: remoteNetworkId,\n\t\tRecipient: recipientCert,\n\t\tExpiryTimeSecs: expiryTimeSecs,\n\t}\n\tpledgeBytes, err = proto.Marshal(pledge)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\terr = ctx.GetStub().PutState(pledgeKey, pledgeBytes)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn pledgeId, nil\n}",
"func (o *PostIPAMSwitchesParams) SetAssets(assets *string) {\n\to.Assets = assets\n}",
"func write_asset(stub shim.ChaincodeStubInterface, args []string) ([]byte, error) {\n\tvar err error\n\tfmt.Println(\"starting write asset\")\n\n\tif len(args) < 16 {\n\t\treturn nil, errors.New(\"Incorrect number of arguments. Expecting at least 16\")\n\t}\n\n\tid := args[0]\n\t//check if asset id already exists\n\t_, err = get_asset(stub, id)\n\tif err == nil {\n\t\tfmt.Println(\"This asset already exists - \" + id)\n\t\treturn nil, errors.New(\"This asset already exists - \" + id)\n\t}\n\n\t//build the asset json string manually\n\tstr := `{\"assetId\": \"` + args[0] + `\",\n\t\t\"assetType\": \"` + args[1] + `\",\n\t\t\"category\": \"` + args[2] + `\",\n\t\t\"assetClass\": \"` + args[3] + `\",\n\t\t\"assetTraceData\":[ {\n\t\t\t\"owner\": \"` + args[4] + `\", \n\t\t\t\"status\": \"` + args[5] + `\",\n\t\t\t\"moveDateTime\": \"` + args[6] + `\",\n\t\t\t\"location\": \"` + args[7] + `\",\n\t\t\t\"geoLocation\": \"` + args[8] + `\"\n\t\t}],\t\t\n\t\t\"assetData\": {\n\t\t\t\"information\": {\n\t\t\t\t\"assetName\": \"` + args[9] + `\",\n\t\t\t\t\"company\": \"` + args[10] + `\",\n\t\t\t\t\"packingType\": \"` + args[11] + `\",\n\t\t\t\t\"packageSize\": \"` + args[12] + `\",\n\t\t\t\t\"mfgDate\": \"` + args[13] + `\",\n\t\t\t\t\"lotNumber\": \"` + args[14] + `\",\n\t\t\t\t\"expiryDate\": \"` + args[15] + `\"\n\t\t\t}\n\t\t}\t\t\t\n\t}`\n\n\tfmt.Println(\"Input PharmaAsset Object - \" + str)\n\tvar pharmaAsset PharmaAsset\n\terr = json.Unmarshal([]byte(str), &pharmaAsset)\n\tif err != nil {\n\t\tfmt.Println(\"Error while unmarshalling \" + err.Error())\n\t\treturn nil, errors.New(err.Error())\n\t}\n\t//fmt.Printf(\"PharmaAsset Object after un-marshalling:\\n%s\", pharmaAsset)\n\tif len(args) > 16 {\n\t\tfor i := 16; i < len(args); i = i + 2 {\n\t\t\tvar child AssetChildren\n\t\t\tchild.AssetId = args[i]\n\t\t\tchild.AssetType = args[i+1]\n\t\t\tpharmaAsset.AssetData.Children = append(pharmaAsset.AssetData.Children, child)\n\t\t}\n\t}\n\n\tinputByteStr, err := json.Marshal(pharmaAsset)\n\tif err != nil {\n\t\tfmt.Println(\"Error while marshalling \" + err.Error())\n\t\treturn nil, errors.New(err.Error())\n\t}\n\n\terr = stub.PutState(id, inputByteStr) //store asset with id as key\n\tif err != nil {\n\t\treturn nil, errors.New(err.Error())\n\t}\n\n\tfmt.Println(\"- end write asset\")\n\treturn nil, nil\n}",
"func (q assetRevisionQuery) One() (*AssetRevision, error) {\n\to := &AssetRevision{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"public: failed to execute a one query for asset_revision\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (u *User)BuyAsset(APIstub shim.ChaincodeStubInterface, a Asset, args []string) error {\n\tif len(args) != 2 { return errors.New(\"BuyAsset - incorrect number of arguments. Expecting 2\")}\n\n\tpaymentid := args[0]\n\tpaypercent := args[1]\n\tpercentage, parseErr := strconv.ParseFloat(paypercent, 32)\n\tif parseErr != nil { return errors.New(\"BuyAsset - \" + parseErr.Error()) }\n\t\n\tif a.Owned == u.Username {\n\t\treturn errors.New(\"BuyAsset, user can NOT buy its own asset --- \")\n\t}\n\t// add buyer info into Asset\n\tremaining := 1 - a.Status\n\tif percentage > remaining { \n\t\treturn errors.New(\"BuyAsset - No enough share for this asset '\" + a.Key + \"'\")\n\t}\n\ta.Status = remaining - percentage // update asset remaining share\n\ta.Buyerspercent[u.Username] = a.Buyerspercent[u.Username] + percentage\n\t// calculate payment plan\n\ttotalPayWithInterest := percentage * math.Pow((1+a.Interestrate), float64(a.Period)) * a.Worth\n\tpayPer := totalPayWithInterest / float64(a.Period)\n\n\t// add asset to user's paymentmethod's Payssets list\n\tpaymentmethod := u.Info.Paymentmethodlist[paymentid]\n\tif paymentmethod.Accountnumber == \"\" {\n\t\treturn errors.New(\"BuyAsset - payment not exists\")\n\t}\n\n\tvar record Payassetrecord\n\trecord = paymentmethod.Payassets[a.Key];\n\tif (Payassetrecord{}) != record {\n\t\treturn errors.New(\"BuyAsset - you have bought this asset already.\")\n\t} \n\t//p, _ := strconv.ParseInt(a.Period, 10, 32)\n\trecord = Payassetrecord{Period: int(a.Period), Amountper:payPer}\n\tpaymentmethod.Payassets[a.Key] = record\n\n\t// Put asset and user back to ledger\n\tassetAsbytes, _ := json.Marshal(a)\n\tuserAsbytes, _ := json.Marshal(u)\n\n\tif err := APIstub.PutState(a.Key, assetAsbytes); err != nil {\n\t\treturn errors.New(\"BuyAsset - \" + err.Error())\n\t}\n\tif err := APIstub.PutState(u.Username, userAsbytes); err != nil {\n\t\treturn errors.New(\"BuyAsset - \" + err.Error())\n\t}\n\n\treturn nil\n}",
"func (obj *ObjectBase) VSetParent(vPtr IObject, parent IObject) {\n\tobj.parent = parent\n\tif len(obj.name) > 0 {\n\t\tobj.VSetName(vPtr, obj.name)\n\t}\n}",
"func (o *AssetRevision) Delete(exec boil.Executor) error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision provided for delete\")\n\t}\n\n\tif err := o.doBeforeDeleteHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\targs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), assetRevisionPrimaryKeyMapping)\n\tquery := \"DELETE FROM \\\"asset_revision\\\" WHERE \\\"orig\\\"=$1\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, args...)\n\t}\n\n\t_, err := exec.Exec(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to delete from asset_revision\")\n\t}\n\n\tif err := o.doAfterDeleteHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}",
"func (t *Transaction) SetResource(r rsrc.Resource) {\n\tt.res = r.Clone()\n}",
"func (testEntityRelated_EntityInfo) PutRelated(txn *objectbox.Transaction, object interface{}, id uint64) error {\n\tif rel := object.(*TestEntityRelated).Next; rel != nil {\n\t\trId, err := EntityByValueBinding.GetId(rel)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t} else if rId == 0 {\n\t\t\tif err := txn.RunWithCursor(EntityByValueBinding.Id, func(targetCursor *objectbox.Cursor) error {\n\t\t\t\t_, err := targetCursor.Put(rel) // NOTE Put/PutAsync() has a side-effect of setting the rel.ID\n\t\t\t\treturn err\n\t\t\t}); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif err := txn.RunWithCursor(TestEntityRelatedBinding.Id, func(cursor *objectbox.Cursor) error {\n\t\treturn cursor.RelationReplace(6, EntityByValueBinding.Id, id, object, object.(*TestEntityRelated).NextSlice)\n\t}); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func (o *AssetRevision) Upsert(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no asset_revision provided for upsert\")\n\t}\n\n\tif err := o.doBeforeUpsertHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\tnzDefaults := queries.NonZeroDefaultSet(assetRevisionColumnsWithDefault, o)\n\n\t// Build cache key in-line uglily - mysql vs postgres problems\n\tbuf := strmangle.GetBuffer()\n\tif updateOnConflict {\n\t\tbuf.WriteByte('t')\n\t} else {\n\t\tbuf.WriteByte('f')\n\t}\n\tbuf.WriteByte('.')\n\tfor _, c := range conflictColumns {\n\t\tbuf.WriteString(c)\n\t}\n\tbuf.WriteByte('.')\n\tfor _, c := range updateColumns {\n\t\tbuf.WriteString(c)\n\t}\n\tbuf.WriteByte('.')\n\tfor _, c := range whitelist {\n\t\tbuf.WriteString(c)\n\t}\n\tbuf.WriteByte('.')\n\tfor _, c := range nzDefaults {\n\t\tbuf.WriteString(c)\n\t}\n\tkey := buf.String()\n\tstrmangle.PutBuffer(buf)\n\n\tassetRevisionUpsertCacheMut.RLock()\n\tcache, cached := assetRevisionUpsertCache[key]\n\tassetRevisionUpsertCacheMut.RUnlock()\n\n\tvar err error\n\n\tif !cached {\n\t\tvar ret []string\n\t\twhitelist, ret = strmangle.InsertColumnSet(\n\t\t\tassetRevisionColumns,\n\t\t\tassetRevisionColumnsWithDefault,\n\t\t\tassetRevisionColumnsWithoutDefault,\n\t\t\tnzDefaults,\n\t\t\twhitelist,\n\t\t)\n\t\tupdate := strmangle.UpdateColumnSet(\n\t\t\tassetRevisionColumns,\n\t\t\tassetRevisionPrimaryKeyColumns,\n\t\t\tupdateColumns,\n\t\t)\n\t\tif len(update) == 0 {\n\t\t\treturn errors.New(\"public: unable to upsert asset_revision, could not build update column list\")\n\t\t}\n\n\t\tconflict := conflictColumns\n\t\tif len(conflict) == 0 {\n\t\t\tconflict = make([]string, len(assetRevisionPrimaryKeyColumns))\n\t\t\tcopy(conflict, assetRevisionPrimaryKeyColumns)\n\t\t}\n\t\tcache.query = queries.BuildUpsertQueryPostgres(dialect, \"\\\"asset_revision\\\"\", updateOnConflict, ret, update, conflict, whitelist)\n\n\t\tcache.valueMapping, err = queries.BindMapping(assetRevisionType, assetRevisionMapping, whitelist)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif len(ret) != 0 {\n\t\t\tcache.retMapping, err = queries.BindMapping(assetRevisionType, assetRevisionMapping, ret)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tvalue := reflect.Indirect(reflect.ValueOf(o))\n\tvals := queries.ValuesFromMapping(value, cache.valueMapping)\n\tvar returns []interface{}\n\tif len(cache.retMapping) != 0 {\n\t\treturns = queries.PtrsFromMapping(value, cache.retMapping)\n\t}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, cache.query)\n\t\tfmt.Fprintln(boil.DebugWriter, vals)\n\t}\n\n\tif len(cache.retMapping) != 0 {\n\t\terr = exec.QueryRow(cache.query, vals...).Scan(returns...)\n\t\tif err == sql.ErrNoRows {\n\t\t\terr = nil // Postgres doesn't return anything when there's no update\n\t\t}\n\t} else {\n\t\t_, err = exec.Exec(cache.query, vals...)\n\t}\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to upsert asset_revision\")\n\t}\n\n\tif !cached {\n\t\tassetRevisionUpsertCacheMut.Lock()\n\t\tassetRevisionUpsertCache[key] = cache\n\t\tassetRevisionUpsertCacheMut.Unlock()\n\t}\n\n\treturn o.doAfterUpsertHooks(exec)\n}",
"func (a *assets) SetAssetFS(af ...AssetFS) {\n\ta.a = append(a.a, af...)\n}",
"func (q assetQuery) OneP() *Asset {\n\to, err := q.One()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (o *Origin) SetOriginOPA(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPackage) error {\n\tquery := \"update \\\"origin_packages\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOPA {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOPA = nil\n\t}\n\treturn o.AddOriginOPA(ctx, exec, insert, related...)\n}",
"func (o *Description) SetProduct(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Product) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE `descriptions` SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, []string{\"product_id\"}),\n\t\tstrmangle.WhereClause(\"`\", \"`\", 0, descriptionPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.ProductID = related.ID\n\tif o.R == nil {\n\t\to.R = &descriptionR{\n\t\t\tProduct: related,\n\t\t}\n\t} else {\n\t\to.R.Product = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &productR{\n\t\t\tDescriptions: DescriptionSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.Descriptions = append(related.R.Descriptions, o)\n\t}\n\n\treturn nil\n}",
"func (o *Source) SetParentP(exec boil.Executor, insert bool, related *Source) {\n\tif err := o.SetParent(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (s *UpdateDataSetOutput) SetAssetType(v string) *UpdateDataSetOutput {\n\ts.AssetType = &v\n\treturn s\n}",
"func (s *GetDataSetOutput) SetAssetType(v string) *GetDataSetOutput {\n\ts.AssetType = &v\n\treturn s\n}",
"func (r *Person) SetRelationship(field string, rel interface{}) error {\n\tswitch field {\n\tcase \"Pets\":\n\t\trecords, ok := rel.([]kallax.Record)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"kallax: relationship field %s needs a collection of records, not %T\", field, rel)\n\t\t}\n\n\t\tr.Pets = make([]*Pet, len(records))\n\t\tfor i, record := range records {\n\t\t\trel, ok := record.(*Pet)\n\t\t\tif !ok {\n\t\t\t\treturn fmt.Errorf(\"kallax: element of type %T cannot be added to relationship %s\", record, field)\n\t\t\t}\n\t\t\tr.Pets[i] = rel\n\t\t}\n\t\treturn nil\n\n\t}\n\treturn fmt.Errorf(\"kallax: model Person has no relationship %s\", field)\n}",
"func (s *CreateDataSetOutput) SetAssetType(v string) *CreateDataSetOutput {\n\ts.AssetType = &v\n\treturn s\n}",
"func (_Onesplitaudit *OnesplitauditTransactor) ClaimAsset(opts *bind.TransactOpts, asset common.Address, amount *big.Int) (*types.Transaction, error) {\n\treturn _Onesplitaudit.contract.Transact(opts, \"claimAsset\", asset, amount)\n}",
"func (o *BookCategoryAssign) SetBook(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Book) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE `book_category_assign` SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, []string{\"book_id\"}),\n\t\tstrmangle.WhereClause(\"`\", \"`\", 0, bookCategoryAssignPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.BookID = related.ID\n\tif o.R == nil {\n\t\to.R = &bookCategoryAssignR{\n\t\t\tBook: related,\n\t\t}\n\t} else {\n\t\to.R.Book = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &bookR{\n\t\t\tBookCategoryAssigns: BookCategoryAssignSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.BookCategoryAssigns = append(related.R.BookCategoryAssigns, o)\n\t}\n\n\treturn nil\n}",
"func NewOrderAsset(orderID string, orderType string, addr string, denom string, amount uint64) AssetOrder {\n\tassetOrder := AssetOrder{\n\t\tOrderId: orderID,\n\t\tOrderType: orderType,\n\t\tAddr: addr,\n\t\tDenom: denom,\n\t\tAmount: amount,\n\t\tStatus: StatusOrderPending,\n\t}\n\treturn assetOrder\n}",
"func (o *AssetRevision) Update(exec boil.Executor, whitelist ...string) error {\n\tvar err error\n\tif err = o.doBeforeUpdateHooks(exec); err != nil {\n\t\treturn err\n\t}\n\tkey := makeCacheKey(whitelist, nil)\n\tassetRevisionUpdateCacheMut.RLock()\n\tcache, cached := assetRevisionUpdateCache[key]\n\tassetRevisionUpdateCacheMut.RUnlock()\n\n\tif !cached {\n\t\twl := strmangle.UpdateColumnSet(assetRevisionColumns, assetRevisionPrimaryKeyColumns, whitelist)\n\n\t\tif len(whitelist) == 0 {\n\t\t\twl = strmangle.SetComplement(wl, []string{\"created_at\"})\n\t\t}\n\t\tif len(wl) == 0 {\n\t\t\treturn errors.New(\"public: unable to update asset_revision, could not build whitelist\")\n\t\t}\n\n\t\tcache.query = fmt.Sprintf(\"UPDATE \\\"asset_revision\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, wl),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", len(wl)+1, assetRevisionPrimaryKeyColumns),\n\t\t)\n\t\tcache.valueMapping, err = queries.BindMapping(assetRevisionType, assetRevisionMapping, append(wl, assetRevisionPrimaryKeyColumns...))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tvalues := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), cache.valueMapping)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, cache.query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err = exec.Exec(cache.query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to update asset_revision row\")\n\t}\n\n\tif !cached {\n\t\tassetRevisionUpdateCacheMut.Lock()\n\t\tassetRevisionUpdateCache[key] = cache\n\t\tassetRevisionUpdateCacheMut.Unlock()\n\t}\n\n\treturn o.doAfterUpdateHooks(exec)\n}",
"func (u *mutableResource[GA, Alpha, Beta]) Set(src *GA) error {\n\tc := newCopier(u.copierOptions...)\n\tif err := c.do(reflect.ValueOf(&u.ga), reflect.ValueOf(src)); err != nil {\n\t\treturn err\n\t}\n\treturn u.postAccess(meta.VersionGA, postAccessSkipValidation)\n}",
"func (ec *executionContext) _Asset(ctx context.Context, sel ast.SelectionSet, obj *models.Asset) graphql.Marshaler {\n\tfields := graphql.CollectFields(ctx, sel, assetImplementors)\n\n\tout := graphql.NewOrderedMap(len(fields))\n\tinvalid := false\n\tfor i, field := range fields {\n\t\tout.Keys[i] = field.Alias\n\n\t\tswitch field.Name {\n\t\tcase \"__typename\":\n\t\t\tout.Values[i] = graphql.MarshalString(\"Asset\")\n\t\tcase \"Id\":\n\t\t\tout.Values[i] = ec._Asset_Id(ctx, field, obj)\n\t\tcase \"Name\":\n\t\t\tout.Values[i] = ec._Asset_Name(ctx, field, obj)\n\t\tdefault:\n\t\t\tpanic(\"unknown field \" + strconv.Quote(field.Name))\n\t\t}\n\t}\n\n\tif invalid {\n\t\treturn graphql.Null\n\t}\n\treturn out\n}",
"func (w *KVAsset) SetKV(key string, value []byte) error {\n\tif w.CurrentAsset == nil {\n\t\treturn errors.New(\"KVAsset - currentAsset is nil\")\n\t}\n\n\tsignatureAsset := w.CurrentAsset.Asset\n\tkvAsset := signatureAsset.GetKVAsset()\n\n\tif containsString(kvAsset.Immutable, key) {\n\t\treturn errors.New(\"KVAsset - Field is immutable\")\n\t}\n\n\tif kvAsset.AssetFields == nil {\n\t\tkvAsset.AssetFields = make(map[string][]byte)\n\t}\n\tkvAsset.AssetFields[key] = value\n\treturn nil\n}",
"func (o *PostIPAMSwitchesParams) SetAssetIds(assetIds *string) {\n\to.AssetIds = assetIds\n}",
"func (o *Stock) SetProduct(exec boil.Executor, insert bool, related *Product) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE `stock` SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, []string{\"product_id\"}),\n\t\tstrmangle.WhereClause(\"`\", \"`\", 0, stockPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ProductID, o.StockID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.ProductID = related.ProductID\n\n\tif o.R == nil {\n\t\to.R = &stockR{\n\t\t\tProduct: related,\n\t\t}\n\t} else {\n\t\to.R.Product = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &productR{\n\t\t\tStocks: StockSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.Stocks = append(related.R.Stocks, o)\n\t}\n\n\treturn nil\n}",
"func (s *chainScore) Ex_setRevision(code *common.HexInt) error {\n\tif err := s.checkGovernance(true); err != nil {\n\t\treturn err\n\t}\n\tif icmodule.MaxRevision < code.Int64() {\n\t\treturn scoreresult.Errorf(StatusIllegalArgument,\n\t\t\t\"IllegalArgument(max=%#x,new=%s)\", icmodule.MaxRevision, code)\n\t}\n\n\tas := s.cc.GetAccountState(state.SystemID)\n\tr := scoredb.NewVarDB(as, state.VarRevision).Int64()\n\tif code.Int64() < r {\n\t\treturn scoreresult.Errorf(StatusIllegalArgument,\n\t\t\t\"IllegalArgument(current=%#x,new=%s)\", r, code)\n\t}\n\n\tif err := scoredb.NewVarDB(as, state.VarRevision).Set(code); err != nil {\n\t\treturn err\n\t}\n\tif err := s.handleRevisionChange(as, int(r), int(code.Int64())); err != nil {\n\t\treturn nil\n\t}\n\tas.MigrateForRevision(s.cc.ToRevision(int(code.Int64())))\n\tas.SetAPIInfo(s.GetAPI())\n\treturn nil\n}",
"func (s *CreateDataSetInput) SetAssetType(v string) *CreateDataSetInput {\n\ts.AssetType = &v\n\treturn s\n}",
"func (gau *GithubAssetUpdate) Exec(ctx context.Context) error {\n\t_, err := gau.Save(ctx)\n\treturn err\n}",
"func (u *UploadsService) UploadAsset(asset io.ReadCloser, contentType string, contentLength int64) (result *Result) {\n\treturn u.client.upload(u.URL, asset, contentType, contentLength)\n}",
"func (o *Organism) SetJbrowseOrganism(exec boil.Executor, insert bool, related *JbrowseOrganism) error {\n\tvar err error\n\n\tif insert {\n\t\trelated.OrganismID = o.OrganismID\n\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t} else {\n\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\"UPDATE \\\"jbrowse_organism\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"organism_id\"}),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, jbrowseOrganismPrimaryKeyColumns),\n\t\t)\n\t\tvalues := []interface{}{o.OrganismID, related.JbrowseOrganismID}\n\n\t\tif boil.DebugMode {\n\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t}\n\n\t\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t}\n\n\t\trelated.OrganismID = o.OrganismID\n\n\t}\n\n\tif o.R == nil {\n\t\to.R = &organismR{\n\t\t\tJbrowseOrganism: related,\n\t\t}\n\t} else {\n\t\to.R.JbrowseOrganism = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &jbrowseOrganismR{\n\t\t\tOrganism: o,\n\t\t}\n\t} else {\n\t\trelated.R.Organism = o\n\t}\n\treturn nil\n}",
"func (o *Source) SetParent(exec boil.Executor, insert bool, related *Source) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"sources\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"parent_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, sourcePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.ParentID.Int64 = related.ID\n\to.ParentID.Valid = true\n\n\tif o.R == nil {\n\t\to.R = &sourceR{\n\t\t\tParent: related,\n\t\t}\n\t} else {\n\t\to.R.Parent = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &sourceR{\n\t\t\tParentSources: SourceSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.ParentSources = append(related.R.ParentSources, o)\n\t}\n\n\treturn nil\n}",
"func (o *BraceletPhoto) SetPhotoBraceletBraceletsP(exec boil.Executor, insert bool, related ...*BraceletBracelet) {\n\tif err := o.SetPhotoBraceletBracelets(exec, insert, related...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (reading_EntityInfo) PutRelated(ob *objectbox.ObjectBox, object interface{}, id uint64) error {\n\treturn nil\n}"
] |
[
"0.72845024",
"0.6083169",
"0.5774375",
"0.5750664",
"0.56749123",
"0.5437862",
"0.53467774",
"0.5274703",
"0.52114683",
"0.5065952",
"0.50582254",
"0.5053974",
"0.49267197",
"0.4926646",
"0.47931397",
"0.47214934",
"0.45615718",
"0.4547713",
"0.45470715",
"0.45152438",
"0.45122173",
"0.45098242",
"0.4419384",
"0.44004142",
"0.43848974",
"0.43787155",
"0.4366095",
"0.43519837",
"0.4341891",
"0.4328782",
"0.4328684",
"0.43176928",
"0.42834395",
"0.42796117",
"0.42701614",
"0.4259526",
"0.42593995",
"0.4235709",
"0.42135257",
"0.4212919",
"0.4202088",
"0.4187472",
"0.41871423",
"0.41822183",
"0.4179974",
"0.41755652",
"0.4164113",
"0.41627228",
"0.4159685",
"0.41476104",
"0.4143976",
"0.4143787",
"0.4124072",
"0.41169772",
"0.41089547",
"0.41026673",
"0.4098954",
"0.40868828",
"0.4085977",
"0.4080928",
"0.40799594",
"0.4077459",
"0.40764654",
"0.40750062",
"0.407404",
"0.40618277",
"0.4057161",
"0.40536228",
"0.4043168",
"0.40350026",
"0.40180492",
"0.40093172",
"0.4007965",
"0.39906096",
"0.3983039",
"0.39821368",
"0.39812234",
"0.39739317",
"0.39654946",
"0.39579368",
"0.3954597",
"0.39520094",
"0.39515746",
"0.3948907",
"0.3943348",
"0.3934178",
"0.3925625",
"0.3925574",
"0.3922879",
"0.3919161",
"0.391711",
"0.39076227",
"0.39030665",
"0.39017773",
"0.38962504",
"0.38921228",
"0.3888634",
"0.38831437",
"0.38799134",
"0.38750738"
] |
0.783795
|
0
|
SetAssetGP of the asset_revision to the related item. Sets o.R.Asset to related. Adds o to related.R.AssetRevisions. Uses the global database handle and panics on error.
|
func (o *AssetRevision) SetAssetGP(insert bool, related *Asset) {
if err := o.SetAsset(boil.GetDB(), insert, related); err != nil {
panic(boil.WrapErr(err))
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (o *AssetRevision) SetAssetG(insert bool, related *Asset) error {\n\treturn o.SetAsset(boil.GetDB(), insert, related)\n}",
"func (o *AssetRevision) SetAsset(exec boil.Executor, insert bool, related *Asset) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"asset_revision\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"asset\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, assetRevisionPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.Orig}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.Asset = related.ID\n\n\tif o.R == nil {\n\t\to.R = &assetRevisionR{\n\t\t\tAsset: related,\n\t\t}\n\t} else {\n\t\to.R.Asset = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &assetR{\n\t\t\tAssetRevisions: AssetRevisionSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.AssetRevisions = append(related.R.AssetRevisions, o)\n\t}\n\n\treturn nil\n}",
"func (o *AssetRevision) SetAssetP(exec boil.Executor, insert bool, related *Asset) {\n\tif err := o.SetAsset(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) SetOrigGP(insert bool, related *Asset) {\n\tif err := o.SetOrig(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Rental) SetInventoryGP(insert bool, related *Inventory) {\n\tif err := o.SetInventory(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func FindAssetRevisionGP(orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(boil.GetDB(), orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (g *GitHub) SetAsset(name string) {\n\tg.releaseAsset = name\n}",
"func (o *BraceletPhoto) SetBraceletGP(insert bool, related *BraceletBracelet) {\n\tif err := o.SetBracelet(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) SetOrig(exec boil.Executor, insert bool, related *Asset) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"asset_revision\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"orig\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, assetRevisionPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.Orig}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.Orig = related.ID\n\n\tif o.R == nil {\n\t\to.R = &assetRevisionR{\n\t\t\tOrig: related,\n\t\t}\n\t} else {\n\t\to.R.Orig = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &assetR{\n\t\t\tOrigAssetRevision: o,\n\t\t}\n\t} else {\n\t\trelated.R.OrigAssetRevision = o\n\t}\n\n\treturn nil\n}",
"func (o *AssetRevision) ReloadGP() {\n\tif err := o.ReloadG(); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) UpdateGP(whitelist ...string) {\n\tif err := o.Update(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Transaction) SetProductGP(insert bool, related *Product) {\n\tif err := o.SetProduct(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) AssetG(mods ...qm.QueryMod) assetQuery {\n\treturn o.AssetByFk(boil.GetDB(), mods...)\n}",
"func (o *BraceletPhoto) SetPhotoBraceletBraceletsGP(insert bool, related ...*BraceletBracelet) {\n\tif err := o.SetPhotoBraceletBracelets(boil.GetDB(), insert, related...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Source) SetTypeGP(insert bool, related *SourceType) {\n\tif err := o.SetType(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) UpsertGP(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) {\n\tif err := o.Upsert(boil.GetDB(), updateOnConflict, conflictColumns, updateColumns, whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) SetOrigG(insert bool, related *Asset) error {\n\treturn o.SetOrig(boil.GetDB(), insert, related)\n}",
"func (o *Stock) SetProductGP(insert bool, related *Product) {\n\tif err := o.SetProduct(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Jet) SetPilotGP(insert bool, related *Pilot) {\n\tif err := o.SetPilot(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Vote) SetOptionGP(insert bool, related *Option) {\n\tif err := o.SetOption(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *BraceletPhoto) SetBracelet(exec boil.Executor, insert bool, related *BraceletBracelet) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE `bracelet_photo` SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, []string{\"bracelet_id\"}),\n\t\tstrmangle.WhereClause(\"`\", \"`\", 0, braceletPhotoPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.BraceletID = related.ID\n\n\tif o.R == nil {\n\t\to.R = &braceletPhotoR{\n\t\t\tBracelet: related,\n\t\t}\n\t} else {\n\t\to.R.Bracelet = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &braceletBraceletR{\n\t\t\tBraceletBraceletPhotos: BraceletPhotoSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.BraceletBraceletPhotos = append(related.R.BraceletBraceletPhotos, o)\n\t}\n\n\treturn nil\n}",
"func (o *Rental) SetCustomerGP(insert bool, related *Customer) {\n\tif err := o.SetCustomer(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *BraceletPhoto) SetUserGP(insert bool, related *AuthUser) {\n\tif err := o.SetUser(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func AssetRevisionExistsGP(orig int) bool {\n\te, err := AssetRevisionExists(boil.GetDB(), orig)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn e\n}",
"func (o *Item) SetItemOptionG(ctx context.Context, insert bool, related *ItemOption) error {\n\treturn o.SetItemOption(ctx, boil.GetContextDB(), insert, related)\n}",
"func FindAssetRevisionG(orig int, selectCols ...string) (*AssetRevision, error) {\n\treturn FindAssetRevision(boil.GetDB(), orig, selectCols...)\n}",
"func (o *Source) SetParentGP(insert bool, related *Source) {\n\tif err := o.SetParent(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func SetAsset(amount float64, symbol string) *types.Asset {\n\treturn &types.Asset{Amount: amount, Symbol: symbol}\n}",
"func (o *ItemSide) SetItemG(ctx context.Context, insert bool, related *Item) error {\n\treturn o.SetItem(ctx, boil.GetContextDB(), insert, related)\n}",
"func (o *AssetRevision) DeleteGP() {\n\tif err := o.DeleteG(); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Transaction) SetProductG(insert bool, related *Product) error {\n\treturn o.SetProduct(boil.GetDB(), insert, related)\n}",
"func (assetRevisionL) LoadAsset(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Asset\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Asset\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Asset = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Asset == foreign.ID {\n\t\t\t\tlocal.R.Asset = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BlackCard) SetSetGP(insert bool, related *Set) {\n\tif err := o.SetSet(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (k Keeper) SetJoinPoolAndStakeAsset(ctx sdk.Context, JoinPoolAndStakeAsset types.JoinPoolAndStakeAsset) {\n\tstore := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.JoinPoolAndStakeAssetKey))\n\tb := k.cdc.MustMarshalBinaryBare(&JoinPoolAndStakeAsset)\n\tstore.Set(GetJoinPoolAndStakeAssetIDBytes(JoinPoolAndStakeAsset.Id), b)\n}",
"func (o *Address) SetCityGP(insert bool, related *City) {\n\tif err := o.SetCity(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Transaction) SetBlockHashGP(insert bool, related *Block) {\n\tif err := o.SetBlockHash(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func (o *AssetRevision) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (r *Release) UploadAsset(path string) error {\n\tfile, err := os.OpenFile(path, os.O_RDONLY, 0755)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer file.Close()\n\tasset, _, err := r.client.Repositories.UploadReleaseAsset(context.Background(), r.owner, r.repository, r.ID, &gogithub.UploadOptions{\n\t\tName: filepath.Base(file.Name()),\n\t}, file)\n\tif err != nil {\n\t\treturn err\n\t}\n\tlog.Println(\"uploaded asset \", *asset.Name)\n\treturn nil\n}",
"func (o *Author) SetSourcesGP(insert bool, related ...*Source) {\n\tif err := o.SetSources(boil.GetDB(), insert, related...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Rental) SetPaymentsGP(insert bool, related ...*Payment) {\n\tif err := o.SetPayments(boil.GetDB(), insert, related...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func AssetRevisionsG(mods ...qm.QueryMod) assetRevisionQuery {\n\treturn AssetRevisions(boil.GetDB(), mods...)\n}",
"func (u *mutableResource[GA, Alpha, Beta]) Set(src *GA) error {\n\tc := newCopier(u.copierOptions...)\n\tif err := c.do(reflect.ValueOf(&u.ga), reflect.ValueOf(src)); err != nil {\n\t\treturn err\n\t}\n\treturn u.postAccess(meta.VersionGA, postAccessSkipValidation)\n}",
"func (o *Stock) SetProductG(insert bool, related *Product) error {\n\treturn o.SetProduct(boil.GetDB(), insert, related)\n}",
"func (o *Source) SetAuthorsGP(insert bool, related ...*Author) {\n\tif err := o.SetAuthors(boil.GetDB(), insert, related...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (r *Record) SetGobField(d *Db, number uint16, e interface{}) error {\n\tvar buffer bytes.Buffer\n\tencoder := gob.NewEncoder(&buffer)\n\terr := encoder.Encode(e)\n\tif err != nil {\n\t\treturn WDBError(fmt.Sprintf(\"Failed to add a record: %v\", err))\n\t}\n\n\tcKey := C.CString(reflect.TypeOf(e).String())\n\tdefer C.free(unsafe.Pointer(cKey))\n\tenc := C.wg_encode_blob(d.db, (*C.char)(unsafe.Pointer(&(buffer.Bytes())[0])), cKey, C.wg_int(buffer.Len()))\n\tif C.wg_set_field(d.db, r.rec, C.wg_int(number), enc) != 0 {\n\t\treturn WDBError(\"Could not set field\")\n\t}\n\treturn nil\n}",
"func (o *AssetRevision) SetOrigP(exec boil.Executor, insert bool, related *Asset) {\n\tif err := o.SetOrig(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func SetGitTrackObjectCondition(status *farosv1alpha1.GitTrackObjectStatus, condition farosv1alpha1.GitTrackObjectCondition) {\n\tcurrentCond := GetGitTrackObjectCondition(*status, condition.Type)\n\tif currentCond != nil && currentCond.Status == condition.Status && currentCond.Reason == condition.Reason {\n\t\treturn\n\t}\n\t// Do not update lastTransitionTime if the status of the condition doesn't change.\n\tif currentCond != nil && currentCond.Status == condition.Status {\n\t\tcondition.LastTransitionTime = currentCond.LastTransitionTime\n\t}\n\tnewConditions := filterOutCondition(status.Conditions, condition.Type)\n\tstatus.Conditions = append(newConditions, condition)\n}",
"func (o *StockCvterm) SetStockCvtermprop(exec boil.Executor, insert bool, related *StockCvtermprop) error {\n\tvar err error\n\n\tif insert {\n\t\trelated.StockCvtermID = o.StockCvtermID\n\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t} else {\n\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\"UPDATE \\\"stock_cvtermprop\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"stock_cvterm_id\"}),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, stockCvtermpropPrimaryKeyColumns),\n\t\t)\n\t\tvalues := []interface{}{o.StockCvtermID, related.StockCvtermpropID}\n\n\t\tif boil.DebugMode {\n\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t}\n\n\t\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t}\n\n\t\trelated.StockCvtermID = o.StockCvtermID\n\n\t}\n\n\tif o.R == nil {\n\t\to.R = &stockCvtermR{\n\t\t\tStockCvtermprop: related,\n\t\t}\n\t} else {\n\t\to.R.StockCvtermprop = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &stockCvtermpropR{\n\t\t\tStockCvterm: o,\n\t\t}\n\t} else {\n\t\trelated.R.StockCvterm = o\n\t}\n\treturn nil\n}",
"func (o *BraceletPhoto) SetBraceletG(insert bool, related *BraceletBracelet) error {\n\treturn o.SetBracelet(boil.GetDB(), insert, related)\n}",
"func (o *Jet) SetPilotG(insert bool, related *Pilot) error {\n\treturn o.SetPilot(boil.GetDB(), insert, related)\n}",
"func AddAssetRevisionHook(hookPoint boil.HookPoint, assetRevisionHook AssetRevisionHook) {\n\tswitch hookPoint {\n\tcase boil.BeforeInsertHook:\n\t\tassetRevisionBeforeInsertHooks = append(assetRevisionBeforeInsertHooks, assetRevisionHook)\n\tcase boil.BeforeUpdateHook:\n\t\tassetRevisionBeforeUpdateHooks = append(assetRevisionBeforeUpdateHooks, assetRevisionHook)\n\tcase boil.BeforeDeleteHook:\n\t\tassetRevisionBeforeDeleteHooks = append(assetRevisionBeforeDeleteHooks, assetRevisionHook)\n\tcase boil.BeforeUpsertHook:\n\t\tassetRevisionBeforeUpsertHooks = append(assetRevisionBeforeUpsertHooks, assetRevisionHook)\n\tcase boil.AfterInsertHook:\n\t\tassetRevisionAfterInsertHooks = append(assetRevisionAfterInsertHooks, assetRevisionHook)\n\tcase boil.AfterSelectHook:\n\t\tassetRevisionAfterSelectHooks = append(assetRevisionAfterSelectHooks, assetRevisionHook)\n\tcase boil.AfterUpdateHook:\n\t\tassetRevisionAfterUpdateHooks = append(assetRevisionAfterUpdateHooks, assetRevisionHook)\n\tcase boil.AfterDeleteHook:\n\t\tassetRevisionAfterDeleteHooks = append(assetRevisionAfterDeleteHooks, assetRevisionHook)\n\tcase boil.AfterUpsertHook:\n\t\tassetRevisionAfterUpsertHooks = append(assetRevisionAfterUpsertHooks, assetRevisionHook)\n\t}\n}",
"func setObjectRevision(obj client.Object, revision int64) {\n\ta := obj.GetAnnotations()\n\tif a == nil {\n\t\ta = map[string]string{}\n\t}\n\ta[revisionAnnotation] = fmt.Sprintf(\"%d\", revision)\n\tobj.SetAnnotations(a)\n}",
"func (o *Transaction) SetUserGP(insert bool, related *User) {\n\tif err := o.SetUser(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func RegisterAssetPeg(cdc *wire.Codec) {\n\tcdc.RegisterInterface((*types.AssetPeg)(nil), nil)\n\tcdc.RegisterConcrete(&types.BaseAssetPeg{}, \"commit-blockchain/AssetPeg\", nil)\n}",
"func (o *FeatureRelationship) SetObject(exec boil.Executor, insert bool, related *Feature) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"feature_relationship\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"object_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, featureRelationshipPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.FeatureID, o.FeatureRelationshipID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.ObjectID = related.FeatureID\n\n\tif o.R == nil {\n\t\to.R = &featureRelationshipR{\n\t\t\tObject: related,\n\t\t}\n\t} else {\n\t\to.R.Object = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &featureR{\n\t\t\tObjectFeatureRelationship: o,\n\t\t}\n\t} else {\n\t\trelated.R.ObjectFeatureRelationship = o\n\t}\n\n\treturn nil\n}",
"func (o *Item) SetItemOption(ctx context.Context, exec boil.ContextExecutor, insert bool, related *ItemOption) error {\n\tvar err error\n\n\tif insert {\n\t\tqueries.Assign(&related.ItemID, o.ID)\n\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t} else {\n\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\"UPDATE \\\"item_options\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 0, []string{\"item_id\"}),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 0, itemOptionPrimaryKeyColumns),\n\t\t)\n\t\tvalues := []interface{}{o.ID, related.ItemID, related.OptionID}\n\n\t\tif boil.IsDebug(ctx) {\n\t\t\twriter := boil.DebugWriterFrom(ctx)\n\t\t\tfmt.Fprintln(writer, updateQuery)\n\t\t\tfmt.Fprintln(writer, values)\n\t\t}\n\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t}\n\n\t\tqueries.Assign(&related.ItemID, o.ID)\n\t}\n\n\tif o.R == nil {\n\t\to.R = &itemR{\n\t\t\tItemOption: related,\n\t\t}\n\t} else {\n\t\to.R.ItemOption = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &itemOptionR{\n\t\t\tItem: o,\n\t\t}\n\t} else {\n\t\trelated.R.Item = o\n\t}\n\treturn nil\n}",
"func (o *Jet) SetPilot(exec boil.Executor, insert bool, related *Pilot) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE `jets` SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, []string{\"pilot_id\"}),\n\t\tstrmangle.WhereClause(\"`\", \"`\", 0, jetPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.PilotID = related.ID\n\n\tif o.R == nil {\n\t\to.R = &jetR{\n\t\t\tPilot: related,\n\t\t}\n\t} else {\n\t\to.R.Pilot = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &pilotR{\n\t\t\tJets: JetSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.Jets = append(related.R.Jets, o)\n\t}\n\n\treturn nil\n}",
"func (o *Stock) SetUserGP(insert bool, related *User) {\n\tif err := o.SetUser(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AuthUserUserPermission) SetPermissionGP(insert bool, related *AuthPermission) {\n\tif err := o.SetPermission(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Origin) SetOriginAPG(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AuditPackageGroup) error {\n\tquery := \"update \\\"audit_package_group\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginAPG {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginAPG = nil\n\t}\n\treturn o.AddOriginAPG(ctx, exec, insert, related...)\n}",
"func (o *AssetRevision) UpdateG(whitelist ...string) error {\n\treturn o.Update(boil.GetDB(), whitelist...)\n}",
"func (o *StockCvterm) SetPub(exec boil.Executor, insert bool, related *Pub) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"stock_cvterm\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"pub_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, stockCvtermPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.PubID, o.StockCvtermID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.PubID = related.PubID\n\n\tif o.R == nil {\n\t\to.R = &stockCvtermR{\n\t\t\tPub: related,\n\t\t}\n\t} else {\n\t\to.R.Pub = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &pubR{\n\t\t\tStockCvterm: o,\n\t\t}\n\t} else {\n\t\trelated.R.StockCvterm = o\n\t}\n\n\treturn nil\n}",
"func (o *Rental) SetInventoryG(insert bool, related *Inventory) error {\n\treturn o.SetInventory(boil.GetDB(), insert, related)\n}",
"func (o *FeatureCvtermDbxref) UpsertGP(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) {\n\tif err := o.Upsert(boil.GetDB(), updateOnConflict, conflictColumns, updateColumns, whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Source) SetContentUnitsGP(insert bool, related ...*ContentUnit) {\n\tif err := o.SetContentUnits(boil.GetDB(), insert, related...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (a *assets) SetAssetFS(af ...AssetFS) {\n\ta.a = append(a.a, af...)\n}",
"func (o *Organism) SetStock(exec boil.Executor, insert bool, related *Stock) error {\n\tvar err error\n\n\tif insert {\n\t\trelated.OrganismID.Int = o.OrganismID\n\t\trelated.OrganismID.Valid = true\n\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t} else {\n\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\"UPDATE \\\"stock\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"organism_id\"}),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, stockPrimaryKeyColumns),\n\t\t)\n\t\tvalues := []interface{}{o.OrganismID, related.StockID}\n\n\t\tif boil.DebugMode {\n\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t}\n\n\t\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t}\n\n\t\trelated.OrganismID.Int = o.OrganismID\n\t\trelated.OrganismID.Valid = true\n\t}\n\n\tif o.R == nil {\n\t\to.R = &organismR{\n\t\t\tStock: related,\n\t\t}\n\t} else {\n\t\to.R.Stock = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &stockR{\n\t\t\tOrganism: o,\n\t\t}\n\t} else {\n\t\trelated.R.Organism = o\n\t}\n\treturn nil\n}",
"func (o *Organism) SetJbrowseOrganism(exec boil.Executor, insert bool, related *JbrowseOrganism) error {\n\tvar err error\n\n\tif insert {\n\t\trelated.OrganismID = o.OrganismID\n\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t} else {\n\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\"UPDATE \\\"jbrowse_organism\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"organism_id\"}),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, jbrowseOrganismPrimaryKeyColumns),\n\t\t)\n\t\tvalues := []interface{}{o.OrganismID, related.JbrowseOrganismID}\n\n\t\tif boil.DebugMode {\n\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t}\n\n\t\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t}\n\n\t\trelated.OrganismID = o.OrganismID\n\n\t}\n\n\tif o.R == nil {\n\t\to.R = &organismR{\n\t\t\tJbrowseOrganism: related,\n\t\t}\n\t} else {\n\t\to.R.JbrowseOrganism = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &jbrowseOrganismR{\n\t\t\tOrganism: o,\n\t\t}\n\t} else {\n\t\trelated.R.Organism = o\n\t}\n\treturn nil\n}",
"func (o *ItemSide) SetSideItemG(ctx context.Context, insert bool, related *Item) error {\n\treturn o.SetSideItem(ctx, boil.GetContextDB(), insert, related)\n}",
"func (o *BraceletPhoto) SetPhotoBraceletBraceletsG(insert bool, related ...*BraceletBracelet) error {\n\treturn o.SetPhotoBraceletBracelets(boil.GetDB(), insert, related...)\n}",
"func (o *BraceletPhoto) UpdateGP(whitelist ...string) {\n\tif err := o.Update(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Item) SetKind(ctx context.Context, exec boil.ContextExecutor, insert bool, related *ItemKind) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"items\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 0, []string{\"kind_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 0, itemPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.IsDebug(ctx) {\n\t\twriter := boil.DebugWriterFrom(ctx)\n\t\tfmt.Fprintln(writer, updateQuery)\n\t\tfmt.Fprintln(writer, values)\n\t}\n\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\tqueries.Assign(&o.KindID, related.ID)\n\tif o.R == nil {\n\t\to.R = &itemR{\n\t\t\tKind: related,\n\t\t}\n\t} else {\n\t\to.R.Kind = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &itemKindR{\n\t\t\tKindItems: ItemSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.KindItems = append(related.R.KindItems, o)\n\t}\n\n\treturn nil\n}",
"func writeAssetToPart(assetObj Asset, writer *multipart.Writer) error {\n\t//Send a request to get the asset file\n\turl := assetObj.URL\n\tresp, err := http.Get(url)\n\tif err != nil {\n\t\tlog.Fatalln(\"Could not get the asset from the url: \", err)\n\t\treturn err\n\t}\n\tdefer resp.Body.Close()\n\n\t//Copy the asset to a byte buffer to find the size of the asset\n\tbuf := &bytes.Buffer{}\n\tnRead, err := io.Copy(buf, resp.Body)\n\tif err != nil {\n\t\tfmt.Println(\"Could not copy the responsBody to the buffer: \", err)\n\t\treturn err\n\t}\n\n\t//Create the MIMEHeader and create a new part\n\th := make(textproto.MIMEHeader)\n\th.Set(\"Content-Type\", assetObj.MIMEType)\n\th.Set(\"Content-Length\", strconv.FormatInt(nRead, 10)) //len(data)\n\th.Set(\"Content-Transfer-Encoding\", \"quoted-printable\")\n\th.Set(\"Content-Name\", assetObj.ID.Hex())\n\tfw, err := writer.CreatePart(h)\n\tif err != nil {\n\t\tlog.Fatalln(\"Could not create form field: \", err)\n\t\treturn err\n\t}\n\n\t//Create the encoding writer and write the data to it.\n\tw := quotedprintable.NewWriter(fw)\n\tw.Binary = true //Tell it to treat the data as binary\n\tw.Write(buf.Bytes())\n\n\treturn nil\n}",
"func (o *AssetRevision) UpsertG(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error {\n\treturn o.Upsert(boil.GetDB(), updateOnConflict, conflictColumns, updateColumns, whitelist...)\n}",
"func (a *ReplayedS1UESecurityCapabilities) SetGEA3(gEA3 uint8) {\n\ta.Buffer[4] = (a.Buffer[4] & 239) + ((gEA3 & 1) << 4)\n}",
"func (o *Vote) SetOptionG(insert bool, related *Option) error {\n\treturn o.SetOption(boil.GetDB(), insert, related)\n}",
"func (o *BraceletPhoto) SetUser(exec boil.Executor, insert bool, related *AuthUser) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE `bracelet_photo` SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, []string{\"user_id\"}),\n\t\tstrmangle.WhereClause(\"`\", \"`\", 0, braceletPhotoPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.UserID = related.ID\n\n\tif o.R == nil {\n\t\to.R = &braceletPhotoR{\n\t\t\tUser: related,\n\t\t}\n\t} else {\n\t\to.R.User = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &authUserR{\n\t\t\tUserBraceletPhotos: BraceletPhotoSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.UserBraceletPhotos = append(related.R.UserBraceletPhotos, o)\n\t}\n\n\treturn nil\n}",
"func (o *Asset) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AuthToken) SetUserGP(insert bool, related *User) {\n\tif err := o.SetUser(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AuthUser) SetUserDjangoCommentsGP(insert bool, related ...*DjangoComment) {\n\tif err := o.SetUserDjangoComments(boil.GetDB(), insert, related...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Organism) SetOrganismprop(exec boil.Executor, insert bool, related *Organismprop) error {\n\tvar err error\n\n\tif insert {\n\t\trelated.OrganismID = o.OrganismID\n\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t} else {\n\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\"UPDATE \\\"organismprop\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"organism_id\"}),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, organismpropPrimaryKeyColumns),\n\t\t)\n\t\tvalues := []interface{}{o.OrganismID, related.OrganismpropID}\n\n\t\tif boil.DebugMode {\n\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t}\n\n\t\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t}\n\n\t\trelated.OrganismID = o.OrganismID\n\n\t}\n\n\tif o.R == nil {\n\t\to.R = &organismR{\n\t\t\tOrganismprop: related,\n\t\t}\n\t} else {\n\t\to.R.Organismprop = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &organismpropR{\n\t\t\tOrganism: o,\n\t\t}\n\t} else {\n\t\trelated.R.Organism = o\n\t}\n\treturn nil\n}",
"func AssetRevisionExistsG(orig int) (bool, error) {\n\treturn AssetRevisionExists(boil.GetDB(), orig)\n}",
"func (o *Item) SetItemSideG(ctx context.Context, insert bool, related *ItemSide) error {\n\treturn o.SetItemSide(ctx, boil.GetContextDB(), insert, related)\n}",
"func (o *FeatureCvtermDbxref) UpdateGP(whitelist ...string) {\n\tif err := o.Update(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Source) SetParentG(insert bool, related *Source) error {\n\treturn o.SetParent(boil.GetDB(), insert, related)\n}",
"func (assetRevisionL) LoadOrig(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Orig\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Orig\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Orig = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Orig == foreign.ID {\n\t\t\t\tlocal.R.Orig = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Source) SetTypeG(insert bool, related *SourceType) error {\n\treturn o.SetType(boil.GetDB(), insert, related)\n}",
"func (o *AuthUserUserPermission) SetUserGP(insert bool, related *AuthUser) {\n\tif err := o.SetUser(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (a *chunkBasedAtlas) setObject(chunk int, local maths.Vector, object Object) {\n\ta.populate(chunk)\n\n\tc := a.Chunks[chunk]\n\ti := a.chunkTileIndex(local)\n\tif object.Type != roveapi.Object_ObjectUnknown {\n\t\tc.Objects[i] = object\n\t} else {\n\t\tdelete(c.Objects, i)\n\t}\n\ta.Chunks[chunk] = c\n}",
"func (o *RecipeAdditive) SetRecipe(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Recipe) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"recipe_additive\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"recipe_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, recipeAdditivePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.IsDebug(ctx) {\n\t\twriter := boil.DebugWriterFrom(ctx)\n\t\tfmt.Fprintln(writer, updateQuery)\n\t\tfmt.Fprintln(writer, values)\n\t}\n\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.RecipeID = related.ID\n\tif o.R == nil {\n\t\to.R = &recipeAdditiveR{\n\t\t\tRecipe: related,\n\t\t}\n\t} else {\n\t\to.R.Recipe = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &recipeR{\n\t\t\tRecipeAdditives: RecipeAdditiveSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.RecipeAdditives = append(related.R.RecipeAdditives, o)\n\t}\n\n\treturn nil\n}",
"func (l *GenericMetadata) LinkToInterfaceRevisionOnFieldInterfaceRevision(target *InterfaceRevision) error {\n\tif target == nil {\n\t\treturn errors.New(\"start and end can not be nil\")\n\t}\n\n\tl.InterfaceRevision = target\n\n\ttarget.Metadata = l\n\n\treturn nil\n}",
"func (o *StockCvterm) UpsertGP(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) {\n\tif err := o.Upsert(boil.GetDB(), updateOnConflict, conflictColumns, updateColumns, whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *StockCvterm) SetStock(exec boil.Executor, insert bool, related *Stock) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"stock_cvterm\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"stock_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, stockCvtermPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.StockID, o.StockCvtermID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.StockID = related.StockID\n\n\tif o.R == nil {\n\t\to.R = &stockCvtermR{\n\t\t\tStock: related,\n\t\t}\n\t} else {\n\t\to.R.Stock = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &stockR{\n\t\t\tStockCvterm: o,\n\t\t}\n\t} else {\n\t\trelated.R.StockCvterm = o\n\t}\n\n\treturn nil\n}",
"func (o *Source) SetParentSourcesGP(insert bool, related ...*Source) {\n\tif err := o.SetParentSources(boil.GetDB(), insert, related...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (p *ProjectRef) AttachToRepo(u *user.DBUser) error {\n\tbefore, err := GetProjectSettingsById(p.Id, false)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"error getting before project settings event\")\n\t}\n\tif err := p.AddToRepoScope(u); err != nil {\n\t\treturn err\n\t}\n\terr = db.UpdateId(ProjectRefCollection, p.Id, bson.M{\n\t\t\"$set\": bson.M{\n\t\t\tprojectRefUseRepoSettingsKey: true,\n\t\t\tProjectRefRepoRefIdKey: p.RepoRefId, // this is set locally in AddToRepoScope\n\t\t},\n\t})\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"error attaching repo to scope\")\n\t}\n\tp.UseRepoSettings = true\n\treturn GetAndLogProjectModified(p.Id, u.Id, false, before)\n}",
"func (o *Transaction) SetProduct(exec boil.Executor, insert bool, related *Product) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE `transactions` SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, []string{\"product_id\"}),\n\t\tstrmangle.WhereClause(\"`\", \"`\", 0, transactionPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ProductID, o.TransactionID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.ProductID.Int = related.ProductID\n\to.ProductID.Valid = true\n\n\tif o.R == nil {\n\t\to.R = &transactionR{\n\t\t\tProduct: related,\n\t\t}\n\t} else {\n\t\to.R.Product = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &productR{\n\t\t\tTransactions: TransactionSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.Transactions = append(related.R.Transactions, o)\n\t}\n\n\treturn nil\n}",
"func (ec *executionContext) _Asset(ctx context.Context, sel ast.SelectionSet, obj *models.Asset) graphql.Marshaler {\n\tfields := graphql.CollectFields(ctx, sel, assetImplementors)\n\n\tout := graphql.NewOrderedMap(len(fields))\n\tinvalid := false\n\tfor i, field := range fields {\n\t\tout.Keys[i] = field.Alias\n\n\t\tswitch field.Name {\n\t\tcase \"__typename\":\n\t\t\tout.Values[i] = graphql.MarshalString(\"Asset\")\n\t\tcase \"Id\":\n\t\t\tout.Values[i] = ec._Asset_Id(ctx, field, obj)\n\t\tcase \"Name\":\n\t\t\tout.Values[i] = ec._Asset_Name(ctx, field, obj)\n\t\tdefault:\n\t\t\tpanic(\"unknown field \" + strconv.Quote(field.Name))\n\t\t}\n\t}\n\n\tif invalid {\n\t\treturn graphql.Null\n\t}\n\treturn out\n}",
"func (o *Rental) SetInventory(exec boil.Executor, insert bool, related *Inventory) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE `rental` SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, []string{\"inventory_id\"}),\n\t\tstrmangle.WhereClause(\"`\", \"`\", 0, rentalPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.InventoryID, o.RentalID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.InventoryID = related.InventoryID\n\n\tif o.R == nil {\n\t\to.R = &rentalR{\n\t\t\tInventory: related,\n\t\t}\n\t} else {\n\t\to.R.Inventory = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &inventoryR{\n\t\t\tRentals: RentalSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.Rentals = append(related.R.Rentals, o)\n\t}\n\n\treturn nil\n}",
"func FindAssetRevisionP(exec boil.Executor, orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(exec, orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}"
] |
[
"0.6913994",
"0.6555764",
"0.6208789",
"0.6169899",
"0.57487893",
"0.55044943",
"0.5443385",
"0.54374987",
"0.5337802",
"0.5258949",
"0.524457",
"0.50565076",
"0.50440776",
"0.5040674",
"0.50055325",
"0.5001102",
"0.49481383",
"0.49334738",
"0.49072075",
"0.48367506",
"0.48162454",
"0.47613695",
"0.47587296",
"0.47466546",
"0.47245124",
"0.47176328",
"0.47167242",
"0.4686849",
"0.46711004",
"0.46477088",
"0.4644648",
"0.46346712",
"0.45995656",
"0.45841902",
"0.45787135",
"0.45775655",
"0.45745584",
"0.45693576",
"0.456087",
"0.45467815",
"0.45462447",
"0.45431268",
"0.45225266",
"0.45063442",
"0.44754502",
"0.44735277",
"0.44627303",
"0.4461697",
"0.44293183",
"0.4399094",
"0.43896243",
"0.43787172",
"0.43743446",
"0.43598998",
"0.43553278",
"0.43324503",
"0.4312875",
"0.43121597",
"0.43059066",
"0.4302191",
"0.42993757",
"0.42979383",
"0.4288779",
"0.4284379",
"0.4271195",
"0.42693076",
"0.42634866",
"0.42603096",
"0.4258833",
"0.42558938",
"0.42398578",
"0.41963726",
"0.41822642",
"0.41801292",
"0.41781017",
"0.41601416",
"0.41598558",
"0.41455787",
"0.41409788",
"0.4136106",
"0.41218668",
"0.41060647",
"0.4101823",
"0.40990114",
"0.4095757",
"0.40903834",
"0.40886354",
"0.40839773",
"0.4067843",
"0.40636516",
"0.40628898",
"0.40374038",
"0.4034674",
"0.40343916",
"0.40337086",
"0.40203416",
"0.401727",
"0.40152285",
"0.40075094",
"0.4006696"
] |
0.7782776
|
0
|
SetAsset of the asset_revision to the related item. Sets o.R.Asset to related. Adds o to related.R.AssetRevisions.
|
func (o *AssetRevision) SetAsset(exec boil.Executor, insert bool, related *Asset) error {
var err error
if insert {
if err = related.Insert(exec); err != nil {
return errors.Wrap(err, "failed to insert into foreign table")
}
}
updateQuery := fmt.Sprintf(
"UPDATE \"asset_revision\" SET %s WHERE %s",
strmangle.SetParamNames("\"", "\"", 1, []string{"asset"}),
strmangle.WhereClause("\"", "\"", 2, assetRevisionPrimaryKeyColumns),
)
values := []interface{}{related.ID, o.Orig}
if boil.DebugMode {
fmt.Fprintln(boil.DebugWriter, updateQuery)
fmt.Fprintln(boil.DebugWriter, values)
}
if _, err = exec.Exec(updateQuery, values...); err != nil {
return errors.Wrap(err, "failed to update local table")
}
o.Asset = related.ID
if o.R == nil {
o.R = &assetRevisionR{
Asset: related,
}
} else {
o.R.Asset = related
}
if related.R == nil {
related.R = &assetR{
AssetRevisions: AssetRevisionSlice{o},
}
} else {
related.R.AssetRevisions = append(related.R.AssetRevisions, o)
}
return nil
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (o *AssetRevision) SetAssetP(exec boil.Executor, insert bool, related *Asset) {\n\tif err := o.SetAsset(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (g *GitHub) SetAsset(name string) {\n\tg.releaseAsset = name\n}",
"func (o *AssetRevision) SetOrig(exec boil.Executor, insert bool, related *Asset) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"asset_revision\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"orig\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, assetRevisionPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.Orig}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.Orig = related.ID\n\n\tif o.R == nil {\n\t\to.R = &assetRevisionR{\n\t\t\tOrig: related,\n\t\t}\n\t} else {\n\t\to.R.Orig = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &assetR{\n\t\t\tOrigAssetRevision: o,\n\t\t}\n\t} else {\n\t\trelated.R.OrigAssetRevision = o\n\t}\n\n\treturn nil\n}",
"func (o *AssetRevision) SetAssetGP(insert bool, related *Asset) {\n\tif err := o.SetAsset(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func SetAsset(amount float64, symbol string) *types.Asset {\n\treturn &types.Asset{Amount: amount, Symbol: symbol}\n}",
"func (o *AssetRevision) SetAssetG(insert bool, related *Asset) error {\n\treturn o.SetAsset(boil.GetDB(), insert, related)\n}",
"func (r *Release) UploadAsset(path string) error {\n\tfile, err := os.OpenFile(path, os.O_RDONLY, 0755)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer file.Close()\n\tasset, _, err := r.client.Repositories.UploadReleaseAsset(context.Background(), r.owner, r.repository, r.ID, &gogithub.UploadOptions{\n\t\tName: filepath.Base(file.Name()),\n\t}, file)\n\tif err != nil {\n\t\treturn err\n\t}\n\tlog.Println(\"uploaded asset \", *asset.Name)\n\treturn nil\n}",
"func AddAssetRevisionHook(hookPoint boil.HookPoint, assetRevisionHook AssetRevisionHook) {\n\tswitch hookPoint {\n\tcase boil.BeforeInsertHook:\n\t\tassetRevisionBeforeInsertHooks = append(assetRevisionBeforeInsertHooks, assetRevisionHook)\n\tcase boil.BeforeUpdateHook:\n\t\tassetRevisionBeforeUpdateHooks = append(assetRevisionBeforeUpdateHooks, assetRevisionHook)\n\tcase boil.BeforeDeleteHook:\n\t\tassetRevisionBeforeDeleteHooks = append(assetRevisionBeforeDeleteHooks, assetRevisionHook)\n\tcase boil.BeforeUpsertHook:\n\t\tassetRevisionBeforeUpsertHooks = append(assetRevisionBeforeUpsertHooks, assetRevisionHook)\n\tcase boil.AfterInsertHook:\n\t\tassetRevisionAfterInsertHooks = append(assetRevisionAfterInsertHooks, assetRevisionHook)\n\tcase boil.AfterSelectHook:\n\t\tassetRevisionAfterSelectHooks = append(assetRevisionAfterSelectHooks, assetRevisionHook)\n\tcase boil.AfterUpdateHook:\n\t\tassetRevisionAfterUpdateHooks = append(assetRevisionAfterUpdateHooks, assetRevisionHook)\n\tcase boil.AfterDeleteHook:\n\t\tassetRevisionAfterDeleteHooks = append(assetRevisionAfterDeleteHooks, assetRevisionHook)\n\tcase boil.AfterUpsertHook:\n\t\tassetRevisionAfterUpsertHooks = append(assetRevisionAfterUpsertHooks, assetRevisionHook)\n\t}\n}",
"func (assetRevisionL) LoadAsset(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Asset\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Asset\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Asset = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Asset == foreign.ID {\n\t\t\t\tlocal.R.Asset = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (k Keeper) SetJoinPoolAndStakeAsset(ctx sdk.Context, JoinPoolAndStakeAsset types.JoinPoolAndStakeAsset) {\n\tstore := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.JoinPoolAndStakeAssetKey))\n\tb := k.cdc.MustMarshalBinaryBare(&JoinPoolAndStakeAsset)\n\tstore.Set(GetJoinPoolAndStakeAssetIDBytes(JoinPoolAndStakeAsset.Id), b)\n}",
"func (o *CreditFreddieMacAssetsVOA24) SetASSET(v []CreditFreddieMacAssetVOA24) {\n\to.ASSET = v\n}",
"func (o *Rental) SetInventory(exec boil.Executor, insert bool, related *Inventory) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE `rental` SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, []string{\"inventory_id\"}),\n\t\tstrmangle.WhereClause(\"`\", \"`\", 0, rentalPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.InventoryID, o.RentalID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.InventoryID = related.InventoryID\n\n\tif o.R == nil {\n\t\to.R = &rentalR{\n\t\t\tInventory: related,\n\t\t}\n\t} else {\n\t\to.R.Inventory = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &inventoryR{\n\t\t\tRentals: RentalSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.Rentals = append(related.R.Rentals, o)\n\t}\n\n\treturn nil\n}",
"func (c *Client) UploadAsset(ctx context.Context, releaseID int64, filename string) (*github.ReleaseAsset, error) {\n\n\tfilename, err := filepath.Abs(filename)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"failed to get abs path\")\n\t}\n\n\tf, err := os.Open(filename)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"failed to open file\")\n\t}\n\n\topts := &github.UploadOptions{\n\t\t// Use base name by default\n\t\tName: filepath.Base(filename),\n\t}\n\n\tvar asset *github.ReleaseAsset\n\terr = retry.Retry(3, 3*time.Second, func() error {\n\t\tvar (\n\t\t\tres *github.Response\n\t\t\terr error\n\t\t)\n\t\tasset, res, err = c.Repositories.UploadReleaseAsset(context.TODO(), c.Owner, c.Repo, releaseID, opts, f)\n\t\tif err != nil {\n\t\t\treturn errors.Wrapf(err, \"failed to upload release asset: %s\", filename)\n\t\t}\n\n\t\tswitch res.StatusCode {\n\t\tcase http.StatusCreated:\n\t\t\treturn nil\n\t\tcase 422:\n\t\t\treturn errors.Errorf(\n\t\t\t\t\"upload release asset: invalid status code: %s\",\n\t\t\t\t\"422 (this is probably because the asset already uploaded)\")\n\t\tdefault:\n\t\t\treturn errors.Errorf(\n\t\t\t\t\"upload release asset: invalid status code: %s\", res.Status)\n\t\t}\n\t})\n\treturn asset, err\n}",
"func ApplyAsset(h *resource.Helper, assetPath string, hLog log.FieldLogger) error {\n\tassetLog := hLog.WithField(\"asset\", assetPath)\n\tassetLog.Debug(\"reading asset\")\n\tasset := assets.MustAsset(assetPath)\n\tassetLog.Debug(\"applying asset\")\n\tresult, err := h.Apply(asset)\n\tif err != nil {\n\t\tassetLog.WithError(err).Error(\"error applying asset\")\n\t\treturn err\n\t}\n\tassetLog.Infof(\"asset applied successfully: %v\", result)\n\treturn nil\n}",
"func (o *RecipeAdditive) SetRecipe(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Recipe) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"recipe_additive\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"recipe_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, recipeAdditivePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.IsDebug(ctx) {\n\t\twriter := boil.DebugWriterFrom(ctx)\n\t\tfmt.Fprintln(writer, updateQuery)\n\t\tfmt.Fprintln(writer, values)\n\t}\n\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.RecipeID = related.ID\n\tif o.R == nil {\n\t\to.R = &recipeAdditiveR{\n\t\t\tRecipe: related,\n\t\t}\n\t} else {\n\t\to.R.Recipe = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &recipeR{\n\t\t\tRecipeAdditives: RecipeAdditiveSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.RecipeAdditives = append(related.R.RecipeAdditives, o)\n\t}\n\n\treturn nil\n}",
"func (o *AssetRevision) AssetByFk(exec boil.Executor, mods ...qm.QueryMod) assetQuery {\n\tqueryMods := []qm.QueryMod{\n\t\tqm.Where(\"id=?\", o.Asset),\n\t}\n\n\tqueryMods = append(queryMods, mods...)\n\n\tquery := Assets(exec, queryMods...)\n\tqueries.SetFrom(query.Query, \"\\\"asset\\\"\")\n\n\treturn query\n}",
"func (gauo *GithubAssetUpdateOne) SetAssetID(i int64) *GithubAssetUpdateOne {\n\tgauo.mutation.ResetAssetID()\n\tgauo.mutation.SetAssetID(i)\n\treturn gauo\n}",
"func (s *SmartContract) TransferAsset(ctx contractapi.TransactionContextInterface, id string, newOwner string) error {\n\n\tasset, err := s.ReadAsset(ctx, id)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tclientID, err := s.GetSubmittingClientIdentity(ctx)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif clientID != asset.Owner {\n\t\treturn fmt.Errorf(\"submitting client not authorized to update asset, does not own asset\")\n\t}\n\n\tasset.Owner = newOwner\n\tassetJSON, err := json.Marshal(asset)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn ctx.GetStub().PutState(id, assetJSON)\n}",
"func (gau *GithubAssetUpdate) SetAssetID(i int64) *GithubAssetUpdate {\n\tgau.mutation.ResetAssetID()\n\tgau.mutation.SetAssetID(i)\n\treturn gau\n}",
"func (o *PostMultiNodeDeviceParams) SetAssetNo(assetNo *string) {\n\to.AssetNo = assetNo\n}",
"func WriteAsset(name string, data []byte) {\n\tencoded := base64.StdEncoding.EncodeToString([]byte(data))\n\n\t// Add to list of asset names if needed\n\tif _, ok := assets[name]; !ok {\n\t\tassetNames = append(assetNames, name)\n\t}\n\n\t// Store assset\n\tassets[name] = Asset{Name: name, Compressed: false, Data: encoded}\n}",
"func (m *Asset) UnmarshalJSON(raw []byte) error {\n\t// AO0\n\tvar aO0 Resource\n\tif err := swag.ReadJSON(raw, &aO0); err != nil {\n\t\treturn err\n\t}\n\tm.Resource = aO0\n\n\t// AO1\n\tvar dataAO1 struct {\n\t\tBinaryRepository *BinaryRepository `json:\"binaryRepository,omitempty\"`\n\n\t\tPipeline *Pipeline `json:\"pipeline,omitempty\"`\n\n\t\tSourceRepository *SourceRepository `json:\"sourceRepository,omitempty\"`\n\t}\n\tif err := swag.ReadJSON(raw, &dataAO1); err != nil {\n\t\treturn err\n\t}\n\n\tm.BinaryRepository = dataAO1.BinaryRepository\n\n\tm.Pipeline = dataAO1.Pipeline\n\n\tm.SourceRepository = dataAO1.SourceRepository\n\n\treturn nil\n}",
"func (a *Asset) Equal(other *Asset) bool {\n\tif other == nil && a == nil {\n\t\treturn true\n\t}\n\tif other == nil || a == nil {\n\t\treturn false\n\t}\n\treturn a.Property == other.Property && a.Id == other.Id\n}",
"func (a *AssetRegistry) RegisterAsset(color devnetvm.Color, asset Asset) error {\n\ta.Assets[color] = asset\n\treturn a.client.SaveAsset(context.TODO(), a.Network(), asset.ToRegistry())\n}",
"func (o *OutputState) ApplyAsset(applier interface{}) AssetOutput {\n\treturn o.ApplyT(applier).(AssetOutput)\n}",
"func (o *BraceletPhoto) SetBracelet(exec boil.Executor, insert bool, related *BraceletBracelet) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE `bracelet_photo` SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, []string{\"bracelet_id\"}),\n\t\tstrmangle.WhereClause(\"`\", \"`\", 0, braceletPhotoPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.BraceletID = related.ID\n\n\tif o.R == nil {\n\t\to.R = &braceletPhotoR{\n\t\t\tBracelet: related,\n\t\t}\n\t} else {\n\t\to.R.Bracelet = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &braceletBraceletR{\n\t\t\tBraceletBraceletPhotos: BraceletPhotoSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.BraceletBraceletPhotos = append(related.R.BraceletBraceletPhotos, o)\n\t}\n\n\treturn nil\n}",
"func (o *PostDeviceRackParams) SetAssetNo(assetNo *string) {\n\to.AssetNo = assetNo\n}",
"func CreateAsset(\n\ttrx storage.Transaction,\n\tissueTxId merkle.Digest,\n\tissueBlockNumber uint64,\n\tassetId transactionrecord.AssetIdentifier,\n\tnewOwner *account.Account,\n) {\n\t// ensure single threaded\n\ttoLock.Lock()\n\tdefer toLock.Unlock()\n\n\tnewData := &AssetOwnerData{\n\t\ttransferBlockNumber: issueBlockNumber,\n\t\tissueTxId: issueTxId,\n\t\tissueBlockNumber: issueBlockNumber,\n\t\tassetId: assetId,\n\t}\n\n\t// store to database\n\tcreate(trx, issueTxId, newData, newOwner)\n}",
"func AssetRevisions(exec boil.Executor, mods ...qm.QueryMod) assetRevisionQuery {\n\tmods = append(mods, qm.From(\"\\\"asset_revision\\\"\"))\n\treturn assetRevisionQuery{NewQuery(exec, mods...)}\n}",
"func writeAssetToPart(assetObj Asset, writer *multipart.Writer) error {\n\t//Send a request to get the asset file\n\turl := assetObj.URL\n\tresp, err := http.Get(url)\n\tif err != nil {\n\t\tlog.Fatalln(\"Could not get the asset from the url: \", err)\n\t\treturn err\n\t}\n\tdefer resp.Body.Close()\n\n\t//Copy the asset to a byte buffer to find the size of the asset\n\tbuf := &bytes.Buffer{}\n\tnRead, err := io.Copy(buf, resp.Body)\n\tif err != nil {\n\t\tfmt.Println(\"Could not copy the responsBody to the buffer: \", err)\n\t\treturn err\n\t}\n\n\t//Create the MIMEHeader and create a new part\n\th := make(textproto.MIMEHeader)\n\th.Set(\"Content-Type\", assetObj.MIMEType)\n\th.Set(\"Content-Length\", strconv.FormatInt(nRead, 10)) //len(data)\n\th.Set(\"Content-Transfer-Encoding\", \"quoted-printable\")\n\th.Set(\"Content-Name\", assetObj.ID.Hex())\n\tfw, err := writer.CreatePart(h)\n\tif err != nil {\n\t\tlog.Fatalln(\"Could not create form field: \", err)\n\t\treturn err\n\t}\n\n\t//Create the encoding writer and write the data to it.\n\tw := quotedprintable.NewWriter(fw)\n\tw.Binary = true //Tell it to treat the data as binary\n\tw.Write(buf.Bytes())\n\n\treturn nil\n}",
"func SetAssets(s string) func(*WholeGame) error {\n\treturn func(w *WholeGame) error {\n\t\tw.assets = s\n\t\treturn nil\n\t}\n}",
"func (s *SmartContract) UpdateAsset(ctx contractapi.TransactionContextInterface, id string, newColor string, newSize int, newValue int) error {\n\n\tasset, err := s.ReadAsset(ctx, id)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tclientID, err := s.GetSubmittingClientIdentity(ctx)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif clientID != asset.Owner {\n\t\treturn fmt.Errorf(\"submitting client not authorized to update asset, does not own asset\")\n\t}\n\n\tasset.Color = newColor\n\tasset.Size = newSize\n\tasset.AppraisedValue = newValue\n\n\tassetJSON, err := json.Marshal(asset)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn ctx.GetStub().PutState(id, assetJSON)\n}",
"func AddAssetHook(hookPoint boil.HookPoint, assetHook AssetHook) {\n\tswitch hookPoint {\n\tcase boil.BeforeInsertHook:\n\t\tassetBeforeInsertHooks = append(assetBeforeInsertHooks, assetHook)\n\tcase boil.BeforeUpdateHook:\n\t\tassetBeforeUpdateHooks = append(assetBeforeUpdateHooks, assetHook)\n\tcase boil.BeforeDeleteHook:\n\t\tassetBeforeDeleteHooks = append(assetBeforeDeleteHooks, assetHook)\n\tcase boil.BeforeUpsertHook:\n\t\tassetBeforeUpsertHooks = append(assetBeforeUpsertHooks, assetHook)\n\tcase boil.AfterInsertHook:\n\t\tassetAfterInsertHooks = append(assetAfterInsertHooks, assetHook)\n\tcase boil.AfterSelectHook:\n\t\tassetAfterSelectHooks = append(assetAfterSelectHooks, assetHook)\n\tcase boil.AfterUpdateHook:\n\t\tassetAfterUpdateHooks = append(assetAfterUpdateHooks, assetHook)\n\tcase boil.AfterDeleteHook:\n\t\tassetAfterDeleteHooks = append(assetAfterDeleteHooks, assetHook)\n\tcase boil.AfterUpsertHook:\n\t\tassetAfterUpsertHooks = append(assetAfterUpsertHooks, assetHook)\n\t}\n}",
"func (rm *ReleaseManager) Install(assetName, installPath string) error {\n\trelease, err := gh.GetReleaseByTag(rm.Owner, rm.Repo, rm.Tag)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tasset := getAsset(assetName, release.Assets)\n\n\tif asset == nil {\n\t\tif assetName != \"\" {\n\t\t\treturn fmt.Errorf(\"Asset %s not found\", assetName)\n\t\t}\n\t\treturn fmt.Errorf(\"Could not find asset for your system, you can specify the asset to install as a parameter\")\n\t}\n\tassetName = *asset.Name\n\tchecksum := getChecksum(assetName, release.Assets)\n\tif checksum == \"\" {\n\t\tfmt.Println(\"Warning: could not find the checksum\")\n\t}\n\n\texecutablePath, err := downloadAndInstallAsset(assetName, *asset.BrowserDownloadURL, checksum, installPath)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfmt.Printf(\"Successfully installed %s/%s, version %s\\n\", rm.Owner, rm.Repo, *release.TagName)\n\n\treturn config.AddOrUpdate(config.ConfigItem{\n\t\tName: rm.Owner + \"/\" + rm.Repo,\n\t\tVersion: *release.TagName,\n\t\tChecksum: checksum,\n\t\tExecutable: executablePath,\n\t})\n}",
"func SetGitTrackObjectCondition(status *farosv1alpha1.GitTrackObjectStatus, condition farosv1alpha1.GitTrackObjectCondition) {\n\tcurrentCond := GetGitTrackObjectCondition(*status, condition.Type)\n\tif currentCond != nil && currentCond.Status == condition.Status && currentCond.Reason == condition.Reason {\n\t\treturn\n\t}\n\t// Do not update lastTransitionTime if the status of the condition doesn't change.\n\tif currentCond != nil && currentCond.Status == condition.Status {\n\t\tcondition.LastTransitionTime = currentCond.LastTransitionTime\n\t}\n\tnewConditions := filterOutCondition(status.Conditions, condition.Type)\n\tstatus.Conditions = append(newConditions, condition)\n}",
"func NewRelatedAssetSerializerWithPermission(uuid string, isin string, ticker string, name string) *RelatedAssetSerializerWithPermission {\n\tthis := RelatedAssetSerializerWithPermission{}\n\tthis.Uuid = uuid\n\tthis.Isin = isin\n\tthis.Ticker = ticker\n\tthis.Name = name\n\treturn &this\n}",
"func (u *UploadsService) UploadAsset(asset io.ReadCloser, contentType string, contentLength int64) (result *Result) {\n\treturn u.client.upload(u.URL, asset, contentType, contentLength)\n}",
"func (o *ActivityLog) SetInvestor(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Investor) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"activity_logs\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 0, []string{\"investor_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 0, activityLogPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.IsDebug(ctx) {\n\t\twriter := boil.DebugWriterFrom(ctx)\n\t\tfmt.Fprintln(writer, updateQuery)\n\t\tfmt.Fprintln(writer, values)\n\t}\n\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.InvestorID = related.ID\n\tif o.R == nil {\n\t\to.R = &activityLogR{\n\t\t\tInvestor: related,\n\t\t}\n\t} else {\n\t\to.R.Investor = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &investorR{\n\t\t\tActivityLogs: ActivityLogSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.ActivityLogs = append(related.R.ActivityLogs, o)\n\t}\n\n\treturn nil\n}",
"func FindAssetRevision(exec boil.Executor, orig int, selectCols ...string) (*AssetRevision, error) {\n\tassetRevisionObj := &AssetRevision{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"asset_revision\\\" where \\\"orig\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, orig)\n\n\terr := q.Bind(assetRevisionObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"public: unable to select from asset_revision\")\n\t}\n\n\treturn assetRevisionObj, nil\n}",
"func (s *ListRevisionAssetsOutput) SetAssets(v []*AssetEntry) *ListRevisionAssetsOutput {\n\ts.Assets = v\n\treturn s\n}",
"func (v *Asset) UnmarshalEasyJSON(l *jlexer.Lexer) {\n\teasyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca18(l, v)\n}",
"func (a *assets) SetAssetFS(af ...AssetFS) {\n\ta.a = append(a.a, af...)\n}",
"func (g *Group) AddAsset(p, h string) {\n\tfile := &File{name: path.Base(p), path: p, hash: h}\n\tg.files = append(g.files, file)\n}",
"func (o *AssetRevision) SetOrigP(exec boil.Executor, insert bool, related *Asset) {\n\tif err := o.SetOrig(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (assetRevisionL) LoadOrig(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Orig\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Orig\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Orig = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Orig == foreign.ID {\n\t\t\t\tlocal.R.Orig = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func setObjectRevision(obj client.Object, revision int64) {\n\ta := obj.GetAnnotations()\n\tif a == nil {\n\t\ta = map[string]string{}\n\t}\n\ta[revisionAnnotation] = fmt.Sprintf(\"%d\", revision)\n\tobj.SetAnnotations(a)\n}",
"func (o *GetRacksParams) SetAssetNo(assetNo *string) {\n\to.AssetNo = assetNo\n}",
"func (o *PostIPAMSwitchesParams) SetAssets(assets *string) {\n\to.Assets = assets\n}",
"func (in *SensuAsset) DeepCopy() *SensuAsset {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(SensuAsset)\n\tin.DeepCopyInto(out)\n\treturn out\n}",
"func (o *DcimRacksListParams) SetAssetTag(assetTag *string) {\n\to.AssetTag = assetTag\n}",
"func (gau *GithubAssetUpdate) Exec(ctx context.Context) error {\n\t_, err := gau.Save(ctx)\n\treturn err\n}",
"func (gauo *GithubAssetUpdateOne) Save(ctx context.Context) (*GithubAsset, error) {\n\treturn withHooks(ctx, gauo.sqlSave, gauo.mutation, gauo.hooks)\n}",
"func (o *Organism) SetStock(exec boil.Executor, insert bool, related *Stock) error {\n\tvar err error\n\n\tif insert {\n\t\trelated.OrganismID.Int = o.OrganismID\n\t\trelated.OrganismID.Valid = true\n\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t} else {\n\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\"UPDATE \\\"stock\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"organism_id\"}),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, stockPrimaryKeyColumns),\n\t\t)\n\t\tvalues := []interface{}{o.OrganismID, related.StockID}\n\n\t\tif boil.DebugMode {\n\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t}\n\n\t\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t}\n\n\t\trelated.OrganismID.Int = o.OrganismID\n\t\trelated.OrganismID.Valid = true\n\t}\n\n\tif o.R == nil {\n\t\to.R = &organismR{\n\t\t\tStock: related,\n\t\t}\n\t} else {\n\t\to.R.Stock = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &stockR{\n\t\t\tOrganism: o,\n\t\t}\n\t} else {\n\t\trelated.R.Organism = o\n\t}\n\treturn nil\n}",
"func (a *chunkBasedAtlas) setObject(chunk int, local maths.Vector, object Object) {\n\ta.populate(chunk)\n\n\tc := a.Chunks[chunk]\n\ti := a.chunkTileIndex(local)\n\tif object.Type != roveapi.Object_ObjectUnknown {\n\t\tc.Objects[i] = object\n\t} else {\n\t\tdelete(c.Objects, i)\n\t}\n\ta.Chunks[chunk] = c\n}",
"func (_Onesplitaudit *OnesplitauditTransactor) ClaimAsset(opts *bind.TransactOpts, asset common.Address, amount *big.Int) (*types.Transaction, error) {\n\treturn _Onesplitaudit.contract.Transact(opts, \"claimAsset\", asset, amount)\n}",
"func (b *Batch) SetRelation(filter Filter, comp ID, target Entity) {\n\tb.world.setRelationBatch(filter, comp, target)\n}",
"func (o *AssetRevision) Delete(exec boil.Executor) error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision provided for delete\")\n\t}\n\n\tif err := o.doBeforeDeleteHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\targs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), assetRevisionPrimaryKeyMapping)\n\tquery := \"DELETE FROM \\\"asset_revision\\\" WHERE \\\"orig\\\"=$1\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, args...)\n\t}\n\n\t_, err := exec.Exec(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to delete from asset_revision\")\n\t}\n\n\tif err := o.doAfterDeleteHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}",
"func (l *GenericMetadata) LinkToInterfaceRevisionOnFieldInterfaceRevision(target *InterfaceRevision) error {\n\tif target == nil {\n\t\treturn errors.New(\"start and end can not be nil\")\n\t}\n\n\tl.InterfaceRevision = target\n\n\ttarget.Metadata = l\n\n\treturn nil\n}",
"func (s *SmartContract) recordAsset(APIstub shim.ChaincodeStubInterface, args []string) sc.Response {\n\n\tif len(args) != 6 {\n\t\treturn shim.Error(\"Incorrect number of arguments. Expecting 6\")\n\t}\n\n\tvar asset = Asset{Manufacturer: args[1], Type: args[2], Quantity: args[3], Timestamp: args[4], Holder: args[5]}\n\n\tassetAsBytes, _ := json.Marshal(asset)\n\terr := APIstub.PutState(args[0], assetAsBytes)\n\tif err != nil {\n\t\treturn shim.Error(fmt.Sprintf(\"Failed to record asset: %s\", args[0]))\n\t}\n\n\treturn shim.Success(nil)\n}",
"func WithOCIArtifact(art *oci.Artifact) Option {\n\treturn func(opts *options) {\n\t\topts.artifact = art\n\t}\n}",
"func (t *Transaction) SetResource(r rsrc.Resource) {\n\tt.res = r.Clone()\n}",
"func (ec *executionContext) _Asset(ctx context.Context, sel ast.SelectionSet, obj *models.Asset) graphql.Marshaler {\n\tfields := graphql.CollectFields(ctx, sel, assetImplementors)\n\n\tout := graphql.NewOrderedMap(len(fields))\n\tinvalid := false\n\tfor i, field := range fields {\n\t\tout.Keys[i] = field.Alias\n\n\t\tswitch field.Name {\n\t\tcase \"__typename\":\n\t\t\tout.Values[i] = graphql.MarshalString(\"Asset\")\n\t\tcase \"Id\":\n\t\t\tout.Values[i] = ec._Asset_Id(ctx, field, obj)\n\t\tcase \"Name\":\n\t\t\tout.Values[i] = ec._Asset_Name(ctx, field, obj)\n\t\tdefault:\n\t\t\tpanic(\"unknown field \" + strconv.Quote(field.Name))\n\t\t}\n\t}\n\n\tif invalid {\n\t\treturn graphql.Null\n\t}\n\treturn out\n}",
"func (gauo *GithubAssetUpdateOne) Exec(ctx context.Context) error {\n\t_, err := gauo.Save(ctx)\n\treturn err\n}",
"func (s *CreateDataSetOutput) SetAssetType(v string) *CreateDataSetOutput {\n\ts.AssetType = &v\n\treturn s\n}",
"func (s *UpdateDataSetOutput) SetAssetType(v string) *UpdateDataSetOutput {\n\ts.AssetType = &v\n\treturn s\n}",
"func (o *ItemSide) SetItem(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Item) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"item_sides\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 0, []string{\"item_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 0, itemSidePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ItemID, o.SideItemID}\n\n\tif boil.IsDebug(ctx) {\n\t\twriter := boil.DebugWriterFrom(ctx)\n\t\tfmt.Fprintln(writer, updateQuery)\n\t\tfmt.Fprintln(writer, values)\n\t}\n\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\tqueries.Assign(&o.ItemID, related.ID)\n\tif o.R == nil {\n\t\to.R = &itemSideR{\n\t\t\tItem: related,\n\t\t}\n\t} else {\n\t\to.R.Item = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &itemR{\n\t\t\tItemSide: o,\n\t\t}\n\t} else {\n\t\trelated.R.ItemSide = o\n\t}\n\n\treturn nil\n}",
"func (s *GetDataSetOutput) SetAssetType(v string) *GetDataSetOutput {\n\ts.AssetType = &v\n\treturn s\n}",
"func (v *Asset) UnmarshalJSON(data []byte) error {\n\tr := jlexer.Lexer{Data: data}\n\teasyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca18(&r, v)\n\treturn r.Error()\n}",
"func AddAsset(groupName, name, value string) {\n\tfileGroup := mainAssetDirectory.GetGroup(groupName)\n\tif fileGroup == nil {\n\t\tfileGroup, err = mainAssetDirectory.NewFileGroup(groupName)\n\t\tif err != nil {\n\t\t\tzlog.Fatal(err)\n\t\t}\n\t}\n\t_ = fileGroup.AddAsset(name, value)\n}",
"func (o *OutputState) ApplyAssetWithContext(ctx context.Context, applier interface{}) AssetOutput {\n\treturn o.ApplyTWithContext(ctx, applier).(AssetOutput)\n}",
"func (testEntityRelated_EntityInfo) PutRelated(txn *objectbox.Transaction, object interface{}, id uint64) error {\n\tif rel := object.(*TestEntityRelated).Next; rel != nil {\n\t\trId, err := EntityByValueBinding.GetId(rel)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t} else if rId == 0 {\n\t\t\tif err := txn.RunWithCursor(EntityByValueBinding.Id, func(targetCursor *objectbox.Cursor) error {\n\t\t\t\t_, err := targetCursor.Put(rel) // NOTE Put/PutAsync() has a side-effect of setting the rel.ID\n\t\t\t\treturn err\n\t\t\t}); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif err := txn.RunWithCursor(TestEntityRelatedBinding.Id, func(cursor *objectbox.Cursor) error {\n\t\treturn cursor.RelationReplace(6, EntityByValueBinding.Id, id, object, object.(*TestEntityRelated).NextSlice)\n\t}); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func (o *PostIPAMSwitchesParams) SetAssetIds(assetIds *string) {\n\to.AssetIds = assetIds\n}",
"func (c *GitHub) CreateReleaseAsset(ctx context.Context, a git.ReleaseAsset) error {\n\tc.Logger.Debugf(\"Creating a release asset %+v\", a)\n\tf, err := os.Open(a.RealPath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"could not open the file: %w\", err)\n\t}\n\tdefer f.Close()\n\t_, _, err = c.Client.UploadReleaseAsset(ctx, a.Release.Repository.Owner, a.Release.Repository.Name, a.Release.InternalID, &github.UploadOptions{\n\t\tName: a.Name,\n\t}, f)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"GitHub API error: %w\", err)\n\t}\n\treturn nil\n}",
"func setAssetStateBasedEndorsement(ctx contractapi.TransactionContextInterface, auctionID string, orgToEndorse string) error {\n\n\tendorsementPolicy, err := statebased.NewStateEP(nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = endorsementPolicy.AddOrgs(statebased.RoleTypePeer, orgToEndorse)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to add org to endorsement policy: %v\", err)\n\t}\n\tpolicy, err := endorsementPolicy.Policy()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to create endorsement policy bytes from org: %v\", err)\n\t}\n\terr = ctx.GetStub().SetStateValidationParameter(auctionID, policy)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to set validation parameter on auction: %v\", err)\n\t}\n\n\treturn nil\n}",
"func RestoreAsset(dir, name string) error {\n\tdata, err := Asset(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\tinfo, err := AssetInfo(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0o755))\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func RestoreAsset(dir, name string) error {\n\tdata, err := Asset(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\tinfo, err := AssetInfo(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0o755))\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func FindAssetRevisionP(exec boil.Executor, orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(exec, orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (o *Origin) SetOriginOPA(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPackage) error {\n\tquery := \"update \\\"origin_packages\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOPA {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOPA = nil\n\t}\n\treturn o.AddOriginOPA(ctx, exec, insert, related...)\n}",
"func (o *DcimRacksListParams) SetAssetTagIe(assetTagIe *string) {\n\to.AssetTagIe = assetTagIe\n}",
"func (o *Item) SetItemOption(ctx context.Context, exec boil.ContextExecutor, insert bool, related *ItemOption) error {\n\tvar err error\n\n\tif insert {\n\t\tqueries.Assign(&related.ItemID, o.ID)\n\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t} else {\n\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\"UPDATE \\\"item_options\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 0, []string{\"item_id\"}),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 0, itemOptionPrimaryKeyColumns),\n\t\t)\n\t\tvalues := []interface{}{o.ID, related.ItemID, related.OptionID}\n\n\t\tif boil.IsDebug(ctx) {\n\t\t\twriter := boil.DebugWriterFrom(ctx)\n\t\t\tfmt.Fprintln(writer, updateQuery)\n\t\t\tfmt.Fprintln(writer, values)\n\t\t}\n\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t}\n\n\t\tqueries.Assign(&related.ItemID, o.ID)\n\t}\n\n\tif o.R == nil {\n\t\to.R = &itemR{\n\t\t\tItemOption: related,\n\t\t}\n\t} else {\n\t\to.R.ItemOption = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &itemOptionR{\n\t\t\tItem: o,\n\t\t}\n\t} else {\n\t\trelated.R.Item = o\n\t}\n\treturn nil\n}",
"func (q assetRevisionQuery) One() (*AssetRevision, error) {\n\to := &AssetRevision{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"public: failed to execute a one query for asset_revision\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func IssueAsset(hclient *equator.Client, seed, code, amount, destination string) error {\n\tkp, err := keypair.Parse(seed)\n\tif err != nil {\n\t\treturn err\n\t}\n\ttx, err := b.Transaction(\n\t\tb.SourceAccount{AddressOrSeed: seed},\n\t\tb.TestNetwork,\n\t\tb.AutoSequence{SequenceProvider: hclient},\n\t\tb.Payment(\n\t\t\tb.Destination{AddressOrSeed: destination},\n\t\t\tb.CreditAmount{\n\t\t\t\tCode: code,\n\t\t\t\tIssuer: kp.Address(),\n\t\t\t\tAmount: amount,\n\t\t\t},\n\t\t),\n\t)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"building tx\")\n\t}\n\t_, err = SignAndSubmitTx(hclient, tx, seed)\n\treturn err\n}",
"func (s *CreateDataSetInput) SetAssetType(v string) *CreateDataSetInput {\n\ts.AssetType = &v\n\treturn s\n}",
"func (u *User)BuyAsset(APIstub shim.ChaincodeStubInterface, a Asset, args []string) error {\n\tif len(args) != 2 { return errors.New(\"BuyAsset - incorrect number of arguments. Expecting 2\")}\n\n\tpaymentid := args[0]\n\tpaypercent := args[1]\n\tpercentage, parseErr := strconv.ParseFloat(paypercent, 32)\n\tif parseErr != nil { return errors.New(\"BuyAsset - \" + parseErr.Error()) }\n\t\n\tif a.Owned == u.Username {\n\t\treturn errors.New(\"BuyAsset, user can NOT buy its own asset --- \")\n\t}\n\t// add buyer info into Asset\n\tremaining := 1 - a.Status\n\tif percentage > remaining { \n\t\treturn errors.New(\"BuyAsset - No enough share for this asset '\" + a.Key + \"'\")\n\t}\n\ta.Status = remaining - percentage // update asset remaining share\n\ta.Buyerspercent[u.Username] = a.Buyerspercent[u.Username] + percentage\n\t// calculate payment plan\n\ttotalPayWithInterest := percentage * math.Pow((1+a.Interestrate), float64(a.Period)) * a.Worth\n\tpayPer := totalPayWithInterest / float64(a.Period)\n\n\t// add asset to user's paymentmethod's Payssets list\n\tpaymentmethod := u.Info.Paymentmethodlist[paymentid]\n\tif paymentmethod.Accountnumber == \"\" {\n\t\treturn errors.New(\"BuyAsset - payment not exists\")\n\t}\n\n\tvar record Payassetrecord\n\trecord = paymentmethod.Payassets[a.Key];\n\tif (Payassetrecord{}) != record {\n\t\treturn errors.New(\"BuyAsset - you have bought this asset already.\")\n\t} \n\t//p, _ := strconv.ParseInt(a.Period, 10, 32)\n\trecord = Payassetrecord{Period: int(a.Period), Amountper:payPer}\n\tpaymentmethod.Payassets[a.Key] = record\n\n\t// Put asset and user back to ledger\n\tassetAsbytes, _ := json.Marshal(a)\n\tuserAsbytes, _ := json.Marshal(u)\n\n\tif err := APIstub.PutState(a.Key, assetAsbytes); err != nil {\n\t\treturn errors.New(\"BuyAsset - \" + err.Error())\n\t}\n\tif err := APIstub.PutState(u.Username, userAsbytes); err != nil {\n\t\treturn errors.New(\"BuyAsset - \" + err.Error())\n\t}\n\n\treturn nil\n}",
"func (tla ChangeTrustAsset) ToAsset() Asset {\n\tvar a Asset\n\n\ta.Type = tla.Type\n\n\tswitch a.Type {\n\tcase AssetTypeAssetTypeNative:\n\t\t// Empty branch\n\tcase AssetTypeAssetTypeCreditAlphanum4:\n\t\tassetCode4 := *tla.AlphaNum4\n\t\ta.AlphaNum4 = &assetCode4\n\tcase AssetTypeAssetTypeCreditAlphanum12:\n\t\tassetCode12 := *tla.AlphaNum12\n\t\ta.AlphaNum12 = &assetCode12\n\tdefault:\n\t\tpanic(fmt.Errorf(\"Cannot transform type %v to Asset\", a.Type))\n\t}\n\n\treturn a\n}",
"func (s *Mortgageplatform) PostAsset(APIstub shim.ChaincodeStubInterface, args []string) sc.Response {\n\tres, err := postAsset(APIstub, args)\n\tif err != nil { return shim.Error(\"PostAsset, \" + err.Error())}\n\n\treturn shim.Success(res)\n }",
"func CreateAsset(met metadata.MetaData, creator *Holder, sym string, name string, desc string) *Asset {\n\tout := Asset{\n\t\tMet: met.(*concrete_metadata.MetaData),\n\t\tCreator: creator,\n\t\tSym: sym,\n\t\tName: name,\n\t\tDesc: desc,\n\t}\n\n\treturn &out\n}",
"func setAssetTag(requestHandler common.RequestHandler) endpointHandler {\n\treturn func(httpWriter http.ResponseWriter, httpRequest *http.Request) error {\n\t\tlog.Trace(\"resource/asset_tag:setAssetTag() Entering\")\n\t\tdefer log.Trace(\"resource/asset_tag:setAssetTag() Leaving\")\n\n\t\tlog.Debugf(\"resource/asset_tag:setAssetTag() Request: %s\", httpRequest.URL.Path)\n\n\t\tvar tagWriteRequest taModel.TagWriteRequest\n\n\t\tcontentType := httpRequest.Header.Get(\"Content-Type\")\n\t\tif contentType != \"application/json\" {\n\t\t\tlog.Errorf(\"resource/asset_tag:setAssetTag( %s - Invalid content-type '%s'\", message.InvalidInputBadParam, contentType)\n\t\t\treturn &common.EndpointError{Message: \"Invalid content-type\", StatusCode: http.StatusBadRequest}\n\t\t}\n\n\t\tdata, err := ioutil.ReadAll(httpRequest.Body)\n\t\tif err != nil {\n\t\t\tlog.WithError(err).Errorf(\"resource/asset_tag:setAssetTag() %s - Error reading request body for request: %s\", message.AppRuntimeErr, httpRequest.URL.Path)\n\t\t\treturn &common.EndpointError{Message: \"Error parsing request\", StatusCode: http.StatusBadRequest}\n\t\t}\n\n\t\tdec := json.NewDecoder(bytes.NewReader(data))\n\t\tdec.DisallowUnknownFields()\n\t\terr = dec.Decode(&tagWriteRequest)\n\t\tif err != nil {\n\t\t\tsecLog.WithError(err).Errorf(\"resource/asset_tag:setAssetTag() %s - Error marshaling json data: %s for request: %s\", message.InvalidInputBadParam, string(data), httpRequest.URL.Path)\n\t\t\treturn &common.EndpointError{Message: \"Error processing request\", StatusCode: http.StatusBadRequest}\n\t\t}\n\n\t\terr = requestHandler.DeployAssetTag(&tagWriteRequest)\n\t\tif err != nil {\n\t\t\tlog.WithError(err).Errorf(\"resource/asset_tag:setAssetTag() %s - Error while deploying asset tag\", message.AppRuntimeErr)\n\t\t\treturn err\n\t\t}\n\t\thttpWriter.WriteHeader(http.StatusOK)\n\t\treturn nil\n\t}\n}",
"func (o *Organism) SetJbrowseOrganism(exec boil.Executor, insert bool, related *JbrowseOrganism) error {\n\tvar err error\n\n\tif insert {\n\t\trelated.OrganismID = o.OrganismID\n\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t} else {\n\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\"UPDATE \\\"jbrowse_organism\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"organism_id\"}),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, jbrowseOrganismPrimaryKeyColumns),\n\t\t)\n\t\tvalues := []interface{}{o.OrganismID, related.JbrowseOrganismID}\n\n\t\tif boil.DebugMode {\n\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t}\n\n\t\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t}\n\n\t\trelated.OrganismID = o.OrganismID\n\n\t}\n\n\tif o.R == nil {\n\t\to.R = &organismR{\n\t\t\tJbrowseOrganism: related,\n\t\t}\n\t} else {\n\t\to.R.JbrowseOrganism = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &jbrowseOrganismR{\n\t\t\tOrganism: o,\n\t\t}\n\t} else {\n\t\trelated.R.Organism = o\n\t}\n\treturn nil\n}",
"func (_Onesplitaudit *OnesplitauditTransactorSession) ClaimAsset(asset common.Address, amount *big.Int) (*types.Transaction, error) {\n\treturn _Onesplitaudit.Contract.ClaimAsset(&_Onesplitaudit.TransactOpts, asset, amount)\n}",
"func RestoreAsset(dir, name string) error {\n\tdata, err := Asset(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\tinfo, err := AssetInfo(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.MkdirAll(_filePath(dir, path.Dir(name)), os.FileMode(0755))\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func RestoreAsset(dir, name string) error {\n\tdata, err := Asset(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\tinfo, err := AssetInfo(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.MkdirAll(_filePath(dir, path.Dir(name)), os.FileMode(0755))\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func RestoreAsset(dir, name string) error {\n\tdata, err := Asset(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\tinfo, err := AssetInfo(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.MkdirAll(_filePath(dir, path.Dir(name)), os.FileMode(0755))\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func RestoreAsset(dir, name string) error {\n\tdata, err := Asset(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\tinfo, err := AssetInfo(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.MkdirAll(_filePath(dir, path.Dir(name)), os.FileMode(0755))\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func RestoreAsset(dir, name string) error {\n\tdata, err := Asset(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\tinfo, err := AssetInfo(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func RestoreAsset(dir, name string) error {\n\tdata, err := Asset(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\tinfo, err := AssetInfo(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func RestoreAsset(dir, name string) error {\n\tdata, err := Asset(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\tinfo, err := AssetInfo(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func RestoreAsset(dir, name string) error {\n\tdata, err := Asset(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\tinfo, err := AssetInfo(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func RestoreAsset(dir, name string) error {\n\tdata, err := Asset(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\tinfo, err := AssetInfo(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func RestoreAsset(dir, name string) error {\n\tdata, err := Asset(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\tinfo, err := AssetInfo(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}"
] |
[
"0.6462859",
"0.6369986",
"0.59895676",
"0.56662846",
"0.56385076",
"0.55881524",
"0.5300827",
"0.5186635",
"0.51496136",
"0.49759057",
"0.49247235",
"0.4829085",
"0.4735325",
"0.46732035",
"0.46540403",
"0.46469396",
"0.4614267",
"0.46121868",
"0.45510167",
"0.45440397",
"0.45423844",
"0.45313686",
"0.45196497",
"0.45118493",
"0.45078802",
"0.4506284",
"0.44866413",
"0.44383433",
"0.44336578",
"0.44083697",
"0.4405129",
"0.43955073",
"0.4385575",
"0.43251443",
"0.4320492",
"0.431374",
"0.43089756",
"0.4298946",
"0.42974207",
"0.42942244",
"0.42905298",
"0.42902887",
"0.42656544",
"0.42440167",
"0.42364985",
"0.42253572",
"0.4220752",
"0.42141855",
"0.42118907",
"0.42067483",
"0.4188836",
"0.41778785",
"0.41672322",
"0.41618514",
"0.41603908",
"0.41596556",
"0.41437334",
"0.41418305",
"0.41241232",
"0.41191724",
"0.41131568",
"0.41105485",
"0.41058248",
"0.40909472",
"0.40870565",
"0.40855098",
"0.4082033",
"0.40706506",
"0.40704706",
"0.4061405",
"0.40607977",
"0.4059452",
"0.40476203",
"0.4035549",
"0.40348253",
"0.40348253",
"0.4034008",
"0.4032917",
"0.40324447",
"0.4031204",
"0.40268746",
"0.40259197",
"0.4020783",
"0.40145048",
"0.40125653",
"0.40102997",
"0.40088528",
"0.40080032",
"0.4007436",
"0.40029058",
"0.39996538",
"0.39996538",
"0.39996538",
"0.39996538",
"0.3994984",
"0.3994984",
"0.3994984",
"0.3994984",
"0.3994984",
"0.3994984"
] |
0.7886427
|
0
|
SetOrigG of the asset_revision to the related item. Sets o.R.Orig to related. Adds o to related.R.OrigAssetRevision. Uses the global database handle.
|
func (o *AssetRevision) SetOrigG(insert bool, related *Asset) error {
return o.SetOrig(boil.GetDB(), insert, related)
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (o *AssetRevision) SetOrigGP(insert bool, related *Asset) {\n\tif err := o.SetOrig(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) SetOrig(exec boil.Executor, insert bool, related *Asset) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"asset_revision\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"orig\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, assetRevisionPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.Orig}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.Orig = related.ID\n\n\tif o.R == nil {\n\t\to.R = &assetRevisionR{\n\t\t\tOrig: related,\n\t\t}\n\t} else {\n\t\to.R.Orig = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &assetR{\n\t\t\tOrigAssetRevision: o,\n\t\t}\n\t} else {\n\t\trelated.R.OrigAssetRevision = o\n\t}\n\n\treturn nil\n}",
"func (o *AssetRevision) OrigG(mods ...qm.QueryMod) assetQuery {\n\treturn o.OrigByFk(boil.GetDB(), mods...)\n}",
"func (o *AssetRevision) SetOrigP(exec boil.Executor, insert bool, related *Asset) {\n\tif err := o.SetOrig(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) SetAssetG(insert bool, related *Asset) error {\n\treturn o.SetAsset(boil.GetDB(), insert, related)\n}",
"func (assetRevisionL) LoadOrig(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Orig\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Orig\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Orig = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Orig == foreign.ID {\n\t\t\t\tlocal.R.Orig = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AssetRevision) SetAssetGP(insert bool, related *Asset) {\n\tif err := o.SetAsset(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) SetAsset(exec boil.Executor, insert bool, related *Asset) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"asset_revision\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"asset\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, assetRevisionPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.Orig}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.Asset = related.ID\n\n\tif o.R == nil {\n\t\to.R = &assetRevisionR{\n\t\t\tAsset: related,\n\t\t}\n\t} else {\n\t\to.R.Asset = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &assetR{\n\t\t\tAssetRevisions: AssetRevisionSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.AssetRevisions = append(related.R.AssetRevisions, o)\n\t}\n\n\treturn nil\n}",
"func (o *AssetRevision) OrigByFk(exec boil.Executor, mods ...qm.QueryMod) assetQuery {\n\tqueryMods := []qm.QueryMod{\n\t\tqm.Where(\"id=?\", o.Orig),\n\t}\n\n\tqueryMods = append(queryMods, mods...)\n\n\tquery := Assets(exec, queryMods...)\n\tqueries.SetFrom(query.Query, \"\\\"asset\\\"\")\n\n\treturn query\n}",
"func (o *Origin) SetOriginAPG(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AuditPackageGroup) error {\n\tquery := \"update \\\"audit_package_group\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginAPG {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginAPG = nil\n\t}\n\treturn o.AddOriginAPG(ctx, exec, insert, related...)\n}",
"func (o *GetRecipeInformation200ResponseExtendedIngredientsInner) SetOriginal(v string) {\n\to.Original = v\n}",
"func (o *Source) SetParentG(insert bool, related *Source) error {\n\treturn o.SetParent(boil.GetDB(), insert, related)\n}",
"func (o *AssetRevision) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func FindAssetRevisionG(orig int, selectCols ...string) (*AssetRevision, error) {\n\treturn FindAssetRevision(boil.GetDB(), orig, selectCols...)\n}",
"func (o *Author) SetSourcesG(insert bool, related ...*Source) error {\n\treturn o.SetSources(boil.GetDB(), insert, related...)\n}",
"func (o *AssetRevision) AssetG(mods ...qm.QueryMod) assetQuery {\n\treturn o.AssetByFk(boil.GetDB(), mods...)\n}",
"func AssetRevisionsG(mods ...qm.QueryMod) assetRevisionQuery {\n\treturn AssetRevisions(boil.GetDB(), mods...)\n}",
"func (m NoSides) SetOrigOrdModTime(v time.Time) {\n\tm.Set(field.NewOrigOrdModTime(v))\n}",
"func FindAssetRevisionGP(orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(boil.GetDB(), orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (o *Source) SetParentSourcesG(insert bool, related ...*Source) error {\n\treturn o.SetParentSources(boil.GetDB(), insert, related...)\n}",
"func (o *Source) SetParentGP(insert bool, related *Source) {\n\tif err := o.SetParent(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (ns *Namespace) SetOriginalObject(obj *unstructured.Unstructured) {\n\tgvk := obj.GroupVersionKind()\n\tname := obj.GetName()\n\t_, ok := ns.originalObjects[gvk]\n\tif !ok {\n\t\tns.originalObjects[gvk] = map[string]*unstructured.Unstructured{}\n\t}\n\tns.originalObjects[gvk][name] = obj\n}",
"func (o *Origin) AddOriginAPG(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AuditPackageGroup) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"audit_package_group\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, auditPackageGroupPrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginAPG: related,\n\t\t}\n\t} else {\n\t\to.R.OriginAPG = append(o.R.OriginAPG, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &auditPackageGroupR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func (o *ItemSide) SetItemG(ctx context.Context, insert bool, related *Item) error {\n\treturn o.SetItem(ctx, boil.GetContextDB(), insert, related)\n}",
"func (o *AssetRevision) ReloadGP() {\n\tif err := o.ReloadG(); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Origin) SetOriginOPA(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPackage) error {\n\tquery := \"update \\\"origin_packages\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOPA {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOPA = nil\n\t}\n\treturn o.AddOriginOPA(ctx, exec, insert, related...)\n}",
"func WithOriginalSrc(parent context.Context, src string) context.Context {\n\treturn context.WithValue(parent, originalSrcCtxKey, src)\n}",
"func (o *AssetRevision) UpdateG(whitelist ...string) error {\n\treturn o.Update(boil.GetDB(), whitelist...)\n}",
"func (o *Rental) SetInventoryGP(insert bool, related *Inventory) {\n\tif err := o.SetInventory(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (f OrigClOrdIDField) Tag() quickfix.Tag { return tag.OrigClOrdID }",
"func (o *Origin) SetOriginOC(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginChannel) error {\n\tquery := \"update \\\"origin_channels\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOC {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOC = nil\n\t}\n\treturn o.AddOriginOC(ctx, exec, insert, related...)\n}",
"func (ns *Namespace) GetOriginalObject(gvk schema.GroupVersionKind, nm string) *unstructured.Unstructured {\n\treturn ns.originalObjects[gvk][nm]\n}",
"func (o *Rental) SetInventoryG(insert bool, related *Inventory) error {\n\treturn o.SetInventory(boil.GetDB(), insert, related)\n}",
"func (o *Transaction) SetProductG(insert bool, related *Product) error {\n\treturn o.SetProduct(boil.GetDB(), insert, related)\n}",
"func (m NoSides) SetOrigClOrdID(v string) {\n\tm.Set(field.NewOrigClOrdID(v))\n}",
"func (o *Author) SetSourcesGP(insert bool, related ...*Source) {\n\tif err := o.SetSources(boil.GetDB(), insert, related...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Stock) SetProductG(insert bool, related *Product) error {\n\treturn o.SetProduct(boil.GetDB(), insert, related)\n}",
"func (o *FeatureCvtermDbxref) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"chado: no FeatureCvtermDbxref provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func (o *Item) SetItemOptionG(ctx context.Context, insert bool, related *ItemOption) error {\n\treturn o.SetItemOption(ctx, boil.GetContextDB(), insert, related)\n}",
"func (o *BraceletPhoto) SetBraceletG(insert bool, related *BraceletBracelet) error {\n\treturn o.SetBracelet(boil.GetDB(), insert, related)\n}",
"func (o *Source) SetParent(exec boil.Executor, insert bool, related *Source) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"sources\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"parent_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, sourcePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.ParentID.Int64 = related.ID\n\to.ParentID.Valid = true\n\n\tif o.R == nil {\n\t\to.R = &sourceR{\n\t\t\tParent: related,\n\t\t}\n\t} else {\n\t\to.R.Parent = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &sourceR{\n\t\t\tParentSources: SourceSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.ParentSources = append(related.R.ParentSources, o)\n\t}\n\n\treturn nil\n}",
"func (o *RentalRower) SetRowerG(insert bool, related *Rower) error {\n\treturn o.SetRower(boil.GetDB(), insert, related)\n}",
"func (o *Author) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"mdbmdbmodels: no Author provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func (o *Origin) AddOriginOPA(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPackage) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"origin_packages\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, originPackagePrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginOPA: related,\n\t\t}\n\t} else {\n\t\to.R.OriginOPA = append(o.R.OriginOPA, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &originPackageR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func (o *Origin) SetOriginAP(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AuditPackage) error {\n\tquery := \"update \\\"audit_package\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginAP {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginAP = nil\n\t}\n\treturn o.AddOriginAP(ctx, exec, insert, related...)\n}",
"func (o *Source) SetTypeG(insert bool, related *SourceType) error {\n\treturn o.SetType(boil.GetDB(), insert, related)\n}",
"func (o *Rental) SetCustomerG(insert bool, related *Customer) error {\n\treturn o.SetCustomer(boil.GetDB(), insert, related)\n}",
"func (o *Address) SetCityG(insert bool, related *City) error {\n\treturn o.SetCity(boil.GetDB(), insert, related)\n}",
"func NewOrigClOrdID(val string) OrigClOrdIDField {\n\treturn OrigClOrdIDField{quickfix.FIXString(val)}\n}",
"func (o *AssetRevision) SetAssetP(exec boil.Executor, insert bool, related *Asset) {\n\tif err := o.SetAsset(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *FeatureCvtermDbxref) UpdateG(whitelist ...string) error {\n\treturn o.Update(boil.GetDB(), whitelist...)\n}",
"func (r *AssetRendering) Original() {\n\tv := \"original\"\n\tr.Value = &v\n}",
"func (o *Source) SetParent(exec boil.Executor, insert bool, related *Source) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"sources\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"parent_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, sourcePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\tqueries.Assign(&o.ParentID, related.ID)\n\tif o.R == nil {\n\t\to.R = &sourceR{\n\t\t\tParent: related,\n\t\t}\n\t} else {\n\t\to.R.Parent = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &sourceR{\n\t\t\tParentSources: SourceSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.ParentSources = append(related.R.ParentSources, o)\n\t}\n\n\treturn nil\n}",
"func (o *ItemSide) SetSideItemG(ctx context.Context, insert bool, related *Item) error {\n\treturn o.SetSideItem(ctx, boil.GetContextDB(), insert, related)\n}",
"func (m CrossOrderCancelReplaceRequest) SetOrigCrossID(v string) {\n\tm.Set(field.NewOrigCrossID(v))\n}",
"func (o *Origin) SetOriginOI(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginInvitation) error {\n\tquery := \"update \\\"origin_invitations\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOI {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOI = nil\n\t}\n\treturn o.AddOriginOI(ctx, exec, insert, related...)\n}",
"func (o *Source) SetAuthorsG(insert bool, related ...*Author) error {\n\treturn o.SetAuthors(boil.GetDB(), insert, related...)\n}",
"func (o *Source) SetParentSourcesGP(insert bool, related ...*Source) {\n\tif err := o.SetParentSources(boil.GetDB(), insert, related...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (instance *AutoChartInstance) SetObjectAndEvents(sessionState *State, actionState *action.State, obj *enigmahandlers.Object, genObj *enigma.GenericObject) {\n\tinstance.handleAutoChart(sessionState, actionState, obj, genObj)\n}",
"func (o *Origin) AddOriginOC(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginChannel) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"origin_channels\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, originChannelPrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginOC: related,\n\t\t}\n\t} else {\n\t\to.R.OriginOC = append(o.R.OriginOC, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &originChannelR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func (o *RowerGroup) SetRowerG(insert bool, related *Rower) error {\n\treturn o.SetRower(boil.GetDB(), insert, related)\n}",
"func (o *Vote) SetOptionG(insert bool, related *Option) error {\n\treturn o.SetOption(boil.GetDB(), insert, related)\n}",
"func (o *Origin) SetOriginOPR(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginProject) error {\n\tquery := \"update \\\"origin_projects\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOPR {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOPR = nil\n\t}\n\treturn o.AddOriginOPR(ctx, exec, insert, related...)\n}",
"func (o *BraceletPhoto) SetBraceletGP(insert bool, related *BraceletBracelet) {\n\tif err := o.SetBracelet(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (originL) LoadOriginAPG(ctx context.Context, e boil.ContextExecutor, singular bool, maybeOrigin interface{}, mods queries.Applicator) error {\n\tvar slice []*Origin\n\tvar object *Origin\n\n\tif singular {\n\t\tobject = maybeOrigin.(*Origin)\n\t} else {\n\t\tslice = *maybeOrigin.(*[]*Origin)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &originR{}\n\t\t}\n\t\targs = append(args, object.Name)\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &originR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif queries.Equal(a, obj.Name) {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.Name)\n\t\t}\n\t}\n\n\tif len(args) == 0 {\n\t\treturn nil\n\t}\n\n\tquery := NewQuery(qm.From(`audit_package_group`), qm.WhereIn(`origin in ?`, args...))\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.QueryContext(ctx, e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load audit_package_group\")\n\t}\n\n\tvar resultSlice []*AuditPackageGroup\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice audit_package_group\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results in eager load on audit_package_group\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for audit_package_group\")\n\t}\n\n\tif len(auditPackageGroupAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif singular {\n\t\tobject.R.OriginAPG = resultSlice\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif foreign.R == nil {\n\t\t\t\tforeign.R = &auditPackageGroupR{}\n\t\t\t}\n\t\t\tforeign.R.OriginName = object\n\t\t}\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif queries.Equal(local.Name, foreign.Origin) {\n\t\t\t\tlocal.R.OriginAPG = append(local.R.OriginAPG, foreign)\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &auditPackageGroupR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.OriginName = local\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func compressOrig(v ID, ancestor, semi, label []ID) {\n\tif ancestor[ancestor[v]] != 0 {\n\t\tcompressOrig(ancestor[v], ancestor, semi, label)\n\t\tif semi[label[ancestor[v]]] < semi[label[v]] {\n\t\t\tlabel[v] = label[ancestor[v]]\n\t\t}\n\t\tancestor[v] = ancestor[ancestor[v]]\n\t}\n}",
"func (r *Record) SetGobField(d *Db, number uint16, e interface{}) error {\n\tvar buffer bytes.Buffer\n\tencoder := gob.NewEncoder(&buffer)\n\terr := encoder.Encode(e)\n\tif err != nil {\n\t\treturn WDBError(fmt.Sprintf(\"Failed to add a record: %v\", err))\n\t}\n\n\tcKey := C.CString(reflect.TypeOf(e).String())\n\tdefer C.free(unsafe.Pointer(cKey))\n\tenc := C.wg_encode_blob(d.db, (*C.char)(unsafe.Pointer(&(buffer.Bytes())[0])), cKey, C.wg_int(buffer.Len()))\n\tif C.wg_set_field(d.db, r.rec, C.wg_int(number), enc) != 0 {\n\t\treturn WDBError(\"Could not set field\")\n\t}\n\treturn nil\n}",
"func (o *StockCvterm) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"chado: no StockCvterm provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func (o *AssetRevision) Reload(exec boil.Executor) error {\n\tret, err := FindAssetRevision(exec, o.Orig)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*o = *ret\n\treturn nil\n}",
"func (o *RecipeAdditive) SetRecipe(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Recipe) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"recipe_additive\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"recipe_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, recipeAdditivePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.IsDebug(ctx) {\n\t\twriter := boil.DebugWriterFrom(ctx)\n\t\tfmt.Fprintln(writer, updateQuery)\n\t\tfmt.Fprintln(writer, values)\n\t}\n\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.RecipeID = related.ID\n\tif o.R == nil {\n\t\to.R = &recipeAdditiveR{\n\t\t\tRecipe: related,\n\t\t}\n\t} else {\n\t\to.R.Recipe = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &recipeR{\n\t\t\tRecipeAdditives: RecipeAdditiveSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.RecipeAdditives = append(related.R.RecipeAdditives, o)\n\t}\n\n\treturn nil\n}",
"func (bva BaseVestingAccount) GetOriginalVesting() sdk.Coins {\n\treturn bva.OriginalVesting\n}",
"func (o *AssetRevision) UpdateGP(whitelist ...string) {\n\tif err := o.Update(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Cvtermsynonym) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"chado: no Cvtermsynonym provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func (o *Rental) SetCustomerGP(insert bool, related *Customer) {\n\tif err := o.SetCustomer(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Origin) AddOriginOPR(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginProject) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"origin_projects\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, originProjectPrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginOPR: related,\n\t\t}\n\t} else {\n\t\to.R.OriginOPR = append(o.R.OriginOPR, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &originProjectR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func AddRelatedPropertyGeneratorsForOriginGroupOverrideAction_ARM(gens map[string]gopter.Gen) {\n\tgens[\"Parameters\"] = gen.PtrOf(OriginGroupOverrideActionParameters_ARMGenerator())\n}",
"func (o *Item) SetItemSideG(ctx context.Context, insert bool, related *ItemSide) error {\n\treturn o.SetItemSide(ctx, boil.GetContextDB(), insert, related)\n}",
"func (o *FeatureRelationship) SetObject(exec boil.Executor, insert bool, related *Feature) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"feature_relationship\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"object_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, featureRelationshipPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.FeatureID, o.FeatureRelationshipID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.ObjectID = related.FeatureID\n\n\tif o.R == nil {\n\t\to.R = &featureRelationshipR{\n\t\t\tObject: related,\n\t\t}\n\t} else {\n\t\to.R.Object = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &featureR{\n\t\t\tObjectFeatureRelationship: o,\n\t\t}\n\t} else {\n\t\trelated.R.ObjectFeatureRelationship = o\n\t}\n\n\treturn nil\n}",
"func (o *AuthUser) SetUserDjangoCommentsG(insert bool, related ...*DjangoComment) error {\n\treturn o.SetUserDjangoComments(boil.GetDB(), insert, related...)\n}",
"func AssetRevisionExistsG(orig int) (bool, error) {\n\treturn AssetRevisionExists(boil.GetDB(), orig)\n}",
"func AddRelatedPropertyGeneratorsForOriginGroupOverride(gens map[string]gopter.Gen) {\n\tgens[\"OriginGroup\"] = gen.PtrOf(ResourceReferenceGenerator())\n}",
"func (o *Jet) SetPilotG(insert bool, related *Pilot) error {\n\treturn o.SetPilot(boil.GetDB(), insert, related)\n}",
"func (o *Picture) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"models: no Picture provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func (o *BraceletPhoto) SetPhotoBraceletBraceletsG(insert bool, related ...*BraceletBracelet) error {\n\treturn o.SetPhotoBraceletBracelets(boil.GetDB(), insert, related...)\n}",
"func (ns *Namespace) GetOriginalObjects(gvk schema.GroupVersionKind) []*unstructured.Unstructured {\n\to := []*unstructured.Unstructured{}\n\tfor _, obj := range ns.originalObjects[gvk] {\n\t\to = append(o, obj)\n\t}\n\treturn o\n}",
"func (o *AssetRevision) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *Source) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"mdbmdbmodels: no Source provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func (o *RentalRower) SetRentalG(insert bool, related *Rental) error {\n\treturn o.SetRental(boil.GetDB(), insert, related)\n}",
"func (o *BraceletPhoto) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"models: no BraceletPhoto provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func (o *TransactionSplit) SetOriginalSource(v string) {\n\to.OriginalSource.Set(&v)\n}",
"func (o *BlackCard) SetSetG(insert bool, related *Set) error {\n\treturn o.SetSet(boil.GetDB(), insert, related)\n}",
"func (o *BookCategory) SetParentG(ctx context.Context, insert bool, related *BookCategory) error {\n\treturn o.SetParent(ctx, boil.GetContextDB(), insert, related)\n}",
"func (assetRevisionL) LoadAsset(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Asset\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Asset\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Asset = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Asset == foreign.ID {\n\t\t\t\tlocal.R.Asset = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func AddRelatedPropertyGeneratorsForOriginGroupOverride_ARM(gens map[string]gopter.Gen) {\n\tgens[\"OriginGroup\"] = gen.PtrOf(ResourceReference_ARMGenerator())\n}",
"func AddRelatedPropertyGeneratorsForOriginGroupOverrideActionParameters(gens map[string]gopter.Gen) {\n\tgens[\"OriginGroup\"] = gen.PtrOf(ResourceReferenceGenerator())\n}",
"func (o *StockCvterm) SetStockCvtermprop(exec boil.Executor, insert bool, related *StockCvtermprop) error {\n\tvar err error\n\n\tif insert {\n\t\trelated.StockCvtermID = o.StockCvtermID\n\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t} else {\n\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\"UPDATE \\\"stock_cvtermprop\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"stock_cvterm_id\"}),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, stockCvtermpropPrimaryKeyColumns),\n\t\t)\n\t\tvalues := []interface{}{o.StockCvtermID, related.StockCvtermpropID}\n\n\t\tif boil.DebugMode {\n\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t}\n\n\t\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t}\n\n\t\trelated.StockCvtermID = o.StockCvtermID\n\n\t}\n\n\tif o.R == nil {\n\t\to.R = &stockCvtermR{\n\t\t\tStockCvtermprop: related,\n\t\t}\n\t} else {\n\t\to.R.StockCvtermprop = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &stockCvtermpropR{\n\t\t\tStockCvterm: o,\n\t\t}\n\t} else {\n\t\trelated.R.StockCvterm = o\n\t}\n\treturn nil\n}",
"func (assignment *SqlRoleAssignment) OriginalGVK() *schema.GroupVersionKind {\n\treturn &schema.GroupVersionKind{\n\t\tGroup: GroupVersion.Group,\n\t\tVersion: assignment.Spec.OriginalVersion,\n\t\tKind: \"SqlRoleAssignment\",\n\t}\n}",
"func AddRelatedPropertyGeneratorsForOriginGroupOverrideActionParameters_ARM(gens map[string]gopter.Gen) {\n\tgens[\"OriginGroup\"] = gen.PtrOf(ResourceReference_ARMGenerator())\n}",
"func (o *Origin) RemoveOriginAPG(ctx context.Context, exec boil.ContextExecutor, related ...*AuditPackageGroup) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\tif rel.R != nil {\n\t\t\trel.R.OriginName = nil\n\t\t}\n\t\tif _, err = rel.Update(ctx, exec, boil.Whitelist(\"origin\")); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif o.R == nil {\n\t\treturn nil\n\t}\n\n\tfor _, rel := range related {\n\t\tfor i, ri := range o.R.OriginAPG {\n\t\t\tif rel != ri {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tln := len(o.R.OriginAPG)\n\t\t\tif ln > 1 && i < ln-1 {\n\t\t\t\to.R.OriginAPG[i] = o.R.OriginAPG[ln-1]\n\t\t\t}\n\t\t\to.R.OriginAPG = o.R.OriginAPG[:ln-1]\n\t\t\tbreak\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *GetRecipeInformation200ResponseExtendedIngredientsInner) GetOriginal() string {\n\tif o == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\n\treturn o.Original\n}"
] |
[
"0.7461523",
"0.73273003",
"0.65391976",
"0.636586",
"0.5988883",
"0.5920937",
"0.5546979",
"0.5430208",
"0.5174289",
"0.5124772",
"0.50912",
"0.5034814",
"0.4912004",
"0.48243704",
"0.47748852",
"0.47697958",
"0.47616473",
"0.46753153",
"0.4621293",
"0.46137857",
"0.45782667",
"0.45745054",
"0.45500624",
"0.45423958",
"0.45380807",
"0.45236844",
"0.4507351",
"0.44828817",
"0.44470206",
"0.44178635",
"0.44159997",
"0.44041044",
"0.44039497",
"0.43977627",
"0.4392838",
"0.43829364",
"0.43771574",
"0.4361963",
"0.4318364",
"0.43139023",
"0.4300766",
"0.42860734",
"0.42790553",
"0.4276326",
"0.42687756",
"0.42653722",
"0.42474228",
"0.4245583",
"0.42432785",
"0.42416498",
"0.42270777",
"0.42260706",
"0.4225257",
"0.4218781",
"0.42006603",
"0.41945142",
"0.41874808",
"0.41740653",
"0.4170807",
"0.41656834",
"0.41557825",
"0.41495967",
"0.41465676",
"0.41305134",
"0.41281536",
"0.41193044",
"0.41175896",
"0.4107772",
"0.4102645",
"0.41005874",
"0.40997842",
"0.4080781",
"0.4079982",
"0.4064482",
"0.40550607",
"0.4047436",
"0.40454203",
"0.404423",
"0.40420985",
"0.40387216",
"0.40244257",
"0.4024248",
"0.40232494",
"0.40191388",
"0.40182677",
"0.40159643",
"0.4015872",
"0.40083832",
"0.4005353",
"0.40017375",
"0.39995843",
"0.3987152",
"0.39830273",
"0.3982415",
"0.39814982",
"0.3978217",
"0.39776635",
"0.39762783",
"0.39758083",
"0.39723498"
] |
0.7713344
|
0
|
SetOrigP of the asset_revision to the related item. Sets o.R.Orig to related. Adds o to related.R.OrigAssetRevision. Panics on error.
|
func (o *AssetRevision) SetOrigP(exec boil.Executor, insert bool, related *Asset) {
if err := o.SetOrig(exec, insert, related); err != nil {
panic(boil.WrapErr(err))
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (o *AssetRevision) SetOrig(exec boil.Executor, insert bool, related *Asset) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"asset_revision\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"orig\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, assetRevisionPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.Orig}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.Orig = related.ID\n\n\tif o.R == nil {\n\t\to.R = &assetRevisionR{\n\t\t\tOrig: related,\n\t\t}\n\t} else {\n\t\to.R.Orig = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &assetR{\n\t\t\tOrigAssetRevision: o,\n\t\t}\n\t} else {\n\t\trelated.R.OrigAssetRevision = o\n\t}\n\n\treturn nil\n}",
"func (o *AssetRevision) SetOrigGP(insert bool, related *Asset) {\n\tif err := o.SetOrig(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) SetOrigG(insert bool, related *Asset) error {\n\treturn o.SetOrig(boil.GetDB(), insert, related)\n}",
"func (assetRevisionL) LoadOrig(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Orig\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Orig\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Orig = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Orig == foreign.ID {\n\t\t\t\tlocal.R.Orig = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AssetRevision) SetAssetP(exec boil.Executor, insert bool, related *Asset) {\n\tif err := o.SetAsset(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) SetAsset(exec boil.Executor, insert bool, related *Asset) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"asset_revision\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"asset\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, assetRevisionPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.Orig}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.Asset = related.ID\n\n\tif o.R == nil {\n\t\to.R = &assetRevisionR{\n\t\t\tAsset: related,\n\t\t}\n\t} else {\n\t\to.R.Asset = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &assetR{\n\t\t\tAssetRevisions: AssetRevisionSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.AssetRevisions = append(related.R.AssetRevisions, o)\n\t}\n\n\treturn nil\n}",
"func (o *AssetRevision) OrigByFk(exec boil.Executor, mods ...qm.QueryMod) assetQuery {\n\tqueryMods := []qm.QueryMod{\n\t\tqm.Where(\"id=?\", o.Orig),\n\t}\n\n\tqueryMods = append(queryMods, mods...)\n\n\tquery := Assets(exec, queryMods...)\n\tqueries.SetFrom(query.Query, \"\\\"asset\\\"\")\n\n\treturn query\n}",
"func (m NoSides) SetOrigOrdModTime(v time.Time) {\n\tm.Set(field.NewOrigOrdModTime(v))\n}",
"func (o *GetRecipeInformation200ResponseExtendedIngredientsInner) SetOriginal(v string) {\n\to.Original = v\n}",
"func (o *Origin) SetOriginAP(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AuditPackage) error {\n\tquery := \"update \\\"audit_package\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginAP {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginAP = nil\n\t}\n\treturn o.AddOriginAP(ctx, exec, insert, related...)\n}",
"func (o *Origin) SetOriginOPA(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPackage) error {\n\tquery := \"update \\\"origin_packages\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOPA {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOPA = nil\n\t}\n\treturn o.AddOriginOPA(ctx, exec, insert, related...)\n}",
"func (m CrossOrderCancelReplaceRequest) SetOrigCrossID(v string) {\n\tm.Set(field.NewOrigCrossID(v))\n}",
"func (o *Origin) SetOriginOPR(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginProject) error {\n\tquery := \"update \\\"origin_projects\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOPR {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOPR = nil\n\t}\n\treturn o.AddOriginOPR(ctx, exec, insert, related...)\n}",
"func (o *AssetRevision) ReloadP(exec boil.Executor) {\n\tif err := o.Reload(exec); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Origin) SetOriginAPG(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AuditPackageGroup) error {\n\tquery := \"update \\\"audit_package_group\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginAPG {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginAPG = nil\n\t}\n\treturn o.AddOriginAPG(ctx, exec, insert, related...)\n}",
"func (o *AssetRevision) SetAssetGP(insert bool, related *Asset) {\n\tif err := o.SetAsset(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) OrigG(mods ...qm.QueryMod) assetQuery {\n\treturn o.OrigByFk(boil.GetDB(), mods...)\n}",
"func (r *AssetRendering) Original() {\n\tv := \"original\"\n\tr.Value = &v\n}",
"func (o *Source) SetParentP(exec boil.Executor, insert bool, related *Source) {\n\tif err := o.SetParent(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Source) SetParent(exec boil.Executor, insert bool, related *Source) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"sources\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"parent_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, sourcePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.ParentID.Int64 = related.ID\n\to.ParentID.Valid = true\n\n\tif o.R == nil {\n\t\to.R = &sourceR{\n\t\t\tParent: related,\n\t\t}\n\t} else {\n\t\to.R.Parent = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &sourceR{\n\t\t\tParentSources: SourceSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.ParentSources = append(related.R.ParentSources, o)\n\t}\n\n\treturn nil\n}",
"func (m NoSides) SetOrigClOrdID(v string) {\n\tm.Set(field.NewOrigClOrdID(v))\n}",
"func (o *Source) SetParent(exec boil.Executor, insert bool, related *Source) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"sources\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"parent_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, sourcePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\tqueries.Assign(&o.ParentID, related.ID)\n\tif o.R == nil {\n\t\to.R = &sourceR{\n\t\t\tParent: related,\n\t\t}\n\t} else {\n\t\to.R.Parent = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &sourceR{\n\t\t\tParentSources: SourceSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.ParentSources = append(related.R.ParentSources, o)\n\t}\n\n\treturn nil\n}",
"func WithOriginalSrc(parent context.Context, src string) context.Context {\n\treturn context.WithValue(parent, originalSrcCtxKey, src)\n}",
"func FindAssetRevisionP(exec boil.Executor, orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(exec, orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (o *AssetRevision) UpdateP(exec boil.Executor, whitelist ...string) {\n\terr := o.Update(exec, whitelist...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Origin) SetOriginOPREK(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPrivateEncryptionKey) error {\n\tquery := \"update \\\"origin_private_encryption_keys\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOPREK {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOPREK = nil\n\t}\n\treturn o.AddOriginOPREK(ctx, exec, insert, related...)\n}",
"func AddRelatedPropertyGeneratorsForOriginGroupOverrideActionParameters_ARM(gens map[string]gopter.Gen) {\n\tgens[\"OriginGroup\"] = gen.PtrOf(ResourceReference_ARMGenerator())\n}",
"func AddRelatedPropertyGeneratorsForOriginGroupOverrideAction_ARM(gens map[string]gopter.Gen) {\n\tgens[\"Parameters\"] = gen.PtrOf(OriginGroupOverrideActionParameters_ARMGenerator())\n}",
"func (o *Transaction) SetOriginalDescription(v string) {\n\to.OriginalDescription.Set(&v)\n}",
"func (o *Origin) SetOriginOI(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginInvitation) error {\n\tquery := \"update \\\"origin_invitations\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOI {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOI = nil\n\t}\n\treturn o.AddOriginOI(ctx, exec, insert, related...)\n}",
"func (o *Origin) SetOriginOC(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginChannel) error {\n\tquery := \"update \\\"origin_channels\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOC {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOC = nil\n\t}\n\treturn o.AddOriginOC(ctx, exec, insert, related...)\n}",
"func (o *Origin) AddOriginOPA(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPackage) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"origin_packages\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, originPackagePrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginOPA: related,\n\t\t}\n\t} else {\n\t\to.R.OriginOPA = append(o.R.OriginOPA, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &originPackageR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func (ns *Namespace) SetOriginalObject(obj *unstructured.Unstructured) {\n\tgvk := obj.GroupVersionKind()\n\tname := obj.GetName()\n\t_, ok := ns.originalObjects[gvk]\n\tif !ok {\n\t\tns.originalObjects[gvk] = map[string]*unstructured.Unstructured{}\n\t}\n\tns.originalObjects[gvk][name] = obj\n}",
"func (t *OrderAsset) Init(stub shim.ChaincodeStubInterface) pd.Response {\n\n\tlogger.Info(\"########### ORDER_CHAINCODE Init ###########\")\n\t// Get the args from the transaction proposal\n\treturn shim.Success(nil)\n}",
"func (cp *ControlPlane) Replace(p data.Clonable) data.Clonable {\n\tsrc := p.(*ControlPlane)\n\t*cp = *src\n\tif src.VirtualIP != nil {\n\t\tcp.VirtualIP = src.VirtualIP.Clone().(*abstract.VirtualIP)\n\t}\n\treturn cp\n}",
"func (o *Rental) SetInventoryP(exec boil.Executor, insert bool, related *Inventory) {\n\tif err := o.SetInventory(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *ViewMilestone) SetOriginalDueDate(v string) {\n\to.OriginalDueDate = &v\n}",
"func AddRelatedPropertyGeneratorsForOriginGroupOverrideActionParameters(gens map[string]gopter.Gen) {\n\tgens[\"OriginGroup\"] = gen.PtrOf(ResourceReferenceGenerator())\n}",
"func (o *Origin) SetOriginOPK(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPublicKey) error {\n\tquery := \"update \\\"origin_public_keys\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOPK {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOPK = nil\n\t}\n\treturn o.AddOriginOPK(ctx, exec, insert, related...)\n}",
"func (o *Origin) AddOriginOPR(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginProject) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"origin_projects\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, originProjectPrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginOPR: related,\n\t\t}\n\t} else {\n\t\to.R.OriginOPR = append(o.R.OriginOPR, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &originProjectR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func (v *Vec3i) SetMin(other Vec3i) {\n\tv.X = Min32i(v.X, other.X)\n\tv.Y = Min32i(v.Y, other.Y)\n\tv.Z = Min32i(v.Z, other.Z)\n}",
"func (o *Origin) SetOriginOPUEK(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPublicEncryptionKey) error {\n\tquery := \"update \\\"origin_public_encryption_keys\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOPUEK {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOPUEK = nil\n\t}\n\treturn o.AddOriginOPUEK(ctx, exec, insert, related...)\n}",
"func compressOrig(v ID, ancestor, semi, label []ID) {\n\tif ancestor[ancestor[v]] != 0 {\n\t\tcompressOrig(ancestor[v], ancestor, semi, label)\n\t\tif semi[label[ancestor[v]]] < semi[label[v]] {\n\t\t\tlabel[v] = label[ancestor[v]]\n\t\t}\n\t\tancestor[v] = ancestor[ancestor[v]]\n\t}\n}",
"func AddRelatedPropertyGeneratorsForOriginGroupOverrideAction(gens map[string]gopter.Gen) {\n\tgens[\"Parameters\"] = gen.PtrOf(OriginGroupOverrideActionParametersGenerator())\n}",
"func (o *PaymentStatusUpdateWebhook) SetOriginalReference(v string) {\n\to.OriginalReference.Set(&v)\n}",
"func (o *BaseReportTransaction) SetOriginalDescription(v string) {\n\to.OriginalDescription.Set(&v)\n}",
"func (o *Origin) AddOriginAP(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AuditPackage) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"audit_package\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, auditPackagePrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginAP: related,\n\t\t}\n\t} else {\n\t\to.R.OriginAP = append(o.R.OriginAP, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &auditPackageR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func AddIndependentPropertyGeneratorsForOriginGroupOverrideAction_ARM(gens map[string]gopter.Gen) {\n\tgens[\"Name\"] = gen.OneConstOf(OriginGroupOverrideAction_Name_OriginGroupOverride)\n}",
"func (r *PoolNAPTRResource) Edit(id string, item Pool) error {\n\tif err := r.c.ModQuery(\"PUT\", BasePath+PoolNAPTREndpoint+\"/\"+id, item); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func (o *TransactionSplit) SetOriginalSource(v string) {\n\to.OriginalSource.Set(&v)\n}",
"func (o *Rental) SetCustomerP(exec boil.Executor, insert bool, related *Customer) {\n\tif err := o.SetCustomer(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (testEntityInline_EntityInfo) PutRelated(txn *objectbox.Transaction, object interface{}, id uint64) error {\n\treturn nil\n}",
"func (t *Transform) SetParent(p Transformable) {\n\tt.access.Lock()\n\tif t.parent != p {\n\t\tt.built = nil\n\t\tt.parent = p\n\t}\n\tt.access.Unlock()\n}",
"func (obj *ObjectBase) VSetParent(vPtr IObject, parent IObject) {\n\tobj.parent = parent\n\tif len(obj.name) > 0 {\n\t\tobj.VSetName(vPtr, obj.name)\n\t}\n}",
"func (o *CreditBankIncomeTransaction) SetOriginalDescription(v string) {\n\to.OriginalDescription.Set(&v)\n}",
"func (o *AssetRevision) SetAssetG(insert bool, related *Asset) error {\n\treturn o.SetAsset(boil.GetDB(), insert, related)\n}",
"func AssetRevisionExistsP(exec boil.Executor, orig int) bool {\n\te, err := AssetRevisionExists(exec, orig)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn e\n}",
"func (o *Origin) SetOriginOM(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginMember) error {\n\tquery := \"update \\\"origin_members\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOM {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOM = nil\n\t}\n\treturn o.AddOriginOM(ctx, exec, insert, related...)\n}",
"func (o *Origin1) SetOrigins(v []Origin3) {\n\to.Origins = v\n}",
"func evalOrig(v ID, ancestor, semi, label []ID) ID {\n\tif ancestor[v] == 0 {\n\t\treturn v\n\t}\n\tcompressOrig(v, ancestor, semi, label)\n\treturn label[v]\n}",
"func (t *Link) PrependPreviewIRI(v *url.URL) {\n\tt.preview = append([]*previewIntermediateType{&previewIntermediateType{IRI: v}}, t.preview...)\n\n}",
"func (reading_EntityInfo) PutRelated(ob *objectbox.ObjectBox, object interface{}, id uint64) error {\n\treturn nil\n}",
"func (o *RecipeAdditive) SetRecipe(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Recipe) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"recipe_additive\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"recipe_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, recipeAdditivePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.IsDebug(ctx) {\n\t\twriter := boil.DebugWriterFrom(ctx)\n\t\tfmt.Fprintln(writer, updateQuery)\n\t\tfmt.Fprintln(writer, values)\n\t}\n\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.RecipeID = related.ID\n\tif o.R == nil {\n\t\to.R = &recipeAdditiveR{\n\t\t\tRecipe: related,\n\t\t}\n\t} else {\n\t\to.R.Recipe = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &recipeR{\n\t\t\tRecipeAdditives: RecipeAdditiveSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.RecipeAdditives = append(related.R.RecipeAdditives, o)\n\t}\n\n\treturn nil\n}",
"func (o *Origin) SetOriginOSK(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginSecretKey) error {\n\tquery := \"update \\\"origin_secret_keys\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOSK {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOSK = nil\n\t}\n\treturn o.AddOriginOSK(ctx, exec, insert, related...)\n}",
"func (o *Source) SetParentGP(insert bool, related *Source) {\n\tif err := o.SetParent(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func Original(err error) error {\n\tswitch err.(type) {\n\tcase Copy:\n\t\treturn err.(Copy).Original()\n\t}\n\treturn err\n}",
"func (o *Transaction) SetOriginalDescriptionNil() {\n\to.OriginalDescription.Set(nil)\n}",
"func (o *GetRecipeInformation200ResponseExtendedIngredientsInner) SetOriginalName(v string) {\n\to.OriginalName = v\n}",
"func (n *resPool) SetParent(parent ResPool) {\n\tn.Lock()\n\tdefer n.Unlock()\n\tn.parent = parent\n\t// calculate path again.\n\tn.path = n.calculatePath()\n}",
"func (c *client) EditDeclareCapture(index int64, frontend string, data *models.Capture, transactionID string, version int64) error {\n\tif c.UseModelsValidation {\n\t\tvalidationErr := data.Validate(strfmt.Default)\n\t\tif validationErr != nil {\n\t\t\treturn NewConfError(ErrValidationError, validationErr.Error())\n\t\t}\n\t}\n\tp, t, err := c.loadDataForChange(transactionID, version)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif _, err := p.GetOne(\"frontend\", frontend, \"declare capture\", int(index)); err != nil {\n\t\treturn c.HandleError(strconv.FormatInt(index, 10), \"frontend\", frontend, t, transactionID == \"\", err)\n\t}\n\treturn c.SaveData(p, t, transactionID == \"\")\n}",
"func (o *Origin) RemoveOriginOPA(ctx context.Context, exec boil.ContextExecutor, related ...*OriginPackage) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\tif rel.R != nil {\n\t\t\trel.R.OriginName = nil\n\t\t}\n\t\tif _, err = rel.Update(ctx, exec, boil.Whitelist(\"origin\")); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif o.R == nil {\n\t\treturn nil\n\t}\n\n\tfor _, rel := range related {\n\t\tfor i, ri := range o.R.OriginOPA {\n\t\t\tif rel != ri {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tln := len(o.R.OriginOPA)\n\t\t\tif ln > 1 && i < ln-1 {\n\t\t\t\to.R.OriginOPA[i] = o.R.OriginOPA[ln-1]\n\t\t\t}\n\t\t\to.R.OriginOPA = o.R.OriginOPA[:ln-1]\n\t\t\tbreak\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AssetRevision) Reload(exec boil.Executor) error {\n\tret, err := FindAssetRevision(exec, o.Orig)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*o = *ret\n\treturn nil\n}",
"func (c *ClientWithResponses) BuildsPreReleaseVersionGetToOneRelatedWithResponse(ctx context.Context, id string, params *BuildsPreReleaseVersionGetToOneRelatedParams, reqEditors ...RequestEditorFn) (*BuildsPreReleaseVersionGetToOneRelatedResponse, error) {\n\trsp, err := c.BuildsPreReleaseVersionGetToOneRelated(ctx, id, params, reqEditors...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn ParseBuildsPreReleaseVersionGetToOneRelatedResponse(rsp)\n}",
"func NewOrigClOrdID(val string) OrigClOrdIDField {\n\treturn OrigClOrdIDField{quickfix.FIXString(val)}\n}",
"func (assetRevisionL) LoadAsset(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Asset\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Asset\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Asset = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Asset == foreign.ID {\n\t\t\t\tlocal.R.Asset = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *TransactionSplit) SetOriginalSourceNil() {\n\to.OriginalSource.Set(nil)\n}",
"func AddRelatedPropertyGeneratorsForOriginGroupOverride_ARM(gens map[string]gopter.Gen) {\n\tgens[\"OriginGroup\"] = gen.PtrOf(ResourceReference_ARMGenerator())\n}",
"func AddRelatedPropertyGeneratorsForRouteConfigurationOverrideActionParameters_ARM(gens map[string]gopter.Gen) {\n\tgens[\"CacheConfiguration\"] = gen.PtrOf(CacheConfiguration_ARMGenerator())\n\tgens[\"OriginGroupOverride\"] = gen.PtrOf(OriginGroupOverride_ARMGenerator())\n}",
"func (testStringIdEntity_EntityInfo) PutRelated(txn *objectbox.Transaction, object interface{}, id uint64) error {\n\treturn nil\n}",
"func AddIndependentPropertyGeneratorsForOriginGroupOverrideActionParameters_ARM(gens map[string]gopter.Gen) {\n\tgens[\"TypeName\"] = gen.PtrOf(gen.OneConstOf(OriginGroupOverrideActionParameters_TypeName_DeliveryRuleOriginGroupOverrideActionParameters))\n}",
"func (m CrossOrderCancelReplaceRequest) GetOrigCrossID() (v string, err quickfix.MessageRejectError) {\n\tvar f field.OrigCrossIDField\n\tif err = m.Get(&f); err == nil {\n\t\tv = f.Value()\n\t}\n\treturn\n}",
"func (m NoSides) GetOrigOrdModTime() (v time.Time, err quickfix.MessageRejectError) {\n\tvar f field.OrigOrdModTimeField\n\tif err = m.Get(&f); err == nil {\n\t\tv = f.Value()\n\t}\n\treturn\n}",
"func (o *Author) SetSourcesP(exec boil.Executor, insert bool, related ...*Source) {\n\tif err := o.SetSources(exec, insert, related...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Source) SetParentSourcesP(exec boil.Executor, insert bool, related ...*Source) {\n\tif err := o.SetParentSources(exec, insert, related...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *OriginCollection) SetOrigins(v []Origin3) {\n\to.Origins = v\n}",
"func (m NoSides) GetOrigClOrdID() (v string, err quickfix.MessageRejectError) {\n\tvar f field.OrigClOrdIDField\n\tif err = m.Get(&f); err == nil {\n\t\tv = f.Value()\n\t}\n\treturn\n}",
"func (testEntityRelated_EntityInfo) PutRelated(txn *objectbox.Transaction, object interface{}, id uint64) error {\n\tif rel := object.(*TestEntityRelated).Next; rel != nil {\n\t\trId, err := EntityByValueBinding.GetId(rel)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t} else if rId == 0 {\n\t\t\tif err := txn.RunWithCursor(EntityByValueBinding.Id, func(targetCursor *objectbox.Cursor) error {\n\t\t\t\t_, err := targetCursor.Put(rel) // NOTE Put/PutAsync() has a side-effect of setting the rel.ID\n\t\t\t\treturn err\n\t\t\t}); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif err := txn.RunWithCursor(TestEntityRelatedBinding.Id, func(cursor *objectbox.Cursor) error {\n\t\treturn cursor.RelationReplace(6, EntityByValueBinding.Id, id, object, object.(*TestEntityRelated).NextSlice)\n\t}); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func NewOrigTime(val time.Time) OrigTimeField {\n\treturn NewOrigTimeWithPrecision(val, quickfix.Millis)\n}",
"func (o *Origin) AddOriginAPG(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AuditPackageGroup) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"audit_package_group\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, auditPackageGroupPrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginAPG: related,\n\t\t}\n\t} else {\n\t\to.R.OriginAPG = append(o.R.OriginAPG, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &auditPackageGroupR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func (EditCoinOwnerDataResource) Transform(txData interface{}, context *state.CheckState) TxDataResource {\n\tdata := txData.(*transaction.EditCoinOwnerData)\n\n\treturn EditCoinOwnerDataResource{\n\t\tSymbol: data.Symbol,\n\t\tNewOwner: data.NewOwner,\n\t}\n}",
"func (e *Tree) SetParent(replacement *Tree) { e.parent = replacement }",
"func (this *Transformable) SetOrigin(orig Vector2f) {\n\tC.sfTransformable_setOrigin(this.cptr, orig.toC())\n}",
"func CloneRefOfRollback(n *Rollback) *Rollback {\n\tif n == nil {\n\t\treturn nil\n\t}\n\tout := *n\n\treturn &out\n}",
"func (o *AssetRevision) InsertP(exec boil.Executor, whitelist ...string) {\n\tif err := o.Insert(exec, whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Origin) AddOriginOPREK(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPrivateEncryptionKey) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"origin_private_encryption_keys\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, originPrivateEncryptionKeyPrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginOPREK: related,\n\t\t}\n\t} else {\n\t\to.R.OriginOPREK = append(o.R.OriginOPREK, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &originPrivateEncryptionKeyR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func (o *RecipeLipid) SetRecipe(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Recipe) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"recipe_lipid\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"recipe_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, recipeLipidPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.IsDebug(ctx) {\n\t\twriter := boil.DebugWriterFrom(ctx)\n\t\tfmt.Fprintln(writer, updateQuery)\n\t\tfmt.Fprintln(writer, values)\n\t}\n\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.RecipeID = related.ID\n\tif o.R == nil {\n\t\to.R = &recipeLipidR{\n\t\t\tRecipe: related,\n\t\t}\n\t} else {\n\t\to.R.Recipe = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &recipeR{\n\t\t\tRecipeLipids: RecipeLipidSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.RecipeLipids = append(related.R.RecipeLipids, o)\n\t}\n\n\treturn nil\n}",
"func (p Project) EditRow() error {\n\t_, err := sq.\n\t\tUpdate(projectTable).\n\t\tSetMap(sq.Eq{\n\t\t\t\"group_id\": p.GroupID,\n\t\t\t\"name\": p.Name,\n\t\t\t\"url\": p.URL,\n\t\t\t\"path\": p.Path,\n\t\t\t\"environment\": p.Environment,\n\t\t\t\"branch\": p.Branch,\n\t\t\t\"after_pull_script\": p.AfterPullScript,\n\t\t\t\"after_deploy_script\": p.AfterDeployScript,\n\t\t\t\"rsync_option\": p.RsyncOption,\n\t\t\t\"update_time\": p.UpdateTime,\n\t\t}).\n\t\tWhere(sq.Eq{\"id\": p.ID}).\n\t\tRunWith(DB).\n\t\tExec()\n\treturn err\n}",
"func (ns *Namespace) GetOriginalObject(gvk schema.GroupVersionKind, nm string) *unstructured.Unstructured {\n\treturn ns.originalObjects[gvk][nm]\n}",
"func (client AccountQuotaPolicyClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, policyName string, body AccountQuotaPolicyResourcePatchDescription) (*http.Request, error) {\n pathParameters := map[string]interface{} {\n \"accountName\": accountName,\n \"policyName\": policyName,\n \"resourceGroupName\": resourceGroupName,\n \"subscriptionId\": autorest.Encode(\"path\",client.SubscriptionID),\n }\n\n const APIVersion = \"2020-12-01-preview\"\n queryParameters := map[string]interface{} {\n \"api-version\": APIVersion,\n }\n\n preparer := autorest.CreatePreparer(\nautorest.AsContentType(\"application/json; charset=utf-8\"),\nautorest.AsPatch(),\nautorest.WithBaseURL(client.BaseURI),\nautorest.WithPathParameters(\"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.AISupercomputer/accounts/{accountName}/accountQuotaPolicies/{policyName}\",pathParameters),\nautorest.WithJSON(body),\nautorest.WithQueryParameters(queryParameters))\n return preparer.Prepare((&http.Request{}).WithContext(ctx))\n }",
"func (c *Client) EditEmbed(\n\tchannelID discord.ChannelID, messageID discord.MessageID, embed discord.Embed) (*discord.Message, error) {\n\n\treturn c.EditMessageComplex(channelID, messageID, EditMessageData{\n\t\tEmbed: &embed,\n\t})\n}"
] |
[
"0.7589871",
"0.6765098",
"0.60827917",
"0.5857812",
"0.56872135",
"0.55279374",
"0.50430125",
"0.5034554",
"0.49813634",
"0.4858695",
"0.48144093",
"0.4692064",
"0.46475768",
"0.46209994",
"0.45914608",
"0.4551921",
"0.44695267",
"0.44641155",
"0.44540465",
"0.44420698",
"0.44155806",
"0.43673444",
"0.43672672",
"0.43626133",
"0.43421826",
"0.4330485",
"0.43140116",
"0.43087775",
"0.42777032",
"0.42688394",
"0.4246927",
"0.42466903",
"0.42463657",
"0.4226823",
"0.42167157",
"0.421633",
"0.4195284",
"0.4186123",
"0.41840327",
"0.41687676",
"0.41584122",
"0.41142723",
"0.41099498",
"0.41082358",
"0.41024798",
"0.4083331",
"0.40729004",
"0.40629843",
"0.4049181",
"0.40248224",
"0.40237576",
"0.40215018",
"0.40172902",
"0.4010155",
"0.400211",
"0.3985176",
"0.39760864",
"0.39617893",
"0.39530253",
"0.3951309",
"0.3945779",
"0.39451692",
"0.3943628",
"0.39434475",
"0.39171237",
"0.3916178",
"0.39089304",
"0.3904154",
"0.38967472",
"0.38966075",
"0.38868675",
"0.38830915",
"0.38658574",
"0.38621035",
"0.3860581",
"0.3855906",
"0.38417652",
"0.38016695",
"0.37998164",
"0.3789729",
"0.37879038",
"0.37793696",
"0.377924",
"0.37787908",
"0.37764513",
"0.37748224",
"0.37736458",
"0.37718627",
"0.37704358",
"0.37685454",
"0.37662414",
"0.37615827",
"0.37550485",
"0.37515223",
"0.37415504",
"0.37370598",
"0.3717778",
"0.371285",
"0.3709287",
"0.37085542"
] |
0.8067007
|
0
|
SetOrigGP of the asset_revision to the related item. Sets o.R.Orig to related. Adds o to related.R.OrigAssetRevision. Uses the global database handle and panics on error.
|
func (o *AssetRevision) SetOrigGP(insert bool, related *Asset) {
if err := o.SetOrig(boil.GetDB(), insert, related); err != nil {
panic(boil.WrapErr(err))
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (o *AssetRevision) SetOrig(exec boil.Executor, insert bool, related *Asset) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"asset_revision\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"orig\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, assetRevisionPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.Orig}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.Orig = related.ID\n\n\tif o.R == nil {\n\t\to.R = &assetRevisionR{\n\t\t\tOrig: related,\n\t\t}\n\t} else {\n\t\to.R.Orig = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &assetR{\n\t\t\tOrigAssetRevision: o,\n\t\t}\n\t} else {\n\t\trelated.R.OrigAssetRevision = o\n\t}\n\n\treturn nil\n}",
"func (o *AssetRevision) SetOrigG(insert bool, related *Asset) error {\n\treturn o.SetOrig(boil.GetDB(), insert, related)\n}",
"func (o *AssetRevision) SetOrigP(exec boil.Executor, insert bool, related *Asset) {\n\tif err := o.SetOrig(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) SetAssetGP(insert bool, related *Asset) {\n\tif err := o.SetAsset(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) OrigG(mods ...qm.QueryMod) assetQuery {\n\treturn o.OrigByFk(boil.GetDB(), mods...)\n}",
"func (assetRevisionL) LoadOrig(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Orig\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Orig\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Orig = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Orig == foreign.ID {\n\t\t\t\tlocal.R.Orig = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Origin) SetOriginAPG(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AuditPackageGroup) error {\n\tquery := \"update \\\"audit_package_group\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginAPG {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginAPG = nil\n\t}\n\treturn o.AddOriginAPG(ctx, exec, insert, related...)\n}",
"func (o *AssetRevision) SetAssetG(insert bool, related *Asset) error {\n\treturn o.SetAsset(boil.GetDB(), insert, related)\n}",
"func (o *AssetRevision) SetAsset(exec boil.Executor, insert bool, related *Asset) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"asset_revision\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"asset\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, assetRevisionPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.Orig}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.Asset = related.ID\n\n\tif o.R == nil {\n\t\to.R = &assetRevisionR{\n\t\t\tAsset: related,\n\t\t}\n\t} else {\n\t\to.R.Asset = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &assetR{\n\t\t\tAssetRevisions: AssetRevisionSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.AssetRevisions = append(related.R.AssetRevisions, o)\n\t}\n\n\treturn nil\n}",
"func (o *Source) SetParentGP(insert bool, related *Source) {\n\tif err := o.SetParent(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) ReloadGP() {\n\tif err := o.ReloadG(); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Origin) SetOriginAP(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AuditPackage) error {\n\tquery := \"update \\\"audit_package\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginAP {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginAP = nil\n\t}\n\treturn o.AddOriginAP(ctx, exec, insert, related...)\n}",
"func (o *Origin) SetOriginOPA(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPackage) error {\n\tquery := \"update \\\"origin_packages\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOPA {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOPA = nil\n\t}\n\treturn o.AddOriginOPA(ctx, exec, insert, related...)\n}",
"func (o *GetRecipeInformation200ResponseExtendedIngredientsInner) SetOriginal(v string) {\n\to.Original = v\n}",
"func (o *Origin) AddOriginAPG(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AuditPackageGroup) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"audit_package_group\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, auditPackageGroupPrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginAPG: related,\n\t\t}\n\t} else {\n\t\to.R.OriginAPG = append(o.R.OriginAPG, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &auditPackageGroupR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func (o *Source) SetParentG(insert bool, related *Source) error {\n\treturn o.SetParent(boil.GetDB(), insert, related)\n}",
"func (o *AssetRevision) OrigByFk(exec boil.Executor, mods ...qm.QueryMod) assetQuery {\n\tqueryMods := []qm.QueryMod{\n\t\tqm.Where(\"id=?\", o.Orig),\n\t}\n\n\tqueryMods = append(queryMods, mods...)\n\n\tquery := Assets(exec, queryMods...)\n\tqueries.SetFrom(query.Query, \"\\\"asset\\\"\")\n\n\treturn query\n}",
"func (o *Author) SetSourcesGP(insert bool, related ...*Source) {\n\tif err := o.SetSources(boil.GetDB(), insert, related...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Rental) SetInventoryGP(insert bool, related *Inventory) {\n\tif err := o.SetInventory(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Source) SetParentSourcesGP(insert bool, related ...*Source) {\n\tif err := o.SetParentSources(boil.GetDB(), insert, related...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) SetAssetP(exec boil.Executor, insert bool, related *Asset) {\n\tif err := o.SetAsset(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (m NoSides) SetOrigOrdModTime(v time.Time) {\n\tm.Set(field.NewOrigOrdModTime(v))\n}",
"func (o *AssetRevision) UpdateGP(whitelist ...string) {\n\tif err := o.Update(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func FindAssetRevisionGP(orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(boil.GetDB(), orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (o *Origin) SetOriginOPR(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginProject) error {\n\tquery := \"update \\\"origin_projects\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOPR {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOPR = nil\n\t}\n\treturn o.AddOriginOPR(ctx, exec, insert, related...)\n}",
"func (o *Rental) SetCustomerGP(insert bool, related *Customer) {\n\tif err := o.SetCustomer(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func WithOriginalSrc(parent context.Context, src string) context.Context {\n\treturn context.WithValue(parent, originalSrcCtxKey, src)\n}",
"func (o *Origin) AddOriginOPA(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPackage) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"origin_packages\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, originPackagePrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginOPA: related,\n\t\t}\n\t} else {\n\t\to.R.OriginOPA = append(o.R.OriginOPA, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &originPackageR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func (ns *Namespace) SetOriginalObject(obj *unstructured.Unstructured) {\n\tgvk := obj.GroupVersionKind()\n\tname := obj.GetName()\n\t_, ok := ns.originalObjects[gvk]\n\tif !ok {\n\t\tns.originalObjects[gvk] = map[string]*unstructured.Unstructured{}\n\t}\n\tns.originalObjects[gvk][name] = obj\n}",
"func (o *Origin) SetOriginOC(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginChannel) error {\n\tquery := \"update \\\"origin_channels\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOC {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOC = nil\n\t}\n\treturn o.AddOriginOC(ctx, exec, insert, related...)\n}",
"func (o *Source) SetParent(exec boil.Executor, insert bool, related *Source) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"sources\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"parent_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, sourcePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.ParentID.Int64 = related.ID\n\to.ParentID.Valid = true\n\n\tif o.R == nil {\n\t\to.R = &sourceR{\n\t\t\tParent: related,\n\t\t}\n\t} else {\n\t\to.R.Parent = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &sourceR{\n\t\t\tParentSources: SourceSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.ParentSources = append(related.R.ParentSources, o)\n\t}\n\n\treturn nil\n}",
"func (o *Source) SetParent(exec boil.Executor, insert bool, related *Source) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"sources\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"parent_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, sourcePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\tqueries.Assign(&o.ParentID, related.ID)\n\tif o.R == nil {\n\t\to.R = &sourceR{\n\t\t\tParent: related,\n\t\t}\n\t} else {\n\t\to.R.Parent = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &sourceR{\n\t\t\tParentSources: SourceSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.ParentSources = append(related.R.ParentSources, o)\n\t}\n\n\treturn nil\n}",
"func AddRelatedPropertyGeneratorsForOriginGroupOverrideActionParameters_ARM(gens map[string]gopter.Gen) {\n\tgens[\"OriginGroup\"] = gen.PtrOf(ResourceReference_ARMGenerator())\n}",
"func (m CrossOrderCancelReplaceRequest) SetOrigCrossID(v string) {\n\tm.Set(field.NewOrigCrossID(v))\n}",
"func (o *Transaction) SetProductGP(insert bool, related *Product) {\n\tif err := o.SetProduct(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *BraceletPhoto) SetBraceletGP(insert bool, related *BraceletBracelet) {\n\tif err := o.SetBracelet(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Origin) AddOriginOPR(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginProject) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"origin_projects\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, originProjectPrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginOPR: related,\n\t\t}\n\t} else {\n\t\to.R.OriginOPR = append(o.R.OriginOPR, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &originProjectR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func AddRelatedPropertyGeneratorsForOriginGroupOverrideAction_ARM(gens map[string]gopter.Gen) {\n\tgens[\"Parameters\"] = gen.PtrOf(OriginGroupOverrideActionParameters_ARMGenerator())\n}",
"func (o *Address) SetCityGP(insert bool, related *City) {\n\tif err := o.SetCity(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Source) SetParentSourcesG(insert bool, related ...*Source) error {\n\treturn o.SetParentSources(boil.GetDB(), insert, related...)\n}",
"func (o *Source) SetTypeGP(insert bool, related *SourceType) {\n\tif err := o.SetType(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func AddRelatedPropertyGeneratorsForOriginGroupOverrideActionParameters(gens map[string]gopter.Gen) {\n\tgens[\"OriginGroup\"] = gen.PtrOf(ResourceReferenceGenerator())\n}",
"func (o *Origin) AddOriginAP(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AuditPackage) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"audit_package\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, auditPackagePrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginAP: related,\n\t\t}\n\t} else {\n\t\to.R.OriginAP = append(o.R.OriginAP, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &auditPackageR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func (c *client) EditDeclareCapture(index int64, frontend string, data *models.Capture, transactionID string, version int64) error {\n\tif c.UseModelsValidation {\n\t\tvalidationErr := data.Validate(strfmt.Default)\n\t\tif validationErr != nil {\n\t\t\treturn NewConfError(ErrValidationError, validationErr.Error())\n\t\t}\n\t}\n\tp, t, err := c.loadDataForChange(transactionID, version)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif _, err := p.GetOne(\"frontend\", frontend, \"declare capture\", int(index)); err != nil {\n\t\treturn c.HandleError(strconv.FormatInt(index, 10), \"frontend\", frontend, t, transactionID == \"\", err)\n\t}\n\treturn c.SaveData(p, t, transactionID == \"\")\n}",
"func (o *FeatureCvtermDbxref) UpdateGP(whitelist ...string) {\n\tif err := o.Update(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AuthUser) SetUserDjangoCommentsGP(insert bool, related ...*DjangoComment) {\n\tif err := o.SetUserDjangoComments(boil.GetDB(), insert, related...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Origin) SetOriginOI(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginInvitation) error {\n\tquery := \"update \\\"origin_invitations\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOI {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOI = nil\n\t}\n\treturn o.AddOriginOI(ctx, exec, insert, related...)\n}",
"func (o *Origin) SetOriginOPREK(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPrivateEncryptionKey) error {\n\tquery := \"update \\\"origin_private_encryption_keys\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOPREK {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOPREK = nil\n\t}\n\treturn o.AddOriginOPREK(ctx, exec, insert, related...)\n}",
"func (o *Stock) SetProductGP(insert bool, related *Product) {\n\tif err := o.SetProduct(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Source) SetAuthorsGP(insert bool, related ...*Author) {\n\tif err := o.SetAuthors(boil.GetDB(), insert, related...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Transaction) SetProductG(insert bool, related *Product) error {\n\treturn o.SetProduct(boil.GetDB(), insert, related)\n}",
"func AddRelatedPropertyGeneratorsForOriginGroupOverride_ARM(gens map[string]gopter.Gen) {\n\tgens[\"OriginGroup\"] = gen.PtrOf(ResourceReference_ARMGenerator())\n}",
"func AddIndependentPropertyGeneratorsForOriginGroupOverrideAction_ARM(gens map[string]gopter.Gen) {\n\tgens[\"Name\"] = gen.OneConstOf(OriginGroupOverrideAction_Name_OriginGroupOverride)\n}",
"func AddRelatedPropertyGeneratorsForOriginGroupOverrideAction(gens map[string]gopter.Gen) {\n\tgens[\"Parameters\"] = gen.PtrOf(OriginGroupOverrideActionParametersGenerator())\n}",
"func (o *Source) SetContentUnitsGP(insert bool, related ...*ContentUnit) {\n\tif err := o.SetContentUnits(boil.GetDB(), insert, related...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (m NoSides) SetOrigClOrdID(v string) {\n\tm.Set(field.NewOrigClOrdID(v))\n}",
"func (ns *Namespace) GetOriginalObject(gvk schema.GroupVersionKind, nm string) *unstructured.Unstructured {\n\treturn ns.originalObjects[gvk][nm]\n}",
"func (originL) LoadOriginAPG(ctx context.Context, e boil.ContextExecutor, singular bool, maybeOrigin interface{}, mods queries.Applicator) error {\n\tvar slice []*Origin\n\tvar object *Origin\n\n\tif singular {\n\t\tobject = maybeOrigin.(*Origin)\n\t} else {\n\t\tslice = *maybeOrigin.(*[]*Origin)\n\t}\n\n\targs := make([]interface{}, 0, 1)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &originR{}\n\t\t}\n\t\targs = append(args, object.Name)\n\t} else {\n\tOuter:\n\t\tfor _, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &originR{}\n\t\t\t}\n\n\t\t\tfor _, a := range args {\n\t\t\t\tif queries.Equal(a, obj.Name) {\n\t\t\t\t\tcontinue Outer\n\t\t\t\t}\n\t\t\t}\n\n\t\t\targs = append(args, obj.Name)\n\t\t}\n\t}\n\n\tif len(args) == 0 {\n\t\treturn nil\n\t}\n\n\tquery := NewQuery(qm.From(`audit_package_group`), qm.WhereIn(`origin in ?`, args...))\n\tif mods != nil {\n\t\tmods.Apply(query)\n\t}\n\n\tresults, err := query.QueryContext(ctx, e)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load audit_package_group\")\n\t}\n\n\tvar resultSlice []*AuditPackageGroup\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice audit_package_group\")\n\t}\n\n\tif err = results.Close(); err != nil {\n\t\treturn errors.Wrap(err, \"failed to close results in eager load on audit_package_group\")\n\t}\n\tif err = results.Err(); err != nil {\n\t\treturn errors.Wrap(err, \"error occurred during iteration of eager loaded relations for audit_package_group\")\n\t}\n\n\tif len(auditPackageGroupAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(ctx, e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif singular {\n\t\tobject.R.OriginAPG = resultSlice\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif foreign.R == nil {\n\t\t\t\tforeign.R = &auditPackageGroupR{}\n\t\t\t}\n\t\t\tforeign.R.OriginName = object\n\t\t}\n\t\treturn nil\n\t}\n\n\tfor _, foreign := range resultSlice {\n\t\tfor _, local := range slice {\n\t\t\tif queries.Equal(local.Name, foreign.Origin) {\n\t\t\t\tlocal.R.OriginAPG = append(local.R.OriginAPG, foreign)\n\t\t\t\tif foreign.R == nil {\n\t\t\t\t\tforeign.R = &auditPackageGroupR{}\n\t\t\t\t}\n\t\t\t\tforeign.R.OriginName = local\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func AddRelatedPropertyGeneratorsForOriginGroupOverride(gens map[string]gopter.Gen) {\n\tgens[\"OriginGroup\"] = gen.PtrOf(ResourceReferenceGenerator())\n}",
"func (o *AssetRevision) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func (o *Origin) SetOriginOPK(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPublicKey) error {\n\tquery := \"update \\\"origin_public_keys\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOPK {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOPK = nil\n\t}\n\treturn o.AddOriginOPK(ctx, exec, insert, related...)\n}",
"func compressOrig(v ID, ancestor, semi, label []ID) {\n\tif ancestor[ancestor[v]] != 0 {\n\t\tcompressOrig(ancestor[v], ancestor, semi, label)\n\t\tif semi[label[ancestor[v]]] < semi[label[v]] {\n\t\t\tlabel[v] = label[ancestor[v]]\n\t\t}\n\t\tancestor[v] = ancestor[ancestor[v]]\n\t}\n}",
"func (o *Vote) SetOptionGP(insert bool, related *Option) {\n\tif err := o.SetOption(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (r *AssetRendering) Original() {\n\tv := \"original\"\n\tr.Value = &v\n}",
"func (o *Origin) SetOriginOPUEK(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPublicEncryptionKey) error {\n\tquery := \"update \\\"origin_public_encryption_keys\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOPUEK {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOPUEK = nil\n\t}\n\treturn o.AddOriginOPUEK(ctx, exec, insert, related...)\n}",
"func (o *FeatureCvtermDbxref) ReloadGP() {\n\tif err := o.ReloadG(); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *ItemSide) SetItemG(ctx context.Context, insert bool, related *Item) error {\n\treturn o.SetItem(ctx, boil.GetContextDB(), insert, related)\n}",
"func (o *Origin) AddOriginOC(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginChannel) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"origin_channels\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, originChannelPrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginOC: related,\n\t\t}\n\t} else {\n\t\to.R.OriginOC = append(o.R.OriginOC, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &originChannelR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func (o *Author) SetSourcesG(insert bool, related ...*Source) error {\n\treturn o.SetSources(boil.GetDB(), insert, related...)\n}",
"func (o *Author) ReloadGP() {\n\tif err := o.ReloadG(); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Stock) SetProductG(insert bool, related *Product) error {\n\treturn o.SetProduct(boil.GetDB(), insert, related)\n}",
"func NewOrigClOrdID(val string) OrigClOrdIDField {\n\treturn OrigClOrdIDField{quickfix.FIXString(val)}\n}",
"func (o *Origin) RemoveOriginAPG(ctx context.Context, exec boil.ContextExecutor, related ...*AuditPackageGroup) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\tif rel.R != nil {\n\t\t\trel.R.OriginName = nil\n\t\t}\n\t\tif _, err = rel.Update(ctx, exec, boil.Whitelist(\"origin\")); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif o.R == nil {\n\t\treturn nil\n\t}\n\n\tfor _, rel := range related {\n\t\tfor i, ri := range o.R.OriginAPG {\n\t\t\tif rel != ri {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tln := len(o.R.OriginAPG)\n\t\t\tif ln > 1 && i < ln-1 {\n\t\t\t\to.R.OriginAPG[i] = o.R.OriginAPG[ln-1]\n\t\t\t}\n\t\t\to.R.OriginAPG = o.R.OriginAPG[:ln-1]\n\t\t\tbreak\n\t\t}\n\t}\n\n\treturn nil\n}",
"func NewOrigSendingTimeWithPrecision(val time.Time, precision quickfix.TimestampPrecision) OrigSendingTimeField {\n\treturn OrigSendingTimeField{quickfix.FIXUTCTimestamp{Time: val, Precision: precision}}\n}",
"func (f OrigClOrdIDField) Tag() quickfix.Tag { return tag.OrigClOrdID }",
"func (o *Jet) SetPilotGP(insert bool, related *Pilot) {\n\tif err := o.SetPilot(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *StockCvterm) SetStockCvtermprop(exec boil.Executor, insert bool, related *StockCvtermprop) error {\n\tvar err error\n\n\tif insert {\n\t\trelated.StockCvtermID = o.StockCvtermID\n\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t} else {\n\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\"UPDATE \\\"stock_cvtermprop\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"stock_cvterm_id\"}),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, stockCvtermpropPrimaryKeyColumns),\n\t\t)\n\t\tvalues := []interface{}{o.StockCvtermID, related.StockCvtermpropID}\n\n\t\tif boil.DebugMode {\n\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t}\n\n\t\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t}\n\n\t\trelated.StockCvtermID = o.StockCvtermID\n\n\t}\n\n\tif o.R == nil {\n\t\to.R = &stockCvtermR{\n\t\t\tStockCvtermprop: related,\n\t\t}\n\t} else {\n\t\to.R.StockCvtermprop = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &stockCvtermpropR{\n\t\t\tStockCvterm: o,\n\t\t}\n\t} else {\n\t\trelated.R.StockCvterm = o\n\t}\n\treturn nil\n}",
"func (o *Origin) AddOriginOPREK(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPrivateEncryptionKey) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"origin_private_encryption_keys\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, originPrivateEncryptionKeyPrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginOPREK: related,\n\t\t}\n\t} else {\n\t\to.R.OriginOPREK = append(o.R.OriginOPREK, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &originPrivateEncryptionKeyR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func (o *Item) SetItemOptionG(ctx context.Context, insert bool, related *ItemOption) error {\n\treturn o.SetItemOption(ctx, boil.GetContextDB(), insert, related)\n}",
"func (o *Author) UpdateGP(whitelist ...string) {\n\tif err := o.Update(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *BraceletPhoto) SetPhotoBraceletBraceletsGP(insert bool, related ...*BraceletBracelet) {\n\tif err := o.SetPhotoBraceletBracelets(boil.GetDB(), insert, related...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func NewOrigTimeWithPrecision(val time.Time, precision quickfix.TimestampPrecision) OrigTimeField {\n\treturn OrigTimeField{quickfix.FIXUTCTimestamp{Time: val, Precision: precision}}\n}",
"func (o *Transaction) ReloadGP() {\n\tif err := o.ReloadG(); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Transaction) ReloadGP() {\n\tif err := o.ReloadG(); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Origin) SetOriginOM(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginMember) error {\n\tquery := \"update \\\"origin_members\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOM {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOM = nil\n\t}\n\treturn o.AddOriginOM(ctx, exec, insert, related...)\n}",
"func (o *FeatureRelationship) SetObject(exec boil.Executor, insert bool, related *Feature) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"feature_relationship\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"object_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, featureRelationshipPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.FeatureID, o.FeatureRelationshipID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.ObjectID = related.FeatureID\n\n\tif o.R == nil {\n\t\to.R = &featureRelationshipR{\n\t\t\tObject: related,\n\t\t}\n\t} else {\n\t\to.R.Object = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &featureR{\n\t\t\tObjectFeatureRelationship: o,\n\t\t}\n\t} else {\n\t\trelated.R.ObjectFeatureRelationship = o\n\t}\n\n\treturn nil\n}",
"func FindAssetRevisionG(orig int, selectCols ...string) (*AssetRevision, error) {\n\treturn FindAssetRevision(boil.GetDB(), orig, selectCols...)\n}",
"func (o *Origin) AddOriginOPK(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPublicKey) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"origin_public_keys\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, originPublicKeyPrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginOPK: related,\n\t\t}\n\t} else {\n\t\to.R.OriginOPK = append(o.R.OriginOPK, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &originPublicKeyR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func (o *AssetRevision) UpsertGP(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) {\n\tif err := o.Upsert(boil.GetDB(), updateOnConflict, conflictColumns, updateColumns, whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *BraceletPhoto) UpdateGP(whitelist ...string) {\n\tif err := o.Update(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *TransactionSplit) SetOriginalSourceNil() {\n\to.OriginalSource.Set(nil)\n}",
"func (o *Source) UpdateGP(whitelist ...string) {\n\tif err := o.Update(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *BraceletPhoto) SetUserGP(insert bool, related *AuthUser) {\n\tif err := o.SetUser(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *TransactionSplit) SetOriginalSource(v string) {\n\to.OriginalSource.Set(&v)\n}",
"func (o *Rental) SetPaymentsGP(insert bool, related ...*Payment) {\n\tif err := o.SetPayments(boil.GetDB(), insert, related...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (instance *AutoChartInstance) SetObjectAndEvents(sessionState *State, actionState *action.State, obj *enigmahandlers.Object, genObj *enigma.GenericObject) {\n\tinstance.handleAutoChart(sessionState, actionState, obj, genObj)\n}",
"func (o *RecipeAdditive) SetRecipe(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Recipe) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"recipe_additive\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"recipe_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, recipeAdditivePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.IsDebug(ctx) {\n\t\twriter := boil.DebugWriterFrom(ctx)\n\t\tfmt.Fprintln(writer, updateQuery)\n\t\tfmt.Fprintln(writer, values)\n\t}\n\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.RecipeID = related.ID\n\tif o.R == nil {\n\t\to.R = &recipeAdditiveR{\n\t\t\tRecipe: related,\n\t\t}\n\t} else {\n\t\to.R.Recipe = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &recipeR{\n\t\t\tRecipeAdditives: RecipeAdditiveSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.RecipeAdditives = append(related.R.RecipeAdditives, o)\n\t}\n\n\treturn nil\n}",
"func (o *Source) ReloadGP() {\n\tif err := o.ReloadG(); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func CloneRefOfOrder(n *Order) *Order {\n\tif n == nil {\n\t\treturn nil\n\t}\n\tout := *n\n\tout.Expr = CloneExpr(n.Expr)\n\treturn &out\n}"
] |
[
"0.7313478",
"0.7214364",
"0.6877666",
"0.6113208",
"0.5748422",
"0.56831384",
"0.547316",
"0.5367268",
"0.5362653",
"0.528801",
"0.49337682",
"0.4916368",
"0.4889562",
"0.487854",
"0.48500156",
"0.4834615",
"0.48122823",
"0.47868603",
"0.47794747",
"0.47762796",
"0.47560602",
"0.4750671",
"0.47462827",
"0.46687135",
"0.46503234",
"0.46176732",
"0.45885652",
"0.45521408",
"0.4549268",
"0.4537116",
"0.45340532",
"0.44549465",
"0.44452924",
"0.44342467",
"0.44318435",
"0.44218624",
"0.44216982",
"0.44213924",
"0.440179",
"0.43800187",
"0.43792033",
"0.43636003",
"0.43545458",
"0.4351296",
"0.4351202",
"0.43417558",
"0.4322591",
"0.43161404",
"0.4309972",
"0.42926502",
"0.42623127",
"0.42613307",
"0.4251544",
"0.42415494",
"0.42396343",
"0.42302468",
"0.41986546",
"0.41981697",
"0.41963905",
"0.41835505",
"0.4182041",
"0.41800612",
"0.41795784",
"0.4178449",
"0.4176978",
"0.416911",
"0.41685006",
"0.41656286",
"0.41595766",
"0.41441566",
"0.41347602",
"0.41237777",
"0.41155088",
"0.41141593",
"0.41096845",
"0.40970856",
"0.4090386",
"0.40854955",
"0.4079249",
"0.40764615",
"0.4068675",
"0.40637442",
"0.40599388",
"0.40459177",
"0.40459177",
"0.40457928",
"0.40409404",
"0.40389296",
"0.40148708",
"0.40094763",
"0.4009016",
"0.40025035",
"0.40020666",
"0.39995044",
"0.3988467",
"0.39834246",
"0.39752197",
"0.39676857",
"0.39633328",
"0.3945655"
] |
0.8023475
|
0
|
SetOrig of the asset_revision to the related item. Sets o.R.Orig to related. Adds o to related.R.OrigAssetRevision.
|
func (o *AssetRevision) SetOrig(exec boil.Executor, insert bool, related *Asset) error {
var err error
if insert {
if err = related.Insert(exec); err != nil {
return errors.Wrap(err, "failed to insert into foreign table")
}
}
updateQuery := fmt.Sprintf(
"UPDATE \"asset_revision\" SET %s WHERE %s",
strmangle.SetParamNames("\"", "\"", 1, []string{"orig"}),
strmangle.WhereClause("\"", "\"", 2, assetRevisionPrimaryKeyColumns),
)
values := []interface{}{related.ID, o.Orig}
if boil.DebugMode {
fmt.Fprintln(boil.DebugWriter, updateQuery)
fmt.Fprintln(boil.DebugWriter, values)
}
if _, err = exec.Exec(updateQuery, values...); err != nil {
return errors.Wrap(err, "failed to update local table")
}
o.Orig = related.ID
if o.R == nil {
o.R = &assetRevisionR{
Orig: related,
}
} else {
o.R.Orig = related
}
if related.R == nil {
related.R = &assetR{
OrigAssetRevision: o,
}
} else {
related.R.OrigAssetRevision = o
}
return nil
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (o *AssetRevision) SetOrigP(exec boil.Executor, insert bool, related *Asset) {\n\tif err := o.SetOrig(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) SetOrigGP(insert bool, related *Asset) {\n\tif err := o.SetOrig(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) SetOrigG(insert bool, related *Asset) error {\n\treturn o.SetOrig(boil.GetDB(), insert, related)\n}",
"func (assetRevisionL) LoadOrig(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Orig\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Orig\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Orig = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Orig == foreign.ID {\n\t\t\t\tlocal.R.Orig = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *AssetRevision) SetAsset(exec boil.Executor, insert bool, related *Asset) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"asset_revision\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"asset\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, assetRevisionPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.Orig}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.Asset = related.ID\n\n\tif o.R == nil {\n\t\to.R = &assetRevisionR{\n\t\t\tAsset: related,\n\t\t}\n\t} else {\n\t\to.R.Asset = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &assetR{\n\t\t\tAssetRevisions: AssetRevisionSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.AssetRevisions = append(related.R.AssetRevisions, o)\n\t}\n\n\treturn nil\n}",
"func (o *GetRecipeInformation200ResponseExtendedIngredientsInner) SetOriginal(v string) {\n\to.Original = v\n}",
"func (o *AssetRevision) OrigByFk(exec boil.Executor, mods ...qm.QueryMod) assetQuery {\n\tqueryMods := []qm.QueryMod{\n\t\tqm.Where(\"id=?\", o.Orig),\n\t}\n\n\tqueryMods = append(queryMods, mods...)\n\n\tquery := Assets(exec, queryMods...)\n\tqueries.SetFrom(query.Query, \"\\\"asset\\\"\")\n\n\treturn query\n}",
"func (m NoSides) SetOrigOrdModTime(v time.Time) {\n\tm.Set(field.NewOrigOrdModTime(v))\n}",
"func (m CrossOrderCancelReplaceRequest) SetOrigCrossID(v string) {\n\tm.Set(field.NewOrigCrossID(v))\n}",
"func (o *Origin) SetOriginOPA(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPackage) error {\n\tquery := \"update \\\"origin_packages\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOPA {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOPA = nil\n\t}\n\treturn o.AddOriginOPA(ctx, exec, insert, related...)\n}",
"func (r *AssetRendering) Original() {\n\tv := \"original\"\n\tr.Value = &v\n}",
"func (o *AssetRevision) OrigG(mods ...qm.QueryMod) assetQuery {\n\treturn o.OrigByFk(boil.GetDB(), mods...)\n}",
"func (o *AssetRevision) SetAssetP(exec boil.Executor, insert bool, related *Asset) {\n\tif err := o.SetAsset(exec, insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Origin) SetOriginAP(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AuditPackage) error {\n\tquery := \"update \\\"audit_package\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginAP {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginAP = nil\n\t}\n\treturn o.AddOriginAP(ctx, exec, insert, related...)\n}",
"func (m NoSides) SetOrigClOrdID(v string) {\n\tm.Set(field.NewOrigClOrdID(v))\n}",
"func (o *PaymentStatusUpdateWebhook) SetOriginalReference(v string) {\n\to.OriginalReference.Set(&v)\n}",
"func (ns *Namespace) SetOriginalObject(obj *unstructured.Unstructured) {\n\tgvk := obj.GroupVersionKind()\n\tname := obj.GetName()\n\t_, ok := ns.originalObjects[gvk]\n\tif !ok {\n\t\tns.originalObjects[gvk] = map[string]*unstructured.Unstructured{}\n\t}\n\tns.originalObjects[gvk][name] = obj\n}",
"func (o *Origin) SetOriginOI(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginInvitation) error {\n\tquery := \"update \\\"origin_invitations\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOI {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOI = nil\n\t}\n\treturn o.AddOriginOI(ctx, exec, insert, related...)\n}",
"func (o *AssetRevision) Reload(exec boil.Executor) error {\n\tret, err := FindAssetRevision(exec, o.Orig)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*o = *ret\n\treturn nil\n}",
"func (v *Vec3i) SetMin(other Vec3i) {\n\tv.X = Min32i(v.X, other.X)\n\tv.Y = Min32i(v.Y, other.Y)\n\tv.Z = Min32i(v.Z, other.Z)\n}",
"func (o *Origin) SetOriginOC(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginChannel) error {\n\tquery := \"update \\\"origin_channels\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOC {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOC = nil\n\t}\n\treturn o.AddOriginOC(ctx, exec, insert, related...)\n}",
"func WithOriginalSrc(parent context.Context, src string) context.Context {\n\treturn context.WithValue(parent, originalSrcCtxKey, src)\n}",
"func (o *Transaction) SetOriginalDescription(v string) {\n\to.OriginalDescription.Set(&v)\n}",
"func (o *ViewMilestone) SetOriginalDueDate(v string) {\n\to.OriginalDueDate = &v\n}",
"func (o *AssetRevision) SetAssetGP(insert bool, related *Asset) {\n\tif err := o.SetAsset(boil.GetDB(), insert, related); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Origin1) SetOrigins(v []Origin3) {\n\to.Origins = v\n}",
"func (o *Origin) SetOriginAPG(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AuditPackageGroup) error {\n\tquery := \"update \\\"audit_package_group\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginAPG {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginAPG = nil\n\t}\n\treturn o.AddOriginAPG(ctx, exec, insert, related...)\n}",
"func (o *Origin) SetOriginOPR(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginProject) error {\n\tquery := \"update \\\"origin_projects\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOPR {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOPR = nil\n\t}\n\treturn o.AddOriginOPR(ctx, exec, insert, related...)\n}",
"func (o *Origin) AddOriginOPA(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPackage) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"origin_packages\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, originPackagePrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginOPA: related,\n\t\t}\n\t} else {\n\t\to.R.OriginOPA = append(o.R.OriginOPA, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &originPackageR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func (o *Origin) SetOriginOM(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginMember) error {\n\tquery := \"update \\\"origin_members\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOM {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOM = nil\n\t}\n\treturn o.AddOriginOM(ctx, exec, insert, related...)\n}",
"func (o *RecipeAdditive) SetRecipe(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Recipe) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"recipe_additive\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"recipe_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, recipeAdditivePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.IsDebug(ctx) {\n\t\twriter := boil.DebugWriterFrom(ctx)\n\t\tfmt.Fprintln(writer, updateQuery)\n\t\tfmt.Fprintln(writer, values)\n\t}\n\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.RecipeID = related.ID\n\tif o.R == nil {\n\t\to.R = &recipeAdditiveR{\n\t\t\tRecipe: related,\n\t\t}\n\t} else {\n\t\to.R.Recipe = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &recipeR{\n\t\t\tRecipeAdditives: RecipeAdditiveSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.RecipeAdditives = append(related.R.RecipeAdditives, o)\n\t}\n\n\treturn nil\n}",
"func (o *AssetRevision) SetAssetG(insert bool, related *Asset) error {\n\treturn o.SetAsset(boil.GetDB(), insert, related)\n}",
"func (o *TransactionSplit) SetOriginalSource(v string) {\n\to.OriginalSource.Set(&v)\n}",
"func (o *TransactionSplit) SetOriginalSourceNil() {\n\to.OriginalSource.Set(nil)\n}",
"func compressOrig(v ID, ancestor, semi, label []ID) {\n\tif ancestor[ancestor[v]] != 0 {\n\t\tcompressOrig(ancestor[v], ancestor, semi, label)\n\t\tif semi[label[ancestor[v]]] < semi[label[v]] {\n\t\t\tlabel[v] = label[ancestor[v]]\n\t\t}\n\t\tancestor[v] = ancestor[ancestor[v]]\n\t}\n}",
"func (assetRevisionL) LoadAsset(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Asset\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Asset\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Asset = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Asset == foreign.ID {\n\t\t\t\tlocal.R.Asset = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *BaseReportTransaction) SetOriginalDescription(v string) {\n\to.OriginalDescription.Set(&v)\n}",
"func (o *OriginCollection) SetOrigins(v []Origin3) {\n\to.Origins = v\n}",
"func (o *GetRecipeInformation200ResponseExtendedIngredientsInner) SetOriginalName(v string) {\n\to.OriginalName = v\n}",
"func (bva BaseVestingAccount) GetOriginalVesting() sdk.Coins {\n\treturn bva.OriginalVesting\n}",
"func (o *CreditBankIncomeTransaction) SetOriginalDescription(v string) {\n\to.OriginalDescription.Set(&v)\n}",
"func (o *Source) SetParent(exec boil.Executor, insert bool, related *Source) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"sources\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"parent_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, sourcePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.ParentID.Int64 = related.ID\n\to.ParentID.Valid = true\n\n\tif o.R == nil {\n\t\to.R = &sourceR{\n\t\t\tParent: related,\n\t\t}\n\t} else {\n\t\to.R.Parent = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &sourceR{\n\t\t\tParentSources: SourceSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.ParentSources = append(related.R.ParentSources, o)\n\t}\n\n\treturn nil\n}",
"func (o *Transaction) SetOriginalDescriptionNil() {\n\to.OriginalDescription.Set(nil)\n}",
"func (o *Origin) SetOriginOSK(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginSecretKey) error {\n\tquery := \"update \\\"origin_secret_keys\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOSK {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOSK = nil\n\t}\n\treturn o.AddOriginOSK(ctx, exec, insert, related...)\n}",
"func AddRelatedPropertyGeneratorsForOriginGroupOverrideAction_ARM(gens map[string]gopter.Gen) {\n\tgens[\"Parameters\"] = gen.PtrOf(OriginGroupOverrideActionParameters_ARMGenerator())\n}",
"func (t *OrderAsset) Init(stub shim.ChaincodeStubInterface) pd.Response {\n\n\tlogger.Info(\"########### ORDER_CHAINCODE Init ###########\")\n\t// Get the args from the transaction proposal\n\treturn shim.Success(nil)\n}",
"func (this *Transformable) SetOrigin(orig Vector2f) {\n\tC.sfTransformable_setOrigin(this.cptr, orig.toC())\n}",
"func (o *Source) SetParent(exec boil.Executor, insert bool, related *Source) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"sources\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"parent_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, sourcePrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\tqueries.Assign(&o.ParentID, related.ID)\n\tif o.R == nil {\n\t\to.R = &sourceR{\n\t\t\tParent: related,\n\t\t}\n\t} else {\n\t\to.R.Parent = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &sourceR{\n\t\t\tParentSources: SourceSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.ParentSources = append(related.R.ParentSources, o)\n\t}\n\n\treturn nil\n}",
"func (o *Rental) SetInventory(exec boil.Executor, insert bool, related *Inventory) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE `rental` SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, []string{\"inventory_id\"}),\n\t\tstrmangle.WhereClause(\"`\", \"`\", 0, rentalPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.InventoryID, o.RentalID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.InventoryID = related.InventoryID\n\n\tif o.R == nil {\n\t\to.R = &rentalR{\n\t\t\tInventory: related,\n\t\t}\n\t} else {\n\t\to.R.Inventory = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &inventoryR{\n\t\t\tRentals: RentalSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.Rentals = append(related.R.Rentals, o)\n\t}\n\n\treturn nil\n}",
"func (testEntityInline_EntityInfo) PutRelated(txn *objectbox.Transaction, object interface{}, id uint64) error {\n\treturn nil\n}",
"func AddRelatedPropertyGeneratorsForOriginGroupOverrideActionParameters_ARM(gens map[string]gopter.Gen) {\n\tgens[\"OriginGroup\"] = gen.PtrOf(ResourceReference_ARMGenerator())\n}",
"func AddIndependentPropertyGeneratorsForOriginGroupOverrideAction_ARM(gens map[string]gopter.Gen) {\n\tgens[\"Name\"] = gen.OneConstOf(OriginGroupOverrideAction_Name_OriginGroupOverride)\n}",
"func (instance *AutoChartInstance) SetObjectAndEvents(sessionState *State, actionState *action.State, obj *enigmahandlers.Object, genObj *enigma.GenericObject) {\n\tinstance.handleAutoChart(sessionState, actionState, obj, genObj)\n}",
"func NewOrigClOrdID(val string) OrigClOrdIDField {\n\treturn OrigClOrdIDField{quickfix.FIXString(val)}\n}",
"func evalOrig(v ID, ancestor, semi, label []ID) ID {\n\tif ancestor[v] == 0 {\n\t\treturn v\n\t}\n\tcompressOrig(v, ancestor, semi, label)\n\treturn label[v]\n}",
"func (reading_EntityInfo) PutRelated(ob *objectbox.ObjectBox, object interface{}, id uint64) error {\n\treturn nil\n}",
"func (o *AssetRevision) Delete(exec boil.Executor) error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision provided for delete\")\n\t}\n\n\tif err := o.doBeforeDeleteHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\targs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), assetRevisionPrimaryKeyMapping)\n\tquery := \"DELETE FROM \\\"asset_revision\\\" WHERE \\\"orig\\\"=$1\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, args...)\n\t}\n\n\t_, err := exec.Exec(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to delete from asset_revision\")\n\t}\n\n\tif err := o.doAfterDeleteHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}",
"func (s *ListApprovedOriginsOutput) SetOrigins(v []*string) *ListApprovedOriginsOutput {\n\ts.Origins = v\n\treturn s\n}",
"func (o *Origin) SetOriginOPREK(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPrivateEncryptionKey) error {\n\tquery := \"update \\\"origin_private_encryption_keys\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOPREK {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOPREK = nil\n\t}\n\treturn o.AddOriginOPREK(ctx, exec, insert, related...)\n}",
"func (o BucketCorsItemOutput) Origin() pulumi.StringArrayOutput {\n\treturn o.ApplyT(func(v BucketCorsItem) []string { return v.Origin }).(pulumi.StringArrayOutput)\n}",
"func (s *SmartContract) TransferAsset(ctx contractapi.TransactionContextInterface, id string, newOwner string) error {\n\n\tasset, err := s.ReadAsset(ctx, id)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tclientID, err := s.GetSubmittingClientIdentity(ctx)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif clientID != asset.Owner {\n\t\treturn fmt.Errorf(\"submitting client not authorized to update asset, does not own asset\")\n\t}\n\n\tasset.Owner = newOwner\n\tassetJSON, err := json.Marshal(asset)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn ctx.GetStub().PutState(id, assetJSON)\n}",
"func (testEntityRelated_EntityInfo) PutRelated(txn *objectbox.Transaction, object interface{}, id uint64) error {\n\tif rel := object.(*TestEntityRelated).Next; rel != nil {\n\t\trId, err := EntityByValueBinding.GetId(rel)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t} else if rId == 0 {\n\t\t\tif err := txn.RunWithCursor(EntityByValueBinding.Id, func(targetCursor *objectbox.Cursor) error {\n\t\t\t\t_, err := targetCursor.Put(rel) // NOTE Put/PutAsync() has a side-effect of setting the rel.ID\n\t\t\t\treturn err\n\t\t\t}); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif err := txn.RunWithCursor(TestEntityRelatedBinding.Id, func(cursor *objectbox.Cursor) error {\n\t\treturn cursor.RelationReplace(6, EntityByValueBinding.Id, id, object, object.(*TestEntityRelated).NextSlice)\n\t}); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func (t *Transaction) SetResource(r rsrc.Resource) {\n\tt.res = r.Clone()\n}",
"func FindAssetRevision(exec boil.Executor, orig int, selectCols ...string) (*AssetRevision, error) {\n\tassetRevisionObj := &AssetRevision{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"asset_revision\\\" where \\\"orig\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, orig)\n\n\terr := q.Bind(assetRevisionObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"public: unable to select from asset_revision\")\n\t}\n\n\treturn assetRevisionObj, nil\n}",
"func (o *OutputState) ApplyAsset(applier interface{}) AssetOutput {\n\treturn o.ApplyT(applier).(AssetOutput)\n}",
"func (o *Origin) AddOriginOC(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginChannel) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"origin_channels\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, originChannelPrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginOC: related,\n\t\t}\n\t} else {\n\t\to.R.OriginOC = append(o.R.OriginOC, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &originChannelR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func (o *GetRecipeInformation200ResponseExtendedIngredientsInner) GetOriginal() string {\n\tif o == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\n\treturn o.Original\n}",
"func (o *Origin) AddOriginOM(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginMember) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"origin_members\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, originMemberPrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginOM: related,\n\t\t}\n\t} else {\n\t\to.R.OriginOM = append(o.R.OriginOM, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &originMemberR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func (ns *Namespace) GetOriginalObject(gvk schema.GroupVersionKind, nm string) *unstructured.Unstructured {\n\treturn ns.originalObjects[gvk][nm]\n}",
"func (o *Transaction) UnsetOriginalDescription() {\n\to.OriginalDescription.Unset()\n}",
"func (a *versionedValue) Undo() (r *versionedValue) {\n\tif a != nil {\n\t\tswitch {\n\t\tcase a.versionedValue != nil:\n\t\t\tr = a.versionedValue\n\t\tcase a.version == 0:\n\t\t\tr = a\n\t\t}\n\t}\n\treturn\n}",
"func (o *Transfer) SetOriginationAccountId(v string) {\n\to.OriginationAccountId = v\n}",
"func (r *Release) UploadAsset(path string) error {\n\tfile, err := os.OpenFile(path, os.O_RDONLY, 0755)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer file.Close()\n\tasset, _, err := r.client.Repositories.UploadReleaseAsset(context.Background(), r.owner, r.repository, r.ID, &gogithub.UploadOptions{\n\t\tName: filepath.Base(file.Name()),\n\t}, file)\n\tif err != nil {\n\t\treturn err\n\t}\n\tlog.Println(\"uploaded asset \", *asset.Name)\n\treturn nil\n}",
"func setObjectRevision(obj client.Object, revision int64) {\n\ta := obj.GetAnnotations()\n\tif a == nil {\n\t\ta = map[string]string{}\n\t}\n\ta[revisionAnnotation] = fmt.Sprintf(\"%d\", revision)\n\tobj.SetAnnotations(a)\n}",
"func (dal *DalNavElement) Edit(ctx context.Context, tx *sql.Tx,\n\trec *coremodel.NavElement,\n) error {\n\tnow := time.Now()\n\trecord := goqu.Record{\n\t\tCoreNavElement.NaeName: rec.Name,\n\t\tCoreNavElement.NaeDescription: rec.Description,\n\t\tCoreNavElement.NaeIcon: rec.Icon,\n\t\tCoreNavElement.NaeOrder: rec.Order,\n\t\tCoreNavElement.NaeURL: rec.URL,\n\t\tCoreNavElement.NaeParentID: ZeroString(rec.ParentID),\n\t\tCoreNavElement.NaeUpdatedAt: now,\n\t\tCoreNavElement.NaeStatus: rec.Status,\n\t}\n\n\tquery := NewUpdate(T.CoreNavElement).\n\t\tSet(record).\n\t\tWhere(\n\t\t\tgoqu.C(CoreNavElement.NaeID).Eq(rec.ID),\n\n\t\t\tgoqu.C(CoreNavElement.NaeUpdatedAt).Eq(rec.UpdatedAt),\n\t\t)\n\tres, err := DoUpdate(ctx, tx, query)\n\tif err != nil {\n\t\tDebugErr(ctx, err)\n\t\treturn err\n\t}\n\trec.UpdatedAt = now\n\treturn CheckOneRowUpdated(ctx, T.CoreNavElement, res)\n}",
"func (f OrigClOrdIDField) Tag() quickfix.Tag { return tag.OrigClOrdID }",
"func (g *GitHub) SetAsset(name string) {\n\tg.releaseAsset = name\n}",
"func (o *CreditBankIncomeTransaction) SetOriginalDescriptionNil() {\n\to.OriginalDescription.Set(nil)\n}",
"func AddRelatedPropertyGeneratorsForOriginGroupOverrideActionParameters(gens map[string]gopter.Gen) {\n\tgens[\"OriginGroup\"] = gen.PtrOf(ResourceReferenceGenerator())\n}",
"func (o *Origin) AddOriginOI(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginInvitation) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"origin_invitations\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, originInvitationPrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginOI: related,\n\t\t}\n\t} else {\n\t\to.R.OriginOI = append(o.R.OriginOI, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &originInvitationR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func (o *Origin) SetOriginOPK(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPublicKey) error {\n\tquery := \"update \\\"origin_public_keys\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOPK {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOPK = nil\n\t}\n\treturn o.AddOriginOPK(ctx, exec, insert, related...)\n}",
"func (o *Origin) AddOriginOPR(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginProject) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"origin_projects\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, originProjectPrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginOPR: related,\n\t\t}\n\t} else {\n\t\to.R.OriginOPR = append(o.R.OriginOPR, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &originProjectR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func (o *Origin) RemoveOriginOPA(ctx context.Context, exec boil.ContextExecutor, related ...*OriginPackage) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\tif rel.R != nil {\n\t\t\trel.R.OriginName = nil\n\t\t}\n\t\tif _, err = rel.Update(ctx, exec, boil.Whitelist(\"origin\")); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif o.R == nil {\n\t\treturn nil\n\t}\n\n\tfor _, rel := range related {\n\t\tfor i, ri := range o.R.OriginOPA {\n\t\t\tif rel != ri {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tln := len(o.R.OriginOPA)\n\t\t\tif ln > 1 && i < ln-1 {\n\t\t\t\to.R.OriginOPA[i] = o.R.OriginOPA[ln-1]\n\t\t\t}\n\t\t\to.R.OriginOPA = o.R.OriginOPA[:ln-1]\n\t\t\tbreak\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Origin) AddOriginAP(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AuditPackage) error {\n\tvar err error\n\tfor _, rel := range related {\n\t\tif insert {\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t\tif err = rel.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t\t}\n\t\t} else {\n\t\t\tupdateQuery := fmt.Sprintf(\n\t\t\t\t\"UPDATE \\\"audit_package\\\" SET %s WHERE %s\",\n\t\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, []string{\"origin\"}),\n\t\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 2, auditPackagePrimaryKeyColumns),\n\t\t\t)\n\t\t\tvalues := []interface{}{o.Name, rel.ID}\n\n\t\t\tif boil.DebugMode {\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\t\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t\t\t}\n\n\t\t\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"failed to update foreign table\")\n\t\t\t}\n\n\t\t\tqueries.Assign(&rel.Origin, o.Name)\n\t\t}\n\t}\n\n\tif o.R == nil {\n\t\to.R = &originR{\n\t\t\tOriginAP: related,\n\t\t}\n\t} else {\n\t\to.R.OriginAP = append(o.R.OriginAP, related...)\n\t}\n\n\tfor _, rel := range related {\n\t\tif rel.R == nil {\n\t\t\trel.R = &auditPackageR{\n\t\t\t\tOriginName: o,\n\t\t\t}\n\t\t} else {\n\t\t\trel.R.OriginName = o\n\t\t}\n\t}\n\treturn nil\n}",
"func (m *Asset) UnmarshalJSON(raw []byte) error {\n\t// AO0\n\tvar aO0 Resource\n\tif err := swag.ReadJSON(raw, &aO0); err != nil {\n\t\treturn err\n\t}\n\tm.Resource = aO0\n\n\t// AO1\n\tvar dataAO1 struct {\n\t\tBinaryRepository *BinaryRepository `json:\"binaryRepository,omitempty\"`\n\n\t\tPipeline *Pipeline `json:\"pipeline,omitempty\"`\n\n\t\tSourceRepository *SourceRepository `json:\"sourceRepository,omitempty\"`\n\t}\n\tif err := swag.ReadJSON(raw, &dataAO1); err != nil {\n\t\treturn err\n\t}\n\n\tm.BinaryRepository = dataAO1.BinaryRepository\n\n\tm.Pipeline = dataAO1.Pipeline\n\n\tm.SourceRepository = dataAO1.SourceRepository\n\n\treturn nil\n}",
"func (testStringIdEntity_EntityInfo) PutRelated(txn *objectbox.Transaction, object interface{}, id uint64) error {\n\treturn nil\n}",
"func AddRelatedPropertyGeneratorsForOriginGroupOverride_ARM(gens map[string]gopter.Gen) {\n\tgens[\"OriginGroup\"] = gen.PtrOf(ResourceReference_ARMGenerator())\n}",
"func (EditCoinOwnerDataResource) Transform(txData interface{}, context *state.CheckState) TxDataResource {\n\tdata := txData.(*transaction.EditCoinOwnerData)\n\n\treturn EditCoinOwnerDataResource{\n\t\tSymbol: data.Symbol,\n\t\tNewOwner: data.NewOwner,\n\t}\n}",
"func (o *Rental) SetCustomer(exec boil.Executor, insert bool, related *Customer) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(exec); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE `rental` SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"`\", \"`\", 0, []string{\"customer_id\"}),\n\t\tstrmangle.WhereClause(\"`\", \"`\", 0, rentalPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.CustomerID, o.RentalID}\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, updateQuery)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\tif _, err = exec.Exec(updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.CustomerID = related.CustomerID\n\n\tif o.R == nil {\n\t\to.R = &rentalR{\n\t\t\tCustomer: related,\n\t\t}\n\t} else {\n\t\to.R.Customer = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &customerR{\n\t\t\tRentals: RentalSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.Rentals = append(related.R.Rentals, o)\n\t}\n\n\treturn nil\n}",
"func (entity_EntityInfo) PutRelated(txn *objectbox.Transaction, object interface{}, id uint64) error {\n\tif rel := &object.(*Entity).Related; rel != nil {\n\t\trId, err := TestEntityRelatedBinding.GetId(rel)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t} else if rId == 0 {\n\t\t\tif err := txn.RunWithCursor(TestEntityRelatedBinding.Id, func(targetCursor *objectbox.Cursor) error {\n\t\t\t\t_, err := targetCursor.Put(rel) // NOTE Put/PutAsync() has a side-effect of setting the rel.ID\n\t\t\t\treturn err\n\t\t\t}); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif rel := object.(*Entity).RelatedPtr; rel != nil {\n\t\trId, err := TestEntityRelatedBinding.GetId(rel)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t} else if rId == 0 {\n\t\t\tif err := txn.RunWithCursor(TestEntityRelatedBinding.Id, func(targetCursor *objectbox.Cursor) error {\n\t\t\t\t_, err := targetCursor.Put(rel) // NOTE Put/PutAsync() has a side-effect of setting the rel.ID\n\t\t\t\treturn err\n\t\t\t}); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif rel := object.(*Entity).RelatedPtr2; rel != nil {\n\t\trId, err := TestEntityRelatedBinding.GetId(rel)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t} else if rId == 0 {\n\t\t\tif err := txn.RunWithCursor(TestEntityRelatedBinding.Id, func(targetCursor *objectbox.Cursor) error {\n\t\t\t\t_, err := targetCursor.Put(rel) // NOTE Put/PutAsync() has a side-effect of setting the rel.ID\n\t\t\t\treturn err\n\t\t\t}); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif err := txn.RunWithCursor(EntityBinding.Id, func(cursor *objectbox.Cursor) error {\n\t\treturn cursor.RelationReplace(4, EntityByValueBinding.Id, id, object, object.(*Entity).RelatedSlice)\n\t}); err != nil {\n\t\treturn err\n\t}\n\tif err := txn.RunWithCursor(EntityBinding.Id, func(cursor *objectbox.Cursor) error {\n\t\treturn cursor.RelationReplace(5, TestEntityRelatedBinding.Id, id, object, object.(*Entity).RelatedPtrSlice)\n\t}); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}",
"func (o *ActivityLog) SetInvestor(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Investor) error {\n\tvar err error\n\tif insert {\n\t\tif err = related.Insert(ctx, exec, boil.Infer()); err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to insert into foreign table\")\n\t\t}\n\t}\n\n\tupdateQuery := fmt.Sprintf(\n\t\t\"UPDATE \\\"activity_logs\\\" SET %s WHERE %s\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 0, []string{\"investor_id\"}),\n\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", 0, activityLogPrimaryKeyColumns),\n\t)\n\tvalues := []interface{}{related.ID, o.ID}\n\n\tif boil.IsDebug(ctx) {\n\t\twriter := boil.DebugWriterFrom(ctx)\n\t\tfmt.Fprintln(writer, updateQuery)\n\t\tfmt.Fprintln(writer, values)\n\t}\n\tif _, err = exec.ExecContext(ctx, updateQuery, values...); err != nil {\n\t\treturn errors.Wrap(err, \"failed to update local table\")\n\t}\n\n\to.InvestorID = related.ID\n\tif o.R == nil {\n\t\to.R = &activityLogR{\n\t\t\tInvestor: related,\n\t\t}\n\t} else {\n\t\to.R.Investor = related\n\t}\n\n\tif related.R == nil {\n\t\trelated.R = &investorR{\n\t\t\tActivityLogs: ActivityLogSlice{o},\n\t\t}\n\t} else {\n\t\trelated.R.ActivityLogs = append(related.R.ActivityLogs, o)\n\t}\n\n\treturn nil\n}",
"func Original(err error) error {\n\tswitch err.(type) {\n\tcase Copy:\n\t\treturn err.(Copy).Original()\n\t}\n\treturn err\n}",
"func (obj *ObjectBase) VSetParent(vPtr IObject, parent IObject) {\n\tobj.parent = parent\n\tif len(obj.name) > 0 {\n\t\tobj.VSetName(vPtr, obj.name)\n\t}\n}",
"func (m CrossOrderCancelReplaceRequest) GetOrigCrossID() (v string, err quickfix.MessageRejectError) {\n\tvar f field.OrigCrossIDField\n\tif err = m.Get(&f); err == nil {\n\t\tv = f.Value()\n\t}\n\treturn\n}",
"func AddRelatedPropertyGeneratorsForOriginGroupOverrideAction(gens map[string]gopter.Gen) {\n\tgens[\"Parameters\"] = gen.PtrOf(OriginGroupOverrideActionParametersGenerator())\n}",
"func (r *Reconciler) Own(obj metav1.Object) {\n\tutil.Panic(controllerutil.SetControllerReference(r.NooBaa, obj, r.Scheme))\n}",
"func (m NoSides) SetTradeOriginationDate(v string) {\n\tm.Set(field.NewTradeOriginationDate(v))\n}",
"func (m Meta) Revert() Change {\n\tif m.Change != nil {\n\t\tm.Change = m.Change.Revert()\n\t}\n\treturn m\n}",
"func (c *client) EditDeclareCapture(index int64, frontend string, data *models.Capture, transactionID string, version int64) error {\n\tif c.UseModelsValidation {\n\t\tvalidationErr := data.Validate(strfmt.Default)\n\t\tif validationErr != nil {\n\t\t\treturn NewConfError(ErrValidationError, validationErr.Error())\n\t\t}\n\t}\n\tp, t, err := c.loadDataForChange(transactionID, version)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif _, err := p.GetOne(\"frontend\", frontend, \"declare capture\", int(index)); err != nil {\n\t\treturn c.HandleError(strconv.FormatInt(index, 10), \"frontend\", frontend, t, transactionID == \"\", err)\n\t}\n\treturn c.SaveData(p, t, transactionID == \"\")\n}",
"func (o *Origin) SetOriginOPUEK(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*OriginPublicEncryptionKey) error {\n\tquery := \"update \\\"origin_public_encryption_keys\\\" set \\\"origin\\\" = null where \\\"origin\\\" = $1\"\n\tvalues := []interface{}{o.Name}\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err := exec.ExecContext(ctx, query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to remove relationships before set\")\n\t}\n\n\tif o.R != nil {\n\t\tfor _, rel := range o.R.OriginOPUEK {\n\t\t\tqueries.SetScanner(&rel.Origin, nil)\n\t\t\tif rel.R == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\trel.R.OriginName = nil\n\t\t}\n\n\t\to.R.OriginOPUEK = nil\n\t}\n\treturn o.AddOriginOPUEK(ctx, exec, insert, related...)\n}"
] |
[
"0.692771",
"0.64577246",
"0.61932355",
"0.60882",
"0.59665203",
"0.5450165",
"0.531301",
"0.5025469",
"0.48846203",
"0.4828296",
"0.48003596",
"0.46696612",
"0.45652044",
"0.45471898",
"0.453732",
"0.4524142",
"0.45234543",
"0.44898403",
"0.44716316",
"0.44487667",
"0.44162196",
"0.43845743",
"0.43506786",
"0.43427598",
"0.43104762",
"0.43081844",
"0.42839968",
"0.42710602",
"0.42709145",
"0.42478108",
"0.4209415",
"0.41962367",
"0.41903362",
"0.4149463",
"0.41481376",
"0.41372272",
"0.4136984",
"0.41366076",
"0.41107294",
"0.40920183",
"0.40781936",
"0.4069279",
"0.40542987",
"0.40351367",
"0.4025604",
"0.40101296",
"0.40057227",
"0.39952445",
"0.39647487",
"0.39615238",
"0.3958406",
"0.39355677",
"0.39256927",
"0.39239997",
"0.3921681",
"0.39172196",
"0.38745812",
"0.38667682",
"0.38521945",
"0.38502714",
"0.38478956",
"0.38388565",
"0.38369417",
"0.38248956",
"0.38247788",
"0.38229838",
"0.38198727",
"0.38114956",
"0.38113555",
"0.38056776",
"0.38016358",
"0.379863",
"0.3792197",
"0.37907922",
"0.3790385",
"0.3788723",
"0.3787724",
"0.37758037",
"0.37750378",
"0.3772678",
"0.37721083",
"0.37710676",
"0.3757665",
"0.3753307",
"0.37510273",
"0.37486896",
"0.37343386",
"0.3726837",
"0.37220585",
"0.37153894",
"0.37144145",
"0.3706484",
"0.37005103",
"0.36978605",
"0.36934274",
"0.36929697",
"0.36860195",
"0.3685969",
"0.36825326",
"0.36817196"
] |
0.8009345
|
0
|
AssetRevisionsG retrieves all records.
|
func AssetRevisionsG(mods ...qm.QueryMod) assetRevisionQuery {
return AssetRevisions(boil.GetDB(), mods...)
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func AssetRevisions(exec boil.Executor, mods ...qm.QueryMod) assetRevisionQuery {\n\tmods = append(mods, qm.From(\"\\\"asset_revision\\\"\"))\n\treturn assetRevisionQuery{NewQuery(exec, mods...)}\n}",
"func (q assetRevisionQuery) All() (AssetRevisionSlice, error) {\n\tvar o AssetRevisionSlice\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"public: failed to assign all query results to AssetRevision slice\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func FindAssetRevisionG(orig int, selectCols ...string) (*AssetRevision, error) {\n\treturn FindAssetRevision(boil.GetDB(), orig, selectCols...)\n}",
"func (o *AssetRevision) AssetG(mods ...qm.QueryMod) assetQuery {\n\treturn o.AssetByFk(boil.GetDB(), mods...)\n}",
"func getAllRevisions(\n\tctx context.Context,\n\tdb *client.DB,\n\tstartKey, endKey roachpb.Key,\n\tstartTime, endTime hlc.Timestamp,\n) ([]versionedValues, error) {\n\t// TODO(dt): version check.\n\theader := roachpb.Header{Timestamp: endTime}\n\treq := &roachpb.ExportRequest{\n\t\tSpan: roachpb.Span{Key: startKey, EndKey: endKey},\n\t\tStartTime: startTime,\n\t\tMVCCFilter: roachpb.MVCCFilter_All,\n\t\tReturnSST: true,\n\t}\n\tresp, pErr := client.SendWrappedWith(ctx, db.GetSender(), header, req)\n\tif pErr != nil {\n\t\treturn nil, pErr.GoError()\n\t}\n\n\tvar res []versionedValues\n\tfor _, file := range resp.(*roachpb.ExportResponse).Files {\n\t\tsst := engine.MakeRocksDBSstFileReader()\n\t\tdefer sst.Close()\n\n\t\tif err := sst.IngestExternalFile(file.SST); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstart, end := engine.MVCCKey{Key: startKey}, engine.MVCCKey{Key: endKey}\n\t\tif err := sst.Iterate(start, end, func(kv engine.MVCCKeyValue) (bool, error) {\n\t\t\tif len(res) == 0 || !res[len(res)-1].Key.Equal(kv.Key.Key) {\n\t\t\t\tres = append(res, versionedValues{Key: kv.Key.Key})\n\t\t\t}\n\t\t\tres[len(res)-1].Values = append(res[len(res)-1].Values, roachpb.Value{Timestamp: kv.Key.Timestamp, RawBytes: kv.Value})\n\t\t\treturn false, nil\n\t\t}); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn res, nil\n}",
"func (o *AssetRevisionSlice) ReloadAllG() error {\n\tif o == nil {\n\t\treturn errors.New(\"public: empty AssetRevisionSlice provided for reload all\")\n\t}\n\n\treturn o.ReloadAll(boil.GetDB())\n}",
"func FindAssetRevisionGP(orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(boil.GetDB(), orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (o *AssetRevision) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func (o AssetRevisionSlice) DeleteAllG() error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision slice provided for delete all\")\n\t}\n\treturn o.DeleteAll(boil.GetDB())\n}",
"func (o *AssetRevisionSlice) ReloadAll(exec boil.Executor) error {\n\tif o == nil || len(*o) == 0 {\n\t\treturn nil\n\t}\n\n\tassetRevisions := AssetRevisionSlice{}\n\tvar args []interface{}\n\tfor _, obj := range *o {\n\t\tpkeyArgs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(obj)), assetRevisionPrimaryKeyMapping)\n\t\targs = append(args, pkeyArgs...)\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"SELECT \\\"asset_revision\\\".* FROM \\\"asset_revision\\\" WHERE (%s) IN (%s)\",\n\t\tstrings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, assetRevisionPrimaryKeyColumns), \",\"),\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, len(*o)*len(assetRevisionPrimaryKeyColumns), 1, len(assetRevisionPrimaryKeyColumns)),\n\t)\n\n\tq := queries.Raw(exec, query, args...)\n\n\terr := q.Bind(&assetRevisions)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to reload all in AssetRevisionSlice\")\n\t}\n\n\t*o = assetRevisions\n\n\treturn nil\n}",
"func (client ContainerAppsRevisionsClient) ListRevisions(ctx context.Context, resourceGroupName string, containerAppName string) (result RevisionCollectionPage, err error) {\n\tif tracing.IsEnabled() {\n\t\tctx = tracing.StartSpan(ctx, fqdn+\"/ContainerAppsRevisionsClient.ListRevisions\")\n\t\tdefer func() {\n\t\t\tsc := -1\n\t\t\tif result.rc.Response.Response != nil {\n\t\t\t\tsc = result.rc.Response.Response.StatusCode\n\t\t\t}\n\t\t\ttracing.EndSpan(ctx, sc, err)\n\t\t}()\n\t}\n\tif err := validation.Validate([]validation.Validation{\n\t\t{TargetValue: resourceGroupName,\n\t\t\tConstraints: []validation.Constraint{{Target: \"resourceGroupName\", Name: validation.MaxLength, Rule: 90, Chain: nil},\n\t\t\t\t{Target: \"resourceGroupName\", Name: validation.MinLength, Rule: 1, Chain: nil},\n\t\t\t\t{Target: \"resourceGroupName\", Name: validation.Pattern, Rule: `^[-\\w\\._\\(\\)]+[^\\.]$`, Chain: nil}}}}); err != nil {\n\t\treturn result, validation.NewError(\"web.ContainerAppsRevisionsClient\", \"ListRevisions\", err.Error())\n\t}\n\n\tresult.fn = client.listRevisionsNextResults\n\treq, err := client.ListRevisionsPreparer(ctx, resourceGroupName, containerAppName)\n\tif err != nil {\n\t\terr = autorest.NewErrorWithError(err, \"web.ContainerAppsRevisionsClient\", \"ListRevisions\", nil, \"Failure preparing request\")\n\t\treturn\n\t}\n\n\tresp, err := client.ListRevisionsSender(req)\n\tif err != nil {\n\t\tresult.rc.Response = autorest.Response{Response: resp}\n\t\terr = autorest.NewErrorWithError(err, \"web.ContainerAppsRevisionsClient\", \"ListRevisions\", resp, \"Failure sending request\")\n\t\treturn\n\t}\n\n\tresult.rc, err = client.ListRevisionsResponder(resp)\n\tif err != nil {\n\t\terr = autorest.NewErrorWithError(err, \"web.ContainerAppsRevisionsClient\", \"ListRevisions\", resp, \"Failure responding to request\")\n\t\treturn\n\t}\n\tif result.rc.hasNextLink() && result.rc.IsEmpty() {\n\t\terr = result.NextWithContext(ctx)\n\t\treturn\n\t}\n\n\treturn\n}",
"func (model *GrogModel) AllAssets() ([]*Asset, error) {\n\tvar foundAssets []*Asset\n\n\trows, rowsErr := model.db.DB.Query(`select name, mimeType, content, serve_external, rendered,\n\t\tadded, modified from Assets`)\n\tif rowsErr != nil {\n\t\treturn nil, fmt.Errorf(\"error loading all assets: %v\", rowsErr)\n\t}\n\n\tdefer rows.Close()\n\n\tvar (\n\t\tname string\n\t\tmimeType string\n\t\tcontent = make([]byte, 0)\n\t\tserveExternal int64\n\t\trendered int64\n\t\tadded int64\n\t\tmodified int64\n\t)\n\n\tfor rows.Next() {\n\t\tif rows.Scan(&name, &mimeType, &content, &serveExternal, &rendered, &added, &modified) != sql.ErrNoRows {\n\t\t\tfoundAsset := model.NewAsset(name, mimeType)\n\t\t\tfoundAsset.Content = content\n\t\t\tif serveExternal == 1 {\n\t\t\t\tfoundAsset.ServeExternal = true\n\t\t\t} else {\n\t\t\t\tfoundAsset.ServeExternal = false\n\t\t\t}\n\n\t\t\tif rendered == 1 {\n\t\t\t\tfoundAsset.Rendered = true\n\t\t\t} else {\n\t\t\t\tfoundAsset.Rendered = false\n\t\t\t}\n\n\t\t\tfoundAsset.Added.Set(time.Unix(added, 0))\n\t\t\tfoundAsset.Modified.Set(time.Unix(modified, 0))\n\n\t\t\tif foundAssets == nil {\n\t\t\t\tfoundAssets = make([]*Asset, 0)\n\t\t\t}\n\t\t\tfoundAssets = append(foundAssets, foundAsset)\n\t\t}\n\t}\n\n\treturn foundAssets, nil\n}",
"func (client ContainerAppsRevisionsClient) ListRevisionsSender(req *http.Request) (*http.Response, error) {\n\treturn client.Send(req, azure.DoRetryWithRegistration(client.Client))\n}",
"func (r *Store) ListRevisions(ctx context.Context, name string) ([]backend.Revision, error) {\n\tstore, name := r.getStore(name)\n\n\treturn store.ListRevisions(ctx, name)\n}",
"func (q assetRevisionQuery) AllP() AssetRevisionSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (reg *defaultRegistry) GetAllRevisionsForPolicy(policyGen runtime.Generation) ([]*engine.Revision, error) {\n\t// TODO: this method is slow, needs indexes\n\tvar revisions []*engine.Revision\n\terr := reg.store.Find(engine.TypeRevision.Kind, &revisions, store.WithKey(engine.RevisionKey), store.WithWhereEq(\"PolicyGen\", policyGen))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn revisions, nil\n}",
"func (c *Client) Revisions(name string) ([]Release, error) {\n\tresponse, err := c.client.ReleaseHistory(name,\n\t\thelm.WithMaxHistory(maxHistory))\n\tif err != nil {\n\t\treturn nil, trace.Wrap(err)\n\t}\n\tvar releases []Release\n\tif response != nil && response.Releases != nil {\n\t\tfor _, item := range response.Releases {\n\t\t\treleases = append(releases, *(fromHelm(item)))\n\t\t}\n\t}\n\treturn releases, nil\n}",
"func (o *AssetRevision) OrigG(mods ...qm.QueryMod) assetQuery {\n\treturn o.OrigByFk(boil.GetDB(), mods...)\n}",
"func (client ContainerAppsRevisionsClient) ListRevisionsComplete(ctx context.Context, resourceGroupName string, containerAppName string) (result RevisionCollectionIterator, err error) {\n\tif tracing.IsEnabled() {\n\t\tctx = tracing.StartSpan(ctx, fqdn+\"/ContainerAppsRevisionsClient.ListRevisions\")\n\t\tdefer func() {\n\t\t\tsc := -1\n\t\t\tif result.Response().Response.Response != nil {\n\t\t\t\tsc = result.page.Response().Response.Response.StatusCode\n\t\t\t}\n\t\t\ttracing.EndSpan(ctx, sc, err)\n\t\t}()\n\t}\n\tresult.page, err = client.ListRevisions(ctx, resourceGroupName, containerAppName)\n\treturn\n}",
"func AssetsG(mods ...qm.QueryMod) assetQuery {\n\treturn Assets(boil.GetDB(), mods...)\n}",
"func Assets(exec boil.Executor, mods ...qm.QueryMod) assetQuery {\n\tmods = append(mods, qm.From(\"\\\"audit\\\".\\\"asset\\\"\"))\n\treturn assetQuery{NewQuery(exec, mods...)}\n}",
"func (r *Reconciler) gcRevisions(ctx context.Context, app *v1alpha1.App) error {\n\tlogger := logging.FromContext(ctx)\n\tlogger.Debugf(\"Checking for revisions that need to adjust %s...\", autoscaling.MinScaleAnnotationKey)\n\tdefer logger.Debugf(\"Done checking for revisions that need to adjust %s.\", autoscaling.MinScaleAnnotationKey)\n\n\tif app.Status.LatestCreatedRevisionName != app.Status.LatestReadyRevisionName {\n\t\tlogger.Debugf(\"Not willing to garbage collection Revisions while the latest is not ready...\")\n\t\treturn nil\n\t}\n\n\tselector := labels.Set{\"serving.knative.dev/configuration\": app.Name}.AsSelector()\n\trevs, err := r.knativeRevisionLister.Revisions(app.Namespace).List(selector)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif len(revs) == 0 {\n\t\treturn nil\n\t}\n\n\trevisionClient := r.ServingClientSet.ServingV1alpha1().Revisions(app.Namespace)\n\n\tparseGeneration := func(rev *serving.Revision) int64 {\n\t\tv, ok := rev.Labels[\"serving.knative.dev/configurationGeneration\"]\n\t\tif !ok {\n\t\t\tlogger.Warnf(\"Revision did not contain ConfigurationGeneration\")\n\t\t\treturn -1\n\t\t}\n\n\t\tx, err := strconv.ParseInt(v, 10, 64)\n\t\tif err != nil {\n\t\t\tlogger.Warnf(\"Revision had an invalid ConfigurationGeneration: %s\", err)\n\t\t\treturn -1\n\t\t}\n\t\treturn x\n\t}\n\n\t// descending\n\tsort.Slice(revs, func(i int, j int) bool {\n\t\treturn parseGeneration(revs[j]) < parseGeneration(revs[i])\n\t})\n\n\t// Find the latest generation that is ready\n\tfirstReadyIdx := -1\n\tfor i, rev := range revs {\n\t\tif !rev.Status.IsReady() {\n\t\t\tcontinue\n\t\t}\n\t\tfirstReadyIdx = i\n\t\tbreak\n\t}\n\n\tif firstReadyIdx < 0 {\n\t\t// Didn't find any ready revisions. Move on\n\t\treturn nil\n\t}\n\n\t// delete everything after the latest ready generation\n\tfor _, rev := range revs[firstReadyIdx+1:] {\n\t\tlogger.Infof(\"Garbage collecting Revision %s...\", rev.Name)\n\t\tif err := revisionClient.Delete(rev.Name, &metav1.DeleteOptions{}); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}",
"func (wq *WorkflowQuery) QueryRevisions() *RevisionQuery {\n\tquery := &RevisionQuery{config: wq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := wq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := wq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(workflow.Table, workflow.FieldID, selector),\n\t\t\tsqlgraph.To(revision.Table, revision.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, workflow.RevisionsTable, workflow.RevisionsColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(wq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func (o AssetRevisionSlice) UpdateAllG(cols M) error {\n\treturn o.UpdateAll(boil.GetDB(), cols)\n}",
"func (o *AssetRevisionSlice) ReloadAllGP() {\n\tif err := o.ReloadAllG(); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (_m *gqlAssetConverter) ToGQLs(in []*v1beta1.Asset) ([]*gqlschema.Asset, error) {\n\tvar r0 []*gqlschema.Asset\n\tvar r1 error\n\tr1 = _m.err\n\n\treturn r0, r1\n}",
"func (client ContainerAppsRevisionsClient) ListRevisionsResponder(resp *http.Response) (result RevisionCollection, err error) {\n\terr = autorest.Respond(\n\t\tresp,\n\t\tazure.WithErrorUnlessStatusCode(http.StatusOK),\n\t\tautorest.ByUnmarshallingJSON(&result),\n\t\tautorest.ByClosing())\n\tresult.Response = autorest.Response{Response: resp}\n\treturn\n}",
"func (c *Files) ListRevisions(in *ListRevisionsInput) (out *ListRevisionsOutput, err error) {\n\tbody, err := c.call(\"/files/list_revisions\", in)\n\tif err != nil {\n\t\treturn\n\t}\n\tdefer body.Close()\n\n\terr = json.NewDecoder(body).Decode(&out)\n\treturn\n}",
"func AssetRevisionExistsG(orig int) (bool, error) {\n\treturn AssetRevisionExists(boil.GetDB(), orig)\n}",
"func AllVersions(db *gorm.DB) ([]Version, error) {\n\tvar versions []Version\n\tresult := db.Find(&versions)\n\n\treturn versions, result.Error\n}",
"func (q assetQuery) All() (AssetSlice, error) {\n\tvar o AssetSlice\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Asset slice\")\n\t}\n\n\tif len(assetAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (c *vertexCollection) Revision(ctx context.Context) (string, error) {\n\tresult, err := c.rawCollection().Revision(ctx)\n\tif err != nil {\n\t\treturn \"\", WithStack(err)\n\t}\n\treturn result, nil\n}",
"func (o *AssetRevision) DeleteG() error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision provided for deletion\")\n\t}\n\n\treturn o.Delete(boil.GetDB())\n}",
"func (q assetRevisionQuery) Count() (int64, error) {\n\tvar count int64\n\n\tqueries.SetSelect(q.Query, nil)\n\tqueries.SetCount(q.Query)\n\n\terr := q.Query.QueryRow().Scan(&count)\n\tif err != nil {\n\t\treturn 0, errors.Wrap(err, \"public: failed to count asset_revision rows\")\n\t}\n\n\treturn count, nil\n}",
"func (x SyntheticMonitorEntity) GetAssets() []SyntheticsSyntheticMonitorAsset {\n\treturn x.Assets\n}",
"func (entity *Page) Revisions() *RevisionsService {\n\tif entity.collection == nil {\n\t\t// missing page.collection parent. Probably Page struct was initialized manually, not fetched from API\n\t\tlog.Println(\"[go-wordpress] Missing parent page collection\")\n\t\treturn nil\n\t}\n\treturn &RevisionsService{\n\t\tService: Service(*entity.collection),\n\t\tparent: entity,\n\t\tparentType: \"pages\",\n\t\turl: fmt.Sprintf(\"%v/%v/%v\", \"pages\", entity.ID, \"revisions\"),\n\t}\n}",
"func (assetRevisionL) LoadAsset(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Asset\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Asset\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Asset = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Asset == foreign.ID {\n\t\t\t\tlocal.R.Asset = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (cr APIContractRepository) List(ctx context.Context, projectID uint, clusterID uint) ([]*models.APIContractRevision, error) {\n\tvar confs []*models.APIContractRevision\n\n\tif clusterID == 0 {\n\t\ttx := cr.db.Where(\"project_id = ?\", projectID).Find(&confs).Order(\"created_at desc\")\n\t\tif tx.Error != nil {\n\t\t\treturn nil, tx.Error\n\t\t}\n\t\treturn confs, nil\n\t}\n\ttx := cr.db.Where(\"project_id = ? and cluster_id = ?\", projectID, clusterID).Find(&confs).Order(\"created_at desc\")\n\tif tx.Error != nil {\n\t\treturn nil, tx.Error\n\t}\n\n\treturn confs, nil\n}",
"func (c Client) GetAssetItems(query url.Values) ([]Model, error) {\n\tvar res struct {\n\t\tRecords []Model\n\t}\n\terr := c.GetRecordsFor(TableModel, query, &res)\n\treturn res.Records, err\n}",
"func (q assetRevisionQuery) One() (*AssetRevision, error) {\n\to := &AssetRevision{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"public: failed to execute a one query for asset_revision\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (e *Entry) SortedRevisions() []*Revision {\n\tsort.Sort(ByRevision(e.Revisions))\n\treturn e.Revisions\n}",
"func (c *Client) StreamRevisions(ctx context.Context, startRevision int64, out chan<- *types.MapRootV1) error {\n\tdefer close(out)\n\twait := time.NewTicker(c.RetryDelay)\n\tdefer wait.Stop()\n\tfor i := startRevision; ; {\n\t\tmr, err := c.VerifiedGetRevision(ctx, i)\n\n\t\t// If this revision was not found, wait and retry.\n\t\tif s, _ := status.FromError(err); s.Code() == codes.NotFound {\n\t\t\tglog.Infof(\"Waiting for a new revision to appear\")\n\t\t\tselect {\n\t\t\tcase <-ctx.Done():\n\t\t\t\treturn ctx.Err()\n\t\t\tcase <-wait.C:\n\t\t\t\tcontinue\n\t\t\t}\n\t\t} else if err != nil {\n\t\t\tglog.Warningf(\"GetRevision(%v): %v\", i, err)\n\t\t\treturn err\n\t\t}\n\n\t\tselect {\n\t\tcase <-ctx.Done():\n\t\t\treturn ctx.Err()\n\t\tcase out <- mr:\n\t\t\ti++\n\t\t}\n\t}\n}",
"func (r *ProjectsLocationsOsPolicyAssignmentsService) ListRevisions(name string) *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall {\n\tc := &ProjectsLocationsOsPolicyAssignmentsListRevisionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}\n\tc.name = name\n\treturn c\n}",
"func printRevision(revision *servingv1.Revision, options hprinters.PrintOptions) ([]metav1beta1.TableRow, error) {\n\tname := revision.Name\n\tservice := revision.Labels[serving.ServiceLabelKey]\n\ttraffic := revision.Annotations[RevisionTrafficAnnotation]\n\ttags := revision.Annotations[RevisionTagsAnnotation]\n\tgeneration := revision.Labels[serving.ConfigurationGenerationLabelKey]\n\tage := commands.TranslateTimestampSince(revision.CreationTimestamp)\n\tconditions := commands.ConditionsValue(revision.Status.Conditions)\n\tready := commands.ReadyCondition(revision.Status.Conditions)\n\treason := commands.NonReadyConditionReason(revision.Status.Conditions)\n\trow := metav1beta1.TableRow{\n\t\tObject: runtime.RawExtension{Object: revision},\n\t}\n\n\t// Namespace is first column for \"-A\"\n\tif options.AllNamespaces {\n\t\trow.Cells = append(row.Cells, trunc(revision.Namespace))\n\t}\n\n\trow.Cells = append(row.Cells,\n\t\ttrunc(name),\n\t\ttrunc(service),\n\t\ttrunc(traffic),\n\t\ttrunc(tags),\n\t\ttrunc(generation),\n\t\ttrunc(age),\n\t\ttrunc(conditions),\n\t\ttrunc(ready),\n\t\ttrunc(reason))\n\treturn []metav1beta1.TableRow{row}, nil\n}",
"func getChildrenAsset(id int) ([]Asset, error) {\n\tparams := map[string]string{\n\t\t\"predicate\": fmt.Sprintf(\"parent='%d'\", id),\n\t}\n\tresp, err := get(\"asset\", params)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Failed TCMD request\")\n\t}\n\n\tvar result []Asset\n\terr = json.Unmarshal(resp, &result)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Failed to unmarshal TCMD response\")\n\t}\n\n\tif len(result) > 0 {\n\t\treturn result, nil\n\t}\n\treturn nil, nil\n}",
"func (client ContainerAppsRevisionsClient) GetRevisionSender(req *http.Request) (*http.Response, error) {\n\treturn client.Send(req, azure.DoRetryWithRegistration(client.Client))\n}",
"func (assetRevisionL) LoadOrig(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Orig\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Orig\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Orig = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Orig == foreign.ID {\n\t\t\t\tlocal.R.Orig = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (d *TileDB) Versions(revision int, module string) ([]string, error) {\n\tvar bs []byte\n\tif err := d.db.QueryRow(\"SELECT leaves FROM logs WHERE revision=? AND module=?\", revision, module).Scan(&bs); err != nil {\n\t\treturn nil, err\n\t}\n\tvar versions []string\n\tif err := json.Unmarshal(bs, &versions); err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to parse tile at revision=%d, path=%x: %v\", revision, module, err)\n\t}\n\treturn versions, nil\n}",
"func (agg *Planner) Revision() PlannerRevision { return agg.rev }",
"func (s *SmartContract) GetAllAssets(ctx contractapi.TransactionContextInterface) ([]*Asset, error) {\n\t// range query with empty string for startKey and endKey does an\n\t// open-ended query of all assets in the chaincode namespace.\n\tresultsIterator, err := ctx.GetStub().GetStateByRange(\"\", \"\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer resultsIterator.Close()\n\n\tvar assets []*Asset\n\tfor resultsIterator.HasNext() {\n\t\tqueryResponse, err := resultsIterator.Next()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tvar asset Asset\n\t\terr = json.Unmarshal(queryResponse.Value, &asset)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tassets = append(assets, &asset)\n\t}\n\n\treturn assets, nil\n}",
"func (hs *HistoryService) All(actionType string) ([]*TransactionHistory, error) {\n\tvar transHist []*TransactionHistory\n\tif err := hs.client.Get(buildString(\"history/\", actionType, \"/\", strconv.Itoa(hs.assetId)),\n\t\t&transHist); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn transHist, nil\n}",
"func getRevisionDescriptions(ctx context.Context, client clientservingv1.KnServingClient, service *servingv1.Service, withDetails bool) ([]*revisionDesc, error) {\n\trevisionsSeen := sets.NewString()\n\trevisionDescs := []*revisionDesc{}\n\n\ttrafficTargets := service.Status.Traffic\n\tvar err error\n\tfor i := range trafficTargets {\n\t\ttarget := trafficTargets[i]\n\t\trevision, err := extractRevisionFromTarget(ctx, client, target)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"cannot extract revision from service %s: %w\", service.Name, err)\n\t\t}\n\t\trevisionsSeen.Insert(revision.Name)\n\t\tdesc, err := newRevisionDesc(*revision, &target, service)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\trevisionDescs = append(revisionDescs, desc)\n\t}\n\tif revisionDescs, err = completeWithLatestRevisions(ctx, client, service, revisionsSeen, revisionDescs); err != nil {\n\t\treturn nil, err\n\t}\n\tif withDetails {\n\t\tif revisionDescs, err = completeWithUntargetedRevisions(ctx, client, service, revisionsSeen, revisionDescs); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn orderByConfigurationGeneration(revisionDescs), nil\n}",
"func (o *AssetRevision) UpdateG(whitelist ...string) error {\n\treturn o.Update(boil.GetDB(), whitelist...)\n}",
"func (o ClusterTemplateOutput) TemplateRevisions() ClusterTemplateTemplateRevisionArrayOutput {\n\treturn o.ApplyT(func(v *ClusterTemplate) ClusterTemplateTemplateRevisionArrayOutput { return v.TemplateRevisions }).(ClusterTemplateTemplateRevisionArrayOutput)\n}",
"func (s *SmartContract) queryAllAsset(APIstub shim.ChaincodeStubInterface) sc.Response {\n\n\tstartKey := \"0\"\n\tendKey := \"999\"\n\n\tresultsIterator, err := APIstub.GetStateByRange(startKey, endKey)\n\tif err != nil {\n\t\treturn shim.Error(err.Error())\n\t}\n\tdefer resultsIterator.Close()\n\n\t// buffer is a JSON array containing QueryResults\n\tvar buffer bytes.Buffer\n\tbuffer.WriteString(\"[\")\n\n\tbArrayMemberAlreadyWritten := false\n\tfor resultsIterator.HasNext() {\n\t\tqueryResponse, err := resultsIterator.Next()\n\t\tif err != nil {\n\t\t\treturn shim.Error(err.Error())\n\t\t}\n\t\t// Add comma before array members,suppress it for the first array member\n\t\tif bArrayMemberAlreadyWritten == true {\n\t\t\tbuffer.WriteString(\",\")\n\t\t}\n\t\tbuffer.WriteString(\"{\\\"Key\\\":\")\n\t\tbuffer.WriteString(\"\\\"\")\n\t\tbuffer.WriteString(queryResponse.Key)\n\t\tbuffer.WriteString(\"\\\"\")\n\n\t\tbuffer.WriteString(\", \\\"Record\\\":\")\n\t\t// Record is a JSON object, so we write as-is\n\t\tbuffer.WriteString(string(queryResponse.Value))\n\t\tbuffer.WriteString(\"}\")\n\t\tbArrayMemberAlreadyWritten = true\n\t}\n\tbuffer.WriteString(\"]\")\n\n\tfmt.Printf(\"- queryAllAsset:\\n%s\\n\", buffer.String())\n\n\treturn shim.Success(buffer.Bytes())\n}",
"func (o *AssetRevision) SetAssetG(insert bool, related *Asset) error {\n\treturn o.SetAsset(boil.GetDB(), insert, related)\n}",
"func (o AssetRevisionSlice) DeleteAllGP() {\n\tif err := o.DeleteAllG(); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (db *Database) QueryAssetChartHistory(asset string, limit int) ([]schema.StatAssetInfoList1H, error) {\n\tchartHistory := make([]schema.StatAssetInfoList1H, 0)\n\n\terr := db.Model(&chartHistory).\n\t\tWhere(\"asset = ?\", asset).\n\t\tLimit(limit).\n\t\tOrder(\"id DESC\").\n\t\tSelect()\n\n\tif err == pg.ErrNoRows {\n\t\treturn chartHistory, fmt.Errorf(\"no rows in block table: %s\", err)\n\t}\n\n\tif err != nil {\n\t\treturn chartHistory, fmt.Errorf(\"unexpected database error: %s\", err)\n\t}\n\n\treturn chartHistory, nil\n}",
"func (o ApiOutput) Revision() pulumi.StringArrayOutput {\n\treturn o.ApplyT(func(v *Api) pulumi.StringArrayOutput { return v.Revision }).(pulumi.StringArrayOutput)\n}",
"func (o *Environment) recursiveImportRevisions(revisions map[string]revision, pkg *gdf.Package, parent string) {\n\tfor im, _ := range pkg.ImportedPackages {\n\t\tif _, has := revisions[im]; !has {\n\t\t\tp, err := o.GetPkg(im)\n\t\t\tif err != nil {\n\t\t\t\tpanic(fmt.Sprintf(\"package %s does not exist\", im))\n\t\t\t}\n\t\t\tvar d string\n\t\t\tvar internal bool\n\t\t\td, internal, err = o.PkgDir(im)\n\t\t\tif internal {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif !p.IsInPath(pkg.Path) && !pkg.IsInPath(p.Path) {\n\t\t\t\trevisions[im] = o.getRevision(d, pkg.Path)\n\t\t\t}\n\t\t\to.recursiveImportRevisions(revisions, p, pkg.Path)\n\t\t}\n\t}\n}",
"func FindAssetRevision(exec boil.Executor, orig int, selectCols ...string) (*AssetRevision, error) {\n\tassetRevisionObj := &AssetRevision{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"asset_revision\\\" where \\\"orig\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, orig)\n\n\terr := q.Bind(assetRevisionObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"public: unable to select from asset_revision\")\n\t}\n\n\treturn assetRevisionObj, nil\n}",
"func sortRevisions(revisionList *servingv1.RevisionList) {\n\t// sort revisionList by configuration generation key\n\tsort.SliceStable(revisionList.Items, revisionListSortFunc(revisionList))\n}",
"func (q rssAnnouncementQuery) AllG(ctx context.Context) (RSSAnnouncementSlice, error) {\n\treturn q.All(ctx, boil.GetContextDB())\n}",
"func (client ContainerAppsRevisionsClient) GetRevisionResponder(resp *http.Response) (result Revision, err error) {\n\terr = autorest.Respond(\n\t\tresp,\n\t\tazure.WithErrorUnlessStatusCode(http.StatusOK),\n\t\tautorest.ByUnmarshallingJSON(&result),\n\t\tautorest.ByClosing())\n\tresult.Response = autorest.Response{Response: resp}\n\treturn\n}",
"func (taker *TakerGCP) ListVersions(rs *reportService) (versions []*appengine.Version, err error) {\n\tserviceService := appengine.NewAppsServicesVersionsService(taker.appEngine)\n\tif listResponse, listErr := serviceService.List(rs.application.gcpApplication.Id, rs.gcpService.Id).View(\"FULL\").Do(); listErr == nil {\n\t\tversions = listResponse.Versions\n\t} else {\n\t\terr = listErr\n\t}\n\treturn\n}",
"func (o *StockCvtermSlice) ReloadAllG() error {\n\tif o == nil {\n\t\treturn errors.New(\"chado: empty StockCvtermSlice provided for reload all\")\n\t}\n\n\treturn o.ReloadAll(boil.GetDB())\n}",
"func (m *Meta) AllGVRs() client.GVRs {\n\tm.mx.RLock()\n\tdefer m.mx.RUnlock()\n\n\tkk := make(client.GVRs, 0, len(m.resMetas))\n\tfor k := range m.resMetas {\n\t\tkk = append(kk, k)\n\t}\n\tsort.Sort(kk)\n\n\treturn kk\n}",
"func (client ContainerAppsRevisionsClient) GetRevision(ctx context.Context, resourceGroupName string, containerAppName string, name string) (result Revision, err error) {\n\tif tracing.IsEnabled() {\n\t\tctx = tracing.StartSpan(ctx, fqdn+\"/ContainerAppsRevisionsClient.GetRevision\")\n\t\tdefer func() {\n\t\t\tsc := -1\n\t\t\tif result.Response.Response != nil {\n\t\t\t\tsc = result.Response.Response.StatusCode\n\t\t\t}\n\t\t\ttracing.EndSpan(ctx, sc, err)\n\t\t}()\n\t}\n\tif err := validation.Validate([]validation.Validation{\n\t\t{TargetValue: resourceGroupName,\n\t\t\tConstraints: []validation.Constraint{{Target: \"resourceGroupName\", Name: validation.MaxLength, Rule: 90, Chain: nil},\n\t\t\t\t{Target: \"resourceGroupName\", Name: validation.MinLength, Rule: 1, Chain: nil},\n\t\t\t\t{Target: \"resourceGroupName\", Name: validation.Pattern, Rule: `^[-\\w\\._\\(\\)]+[^\\.]$`, Chain: nil}}}}); err != nil {\n\t\treturn result, validation.NewError(\"web.ContainerAppsRevisionsClient\", \"GetRevision\", err.Error())\n\t}\n\n\treq, err := client.GetRevisionPreparer(ctx, resourceGroupName, containerAppName, name)\n\tif err != nil {\n\t\terr = autorest.NewErrorWithError(err, \"web.ContainerAppsRevisionsClient\", \"GetRevision\", nil, \"Failure preparing request\")\n\t\treturn\n\t}\n\n\tresp, err := client.GetRevisionSender(req)\n\tif err != nil {\n\t\tresult.Response = autorest.Response{Response: resp}\n\t\terr = autorest.NewErrorWithError(err, \"web.ContainerAppsRevisionsClient\", \"GetRevision\", resp, \"Failure sending request\")\n\t\treturn\n\t}\n\n\tresult, err = client.GetRevisionResponder(resp)\n\tif err != nil {\n\t\terr = autorest.NewErrorWithError(err, \"web.ContainerAppsRevisionsClient\", \"GetRevision\", resp, \"Failure responding to request\")\n\t\treturn\n\t}\n\n\treturn\n}",
"func (o AssetRevisionSlice) DeleteAll(exec boil.Executor) error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision slice provided for delete all\")\n\t}\n\n\tif len(o) == 0 {\n\t\treturn nil\n\t}\n\n\tif len(assetRevisionBeforeDeleteHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doBeforeDeleteHooks(exec); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tvar args []interface{}\n\tfor _, obj := range o {\n\t\tpkeyArgs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(obj)), assetRevisionPrimaryKeyMapping)\n\t\targs = append(args, pkeyArgs...)\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"DELETE FROM \\\"asset_revision\\\" WHERE (%s) IN (%s)\",\n\t\tstrings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, assetRevisionPrimaryKeyColumns), \",\"),\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, len(o)*len(assetRevisionPrimaryKeyColumns), 1, len(assetRevisionPrimaryKeyColumns)),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, args)\n\t}\n\n\t_, err := exec.Exec(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to delete all from assetRevision slice\")\n\t}\n\n\tif len(assetRevisionAfterDeleteHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterDeleteHooks(exec); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (s *SmartContract) GetAssetByRange(ctx contractapi.TransactionContextInterface, startKey string, endKey string) ([]*Asset, error) {\n\n\tresultsIterator, err := ctx.GetStub().GetPrivateDataByRange(assetCollection, startKey, endKey)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer resultsIterator.Close()\n\n\tresults := []*Asset{}\n\n\tfor resultsIterator.HasNext() {\n\t\tresponse, err := resultsIterator.Next()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tvar asset *Asset\n\t\terr = json.Unmarshal(response.Value, &asset)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to unmarshal JSON: %v\", err)\n\t\t}\n\n\t\tresults = append(results, asset)\n\t}\n\n\treturn results, nil\n\n}",
"func (s *SmartContract) GetAssetByRange(ctx contractapi.TransactionContextInterface, startKey string, endKey string) ([]*Asset, error) {\n\n\tresultsIterator, err := ctx.GetStub().GetPrivateDataByRange(assetCollection, startKey, endKey)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer resultsIterator.Close()\n\n\tresults := []*Asset{}\n\n\tfor resultsIterator.HasNext() {\n\t\tresponse, err := resultsIterator.Next()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tvar asset *Asset\n\t\terr = json.Unmarshal(response.Value, &asset)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to unmarshal JSON: %v\", err)\n\t\t}\n\n\t\tresults = append(results, asset)\n\t}\n\n\treturn results, nil\n\n}",
"func (_m *gqlAssetConverter) ToGQL(in *v1beta1.Asset) (*gqlschema.Asset, error) {\n\tvar r0 *gqlschema.Asset\n\tvar r1 error\n\tr1 = _m.err\n\n\treturn r0, r1\n}",
"func (o *AuthorSlice) ReloadAllG() error {\n\tif o == nil {\n\t\treturn errors.New(\"mdbmdbmodels: empty AuthorSlice provided for reload all\")\n\t}\n\n\treturn o.ReloadAll(boil.GetDB())\n}",
"func (q tenantQuery) AllG(ctx context.Context) (TenantSlice, error) {\n\treturn q.All(ctx, boil.GetContextDB())\n}",
"func (dc *DeploymentController) getAllReplicaSetsAndSyncRevision(ctx context.Context, d *apps.Deployment, rsList []*apps.ReplicaSet, createIfNotExisted bool) (*apps.ReplicaSet, []*apps.ReplicaSet, error) {\n\t_, allOldRSs := deploymentutil.FindOldReplicaSets(d, rsList)\n\n\t// Get new replica set with the updated revision number\n\tnewRS, err := dc.getNewReplicaSet(ctx, d, rsList, allOldRSs, createIfNotExisted)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\treturn newRS, allOldRSs, nil\n}",
"func (o *FeatureCvtermDbxrefSlice) ReloadAllG() error {\n\tif o == nil {\n\t\treturn errors.New(\"chado: empty FeatureCvtermDbxrefSlice provided for reload all\")\n\t}\n\n\treturn o.ReloadAll(boil.GetDB())\n}",
"func getBuildVariantHistory(buildId string, before int, after int) ([]build.Build, error) {\n\tb, err := build.FindOne(build.ById(buildId))\n\tif err != nil {\n\t\treturn nil, errors.WithStack(err)\n\t}\n\tif b == nil {\n\t\treturn nil, errors.Errorf(\"no build with id %v\", buildId)\n\t}\n\n\tlessRecentBuilds, err := build.Find(\n\t\tbuild.ByBeforeRevision(b.Project, b.BuildVariant, b.RevisionOrderNumber).\n\t\t\tWithFields(build.IdKey, build.TasksKey, build.StatusKey, build.VersionKey, build.ActivatedKey).\n\t\t\tLimit(before))\n\tif err != nil {\n\t\treturn nil, errors.WithStack(err)\n\t}\n\n\tmoreRecentBuilds, err := build.Find(\n\t\tbuild.ByAfterRevision(b.Project, b.BuildVariant, b.RevisionOrderNumber).\n\t\t\tWithFields(build.IdKey, build.TasksKey, build.StatusKey, build.VersionKey, build.ActivatedKey).\n\t\t\tLimit(after))\n\tif err != nil {\n\t\treturn nil, errors.WithStack(err)\n\t}\n\n\tbuilds := make([]build.Build, 0, len(lessRecentBuilds)+len(moreRecentBuilds))\n\tfor i := len(moreRecentBuilds); i > 0; i-- {\n\t\tbuilds = append(builds, moreRecentBuilds[i-1])\n\t}\n\tbuilds = append(builds, lessRecentBuilds...)\n\treturn builds, nil\n}",
"func (o *TransactionSlice) ReloadAllG() error {\n\tif o == nil {\n\t\treturn errors.New(\"models: empty TransactionSlice provided for reload all\")\n\t}\n\n\treturn o.ReloadAll(boil.GetDB())\n}",
"func ExampleReservationClient_NewListRevisionsPager() {\n\tcred, err := azidentity.NewDefaultAzureCredential(nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to obtain a credential: %v\", err)\n\t}\n\tctx := context.Background()\n\tclient, err := armreservations.NewReservationClient(cred, nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to create client: %v\", err)\n\t}\n\tpager := client.NewListRevisionsPager(\"6ef59113-3482-40da-8d79-787f823e34bc\",\n\t\t\"276e7ae4-84d0-4da6-ab4b-d6b94f3557da\",\n\t\tnil)\n\tfor pager.More() {\n\t\tnextResult, err := pager.NextPage(ctx)\n\t\tif err != nil {\n\t\t\tlog.Fatalf(\"failed to advance page: %v\", err)\n\t\t}\n\t\tfor _, v := range nextResult.Value {\n\t\t\t// TODO: use page item\n\t\t\t_ = v\n\t\t}\n\t}\n}",
"func (q assetRevisionQuery) DeleteAll() error {\n\tif q.Query == nil {\n\t\treturn errors.New(\"public: no assetRevisionQuery provided for delete all\")\n\t}\n\n\tqueries.SetDelete(q.Query)\n\n\t_, err := q.Query.Exec()\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to delete all from asset_revision\")\n\t}\n\n\treturn nil\n}",
"func (e *ExtensionChanges) GetAllChanges() []*Change {\n\treturn e.Changes\n}",
"func getAllDescChanges(\n\tctx context.Context,\n\tdb *client.DB,\n\tstartTime, endTime hlc.Timestamp,\n\tpriorIDs map[sqlbase.ID]sqlbase.ID,\n) ([]BackupDescriptor_DescriptorRevision, error) {\n\tstartKey := roachpb.Key(keys.MakeTablePrefix(keys.DescriptorTableID))\n\tendKey := startKey.PrefixEnd()\n\n\tallRevs, err := getAllRevisions(ctx, db, startKey, endKey, startTime, endTime)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar res []BackupDescriptor_DescriptorRevision\n\n\tfor _, revs := range allRevs {\n\t\tid, err := keys.DecodeDescMetadataID(revs.Key)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tfor _, rev := range revs.Values {\n\t\t\tr := BackupDescriptor_DescriptorRevision{ID: sqlbase.ID(id), Time: rev.Timestamp}\n\t\t\tif len(rev.RawBytes) != 0 {\n\t\t\t\tvar desc sqlbase.Descriptor\n\t\t\t\tif err := rev.GetProto(&desc); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tr.Desc = &desc\n\t\t\t\tif t := desc.GetTable(); t != nil && t.ReplacementOf.ID != sqlbase.InvalidID {\n\t\t\t\t\tpriorIDs[t.ID] = t.ReplacementOf.ID\n\t\t\t\t}\n\t\t\t}\n\t\t\tres = append(res, r)\n\t\t}\n\t}\n\treturn res, nil\n}",
"func (o *TransactionSlice) ReloadAllG() error {\n\tif o == nil {\n\t\treturn errors.New(\"model: empty TransactionSlice provided for reload all\")\n\t}\n\n\treturn o.ReloadAll(boil.GetDB())\n}",
"func FindAssetRevisionP(exec boil.Executor, orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(exec, orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func GetServedOrgs() {\n\tmsgPrinter := i18n.GetMessagePrinter()\n\t// set env to call agbot url\n\tif err := os.Setenv(\"HORIZON_URL\", cliutils.GetAgbotUrlBase()); err != nil {\n\t\tcliutils.Fatal(cliutils.CLI_GENERAL_ERROR, msgPrinter.Sprintf(\"unable to set env var 'HORIZON_URL', error %v\", err))\n\t}\n\n\t// Get the agbot servedorgs info\n\tservedOrgsInfo := agreementbot.ServedOrgs{} // the structure we will output\n\tcliutils.HorizonGet(\"cache/servedorg\", []int{200}, &servedOrgsInfo, false)\n\n\t// Output the combined info\n\tjsonBytes, err := json.MarshalIndent(servedOrgsInfo, \"\", cliutils.JSON_INDENT)\n\tif err != nil {\n\t\tcliutils.Fatal(cliutils.JSON_PARSING_ERROR, msgPrinter.Sprintf(\"failed to marshal 'hzn node list' output: %v\", err))\n\t}\n\tfmt.Printf(\"%s\\n\", jsonBytes)\n\n}",
"func (c *OrganizationsApisListCall) IncludeRevisions(includeRevisions bool) *OrganizationsApisListCall {\n\tc.urlParams_.Set(\"includeRevisions\", fmt.Sprint(includeRevisions))\n\treturn c\n}",
"func (o LookupApiResultOutput) Revision() pulumi.StringArrayOutput {\n\treturn o.ApplyT(func(v LookupApiResult) []string { return v.Revision }).(pulumi.StringArrayOutput)\n}",
"func printRevisionList(revisionList *servingv1.RevisionList, options hprinters.PrintOptions) ([]metav1beta1.TableRow, error) {\n\n\trows := make([]metav1beta1.TableRow, 0, len(revisionList.Items))\n\tfor i := range revisionList.Items {\n\t\trev := &revisionList.Items[i]\n\t\tr, err := printRevision(rev, options)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\trows = append(rows, r...)\n\t}\n\treturn rows, nil\n}",
"func (s BmProductaggdataStorage) GetAll(r api2go.Request, skip int, take int) []*BmModel.Productaggregation {\n\tin := BmModel.Productaggregation{}\n\tvar out []BmModel.Productaggregation\n\terr := s.db.FindMulti(r, &in, &out, skip, take)\n\tif err == nil {\n\t\tvar tmp []*BmModel.Productaggregation\n\t\tfor i := 0; i < len(out); i++ {\n\t\t\tptr := out[i]\n\t\t\ts.db.ResetIdWithId_(&ptr)\n\t\t\ttmp = append(tmp, &ptr)\n\t\t}\n\t\treturn tmp\n\t} else {\n\t\treturn nil //make(map[string]*BmModel.Productaggregation)\n\t}\n}",
"func (o *AssetRevision) Reload(exec boil.Executor) error {\n\tret, err := FindAssetRevision(exec, o.Orig)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*o = *ret\n\treturn nil\n}",
"func (v *infromerVersion) ControllerRevisions() v1beta1.ControllerRevisionLister {\n\treturn v.factory.Apps().V1beta1().ControllerRevisions().Lister()\n}",
"func (o *Source) AuthorsG(mods ...qm.QueryMod) authorQuery {\n\treturn o.Authors(boil.GetDB(), mods...)\n}",
"func (a *RepoAPI) ls(params interface{}) (resp *rpc.Response) {\n\tm := objx.New(cast.ToStringMap(params))\n\tvar revision []string\n\tif rev := m.Get(\"revision\").Str(); rev != \"\" {\n\t\trevision = []string{rev}\n\t}\n\treturn rpc.Success(util.Map{\n\t\t\"entries\": a.mods.Repo.ListPath(m.Get(\"name\").Str(), m.Get(\"path\").Str(), revision...),\n\t})\n}",
"func (s *ListDataSetRevisionsOutput) SetRevisions(v []*RevisionEntry) *ListDataSetRevisionsOutput {\n\ts.Revisions = v\n\treturn s\n}",
"func (a *RepoAPI) getAncestors(params interface{}) (resp *rpc.Response) {\n\tm := objx.New(cast.ToStringMap(params))\n\tvar limit []int\n\tif l := m.Get(\"limit\").Float64(); l > 0 {\n\t\tlimit = []int{int(l)}\n\t}\n\treturn rpc.Success(util.Map{\n\t\t\"commits\": a.mods.Repo.GetCommitAncestors(m.Get(\"name\").Str(), m.Get(\"commitHash\").Str(), limit...),\n\t})\n}",
"func (o *VoteSlice) ReloadAllG() error {\n\tif o == nil {\n\t\treturn errors.New(\"models: empty VoteSlice provided for reload all\")\n\t}\n\n\treturn o.ReloadAll(boil.GetDB())\n}",
"func (q exchangeCurrencyQuery) AllG() (ExchangeCurrencySlice, error) {\n\treturn q.All(boil.GetDB())\n}",
"func AssetRevisionExistsGP(orig int) bool {\n\te, err := AssetRevisionExists(boil.GetDB(), orig)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn e\n}",
"func ParseChangesets(rev *revision) ([]changeset, error){\n s := NewScanner(rev.data)\n for s.HasMoreTokens() {\n tok, err := s.NextToken()\n if err != nil {\n log.Println(err)\n } else {\n log.Println(string(tok.runes), \" : \", s.offset)\n }\n }\n return nil, nil\n}",
"func (o *AssetRevision) Insert(exec boil.Executor, whitelist ...string) error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no asset_revision provided for insertion\")\n\t}\n\n\tvar err error\n\n\tif err := o.doBeforeInsertHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\tnzDefaults := queries.NonZeroDefaultSet(assetRevisionColumnsWithDefault, o)\n\n\tkey := makeCacheKey(whitelist, nzDefaults)\n\tassetRevisionInsertCacheMut.RLock()\n\tcache, cached := assetRevisionInsertCache[key]\n\tassetRevisionInsertCacheMut.RUnlock()\n\n\tif !cached {\n\t\twl, returnColumns := strmangle.InsertColumnSet(\n\t\t\tassetRevisionColumns,\n\t\t\tassetRevisionColumnsWithDefault,\n\t\t\tassetRevisionColumnsWithoutDefault,\n\t\t\tnzDefaults,\n\t\t\twhitelist,\n\t\t)\n\n\t\tcache.valueMapping, err = queries.BindMapping(assetRevisionType, assetRevisionMapping, wl)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcache.retMapping, err = queries.BindMapping(assetRevisionType, assetRevisionMapping, returnColumns)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif len(wl) != 0 {\n\t\t\tcache.query = fmt.Sprintf(\"INSERT INTO \\\"asset_revision\\\" (\\\"%s\\\") VALUES (%s)\", strings.Join(wl, \"\\\",\\\"\"), strmangle.Placeholders(dialect.IndexPlaceholders, len(wl), 1, 1))\n\t\t} else {\n\t\t\tcache.query = \"INSERT INTO \\\"asset_revision\\\" DEFAULT VALUES\"\n\t\t}\n\n\t\tif len(cache.retMapping) != 0 {\n\t\t\tcache.query += fmt.Sprintf(\" RETURNING \\\"%s\\\"\", strings.Join(returnColumns, \"\\\",\\\"\"))\n\t\t}\n\t}\n\n\tvalue := reflect.Indirect(reflect.ValueOf(o))\n\tvals := queries.ValuesFromMapping(value, cache.valueMapping)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, cache.query)\n\t\tfmt.Fprintln(boil.DebugWriter, vals)\n\t}\n\n\tif len(cache.retMapping) != 0 {\n\t\terr = exec.QueryRow(cache.query, vals...).Scan(queries.PtrsFromMapping(value, cache.retMapping)...)\n\t} else {\n\t\t_, err = exec.Exec(cache.query, vals...)\n\t}\n\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to insert into asset_revision\")\n\t}\n\n\tif !cached {\n\t\tassetRevisionInsertCacheMut.Lock()\n\t\tassetRevisionInsertCache[key] = cache\n\t\tassetRevisionInsertCacheMut.Unlock()\n\t}\n\n\treturn o.doAfterInsertHooks(exec)\n}"
] |
[
"0.6972735",
"0.6332298",
"0.6320957",
"0.6246838",
"0.5935255",
"0.56957585",
"0.55409616",
"0.5353176",
"0.5296201",
"0.5235996",
"0.5217381",
"0.51690096",
"0.5135655",
"0.50341684",
"0.5011758",
"0.50107235",
"0.4968789",
"0.49401897",
"0.49196324",
"0.4900991",
"0.48489192",
"0.48412347",
"0.48174694",
"0.48072514",
"0.47856954",
"0.4775596",
"0.4742767",
"0.47353652",
"0.4714495",
"0.4708003",
"0.46610427",
"0.46390256",
"0.46048036",
"0.4604405",
"0.4600008",
"0.4597589",
"0.45853177",
"0.4577516",
"0.45582482",
"0.45368928",
"0.45306334",
"0.4521632",
"0.45147455",
"0.44982234",
"0.44847906",
"0.4457163",
"0.44490507",
"0.44255555",
"0.4395936",
"0.43831536",
"0.4368873",
"0.4368544",
"0.43683207",
"0.43631345",
"0.43515626",
"0.43502775",
"0.4345561",
"0.43417567",
"0.43318447",
"0.43315166",
"0.43209004",
"0.43200994",
"0.42913422",
"0.4283947",
"0.42831224",
"0.4280599",
"0.42798665",
"0.42508054",
"0.4247419",
"0.4242439",
"0.4242439",
"0.42351997",
"0.4234255",
"0.423281",
"0.4201275",
"0.41957402",
"0.4194937",
"0.41935477",
"0.4193466",
"0.41897777",
"0.41881576",
"0.41839105",
"0.41819677",
"0.41737378",
"0.41648707",
"0.41597086",
"0.41551512",
"0.41544795",
"0.41500363",
"0.41464612",
"0.4127251",
"0.4121779",
"0.41169086",
"0.4108401",
"0.4104451",
"0.41005486",
"0.4098023",
"0.40969518",
"0.408439",
"0.40841752"
] |
0.74843526
|
0
|
AssetRevisions retrieves all the records using an executor.
|
func AssetRevisions(exec boil.Executor, mods ...qm.QueryMod) assetRevisionQuery {
mods = append(mods, qm.From("\"asset_revision\""))
return assetRevisionQuery{NewQuery(exec, mods...)}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (q assetRevisionQuery) All() (AssetRevisionSlice, error) {\n\tvar o AssetRevisionSlice\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"public: failed to assign all query results to AssetRevision slice\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func getAllRevisions(\n\tctx context.Context,\n\tdb *client.DB,\n\tstartKey, endKey roachpb.Key,\n\tstartTime, endTime hlc.Timestamp,\n) ([]versionedValues, error) {\n\t// TODO(dt): version check.\n\theader := roachpb.Header{Timestamp: endTime}\n\treq := &roachpb.ExportRequest{\n\t\tSpan: roachpb.Span{Key: startKey, EndKey: endKey},\n\t\tStartTime: startTime,\n\t\tMVCCFilter: roachpb.MVCCFilter_All,\n\t\tReturnSST: true,\n\t}\n\tresp, pErr := client.SendWrappedWith(ctx, db.GetSender(), header, req)\n\tif pErr != nil {\n\t\treturn nil, pErr.GoError()\n\t}\n\n\tvar res []versionedValues\n\tfor _, file := range resp.(*roachpb.ExportResponse).Files {\n\t\tsst := engine.MakeRocksDBSstFileReader()\n\t\tdefer sst.Close()\n\n\t\tif err := sst.IngestExternalFile(file.SST); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstart, end := engine.MVCCKey{Key: startKey}, engine.MVCCKey{Key: endKey}\n\t\tif err := sst.Iterate(start, end, func(kv engine.MVCCKeyValue) (bool, error) {\n\t\t\tif len(res) == 0 || !res[len(res)-1].Key.Equal(kv.Key.Key) {\n\t\t\t\tres = append(res, versionedValues{Key: kv.Key.Key})\n\t\t\t}\n\t\t\tres[len(res)-1].Values = append(res[len(res)-1].Values, roachpb.Value{Timestamp: kv.Key.Timestamp, RawBytes: kv.Value})\n\t\t\treturn false, nil\n\t\t}); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn res, nil\n}",
"func (o *AssetRevisionSlice) ReloadAll(exec boil.Executor) error {\n\tif o == nil || len(*o) == 0 {\n\t\treturn nil\n\t}\n\n\tassetRevisions := AssetRevisionSlice{}\n\tvar args []interface{}\n\tfor _, obj := range *o {\n\t\tpkeyArgs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(obj)), assetRevisionPrimaryKeyMapping)\n\t\targs = append(args, pkeyArgs...)\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"SELECT \\\"asset_revision\\\".* FROM \\\"asset_revision\\\" WHERE (%s) IN (%s)\",\n\t\tstrings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, assetRevisionPrimaryKeyColumns), \",\"),\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, len(*o)*len(assetRevisionPrimaryKeyColumns), 1, len(assetRevisionPrimaryKeyColumns)),\n\t)\n\n\tq := queries.Raw(exec, query, args...)\n\n\terr := q.Bind(&assetRevisions)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to reload all in AssetRevisionSlice\")\n\t}\n\n\t*o = assetRevisions\n\n\treturn nil\n}",
"func (client ContainerAppsRevisionsClient) ListRevisionsResponder(resp *http.Response) (result RevisionCollection, err error) {\n\terr = autorest.Respond(\n\t\tresp,\n\t\tazure.WithErrorUnlessStatusCode(http.StatusOK),\n\t\tautorest.ByUnmarshallingJSON(&result),\n\t\tautorest.ByClosing())\n\tresult.Response = autorest.Response{Response: resp}\n\treturn\n}",
"func (client ContainerAppsRevisionsClient) ListRevisionsSender(req *http.Request) (*http.Response, error) {\n\treturn client.Send(req, azure.DoRetryWithRegistration(client.Client))\n}",
"func AssetRevisionsG(mods ...qm.QueryMod) assetRevisionQuery {\n\treturn AssetRevisions(boil.GetDB(), mods...)\n}",
"func (client ContainerAppsRevisionsClient) ListRevisions(ctx context.Context, resourceGroupName string, containerAppName string) (result RevisionCollectionPage, err error) {\n\tif tracing.IsEnabled() {\n\t\tctx = tracing.StartSpan(ctx, fqdn+\"/ContainerAppsRevisionsClient.ListRevisions\")\n\t\tdefer func() {\n\t\t\tsc := -1\n\t\t\tif result.rc.Response.Response != nil {\n\t\t\t\tsc = result.rc.Response.Response.StatusCode\n\t\t\t}\n\t\t\ttracing.EndSpan(ctx, sc, err)\n\t\t}()\n\t}\n\tif err := validation.Validate([]validation.Validation{\n\t\t{TargetValue: resourceGroupName,\n\t\t\tConstraints: []validation.Constraint{{Target: \"resourceGroupName\", Name: validation.MaxLength, Rule: 90, Chain: nil},\n\t\t\t\t{Target: \"resourceGroupName\", Name: validation.MinLength, Rule: 1, Chain: nil},\n\t\t\t\t{Target: \"resourceGroupName\", Name: validation.Pattern, Rule: `^[-\\w\\._\\(\\)]+[^\\.]$`, Chain: nil}}}}); err != nil {\n\t\treturn result, validation.NewError(\"web.ContainerAppsRevisionsClient\", \"ListRevisions\", err.Error())\n\t}\n\n\tresult.fn = client.listRevisionsNextResults\n\treq, err := client.ListRevisionsPreparer(ctx, resourceGroupName, containerAppName)\n\tif err != nil {\n\t\terr = autorest.NewErrorWithError(err, \"web.ContainerAppsRevisionsClient\", \"ListRevisions\", nil, \"Failure preparing request\")\n\t\treturn\n\t}\n\n\tresp, err := client.ListRevisionsSender(req)\n\tif err != nil {\n\t\tresult.rc.Response = autorest.Response{Response: resp}\n\t\terr = autorest.NewErrorWithError(err, \"web.ContainerAppsRevisionsClient\", \"ListRevisions\", resp, \"Failure sending request\")\n\t\treturn\n\t}\n\n\tresult.rc, err = client.ListRevisionsResponder(resp)\n\tif err != nil {\n\t\terr = autorest.NewErrorWithError(err, \"web.ContainerAppsRevisionsClient\", \"ListRevisions\", resp, \"Failure responding to request\")\n\t\treturn\n\t}\n\tif result.rc.hasNextLink() && result.rc.IsEmpty() {\n\t\terr = result.NextWithContext(ctx)\n\t\treturn\n\t}\n\n\treturn\n}",
"func (reg *defaultRegistry) GetAllRevisionsForPolicy(policyGen runtime.Generation) ([]*engine.Revision, error) {\n\t// TODO: this method is slow, needs indexes\n\tvar revisions []*engine.Revision\n\terr := reg.store.Find(engine.TypeRevision.Kind, &revisions, store.WithKey(engine.RevisionKey), store.WithWhereEq(\"PolicyGen\", policyGen))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn revisions, nil\n}",
"func (assetRevisionL) LoadAsset(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Asset\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Asset\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Asset = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Asset == foreign.ID {\n\t\t\t\tlocal.R.Asset = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (c *Client) Revisions(name string) ([]Release, error) {\n\tresponse, err := c.client.ReleaseHistory(name,\n\t\thelm.WithMaxHistory(maxHistory))\n\tif err != nil {\n\t\treturn nil, trace.Wrap(err)\n\t}\n\tvar releases []Release\n\tif response != nil && response.Releases != nil {\n\t\tfor _, item := range response.Releases {\n\t\t\treleases = append(releases, *(fromHelm(item)))\n\t\t}\n\t}\n\treturn releases, nil\n}",
"func FindAssetRevision(exec boil.Executor, orig int, selectCols ...string) (*AssetRevision, error) {\n\tassetRevisionObj := &AssetRevision{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"asset_revision\\\" where \\\"orig\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, orig)\n\n\terr := q.Bind(assetRevisionObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"public: unable to select from asset_revision\")\n\t}\n\n\treturn assetRevisionObj, nil\n}",
"func Assets(exec boil.Executor, mods ...qm.QueryMod) assetQuery {\n\tmods = append(mods, qm.From(\"\\\"audit\\\".\\\"asset\\\"\"))\n\treturn assetQuery{NewQuery(exec, mods...)}\n}",
"func (c *Client) StreamRevisions(ctx context.Context, startRevision int64, out chan<- *types.MapRootV1) error {\n\tdefer close(out)\n\twait := time.NewTicker(c.RetryDelay)\n\tdefer wait.Stop()\n\tfor i := startRevision; ; {\n\t\tmr, err := c.VerifiedGetRevision(ctx, i)\n\n\t\t// If this revision was not found, wait and retry.\n\t\tif s, _ := status.FromError(err); s.Code() == codes.NotFound {\n\t\t\tglog.Infof(\"Waiting for a new revision to appear\")\n\t\t\tselect {\n\t\t\tcase <-ctx.Done():\n\t\t\t\treturn ctx.Err()\n\t\t\tcase <-wait.C:\n\t\t\t\tcontinue\n\t\t\t}\n\t\t} else if err != nil {\n\t\t\tglog.Warningf(\"GetRevision(%v): %v\", i, err)\n\t\t\treturn err\n\t\t}\n\n\t\tselect {\n\t\tcase <-ctx.Done():\n\t\t\treturn ctx.Err()\n\t\tcase out <- mr:\n\t\t\ti++\n\t\t}\n\t}\n}",
"func (client *ContainerAppsDiagnosticsClient) listRevisionsHandleResponse(resp *http.Response) (ContainerAppsDiagnosticsClientListRevisionsResponse, error) {\n\tresult := ContainerAppsDiagnosticsClientListRevisionsResponse{}\n\tif err := runtime.UnmarshalAsJSON(resp, &result.RevisionCollection); err != nil {\n\t\treturn ContainerAppsDiagnosticsClientListRevisionsResponse{}, err\n\t}\n\treturn result, nil\n}",
"func (dc *DeploymentController) getAllReplicaSetsAndSyncRevision(ctx context.Context, d *apps.Deployment, rsList []*apps.ReplicaSet, createIfNotExisted bool) (*apps.ReplicaSet, []*apps.ReplicaSet, error) {\n\t_, allOldRSs := deploymentutil.FindOldReplicaSets(d, rsList)\n\n\t// Get new replica set with the updated revision number\n\tnewRS, err := dc.getNewReplicaSet(ctx, d, rsList, allOldRSs, createIfNotExisted)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\treturn newRS, allOldRSs, nil\n}",
"func (r *Store) ListRevisions(ctx context.Context, name string) ([]backend.Revision, error) {\n\tstore, name := r.getStore(name)\n\n\treturn store.ListRevisions(ctx, name)\n}",
"func FindAssetRevisionP(exec boil.Executor, orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(exec, orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func getChildrenAsset(id int) ([]Asset, error) {\n\tparams := map[string]string{\n\t\t\"predicate\": fmt.Sprintf(\"parent='%d'\", id),\n\t}\n\tresp, err := get(\"asset\", params)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Failed TCMD request\")\n\t}\n\n\tvar result []Asset\n\terr = json.Unmarshal(resp, &result)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Failed to unmarshal TCMD response\")\n\t}\n\n\tif len(result) > 0 {\n\t\treturn result, nil\n\t}\n\treturn nil, nil\n}",
"func (cr APIContractRepository) List(ctx context.Context, projectID uint, clusterID uint) ([]*models.APIContractRevision, error) {\n\tvar confs []*models.APIContractRevision\n\n\tif clusterID == 0 {\n\t\ttx := cr.db.Where(\"project_id = ?\", projectID).Find(&confs).Order(\"created_at desc\")\n\t\tif tx.Error != nil {\n\t\t\treturn nil, tx.Error\n\t\t}\n\t\treturn confs, nil\n\t}\n\ttx := cr.db.Where(\"project_id = ? and cluster_id = ?\", projectID, clusterID).Find(&confs).Order(\"created_at desc\")\n\tif tx.Error != nil {\n\t\treturn nil, tx.Error\n\t}\n\n\treturn confs, nil\n}",
"func (o AssetRevisionSlice) DeleteAll(exec boil.Executor) error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision slice provided for delete all\")\n\t}\n\n\tif len(o) == 0 {\n\t\treturn nil\n\t}\n\n\tif len(assetRevisionBeforeDeleteHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doBeforeDeleteHooks(exec); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tvar args []interface{}\n\tfor _, obj := range o {\n\t\tpkeyArgs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(obj)), assetRevisionPrimaryKeyMapping)\n\t\targs = append(args, pkeyArgs...)\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"DELETE FROM \\\"asset_revision\\\" WHERE (%s) IN (%s)\",\n\t\tstrings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, assetRevisionPrimaryKeyColumns), \",\"),\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, len(o)*len(assetRevisionPrimaryKeyColumns), 1, len(assetRevisionPrimaryKeyColumns)),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, args)\n\t}\n\n\t_, err := exec.Exec(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to delete all from assetRevision slice\")\n\t}\n\n\tif len(assetRevisionAfterDeleteHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterDeleteHooks(exec); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (assetRevisionL) LoadOrig(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Orig\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Orig\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Orig = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Orig == foreign.ID {\n\t\t\t\tlocal.R.Orig = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (db *Database) QueryAssetChartHistory(asset string, limit int) ([]schema.StatAssetInfoList1H, error) {\n\tchartHistory := make([]schema.StatAssetInfoList1H, 0)\n\n\terr := db.Model(&chartHistory).\n\t\tWhere(\"asset = ?\", asset).\n\t\tLimit(limit).\n\t\tOrder(\"id DESC\").\n\t\tSelect()\n\n\tif err == pg.ErrNoRows {\n\t\treturn chartHistory, fmt.Errorf(\"no rows in block table: %s\", err)\n\t}\n\n\tif err != nil {\n\t\treturn chartHistory, fmt.Errorf(\"unexpected database error: %s\", err)\n\t}\n\n\treturn chartHistory, nil\n}",
"func (wq *WorkflowQuery) QueryRevisions() *RevisionQuery {\n\tquery := &RevisionQuery{config: wq.config}\n\tquery.path = func(ctx context.Context) (fromU *sql.Selector, err error) {\n\t\tif err := wq.prepareQuery(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tselector := wq.sqlQuery(ctx)\n\t\tif err := selector.Err(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstep := sqlgraph.NewStep(\n\t\t\tsqlgraph.From(workflow.Table, workflow.FieldID, selector),\n\t\t\tsqlgraph.To(revision.Table, revision.FieldID),\n\t\t\tsqlgraph.Edge(sqlgraph.O2M, false, workflow.RevisionsTable, workflow.RevisionsColumn),\n\t\t)\n\t\tfromU = sqlgraph.SetNeighbors(wq.driver.Dialect(), step)\n\t\treturn fromU, nil\n\t}\n\treturn query\n}",
"func FindAssetRevisionG(orig int, selectCols ...string) (*AssetRevision, error) {\n\treturn FindAssetRevision(boil.GetDB(), orig, selectCols...)\n}",
"func FindAssetRevisionGP(orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(boil.GetDB(), orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (r *ProjectsLocationsOsPolicyAssignmentsService) ListRevisions(name string) *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall {\n\tc := &ProjectsLocationsOsPolicyAssignmentsListRevisionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}\n\tc.name = name\n\treturn c\n}",
"func ParseChangesets(rev *revision) ([]changeset, error){\n s := NewScanner(rev.data)\n for s.HasMoreTokens() {\n tok, err := s.NextToken()\n if err != nil {\n log.Println(err)\n } else {\n log.Println(string(tok.runes), \" : \", s.offset)\n }\n }\n return nil, nil\n}",
"func (gui *Gui) renderRemotes(e *git.RepoEntity) error {\n\tvar err error\n\tout, err := gui.g.View(remoteViewFeature.Name)\n\tif err != nil {\n\t\treturn err\n\t}\n\tout.Clear()\n\tcurrentindex := 0\n\ttotalRemotes := len(e.Remotes)\n\tif totalRemotes > 0 {\n\t\tfor i, r := range e.Remotes {\n\t\t\t_, shortURL := trimRemoteURL(r.URL[0])\n\t\t\tif r.Name == e.Remote.Name {\n\t\t\t\tcurrentindex = i\n\t\t\t\tfmt.Fprintln(out, selectionIndicator+r.Name+\": \"+shortURL)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfmt.Fprintln(out, tab+r.Name+\": \"+shortURL)\n\t\t}\n\t\tif err = gui.smartAnchorRelativeToLine(out, currentindex, totalRemotes); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}",
"func (o *AssetRevision) Update(exec boil.Executor, whitelist ...string) error {\n\tvar err error\n\tif err = o.doBeforeUpdateHooks(exec); err != nil {\n\t\treturn err\n\t}\n\tkey := makeCacheKey(whitelist, nil)\n\tassetRevisionUpdateCacheMut.RLock()\n\tcache, cached := assetRevisionUpdateCache[key]\n\tassetRevisionUpdateCacheMut.RUnlock()\n\n\tif !cached {\n\t\twl := strmangle.UpdateColumnSet(assetRevisionColumns, assetRevisionPrimaryKeyColumns, whitelist)\n\n\t\tif len(whitelist) == 0 {\n\t\t\twl = strmangle.SetComplement(wl, []string{\"created_at\"})\n\t\t}\n\t\tif len(wl) == 0 {\n\t\t\treturn errors.New(\"public: unable to update asset_revision, could not build whitelist\")\n\t\t}\n\n\t\tcache.query = fmt.Sprintf(\"UPDATE \\\"asset_revision\\\" SET %s WHERE %s\",\n\t\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, wl),\n\t\t\tstrmangle.WhereClause(\"\\\"\", \"\\\"\", len(wl)+1, assetRevisionPrimaryKeyColumns),\n\t\t)\n\t\tcache.valueMapping, err = queries.BindMapping(assetRevisionType, assetRevisionMapping, append(wl, assetRevisionPrimaryKeyColumns...))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tvalues := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), cache.valueMapping)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, cache.query)\n\t\tfmt.Fprintln(boil.DebugWriter, values)\n\t}\n\n\t_, err = exec.Exec(cache.query, values...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to update asset_revision row\")\n\t}\n\n\tif !cached {\n\t\tassetRevisionUpdateCacheMut.Lock()\n\t\tassetRevisionUpdateCache[key] = cache\n\t\tassetRevisionUpdateCacheMut.Unlock()\n\t}\n\n\treturn o.doAfterUpdateHooks(exec)\n}",
"func (client *ContainerAppsDiagnosticsClient) NewListRevisionsPager(resourceGroupName string, containerAppName string, options *ContainerAppsDiagnosticsClientListRevisionsOptions) *runtime.Pager[ContainerAppsDiagnosticsClientListRevisionsResponse] {\n\treturn runtime.NewPager(runtime.PagingHandler[ContainerAppsDiagnosticsClientListRevisionsResponse]{\n\t\tMore: func(page ContainerAppsDiagnosticsClientListRevisionsResponse) bool {\n\t\t\treturn page.NextLink != nil && len(*page.NextLink) > 0\n\t\t},\n\t\tFetcher: func(ctx context.Context, page *ContainerAppsDiagnosticsClientListRevisionsResponse) (ContainerAppsDiagnosticsClientListRevisionsResponse, error) {\n\t\t\tvar req *policy.Request\n\t\t\tvar err error\n\t\t\tif page == nil {\n\t\t\t\treq, err = client.listRevisionsCreateRequest(ctx, resourceGroupName, containerAppName, options)\n\t\t\t} else {\n\t\t\t\treq, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink)\n\t\t\t}\n\t\t\tif err != nil {\n\t\t\t\treturn ContainerAppsDiagnosticsClientListRevisionsResponse{}, err\n\t\t\t}\n\t\t\tresp, err := client.internal.Pipeline().Do(req)\n\t\t\tif err != nil {\n\t\t\t\treturn ContainerAppsDiagnosticsClientListRevisionsResponse{}, err\n\t\t\t}\n\t\t\tif !runtime.HasStatusCode(resp, http.StatusOK) {\n\t\t\t\treturn ContainerAppsDiagnosticsClientListRevisionsResponse{}, runtime.NewResponseError(resp)\n\t\t\t}\n\t\t\treturn client.listRevisionsHandleResponse(resp)\n\t\t},\n\t})\n}",
"func (q assetRevisionQuery) AllP() AssetRevisionSlice {\n\to, err := q.All()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (client ContainerAppsRevisionsClient) ListRevisionsComplete(ctx context.Context, resourceGroupName string, containerAppName string) (result RevisionCollectionIterator, err error) {\n\tif tracing.IsEnabled() {\n\t\tctx = tracing.StartSpan(ctx, fqdn+\"/ContainerAppsRevisionsClient.ListRevisions\")\n\t\tdefer func() {\n\t\t\tsc := -1\n\t\t\tif result.Response().Response.Response != nil {\n\t\t\t\tsc = result.page.Response().Response.Response.StatusCode\n\t\t\t}\n\t\t\ttracing.EndSpan(ctx, sc, err)\n\t\t}()\n\t}\n\tresult.page, err = client.ListRevisions(ctx, resourceGroupName, containerAppName)\n\treturn\n}",
"func initiateRevisionLoop(host modules.HostDBEntry, contract *SafeContract, rpc types.Specifier, cancel <-chan struct{}, rl *ratelimit.RateLimit) (net.Conn, chan struct{}, error) {\n\tc, err := (&net.Dialer{\n\t\tCancel: cancel,\n\t\tTimeout: 45 * time.Second, // TODO: Constant\n\t}).Dial(\"tcp\", string(host.NetAddress))\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tconn := ratelimit.NewRLConn(c, rl, cancel)\n\n\tcloseChan := make(chan struct{})\n\tgo func() {\n\t\tselect {\n\t\tcase <-cancel:\n\t\t\tconn.Close()\n\t\tcase <-closeChan:\n\t\t}\n\t}()\n\n\t// allot 2 minutes for RPC request + revision exchange\n\textendDeadline(conn, modules.NegotiateRecentRevisionTime)\n\tdefer extendDeadline(conn, time.Hour)\n\tif err := encoding.WriteObject(conn, rpc); err != nil {\n\t\tconn.Close()\n\t\tclose(closeChan)\n\t\treturn nil, closeChan, errors.New(\"couldn't initiate RPC: \" + err.Error())\n\t}\n\tif err := verifyRecentRevision(conn, contract, host.Version); err != nil {\n\t\tconn.Close() // TODO: close gracefully if host has entered revision loop\n\t\tclose(closeChan)\n\t\treturn nil, closeChan, err\n\t}\n\treturn conn, closeChan, nil\n}",
"func getRevisionDescriptions(ctx context.Context, client clientservingv1.KnServingClient, service *servingv1.Service, withDetails bool) ([]*revisionDesc, error) {\n\trevisionsSeen := sets.NewString()\n\trevisionDescs := []*revisionDesc{}\n\n\ttrafficTargets := service.Status.Traffic\n\tvar err error\n\tfor i := range trafficTargets {\n\t\ttarget := trafficTargets[i]\n\t\trevision, err := extractRevisionFromTarget(ctx, client, target)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"cannot extract revision from service %s: %w\", service.Name, err)\n\t\t}\n\t\trevisionsSeen.Insert(revision.Name)\n\t\tdesc, err := newRevisionDesc(*revision, &target, service)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\trevisionDescs = append(revisionDescs, desc)\n\t}\n\tif revisionDescs, err = completeWithLatestRevisions(ctx, client, service, revisionsSeen, revisionDescs); err != nil {\n\t\treturn nil, err\n\t}\n\tif withDetails {\n\t\tif revisionDescs, err = completeWithUntargetedRevisions(ctx, client, service, revisionsSeen, revisionDescs); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn orderByConfigurationGeneration(revisionDescs), nil\n}",
"func (d *TileDB) Versions(revision int, module string) ([]string, error) {\n\tvar bs []byte\n\tif err := d.db.QueryRow(\"SELECT leaves FROM logs WHERE revision=? AND module=?\", revision, module).Scan(&bs); err != nil {\n\t\treturn nil, err\n\t}\n\tvar versions []string\n\tif err := json.Unmarshal(bs, &versions); err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to parse tile at revision=%d, path=%x: %v\", revision, module, err)\n\t}\n\treturn versions, nil\n}",
"func (r *Repository) Blobs() (*BlobIter, error) {\n\titer, err := r.s.IterObjects(plumbing.BlobObject)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn NewBlobIter(r, iter), nil\n}",
"func (q assetQuery) All() (AssetSlice, error) {\n\tvar o AssetSlice\n\n\terr := q.Bind(&o)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"models: failed to assign all query results to Asset slice\")\n\t}\n\n\tif len(assetAfterSelectHooks) != 0 {\n\t\tfor _, obj := range o {\n\t\t\tif err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\t\t\treturn o, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn o, nil\n}",
"func (q assetRevisionQuery) One() (*AssetRevision, error) {\n\to := &AssetRevision{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"public: failed to execute a one query for asset_revision\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (c *Files) ListRevisions(in *ListRevisionsInput) (out *ListRevisionsOutput, err error) {\n\tbody, err := c.call(\"/files/list_revisions\", in)\n\tif err != nil {\n\t\treturn\n\t}\n\tdefer body.Close()\n\n\terr = json.NewDecoder(body).Decode(&out)\n\treturn\n}",
"func (a *RepoAPI) readFileLines(params interface{}) (resp *rpc.Response) {\n\tm := objx.New(cast.ToStringMap(params))\n\tvar revision []string\n\tif rev := m.Get(\"revision\").Str(); rev != \"\" {\n\t\trevision = []string{rev}\n\t}\n\treturn rpc.Success(util.Map{\n\t\t\"lines\": a.mods.Repo.ReadFileLines(m.Get(\"name\").Str(), m.Get(\"path\").Str(), revision...),\n\t})\n}",
"func (client ContainerAppsRevisionsClient) GetRevisionResponder(resp *http.Response) (result Revision, err error) {\n\terr = autorest.Respond(\n\t\tresp,\n\t\tazure.WithErrorUnlessStatusCode(http.StatusOK),\n\t\tautorest.ByUnmarshallingJSON(&result),\n\t\tautorest.ByClosing())\n\tresult.Response = autorest.Response{Response: resp}\n\treturn\n}",
"func (a *SnapshotApiService) SnapshotsGetExecute(r ApiSnapshotsGetRequest) (Snapshots, *APIResponse, error) {\n\tvar (\n\t\tlocalVarHTTPMethod = _nethttp.MethodGet\n\t\tlocalVarPostBody interface{}\n\t\tlocalVarFormFileName string\n\t\tlocalVarFileName string\n\t\tlocalVarFileBytes []byte\n\t\tlocalVarReturnValue Snapshots\n\t)\n\n\tlocalBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, \"SnapshotApiService.SnapshotsGet\")\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}\n\t}\n\n\tlocalVarPath := localBasePath + \"/snapshots\"\n\n\tlocalVarHeaderParams := make(map[string]string)\n\tlocalVarQueryParams := _neturl.Values{}\n\tlocalVarFormParams := _neturl.Values{}\n\n\tif r.pretty != nil {\n\t\tlocalVarQueryParams.Add(\"pretty\", parameterToString(*r.pretty, \"\"))\n\t}\n\tif r.depth != nil {\n\t\tlocalVarQueryParams.Add(\"depth\", parameterToString(*r.depth, \"\"))\n\t}\n\t// to determine the Content-Type header\n\tlocalVarHTTPContentTypes := []string{}\n\n\t// set Content-Type header\n\tlocalVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)\n\tif localVarHTTPContentType != \"\" {\n\t\tlocalVarHeaderParams[\"Content-Type\"] = localVarHTTPContentType\n\t}\n\n\t// to determine the Accept header\n\tlocalVarHTTPHeaderAccepts := []string{\"application/json\"}\n\n\t// set Accept header\n\tlocalVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)\n\tif localVarHTTPHeaderAccept != \"\" {\n\t\tlocalVarHeaderParams[\"Accept\"] = localVarHTTPHeaderAccept\n\t}\n\tif r.xContractNumber != nil {\n\t\tlocalVarHeaderParams[\"X-Contract-Number\"] = parameterToString(*r.xContractNumber, \"\")\n\t}\n\tif r.ctx != nil {\n\t\t// API Key Authentication\n\t\tif auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {\n\t\t\tif apiKey, ok := auth[\"Token Authentication\"]; ok {\n\t\t\t\tvar key string\n\t\t\t\tif apiKey.Prefix != \"\" {\n\t\t\t\t\tkey = apiKey.Prefix + \" \" + apiKey.Key\n\t\t\t\t} else {\n\t\t\t\t\tkey = apiKey.Key\n\t\t\t\t}\n\t\t\t\tlocalVarHeaderParams[\"Authorization\"] = key\n\t\t\t}\n\t\t}\n\t}\n\treq, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, err\n\t}\n\n\tlocalVarHTTPResponse, err := a.client.callAPI(req)\n\n\tlocalVarAPIResponse := &APIResponse {\n\t\tResponse: localVarHTTPResponse,\n\t\tMethod: localVarHTTPMethod,\n\t\tRequestURL: localVarPath,\n\t\tOperation: \"SnapshotsGet\",\n\t}\n\n\tif err != nil || localVarHTTPResponse == nil {\n\t\treturn localVarReturnValue, localVarAPIResponse, err\n\t}\n\n\tlocalVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)\n\tlocalVarHTTPResponse.Body.Close()\n\tlocalVarAPIResponse.Payload = localVarBody\n\tif err != nil {\n\t\treturn localVarReturnValue, localVarAPIResponse, err\n\t}\n\n\tif localVarHTTPResponse.StatusCode >= 300 {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: localVarHTTPResponse.Status,\n\t\t}\n\t\t\tvar v Error\n\t\t\terr = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\t\t\tif err != nil {\n\t\t\t\tnewErr.error = err.Error()\n\t\t\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t\t\t}\n\t\t\tnewErr.model = v\n\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t}\n\n\terr = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\tif err != nil {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: err.Error(),\n\t\t}\n\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t}\n\n\treturn localVarReturnValue, localVarAPIResponse, nil\n}",
"func (client ContainerAppsRevisionsClient) ListRevisionsPreparer(ctx context.Context, resourceGroupName string, containerAppName string) (*http.Request, error) {\n\tpathParameters := map[string]interface{}{\n\t\t\"containerAppName\": autorest.Encode(\"path\", containerAppName),\n\t\t\"resourceGroupName\": autorest.Encode(\"path\", resourceGroupName),\n\t\t\"subscriptionId\": autorest.Encode(\"path\", client.SubscriptionID),\n\t}\n\n\tconst APIVersion = \"2021-03-01\"\n\tqueryParameters := map[string]interface{}{\n\t\t\"api-version\": APIVersion,\n\t}\n\n\tpreparer := autorest.CreatePreparer(\n\t\tautorest.AsGet(),\n\t\tautorest.WithBaseURL(client.BaseURI),\n\t\tautorest.WithPathParameters(\"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions\", pathParameters),\n\t\tautorest.WithQueryParameters(queryParameters))\n\treturn preparer.Prepare((&http.Request{}).WithContext(ctx))\n}",
"func (o *AssetRevision) Insert(exec boil.Executor, whitelist ...string) error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no asset_revision provided for insertion\")\n\t}\n\n\tvar err error\n\n\tif err := o.doBeforeInsertHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\tnzDefaults := queries.NonZeroDefaultSet(assetRevisionColumnsWithDefault, o)\n\n\tkey := makeCacheKey(whitelist, nzDefaults)\n\tassetRevisionInsertCacheMut.RLock()\n\tcache, cached := assetRevisionInsertCache[key]\n\tassetRevisionInsertCacheMut.RUnlock()\n\n\tif !cached {\n\t\twl, returnColumns := strmangle.InsertColumnSet(\n\t\t\tassetRevisionColumns,\n\t\t\tassetRevisionColumnsWithDefault,\n\t\t\tassetRevisionColumnsWithoutDefault,\n\t\t\tnzDefaults,\n\t\t\twhitelist,\n\t\t)\n\n\t\tcache.valueMapping, err = queries.BindMapping(assetRevisionType, assetRevisionMapping, wl)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcache.retMapping, err = queries.BindMapping(assetRevisionType, assetRevisionMapping, returnColumns)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif len(wl) != 0 {\n\t\t\tcache.query = fmt.Sprintf(\"INSERT INTO \\\"asset_revision\\\" (\\\"%s\\\") VALUES (%s)\", strings.Join(wl, \"\\\",\\\"\"), strmangle.Placeholders(dialect.IndexPlaceholders, len(wl), 1, 1))\n\t\t} else {\n\t\t\tcache.query = \"INSERT INTO \\\"asset_revision\\\" DEFAULT VALUES\"\n\t\t}\n\n\t\tif len(cache.retMapping) != 0 {\n\t\t\tcache.query += fmt.Sprintf(\" RETURNING \\\"%s\\\"\", strings.Join(returnColumns, \"\\\",\\\"\"))\n\t\t}\n\t}\n\n\tvalue := reflect.Indirect(reflect.ValueOf(o))\n\tvals := queries.ValuesFromMapping(value, cache.valueMapping)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, cache.query)\n\t\tfmt.Fprintln(boil.DebugWriter, vals)\n\t}\n\n\tif len(cache.retMapping) != 0 {\n\t\terr = exec.QueryRow(cache.query, vals...).Scan(queries.PtrsFromMapping(value, cache.retMapping)...)\n\t} else {\n\t\t_, err = exec.Exec(cache.query, vals...)\n\t}\n\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to insert into asset_revision\")\n\t}\n\n\tif !cached {\n\t\tassetRevisionInsertCacheMut.Lock()\n\t\tassetRevisionInsertCache[key] = cache\n\t\tassetRevisionInsertCacheMut.Unlock()\n\t}\n\n\treturn o.doAfterInsertHooks(exec)\n}",
"func (a *RepoAPI) ls(params interface{}) (resp *rpc.Response) {\n\tm := objx.New(cast.ToStringMap(params))\n\tvar revision []string\n\tif rev := m.Get(\"revision\").Str(); rev != \"\" {\n\t\trevision = []string{rev}\n\t}\n\treturn rpc.Success(util.Map{\n\t\t\"entries\": a.mods.Repo.ListPath(m.Get(\"name\").Str(), m.Get(\"path\").Str(), revision...),\n\t})\n}",
"func (r *Reconciler) gcRevisions(ctx context.Context, app *v1alpha1.App) error {\n\tlogger := logging.FromContext(ctx)\n\tlogger.Debugf(\"Checking for revisions that need to adjust %s...\", autoscaling.MinScaleAnnotationKey)\n\tdefer logger.Debugf(\"Done checking for revisions that need to adjust %s.\", autoscaling.MinScaleAnnotationKey)\n\n\tif app.Status.LatestCreatedRevisionName != app.Status.LatestReadyRevisionName {\n\t\tlogger.Debugf(\"Not willing to garbage collection Revisions while the latest is not ready...\")\n\t\treturn nil\n\t}\n\n\tselector := labels.Set{\"serving.knative.dev/configuration\": app.Name}.AsSelector()\n\trevs, err := r.knativeRevisionLister.Revisions(app.Namespace).List(selector)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif len(revs) == 0 {\n\t\treturn nil\n\t}\n\n\trevisionClient := r.ServingClientSet.ServingV1alpha1().Revisions(app.Namespace)\n\n\tparseGeneration := func(rev *serving.Revision) int64 {\n\t\tv, ok := rev.Labels[\"serving.knative.dev/configurationGeneration\"]\n\t\tif !ok {\n\t\t\tlogger.Warnf(\"Revision did not contain ConfigurationGeneration\")\n\t\t\treturn -1\n\t\t}\n\n\t\tx, err := strconv.ParseInt(v, 10, 64)\n\t\tif err != nil {\n\t\t\tlogger.Warnf(\"Revision had an invalid ConfigurationGeneration: %s\", err)\n\t\t\treturn -1\n\t\t}\n\t\treturn x\n\t}\n\n\t// descending\n\tsort.Slice(revs, func(i int, j int) bool {\n\t\treturn parseGeneration(revs[j]) < parseGeneration(revs[i])\n\t})\n\n\t// Find the latest generation that is ready\n\tfirstReadyIdx := -1\n\tfor i, rev := range revs {\n\t\tif !rev.Status.IsReady() {\n\t\t\tcontinue\n\t\t}\n\t\tfirstReadyIdx = i\n\t\tbreak\n\t}\n\n\tif firstReadyIdx < 0 {\n\t\t// Didn't find any ready revisions. Move on\n\t\treturn nil\n\t}\n\n\t// delete everything after the latest ready generation\n\tfor _, rev := range revs[firstReadyIdx+1:] {\n\t\tlogger.Infof(\"Garbage collecting Revision %s...\", rev.Name)\n\t\tif err := revisionClient.Delete(rev.Name, &metav1.DeleteOptions{}); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}",
"func ExampleReservationClient_NewListRevisionsPager() {\n\tcred, err := azidentity.NewDefaultAzureCredential(nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to obtain a credential: %v\", err)\n\t}\n\tctx := context.Background()\n\tclient, err := armreservations.NewReservationClient(cred, nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to create client: %v\", err)\n\t}\n\tpager := client.NewListRevisionsPager(\"6ef59113-3482-40da-8d79-787f823e34bc\",\n\t\t\"276e7ae4-84d0-4da6-ab4b-d6b94f3557da\",\n\t\tnil)\n\tfor pager.More() {\n\t\tnextResult, err := pager.NextPage(ctx)\n\t\tif err != nil {\n\t\t\tlog.Fatalf(\"failed to advance page: %v\", err)\n\t\t}\n\t\tfor _, v := range nextResult.Value {\n\t\t\t// TODO: use page item\n\t\t\t_ = v\n\t\t}\n\t}\n}",
"func printRevision(revision *servingv1.Revision, options hprinters.PrintOptions) ([]metav1beta1.TableRow, error) {\n\tname := revision.Name\n\tservice := revision.Labels[serving.ServiceLabelKey]\n\ttraffic := revision.Annotations[RevisionTrafficAnnotation]\n\ttags := revision.Annotations[RevisionTagsAnnotation]\n\tgeneration := revision.Labels[serving.ConfigurationGenerationLabelKey]\n\tage := commands.TranslateTimestampSince(revision.CreationTimestamp)\n\tconditions := commands.ConditionsValue(revision.Status.Conditions)\n\tready := commands.ReadyCondition(revision.Status.Conditions)\n\treason := commands.NonReadyConditionReason(revision.Status.Conditions)\n\trow := metav1beta1.TableRow{\n\t\tObject: runtime.RawExtension{Object: revision},\n\t}\n\n\t// Namespace is first column for \"-A\"\n\tif options.AllNamespaces {\n\t\trow.Cells = append(row.Cells, trunc(revision.Namespace))\n\t}\n\n\trow.Cells = append(row.Cells,\n\t\ttrunc(name),\n\t\ttrunc(service),\n\t\ttrunc(traffic),\n\t\ttrunc(tags),\n\t\ttrunc(generation),\n\t\ttrunc(age),\n\t\ttrunc(conditions),\n\t\ttrunc(ready),\n\t\ttrunc(reason))\n\treturn []metav1beta1.TableRow{row}, nil\n}",
"func (client *ContainerAppsDiagnosticsClient) listRevisionsCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsDiagnosticsClientListRevisionsOptions) (*policy.Request, error) {\n\turlPath := \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectorProperties/revisionsApi/revisions/\"\n\tif client.subscriptionID == \"\" {\n\t\treturn nil, errors.New(\"parameter client.subscriptionID cannot be empty\")\n\t}\n\turlPath = strings.ReplaceAll(urlPath, \"{subscriptionId}\", url.PathEscape(client.subscriptionID))\n\tif resourceGroupName == \"\" {\n\t\treturn nil, errors.New(\"parameter resourceGroupName cannot be empty\")\n\t}\n\turlPath = strings.ReplaceAll(urlPath, \"{resourceGroupName}\", url.PathEscape(resourceGroupName))\n\tif containerAppName == \"\" {\n\t\treturn nil, errors.New(\"parameter containerAppName cannot be empty\")\n\t}\n\turlPath = strings.ReplaceAll(urlPath, \"{containerAppName}\", url.PathEscape(containerAppName))\n\treq, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treqQP := req.Raw().URL.Query()\n\treqQP.Set(\"api-version\", \"2023-05-01\")\n\tif options != nil && options.Filter != nil {\n\t\treqQP.Set(\"$filter\", *options.Filter)\n\t}\n\treq.Raw().URL.RawQuery = reqQP.Encode()\n\treq.Raw().Header[\"Accept\"] = []string{\"application/json\"}\n\treturn req, nil\n}",
"func (c *Client) ListAssets(ctx context.Context, releaseID int64) ([]*github.ReleaseAsset, error) {\n\tresult := []*github.ReleaseAsset{}\n\tpage := 1\n\n\tfor {\n\t\tassets, res, err := c.Repositories.ListReleaseAssets(context.TODO(), c.Owner, c.Repo, releaseID, &github.ListOptions{Page: page})\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrap(err, \"failed to list assets\")\n\t\t}\n\n\t\tif res.StatusCode != http.StatusOK {\n\t\t\treturn nil, errors.Errorf(\"list release assets: invalid status code: %s\", res.Status)\n\t\t}\n\n\t\tresult = append(result, assets...)\n\n\t\tif res.NextPage <= page {\n\t\t\tbreak\n\t\t}\n\n\t\tpage = res.NextPage\n\t}\n\n\treturn result, nil\n}",
"func (o ApiOutput) Revision() pulumi.StringArrayOutput {\n\treturn o.ApplyT(func(v *Api) pulumi.StringArrayOutput { return v.Revision }).(pulumi.StringArrayOutput)\n}",
"func (a *HyperflexApiService) GetHyperflexVmSnapshotInfoListExecute(r ApiGetHyperflexVmSnapshotInfoListRequest) (*HyperflexVmSnapshotInfoResponse, *http.Response, error) {\n\tvar (\n\t\tlocalVarHTTPMethod = http.MethodGet\n\t\tlocalVarPostBody interface{}\n\t\tformFiles []formFile\n\t\tlocalVarReturnValue *HyperflexVmSnapshotInfoResponse\n\t)\n\n\tlocalBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, \"HyperflexApiService.GetHyperflexVmSnapshotInfoList\")\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}\n\t}\n\n\tlocalVarPath := localBasePath + \"/api/v1/hyperflex/VmSnapshotInfos\"\n\n\tlocalVarHeaderParams := make(map[string]string)\n\tlocalVarQueryParams := url.Values{}\n\tlocalVarFormParams := url.Values{}\n\n\tif r.filter != nil {\n\t\tlocalVarQueryParams.Add(\"$filter\", parameterToString(*r.filter, \"\"))\n\t}\n\tif r.orderby != nil {\n\t\tlocalVarQueryParams.Add(\"$orderby\", parameterToString(*r.orderby, \"\"))\n\t}\n\tif r.top != nil {\n\t\tlocalVarQueryParams.Add(\"$top\", parameterToString(*r.top, \"\"))\n\t}\n\tif r.skip != nil {\n\t\tlocalVarQueryParams.Add(\"$skip\", parameterToString(*r.skip, \"\"))\n\t}\n\tif r.select_ != nil {\n\t\tlocalVarQueryParams.Add(\"$select\", parameterToString(*r.select_, \"\"))\n\t}\n\tif r.expand != nil {\n\t\tlocalVarQueryParams.Add(\"$expand\", parameterToString(*r.expand, \"\"))\n\t}\n\tif r.apply != nil {\n\t\tlocalVarQueryParams.Add(\"$apply\", parameterToString(*r.apply, \"\"))\n\t}\n\tif r.count != nil {\n\t\tlocalVarQueryParams.Add(\"$count\", parameterToString(*r.count, \"\"))\n\t}\n\tif r.inlinecount != nil {\n\t\tlocalVarQueryParams.Add(\"$inlinecount\", parameterToString(*r.inlinecount, \"\"))\n\t}\n\tif r.at != nil {\n\t\tlocalVarQueryParams.Add(\"at\", parameterToString(*r.at, \"\"))\n\t}\n\tif r.tags != nil {\n\t\tlocalVarQueryParams.Add(\"tags\", parameterToString(*r.tags, \"\"))\n\t}\n\t// to determine the Content-Type header\n\tlocalVarHTTPContentTypes := []string{}\n\n\t// set Content-Type header\n\tlocalVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)\n\tif localVarHTTPContentType != \"\" {\n\t\tlocalVarHeaderParams[\"Content-Type\"] = localVarHTTPContentType\n\t}\n\n\t// to determine the Accept header\n\tlocalVarHTTPHeaderAccepts := []string{\"application/json\", \"text/csv\", \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"}\n\n\t// set Accept header\n\tlocalVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)\n\tif localVarHTTPHeaderAccept != \"\" {\n\t\tlocalVarHeaderParams[\"Accept\"] = localVarHTTPHeaderAccept\n\t}\n\treq, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, err\n\t}\n\n\tlocalVarHTTPResponse, err := a.client.callAPI(req)\n\tif err != nil || localVarHTTPResponse == nil {\n\t\treturn localVarReturnValue, localVarHTTPResponse, err\n\t}\n\n\tlocalVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)\n\tlocalVarHTTPResponse.Body.Close()\n\tlocalVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))\n\tif err != nil {\n\t\treturn localVarReturnValue, localVarHTTPResponse, err\n\t}\n\n\tif localVarHTTPResponse.StatusCode >= 300 {\n\t\tnewErr := &GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: localVarHTTPResponse.Status,\n\t\t}\n\t\tif localVarHTTPResponse.StatusCode == 400 {\n\t\t\tvar v Error\n\t\t\terr = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\t\t\tif err != nil {\n\t\t\t\tnewErr.error = err.Error()\n\t\t\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t\t\t}\n\t\t\tnewErr.model = v\n\t\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t\t}\n\t\tif localVarHTTPResponse.StatusCode == 401 {\n\t\t\tvar v Error\n\t\t\terr = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\t\t\tif err != nil {\n\t\t\t\tnewErr.error = err.Error()\n\t\t\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t\t\t}\n\t\t\tnewErr.model = v\n\t\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t\t}\n\t\tif localVarHTTPResponse.StatusCode == 403 {\n\t\t\tvar v Error\n\t\t\terr = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\t\t\tif err != nil {\n\t\t\t\tnewErr.error = err.Error()\n\t\t\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t\t\t}\n\t\t\tnewErr.model = v\n\t\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t\t}\n\t\tif localVarHTTPResponse.StatusCode == 404 {\n\t\t\tvar v Error\n\t\t\terr = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\t\t\tif err != nil {\n\t\t\t\tnewErr.error = err.Error()\n\t\t\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t\t\t}\n\t\t\tnewErr.model = v\n\t\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t\t}\n\t\tvar v Error\n\t\terr = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\t\tif err != nil {\n\t\t\tnewErr.error = err.Error()\n\t\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t\t}\n\t\tnewErr.model = v\n\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t}\n\n\terr = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\tif err != nil {\n\t\tnewErr := &GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: err.Error(),\n\t\t}\n\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t}\n\n\treturn localVarReturnValue, localVarHTTPResponse, nil\n}",
"func (a *RepoAPI) readFile(params interface{}) (resp *rpc.Response) {\n\tm := objx.New(cast.ToStringMap(params))\n\tvar revision []string\n\tif rev := m.Get(\"revision\").Str(); rev != \"\" {\n\t\trevision = []string{rev}\n\t}\n\treturn rpc.Success(util.Map{\n\t\t\"content\": a.mods.Repo.ReadFile(m.Get(\"name\").Str(), m.Get(\"path\").Str(), revision...),\n\t})\n}",
"func (c *DataExchange) ListRevisionAssetsPagesWithContext(ctx aws.Context, input *ListRevisionAssetsInput, fn func(*ListRevisionAssetsOutput, bool) bool, opts ...request.Option) error {\n\tp := request.Pagination{\n\t\tNewRequest: func() (*request.Request, error) {\n\t\t\tvar inCpy *ListRevisionAssetsInput\n\t\t\tif input != nil {\n\t\t\t\ttmp := *input\n\t\t\t\tinCpy = &tmp\n\t\t\t}\n\t\t\treq, _ := c.ListRevisionAssetsRequest(inCpy)\n\t\t\treq.SetContext(ctx)\n\t\t\treq.ApplyOptions(opts...)\n\t\t\treturn req, nil\n\t\t},\n\t}\n\n\tfor p.Next() {\n\t\tif !fn(p.Page().(*ListRevisionAssetsOutput), !p.HasNextPage()) {\n\t\t\tbreak\n\t\t}\n\t}\n\n\treturn p.Err()\n}",
"func (v Repository) Revlist(args ...string) ([]string, error) {\n\tresult := []string{}\n\tcmdArgs := []string{\n\t\t\"git\",\n\t\t\"rev-list\",\n\t}\n\n\tcmdArgs = append(cmdArgs, args...)\n\n\tcmd := exec.Command(cmdArgs[0], cmdArgs[1:]...)\n\tcmd.Dir = v.RepoDir()\n\tcmd.Stdin = nil\n\tcmd.Stderr = nil\n\tout, err := cmd.StdoutPipe()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif err = cmd.Start(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tr := bufio.NewReader(out)\n\tfor {\n\t\tline, err := r.ReadString('\\n')\n\t\tline = strings.TrimSpace(line)\n\t\tif len(line) > 0 {\n\t\t\tresult = append(result, line)\n\t\t}\n\t\tif err != nil {\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif err = cmd.Wait(); err != nil {\n\t\treturn nil, err\n\t}\n\treturn result, nil\n}",
"func AllVersions(db *gorm.DB) ([]Version, error) {\n\tvar versions []Version\n\tresult := db.Find(&versions)\n\n\treturn versions, result.Error\n}",
"func getAllBlobsByMediaType(tx *sql.Tx, mediaType string) ([]*Blob, error) {\n\tvar blobs []*Blob\n\trows, err := tx.Query(\"SELECT * from blobinfo where mediatype == $1\", mediaType)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor rows.Next() {\n\t\tblob := &Blob{}\n\t\tif err := blobRowScan(rows, blob); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tblobs = append(blobs, blob)\n\t}\n\tif err := rows.Err(); err != nil {\n\t\treturn nil, err\n\t}\n\treturn blobs, err\n}",
"func (hs *HistoryService) All(actionType string) ([]*TransactionHistory, error) {\n\tvar transHist []*TransactionHistory\n\tif err := hs.client.Get(buildString(\"history/\", actionType, \"/\", strconv.Itoa(hs.assetId)),\n\t\t&transHist); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn transHist, nil\n}",
"func VetRepositoryBulk(bot *VetBot, ir *IssueReporter, repo Repository) error {\n\trootCommitID, err := GetRootCommitID(bot, repo)\n\tif err != nil {\n\t\tlog.Printf(\"failed to retrieve root commit ID for repo %s/%s\", repo.Owner, repo.Repo)\n\t\treturn err\n\t}\n\turl, _, err := bot.client.GetArchiveLink(repo.Owner, repo.Repo, github.Tarball, nil, false)\n\tif err != nil {\n\t\tlog.Printf(\"failed to get tar link for %s/%s: %v\", repo.Owner, repo.Repo, err)\n\t\treturn err\n\t}\n\tfset := token.NewFileSet()\n\tcontents := make(map[string][]byte)\n\tvar files []*ast.File\n\tif err := func() error {\n\t\tresp, err := http.Get(url.String())\n\t\tif err != nil {\n\t\t\tlog.Printf(\"failed to download tar contents: %v\", err)\n\t\t\treturn err\n\t\t}\n\t\tdefer resp.Body.Close()\n\t\tunzipped, err := gzip.NewReader(resp.Body)\n\t\tif err != nil {\n\t\t\tlog.Printf(\"unable to initialize unzip stream: %v\", err)\n\t\t\treturn err\n\t\t}\n\t\treader := tar.NewReader(unzipped)\n\t\tlog.Printf(\"reading contents of %s/%s\", repo.Owner, repo.Repo)\n\t\tfor {\n\t\t\theader, err := reader.Next()\n\t\t\tif err == io.EOF {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif err != nil {\n\t\t\t\tlog.Printf(\"failed to read tar entry\")\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tname := header.Name\n\t\t\tsplit := strings.SplitN(name, \"/\", 2)\n\t\t\tif len(split) < 2 {\n\t\t\t\tcontinue // we only care about files in a subdirectory (due to how GitHub returns archives).\n\t\t\t}\n\t\t\trealName := split[1]\n\t\t\tswitch header.Typeflag {\n\t\t\tcase tar.TypeReg:\n\t\t\t\tif IgnoreFile(realName) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tbytes, err := ioutil.ReadAll(reader)\n\t\t\t\tif err != nil {\n\t\t\t\t\tlog.Printf(\"error reading contents of %s: %v\", realName, err)\n\t\t\t\t}\n\t\t\t\tfile, err := parser.ParseFile(fset, realName, bytes, parser.AllErrors)\n\t\t\t\tif err != nil {\n\t\t\t\t\tlog.Printf(\"failed to parse file %s: %v\", realName, err)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tcountLines(realName, bytes)\n\t\t\t\tfiles = append(files, file)\n\t\t\t\tcontents[fset.File(file.Pos()).Name()] = bytes\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t}(); err != nil {\n\t\treturn err\n\t}\n\tVetRepo(contents, files, fset, ReportFinding(ir, fset, rootCommitID, repo))\n\tcountFileStats(files)\n\tstats.FlushStats(bot.statsWriter, repo.Owner, repo.Repo)\n\treturn nil\n}",
"func (o *AssetRevision) Delete(exec boil.Executor) error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision provided for delete\")\n\t}\n\n\tif err := o.doBeforeDeleteHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\targs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), assetRevisionPrimaryKeyMapping)\n\tquery := \"DELETE FROM \\\"asset_revision\\\" WHERE \\\"orig\\\"=$1\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, args...)\n\t}\n\n\t_, err := exec.Exec(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to delete from asset_revision\")\n\t}\n\n\tif err := o.doAfterDeleteHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}",
"func (client ContainerAppsRevisionsClient) GetRevisionSender(req *http.Request) (*http.Response, error) {\n\treturn client.Send(req, azure.DoRetryWithRegistration(client.Client))\n}",
"func (client ContainerAppsRevisionsClient) listRevisionsNextResults(ctx context.Context, lastResults RevisionCollection) (result RevisionCollection, err error) {\n\treq, err := lastResults.revisionCollectionPreparer(ctx)\n\tif err != nil {\n\t\treturn result, autorest.NewErrorWithError(err, \"web.ContainerAppsRevisionsClient\", \"listRevisionsNextResults\", nil, \"Failure preparing next results request\")\n\t}\n\tif req == nil {\n\t\treturn\n\t}\n\tresp, err := client.ListRevisionsSender(req)\n\tif err != nil {\n\t\tresult.Response = autorest.Response{Response: resp}\n\t\treturn result, autorest.NewErrorWithError(err, \"web.ContainerAppsRevisionsClient\", \"listRevisionsNextResults\", resp, \"Failure sending next results request\")\n\t}\n\tresult, err = client.ListRevisionsResponder(resp)\n\tif err != nil {\n\t\terr = autorest.NewErrorWithError(err, \"web.ContainerAppsRevisionsClient\", \"listRevisionsNextResults\", resp, \"Failure responding to next results request\")\n\t}\n\treturn\n}",
"func (client *Client) ListSQLExecAuditLogWithChan(request *ListSQLExecAuditLogRequest) (<-chan *ListSQLExecAuditLogResponse, <-chan error) {\n\tresponseChan := make(chan *ListSQLExecAuditLogResponse, 1)\n\terrChan := make(chan error, 1)\n\terr := client.AddAsyncTask(func() {\n\t\tdefer close(responseChan)\n\t\tdefer close(errChan)\n\t\tresponse, err := client.ListSQLExecAuditLog(request)\n\t\tif err != nil {\n\t\t\terrChan <- err\n\t\t} else {\n\t\t\tresponseChan <- response\n\t\t}\n\t})\n\tif err != nil {\n\t\terrChan <- err\n\t\tclose(responseChan)\n\t\tclose(errChan)\n\t}\n\treturn responseChan, errChan\n}",
"func (x SyntheticMonitorEntity) GetAssets() []SyntheticsSyntheticMonitorAsset {\n\treturn x.Assets\n}",
"func (a *Audit) Execute() {\n\n\t// Setup goroutines for each set of reports we need to collect\n\t// TODO - how to make this list dynamic?\n\tgenerators := []func() (reports []report.Report, err error){\n\t\ta.c.GenerateComputeMetadataReports,\n\t\ta.c.GenerateComputeInstanceReports,\n\t\ta.c.GenerateLoggingReports,\n\t\ta.c.GenerateComputeNetworkReports,\n\t\ta.c.GenerateComputeSubnetworkReports,\n\t\ta.c.GenerateComputeFirewallRuleReports,\n\t\ta.c.GenerateComputeAddressReports,\n\t\ta.c.GenerateIAMPolicyReports,\n\t\ta.c.GenerateStorageBucketReports,\n\t\ta.c.GenerateContainerClusterReports,\n\t\ta.c.GenerateContainerNodePoolReports,\n\t}\n\n\tfor _, f := range generators {\n\t\treports, err := f()\n\t\tif err != nil {\n\t\t\tglog.Fatalf(\"Failed to generate reports: %v\", err)\n\t\t}\n\t\ta.reports = append(a.reports, reports...)\n\t}\n\n}",
"func (a *Client) GetAssetOrdersAsync(params *GetAssetOrdersAsyncParams, authInfo runtime.ClientAuthInfoWriter) (*GetAssetOrdersAsyncOK, error) {\n\t// TODO: Validate the params before sending\n\tif params == nil {\n\t\tparams = NewGetAssetOrdersAsyncParams()\n\t}\n\n\tresult, err := a.transport.Submit(&runtime.ClientOperation{\n\t\tID: \"GetAssetOrdersAsync\",\n\t\tMethod: \"GET\",\n\t\tPathPattern: \"/api/v1/Assets/orders\",\n\t\tProducesMediaTypes: []string{\"application/json\", \"text/json\", \"text/plain\"},\n\t\tConsumesMediaTypes: []string{\"application/json\"},\n\t\tSchemes: []string{\"https\"},\n\t\tParams: params,\n\t\tReader: &GetAssetOrdersAsyncReader{formats: a.formats},\n\t\tAuthInfo: authInfo,\n\t\tContext: params.Context,\n\t\tClient: params.HTTPClient,\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsuccess, ok := result.(*GetAssetOrdersAsyncOK)\n\tif ok {\n\t\treturn success, nil\n\t}\n\t// unexpected success response\n\t// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue\n\tmsg := fmt.Sprintf(\"unexpected success response for GetAssetOrdersAsync: API contract not enforced by server. Client expected to get an error, but got: %T\", result)\n\tpanic(msg)\n}",
"func (c *Client) RevisionMutations(ctx context.Context, mapRoot *types.MapRootV1) ([]*pb.MutationProof, error) {\n\tmutations := []*pb.MutationProof{}\n\ttoken := \"\"\n\tfor {\n\t\tresp, err := c.cli.ListMutations(ctx, &pb.ListMutationsRequest{\n\t\t\tDirectoryId: c.DirectoryID,\n\t\t\tRevision: int64(mapRoot.Revision),\n\t\t\tPageToken: token,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"list mutations on %v: %v\", c.DirectoryID, err)\n\t\t}\n\t\tmutations = append(mutations, resp.GetMutations()...)\n\t\ttoken = resp.GetNextPageToken()\n\t\tif token == \"\" {\n\t\t\tbreak\n\t\t}\n\t}\n\treturn mutations, nil\n}",
"func (r *RunCmd) FetchRepositoryVersions(c chan func() (string, error), db *bolt.DB, to tool.Tool) {\n\tc <- (func() (string, error) {\n\t\tcaches := cache.New(config.Database{DB: db})\n\t\tversions, err := caches.Versions.Remote(to)\n\t\tlogrus.WithField(\"versions\", versions).Infoln(\"Found remote versions\")\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\treturn version.Select(versions, r.version), nil\n\t})\n}",
"func (o LookupApiResultOutput) Revision() pulumi.StringArrayOutput {\n\treturn o.ApplyT(func(v LookupApiResult) []string { return v.Revision }).(pulumi.StringArrayOutput)\n}",
"func (m *MockUploadService) GetAuditLogsForUpload(v0 context.Context, v1 int) ([]types.UploadLog, error) {\n\tr0, r1 := m.GetAuditLogsForUploadFunc.nextHook()(v0, v1)\n\tm.GetAuditLogsForUploadFunc.appendCall(UploadServiceGetAuditLogsForUploadFuncCall{v0, v1, r0, r1})\n\treturn r0, r1\n}",
"func (o AssetRevisionSlice) UpdateAll(exec boil.Executor, cols M) error {\n\tln := int64(len(o))\n\tif ln == 0 {\n\t\treturn nil\n\t}\n\n\tif len(cols) == 0 {\n\t\treturn errors.New(\"public: update all requires at least one column argument\")\n\t}\n\n\tcolNames := make([]string, len(cols))\n\targs := make([]interface{}, len(cols))\n\n\ti := 0\n\tfor name, value := range cols {\n\t\tcolNames[i] = name\n\t\targs[i] = value\n\t\ti++\n\t}\n\n\t// Append all of the primary key values for each column\n\tfor _, obj := range o {\n\t\tpkeyArgs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(obj)), assetRevisionPrimaryKeyMapping)\n\t\targs = append(args, pkeyArgs...)\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"UPDATE \\\"asset_revision\\\" SET %s WHERE (\\\"orig\\\") IN (%s)\",\n\t\tstrmangle.SetParamNames(\"\\\"\", \"\\\"\", 1, colNames),\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, len(o)*len(assetRevisionPrimaryKeyColumns), len(colNames)+1, len(assetRevisionPrimaryKeyColumns)),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, args...)\n\t}\n\n\t_, err := exec.Exec(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to update all in assetRevision slice\")\n\t}\n\n\treturn nil\n}",
"func RevisionListHandlers(h hprinters.PrintHandler) {\n\tRevisionColumnDefinitions := []metav1beta1.TableColumnDefinition{\n\t\t{Name: \"Namespace\", Type: \"string\", Description: \"Namespace of the Knative service\", Priority: 0},\n\t\t{Name: \"Name\", Type: \"string\", Description: \"Name of the revision.\", Priority: 1},\n\t\t{Name: \"Service\", Type: \"string\", Description: \"Name of the Knative service.\", Priority: 1},\n\t\t{Name: \"Traffic\", Type: \"string\", Description: \"Percentage of traffic assigned to this revision.\", Priority: 1},\n\t\t{Name: \"Tags\", Type: \"string\", Description: \"Set of tags assigned to this revision.\", Priority: 1},\n\t\t{Name: \"Generation\", Type: \"string\", Description: \"Generation of the revision\", Priority: 1},\n\t\t{Name: \"Age\", Type: \"string\", Description: \"Age of the revision.\", Priority: 1},\n\t\t{Name: \"Conditions\", Type: \"string\", Description: \"Conditions describing statuses of the revision.\", Priority: 1},\n\t\t{Name: \"Ready\", Type: \"string\", Description: \"Ready condition status of the revision.\", Priority: 1},\n\t\t{Name: \"Reason\", Type: \"string\", Description: \"Reason for non-ready condition of the revision.\", Priority: 1},\n\t}\n\th.TableHandler(RevisionColumnDefinitions, printRevision)\n\th.TableHandler(RevisionColumnDefinitions, printRevisionList)\n}",
"func (s *BoltCache) Entries() ([]models.Company, error) {\n\ts.Lock.Lock()\n\tdefer s.Lock.Unlock()\n\tvar cd []models.Company\n\terr := s.DB.Update(func(tx *bolt.Tx) error {\n\t\tbucket := tx.Bucket([]byte(s.config.Cache.BoltDB.Bucket))\n\t\tvar company models.Company\n\t\tif err := bucket.ForEach(func(k, v []byte) error {\n\t\t\tdecoder := json.NewDecoder(strings.NewReader(string(v)))\n\t\t\tif err := decoder.Decode(&company); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tcd = append(cd, company)\n\t\t\treturn nil\n\t\t}); err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn cd, nil\n}",
"func (c *cockroachdb) inventory() ([]Record, error) {\n\t// Lookup the latest version of all records\n\tquery := `SELECT a.*\n FROM records a\n LEFT OUTER JOIN records b\n ON a.token = b.token\n AND a.version < b.version\n WHERE b.token IS NULL`\n\trows, err := c.recordsdb.Raw(query).Rows()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer rows.Close()\n\n\trecords := make([]Record, 0, 1024) // PNOOMA\n\tfor rows.Next() {\n\t\tvar r Record\n\t\terr := c.recordsdb.ScanRows(rows, &r)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\trecords = append(records, r)\n\t}\n\tif err = rows.Err(); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Compile a list of record primary keys\n\tkeys := make([]string, 0, len(records))\n\tfor _, v := range records {\n\t\tkeys = append(keys, v.Key)\n\t}\n\n\t// Lookup the files and metadata streams for each of the\n\t// previously queried records.\n\terr = c.recordsdb.\n\t\tPreload(\"Metadata\").\n\t\tPreload(\"Files\").\n\t\tWhere(keys).\n\t\tFind(&records).\n\t\tError\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn records, nil\n}",
"func (r apiGetChangesRequest) Execute() (InlineResponse20038, *_nethttp.Response, error) {\n\tvar (\n\t\tlocalVarHTTPMethod = _nethttp.MethodGet\n\t\tlocalVarPostBody interface{}\n\t\tlocalVarFormFileName string\n\t\tlocalVarFileName string\n\t\tlocalVarFileBytes []byte\n\t\tlocalVarReturnValue InlineResponse20038\n\t)\n\n\tlocalBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, \"ManagementApiService.GetChanges\")\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}\n\t}\n\n\tlocalVarPath := localBasePath + \"/v1/changes\"\n\n\tlocalVarHeaderParams := make(map[string]string)\n\tlocalVarQueryParams := _neturl.Values{}\n\tlocalVarFormParams := _neturl.Values{}\n\n\tif r.pageSize != nil {\n\t\tlocalVarQueryParams.Add(\"pageSize\", parameterToString(*r.pageSize, \"\"))\n\t}\n\tif r.skip != nil {\n\t\tlocalVarQueryParams.Add(\"skip\", parameterToString(*r.skip, \"\"))\n\t}\n\tif r.sort != nil {\n\t\tlocalVarQueryParams.Add(\"sort\", parameterToString(*r.sort, \"\"))\n\t}\n\tif r.applicationId != nil {\n\t\tlocalVarQueryParams.Add(\"applicationId\", parameterToString(*r.applicationId, \"\"))\n\t}\n\tif r.entityPath != nil {\n\t\tlocalVarQueryParams.Add(\"entityPath\", parameterToString(*r.entityPath, \"\"))\n\t}\n\tif r.userId != nil {\n\t\tlocalVarQueryParams.Add(\"userId\", parameterToString(*r.userId, \"\"))\n\t}\n\tif r.createdBefore != nil {\n\t\tlocalVarQueryParams.Add(\"createdBefore\", parameterToString(*r.createdBefore, \"\"))\n\t}\n\tif r.createdAfter != nil {\n\t\tlocalVarQueryParams.Add(\"createdAfter\", parameterToString(*r.createdAfter, \"\"))\n\t}\n\tif r.withTotalResultSize != nil {\n\t\tlocalVarQueryParams.Add(\"withTotalResultSize\", parameterToString(*r.withTotalResultSize, \"\"))\n\t}\n\tif r.managementKeyId != nil {\n\t\tlocalVarQueryParams.Add(\"managementKeyId\", parameterToString(*r.managementKeyId, \"\"))\n\t}\n\tif r.includeOld != nil {\n\t\tlocalVarQueryParams.Add(\"includeOld\", parameterToString(*r.includeOld, \"\"))\n\t}\n\t// to determine the Content-Type header\n\tlocalVarHTTPContentTypes := []string{}\n\n\t// set Content-Type header\n\tlocalVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)\n\tif localVarHTTPContentType != \"\" {\n\t\tlocalVarHeaderParams[\"Content-Type\"] = localVarHTTPContentType\n\t}\n\n\t// to determine the Accept header\n\tlocalVarHTTPHeaderAccepts := []string{\"application/json\"}\n\n\t// set Accept header\n\tlocalVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)\n\tif localVarHTTPHeaderAccept != \"\" {\n\t\tlocalVarHeaderParams[\"Accept\"] = localVarHTTPHeaderAccept\n\t}\n\tif r.ctx != nil {\n\t\t// API Key Authentication\n\t\tif auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {\n\t\t\tif auth, ok := auth[\"Authorization\"]; ok {\n\t\t\t\tvar key string\n\t\t\t\tif auth.Prefix != \"\" {\n\t\t\t\t\tkey = auth.Prefix + \" \" + auth.Key\n\t\t\t\t} else {\n\t\t\t\t\tkey = auth.Key\n\t\t\t\t}\n\t\t\t\tlocalVarHeaderParams[\"Authorization\"] = key\n\t\t\t}\n\t\t}\n\t}\n\tif r.ctx != nil {\n\t\t// API Key Authentication\n\t\tif auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {\n\t\t\tif auth, ok := auth[\"Authorization\"]; ok {\n\t\t\t\tvar key string\n\t\t\t\tif auth.Prefix != \"\" {\n\t\t\t\t\tkey = auth.Prefix + \" \" + auth.Key\n\t\t\t\t} else {\n\t\t\t\t\tkey = auth.Key\n\t\t\t\t}\n\t\t\t\tlocalVarHeaderParams[\"Authorization\"] = key\n\t\t\t}\n\t\t}\n\t}\n\treq, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, err\n\t}\n\n\tlocalVarHTTPResponse, err := r.apiService.client.callAPI(req)\n\tif err != nil || localVarHTTPResponse == nil {\n\t\treturn localVarReturnValue, localVarHTTPResponse, err\n\t}\n\n\tlocalVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)\n\tlocalVarHTTPResponse.Body.Close()\n\tif err != nil {\n\t\treturn localVarReturnValue, localVarHTTPResponse, err\n\t}\n\n\tif localVarHTTPResponse.StatusCode >= 300 {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: localVarHTTPResponse.Status,\n\t\t}\n\t\tif localVarHTTPResponse.StatusCode == 200 {\n\t\t\tvar v InlineResponse20038\n\t\t\terr = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\t\t\tif err != nil {\n\t\t\t\tnewErr.error = err.Error()\n\t\t\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t\t\t}\n\t\t\tnewErr.model = v\n\t\t}\n\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t}\n\n\terr = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\tif err != nil {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: err.Error(),\n\t\t}\n\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t}\n\n\treturn localVarReturnValue, localVarHTTPResponse, nil\n}",
"func (client ContainerAppsRevisionsClient) GetRevision(ctx context.Context, resourceGroupName string, containerAppName string, name string) (result Revision, err error) {\n\tif tracing.IsEnabled() {\n\t\tctx = tracing.StartSpan(ctx, fqdn+\"/ContainerAppsRevisionsClient.GetRevision\")\n\t\tdefer func() {\n\t\t\tsc := -1\n\t\t\tif result.Response.Response != nil {\n\t\t\t\tsc = result.Response.Response.StatusCode\n\t\t\t}\n\t\t\ttracing.EndSpan(ctx, sc, err)\n\t\t}()\n\t}\n\tif err := validation.Validate([]validation.Validation{\n\t\t{TargetValue: resourceGroupName,\n\t\t\tConstraints: []validation.Constraint{{Target: \"resourceGroupName\", Name: validation.MaxLength, Rule: 90, Chain: nil},\n\t\t\t\t{Target: \"resourceGroupName\", Name: validation.MinLength, Rule: 1, Chain: nil},\n\t\t\t\t{Target: \"resourceGroupName\", Name: validation.Pattern, Rule: `^[-\\w\\._\\(\\)]+[^\\.]$`, Chain: nil}}}}); err != nil {\n\t\treturn result, validation.NewError(\"web.ContainerAppsRevisionsClient\", \"GetRevision\", err.Error())\n\t}\n\n\treq, err := client.GetRevisionPreparer(ctx, resourceGroupName, containerAppName, name)\n\tif err != nil {\n\t\terr = autorest.NewErrorWithError(err, \"web.ContainerAppsRevisionsClient\", \"GetRevision\", nil, \"Failure preparing request\")\n\t\treturn\n\t}\n\n\tresp, err := client.GetRevisionSender(req)\n\tif err != nil {\n\t\tresult.Response = autorest.Response{Response: resp}\n\t\terr = autorest.NewErrorWithError(err, \"web.ContainerAppsRevisionsClient\", \"GetRevision\", resp, \"Failure sending request\")\n\t\treturn\n\t}\n\n\tresult, err = client.GetRevisionResponder(resp)\n\tif err != nil {\n\t\terr = autorest.NewErrorWithError(err, \"web.ContainerAppsRevisionsClient\", \"GetRevision\", resp, \"Failure responding to request\")\n\t\treturn\n\t}\n\n\treturn\n}",
"func (model *GrogModel) AllAssets() ([]*Asset, error) {\n\tvar foundAssets []*Asset\n\n\trows, rowsErr := model.db.DB.Query(`select name, mimeType, content, serve_external, rendered,\n\t\tadded, modified from Assets`)\n\tif rowsErr != nil {\n\t\treturn nil, fmt.Errorf(\"error loading all assets: %v\", rowsErr)\n\t}\n\n\tdefer rows.Close()\n\n\tvar (\n\t\tname string\n\t\tmimeType string\n\t\tcontent = make([]byte, 0)\n\t\tserveExternal int64\n\t\trendered int64\n\t\tadded int64\n\t\tmodified int64\n\t)\n\n\tfor rows.Next() {\n\t\tif rows.Scan(&name, &mimeType, &content, &serveExternal, &rendered, &added, &modified) != sql.ErrNoRows {\n\t\t\tfoundAsset := model.NewAsset(name, mimeType)\n\t\t\tfoundAsset.Content = content\n\t\t\tif serveExternal == 1 {\n\t\t\t\tfoundAsset.ServeExternal = true\n\t\t\t} else {\n\t\t\t\tfoundAsset.ServeExternal = false\n\t\t\t}\n\n\t\t\tif rendered == 1 {\n\t\t\t\tfoundAsset.Rendered = true\n\t\t\t} else {\n\t\t\t\tfoundAsset.Rendered = false\n\t\t\t}\n\n\t\t\tfoundAsset.Added.Set(time.Unix(added, 0))\n\t\t\tfoundAsset.Modified.Set(time.Unix(modified, 0))\n\n\t\t\tif foundAssets == nil {\n\t\t\t\tfoundAssets = make([]*Asset, 0)\n\t\t\t}\n\t\t\tfoundAssets = append(foundAssets, foundAsset)\n\t\t}\n\t}\n\n\treturn foundAssets, nil\n}",
"func (c Client) GetAssetItems(query url.Values) ([]Model, error) {\n\tvar res struct {\n\t\tRecords []Model\n\t}\n\terr := c.GetRecordsFor(TableModel, query, &res)\n\treturn res.Records, err\n}",
"func (s *SmartContract) queryAllAsset(APIstub shim.ChaincodeStubInterface) sc.Response {\n\n\tstartKey := \"0\"\n\tendKey := \"999\"\n\n\tresultsIterator, err := APIstub.GetStateByRange(startKey, endKey)\n\tif err != nil {\n\t\treturn shim.Error(err.Error())\n\t}\n\tdefer resultsIterator.Close()\n\n\t// buffer is a JSON array containing QueryResults\n\tvar buffer bytes.Buffer\n\tbuffer.WriteString(\"[\")\n\n\tbArrayMemberAlreadyWritten := false\n\tfor resultsIterator.HasNext() {\n\t\tqueryResponse, err := resultsIterator.Next()\n\t\tif err != nil {\n\t\t\treturn shim.Error(err.Error())\n\t\t}\n\t\t// Add comma before array members,suppress it for the first array member\n\t\tif bArrayMemberAlreadyWritten == true {\n\t\t\tbuffer.WriteString(\",\")\n\t\t}\n\t\tbuffer.WriteString(\"{\\\"Key\\\":\")\n\t\tbuffer.WriteString(\"\\\"\")\n\t\tbuffer.WriteString(queryResponse.Key)\n\t\tbuffer.WriteString(\"\\\"\")\n\n\t\tbuffer.WriteString(\", \\\"Record\\\":\")\n\t\t// Record is a JSON object, so we write as-is\n\t\tbuffer.WriteString(string(queryResponse.Value))\n\t\tbuffer.WriteString(\"}\")\n\t\tbArrayMemberAlreadyWritten = true\n\t}\n\tbuffer.WriteString(\"]\")\n\n\tfmt.Printf(\"- queryAllAsset:\\n%s\\n\", buffer.String())\n\n\treturn shim.Success(buffer.Bytes())\n}",
"func getAllDescChanges(\n\tctx context.Context,\n\tdb *client.DB,\n\tstartTime, endTime hlc.Timestamp,\n\tpriorIDs map[sqlbase.ID]sqlbase.ID,\n) ([]BackupDescriptor_DescriptorRevision, error) {\n\tstartKey := roachpb.Key(keys.MakeTablePrefix(keys.DescriptorTableID))\n\tendKey := startKey.PrefixEnd()\n\n\tallRevs, err := getAllRevisions(ctx, db, startKey, endKey, startTime, endTime)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar res []BackupDescriptor_DescriptorRevision\n\n\tfor _, revs := range allRevs {\n\t\tid, err := keys.DecodeDescMetadataID(revs.Key)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tfor _, rev := range revs.Values {\n\t\t\tr := BackupDescriptor_DescriptorRevision{ID: sqlbase.ID(id), Time: rev.Timestamp}\n\t\t\tif len(rev.RawBytes) != 0 {\n\t\t\t\tvar desc sqlbase.Descriptor\n\t\t\t\tif err := rev.GetProto(&desc); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tr.Desc = &desc\n\t\t\t\tif t := desc.GetTable(); t != nil && t.ReplacementOf.ID != sqlbase.InvalidID {\n\t\t\t\t\tpriorIDs[t.ID] = t.ReplacementOf.ID\n\t\t\t\t}\n\t\t\t}\n\t\t\tres = append(res, r)\n\t\t}\n\t}\n\treturn res, nil\n}",
"func releases(ctx context.Context, c *github.Client, org string, project string) ([]*release, error) {\n\tvar result []*release\n\n\topts := &github.ListOptions{PerPage: 100}\n\n\tklog.Infof(\"Downloading releases for %s/%s ...\", org, project)\n\n\tfor page := 1; page != 0; {\n\t\topts.Page = page\n\t\trs, resp, err := c.Repositories.ListReleases(ctx, org, project, opts)\n\t\tif err != nil {\n\t\t\treturn result, err\n\t\t}\n\n\t\tpage = resp.NextPage\n\t\tuntil := time.Now()\n\n\t\tfor _, r := range rs {\n\t\t\tname := r.GetName()\n\t\t\tif name == \"\" {\n\t\t\t\tname = r.GetTagName()\n\t\t\t}\n\n\t\t\trel := &release{\n\t\t\t\tName: name,\n\t\t\t\tDraft: r.GetDraft(),\n\t\t\t\tPrerelease: r.GetPrerelease(),\n\t\t\t\tPublishedAt: r.GetPublishedAt().Time,\n\t\t\t\tActiveUntil: until,\n\t\t\t\tDownloads: map[string]int{},\n\t\t\t\tDownloadRatios: map[string]float64{},\n\t\t\t}\n\n\t\t\tfor _, a := range r.Assets {\n\t\t\t\tif ignoreAssetRe.MatchString(a.GetName()) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\trel.Downloads[a.GetName()] = a.GetDownloadCount()\n\t\t\t\trel.DownloadsTotal += int64(a.GetDownloadCount())\n\t\t\t}\n\n\t\t\tif !rel.Draft && !rel.Prerelease {\n\t\t\t\tuntil = rel.PublishedAt\n\t\t\t}\n\n\t\t\tresult = append(result, rel)\n\t\t}\n\t}\n\n\tfor _, r := range result {\n\t\tr.DaysActive = r.ActiveUntil.Sub(r.PublishedAt).Hours() / 24\n\t\tr.DownloadsPerDay = float64(r.DownloadsTotal) / r.DaysActive\n\n\t\tfor k, v := range r.Downloads {\n\t\t\tr.DownloadRatios[k] = float64(v) / float64(r.DownloadsTotal)\n\t\t}\n\t}\n\n\treturn result, nil\n}",
"func (sr *StorageReader) ListBlobsModifiedBetween(startTime, endTime int64) *[]BlobDetails {\n\n\tlogp.Debug(\"storage_reader\", \"Listing blobs modified between %v and %v.\", startTime, endTime)\n\tctx := context.Background()\n\n\tvar blobItems []BlobDetails\n\n\ti := 0\n\tfor marker := (azblob.Marker{}); marker.NotDone(); {\n\n\t\tlistBlob, err := sr.container.ListBlobsFlatSegment(ctx, marker, azblob.ListBlobsSegmentOptions{})\n\t\tmarker = listBlob.NextMarker\n\t\tif err != nil {\n\t\t\tlogp.Error(err)\n\t\t\tcontinue\n\t\t}\n\n\t\tfor _, blobInfo := range listBlob.Segment.BlobItems {\n\n\t\t\ti++\n\n\t\t\tlastModified := blobInfo.Properties.LastModified.UTC().Unix()\n\t\t\tif lastModified > startTime && lastModified < endTime {\n\t\t\t\tlength := *blobInfo.Properties.ContentLength\n\t\t\t\tif length == int64(0) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tblobItems = append(blobItems, NewBlobDetails(blobInfo.Name, string(blobInfo.Properties.Etag), length, lastModified))\n\t\t\t}\n\t\t}\n\t}\n\n\tlogp.Info(\"Found %v blobs in container. Found %v blobs modified between %v and %v.\",\n\t\ti,\n\t\tlen(blobItems),\n\t\tstartTime,\n\t\tendTime,\n\t)\n\n\treturn &blobItems\n}",
"func getBuildVariantHistory(buildId string, before int, after int) ([]build.Build, error) {\n\tb, err := build.FindOne(build.ById(buildId))\n\tif err != nil {\n\t\treturn nil, errors.WithStack(err)\n\t}\n\tif b == nil {\n\t\treturn nil, errors.Errorf(\"no build with id %v\", buildId)\n\t}\n\n\tlessRecentBuilds, err := build.Find(\n\t\tbuild.ByBeforeRevision(b.Project, b.BuildVariant, b.RevisionOrderNumber).\n\t\t\tWithFields(build.IdKey, build.TasksKey, build.StatusKey, build.VersionKey, build.ActivatedKey).\n\t\t\tLimit(before))\n\tif err != nil {\n\t\treturn nil, errors.WithStack(err)\n\t}\n\n\tmoreRecentBuilds, err := build.Find(\n\t\tbuild.ByAfterRevision(b.Project, b.BuildVariant, b.RevisionOrderNumber).\n\t\t\tWithFields(build.IdKey, build.TasksKey, build.StatusKey, build.VersionKey, build.ActivatedKey).\n\t\t\tLimit(after))\n\tif err != nil {\n\t\treturn nil, errors.WithStack(err)\n\t}\n\n\tbuilds := make([]build.Build, 0, len(lessRecentBuilds)+len(moreRecentBuilds))\n\tfor i := len(moreRecentBuilds); i > 0; i-- {\n\t\tbuilds = append(builds, moreRecentBuilds[i-1])\n\t}\n\tbuilds = append(builds, lessRecentBuilds...)\n\treturn builds, nil\n}",
"func (o *VRS) EventLogs(info *bambou.FetchingInfo) (EventLogsList, *bambou.Error) {\n\n\tvar list EventLogsList\n\terr := bambou.CurrentSession().FetchChildren(o, EventLogIdentity, &list, info)\n\treturn list, err\n}",
"func (o *AssetRevision) AssetByFk(exec boil.Executor, mods ...qm.QueryMod) assetQuery {\n\tqueryMods := []qm.QueryMod{\n\t\tqm.Where(\"id=?\", o.Asset),\n\t}\n\n\tqueryMods = append(queryMods, mods...)\n\n\tquery := Assets(exec, queryMods...)\n\tqueries.SetFrom(query.Query, \"\\\"asset\\\"\")\n\n\treturn query\n}",
"func (c Client) Fetch() (*FetchRevisionResponse, error) {\n\treturn c.FetchWithContext(context.Background())\n}",
"func (s *SmartContract) GetAssetByRange(ctx contractapi.TransactionContextInterface, startKey string, endKey string) ([]*Asset, error) {\n\n\tresultsIterator, err := ctx.GetStub().GetPrivateDataByRange(assetCollection, startKey, endKey)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer resultsIterator.Close()\n\n\tresults := []*Asset{}\n\n\tfor resultsIterator.HasNext() {\n\t\tresponse, err := resultsIterator.Next()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tvar asset *Asset\n\t\terr = json.Unmarshal(response.Value, &asset)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to unmarshal JSON: %v\", err)\n\t\t}\n\n\t\tresults = append(results, asset)\n\t}\n\n\treturn results, nil\n\n}",
"func (s *SmartContract) GetAssetByRange(ctx contractapi.TransactionContextInterface, startKey string, endKey string) ([]*Asset, error) {\n\n\tresultsIterator, err := ctx.GetStub().GetPrivateDataByRange(assetCollection, startKey, endKey)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer resultsIterator.Close()\n\n\tresults := []*Asset{}\n\n\tfor resultsIterator.HasNext() {\n\t\tresponse, err := resultsIterator.Next()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tvar asset *Asset\n\t\terr = json.Unmarshal(response.Value, &asset)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to unmarshal JSON: %v\", err)\n\t\t}\n\n\t\tresults = append(results, asset)\n\t}\n\n\treturn results, nil\n\n}",
"func (o *AssetRevision) Reload(exec boil.Executor) error {\n\tret, err := FindAssetRevision(exec, o.Orig)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*o = *ret\n\treturn nil\n}",
"func (a *WorkflowsApiService) WorkflowWorkflowIDVersionsGetExecute(r ApiWorkflowWorkflowIDVersionsGetRequest) (ListResponse, *_nethttp.Response, error) {\n\tvar (\n\t\tlocalVarHTTPMethod = _nethttp.MethodGet\n\t\tlocalVarPostBody interface{}\n\t\tlocalVarFormFileName string\n\t\tlocalVarFileName string\n\t\tlocalVarFileBytes []byte\n\t\tlocalVarReturnValue ListResponse\n\t)\n\n\tlocalBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, \"WorkflowsApiService.WorkflowWorkflowIDVersionsGet\")\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}\n\t}\n\n\tlocalVarPath := localBasePath + \"/workflow/{workflowID}/versions\"\n\tlocalVarPath = strings.Replace(localVarPath, \"{\"+\"workflowID\"+\"}\", _neturl.PathEscape(parameterToString(r.workflowID, \"\")), -1)\n\n\tlocalVarHeaderParams := make(map[string]string)\n\tlocalVarQueryParams := _neturl.Values{}\n\tlocalVarFormParams := _neturl.Values{}\n\n\tif r.pageSize != nil {\n\t\tlocalVarQueryParams.Add(\"pageSize\", parameterToString(*r.pageSize, \"\"))\n\t}\n\tif r.pageNumber != nil {\n\t\tlocalVarQueryParams.Add(\"pageNumber\", parameterToString(*r.pageNumber, \"\"))\n\t}\n\t// to determine the Content-Type header\n\tlocalVarHTTPContentTypes := []string{}\n\n\t// set Content-Type header\n\tlocalVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)\n\tif localVarHTTPContentType != \"\" {\n\t\tlocalVarHeaderParams[\"Content-Type\"] = localVarHTTPContentType\n\t}\n\n\t// to determine the Accept header\n\tlocalVarHTTPHeaderAccepts := []string{\"application/json\"}\n\n\t// set Accept header\n\tlocalVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)\n\tif localVarHTTPHeaderAccept != \"\" {\n\t\tlocalVarHeaderParams[\"Accept\"] = localVarHTTPHeaderAccept\n\t}\n\treq, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, err\n\t}\n\n\tlocalVarHTTPResponse, err := a.client.callAPI(req)\n\tif err != nil || localVarHTTPResponse == nil {\n\t\treturn localVarReturnValue, localVarHTTPResponse, err\n\t}\n\n\tlocalVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)\n\tlocalVarHTTPResponse.Body.Close()\n\tlocalVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))\n\tif err != nil {\n\t\treturn localVarReturnValue, localVarHTTPResponse, err\n\t}\n\n\tif localVarHTTPResponse.StatusCode >= 300 {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: localVarHTTPResponse.Status,\n\t\t}\n\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t}\n\n\terr = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\tif err != nil {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: err.Error(),\n\t\t}\n\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t}\n\n\treturn localVarReturnValue, localVarHTTPResponse, nil\n}",
"func (agg *Planner) Revision() PlannerRevision { return agg.rev }",
"func (vdb *VspDatabase) GetVoteChanges(ticketHash string) (map[uint32]VoteChangeRecord, error) {\n\n\trecords := make(map[uint32]VoteChangeRecord)\n\n\terr := vdb.db.View(func(tx *bolt.Tx) error {\n\t\tbkt := tx.Bucket(vspBktK).Bucket(voteChangeBktK).\n\t\t\tBucket([]byte(ticketHash))\n\n\t\tif bkt == nil {\n\t\t\treturn nil\n\t\t}\n\n\t\terr := bkt.ForEach(func(k, v []byte) error {\n\t\t\tvar record VoteChangeRecord\n\t\t\terr := json.Unmarshal(v, &record)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"could not unmarshal vote change record: %w\", err)\n\t\t\t}\n\n\t\t\trecords[bytesToUint32(k)] = record\n\n\t\t\treturn nil\n\t\t})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error iterating over vote change bucket: %w\", err)\n\t\t}\n\n\t\treturn nil\n\t})\n\n\treturn records, err\n}",
"func (p Proc) GetRunningRevs() ([]string, error) {\n\tsp, err := p.GetSnapshot().FastForward()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\trevs, err := sp.Getdir(p.dir.Prefix(\"instances\"))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn revs, nil\n}",
"func (r *AccountsContainersVersionsService) List(accountId string, containerId string) *AccountsContainersVersionsListCall {\n\treturn &AccountsContainersVersionsListCall{\n\t\ts: r.s,\n\t\taccountId: accountId,\n\t\tcontainerId: containerId,\n\t\tcaller_: googleapi.JSONCall{},\n\t\tparams_: make(map[string][]string),\n\t\tpathTemplate_: \"accounts/{accountId}/containers/{containerId}/versions\",\n\t\tcontext_: googleapi.NoContext,\n\t}\n}",
"func (m *VirtualEndpoint) GetAuditEvents()([]CloudPcAuditEventable) {\n val, err := m.GetBackingStore().Get(\"auditEvents\")\n if err != nil {\n panic(err)\n }\n if val != nil {\n return val.([]CloudPcAuditEventable)\n }\n return nil\n}",
"func (entity *Page) Revisions() *RevisionsService {\n\tif entity.collection == nil {\n\t\t// missing page.collection parent. Probably Page struct was initialized manually, not fetched from API\n\t\tlog.Println(\"[go-wordpress] Missing parent page collection\")\n\t\treturn nil\n\t}\n\treturn &RevisionsService{\n\t\tService: Service(*entity.collection),\n\t\tparent: entity,\n\t\tparentType: \"pages\",\n\t\turl: fmt.Sprintf(\"%v/%v/%v\", \"pages\", entity.ID, \"revisions\"),\n\t}\n}",
"func (d *JobManager) getAllJobExecutions(request *restful.Request, response *restful.Response) {\n\tnamespace := request.PathParameter(\"namespace\")\n\tjobId := request.PathParameter(\"job-id\")\n\tInfo(\"namespace: %s jobId:%s\", namespace, jobId)\n\n\tvar jobExecView []ExecView\n\t//jobExecView := make([]ExecView, 0, 20)\n\tInfo(\"before jobExecView.len()=%d\", len(jobExecView))\n\terr := GetJobExecRecords(namespace, jobId, &jobExecView)\n\tif err != nil {\n\t\tresponse.AddHeader(\"Content-Type\", \"text/plain\")\n\t\tresponse.WriteErrorString(http.StatusInternalServerError, err.Error())\n\t\treturn\n\n\t}\n\n\tInfo(\"after jobExecView.len()=%d\", len(jobExecView))\n\tresponse.WriteHeaderAndEntity(http.StatusCreated, jobExecView)\n}",
"func sortRevisions(revisionList *servingv1.RevisionList) {\n\t// sort revisionList by configuration generation key\n\tsort.SliceStable(revisionList.Items, revisionListSortFunc(revisionList))\n}",
"func printRevisionList(revisionList *servingv1.RevisionList, options hprinters.PrintOptions) ([]metav1beta1.TableRow, error) {\n\n\trows := make([]metav1beta1.TableRow, 0, len(revisionList.Items))\n\tfor i := range revisionList.Items {\n\t\trev := &revisionList.Items[i]\n\t\tr, err := printRevision(rev, options)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\trows = append(rows, r...)\n\t}\n\treturn rows, nil\n}",
"func (s *SmartContract) QueryAssets(ctx contractapi.TransactionContextInterface, queryString string) ([]*Asset, error) {\n\n\tqueryResults, err := s.getQueryResultForQueryString(ctx, queryString)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn queryResults, nil\n}"
] |
[
"0.63469714",
"0.5717521",
"0.539625",
"0.53877574",
"0.5366677",
"0.5348522",
"0.52934647",
"0.519601",
"0.5156734",
"0.51399976",
"0.513625",
"0.49860772",
"0.49693537",
"0.4959978",
"0.49415287",
"0.49334174",
"0.49104473",
"0.48342273",
"0.48178554",
"0.4808108",
"0.47744343",
"0.47214913",
"0.46949145",
"0.4674558",
"0.46571222",
"0.46198308",
"0.46196842",
"0.4619682",
"0.4591066",
"0.45873186",
"0.45800853",
"0.45789734",
"0.45585358",
"0.45522282",
"0.45418298",
"0.4537777",
"0.453071",
"0.4518813",
"0.45002156",
"0.44914636",
"0.44914156",
"0.44642407",
"0.4457554",
"0.4441597",
"0.4407696",
"0.43853676",
"0.43739682",
"0.43677142",
"0.43676445",
"0.43639562",
"0.436161",
"0.43612307",
"0.43555492",
"0.4324055",
"0.43179232",
"0.43127295",
"0.43116477",
"0.4307518",
"0.42898348",
"0.4282984",
"0.42641842",
"0.42464405",
"0.42227027",
"0.4220141",
"0.42187363",
"0.4216423",
"0.42161435",
"0.42160732",
"0.42109784",
"0.42047882",
"0.41994092",
"0.4180938",
"0.41732168",
"0.41693926",
"0.41620645",
"0.41555873",
"0.4155114",
"0.4153691",
"0.41507572",
"0.4150294",
"0.4147587",
"0.41462398",
"0.4144641",
"0.41443262",
"0.41397235",
"0.41329938",
"0.41323063",
"0.41323063",
"0.41297325",
"0.4129475",
"0.41240543",
"0.41219917",
"0.41174123",
"0.41157255",
"0.41124508",
"0.4109752",
"0.41028336",
"0.4099634",
"0.4098863",
"0.40942535"
] |
0.66701674
|
0
|
FindAssetRevisionG retrieves a single record by ID.
|
func FindAssetRevisionG(orig int, selectCols ...string) (*AssetRevision, error) {
return FindAssetRevision(boil.GetDB(), orig, selectCols...)
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func FindAssetRevisionGP(orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(boil.GetDB(), orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func FindAssetRevision(exec boil.Executor, orig int, selectCols ...string) (*AssetRevision, error) {\n\tassetRevisionObj := &AssetRevision{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"asset_revision\\\" where \\\"orig\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, orig)\n\n\terr := q.Bind(assetRevisionObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"public: unable to select from asset_revision\")\n\t}\n\n\treturn assetRevisionObj, nil\n}",
"func FindAssetRevisionP(exec boil.Executor, orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(exec, orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (cr APIContractRepository) Get(ctx context.Context, revisionID uuid.UUID) (models.APIContractRevision, error) {\n\tif revisionID == uuid.Nil {\n\t\treturn models.APIContractRevision{}, errors.New(\"invalid contract revision id supplied\")\n\t}\n\n\tvar acr models.APIContractRevision\n\ttx := cr.db.Find(&acr, \"id = ?\", revisionID.String())\n\tif tx.Error != nil {\n\t\treturn models.APIContractRevision{}, fmt.Errorf(\"no contract revision found for id %s: %w\", revisionID, tx.Error)\n\t}\n\n\treturn acr, nil\n}",
"func (q assetRevisionQuery) One() (*AssetRevision, error) {\n\to := &AssetRevision{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"public: failed to execute a one query for asset_revision\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (d *Document) FindOneWithRevision(\n\tcontext.Context, string, int64,\n) (*flare.Document, error) {\n\treturn nil, errors.New(\"not implemented\")\n}",
"func (reg *defaultRegistry) GetRevision(gen runtime.Generation) (*engine.Revision, error) {\n\t// todo thing about replacing hardcoded key with some flag in Info that will show that there is a single object of that kind\n\tvar revision *engine.Revision\n\terr := reg.store.Find(engine.TypeRevision.Kind, &revision, store.WithKey(engine.RevisionKey), store.WithGen(gen))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif revision == nil {\n\t\treturn nil, nil\n\t}\n\n\treturn revision, nil\n}",
"func RetrieveVersion(id string) {\n}",
"func (c *Client) GetRevision(dir string) (int, error) {\n\tvar revision int\n\n\t// Prepare the URL\n\tURL := fmt.Sprintf(wpRevisionURL, dir)\n\n\t// Make the Request\n\tresp, err := c.getRequest(URL)\n\tif err != nil {\n\t\treturn revision, err\n\t}\n\n\t// Drain body and check Close error\n\tdefer drainAndClose(resp.Body, &err)\n\tbytes, err := ioutil.ReadAll(resp.Body)\n\trevs := regexRevision.FindAllStringSubmatch(string(bytes), 1)\n\n\trevision, err = strconv.Atoi(revs[0][1])\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn revision, err\n}",
"func get_asset(stub shim.ChaincodeStubInterface, id string) (Asset, error) {\n\tvar asset Asset\n\tassetAsBytes, err := stub.GetState(id) //getState retreives a key/value from the ledger\n\tif err != nil { //this seems to always succeed, even if key didn't exist\n\t\treturn asset, errors.New(\"Failed to find asset - \" + id)\n\t}\n\tjson.Unmarshal(assetAsBytes, &asset) //un stringify it aka JSON.parse()\n\n\tif asset.Id != id { //test if product is actually here or just nil\n\t\treturn asset, errors.New(\"Asset does not exist - \" + id)\n\t}\n\n\treturn asset, nil\n}",
"func AssetRevisionExistsG(orig int) (bool, error) {\n\treturn AssetRevisionExists(boil.GetDB(), orig)\n}",
"func (assetRevisionL) LoadAsset(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Asset\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Asset\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Asset = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Asset == foreign.ID {\n\t\t\t\tlocal.R.Asset = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (o *Drive) GetRevision(ctx context.Context) (revision string, err error) {\n\terr = o.object.CallWithContext(ctx, \"org.freedesktop.DBus.Properties.Get\", 0, InterfaceDrive, \"Revision\").Store(&revision)\n\treturn\n}",
"func AssetRevisionExistsGP(orig int) bool {\n\te, err := AssetRevisionExists(boil.GetDB(), orig)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn e\n}",
"func getObjectRevision(obj client.Object) (int64, error) {\n\ta := obj.GetAnnotations()\n\tif a == nil {\n\t\treturn 0, nil\n\t}\n\n\tif len(a[revisionAnnotation]) == 0 {\n\t\treturn 0, nil\n\t}\n\n\treturn strconv.ParseInt(a[revisionAnnotation], 10, 64)\n}",
"func (r *AutoRoller) getRevision(ctx context.Context, id string) (*revision.Revision, error) {\n\tif id == r.lastRollRev.Id {\n\t\treturn r.lastRollRev, nil\n\t}\n\tif id == r.nextRollRev.Id {\n\t\treturn r.nextRollRev, nil\n\t}\n\tif id == r.tipRev.Id {\n\t\treturn r.tipRev, nil\n\t}\n\tfor _, rev := range r.notRolledRevs {\n\t\tif id == rev.Id {\n\t\t\treturn rev, nil\n\t\t}\n\t}\n\treturn r.rm.GetRevision(ctx, id)\n}",
"func requireRevID(t *testing.T, rt *RestTester, docID, revID string) {\n\tdoc, err := rt.GetDatabase().GetDocument(logger.TestCtx(t), docID, db.DocUnmarshalAll)\n\trequire.NoError(t, err, \"Error reading document from bucket\")\n\trequire.Equal(t, revID, doc.SyncData.CurrentRev)\n}",
"func (api *versionAPI) Find(meta *api.ObjectMeta) (*Version, error) {\n\t// find the object\n\tobj, err := api.ct.FindObject(\"Version\", meta)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// asset type\n\tswitch obj.(type) {\n\tcase *Version:\n\t\thobj := obj.(*Version)\n\t\treturn hobj, nil\n\tdefault:\n\t\treturn nil, errors.New(\"incorrect object type\")\n\t}\n}",
"func getAssetByID(id int) (*Asset, error) {\n\tpath := fmt.Sprintf(\"asset/%d\", id)\n\tresp, err := get(path, nil)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Failed TCMD request\")\n\t}\n\n\tvar result Asset\n\terr = json.Unmarshal(resp, &result)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Failed to unmarshal TCMD response\")\n\t}\n\treturn &result, nil\n}",
"func (n *Node) GetRevision() error {\n\tfor _, s := range revServices {\n\t\tif !strings.HasPrefix(n.ImportPath, s.prefix) {\n\t\t\tcontinue\n\t\t}\n\t\treturn s.get(HttpClient, n)\n\t}\n\treturn ErrNotMatchAnyService\n}",
"func (c *vertexCollection) Revision(ctx context.Context) (string, error) {\n\tresult, err := c.rawCollection().Revision(ctx)\n\tif err != nil {\n\t\treturn \"\", WithStack(err)\n\t}\n\treturn result, nil\n}",
"func (sc *ScreenlyClient) Get(id string) *Asset {\n\tasset := &Asset{}\n\tpath := fmt.Sprintf(\"assets/%s\", id)\n\tresponse, err := sc.doHttp(\"GET\", path, nil)\n\tif err == nil {\n\t\terr = json.NewDecoder(response.Body).Decode(asset)\n\t\tif err == nil {\n\t\t\treturn asset\n\t\t}\n\t}\n\tpanic(err)\n}",
"func (r *Releaser) Find(tagName string) (*Release, error) {\n\trelease, _, err := r.client.Repositories.GetReleaseByTag(context.Background(), r.owner, r.repository, tagName)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tlog.Printf(\"found release ID: %v, tag: %v\", *release.ID, *release.TagName)\n\treturn &Release{ID: *release.ID, TagName: *release.TagName, Releaser: r}, nil\n}",
"func (o GroupContainerVolumeGitRepoOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v GroupContainerVolumeGitRepo) *string { return v.Revision }).(pulumi.StringPtrOutput)\n}",
"func AssetRevisionExists(exec boil.Executor, orig int) (bool, error) {\n\tvar exists bool\n\n\tquery := \"select exists(select 1 from \\\"asset_revision\\\" where \\\"orig\\\"=$1 limit 1)\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, orig)\n\t}\n\n\trow := exec.QueryRow(query, orig)\n\n\terr := row.Scan(&exists)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"public: unable to check if asset_revision exists\")\n\t}\n\n\treturn exists, nil\n}",
"func (r *repository) Find(id uint) (*models.Upload, error) {\n\tupload := models.Upload{}\n\n\tif err := r.db.First(&upload, id).Error; err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &upload, nil\n}",
"func getRevision(sd []byte) BYTE {\n\tif len(sd) < 1 {\n\t\treturn 0\n\t}\n\n\t// SECURITY_DESCRIPTOR_RELATIVE.Revision.\n\treturn BYTE(sd[0])\n}",
"func (db *DB) Rev(id string) (string, error) {\n\treturn responseRev(db.closedRequest(db.ctx, \"HEAD\", path(db.name, id), nil))\n}",
"func (rc *BypassRevisionCache) Get(docID, revID string, copyType BodyCopyType) (docRev DocumentRevision, err error) {\n\tdocRev.RevID = revID\n\tdocRev.Body, docRev.History, docRev.Channels, docRev.Attachments, docRev.Expiry, err = revCacheLoader(rc.backingStore, IDAndRev{DocID: docID, RevID: revID})\n\tif err != nil {\n\t\treturn DocumentRevision{}, err\n\t}\n\n\trc.bypassStat.Add(1)\n\n\treturn docRev, nil\n}",
"func Revision(in string) string {\n\tmatches := regexRevision.FindStringSubmatch(in)\n\treturn regexGroup(regexRevision, \"revision\", matches)\n}",
"func (s *SnapshotsServiceOp) get(ID interface{}) (*Snapshot, *Response, error) {\n\tpath := fmt.Sprintf(\"%s/%v\", snapshotBasePath, ID)\n\n\treq, err := s.client.NewRequest(\"GET\", path, nil)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\troot := new(snapshotRoot)\n\tresp, err := s.client.Do(req, root)\n\tif err != nil {\n\t\treturn nil, resp, err\n\t}\n\n\treturn root.Snapshot, resp, err\n}",
"func (o GroupInitContainerVolumeGitRepoOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v GroupInitContainerVolumeGitRepo) *string { return v.Revision }).(pulumi.StringPtrOutput)\n}",
"func (o *AssetRevision) AssetG(mods ...qm.QueryMod) assetQuery {\n\treturn o.AssetByFk(boil.GetDB(), mods...)\n}",
"func GetRevision() string {\n\tv := Map[\"revision\"]\n\treturn v\n}",
"func FindGitRevision(ctx context.Context, file string) (shortSha string, sha string, err error) {\n\tlogger := common.Logger(ctx)\n\n\tgitDir, err := git.PlainOpenWithOptions(\n\t\tfile,\n\t\t&git.PlainOpenOptions{\n\t\t\tDetectDotGit: true,\n\t\t\tEnableDotGitCommonDir: true,\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlogger.WithError(err).Error(\"path\", file, \"not located inside a git repository\")\n\t\treturn \"\", \"\", err\n\t}\n\n\thead, err := gitDir.Reference(plumbing.HEAD, true)\n\tif err != nil {\n\t\treturn \"\", \"\", err\n\t}\n\n\tif head.Hash().IsZero() {\n\t\treturn \"\", \"\", fmt.Errorf(\"HEAD sha1 could not be resolved\")\n\t}\n\n\thash := head.Hash().String()\n\n\tlogger.Debugf(\"Found revision: %s\", hash)\n\treturn hash[:7], strings.TrimSpace(hash), nil\n}",
"func (s *DatabaseServerV3) GetRevision() string {\n\treturn s.Metadata.GetRevision()\n}",
"func (o GroupContainerVolumeGitRepoPtrOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v *GroupContainerVolumeGitRepo) *string {\n\t\tif v == nil {\n\t\t\treturn nil\n\t\t}\n\t\treturn v.Revision\n\t}).(pulumi.StringPtrOutput)\n}",
"func (t *SegmentService) Find(id string) (Segment, error) {\n\treturn t.Repository.find(id)\n}",
"func (db *DB) Rev(ctx context.Context, docID string) (rev string, err error) {\n\tif r, ok := db.driverDB.(driver.Rever); ok {\n\t\treturn r.Rev(ctx, docID)\n\t}\n\t// These last two lines cannot be combined for GopherJS due to a bug.\n\t// See https://github.com/gopherjs/gopherjs/issues/608\n\trow, err := db.Get(ctx, docID, nil)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tvar doc struct {\n\t\tRev string `json:\"_rev\"`\n\t}\n\tif err = row.ScanDoc(&doc); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn doc.Rev, nil\n}",
"func (s *chainScore) Ex_getRevision() (int64, error) {\n\tif err := s.tryChargeCall(false); err != nil {\n\t\treturn 0, err\n\t}\n\tas := s.cc.GetAccountState(state.SystemID)\n\treturn scoredb.NewVarDB(as, state.VarRevision).Int64(), nil\n}",
"func FindAuthorGP(id int64, selectCols ...string) *Author {\n\tretobj, err := FindAuthor(boil.GetDB(), id, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (api *snapshotrestoreAPI) Find(meta *api.ObjectMeta) (*SnapshotRestore, error) {\n\t// find the object\n\tobj, err := api.ct.FindObject(\"SnapshotRestore\", meta)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// asset type\n\tswitch obj.(type) {\n\tcase *SnapshotRestore:\n\t\thobj := obj.(*SnapshotRestore)\n\t\treturn hobj, nil\n\tdefault:\n\t\treturn nil, errors.New(\"incorrect object type\")\n\t}\n}",
"func (a *ApiV2) GetAsset(id string) (asset Asset, err error) {\n\tvar resp AssetResponse\n\tif !common.ValidUUID(id) {\n\t\treturn asset, common.NewError(\"asset id '%s' is invalid\", id)\n\t}\n\tuuid := common.ConvertToUUIDFormat(id)\n\turl := a.getBaseUrl() + \"/assets/\" + uuid\n\treq, err := a.makeRequest(\"GET\", url, nil)\n\tif err != nil {\n\t\treturn asset, err\n\t}\n\terr = handleReq(a, req, &resp)\n\tif err != nil {\n\t\treturn asset, err\n\t}\n\tasset = *resp.Asset\n\t// now get the video\n\tvideo, err := a.GetVideo(asset.VideoId)\n\tif err != nil {\n\t\treturn asset, err\n\t}\n\tasset.Video = video\n\tasset.Api = *a\n\treturn asset, nil\n}",
"func (q assetRevisionQuery) OneP() *AssetRevision {\n\to, err := q.One()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func AssetRevisionsG(mods ...qm.QueryMod) assetRevisionQuery {\n\treturn AssetRevisions(boil.GetDB(), mods...)\n}",
"func (o GroupInitContainerVolumeGitRepoPtrOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v *GroupInitContainerVolumeGitRepo) *string {\n\t\tif v == nil {\n\t\t\treturn nil\n\t\t}\n\t\treturn v.Revision\n\t}).(pulumi.StringPtrOutput)\n}",
"func (sid SourceID) RevID() string {\n\treturn sid.Version.Meta\n}",
"func (o *ReportingTaskEntity) GetRevision() RevisionDTO {\n\tif o == nil || o.Revision == nil {\n\t\tvar ret RevisionDTO\n\t\treturn ret\n\t}\n\treturn *o.Revision\n}",
"func (r *Store) GetRevision(ctx context.Context, name, revision string) (context.Context, gopass.Secret, error) {\n\tstore, name := r.getStore(name)\n\tsec, err := store.GetRevision(ctx, name, revision)\n\n\treturn ctx, sec, err\n}",
"func (this *activitiesStruct) Revision() uint64 {\n\tthis.mutex.RLock()\n\trev := this.revision\n\tthis.mutex.RUnlock()\n\treturn rev\n}",
"func (o *AssetRevision) Delete(exec boil.Executor) error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision provided for delete\")\n\t}\n\n\tif err := o.doBeforeDeleteHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\targs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), assetRevisionPrimaryKeyMapping)\n\tquery := \"DELETE FROM \\\"asset_revision\\\" WHERE \\\"orig\\\"=$1\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, args...)\n\t}\n\n\t_, err := exec.Exec(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to delete from asset_revision\")\n\t}\n\n\tif err := o.doAfterDeleteHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}",
"func (client ContainerAppsRevisionsClient) GetRevision(ctx context.Context, resourceGroupName string, containerAppName string, name string) (result Revision, err error) {\n\tif tracing.IsEnabled() {\n\t\tctx = tracing.StartSpan(ctx, fqdn+\"/ContainerAppsRevisionsClient.GetRevision\")\n\t\tdefer func() {\n\t\t\tsc := -1\n\t\t\tif result.Response.Response != nil {\n\t\t\t\tsc = result.Response.Response.StatusCode\n\t\t\t}\n\t\t\ttracing.EndSpan(ctx, sc, err)\n\t\t}()\n\t}\n\tif err := validation.Validate([]validation.Validation{\n\t\t{TargetValue: resourceGroupName,\n\t\t\tConstraints: []validation.Constraint{{Target: \"resourceGroupName\", Name: validation.MaxLength, Rule: 90, Chain: nil},\n\t\t\t\t{Target: \"resourceGroupName\", Name: validation.MinLength, Rule: 1, Chain: nil},\n\t\t\t\t{Target: \"resourceGroupName\", Name: validation.Pattern, Rule: `^[-\\w\\._\\(\\)]+[^\\.]$`, Chain: nil}}}}); err != nil {\n\t\treturn result, validation.NewError(\"web.ContainerAppsRevisionsClient\", \"GetRevision\", err.Error())\n\t}\n\n\treq, err := client.GetRevisionPreparer(ctx, resourceGroupName, containerAppName, name)\n\tif err != nil {\n\t\terr = autorest.NewErrorWithError(err, \"web.ContainerAppsRevisionsClient\", \"GetRevision\", nil, \"Failure preparing request\")\n\t\treturn\n\t}\n\n\tresp, err := client.GetRevisionSender(req)\n\tif err != nil {\n\t\tresult.Response = autorest.Response{Response: resp}\n\t\terr = autorest.NewErrorWithError(err, \"web.ContainerAppsRevisionsClient\", \"GetRevision\", resp, \"Failure sending request\")\n\t\treturn\n\t}\n\n\tresult, err = client.GetRevisionResponder(resp)\n\tif err != nil {\n\t\terr = autorest.NewErrorWithError(err, \"web.ContainerAppsRevisionsClient\", \"GetRevision\", resp, \"Failure responding to request\")\n\t\treturn\n\t}\n\n\treturn\n}",
"func (d *db) Rev(ctx context.Context, docID string) (rev string, err error) {\n\tres, err := d.Client.DoError(ctx, http.MethodHead, d.path(chttp.EncodeDocID(docID), nil), nil)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn strings.Trim(res.Header.Get(\"Etag\"), `\"\"`), nil\n}",
"func (s *AppServerV3) GetRevision() string {\n\treturn s.Metadata.GetRevision()\n}",
"func GetRevision(ctx context.Context) string {\n\tsv, ok := ctx.Value(ctxKeyRevision).(string)\n\tif !ok {\n\t\treturn \"\"\n\t}\n\n\treturn sv\n}",
"func (o IopingSpecVolumeVolumeSourceGitRepoOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v IopingSpecVolumeVolumeSourceGitRepo) *string { return v.Revision }).(pulumi.StringPtrOutput)\n}",
"func (db *DB) getVersion(id int) *DetailVersion {\n\tver := &DetailVersion{}\n\terr := db.Get(ver, \"select * from detail_version where id = $1\", id)\n\n\tif err != nil {\n\t\tif err == sql.ErrNoRows {\n\t\t\treturn nil\n\t\t} else {\n\t\t\tpanic(err)\n\t\t}\n\t}\n\n\treturn ver\n}",
"func vcsRevision() string {\n\tbi, ok := debug.ReadBuildInfo()\n\tif !ok {\n\t\treturn \"\"\n\t}\n\tfor _, s := range bi.Settings {\n\t\tif s.Key == \"vcs.revision\" {\n\t\t\treturn s.Value[:9]\n\t\t}\n\t}\n\n\treturn \"\"\n}",
"func (resp *BytesWatchPutResp) GetRevision() int64 {\n\treturn resp.rev\n}",
"func (s *SnapshotsServiceOp) get(ctx context.Context, ID string) (*Snapshot, *Response, error) {\n\tpath := fmt.Sprintf(\"%s/%s\", snapshotBasePath, ID)\n\n\treq, err := s.client.NewRequest(ctx, http.MethodGet, path, nil)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\troot := new(snapshotRoot)\n\tresp, err := s.client.Do(ctx, req, root)\n\tif err != nil {\n\t\treturn nil, resp, err\n\t}\n\n\treturn root.Snapshot, resp, err\n}",
"func (s *edgeStore) Find(id uint32) *Edge {\n Assert(nilEdgeStore, s != nil)\n Assert(zeroEdgeId, id != uint32(0))\n Assert(nilEdgeTrackingMap, s.tracking != nil)\n\n if e, ok := s.tracking[id]; ok {\n return e\n }\n \n // read the edge from the file and return it\n readAt := int64((id - 1) * edgeDataSize)\n bytes := make([]byte, edgeDataSize)\n _, err := s.file.ReadAt(bytes, readAt)\n if (err != nil) {\n return nil\n }\n \n e, _ := constructEdge(id, bytes) \n return e\n}",
"func Find(c *gin.Context) {\n\tid, err := book.IDFromString(c.Param(\"id\"))\n\tif err != nil {\n\t\tlog.Println(\"FindBook IDFromString\", err)\n\t\tc.JSON(\n\t\t\thttp.StatusBadRequest,\n\t\t\tgin.H{\"error\": fmt.Sprintf(\"not found book by id %q\", id)},\n\t\t)\n\t\treturn\n\t}\n\tb := db.Find(id)\n\tc.JSON(http.StatusOK, gin.H{\"data\": b})\n}",
"func (r *Repository) Get(ctx context.Context, id digest.Digest) (io.ReadCloser, error) {\n\t_, path := r.Path(id)\n\trc, err := os.Open(path)\n\tif err != nil {\n\t\treturn nil, errors.E(\"get\", r.Root, id, err)\n\t}\n\treturn rc, nil\n}",
"func (r *ReleaseAsset) GetID() int64 {\n\tif r == nil || r.ID == nil {\n\t\treturn 0\n\t}\n\treturn *r.ID\n}",
"func (o FioSpecVolumeVolumeSourceGitRepoOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v FioSpecVolumeVolumeSourceGitRepo) *string { return v.Revision }).(pulumi.StringPtrOutput)\n}",
"func (model *GrogModel) GetAsset(name string) (*Asset, error) {\n\tvar foundAsset *Asset\n\tvar mimeType string\n\tvar content = make([]byte, 0)\n\tvar serveExternal int64\n\tvar rendered int64\n\tvar added int64\n\tvar modified int64\n\tvar err error\n\n\trow := model.db.DB.QueryRow(`select mimeType, content, serve_external, rendered,\n\t\tadded, modified from Assets where name = ?`, name)\n\tif row.Scan(&mimeType, &content, &serveExternal, &rendered, &added, &modified) != sql.ErrNoRows {\n\t\tfoundAsset = model.NewAsset(name, mimeType)\n\t\tfoundAsset.Content = content\n\t\tif serveExternal == 1 {\n\t\t\tfoundAsset.ServeExternal = true\n\t\t} else {\n\t\t\tfoundAsset.ServeExternal = false\n\t\t}\n\n\t\tif rendered == 1 {\n\t\t\tfoundAsset.Rendered = true\n\t\t} else {\n\t\t\tfoundAsset.Rendered = false\n\t\t}\n\n\t\tfoundAsset.Added.Set(time.Unix(added, 0))\n\t\tfoundAsset.Modified.Set(time.Unix(modified, 0))\n\t} else {\n\t\terr = fmt.Errorf(\"No asset with name %s\", name)\n\t}\n\n\treturn foundAsset, err\n}",
"func (s *ExportAssetToSignedUrlResponseDetails) SetRevisionId(v string) *ExportAssetToSignedUrlResponseDetails {\n\ts.RevisionId = &v\n\treturn s\n}",
"func (c *ModuleVersionClient) Get(ctx context.Context, id int) (*ModuleVersion, error) {\n\treturn c.Query().Where(moduleversion.ID(id)).Only(ctx)\n}",
"func FindAuthorG(id int64, selectCols ...string) (*Author, error) {\n\treturn FindAuthor(boil.GetDB(), id, selectCols...)\n}",
"func (db *DB) GetBlob(ctx context.Context, id *core.RecordID) ([]byte, error) {\n\tvar (\n\t\tblob []byte\n\t\terr error\n\t)\n\n\terr = db.View(ctx, func(tx *TransactionManager) error {\n\t\tblob, err = tx.GetBlob(ctx, id)\n\t\treturn err\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn blob, nil\n}",
"func (agg *Planner) Revision() PlannerRevision { return agg.rev }",
"func (t *Transactions) Find(id TransactionID) *Transaction {\n\tt.RLock()\n\tdefer t.RUnlock()\n\n\treturn t.buffer[id]\n}",
"func (resp *BytesWatchDelResp) GetRevision() int64 {\n\treturn resp.rev\n}",
"func (r *Repository) FindSemverTag(c *semver.Constraints) (*plumbing.Reference, error) {\n\t// Check if Repository is nil to avoid a panic if this function is called\n\t// before repo has been cloned\n\tif r.Repository == nil {\n\t\treturn nil, errors.New(\"Repository is nil\")\n\t}\n\n\ttagsIter, err := r.Tags()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tcoll := semverref.Collection{}\n\n\tif err := tagsIter.ForEach(func(t *plumbing.Reference) error {\n\t\tv, err := semver.NewVersion(t.Name().Short())\n\t\tif err != nil {\n\t\t\treturn nil // Ignore errors and thus tags that aren't parsable as a semver\n\t\t}\n\n\t\t// No way to a priori find the length of tagsIter so append to the collection.\n\t\tcoll = append(coll, semverref.SemverRef{Ver: v, Ref: t})\n\t\treturn nil\n\t}); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn coll.HighestMatch(c)\n}",
"func (assetRevisionL) LoadOrig(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Orig\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Orig\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Orig = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Orig == foreign.ID {\n\t\t\t\tlocal.R.Orig = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (c *Client) FindCrmStageId(criteria *Criteria, options *Options) (int64, error) {\n\tids, err := c.Search(CrmStageModel, criteria, options)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\tif len(ids) > 0 {\n\t\treturn ids[0], nil\n\t}\n\treturn -1, fmt.Errorf(\"crm.stage was not found with criteria %v and options %v\", criteria, options)\n}",
"func (repo PostgresRepository) FindByID(id string) (document entity.Document, err error) {\n\t_, err = repo.db.SQL(\"SELECT * FROM documents WHERE id = ?\", id).Get(&document)\n\treturn\n}",
"func ID(id int) predicate.GithubRelease {\n\treturn predicate.GithubRelease(sql.FieldEQ(FieldID, id))\n}",
"func FindVoteGP(id int, selectCols ...string) *Vote {\n\tretobj, err := FindVote(boil.GetDB(), id, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (client ContainerAppsRevisionsClient) GetRevisionSender(req *http.Request) (*http.Response, error) {\n\treturn client.Send(req, azure.DoRetryWithRegistration(client.Client))\n}",
"func (o *NetworkElementSummaryAllOf) GetRevision() string {\n\tif o == nil || o.Revision == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\treturn *o.Revision\n}",
"func (c *BinaryFileClient) Get(ctx context.Context, id int) (*BinaryFile, error) {\n\treturn c.Query().Where(binaryfile.ID(id)).Only(ctx)\n}",
"func (o IopingSpecVolumeVolumeSourceGitRepoPtrOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v *IopingSpecVolumeVolumeSourceGitRepo) *string {\n\t\tif v == nil {\n\t\t\treturn nil\n\t\t}\n\t\treturn v.Revision\n\t}).(pulumi.StringPtrOutput)\n}",
"func FindGistForID(ID interface{}) Gist {\n\tgist := Gist{}\n\tDb.Get(&gist, \"SELECT * FROM gists WHERE id = $1\", ID)\n\treturn gist\n}",
"func FindBook(c *gin.Context) {\n\tdb := c.MustGet(\"db\").(*gorm.DB)\n\n\tvar book models.Book\n\tif err := db.Where(\"id = ?\", c.Param(\"id\")).First(&book).Error; err != nil {\n\t\tc.JSON(http.StatusBadRequest, gin.H{\"data\": book})\n\t\treturn\n\t}\n\n\tc.JSON(http.StatusOK, gin.H{\"data\": book})\n}",
"func FindSnapshot(be Lister, s string) (ID, error) {\n\t// parse ID directly\n\tif id, err := ParseID(s); err == nil {\n\t\treturn id, nil\n\t}\n\n\t// find snapshot id with prefix\n\tid, err := Find(be, Snapshot, s)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn id, nil\n}",
"func (o *ReportingTaskEntity) GetRevisionOk() (*RevisionDTO, bool) {\n\tif o == nil || o.Revision == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Revision, true\n}",
"func (o *AssetRevision) ReloadG() error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision provided for reload\")\n\t}\n\n\treturn o.Reload(boil.GetDB())\n}",
"func FindBraceletPhotoGP(id int, selectCols ...string) *BraceletPhoto {\n\tretobj, err := FindBraceletPhoto(boil.GetDB(), id, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (c *GsRegroup) GetByID(id string) (*GsRegroup, error) {\n\n\tvar data GsRegroup // not use *GsRegroup\n\tcrud.Params(gt.Data(&data))\n\tif err := crud.GetByID(id).Error(); err != nil {\n\t\t//log.Log.Error(err.Error())\n\t\treturn nil, err\n\t}\n\treturn &data, nil\n}",
"func Get(repo repository.Repo, revision string) (*Review, error) {\n\tsummary, err := GetSummary(repo, revision)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif summary == nil {\n\t\treturn nil, nil\n\t}\n\treturn summary.Details()\n}",
"func (c *ReturninvoiceClient) Get(ctx context.Context, id int) (*Returninvoice, error) {\n\treturn c.Query().Where(returninvoice.ID(id)).Only(ctx)\n}",
"func (v Project) ResolveRevision(rev string) (string, error) {\n\tif rev == \"\" {\n\t\treturn \"\", nil\n\t}\n\n\traw := v.Raw()\n\tif raw == nil {\n\t\treturn \"\", fmt.Errorf(\"repository for %s is missing, fail to parse %s\", v.Name, rev)\n\t}\n\n\tif rev == \"\" {\n\t\tlog.Errorf(\"empty revision to resolve for project '%s'\", v.Name)\n\t}\n\n\trevid, err := raw.ResolveRevision(plumbing.Revision(rev))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn revid.String(), nil\n}",
"func (s *Service) Get(ctx context.Context, id string) (*types.Visit, error) {\n\treturn s.repo.FindByID(ctx, id)\n}",
"func (m *BrowserSiteList) GetRevision()(*string) {\n val, err := m.GetBackingStore().Get(\"revision\")\n if err != nil {\n panic(err)\n }\n if val != nil {\n return val.(*string)\n }\n return nil\n}",
"func (c *Contractor) saveRevision(id types.FileContractID) func(types.FileContractRevision, []crypto.Hash) error {\n\treturn func(rev types.FileContractRevision, newRoots []crypto.Hash) error {\n\t\tc.mu.Lock()\n\t\tdefer c.mu.Unlock()\n\t\tc.cachedRevisions[id] = cachedRevision{rev, newRoots}\n\t\treturn c.saveSync()\n\t}\n}",
"func (a *SnapshotApiService) SnapshotsFindById(ctx _context.Context, snapshotId string, optionals *SnapshotsFindByIdOpts) (Snapshot, *APIResponse, error) {\n\tvar (\n\t\tlocalVarHTTPMethod = _nethttp.MethodGet\n\t\tlocalVarPostBody interface{}\n\t\tlocalVarFormFileName string\n\t\tlocalVarFileName string\n\t\tlocalVarFileBytes []byte\n\t\tlocalVarReturnValue Snapshot\n\t)\n\n\t// create path and map variables\n\tlocalVarPath := a.client.cfg.BasePath + \"/snapshots/{snapshotId}\"\n\tlocalVarPath = strings.Replace(localVarPath, \"{\"+\"snapshotId\"+\"}\", _neturl.PathEscape(parameterToString(snapshotId, \"\")) , -1)\n\n\tlocalVarHeaderParams := make(map[string]string)\n\tlocalVarQueryParams := _neturl.Values{}\n\tlocalVarFormParams := _neturl.Values{}\n\n\tif optionals != nil && optionals.Pretty != nil {\n\t\tlocalVarQueryParams.Add(\"pretty\", parameterToString(*optionals.Pretty, \"\"))\n\t}\n\tif optionals != nil && optionals.Depth != nil {\n\t\tlocalVarQueryParams.Add(\"depth\", parameterToString(*optionals.Depth, \"\"))\n\t}\n\t// to determine the Content-Type header\n\tlocalVarHTTPContentTypes := []string{}\n\n\t// set Content-Type header\n\tlocalVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)\n\tif localVarHTTPContentType != \"\" {\n\t\tlocalVarHeaderParams[\"Content-Type\"] = localVarHTTPContentType\n\t}\n\n\t// to determine the Accept header\n\tlocalVarHTTPHeaderAccepts := []string{\"application/json\"}\n\n\t// set Accept header\n\tlocalVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)\n\tif localVarHTTPHeaderAccept != \"\" {\n\t\tlocalVarHeaderParams[\"Accept\"] = localVarHTTPHeaderAccept\n\t}\n\tif optionals != nil && optionals.XContractNumber != nil {\n\t\tlocalVarHeaderParams[\"X-Contract-Number\"] = parameterToString(*optionals.XContractNumber, \"\")\n\t}\n\tif ctx != nil {\n\t\t// API Key Authentication\n\t\tif auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {\n\t\t\tvar key string\n\t\t\tif auth.Prefix != \"\" {\n\t\t\t\tkey = auth.Prefix + \" \" + auth.Key\n\t\t\t} else {\n\t\t\t\tkey = auth.Key\n\t\t\t}\n\t\t\tlocalVarHeaderParams[\"Authorization\"] = key\n\t\t}\n\t}\n\tr, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, err\n\t}\n\n\tlocalVarHTTPResponse, err := a.client.callAPI(r)\n\tlocalVarAPIResponse := &APIResponse {\n\t\tResponse: localVarHTTPResponse,\n\t\tMethod: localVarHTTPMethod,\n\t\tRequestURL: localVarPath,\n\t\tOperation: \"SnapshotsFindById\",\n\t}\n\tif err != nil || localVarHTTPResponse == nil {\n\t\treturn localVarReturnValue, localVarAPIResponse, err\n\t}\n\n\tlocalVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)\n\tlocalVarHTTPResponse.Body.Close()\n\tlocalVarAPIResponse.Payload = localVarBody\n\tif err != nil {\n\t\treturn localVarReturnValue, localVarAPIResponse, err\n\t}\n\n\tif localVarHTTPResponse.StatusCode >= 300 {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: localVarHTTPResponse.Status,\n\t\t}\n\t\t\tvar v Error\n\t\t\terr = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\t\t\tif err != nil {\n\t\t\t\tnewErr.error = err.Error()\n\t\t\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t\t\t}\n\t\t\tnewErr.model = v\n\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t}\n\n\terr = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\tif err != nil {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: err.Error(),\n\t\t}\n\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t}\n\n\treturn localVarReturnValue, localVarAPIResponse, nil\n}",
"func (s *ImportAssetsFromRedshiftDataSharesResponseDetails) SetRevisionId(v string) *ImportAssetsFromRedshiftDataSharesResponseDetails {\n\ts.RevisionId = &v\n\treturn s\n}",
"func (r *RevenueAccountRepository) FindByID(id uint64) (*model.RevenueAccountModel, error) {\n\tvar account model.RevenueAccountModel\n\taccount.ID = id\n\tif err := r.db.First(&account).Error; err != nil {\n\t\treturn nil, err\n\t}\n\treturn &account, nil\n}",
"func (t *Transaction) FindByID(searchID string) {\n\tif bson.IsObjectIdHex(searchID) {\n\t\terr := Transactions.FindId(bson.ObjectIdHex(searchID)).One(&t)\n\t\tif err != nil {\n\t\t\tlog.Println(\"[MONGO] ERROR FINDING TRANSACTION:\", err.Error())\n\t\t}\n\t}\n}"
] |
[
"0.7329825",
"0.7077888",
"0.6452465",
"0.6182017",
"0.5751377",
"0.5447418",
"0.5389165",
"0.5293256",
"0.5177667",
"0.517233",
"0.5164314",
"0.51480365",
"0.5136278",
"0.5131556",
"0.5098399",
"0.50910646",
"0.5074462",
"0.5046124",
"0.5015361",
"0.49850595",
"0.4980656",
"0.49696052",
"0.49389592",
"0.49315384",
"0.49283525",
"0.49094427",
"0.4903608",
"0.48979887",
"0.48720405",
"0.48640132",
"0.48412362",
"0.4839351",
"0.4823007",
"0.48180705",
"0.480813",
"0.48041",
"0.48015302",
"0.47518596",
"0.475123",
"0.47429487",
"0.47376844",
"0.47359478",
"0.4729741",
"0.4710647",
"0.4705856",
"0.4705466",
"0.46984214",
"0.46958414",
"0.46931097",
"0.4689775",
"0.4677972",
"0.46671966",
"0.4659307",
"0.4651078",
"0.4645854",
"0.4645343",
"0.46336183",
"0.46255848",
"0.46166837",
"0.46069375",
"0.4598654",
"0.4598422",
"0.45972902",
"0.45816684",
"0.45589513",
"0.45432428",
"0.45216346",
"0.45195103",
"0.45166534",
"0.45028862",
"0.44907448",
"0.44902688",
"0.44881424",
"0.44857574",
"0.44794735",
"0.44790912",
"0.44668528",
"0.4458994",
"0.4458494",
"0.44552702",
"0.4452626",
"0.44521275",
"0.44518664",
"0.44513533",
"0.4449978",
"0.44478986",
"0.44357103",
"0.44327667",
"0.44269213",
"0.4425432",
"0.4415938",
"0.44150233",
"0.44137514",
"0.44086075",
"0.44085354",
"0.44005474",
"0.43979853",
"0.43960863",
"0.43940932",
"0.43840554"
] |
0.7230963
|
1
|
FindAssetRevisionGP retrieves a single record by ID, and panics on error.
|
func FindAssetRevisionGP(orig int, selectCols ...string) *AssetRevision {
retobj, err := FindAssetRevision(boil.GetDB(), orig, selectCols...)
if err != nil {
panic(boil.WrapErr(err))
}
return retobj
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func FindAssetRevision(exec boil.Executor, orig int, selectCols ...string) (*AssetRevision, error) {\n\tassetRevisionObj := &AssetRevision{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"asset_revision\\\" where \\\"orig\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, orig)\n\n\terr := q.Bind(assetRevisionObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"public: unable to select from asset_revision\")\n\t}\n\n\treturn assetRevisionObj, nil\n}",
"func FindAssetRevisionG(orig int, selectCols ...string) (*AssetRevision, error) {\n\treturn FindAssetRevision(boil.GetDB(), orig, selectCols...)\n}",
"func FindAssetRevisionP(exec boil.Executor, orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(exec, orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (cr APIContractRepository) Get(ctx context.Context, revisionID uuid.UUID) (models.APIContractRevision, error) {\n\tif revisionID == uuid.Nil {\n\t\treturn models.APIContractRevision{}, errors.New(\"invalid contract revision id supplied\")\n\t}\n\n\tvar acr models.APIContractRevision\n\ttx := cr.db.Find(&acr, \"id = ?\", revisionID.String())\n\tif tx.Error != nil {\n\t\treturn models.APIContractRevision{}, fmt.Errorf(\"no contract revision found for id %s: %w\", revisionID, tx.Error)\n\t}\n\n\treturn acr, nil\n}",
"func AssetRevisionExistsGP(orig int) bool {\n\te, err := AssetRevisionExists(boil.GetDB(), orig)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn e\n}",
"func (q assetRevisionQuery) One() (*AssetRevision, error) {\n\to := &AssetRevision{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"public: failed to execute a one query for asset_revision\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (d *Document) FindOneWithRevision(\n\tcontext.Context, string, int64,\n) (*flare.Document, error) {\n\treturn nil, errors.New(\"not implemented\")\n}",
"func (reg *defaultRegistry) GetRevision(gen runtime.Generation) (*engine.Revision, error) {\n\t// todo thing about replacing hardcoded key with some flag in Info that will show that there is a single object of that kind\n\tvar revision *engine.Revision\n\terr := reg.store.Find(engine.TypeRevision.Kind, &revision, store.WithKey(engine.RevisionKey), store.WithGen(gen))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif revision == nil {\n\t\treturn nil, nil\n\t}\n\n\treturn revision, nil\n}",
"func get_asset(stub shim.ChaincodeStubInterface, id string) (Asset, error) {\n\tvar asset Asset\n\tassetAsBytes, err := stub.GetState(id) //getState retreives a key/value from the ledger\n\tif err != nil { //this seems to always succeed, even if key didn't exist\n\t\treturn asset, errors.New(\"Failed to find asset - \" + id)\n\t}\n\tjson.Unmarshal(assetAsBytes, &asset) //un stringify it aka JSON.parse()\n\n\tif asset.Id != id { //test if product is actually here or just nil\n\t\treturn asset, errors.New(\"Asset does not exist - \" + id)\n\t}\n\n\treturn asset, nil\n}",
"func (api *versionAPI) Find(meta *api.ObjectMeta) (*Version, error) {\n\t// find the object\n\tobj, err := api.ct.FindObject(\"Version\", meta)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// asset type\n\tswitch obj.(type) {\n\tcase *Version:\n\t\thobj := obj.(*Version)\n\t\treturn hobj, nil\n\tdefault:\n\t\treturn nil, errors.New(\"incorrect object type\")\n\t}\n}",
"func RetrieveVersion(id string) {\n}",
"func requireRevID(t *testing.T, rt *RestTester, docID, revID string) {\n\tdoc, err := rt.GetDatabase().GetDocument(logger.TestCtx(t), docID, db.DocUnmarshalAll)\n\trequire.NoError(t, err, \"Error reading document from bucket\")\n\trequire.Equal(t, revID, doc.SyncData.CurrentRev)\n}",
"func FindVoteGP(id int, selectCols ...string) *Vote {\n\tretobj, err := FindVote(boil.GetDB(), id, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func getRevision(sd []byte) BYTE {\n\tif len(sd) < 1 {\n\t\treturn 0\n\t}\n\n\t// SECURITY_DESCRIPTOR_RELATIVE.Revision.\n\treturn BYTE(sd[0])\n}",
"func (r *Releaser) Find(tagName string) (*Release, error) {\n\trelease, _, err := r.client.Repositories.GetReleaseByTag(context.Background(), r.owner, r.repository, tagName)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tlog.Printf(\"found release ID: %v, tag: %v\", *release.ID, *release.TagName)\n\treturn &Release{ID: *release.ID, TagName: *release.TagName, Releaser: r}, nil\n}",
"func (r *repository) Find(id uint) (*models.Upload, error) {\n\tupload := models.Upload{}\n\n\tif err := r.db.First(&upload, id).Error; err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &upload, nil\n}",
"func FindAuthorGP(id int64, selectCols ...string) *Author {\n\tretobj, err := FindAuthor(boil.GetDB(), id, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (api *snapshotrestoreAPI) Find(meta *api.ObjectMeta) (*SnapshotRestore, error) {\n\t// find the object\n\tobj, err := api.ct.FindObject(\"SnapshotRestore\", meta)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// asset type\n\tswitch obj.(type) {\n\tcase *SnapshotRestore:\n\t\thobj := obj.(*SnapshotRestore)\n\t\treturn hobj, nil\n\tdefault:\n\t\treturn nil, errors.New(\"incorrect object type\")\n\t}\n}",
"func (assetRevisionL) LoadAsset(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Asset\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Asset\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Asset = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Asset == foreign.ID {\n\t\t\t\tlocal.R.Asset = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (r *Repository) FindSemverTag(c *semver.Constraints) (*plumbing.Reference, error) {\n\t// Check if Repository is nil to avoid a panic if this function is called\n\t// before repo has been cloned\n\tif r.Repository == nil {\n\t\treturn nil, errors.New(\"Repository is nil\")\n\t}\n\n\ttagsIter, err := r.Tags()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tcoll := semverref.Collection{}\n\n\tif err := tagsIter.ForEach(func(t *plumbing.Reference) error {\n\t\tv, err := semver.NewVersion(t.Name().Short())\n\t\tif err != nil {\n\t\t\treturn nil // Ignore errors and thus tags that aren't parsable as a semver\n\t\t}\n\n\t\t// No way to a priori find the length of tagsIter so append to the collection.\n\t\tcoll = append(coll, semverref.SemverRef{Ver: v, Ref: t})\n\t\treturn nil\n\t}); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn coll.HighestMatch(c)\n}",
"func AssetRevisionExistsG(orig int) (bool, error) {\n\treturn AssetRevisionExists(boil.GetDB(), orig)\n}",
"func FindBraceletPhotoGP(id int, selectCols ...string) *BraceletPhoto {\n\tretobj, err := FindBraceletPhoto(boil.GetDB(), id, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (q assetRevisionQuery) OneP() *AssetRevision {\n\to, err := q.One()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func (n *Node) GetRevision() error {\n\tfor _, s := range revServices {\n\t\tif !strings.HasPrefix(n.ImportPath, s.prefix) {\n\t\t\tcontinue\n\t\t}\n\t\treturn s.get(HttpClient, n)\n\t}\n\treturn ErrNotMatchAnyService\n}",
"func (o *Drive) GetRevision(ctx context.Context) (revision string, err error) {\n\terr = o.object.CallWithContext(ctx, \"org.freedesktop.DBus.Properties.Get\", 0, InterfaceDrive, \"Revision\").Store(&revision)\n\treturn\n}",
"func (db *DB) getVersion(id int) *DetailVersion {\n\tver := &DetailVersion{}\n\terr := db.Get(ver, \"select * from detail_version where id = $1\", id)\n\n\tif err != nil {\n\t\tif err == sql.ErrNoRows {\n\t\t\treturn nil\n\t\t} else {\n\t\t\tpanic(err)\n\t\t}\n\t}\n\n\treturn ver\n}",
"func AssetRevisionExists(exec boil.Executor, orig int) (bool, error) {\n\tvar exists bool\n\n\tquery := \"select exists(select 1 from \\\"asset_revision\\\" where \\\"orig\\\"=$1 limit 1)\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, orig)\n\t}\n\n\trow := exec.QueryRow(query, orig)\n\n\terr := row.Scan(&exists)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"public: unable to check if asset_revision exists\")\n\t}\n\n\treturn exists, nil\n}",
"func (r *AutoRoller) getRevision(ctx context.Context, id string) (*revision.Revision, error) {\n\tif id == r.lastRollRev.Id {\n\t\treturn r.lastRollRev, nil\n\t}\n\tif id == r.nextRollRev.Id {\n\t\treturn r.nextRollRev, nil\n\t}\n\tif id == r.tipRev.Id {\n\t\treturn r.tipRev, nil\n\t}\n\tfor _, rev := range r.notRolledRevs {\n\t\tif id == rev.Id {\n\t\t\treturn rev, nil\n\t\t}\n\t}\n\treturn r.rm.GetRevision(ctx, id)\n}",
"func FindGitRevision(ctx context.Context, file string) (shortSha string, sha string, err error) {\n\tlogger := common.Logger(ctx)\n\n\tgitDir, err := git.PlainOpenWithOptions(\n\t\tfile,\n\t\t&git.PlainOpenOptions{\n\t\t\tDetectDotGit: true,\n\t\t\tEnableDotGitCommonDir: true,\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlogger.WithError(err).Error(\"path\", file, \"not located inside a git repository\")\n\t\treturn \"\", \"\", err\n\t}\n\n\thead, err := gitDir.Reference(plumbing.HEAD, true)\n\tif err != nil {\n\t\treturn \"\", \"\", err\n\t}\n\n\tif head.Hash().IsZero() {\n\t\treturn \"\", \"\", fmt.Errorf(\"HEAD sha1 could not be resolved\")\n\t}\n\n\thash := head.Hash().String()\n\n\tlogger.Debugf(\"Found revision: %s\", hash)\n\treturn hash[:7], strings.TrimSpace(hash), nil\n}",
"func (c *Client) GetRevision(dir string) (int, error) {\n\tvar revision int\n\n\t// Prepare the URL\n\tURL := fmt.Sprintf(wpRevisionURL, dir)\n\n\t// Make the Request\n\tresp, err := c.getRequest(URL)\n\tif err != nil {\n\t\treturn revision, err\n\t}\n\n\t// Drain body and check Close error\n\tdefer drainAndClose(resp.Body, &err)\n\tbytes, err := ioutil.ReadAll(resp.Body)\n\trevs := regexRevision.FindAllStringSubmatch(string(bytes), 1)\n\n\trevision, err = strconv.Atoi(revs[0][1])\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn revision, err\n}",
"func (s *edgeStore) Find(id uint32) *Edge {\n Assert(nilEdgeStore, s != nil)\n Assert(zeroEdgeId, id != uint32(0))\n Assert(nilEdgeTrackingMap, s.tracking != nil)\n\n if e, ok := s.tracking[id]; ok {\n return e\n }\n \n // read the edge from the file and return it\n readAt := int64((id - 1) * edgeDataSize)\n bytes := make([]byte, edgeDataSize)\n _, err := s.file.ReadAt(bytes, readAt)\n if (err != nil) {\n return nil\n }\n \n e, _ := constructEdge(id, bytes) \n return e\n}",
"func AssetRevisionExistsP(exec boil.Executor, orig int) bool {\n\te, err := AssetRevisionExists(exec, orig)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn e\n}",
"func (rc *BypassRevisionCache) Get(docID, revID string, copyType BodyCopyType) (docRev DocumentRevision, err error) {\n\tdocRev.RevID = revID\n\tdocRev.Body, docRev.History, docRev.Channels, docRev.Attachments, docRev.Expiry, err = revCacheLoader(rc.backingStore, IDAndRev{DocID: docID, RevID: revID})\n\tif err != nil {\n\t\treturn DocumentRevision{}, err\n\t}\n\n\trc.bypassStat.Add(1)\n\n\treturn docRev, nil\n}",
"func getObjectRevision(obj client.Object) (int64, error) {\n\ta := obj.GetAnnotations()\n\tif a == nil {\n\t\treturn 0, nil\n\t}\n\n\tif len(a[revisionAnnotation]) == 0 {\n\t\treturn 0, nil\n\t}\n\n\treturn strconv.ParseInt(a[revisionAnnotation], 10, 64)\n}",
"func (s *chainScore) Ex_getRevision() (int64, error) {\n\tif err := s.tryChargeCall(false); err != nil {\n\t\treturn 0, err\n\t}\n\tas := s.cc.GetAccountState(state.SystemID)\n\treturn scoredb.NewVarDB(as, state.VarRevision).Int64(), nil\n}",
"func FindAPIKeyGP(id int, selectCols ...string) *APIKey {\n\tretobj, err := FindAPIKey(boil.GetDB(), id, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (o GroupContainerVolumeGitRepoOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v GroupContainerVolumeGitRepo) *string { return v.Revision }).(pulumi.StringPtrOutput)\n}",
"func (o GroupContainerVolumeGitRepoPtrOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v *GroupContainerVolumeGitRepo) *string {\n\t\tif v == nil {\n\t\t\treturn nil\n\t\t}\n\t\treturn v.Revision\n\t}).(pulumi.StringPtrOutput)\n}",
"func (s *SnapshotsServiceOp) get(ID interface{}) (*Snapshot, *Response, error) {\n\tpath := fmt.Sprintf(\"%s/%v\", snapshotBasePath, ID)\n\n\treq, err := s.client.NewRequest(\"GET\", path, nil)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\troot := new(snapshotRoot)\n\tresp, err := s.client.Do(req, root)\n\tif err != nil {\n\t\treturn nil, resp, err\n\t}\n\n\treturn root.Snapshot, resp, err\n}",
"func FindStockCvtermGP(stockCvtermID int, selectCols ...string) *StockCvterm {\n\tretobj, err := FindStockCvterm(boil.GetDB(), stockCvtermID, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func lookupBlob(r *git.Repository, id *git.Oid) (*git.Blob, error) {\n\tobj, err := r.Lookup(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif blob, ok := obj.(*git.Blob); ok {\n\t\treturn blob, nil\n\t}\n\treturn nil, fmt.Errorf(\"hash %v exist but is not a blob\", id)\n}",
"func lookupBlob(r *git.Repository, id *git.Oid) (*git.Blob, error) {\n\tobj, err := r.Lookup(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif blob, ok := obj.(*git.Blob); ok {\n\t\treturn blob, nil\n\t}\n\treturn nil, fmt.Errorf(\"hash %v exist but is not a blob\", id)\n}",
"func (r *JobRepo) Find(id uint) (*model.Job, error) {\n\tjob := &model.Job{}\n\tdb, err := db.Instance()\n\tif err != nil {\n\t\treturn job, err\n\t}\n\terr = db.Model(job).Where(\"id = ?\", id).Preload(\"Build.Repository.Provider\").First(job).Error\n\treturn job, nil\n}",
"func FindTransactionGP(id uint64, selectCols ...string) *Transaction {\n\tretobj, err := FindTransaction(boil.GetDB(), id, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (o GroupInitContainerVolumeGitRepoOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v GroupInitContainerVolumeGitRepo) *string { return v.Revision }).(pulumi.StringPtrOutput)\n}",
"func (o GroupInitContainerVolumeGitRepoPtrOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v *GroupInitContainerVolumeGitRepo) *string {\n\t\tif v == nil {\n\t\t\treturn nil\n\t\t}\n\t\treturn v.Revision\n\t}).(pulumi.StringPtrOutput)\n}",
"func getAssetByID(id int) (*Asset, error) {\n\tpath := fmt.Sprintf(\"asset/%d\", id)\n\tresp, err := get(path, nil)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Failed TCMD request\")\n\t}\n\n\tvar result Asset\n\terr = json.Unmarshal(resp, &result)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Failed to unmarshal TCMD response\")\n\t}\n\treturn &result, nil\n}",
"func (v Project) ResolveRevision(rev string) (string, error) {\n\tif rev == \"\" {\n\t\treturn \"\", nil\n\t}\n\n\traw := v.Raw()\n\tif raw == nil {\n\t\treturn \"\", fmt.Errorf(\"repository for %s is missing, fail to parse %s\", v.Name, rev)\n\t}\n\n\tif rev == \"\" {\n\t\tlog.Errorf(\"empty revision to resolve for project '%s'\", v.Name)\n\t}\n\n\trevid, err := raw.ResolveRevision(plumbing.Revision(rev))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn revid.String(), nil\n}",
"func (prj *Project) Get(id uuid.UUID) error {\n\tres := db.First(prj, id)\n\treturn res.Error\n}",
"func FindFailureGP(id int64, selectCols ...string) *Failure {\n\tretobj, err := FindFailure(boil.GetDB(), id, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (r *Store) GetRevision(ctx context.Context, name, revision string) (context.Context, gopass.Secret, error) {\n\tstore, name := r.getStore(name)\n\tsec, err := store.GetRevision(ctx, name, revision)\n\n\treturn ctx, sec, err\n}",
"func (c *ModuleVersionClient) Get(ctx context.Context, id int) (*ModuleVersion, error) {\n\treturn c.Query().Where(moduleversion.ID(id)).Only(ctx)\n}",
"func (db *DB) Rev(id string) (string, error) {\n\treturn responseRev(db.closedRequest(db.ctx, \"HEAD\", path(db.name, id), nil))\n}",
"func (r *Repository) Get(ctx context.Context, id digest.Digest) (io.ReadCloser, error) {\n\t_, path := r.Path(id)\n\trc, err := os.Open(path)\n\tif err != nil {\n\t\treturn nil, errors.E(\"get\", r.Root, id, err)\n\t}\n\treturn rc, nil\n}",
"func (sc *ScreenlyClient) Get(id string) *Asset {\n\tasset := &Asset{}\n\tpath := fmt.Sprintf(\"assets/%s\", id)\n\tresponse, err := sc.doHttp(\"GET\", path, nil)\n\tif err == nil {\n\t\terr = json.NewDecoder(response.Body).Decode(asset)\n\t\tif err == nil {\n\t\t\treturn asset\n\t\t}\n\t}\n\tpanic(err)\n}",
"func (h *HistoricalRecords) FindRecord(id string) *TransferRecord {\n\th.mutex.Lock()\n\tdefer h.mutex.Unlock()\n\n\tfor _, dr := range h.records {\n\t\tif dr.UUID.String() == id {\n\t\t\treturn dr\n\t\t}\n\t}\n\n\treturn nil\n}",
"func FindTransactionGP(transactionID int, selectCols ...string) *Transaction {\n\tretobj, err := FindTransaction(boil.GetDB(), transactionID, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func lookupCommit(r *git.Repository, id *git.Oid) (*git.Commit, error) {\n\tobj, err := r.Lookup(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif commit, ok := obj.(*git.Commit); ok {\n\t\treturn commit, nil\n\t}\n\treturn nil, fmt.Errorf(\"hash %v exist but is not a commit\", id)\n}",
"func lookupCommit(r *git.Repository, id *git.Oid) (*git.Commit, error) {\n\tobj, err := r.Lookup(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif commit, ok := obj.(*git.Commit); ok {\n\t\treturn commit, nil\n\t}\n\treturn nil, fmt.Errorf(\"hash %v exist but is not a commit\", id)\n}",
"func (o *ReportingTaskEntity) GetRevisionOk() (*RevisionDTO, bool) {\n\tif o == nil || o.Revision == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Revision, true\n}",
"func (t *SegmentService) Find(id string) (Segment, error) {\n\treturn t.Repository.find(id)\n}",
"func (s *Service) Get(ctx context.Context, id string) (*types.Visit, error) {\n\treturn s.repo.FindByID(ctx, id)\n}",
"func (repo PostgresRepository) FindByID(id string) (document entity.Document, err error) {\n\t_, err = repo.db.SQL(\"SELECT * FROM documents WHERE id = ?\", id).Get(&document)\n\treturn\n}",
"func findSnapshotByRootObjectIDOrManifestID(ctx context.Context, rep repo.Repository, rootID string, consistentAttributes bool) (*snapshot.Manifest, error) {\n\tm, err := snapshot.LoadSnapshot(ctx, rep, manifest.ID(rootID))\n\tif err == nil {\n\t\treturn m, nil\n\t}\n\n\trootOID, err := object.ParseID(rootID)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"error parsing root object ID\")\n\t}\n\n\tmans, err := snapshot.FindSnapshotsByRootObjectID(ctx, rep, rootOID)\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"unable to find snapshots by ID %v\", rootID)\n\t}\n\n\t// no matching snapshots.\n\tif len(mans) == 0 {\n\t\treturn nil, nil\n\t}\n\n\t// all snapshots have consistent metadata, pick any.\n\tif areSnapshotsConsistent(mans) {\n\t\treturn mans[0], nil\n\t}\n\n\t// at this point we found multiple snapshots with the same root ID which don't agree on other\n\t// metadata (the attributes, ACLs, ownership, etc. of the root)\n\tif consistentAttributes {\n\t\treturn nil, errors.Errorf(\"found multiple snapshots matching %v with inconsistent root attributes\", rootID)\n\t}\n\n\trepoFSLog(ctx).Debugf(\"Found multiple snapshots matching %v with inconsistent root attributes. Picking latest one.\", rootID)\n\n\treturn latestManifest(mans), nil\n}",
"func FindGistForID(ID interface{}) Gist {\n\tgist := Gist{}\n\tDb.Get(&gist, \"SELECT * FROM gists WHERE id = $1\", ID)\n\treturn gist\n}",
"func GetRevision() string {\n\tv := Map[\"revision\"]\n\treturn v\n}",
"func matchGoogleRepo(id string) (RemoteRepo, error) {\n\troot := \"code.google.com/p/\" + id\n\treturn &googleRepo{baseRepo{\"https://\" + root, root, nil}}, nil\n}",
"func (s *SnapshotsServiceOp) get(ctx context.Context, ID string) (*Snapshot, *Response, error) {\n\tpath := fmt.Sprintf(\"%s/%s\", snapshotBasePath, ID)\n\n\treq, err := s.client.NewRequest(ctx, http.MethodGet, path, nil)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\troot := new(snapshotRoot)\n\tresp, err := s.client.Do(ctx, req, root)\n\tif err != nil {\n\t\treturn nil, resp, err\n\t}\n\n\treturn root.Snapshot, resp, err\n}",
"func (c *vertexCollection) Revision(ctx context.Context) (string, error) {\n\tresult, err := c.rawCollection().Revision(ctx)\n\tif err != nil {\n\t\treturn \"\", WithStack(err)\n\t}\n\treturn result, nil\n}",
"func (a *paymentUsecase) GetByID(c context.Context, id int64) (*models.Payment, error) {\n\tctx, cancel := context.WithTimeout(c, a.contextTimeout)\n\tdefer cancel()\n\n\tres, err := a.repo.GetByID(ctx, id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn res, nil\n}",
"func FindSourceGP(id int64, selectCols ...string) *Source {\n\tretobj, err := FindSource(boil.GetDB(), id, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func FindInventoryGP(id int64, selectCols ...string) *Inventory {\n\tretobj, err := FindInventory(boil.GetDB(), id, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (s *Service) Find(id entity.ID) (*entity.Project, error) {\n\treturn s.repo.Find(id)\n}",
"func (a *SnapshotApiService) SnapshotsFindById(ctx _context.Context, snapshotId string, optionals *SnapshotsFindByIdOpts) (Snapshot, *APIResponse, error) {\n\tvar (\n\t\tlocalVarHTTPMethod = _nethttp.MethodGet\n\t\tlocalVarPostBody interface{}\n\t\tlocalVarFormFileName string\n\t\tlocalVarFileName string\n\t\tlocalVarFileBytes []byte\n\t\tlocalVarReturnValue Snapshot\n\t)\n\n\t// create path and map variables\n\tlocalVarPath := a.client.cfg.BasePath + \"/snapshots/{snapshotId}\"\n\tlocalVarPath = strings.Replace(localVarPath, \"{\"+\"snapshotId\"+\"}\", _neturl.PathEscape(parameterToString(snapshotId, \"\")) , -1)\n\n\tlocalVarHeaderParams := make(map[string]string)\n\tlocalVarQueryParams := _neturl.Values{}\n\tlocalVarFormParams := _neturl.Values{}\n\n\tif optionals != nil && optionals.Pretty != nil {\n\t\tlocalVarQueryParams.Add(\"pretty\", parameterToString(*optionals.Pretty, \"\"))\n\t}\n\tif optionals != nil && optionals.Depth != nil {\n\t\tlocalVarQueryParams.Add(\"depth\", parameterToString(*optionals.Depth, \"\"))\n\t}\n\t// to determine the Content-Type header\n\tlocalVarHTTPContentTypes := []string{}\n\n\t// set Content-Type header\n\tlocalVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)\n\tif localVarHTTPContentType != \"\" {\n\t\tlocalVarHeaderParams[\"Content-Type\"] = localVarHTTPContentType\n\t}\n\n\t// to determine the Accept header\n\tlocalVarHTTPHeaderAccepts := []string{\"application/json\"}\n\n\t// set Accept header\n\tlocalVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)\n\tif localVarHTTPHeaderAccept != \"\" {\n\t\tlocalVarHeaderParams[\"Accept\"] = localVarHTTPHeaderAccept\n\t}\n\tif optionals != nil && optionals.XContractNumber != nil {\n\t\tlocalVarHeaderParams[\"X-Contract-Number\"] = parameterToString(*optionals.XContractNumber, \"\")\n\t}\n\tif ctx != nil {\n\t\t// API Key Authentication\n\t\tif auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {\n\t\t\tvar key string\n\t\t\tif auth.Prefix != \"\" {\n\t\t\t\tkey = auth.Prefix + \" \" + auth.Key\n\t\t\t} else {\n\t\t\t\tkey = auth.Key\n\t\t\t}\n\t\t\tlocalVarHeaderParams[\"Authorization\"] = key\n\t\t}\n\t}\n\tr, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, err\n\t}\n\n\tlocalVarHTTPResponse, err := a.client.callAPI(r)\n\tlocalVarAPIResponse := &APIResponse {\n\t\tResponse: localVarHTTPResponse,\n\t\tMethod: localVarHTTPMethod,\n\t\tRequestURL: localVarPath,\n\t\tOperation: \"SnapshotsFindById\",\n\t}\n\tif err != nil || localVarHTTPResponse == nil {\n\t\treturn localVarReturnValue, localVarAPIResponse, err\n\t}\n\n\tlocalVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)\n\tlocalVarHTTPResponse.Body.Close()\n\tlocalVarAPIResponse.Payload = localVarBody\n\tif err != nil {\n\t\treturn localVarReturnValue, localVarAPIResponse, err\n\t}\n\n\tif localVarHTTPResponse.StatusCode >= 300 {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: localVarHTTPResponse.Status,\n\t\t}\n\t\t\tvar v Error\n\t\t\terr = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\t\t\tif err != nil {\n\t\t\t\tnewErr.error = err.Error()\n\t\t\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t\t\t}\n\t\t\tnewErr.model = v\n\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t}\n\n\terr = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\tif err != nil {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: err.Error(),\n\t\t}\n\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t}\n\n\treturn localVarReturnValue, localVarAPIResponse, nil\n}",
"func (o IopingSpecVolumeVolumeSourceGitRepoOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v IopingSpecVolumeVolumeSourceGitRepo) *string { return v.Revision }).(pulumi.StringPtrOutput)\n}",
"func (s *DatabaseServerV3) GetRevision() string {\n\treturn s.Metadata.GetRevision()\n}",
"func (a *SnapshotApiService) SnapshotsFindByIdExecute(r ApiSnapshotsFindByIdRequest) (Snapshot, *APIResponse, error) {\n\tvar (\n\t\tlocalVarHTTPMethod = _nethttp.MethodGet\n\t\tlocalVarPostBody interface{}\n\t\tlocalVarFormFileName string\n\t\tlocalVarFileName string\n\t\tlocalVarFileBytes []byte\n\t\tlocalVarReturnValue Snapshot\n\t)\n\n\tlocalBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, \"SnapshotApiService.SnapshotsFindById\")\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}\n\t}\n\n\tlocalVarPath := localBasePath + \"/snapshots/{snapshotId}\"\n\tlocalVarPath = strings.Replace(localVarPath, \"{\"+\"snapshotId\"+\"}\", _neturl.PathEscape(parameterToString(r.snapshotId, \"\")), -1)\n\n\tlocalVarHeaderParams := make(map[string]string)\n\tlocalVarQueryParams := _neturl.Values{}\n\tlocalVarFormParams := _neturl.Values{}\n\n\tif r.pretty != nil {\n\t\tlocalVarQueryParams.Add(\"pretty\", parameterToString(*r.pretty, \"\"))\n\t}\n\tif r.depth != nil {\n\t\tlocalVarQueryParams.Add(\"depth\", parameterToString(*r.depth, \"\"))\n\t}\n\t// to determine the Content-Type header\n\tlocalVarHTTPContentTypes := []string{}\n\n\t// set Content-Type header\n\tlocalVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)\n\tif localVarHTTPContentType != \"\" {\n\t\tlocalVarHeaderParams[\"Content-Type\"] = localVarHTTPContentType\n\t}\n\n\t// to determine the Accept header\n\tlocalVarHTTPHeaderAccepts := []string{\"application/json\"}\n\n\t// set Accept header\n\tlocalVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)\n\tif localVarHTTPHeaderAccept != \"\" {\n\t\tlocalVarHeaderParams[\"Accept\"] = localVarHTTPHeaderAccept\n\t}\n\tif r.xContractNumber != nil {\n\t\tlocalVarHeaderParams[\"X-Contract-Number\"] = parameterToString(*r.xContractNumber, \"\")\n\t}\n\tif r.ctx != nil {\n\t\t// API Key Authentication\n\t\tif auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {\n\t\t\tif apiKey, ok := auth[\"Token Authentication\"]; ok {\n\t\t\t\tvar key string\n\t\t\t\tif apiKey.Prefix != \"\" {\n\t\t\t\t\tkey = apiKey.Prefix + \" \" + apiKey.Key\n\t\t\t\t} else {\n\t\t\t\t\tkey = apiKey.Key\n\t\t\t\t}\n\t\t\t\tlocalVarHeaderParams[\"Authorization\"] = key\n\t\t\t}\n\t\t}\n\t}\n\treq, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, err\n\t}\n\n\tlocalVarHTTPResponse, err := a.client.callAPI(req)\n\n\tlocalVarAPIResponse := &APIResponse {\n\t\tResponse: localVarHTTPResponse,\n\t\tMethod: localVarHTTPMethod,\n\t\tRequestURL: localVarPath,\n\t\tOperation: \"SnapshotsFindById\",\n\t}\n\n\tif err != nil || localVarHTTPResponse == nil {\n\t\treturn localVarReturnValue, localVarAPIResponse, err\n\t}\n\n\tlocalVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)\n\tlocalVarHTTPResponse.Body.Close()\n\tlocalVarAPIResponse.Payload = localVarBody\n\tif err != nil {\n\t\treturn localVarReturnValue, localVarAPIResponse, err\n\t}\n\n\tif localVarHTTPResponse.StatusCode >= 300 {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: localVarHTTPResponse.Status,\n\t\t}\n\t\t\tvar v Error\n\t\t\terr = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\t\t\tif err != nil {\n\t\t\t\tnewErr.error = err.Error()\n\t\t\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t\t\t}\n\t\t\tnewErr.model = v\n\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t}\n\n\terr = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\tif err != nil {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: err.Error(),\n\t\t}\n\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t}\n\n\treturn localVarReturnValue, localVarAPIResponse, nil\n}",
"func FindTagForVersion(dir string, version string, gitter Gitter) (string, error) {\n\terr := gitter.FetchTags(dir)\n\tif err != nil {\n\t\treturn \"\", errors.Wrapf(err, \"fetching tags for %s\", dir)\n\t}\n\tanswer := \"\"\n\ttags, err := gitter.FilterTags(dir, version)\n\tif err != nil {\n\t\treturn \"\", errors.Wrapf(err, \"listing tags for %s\", version)\n\t}\n\tif len(tags) == 1 {\n\t\tanswer = tags[0]\n\t} else if len(tags) == 0 {\n\t\t// try with v\n\t\tfilter := fmt.Sprintf(\"v%s\", version)\n\t\ttags, err := gitter.FilterTags(dir, filter)\n\t\tif err != nil {\n\t\t\treturn \"\", errors.Wrapf(err, \"listing tags for %s\", filter)\n\t\t}\n\t\tif len(tags) == 1 {\n\t\t\tanswer = tags[0]\n\t\t} else {\n\t\t\treturn \"\", errors.Errorf(\"cannot resolve %s to a single git object (searching for tag %s and tag %s), found %+v\", version, version, filter, tags)\n\t\t}\n\t} else {\n\t\treturn \"\", errors.Errorf(\"cannot resolve %s to a single git object, found %+v\", version, tags)\n\t}\n\treturn answer, nil\n}",
"func FindRentalGP(rentalID int, selectCols ...string) *Rental {\n\tretobj, err := FindRental(boil.GetDB(), rentalID, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (o *AssetRevision) Delete(exec boil.Executor) error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision provided for delete\")\n\t}\n\n\tif err := o.doBeforeDeleteHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\targs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), assetRevisionPrimaryKeyMapping)\n\tquery := \"DELETE FROM \\\"asset_revision\\\" WHERE \\\"orig\\\"=$1\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, args...)\n\t}\n\n\t_, err := exec.Exec(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to delete from asset_revision\")\n\t}\n\n\tif err := o.doAfterDeleteHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}",
"func (a *ApiV2) GetAsset(id string) (asset Asset, err error) {\n\tvar resp AssetResponse\n\tif !common.ValidUUID(id) {\n\t\treturn asset, common.NewError(\"asset id '%s' is invalid\", id)\n\t}\n\tuuid := common.ConvertToUUIDFormat(id)\n\turl := a.getBaseUrl() + \"/assets/\" + uuid\n\treq, err := a.makeRequest(\"GET\", url, nil)\n\tif err != nil {\n\t\treturn asset, err\n\t}\n\terr = handleReq(a, req, &resp)\n\tif err != nil {\n\t\treturn asset, err\n\t}\n\tasset = *resp.Asset\n\t// now get the video\n\tvideo, err := a.GetVideo(asset.VideoId)\n\tif err != nil {\n\t\treturn asset, err\n\t}\n\tasset.Video = video\n\tasset.Api = *a\n\treturn asset, nil\n}",
"func (s *Service) getFile(resID int, fileType int, version int) (file *model.ResourceFile, err error) {\n\tfile = &model.ResourceFile{}\n\tvar (\n\t\tres *model.Resource // current version\n\t\tresHis *model.Resource // history version\n\t\tpoolID int\n\t)\n\tif res, err = s.dao.ParseResID(ctx, resID); err != nil {\n\t\tlog.Error(\"[getFile]-[findPool %d]-Error(%v)\", resID, err)\n\t\treturn\n\t}\n\tpoolID = int(res.PoolID)\n\tif version != 0 { // full pkg of the history version\n\t\tif resHis, err = s.dao.ParseResVer(ctx, poolID, version); err != nil {\n\t\t\tlog.Error(\"[getFile]-[findVersion]-Error(%v)\", err)\n\t\t\treturn\n\t\t}\n\t\tresID = int(resHis.ID)\n\t}\n\tif file, err = s.dao.ReadyFile(ctx, resID, fileType); err != nil {\n\t\tlog.Error(errFormat, \"getUrl\", \"First\", err)\n\t}\n\treturn\n}",
"func (t *badgerTableVersion) Get(id []byte) (ObjectVersion, []byte, error) {\n\tkey := t.getRefKey(id)\n\tt.log.Printf(\"Get version key=%q\\n\", key)\n\tobj := t.obj.New()\n\n\tvar objID []byte\n\terr := t.db.View(func(txn *badger.Txn) error {\n\t\titem, err := txn.Get(key)\n\t\tif err != nil {\n\t\t\treturn translateError(err)\n\t\t}\n\n\t\tval, err := item.Value()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tobjID = val\n\n\t\tobjKey := t.getObjKey(id, objID)\n\n\t\toitem, err := txn.Get(objKey)\n\t\tif err != nil {\n\t\t\treturn translateError(err)\n\t\t}\n\n\t\toval, err := oitem.Value()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn obj.Unmarshal(oval)\n\t})\n\treturn obj, objID, err\n}",
"func (br *BlockRepository) FindByIdentifier(index int64, hash string) (*types.Block, *rTypes.Error) {\n\trf, err := br.findRecordFileByHash(hash)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif rf.BlockIndex != index {\n\t\treturn nil, errors.Errors[errors.BlockNotFound]\n\t}\n\treturn br.constructBlockResponse(rf, index), nil\n}",
"func (ivr InMemoryVideoRepository) Retrieve(id string) (*Video, error) {\n\tv, ok := ivr.storage[id]\n\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"no video with id %s in storage\", id)\n\t}\n\n\treturn v, nil\n}",
"func Get(repo repository.Repo, revision string) (*Review, error) {\n\tsummary, err := GetSummary(repo, revision)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif summary == nil {\n\t\treturn nil, nil\n\t}\n\treturn summary.Details()\n}",
"func ID(id int) predicate.GithubRelease {\n\treturn predicate.GithubRelease(sql.FieldEQ(FieldID, id))\n}",
"func (o FioSpecVolumeVolumeSourceGitRepoOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v FioSpecVolumeVolumeSourceGitRepo) *string { return v.Revision }).(pulumi.StringPtrOutput)\n}",
"func FindBook(c *gin.Context) {\n\tdb := c.MustGet(\"db\").(*gorm.DB)\n\n\tvar book models.Book\n\tif err := db.Where(\"id = ?\", c.Param(\"id\")).First(&book).Error; err != nil {\n\t\tc.JSON(http.StatusBadRequest, gin.H{\"data\": book})\n\t\treturn\n\t}\n\n\tc.JSON(http.StatusOK, gin.H{\"data\": book})\n}",
"func (o IopingSpecVolumeVolumeSourceGitRepoPtrOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v *IopingSpecVolumeVolumeSourceGitRepo) *string {\n\t\tif v == nil {\n\t\t\treturn nil\n\t\t}\n\t\treturn v.Revision\n\t}).(pulumi.StringPtrOutput)\n}",
"func Find(c *gin.Context) {\n\tid, err := book.IDFromString(c.Param(\"id\"))\n\tif err != nil {\n\t\tlog.Println(\"FindBook IDFromString\", err)\n\t\tc.JSON(\n\t\t\thttp.StatusBadRequest,\n\t\t\tgin.H{\"error\": fmt.Sprintf(\"not found book by id %q\", id)},\n\t\t)\n\t\treturn\n\t}\n\tb := db.Find(id)\n\tc.JSON(http.StatusOK, gin.H{\"data\": b})\n}",
"func vcsRevision() string {\n\tbi, ok := debug.ReadBuildInfo()\n\tif !ok {\n\t\treturn \"\"\n\t}\n\tfor _, s := range bi.Settings {\n\t\tif s.Key == \"vcs.revision\" {\n\t\t\treturn s.Value[:9]\n\t\t}\n\t}\n\n\treturn \"\"\n}",
"func (d *Driver) Get(ctx context.Context, key, rangeEnd string, limit, revision int64) (revRet int64, kvRet *server.KeyValue, errRet error) {\n\tstart := time.Now()\n\tdefer func() {\n\t\tdur := time.Since(start)\n\t\tsize := 0\n\t\tif kvRet != nil {\n\t\t\tsize = len(kvRet.Value)\n\t\t}\n\t\tfStr := \"GET %s, rev=%d => revRet=%d, kv=%v, size=%d, err=%v, duration=%s\"\n\t\td.logMethod(dur, fStr, key, revision, revRet, kvRet != nil, size, errRet, dur)\n\t}()\n\n\tcurrentRev, err := d.currentRevision()\n\tif err != nil {\n\t\treturn currentRev, nil, err\n\t}\n\n\trev, kv, err := d.get(ctx, key, revision, false)\n\tif err == nil {\n\t\tif kv == nil {\n\t\t\treturn currentRev, nil, nil\n\t\t}\n\t\treturn rev, kv.KV, nil\n\t}\n\n\tif err == nats.ErrKeyNotFound {\n\t\treturn currentRev, nil, nil\n\t}\n\n\treturn rev, nil, err\n}",
"func (o *ReportingTaskEntity) GetRevision() RevisionDTO {\n\tif o == nil || o.Revision == nil {\n\t\tvar ret RevisionDTO\n\t\treturn ret\n\t}\n\treturn *o.Revision\n}",
"func (r Repository) Get(id string) (*entity.Fee, error) {\n\trecord := &entity.Fee{}\n\n\tresult := r.dbClient.\n\t\tModel(entity.Fee{}).\n\t\tWhere(\"transaction_id = ?\", id).\n\t\tFirst(record)\n\n\tif result.Error != nil {\n\t\tif errors.Is(result.Error, gorm.ErrRecordNotFound) {\n\t\t\treturn nil, nil\n\t\t}\n\t\treturn nil, result.Error\n\t}\n\treturn record, nil\n}",
"func (db *DB) Rev(ctx context.Context, docID string) (rev string, err error) {\n\tif r, ok := db.driverDB.(driver.Rever); ok {\n\t\treturn r.Rev(ctx, docID)\n\t}\n\t// These last two lines cannot be combined for GopherJS due to a bug.\n\t// See https://github.com/gopherjs/gopherjs/issues/608\n\trow, err := db.Get(ctx, docID, nil)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tvar doc struct {\n\t\tRev string `json:\"_rev\"`\n\t}\n\tif err = row.ScanDoc(&doc); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn doc.Rev, nil\n}",
"func (pr *pokemonRepository) FindById(p *model.Pokemon) (*model.Pokemon, error) {\n\trecords, err := readData(\"db.csv\")\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tfor _, record := range records {\n\t\tcsvId, err := strconv.ParseUint(record[0], 10, 32)\n\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tif csvId != p.ID {\n\t\t\tcontinue\n\t\t}\n\n\t\tp.Name = record[1]\n\n\t\tbreak\n\t}\n\n\treturn p, nil\n}",
"func FindStockGP(stockID int, selectCols ...string) *Stock {\n\tretobj, err := FindStock(boil.GetDB(), stockID, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func Revision(in string) string {\n\tmatches := regexRevision.FindStringSubmatch(in)\n\treturn regexGroup(regexRevision, \"revision\", matches)\n}",
"func (c *Client) FindCrmStageId(criteria *Criteria, options *Options) (int64, error) {\n\tids, err := c.Search(CrmStageModel, criteria, options)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\tif len(ids) > 0 {\n\t\treturn ids[0], nil\n\t}\n\treturn -1, fmt.Errorf(\"crm.stage was not found with criteria %v and options %v\", criteria, options)\n}"
] |
[
"0.68672234",
"0.66853225",
"0.66432434",
"0.60953635",
"0.5617957",
"0.5506314",
"0.5371906",
"0.53473574",
"0.53016686",
"0.5276451",
"0.52706635",
"0.5256007",
"0.51698405",
"0.5033316",
"0.5023671",
"0.50085515",
"0.4965728",
"0.49181455",
"0.48997387",
"0.48987186",
"0.48937944",
"0.48914853",
"0.4884877",
"0.48696366",
"0.4865999",
"0.48641378",
"0.4846026",
"0.48384362",
"0.48150548",
"0.48116168",
"0.48103055",
"0.48081318",
"0.4807169",
"0.47982168",
"0.4794572",
"0.4775053",
"0.47650945",
"0.4757406",
"0.47512525",
"0.47473478",
"0.47328544",
"0.47328544",
"0.47195667",
"0.47191638",
"0.46915317",
"0.46658447",
"0.46539864",
"0.4628686",
"0.46250632",
"0.46228606",
"0.46111345",
"0.46005633",
"0.45979822",
"0.45746866",
"0.45705566",
"0.45636213",
"0.45629972",
"0.45603707",
"0.45603707",
"0.4557468",
"0.45496982",
"0.4545246",
"0.45452395",
"0.4543341",
"0.45318407",
"0.45307487",
"0.45238745",
"0.45194831",
"0.45166177",
"0.45155165",
"0.4504783",
"0.45041826",
"0.4501436",
"0.45012906",
"0.44988793",
"0.44988304",
"0.4487873",
"0.44861242",
"0.44857836",
"0.4483691",
"0.44830373",
"0.4466239",
"0.44652376",
"0.4458862",
"0.4458074",
"0.44560584",
"0.44541654",
"0.44471905",
"0.4446118",
"0.44389033",
"0.4436594",
"0.44306847",
"0.44281965",
"0.44278508",
"0.44268626",
"0.4418154",
"0.44177428",
"0.4408571",
"0.440801",
"0.4406575"
] |
0.75437665
|
0
|
FindAssetRevision retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
|
func FindAssetRevision(exec boil.Executor, orig int, selectCols ...string) (*AssetRevision, error) {
assetRevisionObj := &AssetRevision{}
sel := "*"
if len(selectCols) > 0 {
sel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), ",")
}
query := fmt.Sprintf(
"select %s from \"asset_revision\" where \"orig\"=$1", sel,
)
q := queries.Raw(exec, query, orig)
err := q.Bind(assetRevisionObj)
if err != nil {
if errors.Cause(err) == sql.ErrNoRows {
return nil, sql.ErrNoRows
}
return nil, errors.Wrap(err, "public: unable to select from asset_revision")
}
return assetRevisionObj, nil
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func FindAssetRevisionP(exec boil.Executor, orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(exec, orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func FindAssetRevisionGP(orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(boil.GetDB(), orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func FindAssetRevisionG(orig int, selectCols ...string) (*AssetRevision, error) {\n\treturn FindAssetRevision(boil.GetDB(), orig, selectCols...)\n}",
"func FindVote(exec boil.Executor, id int, selectCols ...string) (*Vote, error) {\n\tvoteObj := &Vote{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from `vote` where `id`=?\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, id)\n\n\terr := q.Bind(voteObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from vote\")\n\t}\n\n\treturn voteObj, nil\n}",
"func FindAuthor(exec boil.Executor, id int64, selectCols ...string) (*Author, error) {\n\tauthorObj := &Author{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"authors\\\" where \\\"id\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, id)\n\n\terr := q.Bind(authorObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"mdbmdbmodels: unable to select from authors\")\n\t}\n\n\treturn authorObj, nil\n}",
"func FindVote(ctx context.Context, exec boil.ContextExecutor, hash string, selectCols ...string) (*Vote, error) {\n\tvoteObj := &Vote{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"vote\\\" where \\\"hash\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(query, hash)\n\n\terr := q.Bind(ctx, exec, voteObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from vote\")\n\t}\n\n\treturn voteObj, nil\n}",
"func (assetRevisionL) LoadAsset(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Asset\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Asset\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Asset = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Asset == foreign.ID {\n\t\t\t\tlocal.R.Asset = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (q assetRevisionQuery) One() (*AssetRevision, error) {\n\to := &AssetRevision{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"public: failed to execute a one query for asset_revision\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (api *versionAPI) Find(meta *api.ObjectMeta) (*Version, error) {\n\t// find the object\n\tobj, err := api.ct.FindObject(\"Version\", meta)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// asset type\n\tswitch obj.(type) {\n\tcase *Version:\n\t\thobj := obj.(*Version)\n\t\treturn hobj, nil\n\tdefault:\n\t\treturn nil, errors.New(\"incorrect object type\")\n\t}\n}",
"func (t *Commit) DBFind(ctx context.Context, db DB, _params ...interface{}) (bool, error) {\n\tparams := []interface{}{\n\t\torm.Column(\"id\"),\n\t\torm.Column(\"checksum\"),\n\t\torm.Column(\"repo_id\"),\n\t\torm.Column(\"sha\"),\n\t\torm.Column(\"branch\"),\n\t\torm.Column(\"message\"),\n\t\torm.Column(\"mergecommit\"),\n\t\torm.Column(\"excluded\"),\n\t\torm.Column(\"parent\"),\n\t\torm.Column(\"parent_id\"),\n\t\torm.Column(\"date\"),\n\t\torm.Column(\"author_user_id\"),\n\t\torm.Column(\"committer_user_id\"),\n\t\torm.Column(\"ordinal\"),\n\t\torm.Column(\"customer_id\"),\n\t\torm.Column(\"ref_type\"),\n\t\torm.Column(\"ref_id\"),\n\t\torm.Column(\"metadata\"),\n\t\torm.Table(CommitTableName),\n\t}\n\tif len(_params) > 0 {\n\t\tfor _, param := range _params {\n\t\t\tparams = append(params, param)\n\t\t}\n\t}\n\tq, p := orm.BuildQuery(params...)\n\trow := db.QueryRowContext(ctx, q, p...)\n\tvar _ID sql.NullString\n\tvar _Checksum sql.NullString\n\tvar _RepoID sql.NullString\n\tvar _Sha sql.NullString\n\tvar _Branch sql.NullString\n\tvar _Message sql.NullString\n\tvar _Mergecommit sql.NullBool\n\tvar _Excluded sql.NullBool\n\tvar _Parent sql.NullString\n\tvar _ParentID sql.NullString\n\tvar _Date sql.NullInt64\n\tvar _AuthorUserID sql.NullString\n\tvar _CommitterUserID sql.NullString\n\tvar _Ordinal sql.NullInt64\n\tvar _CustomerID sql.NullString\n\tvar _RefType sql.NullString\n\tvar _RefID sql.NullString\n\tvar _Metadata sql.NullString\n\terr := row.Scan(\n\t\t&_ID,\n\t\t&_Checksum,\n\t\t&_RepoID,\n\t\t&_Sha,\n\t\t&_Branch,\n\t\t&_Message,\n\t\t&_Mergecommit,\n\t\t&_Excluded,\n\t\t&_Parent,\n\t\t&_ParentID,\n\t\t&_Date,\n\t\t&_AuthorUserID,\n\t\t&_CommitterUserID,\n\t\t&_Ordinal,\n\t\t&_CustomerID,\n\t\t&_RefType,\n\t\t&_RefID,\n\t\t&_Metadata,\n\t)\n\tif err != nil && err != sql.ErrNoRows {\n\t\treturn false, err\n\t}\n\tif _ID.Valid {\n\t\tt.SetID(_ID.String)\n\t}\n\tif _Checksum.Valid {\n\t\tt.SetChecksum(_Checksum.String)\n\t}\n\tif _RepoID.Valid {\n\t\tt.SetRepoID(_RepoID.String)\n\t}\n\tif _Sha.Valid {\n\t\tt.SetSha(_Sha.String)\n\t}\n\tif _Branch.Valid {\n\t\tt.SetBranch(_Branch.String)\n\t}\n\tif _Message.Valid {\n\t\tt.SetMessage(_Message.String)\n\t}\n\tif _Mergecommit.Valid {\n\t\tt.SetMergecommit(_Mergecommit.Bool)\n\t}\n\tif _Excluded.Valid {\n\t\tt.SetExcluded(_Excluded.Bool)\n\t}\n\tif _Parent.Valid {\n\t\tt.SetParent(_Parent.String)\n\t}\n\tif _ParentID.Valid {\n\t\tt.SetParentID(_ParentID.String)\n\t}\n\tif _Date.Valid {\n\t\tt.SetDate(_Date.Int64)\n\t}\n\tif _AuthorUserID.Valid {\n\t\tt.SetAuthorUserID(_AuthorUserID.String)\n\t}\n\tif _CommitterUserID.Valid {\n\t\tt.SetCommitterUserID(_CommitterUserID.String)\n\t}\n\tif _Ordinal.Valid {\n\t\tt.SetOrdinal(int32(_Ordinal.Int64))\n\t}\n\tif _CustomerID.Valid {\n\t\tt.SetCustomerID(_CustomerID.String)\n\t}\n\tif _RefType.Valid {\n\t\tt.SetRefType(_RefType.String)\n\t}\n\tif _RefID.Valid {\n\t\tt.SetRefID(_RefID.String)\n\t}\n\tif _Metadata.Valid {\n\t\tt.SetMetadata(_Metadata.String)\n\t}\n\treturn true, nil\n}",
"func FindSource(exec boil.Executor, id int64, selectCols ...string) (*Source, error) {\n\tsourceObj := &Source{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"sources\\\" where \\\"id\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, id)\n\n\terr := q.Bind(sourceObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"mdbmdbmodels: unable to select from sources\")\n\t}\n\n\treturn sourceObj, nil\n}",
"func repoSelector(c *web.C, h http.Handler) http.Handler {\n\tfn := func(w http.ResponseWriter, r *http.Request) {\n\t\tmethod := strings.ToLower(r.Method)\n\t\tadminPriv := c.Env[\"adminPriv\"].(bool)\n\t\tif !adminPriv && readonly && method != \"get\" && method != \"head\" {\n\t\t\tBadRequest(w, r, \"Server in read-only mode and will only accept GET and HEAD requests\")\n\t\t\treturn\n\t\t}\n\t\tvar err error\n\t\tvar uuid dvid.UUID\n\t\tif uuid, c.Env[\"versionID\"], err = datastore.MatchingUUID(c.URLParams[\"uuid\"]); err != nil {\n\t\t\tBadRequest(w, r, err)\n\t\t\treturn\n\t\t}\n\t\tc.Env[\"uuid\"] = uuid\n\t\th.ServeHTTP(w, r)\n\t}\n\treturn http.HandlerFunc(fn)\n}",
"func FindCommitByID(ctx context.Context, db DB, value string) (*Commit, error) {\n\tq := \"SELECT `commit`.`id`,`commit`.`checksum`,`commit`.`repo_id`,`commit`.`sha`,`commit`.`branch`,`commit`.`message`,`commit`.`mergecommit`,`commit`.`excluded`,`commit`.`parent`,`commit`.`parent_id`,`commit`.`date`,`commit`.`author_user_id`,`commit`.`committer_user_id`,`commit`.`ordinal`,`commit`.`customer_id`,`commit`.`ref_type`,`commit`.`ref_id`,`commit`.`metadata` FROM `commit` WHERE `id` = ?\"\n\tvar _ID sql.NullString\n\tvar _Checksum sql.NullString\n\tvar _RepoID sql.NullString\n\tvar _Sha sql.NullString\n\tvar _Branch sql.NullString\n\tvar _Message sql.NullString\n\tvar _Mergecommit sql.NullBool\n\tvar _Excluded sql.NullBool\n\tvar _Parent sql.NullString\n\tvar _ParentID sql.NullString\n\tvar _Date sql.NullInt64\n\tvar _AuthorUserID sql.NullString\n\tvar _CommitterUserID sql.NullString\n\tvar _Ordinal sql.NullInt64\n\tvar _CustomerID sql.NullString\n\tvar _RefType sql.NullString\n\tvar _RefID sql.NullString\n\tvar _Metadata sql.NullString\n\terr := db.QueryRowContext(ctx, q, value).Scan(\n\t\t&_ID,\n\t\t&_Checksum,\n\t\t&_RepoID,\n\t\t&_Sha,\n\t\t&_Branch,\n\t\t&_Message,\n\t\t&_Mergecommit,\n\t\t&_Excluded,\n\t\t&_Parent,\n\t\t&_ParentID,\n\t\t&_Date,\n\t\t&_AuthorUserID,\n\t\t&_CommitterUserID,\n\t\t&_Ordinal,\n\t\t&_CustomerID,\n\t\t&_RefType,\n\t\t&_RefID,\n\t\t&_Metadata,\n\t)\n\tif err == sql.ErrNoRows {\n\t\treturn nil, nil\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tt := &Commit{}\n\tif _ID.Valid {\n\t\tt.SetID(_ID.String)\n\t}\n\tif _Checksum.Valid {\n\t\tt.SetChecksum(_Checksum.String)\n\t}\n\tif _RepoID.Valid {\n\t\tt.SetRepoID(_RepoID.String)\n\t}\n\tif _Sha.Valid {\n\t\tt.SetSha(_Sha.String)\n\t}\n\tif _Branch.Valid {\n\t\tt.SetBranch(_Branch.String)\n\t}\n\tif _Message.Valid {\n\t\tt.SetMessage(_Message.String)\n\t}\n\tif _Mergecommit.Valid {\n\t\tt.SetMergecommit(_Mergecommit.Bool)\n\t}\n\tif _Excluded.Valid {\n\t\tt.SetExcluded(_Excluded.Bool)\n\t}\n\tif _Parent.Valid {\n\t\tt.SetParent(_Parent.String)\n\t}\n\tif _ParentID.Valid {\n\t\tt.SetParentID(_ParentID.String)\n\t}\n\tif _Date.Valid {\n\t\tt.SetDate(_Date.Int64)\n\t}\n\tif _AuthorUserID.Valid {\n\t\tt.SetAuthorUserID(_AuthorUserID.String)\n\t}\n\tif _CommitterUserID.Valid {\n\t\tt.SetCommitterUserID(_CommitterUserID.String)\n\t}\n\tif _Ordinal.Valid {\n\t\tt.SetOrdinal(int32(_Ordinal.Int64))\n\t}\n\tif _CustomerID.Valid {\n\t\tt.SetCustomerID(_CustomerID.String)\n\t}\n\tif _RefType.Valid {\n\t\tt.SetRefType(_RefType.String)\n\t}\n\tif _RefID.Valid {\n\t\tt.SetRefID(_RefID.String)\n\t}\n\tif _Metadata.Valid {\n\t\tt.SetMetadata(_Metadata.String)\n\t}\n\treturn t, nil\n}",
"func FindTransaction(exec boil.Executor, id uint64, selectCols ...string) (*Transaction, error) {\n\ttransactionObj := &Transaction{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from `transaction` where `id`=?\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, id)\n\n\terr := q.Bind(transactionObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"model: unable to select from transaction\")\n\t}\n\n\treturn transactionObj, nil\n}",
"func FindOauthClient(exec boil.Executor, iD uint, selectCols ...string) (*OauthClient, error) {\n\toauthClientObj := &OauthClient{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from `oauth_clients` where `id`=?\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(nil, exec, oauthClientObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from oauth_clients\")\n\t}\n\n\treturn oauthClientObj, nil\n}",
"func FindActivityLog(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*ActivityLog, error) {\n\tactivityLogObj := &ActivityLog{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"activity_logs\\\" where \\\"id\\\"=?\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(ctx, exec, activityLogObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"dbmodel: unable to select from activity_logs\")\n\t}\n\n\treturn activityLogObj, nil\n}",
"func Find(cdb couchdb.CouchDB, selector Selector, parameters ...Parameter) ResultSet {\n\t// Create request object.\n\treq := request{}\n\treq.SetParameter(\"selector\", selector)\n\treq.apply(parameters...)\n\t// Perform find command.\n\trs := cdb.Post(cdb.DatabasePath(\"_find\"), req)\n\treturn newResultSet(rs)\n}",
"func FindOffer(exec boil.Executor, offerid int64, selectCols ...string) (*Offer, error) {\n\tofferObj := &Offer{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"offers\\\" where \\\"offerid\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(query, offerid)\n\n\terr := q.Bind(nil, exec, offerObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"stellarcore: unable to select from offers\")\n\t}\n\n\treturn offerObj, nil\n}",
"func (a *SnapshotApiService) SnapshotsFindByIdExecute(r ApiSnapshotsFindByIdRequest) (Snapshot, *APIResponse, error) {\n\tvar (\n\t\tlocalVarHTTPMethod = _nethttp.MethodGet\n\t\tlocalVarPostBody interface{}\n\t\tlocalVarFormFileName string\n\t\tlocalVarFileName string\n\t\tlocalVarFileBytes []byte\n\t\tlocalVarReturnValue Snapshot\n\t)\n\n\tlocalBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, \"SnapshotApiService.SnapshotsFindById\")\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}\n\t}\n\n\tlocalVarPath := localBasePath + \"/snapshots/{snapshotId}\"\n\tlocalVarPath = strings.Replace(localVarPath, \"{\"+\"snapshotId\"+\"}\", _neturl.PathEscape(parameterToString(r.snapshotId, \"\")), -1)\n\n\tlocalVarHeaderParams := make(map[string]string)\n\tlocalVarQueryParams := _neturl.Values{}\n\tlocalVarFormParams := _neturl.Values{}\n\n\tif r.pretty != nil {\n\t\tlocalVarQueryParams.Add(\"pretty\", parameterToString(*r.pretty, \"\"))\n\t}\n\tif r.depth != nil {\n\t\tlocalVarQueryParams.Add(\"depth\", parameterToString(*r.depth, \"\"))\n\t}\n\t// to determine the Content-Type header\n\tlocalVarHTTPContentTypes := []string{}\n\n\t// set Content-Type header\n\tlocalVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)\n\tif localVarHTTPContentType != \"\" {\n\t\tlocalVarHeaderParams[\"Content-Type\"] = localVarHTTPContentType\n\t}\n\n\t// to determine the Accept header\n\tlocalVarHTTPHeaderAccepts := []string{\"application/json\"}\n\n\t// set Accept header\n\tlocalVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)\n\tif localVarHTTPHeaderAccept != \"\" {\n\t\tlocalVarHeaderParams[\"Accept\"] = localVarHTTPHeaderAccept\n\t}\n\tif r.xContractNumber != nil {\n\t\tlocalVarHeaderParams[\"X-Contract-Number\"] = parameterToString(*r.xContractNumber, \"\")\n\t}\n\tif r.ctx != nil {\n\t\t// API Key Authentication\n\t\tif auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {\n\t\t\tif apiKey, ok := auth[\"Token Authentication\"]; ok {\n\t\t\t\tvar key string\n\t\t\t\tif apiKey.Prefix != \"\" {\n\t\t\t\t\tkey = apiKey.Prefix + \" \" + apiKey.Key\n\t\t\t\t} else {\n\t\t\t\t\tkey = apiKey.Key\n\t\t\t\t}\n\t\t\t\tlocalVarHeaderParams[\"Authorization\"] = key\n\t\t\t}\n\t\t}\n\t}\n\treq, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, err\n\t}\n\n\tlocalVarHTTPResponse, err := a.client.callAPI(req)\n\n\tlocalVarAPIResponse := &APIResponse {\n\t\tResponse: localVarHTTPResponse,\n\t\tMethod: localVarHTTPMethod,\n\t\tRequestURL: localVarPath,\n\t\tOperation: \"SnapshotsFindById\",\n\t}\n\n\tif err != nil || localVarHTTPResponse == nil {\n\t\treturn localVarReturnValue, localVarAPIResponse, err\n\t}\n\n\tlocalVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)\n\tlocalVarHTTPResponse.Body.Close()\n\tlocalVarAPIResponse.Payload = localVarBody\n\tif err != nil {\n\t\treturn localVarReturnValue, localVarAPIResponse, err\n\t}\n\n\tif localVarHTTPResponse.StatusCode >= 300 {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: localVarHTTPResponse.Status,\n\t\t}\n\t\t\tvar v Error\n\t\t\terr = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\t\t\tif err != nil {\n\t\t\t\tnewErr.error = err.Error()\n\t\t\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t\t\t}\n\t\t\tnewErr.model = v\n\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t}\n\n\terr = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\tif err != nil {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: err.Error(),\n\t\t}\n\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t}\n\n\treturn localVarReturnValue, localVarAPIResponse, nil\n}",
"func FindTransaction(exec boil.Executor, transactionID int, selectCols ...string) (*Transaction, error) {\n\ttransactionObj := &Transaction{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from `transactions` where `transaction_id`=?\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, transactionID)\n\n\terr := q.Bind(transactionObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from transactions\")\n\t}\n\n\treturn transactionObj, nil\n}",
"func FindVersion(recipesCfgFile string) (string, error) {\n\tversionMtx.Lock()\n\tdefer versionMtx.Unlock()\n\n\tif version != \"\" {\n\t\treturn version, nil\n\t}\n\n\trecipesCfg, err := recipe_cfg.ParseCfg(recipesCfgFile)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdep, ok := recipesCfg.Deps[\"depot_tools\"]\n\tif !ok {\n\t\treturn \"\", errors.New(\"No dependency found for depot_tools.\")\n\t}\n\tversion = dep.Revision\n\treturn version, nil\n}",
"func FindAuth(exec boil.Executor, id int, selectCols ...string) (*Auth, error) {\n\tauthObj := &Auth{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"auths\\\" where \\\"id\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, id)\n\n\terr := q.Bind(authObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from auths\")\n\t}\n\n\treturn authObj, nil\n}",
"func FindCommitsByCustomerID(ctx context.Context, db DB, value string) ([]*Commit, error) {\n\tq := \"SELECT `commit`.`id`,`commit`.`checksum`,`commit`.`repo_id`,`commit`.`sha`,`commit`.`branch`,`commit`.`message`,`commit`.`mergecommit`,`commit`.`excluded`,`commit`.`parent`,`commit`.`parent_id`,`commit`.`date`,`commit`.`author_user_id`,`commit`.`committer_user_id`,`commit`.`ordinal`,`commit`.`customer_id`,`commit`.`ref_type`,`commit`.`ref_id`,`commit`.`metadata` FROM `commit` WHERE `customer_id` = ? LIMIT 1\"\n\trows, err := db.QueryContext(ctx, q, orm.ToSQLString(value))\n\tif err == sql.ErrNoRows {\n\t\treturn nil, nil\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer rows.Close()\n\tresults := make([]*Commit, 0)\n\tfor rows.Next() {\n\t\tvar _ID sql.NullString\n\t\tvar _Checksum sql.NullString\n\t\tvar _RepoID sql.NullString\n\t\tvar _Sha sql.NullString\n\t\tvar _Branch sql.NullString\n\t\tvar _Message sql.NullString\n\t\tvar _Mergecommit sql.NullBool\n\t\tvar _Excluded sql.NullBool\n\t\tvar _Parent sql.NullString\n\t\tvar _ParentID sql.NullString\n\t\tvar _Date sql.NullInt64\n\t\tvar _AuthorUserID sql.NullString\n\t\tvar _CommitterUserID sql.NullString\n\t\tvar _Ordinal sql.NullInt64\n\t\tvar _CustomerID sql.NullString\n\t\tvar _RefType sql.NullString\n\t\tvar _RefID sql.NullString\n\t\tvar _Metadata sql.NullString\n\t\terr := rows.Scan(\n\t\t\t&_ID,\n\t\t\t&_Checksum,\n\t\t\t&_RepoID,\n\t\t\t&_Sha,\n\t\t\t&_Branch,\n\t\t\t&_Message,\n\t\t\t&_Mergecommit,\n\t\t\t&_Excluded,\n\t\t\t&_Parent,\n\t\t\t&_ParentID,\n\t\t\t&_Date,\n\t\t\t&_AuthorUserID,\n\t\t\t&_CommitterUserID,\n\t\t\t&_Ordinal,\n\t\t\t&_CustomerID,\n\t\t\t&_RefType,\n\t\t\t&_RefID,\n\t\t\t&_Metadata,\n\t\t)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tt := &Commit{}\n\t\tif _ID.Valid {\n\t\t\tt.SetID(_ID.String)\n\t\t}\n\t\tif _Checksum.Valid {\n\t\t\tt.SetChecksum(_Checksum.String)\n\t\t}\n\t\tif _RepoID.Valid {\n\t\t\tt.SetRepoID(_RepoID.String)\n\t\t}\n\t\tif _Sha.Valid {\n\t\t\tt.SetSha(_Sha.String)\n\t\t}\n\t\tif _Branch.Valid {\n\t\t\tt.SetBranch(_Branch.String)\n\t\t}\n\t\tif _Message.Valid {\n\t\t\tt.SetMessage(_Message.String)\n\t\t}\n\t\tif _Mergecommit.Valid {\n\t\t\tt.SetMergecommit(_Mergecommit.Bool)\n\t\t}\n\t\tif _Excluded.Valid {\n\t\t\tt.SetExcluded(_Excluded.Bool)\n\t\t}\n\t\tif _Parent.Valid {\n\t\t\tt.SetParent(_Parent.String)\n\t\t}\n\t\tif _ParentID.Valid {\n\t\t\tt.SetParentID(_ParentID.String)\n\t\t}\n\t\tif _Date.Valid {\n\t\t\tt.SetDate(_Date.Int64)\n\t\t}\n\t\tif _AuthorUserID.Valid {\n\t\t\tt.SetAuthorUserID(_AuthorUserID.String)\n\t\t}\n\t\tif _CommitterUserID.Valid {\n\t\t\tt.SetCommitterUserID(_CommitterUserID.String)\n\t\t}\n\t\tif _Ordinal.Valid {\n\t\t\tt.SetOrdinal(int32(_Ordinal.Int64))\n\t\t}\n\t\tif _CustomerID.Valid {\n\t\t\tt.SetCustomerID(_CustomerID.String)\n\t\t}\n\t\tif _RefType.Valid {\n\t\t\tt.SetRefType(_RefType.String)\n\t\t}\n\t\tif _RefID.Valid {\n\t\t\tt.SetRefID(_RefID.String)\n\t\t}\n\t\tif _Metadata.Valid {\n\t\t\tt.SetMetadata(_Metadata.String)\n\t\t}\n\t\tresults = append(results, t)\n\t}\n\treturn results, nil\n}",
"func RetrieveVersion(id string) {\n}",
"func (r *RunCmd) selectVersion(client config.Docker, db *bolt.DB, to tool.Tool, doneChan chan error, closeDBChan chan bool) (string, error) {\n\n\t// create channels to fetch the image locally and from the registry\n\tlocalVersionChannel := make(chan func() (string, error))\n\trepositoryVersionChannel := make(chan func() (string, error))\n\n\tcaches := cache.New(config.Database{DB: db})\n\n\t// Fetch local versions\n\tgo r.fetchLocalVersions(localVersionChannel, db, client, to)\n\t// Fetch repository versions\n\tgo r.FetchRepositoryVersions(repositoryVersionChannel, db, to)\n\n\tif r.update {\n\t\tlocalVersion, err := (<-localVersionChannel)()\n\t\tif err != nil {\n\t\t\tdoneChan <- err\n\t\t\tcloseDBChan <- true\n\t\t\treturn \"\", err\n\t\t}\n\t\trepositoryVersion, err := (<-repositoryVersionChannel)()\n\t\tif err != nil {\n\t\t\tdoneChan <- err\n\t\t\tcloseDBChan <- true\n\t\t\treturn \"\", err\n\t\t}\n\t\tif version.ShouldPull(localVersion, repositoryVersion) {\n\t\t\tcaches.Versions.Clear(to)\n\t\t\tcloseDBChan <- true\n\t\t\terr = tool.Pull(client, to, repositoryVersion, DefaultTimeout)\n\t\t\tif err != nil {\n\t\t\t\tdoneChan <- err\n\t\t\t\tcloseDBChan <- true\n\t\t\t\treturn \"\", err\n\t\t\t}\n\t\t\tdoneChan <- nil\n\t\t\treturn repositoryVersion, nil\n\t\t}\n\t\tcloseDBChan <- true\n\t\tdoneChan <- nil\n\t\treturn localVersion, nil\n\t}\n\tlocalVersion, err := (<-localVersionChannel)()\n\tif err != nil {\n\t\tdoneChan <- err\n\t\tcloseDBChan <- true\n\t\treturn \"\", err\n\t}\n\tpull := func(doneChan chan error) (string, error) {\n\t\tlogrus.Infoln(\"Fetching remote versions\")\n\t\trepositoryVersion, err := (<-repositoryVersionChannel)()\n\t\tdbClosed := false\n\t\tif err == nil && version.ShouldPull(localVersion, repositoryVersion) {\n\t\t\tlogrus.WithField(\"remoteVersion\", repositoryVersion).Infoln(\"Should pull remote version\")\n\t\t\tcaches.Versions.Clear(to)\n\t\t\tcloseDBChan <- true\n\t\t\tdbClosed = true\n\t\t\terr = tool.Pull(client, to, repositoryVersion, DefaultTimeout)\n\t\t\tif err != nil {\n\t\t\t\tdoneChan <- err\n\t\t\t\treturn \"\", err\n\t\t\t}\n\t\t}\n\t\tif !dbClosed {\n\t\t\tcloseDBChan <- true\n\t\t}\n\t\tdoneChan <- err\n\t\treturn repositoryVersion, err\n\t}\n\tif len(localVersion) > 0 {\n\t\tlogrus.WithField(\"version\", localVersion).Infoln(\"Found local image\")\n\t\tgo pull(doneChan)\n\t\treturn localVersion, nil\n\t}\n\treturn pull(doneChan)\n}",
"func AssetRevisionExists(exec boil.Executor, orig int) (bool, error) {\n\tvar exists bool\n\n\tquery := \"select exists(select 1 from \\\"asset_revision\\\" where \\\"orig\\\"=$1 limit 1)\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, orig)\n\t}\n\n\trow := exec.QueryRow(query, orig)\n\n\terr := row.Scan(&exists)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"public: unable to check if asset_revision exists\")\n\t}\n\n\treturn exists, nil\n}",
"func FindCustomer(exec boil.Executor, iD int, selectCols ...string) (*Customer, error) {\n\tcustomerObj := &Customer{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"customers\\\" where \\\"id\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(nil, exec, customerObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from customers\")\n\t}\n\n\treturn customerObj, nil\n}",
"func FindSource(exec boil.Executor, iD int64, selectCols ...string) (*Source, error) {\n\tsourceObj := &Source{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"sources\\\" where \\\"id\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(nil, exec, sourceObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"mdbmodels: unable to select from sources\")\n\t}\n\n\treturn sourceObj, nil\n}",
"func FindBraceletPhoto(exec boil.Executor, id int, selectCols ...string) (*BraceletPhoto, error) {\n\tbraceletPhotoObj := &BraceletPhoto{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from `bracelet_photo` where `id`=?\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, id)\n\n\terr := q.Bind(braceletPhotoObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from bracelet_photo\")\n\t}\n\n\treturn braceletPhotoObj, nil\n}",
"func (cr APIContractRepository) Get(ctx context.Context, revisionID uuid.UUID) (models.APIContractRevision, error) {\n\tif revisionID == uuid.Nil {\n\t\treturn models.APIContractRevision{}, errors.New(\"invalid contract revision id supplied\")\n\t}\n\n\tvar acr models.APIContractRevision\n\ttx := cr.db.Find(&acr, \"id = ?\", revisionID.String())\n\tif tx.Error != nil {\n\t\treturn models.APIContractRevision{}, fmt.Errorf(\"no contract revision found for id %s: %w\", revisionID, tx.Error)\n\t}\n\n\treturn acr, nil\n}",
"func (ruo *RevisionUpdateOne) Select(field string, fields ...string) *RevisionUpdateOne {\n\truo.fields = append([]string{field}, fields...)\n\treturn ruo\n}",
"func GetUser_rolesesViaRevisionId(offset int, limit int, RevisionId_ int, field string) (*[]*User_roles, error) {\n\tvar _User_roles = new([]*User_roles)\n\terr := Engine.Table(\"user__roles\").Where(\"revision_id = ?\", RevisionId_).Limit(limit, offset).Desc(field).Find(_User_roles)\n\treturn _User_roles, err\n}",
"func (d *Document) FindOneWithRevision(\n\tcontext.Context, string, int64,\n) (*flare.Document, error) {\n\treturn nil, errors.New(\"not implemented\")\n}",
"func FindComment(exec boil.Executor, index int, selectCols ...string) (*Comment, error) {\n\tcommentObj := &Comment{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from `comment` where `index`=?\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, index)\n\n\terr := q.Bind(commentObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from comment\")\n\t}\n\n\treturn commentObj, nil\n}",
"func FindRepository(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Repository, error) {\n\trepositoryObj := &Repository{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from `repositories` where `id`=?\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(ctx, exec, repositoryObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from repositories\")\n\t}\n\n\treturn repositoryObj, nil\n}",
"func (gauo *GithubAssetUpdateOne) Select(field string, fields ...string) *GithubAssetUpdateOne {\n\tgauo.fields = append([]string{field}, fields...)\n\treturn gauo\n}",
"func FindCommitsByCustomerIDTx(ctx context.Context, tx Tx, value string) ([]*Commit, error) {\n\tq := \"SELECT `commit`.`id`,`commit`.`checksum`,`commit`.`repo_id`,`commit`.`sha`,`commit`.`branch`,`commit`.`message`,`commit`.`mergecommit`,`commit`.`excluded`,`commit`.`parent`,`commit`.`parent_id`,`commit`.`date`,`commit`.`author_user_id`,`commit`.`committer_user_id`,`commit`.`ordinal`,`commit`.`customer_id`,`commit`.`ref_type`,`commit`.`ref_id`,`commit`.`metadata` FROM `commit` WHERE `customer_id` = ? LIMIT 1\"\n\trows, err := tx.QueryContext(ctx, q, orm.ToSQLString(value))\n\tif err == sql.ErrNoRows {\n\t\treturn nil, nil\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer rows.Close()\n\tresults := make([]*Commit, 0)\n\tfor rows.Next() {\n\t\tvar _ID sql.NullString\n\t\tvar _Checksum sql.NullString\n\t\tvar _RepoID sql.NullString\n\t\tvar _Sha sql.NullString\n\t\tvar _Branch sql.NullString\n\t\tvar _Message sql.NullString\n\t\tvar _Mergecommit sql.NullBool\n\t\tvar _Excluded sql.NullBool\n\t\tvar _Parent sql.NullString\n\t\tvar _ParentID sql.NullString\n\t\tvar _Date sql.NullInt64\n\t\tvar _AuthorUserID sql.NullString\n\t\tvar _CommitterUserID sql.NullString\n\t\tvar _Ordinal sql.NullInt64\n\t\tvar _CustomerID sql.NullString\n\t\tvar _RefType sql.NullString\n\t\tvar _RefID sql.NullString\n\t\tvar _Metadata sql.NullString\n\t\terr := rows.Scan(\n\t\t\t&_ID,\n\t\t\t&_Checksum,\n\t\t\t&_RepoID,\n\t\t\t&_Sha,\n\t\t\t&_Branch,\n\t\t\t&_Message,\n\t\t\t&_Mergecommit,\n\t\t\t&_Excluded,\n\t\t\t&_Parent,\n\t\t\t&_ParentID,\n\t\t\t&_Date,\n\t\t\t&_AuthorUserID,\n\t\t\t&_CommitterUserID,\n\t\t\t&_Ordinal,\n\t\t\t&_CustomerID,\n\t\t\t&_RefType,\n\t\t\t&_RefID,\n\t\t\t&_Metadata,\n\t\t)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tt := &Commit{}\n\t\tif _ID.Valid {\n\t\t\tt.SetID(_ID.String)\n\t\t}\n\t\tif _Checksum.Valid {\n\t\t\tt.SetChecksum(_Checksum.String)\n\t\t}\n\t\tif _RepoID.Valid {\n\t\t\tt.SetRepoID(_RepoID.String)\n\t\t}\n\t\tif _Sha.Valid {\n\t\t\tt.SetSha(_Sha.String)\n\t\t}\n\t\tif _Branch.Valid {\n\t\t\tt.SetBranch(_Branch.String)\n\t\t}\n\t\tif _Message.Valid {\n\t\t\tt.SetMessage(_Message.String)\n\t\t}\n\t\tif _Mergecommit.Valid {\n\t\t\tt.SetMergecommit(_Mergecommit.Bool)\n\t\t}\n\t\tif _Excluded.Valid {\n\t\t\tt.SetExcluded(_Excluded.Bool)\n\t\t}\n\t\tif _Parent.Valid {\n\t\t\tt.SetParent(_Parent.String)\n\t\t}\n\t\tif _ParentID.Valid {\n\t\t\tt.SetParentID(_ParentID.String)\n\t\t}\n\t\tif _Date.Valid {\n\t\t\tt.SetDate(_Date.Int64)\n\t\t}\n\t\tif _AuthorUserID.Valid {\n\t\t\tt.SetAuthorUserID(_AuthorUserID.String)\n\t\t}\n\t\tif _CommitterUserID.Valid {\n\t\t\tt.SetCommitterUserID(_CommitterUserID.String)\n\t\t}\n\t\tif _Ordinal.Valid {\n\t\t\tt.SetOrdinal(int32(_Ordinal.Int64))\n\t\t}\n\t\tif _CustomerID.Valid {\n\t\t\tt.SetCustomerID(_CustomerID.String)\n\t\t}\n\t\tif _RefType.Valid {\n\t\t\tt.SetRefType(_RefType.String)\n\t\t}\n\t\tif _RefID.Valid {\n\t\t\tt.SetRefID(_RefID.String)\n\t\t}\n\t\tif _Metadata.Valid {\n\t\t\tt.SetMetadata(_Metadata.String)\n\t\t}\n\t\tresults = append(results, t)\n\t}\n\treturn results, nil\n}",
"func FindCommitsByRepoID(ctx context.Context, db DB, value string) ([]*Commit, error) {\n\tq := \"SELECT `commit`.`id`,`commit`.`checksum`,`commit`.`repo_id`,`commit`.`sha`,`commit`.`branch`,`commit`.`message`,`commit`.`mergecommit`,`commit`.`excluded`,`commit`.`parent`,`commit`.`parent_id`,`commit`.`date`,`commit`.`author_user_id`,`commit`.`committer_user_id`,`commit`.`ordinal`,`commit`.`customer_id`,`commit`.`ref_type`,`commit`.`ref_id`,`commit`.`metadata` FROM `commit` WHERE `repo_id` = ? LIMIT 1\"\n\trows, err := db.QueryContext(ctx, q, orm.ToSQLString(value))\n\tif err == sql.ErrNoRows {\n\t\treturn nil, nil\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer rows.Close()\n\tresults := make([]*Commit, 0)\n\tfor rows.Next() {\n\t\tvar _ID sql.NullString\n\t\tvar _Checksum sql.NullString\n\t\tvar _RepoID sql.NullString\n\t\tvar _Sha sql.NullString\n\t\tvar _Branch sql.NullString\n\t\tvar _Message sql.NullString\n\t\tvar _Mergecommit sql.NullBool\n\t\tvar _Excluded sql.NullBool\n\t\tvar _Parent sql.NullString\n\t\tvar _ParentID sql.NullString\n\t\tvar _Date sql.NullInt64\n\t\tvar _AuthorUserID sql.NullString\n\t\tvar _CommitterUserID sql.NullString\n\t\tvar _Ordinal sql.NullInt64\n\t\tvar _CustomerID sql.NullString\n\t\tvar _RefType sql.NullString\n\t\tvar _RefID sql.NullString\n\t\tvar _Metadata sql.NullString\n\t\terr := rows.Scan(\n\t\t\t&_ID,\n\t\t\t&_Checksum,\n\t\t\t&_RepoID,\n\t\t\t&_Sha,\n\t\t\t&_Branch,\n\t\t\t&_Message,\n\t\t\t&_Mergecommit,\n\t\t\t&_Excluded,\n\t\t\t&_Parent,\n\t\t\t&_ParentID,\n\t\t\t&_Date,\n\t\t\t&_AuthorUserID,\n\t\t\t&_CommitterUserID,\n\t\t\t&_Ordinal,\n\t\t\t&_CustomerID,\n\t\t\t&_RefType,\n\t\t\t&_RefID,\n\t\t\t&_Metadata,\n\t\t)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tt := &Commit{}\n\t\tif _ID.Valid {\n\t\t\tt.SetID(_ID.String)\n\t\t}\n\t\tif _Checksum.Valid {\n\t\t\tt.SetChecksum(_Checksum.String)\n\t\t}\n\t\tif _RepoID.Valid {\n\t\t\tt.SetRepoID(_RepoID.String)\n\t\t}\n\t\tif _Sha.Valid {\n\t\t\tt.SetSha(_Sha.String)\n\t\t}\n\t\tif _Branch.Valid {\n\t\t\tt.SetBranch(_Branch.String)\n\t\t}\n\t\tif _Message.Valid {\n\t\t\tt.SetMessage(_Message.String)\n\t\t}\n\t\tif _Mergecommit.Valid {\n\t\t\tt.SetMergecommit(_Mergecommit.Bool)\n\t\t}\n\t\tif _Excluded.Valid {\n\t\t\tt.SetExcluded(_Excluded.Bool)\n\t\t}\n\t\tif _Parent.Valid {\n\t\t\tt.SetParent(_Parent.String)\n\t\t}\n\t\tif _ParentID.Valid {\n\t\t\tt.SetParentID(_ParentID.String)\n\t\t}\n\t\tif _Date.Valid {\n\t\t\tt.SetDate(_Date.Int64)\n\t\t}\n\t\tif _AuthorUserID.Valid {\n\t\t\tt.SetAuthorUserID(_AuthorUserID.String)\n\t\t}\n\t\tif _CommitterUserID.Valid {\n\t\t\tt.SetCommitterUserID(_CommitterUserID.String)\n\t\t}\n\t\tif _Ordinal.Valid {\n\t\t\tt.SetOrdinal(int32(_Ordinal.Int64))\n\t\t}\n\t\tif _CustomerID.Valid {\n\t\t\tt.SetCustomerID(_CustomerID.String)\n\t\t}\n\t\tif _RefType.Valid {\n\t\t\tt.SetRefType(_RefType.String)\n\t\t}\n\t\tif _RefID.Valid {\n\t\t\tt.SetRefID(_RefID.String)\n\t\t}\n\t\tif _Metadata.Valid {\n\t\t\tt.SetMetadata(_Metadata.String)\n\t\t}\n\t\tresults = append(results, t)\n\t}\n\treturn results, nil\n}",
"func (*ActivityStageDataAccessObject) FindByID(id int) (ActivityStage, bool) {\n\tvar result ActivityStage\n\thas, err := orm.Table(ActivityStageDAO.TableName()).ID(id).Get(&result) \n\tlogger.LogIfError(err)\n\treturn result, has\n}",
"func FindJet(exec boil.Executor, id int, selectCols ...string) (*Jet, error) {\n\tjetObj := &Jet{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from `jets` where `id`=?\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, id)\n\n\terr := q.Bind(jetObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from jets\")\n\t}\n\n\treturn jetObj, nil\n}",
"func FindBlock(ctx context.Context, exec boil.ContextExecutor, height int, selectCols ...string) (*Block, error) {\n\tblockObj := &Block{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"block\\\" where \\\"height\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(query, height)\n\n\terr := q.Bind(ctx, exec, blockObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from block\")\n\t}\n\n\treturn blockObj, nil\n}",
"func FindRawVisit(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*RawVisit, error) {\n\trawVisitObj := &RawVisit{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"raw_visits\\\" where \\\"id\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(ctx, exec, rawVisitObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from raw_visits\")\n\t}\n\n\tif err = rawVisitObj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\treturn rawVisitObj, err\n\t}\n\n\treturn rawVisitObj, nil\n}",
"func FindSegment(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Segment, error) {\n\tsegmentObj := &Segment{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"segment\\\" where \\\"id\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(ctx, exec, segmentObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"boiler: unable to select from segment\")\n\t}\n\n\treturn segmentObj, nil\n}",
"func FindAPIKey(exec boil.Executor, id int, selectCols ...string) (*APIKey, error) {\n\tapiKeyObj := &APIKey{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"api_keys\\\" where \\\"id\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, id)\n\n\terr := q.Bind(apiKeyObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from api_keys\")\n\t}\n\n\treturn apiKeyObj, nil\n}",
"func repoRawSelector(c *web.C, h http.Handler) http.Handler {\n\tfn := func(w http.ResponseWriter, r *http.Request) {\n\t\tmethod := strings.ToLower(r.Method)\n\t\tadminPriv := c.Env[\"adminPriv\"].(bool)\n\t\tif !adminPriv && readonly && method != \"get\" && method != \"head\" {\n\t\t\tBadRequest(w, r, \"Server in read-only mode and will only accept GET and HEAD requestcs\")\n\t\t\treturn\n\t\t}\n\n\t\tvar err error\n\t\tvar uuid dvid.UUID\n\t\tif uuid, c.Env[\"versionID\"], err = datastore.MatchingUUID(c.URLParams[\"uuid\"]); err != nil {\n\t\t\tBadRequest(w, r, err)\n\t\t\treturn\n\t\t}\n\t\tc.Env[\"uuid\"] = uuid\n\t\tc.Env[\"name\"] = c.URLParams[\"name\"]\n\n\t\th.ServeHTTP(w, r)\n\t}\n\treturn http.HandlerFunc(fn)\n}",
"func FindCommits(ctx context.Context, db DB, _params ...interface{}) ([]*Commit, error) {\n\tparams := []interface{}{\n\t\torm.Column(\"id\"),\n\t\torm.Column(\"checksum\"),\n\t\torm.Column(\"repo_id\"),\n\t\torm.Column(\"sha\"),\n\t\torm.Column(\"branch\"),\n\t\torm.Column(\"message\"),\n\t\torm.Column(\"mergecommit\"),\n\t\torm.Column(\"excluded\"),\n\t\torm.Column(\"parent\"),\n\t\torm.Column(\"parent_id\"),\n\t\torm.Column(\"date\"),\n\t\torm.Column(\"author_user_id\"),\n\t\torm.Column(\"committer_user_id\"),\n\t\torm.Column(\"ordinal\"),\n\t\torm.Column(\"customer_id\"),\n\t\torm.Column(\"ref_type\"),\n\t\torm.Column(\"ref_id\"),\n\t\torm.Column(\"metadata\"),\n\t\torm.Table(CommitTableName),\n\t}\n\tif len(_params) > 0 {\n\t\tfor _, param := range _params {\n\t\t\tparams = append(params, param)\n\t\t}\n\t}\n\tq, p := orm.BuildQuery(params...)\n\trows, err := db.QueryContext(ctx, q, p...)\n\tif err == sql.ErrNoRows {\n\t\treturn nil, nil\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer rows.Close()\n\tresults := make([]*Commit, 0)\n\tfor rows.Next() {\n\t\tvar _ID sql.NullString\n\t\tvar _Checksum sql.NullString\n\t\tvar _RepoID sql.NullString\n\t\tvar _Sha sql.NullString\n\t\tvar _Branch sql.NullString\n\t\tvar _Message sql.NullString\n\t\tvar _Mergecommit sql.NullBool\n\t\tvar _Excluded sql.NullBool\n\t\tvar _Parent sql.NullString\n\t\tvar _ParentID sql.NullString\n\t\tvar _Date sql.NullInt64\n\t\tvar _AuthorUserID sql.NullString\n\t\tvar _CommitterUserID sql.NullString\n\t\tvar _Ordinal sql.NullInt64\n\t\tvar _CustomerID sql.NullString\n\t\tvar _RefType sql.NullString\n\t\tvar _RefID sql.NullString\n\t\tvar _Metadata sql.NullString\n\t\terr := rows.Scan(\n\t\t\t&_ID,\n\t\t\t&_Checksum,\n\t\t\t&_RepoID,\n\t\t\t&_Sha,\n\t\t\t&_Branch,\n\t\t\t&_Message,\n\t\t\t&_Mergecommit,\n\t\t\t&_Excluded,\n\t\t\t&_Parent,\n\t\t\t&_ParentID,\n\t\t\t&_Date,\n\t\t\t&_AuthorUserID,\n\t\t\t&_CommitterUserID,\n\t\t\t&_Ordinal,\n\t\t\t&_CustomerID,\n\t\t\t&_RefType,\n\t\t\t&_RefID,\n\t\t\t&_Metadata,\n\t\t)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tt := &Commit{}\n\t\tif _ID.Valid {\n\t\t\tt.SetID(_ID.String)\n\t\t}\n\t\tif _Checksum.Valid {\n\t\t\tt.SetChecksum(_Checksum.String)\n\t\t}\n\t\tif _RepoID.Valid {\n\t\t\tt.SetRepoID(_RepoID.String)\n\t\t}\n\t\tif _Sha.Valid {\n\t\t\tt.SetSha(_Sha.String)\n\t\t}\n\t\tif _Branch.Valid {\n\t\t\tt.SetBranch(_Branch.String)\n\t\t}\n\t\tif _Message.Valid {\n\t\t\tt.SetMessage(_Message.String)\n\t\t}\n\t\tif _Mergecommit.Valid {\n\t\t\tt.SetMergecommit(_Mergecommit.Bool)\n\t\t}\n\t\tif _Excluded.Valid {\n\t\t\tt.SetExcluded(_Excluded.Bool)\n\t\t}\n\t\tif _Parent.Valid {\n\t\t\tt.SetParent(_Parent.String)\n\t\t}\n\t\tif _ParentID.Valid {\n\t\t\tt.SetParentID(_ParentID.String)\n\t\t}\n\t\tif _Date.Valid {\n\t\t\tt.SetDate(_Date.Int64)\n\t\t}\n\t\tif _AuthorUserID.Valid {\n\t\t\tt.SetAuthorUserID(_AuthorUserID.String)\n\t\t}\n\t\tif _CommitterUserID.Valid {\n\t\t\tt.SetCommitterUserID(_CommitterUserID.String)\n\t\t}\n\t\tif _Ordinal.Valid {\n\t\t\tt.SetOrdinal(int32(_Ordinal.Int64))\n\t\t}\n\t\tif _CustomerID.Valid {\n\t\t\tt.SetCustomerID(_CustomerID.String)\n\t\t}\n\t\tif _RefType.Valid {\n\t\t\tt.SetRefType(_RefType.String)\n\t\t}\n\t\tif _RefID.Valid {\n\t\t\tt.SetRefID(_RefID.String)\n\t\t}\n\t\tif _Metadata.Valid {\n\t\t\tt.SetMetadata(_Metadata.String)\n\t\t}\n\t\tresults = append(results, t)\n\t}\n\treturn results, nil\n}",
"func FindCommitByIDTx(ctx context.Context, tx Tx, value string) (*Commit, error) {\n\tq := \"SELECT `commit`.`id`,`commit`.`checksum`,`commit`.`repo_id`,`commit`.`sha`,`commit`.`branch`,`commit`.`message`,`commit`.`mergecommit`,`commit`.`excluded`,`commit`.`parent`,`commit`.`parent_id`,`commit`.`date`,`commit`.`author_user_id`,`commit`.`committer_user_id`,`commit`.`ordinal`,`commit`.`customer_id`,`commit`.`ref_type`,`commit`.`ref_id`,`commit`.`metadata` FROM `commit` WHERE `id` = ?\"\n\tvar _ID sql.NullString\n\tvar _Checksum sql.NullString\n\tvar _RepoID sql.NullString\n\tvar _Sha sql.NullString\n\tvar _Branch sql.NullString\n\tvar _Message sql.NullString\n\tvar _Mergecommit sql.NullBool\n\tvar _Excluded sql.NullBool\n\tvar _Parent sql.NullString\n\tvar _ParentID sql.NullString\n\tvar _Date sql.NullInt64\n\tvar _AuthorUserID sql.NullString\n\tvar _CommitterUserID sql.NullString\n\tvar _Ordinal sql.NullInt64\n\tvar _CustomerID sql.NullString\n\tvar _RefType sql.NullString\n\tvar _RefID sql.NullString\n\tvar _Metadata sql.NullString\n\terr := tx.QueryRowContext(ctx, q, value).Scan(\n\t\t&_ID,\n\t\t&_Checksum,\n\t\t&_RepoID,\n\t\t&_Sha,\n\t\t&_Branch,\n\t\t&_Message,\n\t\t&_Mergecommit,\n\t\t&_Excluded,\n\t\t&_Parent,\n\t\t&_ParentID,\n\t\t&_Date,\n\t\t&_AuthorUserID,\n\t\t&_CommitterUserID,\n\t\t&_Ordinal,\n\t\t&_CustomerID,\n\t\t&_RefType,\n\t\t&_RefID,\n\t\t&_Metadata,\n\t)\n\tif err == sql.ErrNoRows {\n\t\treturn nil, nil\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tt := &Commit{}\n\tif _ID.Valid {\n\t\tt.SetID(_ID.String)\n\t}\n\tif _Checksum.Valid {\n\t\tt.SetChecksum(_Checksum.String)\n\t}\n\tif _RepoID.Valid {\n\t\tt.SetRepoID(_RepoID.String)\n\t}\n\tif _Sha.Valid {\n\t\tt.SetSha(_Sha.String)\n\t}\n\tif _Branch.Valid {\n\t\tt.SetBranch(_Branch.String)\n\t}\n\tif _Message.Valid {\n\t\tt.SetMessage(_Message.String)\n\t}\n\tif _Mergecommit.Valid {\n\t\tt.SetMergecommit(_Mergecommit.Bool)\n\t}\n\tif _Excluded.Valid {\n\t\tt.SetExcluded(_Excluded.Bool)\n\t}\n\tif _Parent.Valid {\n\t\tt.SetParent(_Parent.String)\n\t}\n\tif _ParentID.Valid {\n\t\tt.SetParentID(_ParentID.String)\n\t}\n\tif _Date.Valid {\n\t\tt.SetDate(_Date.Int64)\n\t}\n\tif _AuthorUserID.Valid {\n\t\tt.SetAuthorUserID(_AuthorUserID.String)\n\t}\n\tif _CommitterUserID.Valid {\n\t\tt.SetCommitterUserID(_CommitterUserID.String)\n\t}\n\tif _Ordinal.Valid {\n\t\tt.SetOrdinal(int32(_Ordinal.Int64))\n\t}\n\tif _CustomerID.Valid {\n\t\tt.SetCustomerID(_CustomerID.String)\n\t}\n\tif _RefType.Valid {\n\t\tt.SetRefType(_RefType.String)\n\t}\n\tif _RefID.Valid {\n\t\tt.SetRefID(_RefID.String)\n\t}\n\tif _Metadata.Valid {\n\t\tt.SetMetadata(_Metadata.String)\n\t}\n\treturn t, nil\n}",
"func FindAuthorP(exec boil.Executor, id int64, selectCols ...string) *Author {\n\tretobj, err := FindAuthor(exec, id, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func FindVendor(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Vendor, error) {\n\tvendorObj := &Vendor{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from `vendors` where `id`=?\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(ctx, exec, vendorObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from vendors\")\n\t}\n\n\treturn vendorObj, nil\n}",
"func FindDoc(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Doc, error) {\n\tdocObj := &Doc{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from `doc` where `id`=?\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(ctx, exec, docObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from doc\")\n\t}\n\n\treturn docObj, nil\n}",
"func FindCvtermsynonym(exec boil.Executor, cvtermsynonymID int, selectCols ...string) (*Cvtermsynonym, error) {\n\tcvtermsynonymObj := &Cvtermsynonym{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"cvtermsynonym\\\" where \\\"cvtermsynonym_id\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, cvtermsynonymID)\n\n\terr := q.Bind(cvtermsynonymObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"chado: unable to select from cvtermsynonym\")\n\t}\n\n\treturn cvtermsynonymObj, nil\n}",
"func FindPaymentObject(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*PaymentObject, error) {\n\tpaymentObjectObj := &PaymentObject{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from `payment_objects` where `id`=?\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(ctx, exec, paymentObjectObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from payment_objects\")\n\t}\n\n\tif err = paymentObjectObj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\treturn paymentObjectObj, err\n\t}\n\n\treturn paymentObjectObj, nil\n}",
"func FindCol(cols []*model.ColumnMeta, name string) *model.ColumnMeta {\n\tfor _, col := range cols {\n\t\tif strings.EqualFold(col.ColumnMeta.Name, name) {\n\t\t\treturn col\n\t\t}\n\t}\n\treturn nil\n}",
"func FindFailure(exec boil.Executor, id int64, selectCols ...string) (*Failure, error) {\n\tfailureObj := &Failure{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from `failure` where `id`=?\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, id)\n\n\terr := q.Bind(failureObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from failure\")\n\t}\n\n\treturn failureObj, nil\n}",
"func FindHoldenAt(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*HoldenAt, error) {\n\tholdenAtObj := &HoldenAt{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"HoldenAt\\\" where \\\"Id\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(ctx, exec, holdenAtObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from HoldenAt\")\n\t}\n\n\treturn holdenAtObj, nil\n}",
"func (o GroupInitContainerVolumeGitRepoOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v GroupInitContainerVolumeGitRepo) *string { return v.Revision }).(pulumi.StringPtrOutput)\n}",
"func FindCommitsByRepoIDTx(ctx context.Context, tx Tx, value string) ([]*Commit, error) {\n\tq := \"SELECT `commit`.`id`,`commit`.`checksum`,`commit`.`repo_id`,`commit`.`sha`,`commit`.`branch`,`commit`.`message`,`commit`.`mergecommit`,`commit`.`excluded`,`commit`.`parent`,`commit`.`parent_id`,`commit`.`date`,`commit`.`author_user_id`,`commit`.`committer_user_id`,`commit`.`ordinal`,`commit`.`customer_id`,`commit`.`ref_type`,`commit`.`ref_id`,`commit`.`metadata` FROM `commit` WHERE `repo_id` = ? LIMIT 1\"\n\trows, err := tx.QueryContext(ctx, q, orm.ToSQLString(value))\n\tif err == sql.ErrNoRows {\n\t\treturn nil, nil\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer rows.Close()\n\tresults := make([]*Commit, 0)\n\tfor rows.Next() {\n\t\tvar _ID sql.NullString\n\t\tvar _Checksum sql.NullString\n\t\tvar _RepoID sql.NullString\n\t\tvar _Sha sql.NullString\n\t\tvar _Branch sql.NullString\n\t\tvar _Message sql.NullString\n\t\tvar _Mergecommit sql.NullBool\n\t\tvar _Excluded sql.NullBool\n\t\tvar _Parent sql.NullString\n\t\tvar _ParentID sql.NullString\n\t\tvar _Date sql.NullInt64\n\t\tvar _AuthorUserID sql.NullString\n\t\tvar _CommitterUserID sql.NullString\n\t\tvar _Ordinal sql.NullInt64\n\t\tvar _CustomerID sql.NullString\n\t\tvar _RefType sql.NullString\n\t\tvar _RefID sql.NullString\n\t\tvar _Metadata sql.NullString\n\t\terr := rows.Scan(\n\t\t\t&_ID,\n\t\t\t&_Checksum,\n\t\t\t&_RepoID,\n\t\t\t&_Sha,\n\t\t\t&_Branch,\n\t\t\t&_Message,\n\t\t\t&_Mergecommit,\n\t\t\t&_Excluded,\n\t\t\t&_Parent,\n\t\t\t&_ParentID,\n\t\t\t&_Date,\n\t\t\t&_AuthorUserID,\n\t\t\t&_CommitterUserID,\n\t\t\t&_Ordinal,\n\t\t\t&_CustomerID,\n\t\t\t&_RefType,\n\t\t\t&_RefID,\n\t\t\t&_Metadata,\n\t\t)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tt := &Commit{}\n\t\tif _ID.Valid {\n\t\t\tt.SetID(_ID.String)\n\t\t}\n\t\tif _Checksum.Valid {\n\t\t\tt.SetChecksum(_Checksum.String)\n\t\t}\n\t\tif _RepoID.Valid {\n\t\t\tt.SetRepoID(_RepoID.String)\n\t\t}\n\t\tif _Sha.Valid {\n\t\t\tt.SetSha(_Sha.String)\n\t\t}\n\t\tif _Branch.Valid {\n\t\t\tt.SetBranch(_Branch.String)\n\t\t}\n\t\tif _Message.Valid {\n\t\t\tt.SetMessage(_Message.String)\n\t\t}\n\t\tif _Mergecommit.Valid {\n\t\t\tt.SetMergecommit(_Mergecommit.Bool)\n\t\t}\n\t\tif _Excluded.Valid {\n\t\t\tt.SetExcluded(_Excluded.Bool)\n\t\t}\n\t\tif _Parent.Valid {\n\t\t\tt.SetParent(_Parent.String)\n\t\t}\n\t\tif _ParentID.Valid {\n\t\t\tt.SetParentID(_ParentID.String)\n\t\t}\n\t\tif _Date.Valid {\n\t\t\tt.SetDate(_Date.Int64)\n\t\t}\n\t\tif _AuthorUserID.Valid {\n\t\t\tt.SetAuthorUserID(_AuthorUserID.String)\n\t\t}\n\t\tif _CommitterUserID.Valid {\n\t\t\tt.SetCommitterUserID(_CommitterUserID.String)\n\t\t}\n\t\tif _Ordinal.Valid {\n\t\t\tt.SetOrdinal(int32(_Ordinal.Int64))\n\t\t}\n\t\tif _CustomerID.Valid {\n\t\t\tt.SetCustomerID(_CustomerID.String)\n\t\t}\n\t\tif _RefType.Valid {\n\t\t\tt.SetRefType(_RefType.String)\n\t\t}\n\t\tif _RefID.Valid {\n\t\t\tt.SetRefID(_RefID.String)\n\t\t}\n\t\tif _Metadata.Valid {\n\t\t\tt.SetMetadata(_Metadata.String)\n\t\t}\n\t\tresults = append(results, t)\n\t}\n\treturn results, nil\n}",
"func (s *TableQuery) Find(slicePtr ...interface{}) (interface{}, error) {\n\tsql := s.getSelectSQL()\n\tif len(slicePtr) > 0 {\n\t\treturn NewNativeQuery(s.DatabaseConfigKey, s.TransactionKey).Find(sql, s.Params, slicePtr...)\n\t}\n\treturn NewNativeQuery(s.DatabaseConfigKey, s.TransactionKey).Find(sql, s.Params, s.Model)\n}",
"func FindTenant(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Tenant, error) {\n\ttenantObj := &Tenant{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from `tenants` where `id`=?\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(ctx, exec, tenantObj)\n\tif err != nil {\n\t\tif errors.Is(err, sql.ErrNoRows) {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"dbmodel: unable to select from tenants\")\n\t}\n\n\tif err = tenantObj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\treturn tenantObj, err\n\t}\n\n\treturn tenantObj, nil\n}",
"func (m Mysql) Find(id int) string {\n\treturn \"Mysql>> SELECT * FROM \" + m.table + \" WHERE id=\" + strconv.Itoa(id)\n}",
"func FindPost(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Post, error) {\n\tpostObj := &Post{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"posts\\\" where \\\"id\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(ctx, exec, postObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"orm: unable to select from posts\")\n\t}\n\n\treturn postObj, nil\n}",
"func FindProject(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Project, error) {\n\tprojectObj := &Project{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from `project` where `ID`=?\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(ctx, exec, projectObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from project\")\n\t}\n\n\treturn projectObj, nil\n}",
"func (api *snapshotrestoreAPI) Find(meta *api.ObjectMeta) (*SnapshotRestore, error) {\n\t// find the object\n\tobj, err := api.ct.FindObject(\"SnapshotRestore\", meta)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// asset type\n\tswitch obj.(type) {\n\tcase *SnapshotRestore:\n\t\thobj := obj.(*SnapshotRestore)\n\t\treturn hobj, nil\n\tdefault:\n\t\treturn nil, errors.New(\"incorrect object type\")\n\t}\n}",
"func (o GroupContainerVolumeGitRepoOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v GroupContainerVolumeGitRepo) *string { return v.Revision }).(pulumi.StringPtrOutput)\n}",
"func FindVoteP(exec boil.Executor, id int, selectCols ...string) *Vote {\n\tretobj, err := FindVote(exec, id, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (col *Collection) FindById(id int) (doc map[string]interface{}, err error) {\n\tcol.db.access.RLock()\n\tdefer col.db.access.RUnlock()\n\n\tpart := col.parts[id%col.db.numParts]\n\tpart.Lock.RLock()\n\tdocB, err := part.Read(id)\n\tpart.Lock.RUnlock()\n\tif err != nil {\n\t\treturn\n\t}\n\terr = json.Unmarshal(docB, &doc)\n\treturn\n\n}",
"func (assetRevisionL) LoadOrig(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Orig\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Orig\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Orig = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Orig == foreign.ID {\n\t\t\t\tlocal.R.Orig = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func FindProject(ctx context.Context, exec boil.ContextExecutor, iD uint, selectCols ...string) (*Project, error) {\n\tprojectObj := &Project{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from `projects` where `id`=?\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(ctx, exec, projectObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from projects\")\n\t}\n\n\treturn projectObj, nil\n}",
"func (db *DB) Rev(ctx context.Context, docID string) (rev string, err error) {\n\tif r, ok := db.driverDB.(driver.Rever); ok {\n\t\treturn r.Rev(ctx, docID)\n\t}\n\t// These last two lines cannot be combined for GopherJS due to a bug.\n\t// See https://github.com/gopherjs/gopherjs/issues/608\n\trow, err := db.Get(ctx, docID, nil)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tvar doc struct {\n\t\tRev string `json:\"_rev\"`\n\t}\n\tif err = row.ScanDoc(&doc); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn doc.Rev, nil\n}",
"func FindEmployee(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Employee, error) {\n\temployeeObj := &Employee{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"employee\\\" where \\\"id\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(ctx, exec, employeeObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from employee\")\n\t}\n\n\tif err = employeeObj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\treturn employeeObj, err\n\t}\n\n\treturn employeeObj, nil\n}",
"func FindInventory(exec boil.Executor, id int64, selectCols ...string) (*Inventory, error) {\n\tinventoryObj := &Inventory{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from `inventory` where `id`=?\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, id)\n\n\terr := q.Bind(inventoryObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from inventory\")\n\t}\n\n\treturn inventoryObj, nil\n}",
"func FindChannel(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Channel, error) {\n\tchannelObj := &Channel{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"channels\\\" where \\\"id\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(ctx, exec, channelObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from channels\")\n\t}\n\n\tif err = channelObj.doAfterSelectHooks(ctx, exec); err != nil {\n\t\treturn channelObj, err\n\t}\n\n\treturn channelObj, nil\n}",
"func FindAuthorGP(id int64, selectCols ...string) *Author {\n\tretobj, err := FindAuthor(boil.GetDB(), id, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (o *AssetRevision) Insert(exec boil.Executor, whitelist ...string) error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no asset_revision provided for insertion\")\n\t}\n\n\tvar err error\n\n\tif err := o.doBeforeInsertHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\tnzDefaults := queries.NonZeroDefaultSet(assetRevisionColumnsWithDefault, o)\n\n\tkey := makeCacheKey(whitelist, nzDefaults)\n\tassetRevisionInsertCacheMut.RLock()\n\tcache, cached := assetRevisionInsertCache[key]\n\tassetRevisionInsertCacheMut.RUnlock()\n\n\tif !cached {\n\t\twl, returnColumns := strmangle.InsertColumnSet(\n\t\t\tassetRevisionColumns,\n\t\t\tassetRevisionColumnsWithDefault,\n\t\t\tassetRevisionColumnsWithoutDefault,\n\t\t\tnzDefaults,\n\t\t\twhitelist,\n\t\t)\n\n\t\tcache.valueMapping, err = queries.BindMapping(assetRevisionType, assetRevisionMapping, wl)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcache.retMapping, err = queries.BindMapping(assetRevisionType, assetRevisionMapping, returnColumns)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif len(wl) != 0 {\n\t\t\tcache.query = fmt.Sprintf(\"INSERT INTO \\\"asset_revision\\\" (\\\"%s\\\") VALUES (%s)\", strings.Join(wl, \"\\\",\\\"\"), strmangle.Placeholders(dialect.IndexPlaceholders, len(wl), 1, 1))\n\t\t} else {\n\t\t\tcache.query = \"INSERT INTO \\\"asset_revision\\\" DEFAULT VALUES\"\n\t\t}\n\n\t\tif len(cache.retMapping) != 0 {\n\t\t\tcache.query += fmt.Sprintf(\" RETURNING \\\"%s\\\"\", strings.Join(returnColumns, \"\\\",\\\"\"))\n\t\t}\n\t}\n\n\tvalue := reflect.Indirect(reflect.ValueOf(o))\n\tvals := queries.ValuesFromMapping(value, cache.valueMapping)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, cache.query)\n\t\tfmt.Fprintln(boil.DebugWriter, vals)\n\t}\n\n\tif len(cache.retMapping) != 0 {\n\t\terr = exec.QueryRow(cache.query, vals...).Scan(queries.PtrsFromMapping(value, cache.retMapping)...)\n\t} else {\n\t\t_, err = exec.Exec(cache.query, vals...)\n\t}\n\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to insert into asset_revision\")\n\t}\n\n\tif !cached {\n\t\tassetRevisionInsertCacheMut.Lock()\n\t\tassetRevisionInsertCache[key] = cache\n\t\tassetRevisionInsertCacheMut.Unlock()\n\t}\n\n\treturn o.doAfterInsertHooks(exec)\n}",
"func (r *Repository) Find(ctx context.Context, id interface{}) (interface{}, error) {\n\tq, err := r.GetQuery(ctx)\n\tif nil != err {\n\t\treturn nil, err\n\t}\n\n\trows, err := q.Use(r.model).\n\t\tWhere(\"id\", id).\n\t\tWithLimit(1).\n\t\tAllCtx(ctx)\n\n\tif nil != err {\n\t\treturn nil, err\n\t}\n\n\tval := reflect.ValueOf(rows)\n\tif val.Len() == 0 {\n\t\treturn nil, NewEmptyResultError()\n\t}\n\n\treturn val.Index(0).Interface(), nil\n}",
"func (m *SQLIgnoreStore) Revision() int64 {\n\tm.mutex.Lock()\n\tdefer m.mutex.Unlock()\n\treturn m.revision\n}",
"func (o FioSpecVolumeVolumeSourceGitRepoOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v FioSpecVolumeVolumeSourceGitRepo) *string { return v.Revision }).(pulumi.StringPtrOutput)\n}",
"func (t BlobsTable) FindByID(id []byte) *BlobQuery {\n\treturn t.driver.findByID(id)\n}",
"func (br *BlockRepository) FindByIdentifier(index int64, hash string) (*types.Block, *rTypes.Error) {\n\trf, err := br.findRecordFileByHash(hash)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif rf.BlockIndex != index {\n\t\treturn nil, errors.Errors[errors.BlockNotFound]\n\t}\n\treturn br.constructBlockResponse(rf, index), nil\n}",
"func FindCurrency(exec boil.Executor, iD int, selectCols ...string) (*Currency, error) {\n\tcurrencyObj := &Currency{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"currency\\\" where \\\"id\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(nil, exec, currencyObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from currency\")\n\t}\n\n\treturn currencyObj, nil\n}",
"func FindAddress(exec boil.Executor, addressID uint16, selectCols ...string) (*Address, error) {\n\taddressObj := &Address{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from `address` where `address_id`=?\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, addressID)\n\n\terr := q.Bind(addressObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"sqlboiler: unable to select from address\")\n\t}\n\n\treturn addressObj, nil\n}",
"func FindFilesStorage(exec boil.Executor, iD int, selectCols ...string) (*FilesStorage, error) {\n\tfilesStorageObj := &FilesStorage{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from `files_storages` where `id`=?\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(nil, exec, filesStorageObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from files_storages\")\n\t}\n\n\treturn filesStorageObj, nil\n}",
"func (c *Client) FindCrmStageId(criteria *Criteria, options *Options) (int64, error) {\n\tids, err := c.Search(CrmStageModel, criteria, options)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\tif len(ids) > 0 {\n\t\treturn ids[0], nil\n\t}\n\treturn -1, fmt.Errorf(\"crm.stage was not found with criteria %v and options %v\", criteria, options)\n}",
"func FindContentUnitDerivation(exec boil.Executor, sourceID int64, derivedID int64, selectCols ...string) (*ContentUnitDerivation, error) {\n\tcontentUnitDerivationObj := &ContentUnitDerivation{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"content_unit_derivations\\\" where \\\"source_id\\\"=$1 AND \\\"derived_id\\\"=$2\", sel,\n\t)\n\n\tq := queries.Raw(query, sourceID, derivedID)\n\n\terr := q.Bind(nil, exec, contentUnitDerivationObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"mdbmodels: unable to select from content_unit_derivations\")\n\t}\n\n\treturn contentUnitDerivationObj, nil\n}",
"func FindStock(exec boil.Executor, stockID int, selectCols ...string) (*Stock, error) {\n\tstockObj := &Stock{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from `stock` where `stock_id`=?\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, stockID)\n\n\terr := q.Bind(stockObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from stock\")\n\t}\n\n\treturn stockObj, nil\n}",
"func (c Client) Fetch() (*FetchRevisionResponse, error) {\n\treturn c.FetchWithContext(context.Background())\n}",
"func FindCommitsByRefID(ctx context.Context, db DB, value string) ([]*Commit, error) {\n\tq := \"SELECT `commit`.`id`,`commit`.`checksum`,`commit`.`repo_id`,`commit`.`sha`,`commit`.`branch`,`commit`.`message`,`commit`.`mergecommit`,`commit`.`excluded`,`commit`.`parent`,`commit`.`parent_id`,`commit`.`date`,`commit`.`author_user_id`,`commit`.`committer_user_id`,`commit`.`ordinal`,`commit`.`customer_id`,`commit`.`ref_type`,`commit`.`ref_id`,`commit`.`metadata` FROM `commit` WHERE `ref_id` = ? LIMIT 1\"\n\trows, err := db.QueryContext(ctx, q, orm.ToSQLString(value))\n\tif err == sql.ErrNoRows {\n\t\treturn nil, nil\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer rows.Close()\n\tresults := make([]*Commit, 0)\n\tfor rows.Next() {\n\t\tvar _ID sql.NullString\n\t\tvar _Checksum sql.NullString\n\t\tvar _RepoID sql.NullString\n\t\tvar _Sha sql.NullString\n\t\tvar _Branch sql.NullString\n\t\tvar _Message sql.NullString\n\t\tvar _Mergecommit sql.NullBool\n\t\tvar _Excluded sql.NullBool\n\t\tvar _Parent sql.NullString\n\t\tvar _ParentID sql.NullString\n\t\tvar _Date sql.NullInt64\n\t\tvar _AuthorUserID sql.NullString\n\t\tvar _CommitterUserID sql.NullString\n\t\tvar _Ordinal sql.NullInt64\n\t\tvar _CustomerID sql.NullString\n\t\tvar _RefType sql.NullString\n\t\tvar _RefID sql.NullString\n\t\tvar _Metadata sql.NullString\n\t\terr := rows.Scan(\n\t\t\t&_ID,\n\t\t\t&_Checksum,\n\t\t\t&_RepoID,\n\t\t\t&_Sha,\n\t\t\t&_Branch,\n\t\t\t&_Message,\n\t\t\t&_Mergecommit,\n\t\t\t&_Excluded,\n\t\t\t&_Parent,\n\t\t\t&_ParentID,\n\t\t\t&_Date,\n\t\t\t&_AuthorUserID,\n\t\t\t&_CommitterUserID,\n\t\t\t&_Ordinal,\n\t\t\t&_CustomerID,\n\t\t\t&_RefType,\n\t\t\t&_RefID,\n\t\t\t&_Metadata,\n\t\t)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tt := &Commit{}\n\t\tif _ID.Valid {\n\t\t\tt.SetID(_ID.String)\n\t\t}\n\t\tif _Checksum.Valid {\n\t\t\tt.SetChecksum(_Checksum.String)\n\t\t}\n\t\tif _RepoID.Valid {\n\t\t\tt.SetRepoID(_RepoID.String)\n\t\t}\n\t\tif _Sha.Valid {\n\t\t\tt.SetSha(_Sha.String)\n\t\t}\n\t\tif _Branch.Valid {\n\t\t\tt.SetBranch(_Branch.String)\n\t\t}\n\t\tif _Message.Valid {\n\t\t\tt.SetMessage(_Message.String)\n\t\t}\n\t\tif _Mergecommit.Valid {\n\t\t\tt.SetMergecommit(_Mergecommit.Bool)\n\t\t}\n\t\tif _Excluded.Valid {\n\t\t\tt.SetExcluded(_Excluded.Bool)\n\t\t}\n\t\tif _Parent.Valid {\n\t\t\tt.SetParent(_Parent.String)\n\t\t}\n\t\tif _ParentID.Valid {\n\t\t\tt.SetParentID(_ParentID.String)\n\t\t}\n\t\tif _Date.Valid {\n\t\t\tt.SetDate(_Date.Int64)\n\t\t}\n\t\tif _AuthorUserID.Valid {\n\t\t\tt.SetAuthorUserID(_AuthorUserID.String)\n\t\t}\n\t\tif _CommitterUserID.Valid {\n\t\t\tt.SetCommitterUserID(_CommitterUserID.String)\n\t\t}\n\t\tif _Ordinal.Valid {\n\t\t\tt.SetOrdinal(int32(_Ordinal.Int64))\n\t\t}\n\t\tif _CustomerID.Valid {\n\t\t\tt.SetCustomerID(_CustomerID.String)\n\t\t}\n\t\tif _RefType.Valid {\n\t\t\tt.SetRefType(_RefType.String)\n\t\t}\n\t\tif _RefID.Valid {\n\t\t\tt.SetRefID(_RefID.String)\n\t\t}\n\t\tif _Metadata.Valid {\n\t\t\tt.SetMetadata(_Metadata.String)\n\t\t}\n\t\tresults = append(results, t)\n\t}\n\treturn results, nil\n}",
"func (a *RepoAPI) readFile(params interface{}) (resp *rpc.Response) {\n\tm := objx.New(cast.ToStringMap(params))\n\tvar revision []string\n\tif rev := m.Get(\"revision\").Str(); rev != \"\" {\n\t\trevision = []string{rev}\n\t}\n\treturn rpc.Success(util.Map{\n\t\t\"content\": a.mods.Repo.ReadFile(m.Get(\"name\").Str(), m.Get(\"path\").Str(), revision...),\n\t})\n}",
"func FindPeer(ctx context.Context, exec boil.ContextExecutor, iD uint, selectCols ...string) (*Peer, error) {\n\tpeerObj := &Peer{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from `peers` where `id`=?\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(ctx, exec, peerObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"model: unable to select from peers\")\n\t}\n\n\treturn peerObj, nil\n}",
"func FindTask(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Task, error) {\n\ttaskObj := &Task{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"tasks\\\" where \\\"id\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(ctx, exec, taskObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from tasks\")\n\t}\n\n\treturn taskObj, nil\n}",
"func (t CustomerTable) SelectCols() string {\n\treturn `customer_id,name,created_at,archived_at`\n}",
"func FindGitRevision(ctx context.Context, file string) (shortSha string, sha string, err error) {\n\tlogger := common.Logger(ctx)\n\n\tgitDir, err := git.PlainOpenWithOptions(\n\t\tfile,\n\t\t&git.PlainOpenOptions{\n\t\t\tDetectDotGit: true,\n\t\t\tEnableDotGitCommonDir: true,\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlogger.WithError(err).Error(\"path\", file, \"not located inside a git repository\")\n\t\treturn \"\", \"\", err\n\t}\n\n\thead, err := gitDir.Reference(plumbing.HEAD, true)\n\tif err != nil {\n\t\treturn \"\", \"\", err\n\t}\n\n\tif head.Hash().IsZero() {\n\t\treturn \"\", \"\", fmt.Errorf(\"HEAD sha1 could not be resolved\")\n\t}\n\n\thash := head.Hash().String()\n\n\tlogger.Debugf(\"Found revision: %s\", hash)\n\treturn hash[:7], strings.TrimSpace(hash), nil\n}",
"func (t *Commit) DBFindTx(ctx context.Context, tx Tx, _params ...interface{}) (bool, error) {\n\tparams := []interface{}{\n\t\torm.Column(\"id\"),\n\t\torm.Column(\"checksum\"),\n\t\torm.Column(\"repo_id\"),\n\t\torm.Column(\"sha\"),\n\t\torm.Column(\"branch\"),\n\t\torm.Column(\"message\"),\n\t\torm.Column(\"mergecommit\"),\n\t\torm.Column(\"excluded\"),\n\t\torm.Column(\"parent\"),\n\t\torm.Column(\"parent_id\"),\n\t\torm.Column(\"date\"),\n\t\torm.Column(\"author_user_id\"),\n\t\torm.Column(\"committer_user_id\"),\n\t\torm.Column(\"ordinal\"),\n\t\torm.Column(\"customer_id\"),\n\t\torm.Column(\"ref_type\"),\n\t\torm.Column(\"ref_id\"),\n\t\torm.Column(\"metadata\"),\n\t\torm.Table(CommitTableName),\n\t}\n\tif len(_params) > 0 {\n\t\tfor _, param := range _params {\n\t\t\tparams = append(params, param)\n\t\t}\n\t}\n\tq, p := orm.BuildQuery(params...)\n\trow := tx.QueryRowContext(ctx, q, p...)\n\tvar _ID sql.NullString\n\tvar _Checksum sql.NullString\n\tvar _RepoID sql.NullString\n\tvar _Sha sql.NullString\n\tvar _Branch sql.NullString\n\tvar _Message sql.NullString\n\tvar _Mergecommit sql.NullBool\n\tvar _Excluded sql.NullBool\n\tvar _Parent sql.NullString\n\tvar _ParentID sql.NullString\n\tvar _Date sql.NullInt64\n\tvar _AuthorUserID sql.NullString\n\tvar _CommitterUserID sql.NullString\n\tvar _Ordinal sql.NullInt64\n\tvar _CustomerID sql.NullString\n\tvar _RefType sql.NullString\n\tvar _RefID sql.NullString\n\tvar _Metadata sql.NullString\n\terr := row.Scan(\n\t\t&_ID,\n\t\t&_Checksum,\n\t\t&_RepoID,\n\t\t&_Sha,\n\t\t&_Branch,\n\t\t&_Message,\n\t\t&_Mergecommit,\n\t\t&_Excluded,\n\t\t&_Parent,\n\t\t&_ParentID,\n\t\t&_Date,\n\t\t&_AuthorUserID,\n\t\t&_CommitterUserID,\n\t\t&_Ordinal,\n\t\t&_CustomerID,\n\t\t&_RefType,\n\t\t&_RefID,\n\t\t&_Metadata,\n\t)\n\tif err != nil && err != sql.ErrNoRows {\n\t\treturn false, err\n\t}\n\tif _ID.Valid {\n\t\tt.SetID(_ID.String)\n\t}\n\tif _Checksum.Valid {\n\t\tt.SetChecksum(_Checksum.String)\n\t}\n\tif _RepoID.Valid {\n\t\tt.SetRepoID(_RepoID.String)\n\t}\n\tif _Sha.Valid {\n\t\tt.SetSha(_Sha.String)\n\t}\n\tif _Branch.Valid {\n\t\tt.SetBranch(_Branch.String)\n\t}\n\tif _Message.Valid {\n\t\tt.SetMessage(_Message.String)\n\t}\n\tif _Mergecommit.Valid {\n\t\tt.SetMergecommit(_Mergecommit.Bool)\n\t}\n\tif _Excluded.Valid {\n\t\tt.SetExcluded(_Excluded.Bool)\n\t}\n\tif _Parent.Valid {\n\t\tt.SetParent(_Parent.String)\n\t}\n\tif _ParentID.Valid {\n\t\tt.SetParentID(_ParentID.String)\n\t}\n\tif _Date.Valid {\n\t\tt.SetDate(_Date.Int64)\n\t}\n\tif _AuthorUserID.Valid {\n\t\tt.SetAuthorUserID(_AuthorUserID.String)\n\t}\n\tif _CommitterUserID.Valid {\n\t\tt.SetCommitterUserID(_CommitterUserID.String)\n\t}\n\tif _Ordinal.Valid {\n\t\tt.SetOrdinal(int32(_Ordinal.Int64))\n\t}\n\tif _CustomerID.Valid {\n\t\tt.SetCustomerID(_CustomerID.String)\n\t}\n\tif _RefType.Valid {\n\t\tt.SetRefType(_RefType.String)\n\t}\n\tif _RefID.Valid {\n\t\tt.SetRefID(_RefID.String)\n\t}\n\tif _Metadata.Valid {\n\t\tt.SetMetadata(_Metadata.String)\n\t}\n\treturn true, nil\n}",
"func (o LookupApiResultOutput) Revision() pulumi.StringArrayOutput {\n\treturn o.ApplyT(func(v LookupApiResult) []string { return v.Revision }).(pulumi.StringArrayOutput)\n}",
"func (a *SnapshotApiService) SnapshotsFindById(ctx _context.Context, snapshotId string, optionals *SnapshotsFindByIdOpts) (Snapshot, *APIResponse, error) {\n\tvar (\n\t\tlocalVarHTTPMethod = _nethttp.MethodGet\n\t\tlocalVarPostBody interface{}\n\t\tlocalVarFormFileName string\n\t\tlocalVarFileName string\n\t\tlocalVarFileBytes []byte\n\t\tlocalVarReturnValue Snapshot\n\t)\n\n\t// create path and map variables\n\tlocalVarPath := a.client.cfg.BasePath + \"/snapshots/{snapshotId}\"\n\tlocalVarPath = strings.Replace(localVarPath, \"{\"+\"snapshotId\"+\"}\", _neturl.PathEscape(parameterToString(snapshotId, \"\")) , -1)\n\n\tlocalVarHeaderParams := make(map[string]string)\n\tlocalVarQueryParams := _neturl.Values{}\n\tlocalVarFormParams := _neturl.Values{}\n\n\tif optionals != nil && optionals.Pretty != nil {\n\t\tlocalVarQueryParams.Add(\"pretty\", parameterToString(*optionals.Pretty, \"\"))\n\t}\n\tif optionals != nil && optionals.Depth != nil {\n\t\tlocalVarQueryParams.Add(\"depth\", parameterToString(*optionals.Depth, \"\"))\n\t}\n\t// to determine the Content-Type header\n\tlocalVarHTTPContentTypes := []string{}\n\n\t// set Content-Type header\n\tlocalVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)\n\tif localVarHTTPContentType != \"\" {\n\t\tlocalVarHeaderParams[\"Content-Type\"] = localVarHTTPContentType\n\t}\n\n\t// to determine the Accept header\n\tlocalVarHTTPHeaderAccepts := []string{\"application/json\"}\n\n\t// set Accept header\n\tlocalVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)\n\tif localVarHTTPHeaderAccept != \"\" {\n\t\tlocalVarHeaderParams[\"Accept\"] = localVarHTTPHeaderAccept\n\t}\n\tif optionals != nil && optionals.XContractNumber != nil {\n\t\tlocalVarHeaderParams[\"X-Contract-Number\"] = parameterToString(*optionals.XContractNumber, \"\")\n\t}\n\tif ctx != nil {\n\t\t// API Key Authentication\n\t\tif auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {\n\t\t\tvar key string\n\t\t\tif auth.Prefix != \"\" {\n\t\t\t\tkey = auth.Prefix + \" \" + auth.Key\n\t\t\t} else {\n\t\t\t\tkey = auth.Key\n\t\t\t}\n\t\t\tlocalVarHeaderParams[\"Authorization\"] = key\n\t\t}\n\t}\n\tr, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, err\n\t}\n\n\tlocalVarHTTPResponse, err := a.client.callAPI(r)\n\tlocalVarAPIResponse := &APIResponse {\n\t\tResponse: localVarHTTPResponse,\n\t\tMethod: localVarHTTPMethod,\n\t\tRequestURL: localVarPath,\n\t\tOperation: \"SnapshotsFindById\",\n\t}\n\tif err != nil || localVarHTTPResponse == nil {\n\t\treturn localVarReturnValue, localVarAPIResponse, err\n\t}\n\n\tlocalVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)\n\tlocalVarHTTPResponse.Body.Close()\n\tlocalVarAPIResponse.Payload = localVarBody\n\tif err != nil {\n\t\treturn localVarReturnValue, localVarAPIResponse, err\n\t}\n\n\tif localVarHTTPResponse.StatusCode >= 300 {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: localVarHTTPResponse.Status,\n\t\t}\n\t\t\tvar v Error\n\t\t\terr = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\t\t\tif err != nil {\n\t\t\t\tnewErr.error = err.Error()\n\t\t\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t\t\t}\n\t\t\tnewErr.model = v\n\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t}\n\n\terr = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\tif err != nil {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: err.Error(),\n\t\t}\n\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t}\n\n\treturn localVarReturnValue, localVarAPIResponse, nil\n}",
"func FindVSP(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*VSP, error) {\n\tvspObj := &VSP{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"vsp\\\" where \\\"id\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(ctx, exec, vspObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from vsp\")\n\t}\n\n\treturn vspObj, nil\n}",
"func FindDescription(ctx context.Context, exec boil.ContextExecutor, iD uint, selectCols ...string) (*Description, error) {\n\tdescriptionObj := &Description{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from `descriptions` where `id`=?\", sel,\n\t)\n\n\tq := queries.Raw(query, iD)\n\n\terr := q.Bind(ctx, exec, descriptionObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from descriptions\")\n\t}\n\n\treturn descriptionObj, nil\n}",
"func vcsRevision() string {\n\tbi, ok := debug.ReadBuildInfo()\n\tif !ok {\n\t\treturn \"\"\n\t}\n\tfor _, s := range bi.Settings {\n\t\tif s.Key == \"vcs.revision\" {\n\t\t\treturn s.Value[:9]\n\t\t}\n\t}\n\n\treturn \"\"\n}",
"func (this *activitiesStruct) Revision() uint64 {\n\tthis.mutex.RLock()\n\trev := this.revision\n\tthis.mutex.RUnlock()\n\treturn rev\n}",
"func (o *ORM) Find(model interface{}, id int64) error {\n\tt := time.Now()\n\n\tstmt, args, err := o.base().Where(squirrel.Eq{\"id\": id}).ToSql()\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer o.log(t, stmt, args)\n\n\treturn o.conn.Get(model, stmt, args...)\n}"
] |
[
"0.6741089",
"0.63291985",
"0.58189744",
"0.50290906",
"0.50215167",
"0.49492443",
"0.48408383",
"0.4819593",
"0.47850305",
"0.47490782",
"0.4682502",
"0.46612906",
"0.46082804",
"0.46053115",
"0.45977485",
"0.45849958",
"0.45737043",
"0.45611998",
"0.45591658",
"0.4548661",
"0.4517365",
"0.44922894",
"0.44869605",
"0.44855532",
"0.44630644",
"0.44589543",
"0.44479048",
"0.4446828",
"0.44421902",
"0.44330826",
"0.4405702",
"0.43674687",
"0.43385068",
"0.43242785",
"0.4316397",
"0.43091533",
"0.42963314",
"0.42946446",
"0.4267395",
"0.42621246",
"0.4259318",
"0.4253714",
"0.4245191",
"0.42412233",
"0.42392057",
"0.42381635",
"0.4228645",
"0.42256606",
"0.42246634",
"0.42241335",
"0.42139953",
"0.4194639",
"0.4182775",
"0.41775298",
"0.41724357",
"0.41686338",
"0.41656274",
"0.4162954",
"0.41621536",
"0.41616648",
"0.41613007",
"0.4156554",
"0.41548452",
"0.41387686",
"0.41340086",
"0.41320863",
"0.41293445",
"0.41268152",
"0.41120806",
"0.41104975",
"0.41072094",
"0.40816677",
"0.40797332",
"0.40725222",
"0.40631628",
"0.40619755",
"0.40606195",
"0.40602955",
"0.4057066",
"0.40505576",
"0.40502355",
"0.40409073",
"0.40332708",
"0.4024575",
"0.40221435",
"0.40163025",
"0.40160558",
"0.4011717",
"0.40073964",
"0.40037158",
"0.39921004",
"0.39895844",
"0.398947",
"0.39821208",
"0.39773625",
"0.39749548",
"0.39702696",
"0.39666396",
"0.3964994",
"0.3956876"
] |
0.76251304
|
0
|
FindAssetRevisionP retrieves a single record by ID with an executor, and panics on error.
|
func FindAssetRevisionP(exec boil.Executor, orig int, selectCols ...string) *AssetRevision {
retobj, err := FindAssetRevision(exec, orig, selectCols...)
if err != nil {
panic(boil.WrapErr(err))
}
return retobj
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func FindAssetRevision(exec boil.Executor, orig int, selectCols ...string) (*AssetRevision, error) {\n\tassetRevisionObj := &AssetRevision{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"asset_revision\\\" where \\\"orig\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, orig)\n\n\terr := q.Bind(assetRevisionObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"public: unable to select from asset_revision\")\n\t}\n\n\treturn assetRevisionObj, nil\n}",
"func FindAssetRevisionGP(orig int, selectCols ...string) *AssetRevision {\n\tretobj, err := FindAssetRevision(boil.GetDB(), orig, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (q assetRevisionQuery) One() (*AssetRevision, error) {\n\to := &AssetRevision{}\n\n\tqueries.SetLimit(q.Query, 1)\n\n\terr := q.Bind(o)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"public: failed to execute a one query for asset_revision\")\n\t}\n\n\tif err := o.doAfterSelectHooks(queries.GetExecutor(q.Query)); err != nil {\n\t\treturn o, err\n\t}\n\n\treturn o, nil\n}",
"func (cr APIContractRepository) Get(ctx context.Context, revisionID uuid.UUID) (models.APIContractRevision, error) {\n\tif revisionID == uuid.Nil {\n\t\treturn models.APIContractRevision{}, errors.New(\"invalid contract revision id supplied\")\n\t}\n\n\tvar acr models.APIContractRevision\n\ttx := cr.db.Find(&acr, \"id = ?\", revisionID.String())\n\tif tx.Error != nil {\n\t\treturn models.APIContractRevision{}, fmt.Errorf(\"no contract revision found for id %s: %w\", revisionID, tx.Error)\n\t}\n\n\treturn acr, nil\n}",
"func (assetRevisionL) LoadAsset(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Asset\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Asset\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Asset = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Asset == foreign.ID {\n\t\t\t\tlocal.R.Asset = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func AssetRevisionExistsP(exec boil.Executor, orig int) bool {\n\te, err := AssetRevisionExists(exec, orig)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn e\n}",
"func (a *SnapshotApiService) SnapshotsFindByIdExecute(r ApiSnapshotsFindByIdRequest) (Snapshot, *APIResponse, error) {\n\tvar (\n\t\tlocalVarHTTPMethod = _nethttp.MethodGet\n\t\tlocalVarPostBody interface{}\n\t\tlocalVarFormFileName string\n\t\tlocalVarFileName string\n\t\tlocalVarFileBytes []byte\n\t\tlocalVarReturnValue Snapshot\n\t)\n\n\tlocalBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, \"SnapshotApiService.SnapshotsFindById\")\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}\n\t}\n\n\tlocalVarPath := localBasePath + \"/snapshots/{snapshotId}\"\n\tlocalVarPath = strings.Replace(localVarPath, \"{\"+\"snapshotId\"+\"}\", _neturl.PathEscape(parameterToString(r.snapshotId, \"\")), -1)\n\n\tlocalVarHeaderParams := make(map[string]string)\n\tlocalVarQueryParams := _neturl.Values{}\n\tlocalVarFormParams := _neturl.Values{}\n\n\tif r.pretty != nil {\n\t\tlocalVarQueryParams.Add(\"pretty\", parameterToString(*r.pretty, \"\"))\n\t}\n\tif r.depth != nil {\n\t\tlocalVarQueryParams.Add(\"depth\", parameterToString(*r.depth, \"\"))\n\t}\n\t// to determine the Content-Type header\n\tlocalVarHTTPContentTypes := []string{}\n\n\t// set Content-Type header\n\tlocalVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)\n\tif localVarHTTPContentType != \"\" {\n\t\tlocalVarHeaderParams[\"Content-Type\"] = localVarHTTPContentType\n\t}\n\n\t// to determine the Accept header\n\tlocalVarHTTPHeaderAccepts := []string{\"application/json\"}\n\n\t// set Accept header\n\tlocalVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)\n\tif localVarHTTPHeaderAccept != \"\" {\n\t\tlocalVarHeaderParams[\"Accept\"] = localVarHTTPHeaderAccept\n\t}\n\tif r.xContractNumber != nil {\n\t\tlocalVarHeaderParams[\"X-Contract-Number\"] = parameterToString(*r.xContractNumber, \"\")\n\t}\n\tif r.ctx != nil {\n\t\t// API Key Authentication\n\t\tif auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {\n\t\t\tif apiKey, ok := auth[\"Token Authentication\"]; ok {\n\t\t\t\tvar key string\n\t\t\t\tif apiKey.Prefix != \"\" {\n\t\t\t\t\tkey = apiKey.Prefix + \" \" + apiKey.Key\n\t\t\t\t} else {\n\t\t\t\t\tkey = apiKey.Key\n\t\t\t\t}\n\t\t\t\tlocalVarHeaderParams[\"Authorization\"] = key\n\t\t\t}\n\t\t}\n\t}\n\treq, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, err\n\t}\n\n\tlocalVarHTTPResponse, err := a.client.callAPI(req)\n\n\tlocalVarAPIResponse := &APIResponse {\n\t\tResponse: localVarHTTPResponse,\n\t\tMethod: localVarHTTPMethod,\n\t\tRequestURL: localVarPath,\n\t\tOperation: \"SnapshotsFindById\",\n\t}\n\n\tif err != nil || localVarHTTPResponse == nil {\n\t\treturn localVarReturnValue, localVarAPIResponse, err\n\t}\n\n\tlocalVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)\n\tlocalVarHTTPResponse.Body.Close()\n\tlocalVarAPIResponse.Payload = localVarBody\n\tif err != nil {\n\t\treturn localVarReturnValue, localVarAPIResponse, err\n\t}\n\n\tif localVarHTTPResponse.StatusCode >= 300 {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: localVarHTTPResponse.Status,\n\t\t}\n\t\t\tvar v Error\n\t\t\terr = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\t\t\tif err != nil {\n\t\t\t\tnewErr.error = err.Error()\n\t\t\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t\t\t}\n\t\t\tnewErr.model = v\n\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t}\n\n\terr = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\tif err != nil {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: err.Error(),\n\t\t}\n\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t}\n\n\treturn localVarReturnValue, localVarAPIResponse, nil\n}",
"func (q assetRevisionQuery) OneP() *AssetRevision {\n\to, err := q.One()\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn o\n}",
"func FindAssetRevisionG(orig int, selectCols ...string) (*AssetRevision, error) {\n\treturn FindAssetRevision(boil.GetDB(), orig, selectCols...)\n}",
"func (d *Document) FindOneWithRevision(\n\tcontext.Context, string, int64,\n) (*flare.Document, error) {\n\treturn nil, errors.New(\"not implemented\")\n}",
"func (api *versionAPI) Find(meta *api.ObjectMeta) (*Version, error) {\n\t// find the object\n\tobj, err := api.ct.FindObject(\"Version\", meta)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// asset type\n\tswitch obj.(type) {\n\tcase *Version:\n\t\thobj := obj.(*Version)\n\t\treturn hobj, nil\n\tdefault:\n\t\treturn nil, errors.New(\"incorrect object type\")\n\t}\n}",
"func get_asset(stub shim.ChaincodeStubInterface, id string) (Asset, error) {\n\tvar asset Asset\n\tassetAsBytes, err := stub.GetState(id) //getState retreives a key/value from the ledger\n\tif err != nil { //this seems to always succeed, even if key didn't exist\n\t\treturn asset, errors.New(\"Failed to find asset - \" + id)\n\t}\n\tjson.Unmarshal(assetAsBytes, &asset) //un stringify it aka JSON.parse()\n\n\tif asset.Id != id { //test if product is actually here or just nil\n\t\treturn asset, errors.New(\"Asset does not exist - \" + id)\n\t}\n\n\treturn asset, nil\n}",
"func (r *Releaser) Find(tagName string) (*Release, error) {\n\trelease, _, err := r.client.Repositories.GetReleaseByTag(context.Background(), r.owner, r.repository, tagName)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tlog.Printf(\"found release ID: %v, tag: %v\", *release.ID, *release.TagName)\n\treturn &Release{ID: *release.ID, TagName: *release.TagName, Releaser: r}, nil\n}",
"func AssetRevisionExists(exec boil.Executor, orig int) (bool, error) {\n\tvar exists bool\n\n\tquery := \"select exists(select 1 from \\\"asset_revision\\\" where \\\"orig\\\"=$1 limit 1)\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, orig)\n\t}\n\n\trow := exec.QueryRow(query, orig)\n\n\terr := row.Scan(&exists)\n\tif err != nil {\n\t\treturn false, errors.Wrap(err, \"public: unable to check if asset_revision exists\")\n\t}\n\n\treturn exists, nil\n}",
"func FindAuthorP(exec boil.Executor, id int64, selectCols ...string) *Author {\n\tretobj, err := FindAuthor(exec, id, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (br *BlockRepository) FindByIdentifier(index int64, hash string) (*types.Block, *rTypes.Error) {\n\trf, err := br.findRecordFileByHash(hash)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif rf.BlockIndex != index {\n\t\treturn nil, errors.Errors[errors.BlockNotFound]\n\t}\n\treturn br.constructBlockResponse(rf, index), nil\n}",
"func FindVoteP(exec boil.Executor, id int, selectCols ...string) *Vote {\n\tretobj, err := FindVote(exec, id, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (impl CiPipelineRepositoryMock) FindById(id int) (pipeline *pipelineConfig.CiPipeline, err error) {\n\tpanic(\"implement me\")\n}",
"func lookupBlob(r *git.Repository, id *git.Oid) (*git.Blob, error) {\n\tobj, err := r.Lookup(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif blob, ok := obj.(*git.Blob); ok {\n\t\treturn blob, nil\n\t}\n\treturn nil, fmt.Errorf(\"hash %v exist but is not a blob\", id)\n}",
"func lookupBlob(r *git.Repository, id *git.Oid) (*git.Blob, error) {\n\tobj, err := r.Lookup(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif blob, ok := obj.(*git.Blob); ok {\n\t\treturn blob, nil\n\t}\n\treturn nil, fmt.Errorf(\"hash %v exist but is not a blob\", id)\n}",
"func (r *AutoRoller) getRevision(ctx context.Context, id string) (*revision.Revision, error) {\n\tif id == r.lastRollRev.Id {\n\t\treturn r.lastRollRev, nil\n\t}\n\tif id == r.nextRollRev.Id {\n\t\treturn r.nextRollRev, nil\n\t}\n\tif id == r.tipRev.Id {\n\t\treturn r.tipRev, nil\n\t}\n\tfor _, rev := range r.notRolledRevs {\n\t\tif id == rev.Id {\n\t\t\treturn rev, nil\n\t\t}\n\t}\n\treturn r.rm.GetRevision(ctx, id)\n}",
"func (o *AssetRevision) Delete(exec boil.Executor) error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no AssetRevision provided for delete\")\n\t}\n\n\tif err := o.doBeforeDeleteHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\targs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), assetRevisionPrimaryKeyMapping)\n\tquery := \"DELETE FROM \\\"asset_revision\\\" WHERE \\\"orig\\\"=$1\"\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, query)\n\t\tfmt.Fprintln(boil.DebugWriter, args...)\n\t}\n\n\t_, err := exec.Exec(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to delete from asset_revision\")\n\t}\n\n\tif err := o.doAfterDeleteHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}",
"func (h *HistoricalRecords) FindRecord(id string) *TransferRecord {\n\th.mutex.Lock()\n\tdefer h.mutex.Unlock()\n\n\tfor _, dr := range h.records {\n\t\tif dr.UUID.String() == id {\n\t\t\treturn dr\n\t\t}\n\t}\n\n\treturn nil\n}",
"func RetrieveVersion(id string) {\n}",
"func (v Project) ResolveRevision(rev string) (string, error) {\n\tif rev == \"\" {\n\t\treturn \"\", nil\n\t}\n\n\traw := v.Raw()\n\tif raw == nil {\n\t\treturn \"\", fmt.Errorf(\"repository for %s is missing, fail to parse %s\", v.Name, rev)\n\t}\n\n\tif rev == \"\" {\n\t\tlog.Errorf(\"empty revision to resolve for project '%s'\", v.Name)\n\t}\n\n\trevid, err := raw.ResolveRevision(plumbing.Revision(rev))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn revid.String(), nil\n}",
"func (api *snapshotrestoreAPI) Find(meta *api.ObjectMeta) (*SnapshotRestore, error) {\n\t// find the object\n\tobj, err := api.ct.FindObject(\"SnapshotRestore\", meta)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// asset type\n\tswitch obj.(type) {\n\tcase *SnapshotRestore:\n\t\thobj := obj.(*SnapshotRestore)\n\t\treturn hobj, nil\n\tdefault:\n\t\treturn nil, errors.New(\"incorrect object type\")\n\t}\n}",
"func (o GroupContainerVolumeGitRepoOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v GroupContainerVolumeGitRepo) *string { return v.Revision }).(pulumi.StringPtrOutput)\n}",
"func FindAuthor(exec boil.Executor, id int64, selectCols ...string) (*Author, error) {\n\tauthorObj := &Author{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"authors\\\" where \\\"id\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, id)\n\n\terr := q.Bind(authorObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"mdbmdbmodels: unable to select from authors\")\n\t}\n\n\treturn authorObj, nil\n}",
"func (t *SegmentService) Find(id string) (Segment, error) {\n\treturn t.Repository.find(id)\n}",
"func FindTransactionP(exec boil.Executor, id uint64, selectCols ...string) *Transaction {\n\tretobj, err := FindTransaction(exec, id, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func FindVote(exec boil.Executor, id int, selectCols ...string) (*Vote, error) {\n\tvoteObj := &Vote{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from `vote` where `id`=?\", sel,\n\t)\n\n\tq := queries.Raw(exec, query, id)\n\n\terr := q.Bind(voteObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from vote\")\n\t}\n\n\treturn voteObj, nil\n}",
"func FindCommitByID(ctx context.Context, db DB, value string) (*Commit, error) {\n\tq := \"SELECT `commit`.`id`,`commit`.`checksum`,`commit`.`repo_id`,`commit`.`sha`,`commit`.`branch`,`commit`.`message`,`commit`.`mergecommit`,`commit`.`excluded`,`commit`.`parent`,`commit`.`parent_id`,`commit`.`date`,`commit`.`author_user_id`,`commit`.`committer_user_id`,`commit`.`ordinal`,`commit`.`customer_id`,`commit`.`ref_type`,`commit`.`ref_id`,`commit`.`metadata` FROM `commit` WHERE `id` = ?\"\n\tvar _ID sql.NullString\n\tvar _Checksum sql.NullString\n\tvar _RepoID sql.NullString\n\tvar _Sha sql.NullString\n\tvar _Branch sql.NullString\n\tvar _Message sql.NullString\n\tvar _Mergecommit sql.NullBool\n\tvar _Excluded sql.NullBool\n\tvar _Parent sql.NullString\n\tvar _ParentID sql.NullString\n\tvar _Date sql.NullInt64\n\tvar _AuthorUserID sql.NullString\n\tvar _CommitterUserID sql.NullString\n\tvar _Ordinal sql.NullInt64\n\tvar _CustomerID sql.NullString\n\tvar _RefType sql.NullString\n\tvar _RefID sql.NullString\n\tvar _Metadata sql.NullString\n\terr := db.QueryRowContext(ctx, q, value).Scan(\n\t\t&_ID,\n\t\t&_Checksum,\n\t\t&_RepoID,\n\t\t&_Sha,\n\t\t&_Branch,\n\t\t&_Message,\n\t\t&_Mergecommit,\n\t\t&_Excluded,\n\t\t&_Parent,\n\t\t&_ParentID,\n\t\t&_Date,\n\t\t&_AuthorUserID,\n\t\t&_CommitterUserID,\n\t\t&_Ordinal,\n\t\t&_CustomerID,\n\t\t&_RefType,\n\t\t&_RefID,\n\t\t&_Metadata,\n\t)\n\tif err == sql.ErrNoRows {\n\t\treturn nil, nil\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tt := &Commit{}\n\tif _ID.Valid {\n\t\tt.SetID(_ID.String)\n\t}\n\tif _Checksum.Valid {\n\t\tt.SetChecksum(_Checksum.String)\n\t}\n\tif _RepoID.Valid {\n\t\tt.SetRepoID(_RepoID.String)\n\t}\n\tif _Sha.Valid {\n\t\tt.SetSha(_Sha.String)\n\t}\n\tif _Branch.Valid {\n\t\tt.SetBranch(_Branch.String)\n\t}\n\tif _Message.Valid {\n\t\tt.SetMessage(_Message.String)\n\t}\n\tif _Mergecommit.Valid {\n\t\tt.SetMergecommit(_Mergecommit.Bool)\n\t}\n\tif _Excluded.Valid {\n\t\tt.SetExcluded(_Excluded.Bool)\n\t}\n\tif _Parent.Valid {\n\t\tt.SetParent(_Parent.String)\n\t}\n\tif _ParentID.Valid {\n\t\tt.SetParentID(_ParentID.String)\n\t}\n\tif _Date.Valid {\n\t\tt.SetDate(_Date.Int64)\n\t}\n\tif _AuthorUserID.Valid {\n\t\tt.SetAuthorUserID(_AuthorUserID.String)\n\t}\n\tif _CommitterUserID.Valid {\n\t\tt.SetCommitterUserID(_CommitterUserID.String)\n\t}\n\tif _Ordinal.Valid {\n\t\tt.SetOrdinal(int32(_Ordinal.Int64))\n\t}\n\tif _CustomerID.Valid {\n\t\tt.SetCustomerID(_CustomerID.String)\n\t}\n\tif _RefType.Valid {\n\t\tt.SetRefType(_RefType.String)\n\t}\n\tif _RefID.Valid {\n\t\tt.SetRefID(_RefID.String)\n\t}\n\tif _Metadata.Valid {\n\t\tt.SetMetadata(_Metadata.String)\n\t}\n\treturn t, nil\n}",
"func (o GroupInitContainerVolumeGitRepoOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v GroupInitContainerVolumeGitRepo) *string { return v.Revision }).(pulumi.StringPtrOutput)\n}",
"func (o GroupContainerVolumeGitRepoPtrOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v *GroupContainerVolumeGitRepo) *string {\n\t\tif v == nil {\n\t\t\treturn nil\n\t\t}\n\t\treturn v.Revision\n\t}).(pulumi.StringPtrOutput)\n}",
"func (c *Client) GetRevision(dir string) (int, error) {\n\tvar revision int\n\n\t// Prepare the URL\n\tURL := fmt.Sprintf(wpRevisionURL, dir)\n\n\t// Make the Request\n\tresp, err := c.getRequest(URL)\n\tif err != nil {\n\t\treturn revision, err\n\t}\n\n\t// Drain body and check Close error\n\tdefer drainAndClose(resp.Body, &err)\n\tbytes, err := ioutil.ReadAll(resp.Body)\n\trevs := regexRevision.FindAllStringSubmatch(string(bytes), 1)\n\n\trevision, err = strconv.Atoi(revs[0][1])\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn revision, err\n}",
"func (r *repository) Find(id uint) (*models.Upload, error) {\n\tupload := models.Upload{}\n\n\tif err := r.db.First(&upload, id).Error; err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &upload, nil\n}",
"func (assetRevisionL) LoadOrig(e boil.Executor, singular bool, maybeAssetRevision interface{}) error {\n\tvar slice []*AssetRevision\n\tvar object *AssetRevision\n\n\tcount := 1\n\tif singular {\n\t\tobject = maybeAssetRevision.(*AssetRevision)\n\t} else {\n\t\tslice = *maybeAssetRevision.(*AssetRevisionSlice)\n\t\tcount = len(slice)\n\t}\n\n\targs := make([]interface{}, count)\n\tif singular {\n\t\tif object.R == nil {\n\t\t\tobject.R = &assetRevisionR{}\n\t\t}\n\t\targs[0] = object.Orig\n\t} else {\n\t\tfor i, obj := range slice {\n\t\t\tif obj.R == nil {\n\t\t\t\tobj.R = &assetRevisionR{}\n\t\t\t}\n\t\t\targs[i] = obj.Orig\n\t\t}\n\t}\n\n\tquery := fmt.Sprintf(\n\t\t\"select * from \\\"asset\\\" where \\\"id\\\" in (%s)\",\n\t\tstrmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),\n\t)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintf(boil.DebugWriter, \"%s\\n%v\\n\", query, args)\n\t}\n\n\tresults, err := e.Query(query, args...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to eager load Asset\")\n\t}\n\tdefer results.Close()\n\n\tvar resultSlice []*Asset\n\tif err = queries.Bind(results, &resultSlice); err != nil {\n\t\treturn errors.Wrap(err, \"failed to bind eager loaded slice Asset\")\n\t}\n\n\tif len(assetRevisionAfterSelectHooks) != 0 {\n\t\tfor _, obj := range resultSlice {\n\t\t\tif err := obj.doAfterSelectHooks(e); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(resultSlice) == 0 {\n\t\treturn nil\n\t}\n\n\tif singular {\n\t\tobject.R.Orig = resultSlice[0]\n\t\treturn nil\n\t}\n\n\tfor _, local := range slice {\n\t\tfor _, foreign := range resultSlice {\n\t\t\tif local.Orig == foreign.ID {\n\t\t\t\tlocal.R.Orig = foreign\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func FindTransactionP(exec boil.Executor, transactionID int, selectCols ...string) *Transaction {\n\tretobj, err := FindTransaction(exec, transactionID, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (a ProcessInstanceApi) FindInstanceById(processId string, instanceId string) (*InstanceItem, *APIResponse, error) {\n\n\tvar localVarHttpMethod = strings.ToUpper(\"Get\")\n\t// create path and map variables\n\tlocalVarPath := a.Configuration.BasePath + \"/processes/{process_id}/instances/{instance_id}\"\n\tlocalVarPath = strings.Replace(localVarPath, \"{\"+\"process_id\"+\"}\", fmt.Sprintf(\"%v\", processId), -1)\n\tlocalVarPath = strings.Replace(localVarPath, \"{\"+\"instance_id\"+\"}\", fmt.Sprintf(\"%v\", instanceId), -1)\n\n\tlocalVarHeaderParams := make(map[string]string)\n\tlocalVarQueryParams := url.Values{}\n\tlocalVarFormParams := make(map[string]string)\n\tvar localVarPostBody interface{}\n\tvar localVarFileName string\n\tvar localVarFileBytes []byte\n\t// authentication '(PasswordGrant)' required\n\t// set key with prefix in header\n\tlocalVarHeaderParams[\"Authorization\"] = a.Configuration.GetAPIKeyWithPrefix(\"Authorization\")\n\t// add default headers if any\n\tfor key := range a.Configuration.DefaultHeader {\n\t\tlocalVarHeaderParams[key] = a.Configuration.DefaultHeader[key]\n\t}\n\n\t// to determine the Content-Type header\n\tlocalVarHttpContentTypes := []string{ \"application/json\", }\n\n\t// set Content-Type header\n\tlocalVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)\n\tif localVarHttpContentType != \"\" {\n\t\tlocalVarHeaderParams[\"Content-Type\"] = localVarHttpContentType\n\t}\n\t// to determine the Accept header\n\tlocalVarHttpHeaderAccepts := []string{\n\t\t\"application/json\",\n\t\t}\n\n\t// set Accept header\n\tlocalVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)\n\tif localVarHttpHeaderAccept != \"\" {\n\t\tlocalVarHeaderParams[\"Accept\"] = localVarHttpHeaderAccept\n\t}\n\tvar successPayload = new(InstanceItem)\n\tlocalVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)\n\n\tvar localVarURL, _ = url.Parse(localVarPath)\n\tlocalVarURL.RawQuery = localVarQueryParams.Encode()\n\tvar localVarAPIResponse = &APIResponse{Operation: \"FindInstanceById\", Method: localVarHttpMethod, RequestURL: localVarURL.String()}\n\tif localVarHttpResponse != nil {\n\t\tlocalVarAPIResponse.Response = localVarHttpResponse.RawResponse\n\t\tlocalVarAPIResponse.Payload = localVarHttpResponse.Body()\n\t}\n\n\tif err != nil {\n\t\treturn successPayload, localVarAPIResponse, err\n\t}\n\terr = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)\n\treturn successPayload, localVarAPIResponse, err\n}",
"func getAssetByID(id int) (*Asset, error) {\n\tpath := fmt.Sprintf(\"asset/%d\", id)\n\tresp, err := get(path, nil)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Failed TCMD request\")\n\t}\n\n\tvar result Asset\n\terr = json.Unmarshal(resp, &result)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"Failed to unmarshal TCMD response\")\n\t}\n\treturn &result, nil\n}",
"func (o GroupInitContainerVolumeGitRepoPtrOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v *GroupInitContainerVolumeGitRepo) *string {\n\t\tif v == nil {\n\t\t\treturn nil\n\t\t}\n\t\treturn v.Revision\n\t}).(pulumi.StringPtrOutput)\n}",
"func (rc *BypassRevisionCache) Get(docID, revID string, copyType BodyCopyType) (docRev DocumentRevision, err error) {\n\tdocRev.RevID = revID\n\tdocRev.Body, docRev.History, docRev.Channels, docRev.Attachments, docRev.Expiry, err = revCacheLoader(rc.backingStore, IDAndRev{DocID: docID, RevID: revID})\n\tif err != nil {\n\t\treturn DocumentRevision{}, err\n\t}\n\n\trc.bypassStat.Add(1)\n\n\treturn docRev, nil\n}",
"func (s *PaymentStorage) Find(ctx context.Context, id aggregate.ID) (*transaction.Payment, error) {\n\tlogger := log.FromContext(ctx)\n\n\tquery := `SELECT * FROM %[1]s WHERE id = $1`\n\tquery = fmt.Sprintf(query, s.table)\n\n\tif logger != nil {\n\t\tlogger.Debugf(\"exec in transaction sql %s, values %+v\", query, []interface{}{\n\t\t\tid,\n\t\t})\n\t}\n\n\tvar payment transaction.Payment\n\n\terr := execInTransaction(s.db, func(tx *sqlx.Tx) error {\n\t\terr := tx.GetContext(ctx, &payment, query, id)\n\t\tif err != nil {\n\t\t\tif err == sql.ErrNoRows {\n\t\t\t\treturn domain.ErrNotFound\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar attrPayment۰v0 transaction.Payment۰v0\n\n\terr = json.Unmarshal(payment.Attributes.([]uint8), &attrPayment۰v0)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tpayment.Attributes = attrPayment۰v0\n\n\treturn &payment, nil\n}",
"func lookupCommit(r *git.Repository, id *git.Oid) (*git.Commit, error) {\n\tobj, err := r.Lookup(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif commit, ok := obj.(*git.Commit); ok {\n\t\treturn commit, nil\n\t}\n\treturn nil, fmt.Errorf(\"hash %v exist but is not a commit\", id)\n}",
"func lookupCommit(r *git.Repository, id *git.Oid) (*git.Commit, error) {\n\tobj, err := r.Lookup(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif commit, ok := obj.(*git.Commit); ok {\n\t\treturn commit, nil\n\t}\n\treturn nil, fmt.Errorf(\"hash %v exist but is not a commit\", id)\n}",
"func (a *paymentUsecase) GetByID(c context.Context, id int64) (*models.Payment, error) {\n\tctx, cancel := context.WithTimeout(c, a.contextTimeout)\n\tdefer cancel()\n\n\tres, err := a.repo.GetByID(ctx, id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn res, nil\n}",
"func getRevision(sd []byte) BYTE {\n\tif len(sd) < 1 {\n\t\treturn 0\n\t}\n\n\t// SECURITY_DESCRIPTOR_RELATIVE.Revision.\n\treturn BYTE(sd[0])\n}",
"func FindVote(ctx context.Context, exec boil.ContextExecutor, hash string, selectCols ...string) (*Vote, error) {\n\tvoteObj := &Vote{}\n\n\tsel := \"*\"\n\tif len(selectCols) > 0 {\n\t\tsel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), \",\")\n\t}\n\tquery := fmt.Sprintf(\n\t\t\"select %s from \\\"vote\\\" where \\\"hash\\\"=$1\", sel,\n\t)\n\n\tq := queries.Raw(query, hash)\n\n\terr := q.Bind(ctx, exec, voteObj)\n\tif err != nil {\n\t\tif errors.Cause(err) == sql.ErrNoRows {\n\t\t\treturn nil, sql.ErrNoRows\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"models: unable to select from vote\")\n\t}\n\n\treturn voteObj, nil\n}",
"func (t BlobsTable) FindByID(id []byte) *BlobQuery {\n\treturn t.driver.findByID(id)\n}",
"func (*ActivityStageDataAccessObject) FindByID(id int) (ActivityStage, bool) {\n\tvar result ActivityStage\n\thas, err := orm.Table(ActivityStageDAO.TableName()).ID(id).Get(&result) \n\tlogger.LogIfError(err)\n\treturn result, has\n}",
"func (a *SnapshotApiService) SnapshotsFindById(ctx _context.Context, snapshotId string, optionals *SnapshotsFindByIdOpts) (Snapshot, *APIResponse, error) {\n\tvar (\n\t\tlocalVarHTTPMethod = _nethttp.MethodGet\n\t\tlocalVarPostBody interface{}\n\t\tlocalVarFormFileName string\n\t\tlocalVarFileName string\n\t\tlocalVarFileBytes []byte\n\t\tlocalVarReturnValue Snapshot\n\t)\n\n\t// create path and map variables\n\tlocalVarPath := a.client.cfg.BasePath + \"/snapshots/{snapshotId}\"\n\tlocalVarPath = strings.Replace(localVarPath, \"{\"+\"snapshotId\"+\"}\", _neturl.PathEscape(parameterToString(snapshotId, \"\")) , -1)\n\n\tlocalVarHeaderParams := make(map[string]string)\n\tlocalVarQueryParams := _neturl.Values{}\n\tlocalVarFormParams := _neturl.Values{}\n\n\tif optionals != nil && optionals.Pretty != nil {\n\t\tlocalVarQueryParams.Add(\"pretty\", parameterToString(*optionals.Pretty, \"\"))\n\t}\n\tif optionals != nil && optionals.Depth != nil {\n\t\tlocalVarQueryParams.Add(\"depth\", parameterToString(*optionals.Depth, \"\"))\n\t}\n\t// to determine the Content-Type header\n\tlocalVarHTTPContentTypes := []string{}\n\n\t// set Content-Type header\n\tlocalVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)\n\tif localVarHTTPContentType != \"\" {\n\t\tlocalVarHeaderParams[\"Content-Type\"] = localVarHTTPContentType\n\t}\n\n\t// to determine the Accept header\n\tlocalVarHTTPHeaderAccepts := []string{\"application/json\"}\n\n\t// set Accept header\n\tlocalVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)\n\tif localVarHTTPHeaderAccept != \"\" {\n\t\tlocalVarHeaderParams[\"Accept\"] = localVarHTTPHeaderAccept\n\t}\n\tif optionals != nil && optionals.XContractNumber != nil {\n\t\tlocalVarHeaderParams[\"X-Contract-Number\"] = parameterToString(*optionals.XContractNumber, \"\")\n\t}\n\tif ctx != nil {\n\t\t// API Key Authentication\n\t\tif auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {\n\t\t\tvar key string\n\t\t\tif auth.Prefix != \"\" {\n\t\t\t\tkey = auth.Prefix + \" \" + auth.Key\n\t\t\t} else {\n\t\t\t\tkey = auth.Key\n\t\t\t}\n\t\t\tlocalVarHeaderParams[\"Authorization\"] = key\n\t\t}\n\t}\n\tr, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, err\n\t}\n\n\tlocalVarHTTPResponse, err := a.client.callAPI(r)\n\tlocalVarAPIResponse := &APIResponse {\n\t\tResponse: localVarHTTPResponse,\n\t\tMethod: localVarHTTPMethod,\n\t\tRequestURL: localVarPath,\n\t\tOperation: \"SnapshotsFindById\",\n\t}\n\tif err != nil || localVarHTTPResponse == nil {\n\t\treturn localVarReturnValue, localVarAPIResponse, err\n\t}\n\n\tlocalVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)\n\tlocalVarHTTPResponse.Body.Close()\n\tlocalVarAPIResponse.Payload = localVarBody\n\tif err != nil {\n\t\treturn localVarReturnValue, localVarAPIResponse, err\n\t}\n\n\tif localVarHTTPResponse.StatusCode >= 300 {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: localVarHTTPResponse.Status,\n\t\t}\n\t\t\tvar v Error\n\t\t\terr = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\t\t\tif err != nil {\n\t\t\t\tnewErr.error = err.Error()\n\t\t\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t\t\t}\n\t\t\tnewErr.model = v\n\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t}\n\n\terr = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\tif err != nil {\n\t\tnewErr := GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: err.Error(),\n\t\t}\n\t\treturn localVarReturnValue, localVarAPIResponse, newErr\n\t}\n\n\treturn localVarReturnValue, localVarAPIResponse, nil\n}",
"func (r *JobRepo) Find(id uint) (*model.Job, error) {\n\tjob := &model.Job{}\n\tdb, err := db.Instance()\n\tif err != nil {\n\t\treturn job, err\n\t}\n\terr = db.Model(job).Where(\"id = ?\", id).Preload(\"Build.Repository.Provider\").First(job).Error\n\treturn job, nil\n}",
"func requireRevID(t *testing.T, rt *RestTester, docID, revID string) {\n\tdoc, err := rt.GetDatabase().GetDocument(logger.TestCtx(t), docID, db.DocUnmarshalAll)\n\trequire.NoError(t, err, \"Error reading document from bucket\")\n\trequire.Equal(t, revID, doc.SyncData.CurrentRev)\n}",
"func (o FioSpecVolumeVolumeSourceGitRepoOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v FioSpecVolumeVolumeSourceGitRepo) *string { return v.Revision }).(pulumi.StringPtrOutput)\n}",
"func (ivr InMemoryVideoRepository) Retrieve(id string) (*Video, error) {\n\tv, ok := ivr.storage[id]\n\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"no video with id %s in storage\", id)\n\t}\n\n\treturn v, nil\n}",
"func (pr *pokemonRepository) FindById(p *model.Pokemon) (*model.Pokemon, error) {\n\trecords, err := readData(\"db.csv\")\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tfor _, record := range records {\n\t\tcsvId, err := strconv.ParseUint(record[0], 10, 32)\n\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tif csvId != p.ID {\n\t\t\tcontinue\n\t\t}\n\n\t\tp.Name = record[1]\n\n\t\tbreak\n\t}\n\n\treturn p, nil\n}",
"func (r *Repository) FindSemverTag(c *semver.Constraints) (*plumbing.Reference, error) {\n\t// Check if Repository is nil to avoid a panic if this function is called\n\t// before repo has been cloned\n\tif r.Repository == nil {\n\t\treturn nil, errors.New(\"Repository is nil\")\n\t}\n\n\ttagsIter, err := r.Tags()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tcoll := semverref.Collection{}\n\n\tif err := tagsIter.ForEach(func(t *plumbing.Reference) error {\n\t\tv, err := semver.NewVersion(t.Name().Short())\n\t\tif err != nil {\n\t\t\treturn nil // Ignore errors and thus tags that aren't parsable as a semver\n\t\t}\n\n\t\t// No way to a priori find the length of tagsIter so append to the collection.\n\t\tcoll = append(coll, semverref.SemverRef{Ver: v, Ref: t})\n\t\treturn nil\n\t}); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn coll.HighestMatch(c)\n}",
"func (s *Service) getFile(resID int, fileType int, version int) (file *model.ResourceFile, err error) {\n\tfile = &model.ResourceFile{}\n\tvar (\n\t\tres *model.Resource // current version\n\t\tresHis *model.Resource // history version\n\t\tpoolID int\n\t)\n\tif res, err = s.dao.ParseResID(ctx, resID); err != nil {\n\t\tlog.Error(\"[getFile]-[findPool %d]-Error(%v)\", resID, err)\n\t\treturn\n\t}\n\tpoolID = int(res.PoolID)\n\tif version != 0 { // full pkg of the history version\n\t\tif resHis, err = s.dao.ParseResVer(ctx, poolID, version); err != nil {\n\t\t\tlog.Error(\"[getFile]-[findVersion]-Error(%v)\", err)\n\t\t\treturn\n\t\t}\n\t\tresID = int(resHis.ID)\n\t}\n\tif file, err = s.dao.ReadyFile(ctx, resID, fileType); err != nil {\n\t\tlog.Error(errFormat, \"getUrl\", \"First\", err)\n\t}\n\treturn\n}",
"func (r *WikiActorsRepo) Find(kind wikiactors.Kind, id int) *wikiactors.Actor {\n\tr.mutex.RLock()\n\tdefer r.mutex.RUnlock()\n\n\tp, found := r.byIDByKind[kind][id]\n\tif found != true {\n\t\treturn nil\n\t}\n\treturn p\n}",
"func (n *Node) GetRevision() error {\n\tfor _, s := range revServices {\n\t\tif !strings.HasPrefix(n.ImportPath, s.prefix) {\n\t\t\tcontinue\n\t\t}\n\t\treturn s.get(HttpClient, n)\n\t}\n\treturn ErrNotMatchAnyService\n}",
"func ParseRevision(s string) (Revision, error) {\n\tif s == \"unset\" {\n\t\treturn Revision{}, nil\n\t}\n\tif s != \"\" && s[0] == 'x' {\n\t\ti, err := strconv.Atoi(s[1:])\n\t\tif err == nil && i > 0 {\n\t\t\treturn Revision{-i}, nil\n\t\t}\n\t}\n\ti, err := strconv.Atoi(s)\n\tif err == nil && i > 0 {\n\t\treturn Revision{i}, nil\n\t}\n\treturn Revision{}, fmt.Errorf(\"invalid snap revision: %#v\", s)\n}",
"func FindCommitByIDTx(ctx context.Context, tx Tx, value string) (*Commit, error) {\n\tq := \"SELECT `commit`.`id`,`commit`.`checksum`,`commit`.`repo_id`,`commit`.`sha`,`commit`.`branch`,`commit`.`message`,`commit`.`mergecommit`,`commit`.`excluded`,`commit`.`parent`,`commit`.`parent_id`,`commit`.`date`,`commit`.`author_user_id`,`commit`.`committer_user_id`,`commit`.`ordinal`,`commit`.`customer_id`,`commit`.`ref_type`,`commit`.`ref_id`,`commit`.`metadata` FROM `commit` WHERE `id` = ?\"\n\tvar _ID sql.NullString\n\tvar _Checksum sql.NullString\n\tvar _RepoID sql.NullString\n\tvar _Sha sql.NullString\n\tvar _Branch sql.NullString\n\tvar _Message sql.NullString\n\tvar _Mergecommit sql.NullBool\n\tvar _Excluded sql.NullBool\n\tvar _Parent sql.NullString\n\tvar _ParentID sql.NullString\n\tvar _Date sql.NullInt64\n\tvar _AuthorUserID sql.NullString\n\tvar _CommitterUserID sql.NullString\n\tvar _Ordinal sql.NullInt64\n\tvar _CustomerID sql.NullString\n\tvar _RefType sql.NullString\n\tvar _RefID sql.NullString\n\tvar _Metadata sql.NullString\n\terr := tx.QueryRowContext(ctx, q, value).Scan(\n\t\t&_ID,\n\t\t&_Checksum,\n\t\t&_RepoID,\n\t\t&_Sha,\n\t\t&_Branch,\n\t\t&_Message,\n\t\t&_Mergecommit,\n\t\t&_Excluded,\n\t\t&_Parent,\n\t\t&_ParentID,\n\t\t&_Date,\n\t\t&_AuthorUserID,\n\t\t&_CommitterUserID,\n\t\t&_Ordinal,\n\t\t&_CustomerID,\n\t\t&_RefType,\n\t\t&_RefID,\n\t\t&_Metadata,\n\t)\n\tif err == sql.ErrNoRows {\n\t\treturn nil, nil\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tt := &Commit{}\n\tif _ID.Valid {\n\t\tt.SetID(_ID.String)\n\t}\n\tif _Checksum.Valid {\n\t\tt.SetChecksum(_Checksum.String)\n\t}\n\tif _RepoID.Valid {\n\t\tt.SetRepoID(_RepoID.String)\n\t}\n\tif _Sha.Valid {\n\t\tt.SetSha(_Sha.String)\n\t}\n\tif _Branch.Valid {\n\t\tt.SetBranch(_Branch.String)\n\t}\n\tif _Message.Valid {\n\t\tt.SetMessage(_Message.String)\n\t}\n\tif _Mergecommit.Valid {\n\t\tt.SetMergecommit(_Mergecommit.Bool)\n\t}\n\tif _Excluded.Valid {\n\t\tt.SetExcluded(_Excluded.Bool)\n\t}\n\tif _Parent.Valid {\n\t\tt.SetParent(_Parent.String)\n\t}\n\tif _ParentID.Valid {\n\t\tt.SetParentID(_ParentID.String)\n\t}\n\tif _Date.Valid {\n\t\tt.SetDate(_Date.Int64)\n\t}\n\tif _AuthorUserID.Valid {\n\t\tt.SetAuthorUserID(_AuthorUserID.String)\n\t}\n\tif _CommitterUserID.Valid {\n\t\tt.SetCommitterUserID(_CommitterUserID.String)\n\t}\n\tif _Ordinal.Valid {\n\t\tt.SetOrdinal(int32(_Ordinal.Int64))\n\t}\n\tif _CustomerID.Valid {\n\t\tt.SetCustomerID(_CustomerID.String)\n\t}\n\tif _RefType.Valid {\n\t\tt.SetRefType(_RefType.String)\n\t}\n\tif _RefID.Valid {\n\t\tt.SetRefID(_RefID.String)\n\t}\n\tif _Metadata.Valid {\n\t\tt.SetMetadata(_Metadata.String)\n\t}\n\treturn t, nil\n}",
"func R(r interface{}) Revision {\n\tswitch r := r.(type) {\n\tcase string:\n\t\trevision, err := ParseRevision(r)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\treturn revision\n\tcase int:\n\t\treturn Revision{r}\n\tdefault:\n\t\tpanic(fmt.Errorf(\"cannot use %v (%T) as a snap revision\", r, r))\n\t}\n}",
"func (t *Transactions) Find(id TransactionID) *Transaction {\n\tt.RLock()\n\tdefer t.RUnlock()\n\n\treturn t.buffer[id]\n}",
"func (s *chainScore) Ex_getRevision() (int64, error) {\n\tif err := s.tryChargeCall(false); err != nil {\n\t\treturn 0, err\n\t}\n\tas := s.cc.GetAccountState(state.SystemID)\n\treturn scoredb.NewVarDB(as, state.VarRevision).Int64(), nil\n}",
"func (e empresaService) FindById(id uint64) (model.Empresa, error) {\n\treturn e.empresaRepository.FindById(id)\n}",
"func (r *RunCmd) selectVersion(client config.Docker, db *bolt.DB, to tool.Tool, doneChan chan error, closeDBChan chan bool) (string, error) {\n\n\t// create channels to fetch the image locally and from the registry\n\tlocalVersionChannel := make(chan func() (string, error))\n\trepositoryVersionChannel := make(chan func() (string, error))\n\n\tcaches := cache.New(config.Database{DB: db})\n\n\t// Fetch local versions\n\tgo r.fetchLocalVersions(localVersionChannel, db, client, to)\n\t// Fetch repository versions\n\tgo r.FetchRepositoryVersions(repositoryVersionChannel, db, to)\n\n\tif r.update {\n\t\tlocalVersion, err := (<-localVersionChannel)()\n\t\tif err != nil {\n\t\t\tdoneChan <- err\n\t\t\tcloseDBChan <- true\n\t\t\treturn \"\", err\n\t\t}\n\t\trepositoryVersion, err := (<-repositoryVersionChannel)()\n\t\tif err != nil {\n\t\t\tdoneChan <- err\n\t\t\tcloseDBChan <- true\n\t\t\treturn \"\", err\n\t\t}\n\t\tif version.ShouldPull(localVersion, repositoryVersion) {\n\t\t\tcaches.Versions.Clear(to)\n\t\t\tcloseDBChan <- true\n\t\t\terr = tool.Pull(client, to, repositoryVersion, DefaultTimeout)\n\t\t\tif err != nil {\n\t\t\t\tdoneChan <- err\n\t\t\t\tcloseDBChan <- true\n\t\t\t\treturn \"\", err\n\t\t\t}\n\t\t\tdoneChan <- nil\n\t\t\treturn repositoryVersion, nil\n\t\t}\n\t\tcloseDBChan <- true\n\t\tdoneChan <- nil\n\t\treturn localVersion, nil\n\t}\n\tlocalVersion, err := (<-localVersionChannel)()\n\tif err != nil {\n\t\tdoneChan <- err\n\t\tcloseDBChan <- true\n\t\treturn \"\", err\n\t}\n\tpull := func(doneChan chan error) (string, error) {\n\t\tlogrus.Infoln(\"Fetching remote versions\")\n\t\trepositoryVersion, err := (<-repositoryVersionChannel)()\n\t\tdbClosed := false\n\t\tif err == nil && version.ShouldPull(localVersion, repositoryVersion) {\n\t\t\tlogrus.WithField(\"remoteVersion\", repositoryVersion).Infoln(\"Should pull remote version\")\n\t\t\tcaches.Versions.Clear(to)\n\t\t\tcloseDBChan <- true\n\t\t\tdbClosed = true\n\t\t\terr = tool.Pull(client, to, repositoryVersion, DefaultTimeout)\n\t\t\tif err != nil {\n\t\t\t\tdoneChan <- err\n\t\t\t\treturn \"\", err\n\t\t\t}\n\t\t}\n\t\tif !dbClosed {\n\t\t\tcloseDBChan <- true\n\t\t}\n\t\tdoneChan <- err\n\t\treturn repositoryVersion, err\n\t}\n\tif len(localVersion) > 0 {\n\t\tlogrus.WithField(\"version\", localVersion).Infoln(\"Found local image\")\n\t\tgo pull(doneChan)\n\t\treturn localVersion, nil\n\t}\n\treturn pull(doneChan)\n}",
"func FindGitRevision(ctx context.Context, file string) (shortSha string, sha string, err error) {\n\tlogger := common.Logger(ctx)\n\n\tgitDir, err := git.PlainOpenWithOptions(\n\t\tfile,\n\t\t&git.PlainOpenOptions{\n\t\t\tDetectDotGit: true,\n\t\t\tEnableDotGitCommonDir: true,\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlogger.WithError(err).Error(\"path\", file, \"not located inside a git repository\")\n\t\treturn \"\", \"\", err\n\t}\n\n\thead, err := gitDir.Reference(plumbing.HEAD, true)\n\tif err != nil {\n\t\treturn \"\", \"\", err\n\t}\n\n\tif head.Hash().IsZero() {\n\t\treturn \"\", \"\", fmt.Errorf(\"HEAD sha1 could not be resolved\")\n\t}\n\n\thash := head.Hash().String()\n\n\tlogger.Debugf(\"Found revision: %s\", hash)\n\treturn hash[:7], strings.TrimSpace(hash), nil\n}",
"func (s *Service) FindByID(ctx context.Context, id string) (*Article, error) {\n\ta, err := s.repo.FindByID(ctx, id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn a, nil\n}",
"func (r *Repository) Find(ctx context.Context, id interface{}) (interface{}, error) {\n\tq, err := r.GetQuery(ctx)\n\tif nil != err {\n\t\treturn nil, err\n\t}\n\n\trows, err := q.Use(r.model).\n\t\tWhere(\"id\", id).\n\t\tWithLimit(1).\n\t\tAllCtx(ctx)\n\n\tif nil != err {\n\t\treturn nil, err\n\t}\n\n\tval := reflect.ValueOf(rows)\n\tif val.Len() == 0 {\n\t\treturn nil, NewEmptyResultError()\n\t}\n\n\treturn val.Index(0).Interface(), nil\n}",
"func (o *Drive) GetRevision(ctx context.Context) (revision string, err error) {\n\terr = o.object.CallWithContext(ctx, \"org.freedesktop.DBus.Properties.Get\", 0, InterfaceDrive, \"Revision\").Store(&revision)\n\treturn\n}",
"func FindAuthP(exec boil.Executor, id int, selectCols ...string) *Auth {\n\tretobj, err := FindAuth(exec, id, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (o IopingSpecVolumeVolumeSourceGitRepoOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v IopingSpecVolumeVolumeSourceGitRepo) *string { return v.Revision }).(pulumi.StringPtrOutput)\n}",
"func (o FioSpecVolumeVolumeSourceGitRepoPtrOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v *FioSpecVolumeVolumeSourceGitRepo) *string {\n\t\tif v == nil {\n\t\t\treturn nil\n\t\t}\n\t\treturn v.Revision\n\t}).(pulumi.StringPtrOutput)\n}",
"func (db *DB) getVersion(id int) *DetailVersion {\n\tver := &DetailVersion{}\n\terr := db.Get(ver, \"select * from detail_version where id = $1\", id)\n\n\tif err != nil {\n\t\tif err == sql.ErrNoRows {\n\t\t\treturn nil\n\t\t} else {\n\t\t\tpanic(err)\n\t\t}\n\t}\n\n\treturn ver\n}",
"func (m *Manager) FindAuditLogDetailByID(id int64) (*AuditLogDetail, error) {\n\tvar res AuditLogDetail\n\terr := m.GetRDbMap().SelectOne(\n\t\t&res,\n\t\tfmt.Sprintf(\"SELECT %s FROM %s WHERE id=?\", GetSelectFields(AuditLogDetailTableFull, \"\"), AuditLogDetailTableFull),\n\t\tid,\n\t)\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &res, nil\n}",
"func (db *DB) GetBlob(ctx context.Context, id *core.RecordID) ([]byte, error) {\n\tvar (\n\t\tblob []byte\n\t\terr error\n\t)\n\n\terr = db.View(ctx, func(tx *TransactionManager) error {\n\t\tblob, err = tx.GetBlob(ctx, id)\n\t\treturn err\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn blob, nil\n}",
"func FindBraceletPhotoP(exec boil.Executor, id int, selectCols ...string) *BraceletPhoto {\n\tretobj, err := FindBraceletPhoto(exec, id, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func (a *SegmentEffortsApiService) GetSegmentEffortByIdExecute(r ApiGetSegmentEffortByIdRequest) (*DetailedSegmentEffort, *http.Response, error) {\n\tvar (\n\t\tlocalVarHTTPMethod = http.MethodGet\n\t\tlocalVarPostBody interface{}\n\t\tformFiles []formFile\n\t\tlocalVarReturnValue *DetailedSegmentEffort\n\t)\n\n\tlocalBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, \"SegmentEffortsApiService.GetSegmentEffortById\")\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}\n\t}\n\n\tlocalVarPath := localBasePath + \"/segment_efforts/{id}\"\n\tlocalVarPath = strings.Replace(localVarPath, \"{\"+\"id\"+\"}\", url.PathEscape(parameterToString(r.id, \"\")), -1)\n\n\tlocalVarHeaderParams := make(map[string]string)\n\tlocalVarQueryParams := url.Values{}\n\tlocalVarFormParams := url.Values{}\n\n\t// to determine the Content-Type header\n\tlocalVarHTTPContentTypes := []string{}\n\n\t// set Content-Type header\n\tlocalVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)\n\tif localVarHTTPContentType != \"\" {\n\t\tlocalVarHeaderParams[\"Content-Type\"] = localVarHTTPContentType\n\t}\n\n\t// to determine the Accept header\n\tlocalVarHTTPHeaderAccepts := []string{\"application/json\"}\n\n\t// set Accept header\n\tlocalVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)\n\tif localVarHTTPHeaderAccept != \"\" {\n\t\tlocalVarHeaderParams[\"Accept\"] = localVarHTTPHeaderAccept\n\t}\n\treq, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)\n\tif err != nil {\n\t\treturn localVarReturnValue, nil, err\n\t}\n\n\tlocalVarHTTPResponse, err := a.client.callAPI(req)\n\tif err != nil || localVarHTTPResponse == nil {\n\t\treturn localVarReturnValue, localVarHTTPResponse, err\n\t}\n\n\tlocalVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)\n\tlocalVarHTTPResponse.Body.Close()\n\tlocalVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))\n\tif err != nil {\n\t\treturn localVarReturnValue, localVarHTTPResponse, err\n\t}\n\n\tif localVarHTTPResponse.StatusCode >= 300 {\n\t\tnewErr := &GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: localVarHTTPResponse.Status,\n\t\t}\n\t\t\tvar v Fault\n\t\t\terr = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\t\t\tif err != nil {\n\t\t\t\tnewErr.error = err.Error()\n\t\t\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t\t\t}\n\t\t\tnewErr.model = v\n\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t}\n\n\terr = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get(\"Content-Type\"))\n\tif err != nil {\n\t\tnewErr := &GenericOpenAPIError{\n\t\t\tbody: localVarBody,\n\t\t\terror: err.Error(),\n\t\t}\n\t\treturn localVarReturnValue, localVarHTTPResponse, newErr\n\t}\n\n\treturn localVarReturnValue, localVarHTTPResponse, nil\n}",
"func (o ApplicationStatusOperationStateSyncResultPtrOutput) Revision() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v *ApplicationStatusOperationStateSyncResult) *string {\n\t\tif v == nil {\n\t\t\treturn nil\n\t\t}\n\t\treturn &v.Revision\n\t}).(pulumi.StringPtrOutput)\n}",
"func (bc *DBBuildConnector) FindBuildById(buildId string) (*build.Build, error) {\n\tb, err := build.FindOne(build.ById(buildId))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif b == nil {\n\t\treturn nil, gimlet.ErrorResponse{\n\t\t\tStatusCode: http.StatusNotFound,\n\t\t\tMessage: fmt.Sprintf(\"build with id %s not found\", buildId),\n\t\t}\n\t}\n\treturn b, nil\n}",
"func (s *SmartContract) ReadAsset(ctx contractapi.TransactionContextInterface, assetID string) (*Asset, error) {\n\n\tlog.Printf(\"ReadAsset: collection %v, ID %v\", assetCollection, assetID)\n\tassetJSON, err := ctx.GetStub().GetPrivateData(assetCollection, assetID) //get the asset from chaincode state\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to read asset: %v\", err)\n\t}\n\n\t// No Asset found, return empty response\n\tif assetJSON == nil {\n\t\tlog.Printf(\"%v does not exist in collection %v\", assetID, assetCollection)\n\t\treturn nil, nil\n\t}\n\n\tvar asset *Asset\n\terr = json.Unmarshal(assetJSON, &asset)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to unmarshal JSON: %v\", err)\n\t}\n\n\treturn asset, nil\n\n}",
"func (client ContainerAppsRevisionsClient) GetRevision(ctx context.Context, resourceGroupName string, containerAppName string, name string) (result Revision, err error) {\n\tif tracing.IsEnabled() {\n\t\tctx = tracing.StartSpan(ctx, fqdn+\"/ContainerAppsRevisionsClient.GetRevision\")\n\t\tdefer func() {\n\t\t\tsc := -1\n\t\t\tif result.Response.Response != nil {\n\t\t\t\tsc = result.Response.Response.StatusCode\n\t\t\t}\n\t\t\ttracing.EndSpan(ctx, sc, err)\n\t\t}()\n\t}\n\tif err := validation.Validate([]validation.Validation{\n\t\t{TargetValue: resourceGroupName,\n\t\t\tConstraints: []validation.Constraint{{Target: \"resourceGroupName\", Name: validation.MaxLength, Rule: 90, Chain: nil},\n\t\t\t\t{Target: \"resourceGroupName\", Name: validation.MinLength, Rule: 1, Chain: nil},\n\t\t\t\t{Target: \"resourceGroupName\", Name: validation.Pattern, Rule: `^[-\\w\\._\\(\\)]+[^\\.]$`, Chain: nil}}}}); err != nil {\n\t\treturn result, validation.NewError(\"web.ContainerAppsRevisionsClient\", \"GetRevision\", err.Error())\n\t}\n\n\treq, err := client.GetRevisionPreparer(ctx, resourceGroupName, containerAppName, name)\n\tif err != nil {\n\t\terr = autorest.NewErrorWithError(err, \"web.ContainerAppsRevisionsClient\", \"GetRevision\", nil, \"Failure preparing request\")\n\t\treturn\n\t}\n\n\tresp, err := client.GetRevisionSender(req)\n\tif err != nil {\n\t\tresult.Response = autorest.Response{Response: resp}\n\t\terr = autorest.NewErrorWithError(err, \"web.ContainerAppsRevisionsClient\", \"GetRevision\", resp, \"Failure sending request\")\n\t\treturn\n\t}\n\n\tresult, err = client.GetRevisionResponder(resp)\n\tif err != nil {\n\t\terr = autorest.NewErrorWithError(err, \"web.ContainerAppsRevisionsClient\", \"GetRevision\", resp, \"Failure responding to request\")\n\t\treturn\n\t}\n\n\treturn\n}",
"func (o *AssetRevision) Insert(exec boil.Executor, whitelist ...string) error {\n\tif o == nil {\n\t\treturn errors.New(\"public: no asset_revision provided for insertion\")\n\t}\n\n\tvar err error\n\n\tif err := o.doBeforeInsertHooks(exec); err != nil {\n\t\treturn err\n\t}\n\n\tnzDefaults := queries.NonZeroDefaultSet(assetRevisionColumnsWithDefault, o)\n\n\tkey := makeCacheKey(whitelist, nzDefaults)\n\tassetRevisionInsertCacheMut.RLock()\n\tcache, cached := assetRevisionInsertCache[key]\n\tassetRevisionInsertCacheMut.RUnlock()\n\n\tif !cached {\n\t\twl, returnColumns := strmangle.InsertColumnSet(\n\t\t\tassetRevisionColumns,\n\t\t\tassetRevisionColumnsWithDefault,\n\t\t\tassetRevisionColumnsWithoutDefault,\n\t\t\tnzDefaults,\n\t\t\twhitelist,\n\t\t)\n\n\t\tcache.valueMapping, err = queries.BindMapping(assetRevisionType, assetRevisionMapping, wl)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcache.retMapping, err = queries.BindMapping(assetRevisionType, assetRevisionMapping, returnColumns)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif len(wl) != 0 {\n\t\t\tcache.query = fmt.Sprintf(\"INSERT INTO \\\"asset_revision\\\" (\\\"%s\\\") VALUES (%s)\", strings.Join(wl, \"\\\",\\\"\"), strmangle.Placeholders(dialect.IndexPlaceholders, len(wl), 1, 1))\n\t\t} else {\n\t\t\tcache.query = \"INSERT INTO \\\"asset_revision\\\" DEFAULT VALUES\"\n\t\t}\n\n\t\tif len(cache.retMapping) != 0 {\n\t\t\tcache.query += fmt.Sprintf(\" RETURNING \\\"%s\\\"\", strings.Join(returnColumns, \"\\\",\\\"\"))\n\t\t}\n\t}\n\n\tvalue := reflect.Indirect(reflect.ValueOf(o))\n\tvals := queries.ValuesFromMapping(value, cache.valueMapping)\n\n\tif boil.DebugMode {\n\t\tfmt.Fprintln(boil.DebugWriter, cache.query)\n\t\tfmt.Fprintln(boil.DebugWriter, vals)\n\t}\n\n\tif len(cache.retMapping) != 0 {\n\t\terr = exec.QueryRow(cache.query, vals...).Scan(queries.PtrsFromMapping(value, cache.retMapping)...)\n\t} else {\n\t\t_, err = exec.Exec(cache.query, vals...)\n\t}\n\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"public: unable to insert into asset_revision\")\n\t}\n\n\tif !cached {\n\t\tassetRevisionInsertCacheMut.Lock()\n\t\tassetRevisionInsertCache[key] = cache\n\t\tassetRevisionInsertCacheMut.Unlock()\n\t}\n\n\treturn o.doAfterInsertHooks(exec)\n}",
"func FindFailureP(exec boil.Executor, id int64, selectCols ...string) *Failure {\n\tretobj, err := FindFailure(exec, id, selectCols...)\n\tif err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n\n\treturn retobj\n}",
"func TargetRevision(t *kernel.Task, revPtr hostarch.Addr, netProto tcpip.NetworkProtocolNumber) (linux.XTGetRevision, *syserr.Error) {\n\t// Read in the target name and version.\n\tvar rev linux.XTGetRevision\n\tif _, err := rev.CopyIn(t, revPtr); err != nil {\n\t\treturn linux.XTGetRevision{}, syserr.FromError(err)\n\t}\n\tmaxSupported, ok := targetRevision(rev.Name.String(), netProto, rev.Revision)\n\tif !ok {\n\t\treturn linux.XTGetRevision{}, syserr.ErrProtocolNotSupported\n\t}\n\trev.Revision = maxSupported\n\treturn rev, nil\n}",
"func (fn GetPlanRevisionHandlerFunc) Handle(params GetPlanRevisionParams, principal *models.User) middleware.Responder {\n\treturn fn(params, principal)\n}",
"func (t *Cases) Find(id int) *models.Case {\n\tvar result models.Case\n\n\tquery := func(db *gorm.DB) {\n\t\tdb.Find(&result, id)\n\t}\n\n\terror := t.context.Execute(query)\n\n\tif error != nil {\n\t\treturn nil\n\t}\n\n\treturn &result\n}",
"func getObjectRevision(obj client.Object) (int64, error) {\n\ta := obj.GetAnnotations()\n\tif a == nil {\n\t\treturn 0, nil\n\t}\n\n\tif len(a[revisionAnnotation]) == 0 {\n\t\treturn 0, nil\n\t}\n\n\treturn strconv.ParseInt(a[revisionAnnotation], 10, 64)\n}",
"func (t *Commit) DBFind(ctx context.Context, db DB, _params ...interface{}) (bool, error) {\n\tparams := []interface{}{\n\t\torm.Column(\"id\"),\n\t\torm.Column(\"checksum\"),\n\t\torm.Column(\"repo_id\"),\n\t\torm.Column(\"sha\"),\n\t\torm.Column(\"branch\"),\n\t\torm.Column(\"message\"),\n\t\torm.Column(\"mergecommit\"),\n\t\torm.Column(\"excluded\"),\n\t\torm.Column(\"parent\"),\n\t\torm.Column(\"parent_id\"),\n\t\torm.Column(\"date\"),\n\t\torm.Column(\"author_user_id\"),\n\t\torm.Column(\"committer_user_id\"),\n\t\torm.Column(\"ordinal\"),\n\t\torm.Column(\"customer_id\"),\n\t\torm.Column(\"ref_type\"),\n\t\torm.Column(\"ref_id\"),\n\t\torm.Column(\"metadata\"),\n\t\torm.Table(CommitTableName),\n\t}\n\tif len(_params) > 0 {\n\t\tfor _, param := range _params {\n\t\t\tparams = append(params, param)\n\t\t}\n\t}\n\tq, p := orm.BuildQuery(params...)\n\trow := db.QueryRowContext(ctx, q, p...)\n\tvar _ID sql.NullString\n\tvar _Checksum sql.NullString\n\tvar _RepoID sql.NullString\n\tvar _Sha sql.NullString\n\tvar _Branch sql.NullString\n\tvar _Message sql.NullString\n\tvar _Mergecommit sql.NullBool\n\tvar _Excluded sql.NullBool\n\tvar _Parent sql.NullString\n\tvar _ParentID sql.NullString\n\tvar _Date sql.NullInt64\n\tvar _AuthorUserID sql.NullString\n\tvar _CommitterUserID sql.NullString\n\tvar _Ordinal sql.NullInt64\n\tvar _CustomerID sql.NullString\n\tvar _RefType sql.NullString\n\tvar _RefID sql.NullString\n\tvar _Metadata sql.NullString\n\terr := row.Scan(\n\t\t&_ID,\n\t\t&_Checksum,\n\t\t&_RepoID,\n\t\t&_Sha,\n\t\t&_Branch,\n\t\t&_Message,\n\t\t&_Mergecommit,\n\t\t&_Excluded,\n\t\t&_Parent,\n\t\t&_ParentID,\n\t\t&_Date,\n\t\t&_AuthorUserID,\n\t\t&_CommitterUserID,\n\t\t&_Ordinal,\n\t\t&_CustomerID,\n\t\t&_RefType,\n\t\t&_RefID,\n\t\t&_Metadata,\n\t)\n\tif err != nil && err != sql.ErrNoRows {\n\t\treturn false, err\n\t}\n\tif _ID.Valid {\n\t\tt.SetID(_ID.String)\n\t}\n\tif _Checksum.Valid {\n\t\tt.SetChecksum(_Checksum.String)\n\t}\n\tif _RepoID.Valid {\n\t\tt.SetRepoID(_RepoID.String)\n\t}\n\tif _Sha.Valid {\n\t\tt.SetSha(_Sha.String)\n\t}\n\tif _Branch.Valid {\n\t\tt.SetBranch(_Branch.String)\n\t}\n\tif _Message.Valid {\n\t\tt.SetMessage(_Message.String)\n\t}\n\tif _Mergecommit.Valid {\n\t\tt.SetMergecommit(_Mergecommit.Bool)\n\t}\n\tif _Excluded.Valid {\n\t\tt.SetExcluded(_Excluded.Bool)\n\t}\n\tif _Parent.Valid {\n\t\tt.SetParent(_Parent.String)\n\t}\n\tif _ParentID.Valid {\n\t\tt.SetParentID(_ParentID.String)\n\t}\n\tif _Date.Valid {\n\t\tt.SetDate(_Date.Int64)\n\t}\n\tif _AuthorUserID.Valid {\n\t\tt.SetAuthorUserID(_AuthorUserID.String)\n\t}\n\tif _CommitterUserID.Valid {\n\t\tt.SetCommitterUserID(_CommitterUserID.String)\n\t}\n\tif _Ordinal.Valid {\n\t\tt.SetOrdinal(int32(_Ordinal.Int64))\n\t}\n\tif _CustomerID.Valid {\n\t\tt.SetCustomerID(_CustomerID.String)\n\t}\n\tif _RefType.Valid {\n\t\tt.SetRefType(_RefType.String)\n\t}\n\tif _RefID.Valid {\n\t\tt.SetRefID(_RefID.String)\n\t}\n\tif _Metadata.Valid {\n\t\tt.SetMetadata(_Metadata.String)\n\t}\n\treturn true, nil\n}",
"func findID(root *Container, id string) (*Container, error) {\n\tif id == \"\" {\n\t\treturn nil, errors.New(\"the container ID must not be empty\")\n\t}\n\n\tvar (\n\t\terrStr string\n\t\tcont *Container\n\t)\n\tpreOrder(root, &errStr, visitFunc(func(c *Container) error {\n\t\tif c.opts.id == id {\n\t\t\tcont = c\n\t\t}\n\t\treturn nil\n\t}))\n\tif cont == nil {\n\t\treturn nil, fmt.Errorf(\"cannot find container with ID %q\", id)\n\t}\n\treturn cont, nil\n}",
"func (r *SecretsResource) FindById(id string) (interface{}, error) {\n\treturn NewSecretResource(r.secrets, id, r.logger), nil\n}",
"func (o *AssetRevision) AssetByFk(exec boil.Executor, mods ...qm.QueryMod) assetQuery {\n\tqueryMods := []qm.QueryMod{\n\t\tqm.Where(\"id=?\", o.Asset),\n\t}\n\n\tqueryMods = append(queryMods, mods...)\n\n\tquery := Assets(exec, queryMods...)\n\tqueries.SetFrom(query.Query, \"\\\"asset\\\"\")\n\n\treturn query\n}",
"func (s *SmartContract) ReadAsset(ctx contractapi.TransactionContextInterface, assetID string) (*Asset, error) {\n\n\tlog.Printf(\"ReadAsset: collection %v, ID %v\", assetCollection, assetID)\n\tassetJSON, err := ctx.GetStub().GetPrivateData(assetCollection, assetID) //get the asset from chaincode state\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to read asset: %v\", err)\n\t}\tgithub.com/2cluster/cc-asset-loan v0.0.0-20210212153857-9c1e67367604\n\n\t//No Asset found, return empty response\n\tif assetJSON == nil {\n\t\tlog.Printf(\"%v does not exist in collection %v\", assetID, assetCollection)\n\t\treturn nil, nil\n\t}\n\n\tvar asset *Asset\n\terr = json.Unmarshal(assetJSON, &asset)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to unmarshal JSON: %v\", err)\n\t}\n\n\treturn asset, nil\n\n}",
"func (reg *defaultRegistry) GetRevision(gen runtime.Generation) (*engine.Revision, error) {\n\t// todo thing about replacing hardcoded key with some flag in Info that will show that there is a single object of that kind\n\tvar revision *engine.Revision\n\terr := reg.store.Find(engine.TypeRevision.Kind, &revision, store.WithKey(engine.RevisionKey), store.WithGen(gen))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif revision == nil {\n\t\treturn nil, nil\n\t}\n\n\treturn revision, nil\n}",
"func (a *ApiV2) GetAsset(id string) (asset Asset, err error) {\n\tvar resp AssetResponse\n\tif !common.ValidUUID(id) {\n\t\treturn asset, common.NewError(\"asset id '%s' is invalid\", id)\n\t}\n\tuuid := common.ConvertToUUIDFormat(id)\n\turl := a.getBaseUrl() + \"/assets/\" + uuid\n\treq, err := a.makeRequest(\"GET\", url, nil)\n\tif err != nil {\n\t\treturn asset, err\n\t}\n\terr = handleReq(a, req, &resp)\n\tif err != nil {\n\t\treturn asset, err\n\t}\n\tasset = *resp.Asset\n\t// now get the video\n\tvideo, err := a.GetVideo(asset.VideoId)\n\tif err != nil {\n\t\treturn asset, err\n\t}\n\tasset.Video = video\n\tasset.Api = *a\n\treturn asset, nil\n}",
"func (client ContainerAppsRevisionsClient) GetRevisionResponder(resp *http.Response) (result Revision, err error) {\n\terr = autorest.Respond(\n\t\tresp,\n\t\tazure.WithErrorUnlessStatusCode(http.StatusOK),\n\t\tautorest.ByUnmarshallingJSON(&result),\n\t\tautorest.ByClosing())\n\tresult.Response = autorest.Response{Response: resp}\n\treturn\n}",
"func (this *activitiesStruct) Revision() uint64 {\n\tthis.mutex.RLock()\n\trev := this.revision\n\tthis.mutex.RUnlock()\n\treturn rev\n}",
"func (c *Client) FindCrmStageId(criteria *Criteria, options *Options) (int64, error) {\n\tids, err := c.Search(CrmStageModel, criteria, options)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\tif len(ids) > 0 {\n\t\treturn ids[0], nil\n\t}\n\treturn -1, fmt.Errorf(\"crm.stage was not found with criteria %v and options %v\", criteria, options)\n}",
"func (mock *MockRepository) FindOne(CPF string) (entities.Account, error) {\n\targs := mock.Called()\n\tresult := args.Get(0)\n\treturn result.(entities.Account), args.Error(1)\n}"
] |
[
"0.73260933",
"0.61335665",
"0.5695194",
"0.55650127",
"0.53935397",
"0.53679496",
"0.53187263",
"0.5289223",
"0.5273037",
"0.5193795",
"0.5086327",
"0.5047664",
"0.50312316",
"0.50202703",
"0.49523586",
"0.4898542",
"0.4892489",
"0.48851955",
"0.48731026",
"0.48731026",
"0.4872194",
"0.48537144",
"0.4802844",
"0.47962013",
"0.47215232",
"0.47115004",
"0.46668345",
"0.4660087",
"0.46486968",
"0.46388066",
"0.4628297",
"0.4603172",
"0.4599887",
"0.45896164",
"0.45696977",
"0.45686263",
"0.45427966",
"0.4539575",
"0.45338777",
"0.45241946",
"0.45125344",
"0.45058584",
"0.4490237",
"0.44649488",
"0.44649488",
"0.44607273",
"0.4456199",
"0.44546813",
"0.44491178",
"0.4440743",
"0.44113824",
"0.4411133",
"0.44072804",
"0.440549",
"0.43965515",
"0.4396296",
"0.43810654",
"0.43798766",
"0.43796736",
"0.4378599",
"0.4373705",
"0.43639112",
"0.43597794",
"0.4358933",
"0.43520516",
"0.4341953",
"0.43289202",
"0.4327041",
"0.4303742",
"0.43029097",
"0.43025774",
"0.4301705",
"0.43001762",
"0.42988664",
"0.42873392",
"0.4280322",
"0.42696872",
"0.4264843",
"0.42599705",
"0.42582262",
"0.42542127",
"0.42532945",
"0.42514595",
"0.42486155",
"0.4244448",
"0.42434132",
"0.42353797",
"0.4229167",
"0.42274278",
"0.42268303",
"0.42242154",
"0.4221683",
"0.4221389",
"0.42208028",
"0.42206252",
"0.42200086",
"0.4214276",
"0.42141667",
"0.42131057",
"0.42112878"
] |
0.7581562
|
0
|
InsertG a single record. See Insert for whitelist behavior description.
|
func (o *AssetRevision) InsertG(whitelist ...string) error {
return o.Insert(boil.GetDB(), whitelist...)
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (o *RecordMeasure) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *Source) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *InstrumentClass) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *Store) InsertG(ctx context.Context, columns boil.Columns) error {\n\treturn o.Insert(ctx, boil.GetContextDB(), columns)\n}",
"func (o *Rental) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (s *DbRecorder) Insert() error {\n\tswitch s.flavor {\n\tcase \"postgres\":\n\t\treturn s.insertPg()\n\tdefault:\n\t\treturn s.insertStd()\n\t}\n}",
"func (o *Transaction) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *Transaction) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *FeatureCvtermDbxref) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *Rental) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Picture) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *Jet) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *BraceletPhoto) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *Author) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *Item) InsertG(ctx context.Context, columns boil.Columns) error {\n\treturn o.Insert(ctx, boil.GetContextDB(), columns)\n}",
"func (o *Offer) InsertG(columns boil.Columns) error {\n\treturn o.Insert(boil.GetDB(), columns)\n}",
"func (o *RSSAnnouncement) InsertG(ctx context.Context, columns boil.Columns) error {\n\treturn o.Insert(ctx, boil.GetContextDB(), columns)\n}",
"func (o *Asset) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *AutomodRuleDatum) InsertG(ctx context.Context, columns boil.Columns) error {\n\treturn o.Insert(ctx, boil.GetContextDB(), columns)\n}",
"func (o *Address) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *Stock) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *InstrumentClass) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Transaction) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Transaction) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *StockCvterm) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *FeatureRelationship) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *Comment) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *BlackCard) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (g *GameDBModel) Insert(game Game) error {\n\tgame.ID = bson.NewObjectId()\n\terr := database.C(COLLECTION).Insert(&game)\n\n\treturn err\n}",
"func (o *APIKey) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *Ticket) InsertG(ctx context.Context, columns boil.Columns) error {\n\treturn o.Insert(ctx, boil.GetContextDB(), columns)\n}",
"func (o *Author) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Cvtermsynonym) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *RecordMeasure) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Source) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *DMessageEmbed) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *Phenotypeprop) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *Skin) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (m *DBMem) Insert(data Person) {\n m.Lock()\n defer m.Unlock()\n\n\tid := len(m.data)\n m.data[id] = data\n m.history.Append(\"INSERT\", id, data)\n}",
"func (o *ItemSide) InsertG(ctx context.Context, columns boil.Columns) error {\n\treturn o.Insert(ctx, boil.GetContextDB(), columns)\n}",
"func (d *Database) Insert(db DB, table string, src interface{}) error {\n\treturn d.InsertContext(context.Background(), db, table, src)\n}",
"func (o *Inventory) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *Vote) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *RentalRower) InsertG(columns boil.Columns) error {\n\treturn o.Insert(boil.GetDB(), columns)\n}",
"func (o *Storestate) InsertG(columns boil.Columns) error {\n\treturn o.Insert(boil.GetDB(), columns)\n}",
"func (o *Auth) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *Stock) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Failure) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *Jet) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Shelf) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *Organism) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (data *SimpleDbType) Insert(dbMgr *mgr.DBConn) error {\n\tdb := dbMgr.Open()\n\n\tsqlStatement := `INSERT INTO test_table (\"name\", \"number\") VALUES ($1, $2) RETURNING id`\n\tid := 0\n\terr := db.QueryRow(sqlStatement, data.Name, data.Number).Scan(&id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Println(\"New record ID is:\", id)\n\tdbMgr.Close()\n\treturn err\n}",
"func (o *ClaimInList) InsertG(columns boil.Columns) error {\n\treturn o.Insert(boil.GetDB(), columns)\n}",
"func Insert(db DB, table string, src interface{}) error {\n\treturn InsertContext(context.Background(), db, table, src)\n}",
"func (o *FeatureCvtermDbxref) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *PremiumCode) InsertG(ctx context.Context, columns boil.Columns) error {\n\treturn o.Insert(ctx, boil.GetContextDB(), columns)\n}",
"func (o *StockCvterm) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AssetRevision) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (r *Entity) Insert() (result sql.Result, err error) {\n\treturn Model.Data(r).Insert()\n}",
"func (r *Entity) Insert() (result sql.Result, err error) {\n\treturn Model.Data(r).Insert()\n}",
"func (r *Entity) Insert() (result sql.Result, err error) {\n\treturn Model.Data(r).Insert()\n}",
"func (r *Entity) Insert() (result sql.Result, err error) {\n\treturn Model.Data(r).Insert()\n}",
"func (r *Entity) Insert() (result sql.Result, err error) {\n\treturn Model.Data(r).Insert()\n}",
"func (r *Entity) Insert() (result sql.Result, err error) {\n\treturn Model.Data(r).Insert()\n}",
"func (o *RowerGroup) InsertG(columns boil.Columns) error {\n\treturn o.Insert(boil.GetDB(), columns)\n}",
"func (Model) Insert(model interface{}) {\n\tdb.Insert(model)\n}",
"func (o *Tenant) InsertG(ctx context.Context, columns boil.Columns) error {\n\treturn o.Insert(ctx, boil.GetContextDB(), columns)\n}",
"func (o *Comment) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Picture) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Asset) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *DMessageEmbed) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Shelf) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Vote) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *BraceletPhoto) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Skin) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AuthMessage) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (table *Table) Insert(db DB, record Map) (Result, error) {\n\tc := Context{StateInsert, db, table, table, record, Field{}}\n\treturn table.execAction(c, table.OnInsert, table.DefaultInsert)\n}",
"func (o *PremiumSlot) InsertG(ctx context.Context, columns boil.Columns) error {\n\treturn o.Insert(ctx, boil.GetContextDB(), columns)\n}",
"func (o *FeatureRelationship) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *BlackCard) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Failure) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (pg *PGStorage) Insert(a *Address) error {\n\tvar err error\n\terr = pg.con.QueryRow(`\n\t\tINSERT INTO address(hash, income, outcome, ballance)\n\t\tvalues($1, $2, $3, $4)\n\t\tRETURNING ID`,\n\t\ta.Hash,\n\t\ta.Income,\n\t\ta.Outcome,\n\t\ta.Ballance).Scan(\n\t\t&a.ID)\n\treturn err\n}",
"func (o *Inventory) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *ClaimInList) InsertGP(columns boil.Columns) {\n\tif err := o.Insert(boil.GetDB(), columns); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AuthUser) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *UsernameListing) InsertG(ctx context.Context, columns boil.Columns) error {\n\treturn o.Insert(ctx, boil.GetContextDB(), columns)\n}",
"func (o *APIKey) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Cvtermsynonym) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Address) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AuthToken) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (o *Auth) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (r *Repository) Insert(ctx context.Context, registrant Registrant) error {\n\ttx := r.db.Begin()\n\n\tdefer func() {\n\t\tif r := recover(); r != nil {\n\t\t\ttx.Rollback()\n\t\t}\n\t}()\n\n\tif err := tx.Error; err != nil {\n\t\treturn err\n\t}\n\n\tif err := tx.Create(®istrant).Error; err != nil {\n\t\ttx.Rollback()\n\t\treturn err\n\t}\n\n\treturn tx.Commit().Error\n}",
"func (o *Tenant) InsertGP(ctx context.Context, columns boil.Columns) {\n\tif err := o.Insert(ctx, boil.GetContextDB(), columns); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func Insert(newRecord modelResource.Resource) (newID int){\n\treturn\n}",
"func (r *repository) Insert(rec *Record) (int, error) {\n\tq := \"INSERT INTO records (name) VALUES ($1) RETURNING id;\"\n\n\tvar id int\n\tif err := r.db.QueryRow(q, rec.name).Scan(&id); err != nil {\n\t\treturn -1, err\n\t}\n\n\treturn id, nil\n}",
"func (o *Notification) InsertG(columns boil.Columns) error {\n\treturn o.Insert(boil.GetDB(), columns)\n}",
"func (o *Organism) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func Insert(db DB, table string, src interface{}) error {\n\treturn Default.Insert(db, table, src)\n}",
"func (ds *KVStorage) Insert(ID string, g graph.Graph) {\n\tds.data[ID] = g\n}",
"func (c Client) Insert(entity interface{}, ptrResult interface{}) error {\n\treturn c.InsertInto(entity, ptrResult, reflect.TypeOf(entity).Name())\n}"
] |
[
"0.7054271",
"0.7004666",
"0.7003267",
"0.6972064",
"0.69443685",
"0.6933764",
"0.69326764",
"0.69326764",
"0.68925273",
"0.6886902",
"0.68856514",
"0.68819577",
"0.68799645",
"0.6872548",
"0.6852752",
"0.68405366",
"0.6839644",
"0.680611",
"0.6797232",
"0.6788752",
"0.6777081",
"0.6768955",
"0.67667437",
"0.67667437",
"0.6759455",
"0.6752772",
"0.6748672",
"0.6738653",
"0.67331445",
"0.6720044",
"0.6716632",
"0.6716139",
"0.6709989",
"0.6702396",
"0.6698747",
"0.66889626",
"0.66781723",
"0.6673044",
"0.66635317",
"0.6653481",
"0.6652733",
"0.66520596",
"0.66393256",
"0.66285",
"0.66257197",
"0.6618459",
"0.6609364",
"0.6608346",
"0.66058964",
"0.660388",
"0.65993375",
"0.657984",
"0.6578251",
"0.6560347",
"0.65559506",
"0.6542841",
"0.65405464",
"0.6537124",
"0.6526692",
"0.6526692",
"0.6526692",
"0.6526692",
"0.6526692",
"0.6526692",
"0.6525068",
"0.6524534",
"0.6523461",
"0.6523126",
"0.652116",
"0.6520869",
"0.651652",
"0.65123516",
"0.6502849",
"0.6501803",
"0.6498936",
"0.64962786",
"0.6494747",
"0.6493767",
"0.64935124",
"0.64917624",
"0.6490715",
"0.6484453",
"0.64646524",
"0.64613",
"0.6457518",
"0.6454746",
"0.6453346",
"0.6448701",
"0.64486694",
"0.64349866",
"0.6426667",
"0.6426025",
"0.6421211",
"0.64148325",
"0.64110816",
"0.64027464",
"0.6382339",
"0.63655573",
"0.6335894",
"0.63345355"
] |
0.673237
|
29
|
InsertGP a single record, and panics on error. See Insert for whitelist behavior description.
|
func (o *AssetRevision) InsertGP(whitelist ...string) {
if err := o.Insert(boil.GetDB(), whitelist...); err != nil {
panic(boil.WrapErr(err))
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"func (o *Failure) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Transaction) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Transaction) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Rental) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *InstrumentClass) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Source) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Jet) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Address) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Picture) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *APIKey) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *StockCvterm) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Stock) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *RecordMeasure) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *FeatureCvtermDbxref) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Auth) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Comment) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Cvtermsynonym) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Vote) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Author) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *BraceletPhoto) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Inventory) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *BlackCard) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *DMessageEmbed) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Asset) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AuthMessage) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Shelf) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AuthUser) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Tenant) InsertGP(ctx context.Context, columns boil.Columns) {\n\tif err := o.Insert(ctx, boil.GetContextDB(), columns); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Organism) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Skin) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AuthToken) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (s *DbRecorder) Insert() error {\n\tswitch s.flavor {\n\tcase \"postgres\":\n\t\treturn s.insertPg()\n\tdefault:\n\t\treturn s.insertStd()\n\t}\n}",
"func (o *Phenotypeprop) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *AuthUserUserPermission) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *ClaimInList) InsertGP(columns boil.Columns) {\n\tif err := o.Insert(boil.GetDB(), columns); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (r *Repository) Insert(ctx context.Context, registrant Registrant) error {\n\ttx := r.db.Begin()\n\n\tdefer func() {\n\t\tif r := recover(); r != nil {\n\t\t\ttx.Rollback()\n\t\t}\n\t}()\n\n\tif err := tx.Error; err != nil {\n\t\treturn err\n\t}\n\n\tif err := tx.Create(®istrant).Error; err != nil {\n\t\ttx.Rollback()\n\t\treturn err\n\t}\n\n\treturn tx.Commit().Error\n}",
"func (o *FeatureRelationship) InsertGP(whitelist ...string) {\n\tif err := o.Insert(boil.GetDB(), whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (instance *TopicTypeRepoImpl) Insert(data *entities.TopicType) (err error) {\n\tpanic(\"implement me\")\n}",
"func (p *Patch) Insert() error {\n\treturn db.Insert(Collection, p)\n}",
"func (p *Patch) Insert() error {\n\treturn db.Insert(Collection, p)\n}",
"func (pg *PGStorage) Insert(a *Address) error {\n\tvar err error\n\terr = pg.con.QueryRow(`\n\t\tINSERT INTO address(hash, income, outcome, ballance)\n\t\tvalues($1, $2, $3, $4)\n\t\tRETURNING ID`,\n\t\ta.Hash,\n\t\ta.Income,\n\t\ta.Outcome,\n\t\ta.Ballance).Scan(\n\t\t&a.ID)\n\treturn err\n}",
"func (p *ProviderDAO) Insert(provider models.Provider) error {\n\terr := db.C(COLLECTION).Insert(&provider)\n\treturn err\n}",
"func (s *PetStore) Insert(record *Pet) error {\n\treturn s.Store.Insert(Schema.Pet.BaseSchema, record)\n}",
"func (d *Database) Insert(db DB, table string, src interface{}) error {\n\treturn d.InsertContext(context.Background(), db, table, src)\n}",
"func (p *Project) Insert(session *xorm.Session) (int, error) {\n\taffected, err := session.Insert(p)\n\tif err != nil {\n\t\tfmt.Println(err)\n\t\treturn 0, err\n\t}\n\treturn int(affected), nil\n}",
"func (sq *SQ3Driver) Insert(key string, obj *DBObj, force bool) error {\n\t// For now, just insert the key (and make sure the key matches the obj.Key\n\tif key != obj.Key {\n\t\treturn fmt.Errorf(\"Error: key does not match obj.key:\\n key: %v\\nobj.Key:%v\", key, obj.Key)\n\t}\n\n\t// If force is NOT set, check for a duplicate\n\tfound, err := sq.queryExists(fmt.Sprintf(\"SELECT key FROM %v WHERE key=$1\", dbTable), key)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\taction := \"INSERT\"\n\n\t// If we have one, either error out, or delete\n\tif found {\n\t\tif force {\n\t\t\t// We could also update, but, I'm lazy\n\t\t\terr = sq.Delete(key)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\taction = \"UPDATE\"\n\t\t} else {\n\t\t\treturn fmt.Errorf(\"Error: can not insert: item already exists\")\n\t\t}\n\t}\n\n\t// And, do our insert\n\t_, err = sq.DB.Exec(fmt.Sprintf(\"INSERT INTO %v(key, lc_key) VALUES (?, ?)\", dbTable), key, strings.ToLower(key))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfmt.Printf(\"%v: %v\\n\", action, key)\n\treturn nil\n}",
"func (dao *PlayerDAO) Insert(player models.Player) error {\n\tctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)\n\tdefer cancel()\n\t_, err := db.Collection(PCOLLECTION).InsertOne(ctx, bson.D{\n\t\t{\"firstname\", player.FirstName},\n\t\t{\"lastname\", player.LastName},\n\t\t{\"nickname\", player.NickName},\n\t\t{\"skilllevel\", player.SkillLevel},\n\t})\n\treturn err\n}",
"func (f *FakeClient) Insert(p *purchase.Purchase) error {\n\treturn nil\n}",
"func (table *Table) Insert(db DB, record Map) (Result, error) {\n\tc := Context{StateInsert, db, table, table, record, Field{}}\n\treturn table.execAction(c, table.OnInsert, table.DefaultInsert)\n}",
"func (o *Failure) InsertP(exec boil.Executor, whitelist ...string) {\n\tif err := o.Insert(exec, whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (p *Personal) Insert(ctx context.Context, document *PersonalData) (interface{}, error) {\n\ti, err := p.DB.Insert(ctx, document)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"could not insert personal data\")\n\t}\n\treturn i, nil\n}",
"func (ps *PlayerStore) Insert(ctx context.Context, player store.Player) (*store.Player, error) {\n\tquery := `\n INSERT INTO players(roster_id,first_name,last_name,alias,status)\n VALUES($1,$2,$3,$4,$5)\n RETURNING *\n `\n\tdb := ps.db.GetDB()\n\tctx, cancel := ps.db.RequestContext(ctx)\n\tdefer cancel()\n\n\tvar p store.Player\n\terr := db.QueryRowContext(ctx, query,\n\t\tplayer.RosterID,\n\t\tplayer.FirstName,\n\t\tplayer.LastName,\n\t\tplayer.Alias,\n\t\tplayer.Status).\n\t\tScan(\n\t\t\t&p.PlayerID,\n\t\t\t&p.RosterID,\n\t\t\t&p.FirstName,\n\t\t\t&p.LastName,\n\t\t\t&p.Alias,\n\t\t\t&p.Status)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &p, nil\n}",
"func (Model) Insert(model interface{}) {\n\tdb.Insert(model)\n}",
"func (o *Failure) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (i *Batch) Insert(data TaskArgs) (err error) {\n\tif i.isRun {\n\t\ti.insertChan <- data\n\t} else {\n\t\terr = errors.New(\"failed to insert, batch already stopped\")\n\t}\n\treturn\n}",
"func (m *DBMem) Insert(data Person) {\n m.Lock()\n defer m.Unlock()\n\n\tid := len(m.data)\n m.data[id] = data\n m.history.Append(\"INSERT\", id, data)\n}",
"func (g *GameDBModel) Insert(game Game) error {\n\tgame.ID = bson.NewObjectId()\n\terr := database.C(COLLECTION).Insert(&game)\n\n\treturn err\n}",
"func Insert(db DB, table string, src interface{}) error {\n\treturn InsertContext(context.Background(), db, table, src)\n}",
"func Insert(newRecord modelResource.Resource) (newID int){\n\treturn\n}",
"func (data *SimpleDbType) Insert(dbMgr *mgr.DBConn) error {\n\tdb := dbMgr.Open()\n\n\tsqlStatement := `INSERT INTO test_table (\"name\", \"number\") VALUES ($1, $2) RETURNING id`\n\tid := 0\n\terr := db.QueryRow(sqlStatement, data.Name, data.Number).Scan(&id)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Println(\"New record ID is:\", id)\n\tdbMgr.Close()\n\treturn err\n}",
"func (r *repository) Insert(rec *Record) (int, error) {\n\tq := \"INSERT INTO records (name) VALUES ($1) RETURNING id;\"\n\n\tvar id int\n\tif err := r.db.QueryRow(q, rec.name).Scan(&id); err != nil {\n\t\treturn -1, err\n\t}\n\n\treturn id, nil\n}",
"func (ds *DjangoSession) Insert(ctx context.Context, db DB) error {\n\tswitch {\n\tcase ds._exists: // already exists\n\t\treturn logerror(&ErrInsertFailed{ErrAlreadyExists})\n\tcase ds._deleted: // deleted\n\t\treturn logerror(&ErrInsertFailed{ErrMarkedForDeletion})\n\t}\n\t// insert (manual)\n\tconst sqlstr = `INSERT INTO django.django_session (` +\n\t\t`session_key, session_data, expire_date` +\n\t\t`) VALUES (` +\n\t\t`:1, :2, :3` +\n\t\t`)`\n\t// run\n\tlogf(sqlstr, ds.SessionKey, ds.SessionData, ds.ExpireDate)\n\tif _, err := db.ExecContext(ctx, sqlstr, ds.SessionKey, ds.SessionData, ds.ExpireDate); err != nil {\n\t\treturn logerror(err)\n\t}\n\t// set exists\n\tds._exists = true\n\treturn nil\n}",
"func (o *Transaction) InsertP(exec boil.Executor, whitelist ...string) {\n\tif err := o.Insert(exec, whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (o *Transaction) InsertP(exec boil.Executor, whitelist ...string) {\n\tif err := o.Insert(exec, whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (l *GeoLoc) Insert() error {\n\t// Get db instance\n\tdb, err := dstore.NewDB()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error retrieving DB instance: %s\",\n\t\t\terr.Error())\n\t}\n\n\t// Insert\n\tvar row *sql.Row\n\n\t// Check if GeoLoc has been parsed\n\tif l.Located {\n\t\t// Check accuracy value\n\t\tif l.Accuracy == AccuracyErr {\n\t\t\treturn fmt.Errorf(\"invalid accuracy value: %s\",\n\t\t\t\tl.Accuracy)\n\t\t}\n\n\t\t// If so, save all fields\n\t\trow = db.QueryRow(\"INSERT INTO geo_locs (located, gapi_success\"+\n\t\t\t\", lat, long, postal_addr, accuracy, bounds_provided, \"+\n\t\t\t\"bounds_id, viewport_bounds_id, gapi_place_id, raw) \"+\n\t\t\t\"VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) \"+\n\t\t\t\"RETURNING id\",\n\t\t\tl.Located, l.GAPISuccess, l.Lat, l.Long, l.PostalAddr,\n\t\t\tl.Accuracy, l.BoundsProvided, l.BoundsID,\n\t\t\tl.ViewportBoundsID, l.GAPIPlaceID, l.Raw)\n\t} else {\n\t\t// If not, only save a couple, and leave rest null\n\t\trow = db.QueryRow(\"INSERT INTO geo_locs (located, raw) VALUES\"+\n\t\t\t\" ($1, $2) RETURNING id\",\n\t\t\tl.Located, l.Raw)\n\t}\n\n\t// Get inserted row ID\n\terr = row.Scan(&l.ID)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error inserting row, Located: %t, err: %s\",\n\t\t\tl.Located, err.Error())\n\t}\n\n\treturn nil\n}",
"func (c Client) Insert(entity interface{}, ptrResult interface{}) error {\n\treturn c.InsertInto(entity, ptrResult, reflect.TypeOf(entity).Name())\n}",
"func (o *Picture) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}",
"func (q *Queue) insert(entities interface{}, mutex *sync.Mutex) *gorm.DB {\n\tmutex.Lock()\n\tres := q.db.Clauses(clause.OnConflict{DoNothing: true}).Create(entities)\n\tmutex.Unlock()\n\n\treturn res\n}",
"func (mr *MockSessionRepMockRecorder) Insert(arg0 interface{}) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"Insert\", reflect.TypeOf((*MockSessionRep)(nil).Insert), arg0)\n}",
"func (d *Database) Insert(db DB, table string, src interface{}) error {\n\tpkName, pkValue, err := d.PrimaryKey(src)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif pkName != \"\" && pkValue != 0 {\n\t\treturn fmt.Errorf(\"meddler.Insert: primary key must be zero\")\n\t}\n\n\t// gather the query parts\n\tnamesPart, err := d.ColumnsQuoted(src, false)\n\tif err != nil {\n\t\treturn err\n\t}\n\tvaluesPart, err := d.PlaceholdersString(src, false)\n\tif err != nil {\n\t\treturn err\n\t}\n\tvalues, err := d.Values(src, false)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// run the query\n\tq := fmt.Sprintf(\"INSERT INTO %s (%s) VALUES (%s)\", d.quoted(table), namesPart, valuesPart)\n\tif d.UseReturningToGetID && pkName != \"\" {\n\t\tq += \" RETURNING \" + d.quoted(pkName)\n\t\tvar newPk int64\n\t\terr := db.QueryRow(q, values...).Scan(&newPk)\n\t\tif err != nil {\n\t\t\treturn &dbErr{msg: \"meddler.Insert: DB error in QueryRow\", err: err}\n\t\t}\n\t\tif err = d.SetPrimaryKey(src, newPk); err != nil {\n\t\t\treturn fmt.Errorf(\"meddler.Insert: Error saving updated pk: %v\", err)\n\t\t}\n\t} else if pkName != \"\" {\n\t\tresult, err := db.Exec(q, values...)\n\t\tif err != nil {\n\t\t\treturn &dbErr{msg: \"meddler.Insert: DB error in Exec\", err: err}\n\t\t}\n\n\t\t// save the new primary key\n\t\tnewPk, err := result.LastInsertId()\n\t\tif err != nil {\n\t\t\treturn &dbErr{msg: \"meddler.Insert: DB error getting new primary key value\", err: err}\n\t\t}\n\t\tif err = d.SetPrimaryKey(src, newPk); err != nil {\n\t\t\treturn fmt.Errorf(\"meddler.Insert: Error saving updated pk: %v\", err)\n\t\t}\n\t} else {\n\t\t// no primary key, so no need to lookup new value\n\t\t_, err := db.Exec(q, values...)\n\t\tif err != nil {\n\t\t\treturn &dbErr{msg: \"meddler.Insert: DB error in Exec\", err: err}\n\t\t}\n\t}\n\n\treturn nil\n}",
"func (r *Entity) Insert() (result sql.Result, err error) {\n\treturn Model.Data(r).Insert()\n}",
"func (r *Entity) Insert() (result sql.Result, err error) {\n\treturn Model.Data(r).Insert()\n}",
"func (r *Entity) Insert() (result sql.Result, err error) {\n\treturn Model.Data(r).Insert()\n}",
"func (r *Entity) Insert() (result sql.Result, err error) {\n\treturn Model.Data(r).Insert()\n}",
"func (r *Entity) Insert() (result sql.Result, err error) {\n\treturn Model.Data(r).Insert()\n}",
"func (r *Entity) Insert() (result sql.Result, err error) {\n\treturn Model.Data(r).Insert()\n}",
"func (o *FeatureCvtermDbxref) InsertP(exec boil.Executor, whitelist ...string) {\n\tif err := o.Insert(exec, whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (s *InstanceBindData) Insert(ibd *internal.InstanceBindData) error {\n\tif ibd == nil {\n\t\treturn errors.New(\"entity may not be nil\")\n\t}\n\n\tif ibd.InstanceID.IsZero() {\n\t\treturn errors.New(\"instance id must be set\")\n\t}\n\n\topKey := s.key(ibd.InstanceID)\n\n\trespGet, err := s.kv.Get(context.TODO(), opKey)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"while calling database on get\")\n\t}\n\tif respGet.Count > 0 {\n\t\treturn alreadyExistsError{}\n\t}\n\n\tdso, err := s.encodeDMToDSO(ibd)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif _, err := s.kv.Put(context.TODO(), opKey, dso); err != nil {\n\t\treturn errors.Wrap(err, \"while calling database on put\")\n\t}\n\n\treturn nil\n}",
"func (db *DB) Insert(model ...interface{}) error {\n\treturn db.inner.Insert(model...)\n}",
"func (r Item) Insert() error {\n\tr.ID = bson.NewObjectId()\n\terr := db.C(\"item\").Insert(&r)\n\treturn err\n}",
"func (repository *RecordCommandRepositoryCircuitBreaker) InsertRecord(data repositoryTypes.CreateRecord) (entity.Record, error) {\n\toutput := make(chan entity.Record, 1)\n\thystrix.ConfigureCommand(\"insert_record\", config.Settings())\n\terrors := hystrix.Go(\"insert_record\", func() error {\n\t\trecord, err := repository.RecordCommandRepositoryInterface.InsertRecord(data)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\toutput <- record\n\t\treturn nil\n\t}, nil)\n\n\tselect {\n\tcase out := <-output:\n\t\treturn out, nil\n\tcase err := <-errors:\n\t\treturn entity.Record{}, err\n\t}\n}",
"func (m *SnippetModel) Insert(title, content, expires string) (int, error) {\n\t// Create the SQL statement we want to execute. It's split over several lines\n\t// for readability - so it's surrounded by backquotes instead of normal double quotes\n\tstmt := `INSERT INTO snippets (title, content, created, expires)\n\tvalues (?, ?, UTC_TIMESTAMP(), DATE_ADD(UTC_TIMESTAMP, INTERVAL ? DAY))`\n\n\t// Use the Exec() method on the embedded connection pool to execute the statement.\n\t// The first parameter is the SQL statement followed by the table fields.\n\t// The method returns a sql.Result object which contains some basic information\n\t// about what happened when the statement was executed\n\tresult, err := m.DB.Exec(stmt, title, content, expires)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\t// Use the LastInsertId() method on the result object to get the ID of our\n\t// newly inserted record in the snippets table.\n\tid, err := result.LastInsertId()\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\t// The ID returned has the type int64 so we convert it to an int type before returning\n\treturn int(id), nil\n}",
"func (m *PersonDAO) Insert(person Person) error {\n\terr := db.C(COLLECTION).Insert(&person)\n\treturn err\n}",
"func (m MariaDB) Insert(ctx context.Context, document entity.PersonalData) (entity.PersonalData, error) {\n\tp := receive(document)\n\tsqlQuery := \"INSERT INTO person (id, name, last_name, phone, email, year_od_birth ) VALUES (?,?,?,?,?,?)\"\n\t_, err := m.Person.ExecContext(ctx, sqlQuery, p.ID, p.Name, p.LastName, p.Phone, p.Email, p.YearOfBirth)\n\tif err != nil {\n\t\treturn entity.PersonalData{}, errors.Wrap(err, \"could not exec query statement\")\n\t}\n\treturn document, nil\n}",
"func (s *PersonStore) Insert(record *Person) error {\n\trecords := s.relationshipRecords(record)\n\n\tif len(records) > 0 {\n\t\treturn s.Store.Transaction(func(s *kallax.Store) error {\n\t\t\tif err := s.Insert(Schema.Person.BaseSchema, record); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tfor _, r := range records {\n\t\t\t\tif err := kallax.ApplyBeforeEvents(r.Record); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tpersisted := r.Record.IsPersisted()\n\n\t\t\t\tif _, err := s.Save(r.Schema, r.Record); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\tif err := kallax.ApplyAfterEvents(r.Record, persisted); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn nil\n\t\t})\n\t}\n\n\treturn s.Store.Insert(Schema.Person.BaseSchema, record)\n}",
"func (conn *Connection) Insert(doc interface{}) error {\n\treturn conn.collection.Insert(doc)\n}",
"func (s *SnippetStore) Insert(title, content string, expires int) (int, error) {\n\treturn 2, nil\n}",
"func (ag *AuthGroup) Insert(db XODB) error {\n\tvar err error\n\n\t// if already exist, bail\n\tif ag._exists {\n\t\treturn errors.New(\"insert failed: already exists\")\n\t}\n\n\t// sql query\n\tconst sqlstr = `INSERT INTO django.auth_group (` +\n\t\t`name` +\n\t\t`) VALUES (` +\n\t\t`:1` +\n\t\t`) RETURNING id /*lastInsertId*/ INTO :pk`\n\n\t// run query\n\tXOLog(sqlstr, ag.Name, nil)\n\tres, err := db.Exec(sqlstr, ag.Name, nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// retrieve id\n\tid, err := res.LastInsertId()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// set primary key and existence\n\tag.ID = float64(id)\n\tag._exists = true\n\n\treturn nil\n}",
"func Insert(db gorp.SqlExecutor, i interface{}) error {\n\treturn Mapper.Insert(db, i)\n}",
"func (sks *SQLSKUStore) Insert(s *model.SKU) (*model.SKU, error) {\n\ts.SKUID = uuid.NewV4().String()\n\ts.CreatedAt = time.Now().UnixNano()\n\ts.UpdatedAt = s.CreatedAt\n\terr := sks.SQLStore.Tx.Insert(s)\n\tif err != nil {\n\t\terr = fmt.Errorf(\"[SQLKUStore] error in calling Insert: %v\", err)\n\t}\n\n\treturn s, err\n}",
"func (b *Build) Insert() error {\n\treturn db.Insert(Collection, b)\n}",
"func (c *Conn) Insert(ctx context.Context, i Item) (err error) {\n\t_, err = c.db.Exec(ctx, \"INSERT INTO jobs (url) VALUES ($1)\", i.URL)\n\treturn\n}",
"func Insert(db *mongo.Client, r Record) (Record, error) {\n\tctx, _ := context.WithTimeout(context.Background(), 3*time.Second)\n\tres, err := db.Database(\"url-shortener\").Collection(\"urls\").InsertOne(ctx, r)\n\t\n\tif err != nil {\n\t\treturn Record{}, err\n\t}\n\tlog.Printf(\"New record created with the ID: %s\", res.InsertedID)\n\treturn r, nil\n}",
"func (m *SnippetModel) Insert(title, content, expires string) (int, error) {\n\t// Start a transaction\n\t// Each action that is done is atomic in nature:\n\t// All statements are executed successfully or no statement is executed\n\ttx, err := m.DB.Begin()\n\tif err != nil {\n\t\treturn 0, nil\n\t}\n\n\t// Statement to insert data to the database\n\tstmt := `INSERT INTO snippets (title, content, created, expires)\n\tVALUES(?, ?, UTC_TIMESTAMP(), DATE_ADD(UTC_TIMESTAMP(), INTERVAL ? DAY))`\n\t// Pass in the placeholder parameters aka the ? in the stmt\n\tresult, err := tx.Exec(stmt, title, content, expires)\n\tif err != nil {\n\t\ttx.Rollback()\n\t\treturn 0, err\n\t}\n\t// Return the id of the inserted record in the snippets table\n\tid, err := result.LastInsertId()\n\tif err != nil {\n\t\ttx.Rollback()\n\t\treturn 0, err\n\t}\n\n\t// id is an int64 to convert it to a int\n\terr = tx.Commit()\n\treturn int(id), err\n\n}",
"func (b *Block) Insert() error {\n\treturn b.storage.Insert(b)\n}",
"func (o *Auth) InsertP(exec boil.Executor, whitelist ...string) {\n\tif err := o.Insert(exec, whitelist...); err != nil {\n\t\tpanic(boil.WrapErr(err))\n\t}\n}",
"func (s *SessionStore) Insert(record *Session) error {\n\trecord.SetSaving(true)\n\tdefer record.SetSaving(false)\n\n\trecord.CreatedAt = record.CreatedAt.Truncate(time.Microsecond)\n\trecord.UpdatedAt = record.UpdatedAt.Truncate(time.Microsecond)\n\n\tif err := record.BeforeSave(); err != nil {\n\t\treturn err\n\t}\n\n\treturn s.Store.Insert(Schema.Session.BaseSchema, record)\n}",
"func (s *Signup) Insert(db XODB) error {\n\tvar err error\n\n\t// if already exist, bail\n\tif s._exists {\n\t\treturn errors.New(\"insert failed: already exists\")\n\t}\n\n\t// sql insert query, primary key provided by autoincrement\n\tvar sqlstr = `INSERT INTO ` + GetTableName(\"signups\") + ` (` +\n\t\t`domain, path, title, user_login, user_email, registered, activated, active, activation_key, meta` +\n\t\t`) VALUES (` +\n\t\t`?, ?, ?, ?, ?, ?, ?, ?, ?, ?` +\n\t\t`)`\n\n\t// run query\n\tXOLog(sqlstr, s.Domain, s.Path, s.Title, s.UserLogin, s.UserEmail, s.Registered, s.Activated, s.Active, s.ActivationKey, s.Meta)\n\tres, err := db.Exec(sqlstr, s.Domain, s.Path, s.Title, s.UserLogin, s.UserEmail, s.Registered, s.Activated, s.Active, s.ActivationKey, s.Meta)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// retrieve id\n\tid, err := res.LastInsertId()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// set primary key and existence\n\ts.SignupID = int64(id)\n\ts._exists = true\n\n\treturn nil\n}",
"func (self *Ring) Insert(key int, val string, consistency int) {\n\n\targs := data.NewDataStore(key, val)\n\tresult := self.callSuccessorRPC(key, \"Ring.SendData\", args, consistency)\n\n\tif result.Member != nil && result.Success != 1 {\n\t\tself.updateMember(result.Member)\n\t\tself.Insert(key, val, consistency)\n\t} else {\n\t\ttimeout := 3\n\t\ti := 0\n\t\t//Found New Member\n\t\tfmt.Println(result.Success)\n\t\tfor result.Success == -2 && i < timeout {\n\t\t\ti++\n\t\t\tresult = self.callSuccessorRPC(key, \"Ring.SendData\", args, consistency)\n\n\t\t}\n\t}\n\n}",
"func (o *Source) InsertG(whitelist ...string) error {\n\treturn o.Insert(boil.GetDB(), whitelist...)\n}"
] |
[
"0.7111029",
"0.67856234",
"0.67856234",
"0.67595905",
"0.66994804",
"0.66903365",
"0.6649885",
"0.6643352",
"0.6637011",
"0.66253453",
"0.6611316",
"0.65680474",
"0.6567885",
"0.65290004",
"0.6521216",
"0.65024775",
"0.6500242",
"0.6492111",
"0.6482505",
"0.6475643",
"0.6469886",
"0.6450374",
"0.6435054",
"0.64252883",
"0.6420742",
"0.6408985",
"0.63749355",
"0.63264316",
"0.6318763",
"0.63026524",
"0.6283222",
"0.62753755",
"0.62713",
"0.6233611",
"0.6211526",
"0.6202494",
"0.62024087",
"0.61557794",
"0.6055227",
"0.6055227",
"0.6019798",
"0.59217155",
"0.58950055",
"0.589064",
"0.58874077",
"0.58760756",
"0.5864496",
"0.58545285",
"0.58479685",
"0.582019",
"0.5789522",
"0.578209",
"0.578108",
"0.5770737",
"0.57682097",
"0.5762509",
"0.5761875",
"0.5750029",
"0.5749857",
"0.57369",
"0.57265127",
"0.57258856",
"0.5712922",
"0.5712922",
"0.5697093",
"0.56939006",
"0.5693769",
"0.56712556",
"0.5670347",
"0.5669704",
"0.56688464",
"0.56688464",
"0.56688464",
"0.56688464",
"0.56688464",
"0.56688464",
"0.56656325",
"0.566483",
"0.5660455",
"0.5648868",
"0.5642283",
"0.56408894",
"0.56395465",
"0.5638428",
"0.562911",
"0.5627028",
"0.5623786",
"0.56230783",
"0.56172746",
"0.5613692",
"0.5608506",
"0.5605665",
"0.5599517",
"0.5598054",
"0.559582",
"0.55939096",
"0.5593528",
"0.5593007",
"0.5592168",
"0.5584872"
] |
0.64863205
|
18
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.