59 questions
2
votes
1
answer
126
views
How to remove the ETag header from the response served by the FileServer
How Can i remove the "ETag" response header which is set in gobuffalo fileServer ?
I have tried creating a middleware function :
func RemoveETagHeader(next buffalo.Handler) buffalo.Handler {...
1
vote
1
answer
232
views
Go Buffalo test with sqlite error: could not find connection named test
Buffalo test error on a new project I created with this command.
buffalo new coke --db-type sqlite3
buffalo test
Here is the error:
[POP] 2023/02/23 13:43:02 warn - unable to load connection ...
2
votes
2
answers
236
views
How can I use TOML fixtures to seed my database in a development environment using the Go Buffalo framework?
I am trying to seed my development database in the Go Buffalo framework using TOML fixtures. However, I am having trouble finding a clear example or documentation on how to do this.
1
vote
0
answers
31
views
How can I set a custom path helper for a Resource in go Buffalo?
With a GET route, I can do
app.GET("/", HomeHandler).Name("CustomName")
But with a Resource, the .Name() function is no longer available
1
vote
1
answer
45
views
How can I checked if the visitor is logged in from a plush template? Using the go Buffalo framework
How can I check if a visitor is logged in from within a template using the Go Buffalo web framework? Specifically, I am working on a project that utilizes the Buffalo framework and I need to be able ...
0
votes
1
answer
43
views
Slash appended to request path
I'm working on a SCIM api using https://github.com/elimity-com/scim, which gives me an http.Handler that I have mounted using app.Mount("/api/v1/scim", scimHandler). Requests route to the ...
1
vote
1
answer
367
views
Golang use bash environment variables in Buffalo database.yml
I'm new to Go and Buffalo, and am attempting use my bash environment variables in my database.yaml
I attempted to do the following in my database.yaml, but it fails to interpret the value of my bash ...
1
vote
0
answers
87
views
ValidateCreate function not called on ValidateAndCreate
I'm usign buffalo to build a simple backend to store values.
I have a Target struct defined as follow:
type Target struct {
ID uuid.UUID `json:"id" db:"id"`
...
2
votes
1
answer
295
views
Is there a way to have Routify ignore certain URL paths?
We're using Go (Buffalo) to serve up both an API and the static assets for a Single-Page Application (SPA) that uses Svelte and Routify.
However, I'd like to have certain routes (e.g. "/auth/...
0
votes
0
answers
332
views
Integration between Mongodb and Buffalo Golang framework
I am trying to use buffalo framework (Golang) with Mongodb Database as database.yml file as follows:
development:
database: myproject_development
user: mongodb
password: mongodb
host: 127.0.0.1
url: ...
3
votes
2
answers
2k
views
Soda CLI show warning : Migrator: unable to dump schema: exec: "pg_dump": executable file not found in $PATH
I'm new on using gobuffalo, and every time i run migrate always show this warning. What is the meaning of that warning?
> soda migrate up
v5.3.1
[POP] 2021/05/25 14:17:12 info - > ...
2
votes
1
answer
349
views
Debug Go code in VS Code by running buffalo command in terminal
I want to debug the GO code in VS code. I basically want to attach the go project which is open in VS code to the terminal and then run some "buffalo task" command in terminal, which then ...
166
votes
4
answers
174k
views
missing go.sum entry for module providing package <package_name>
Using the buffalo framework,
after bootstraping it via buffalo new <project_name>
I am trying to run buffalo dev
Expecting to see:
project running on port 3000
But I am getting those error ...
0
votes
2
answers
2k
views
How to integrate Sentry [closed]
I want to catch all errors in the production environment and send them to the Sentry. But I can't understand how to add it as a middleware. Do I need to write a custom logger than implement logger....
1
vote
1
answer
474
views
Difficulty installing go buffalo using go mod on windows
I am very new to golang. I am trying to work with the gomod. Trying to explore the go buffalo framework. But finding a bit of difficulty in installing that.
What I have done:
I saw that go get is ...
1
vote
2
answers
147
views
Unable to GET form from embedded html
I have a search engine with a backend in GoLang & Buffalo, I'm new to web programming, and I'm sure this is a stupid problem. I have a nav-bar with a search bar, and another search bar in the body....
0
votes
1
answer
38
views
"Generate resource" command with "--skip-model" flag results in faulty resource
Description
Just started using Buffalo, trying out all the beautiful features :)
I'm having an issue however with the "generate resource" command in combination with the "--skip-model&...
1
vote
1
answer
134
views
GoBuffalo CSRF issue on production build
When I run the application in development mode, I do not have this issue.
But when I build for production and run that binary and whenever I try to submit a form I get below error -
level=error time=&...
1
vote
1
answer
100
views
Render SelectTag() with options from an array of models
I have a User model and a App model in my application. App has a belongs_to relation with User model.
In the template apps/new.plush.html I need to render the list of users as a drop down selection. I ...
3
votes
0
answers
162
views
Nginx how to password protect HTTP methods with limit_except + rewrite
i'm trying to acheive something in nginx but i'm having a hard time.
Basically i want to ask for a password everytime my api receive any HTTP methods except POST and PUT , it works to some extent ...
0
votes
1
answer
457
views
Integrating Sentry and Elastic APM in Buffalo
I am trying to integrate Elastic APM and Sentry into my website using Buffalo. The interesting files are as follows:
handlers/sentryHandler.go
package handlers
import (
sentryhttp "github.com/...
0
votes
1
answer
731
views
How to update gobuffalo models with pop?
I'm starting a project and already check how useful is gobuffalo/pop.
I have never previously used a framework for my GO projects. I just used the stdlib and I'm used to working with Django too.
In ...
0
votes
1
answer
56
views
How to change priorities of messages logged by buffalo router
I updated question for clarity (as requested).
I use Buffalo framework. I have lots of messages in logs informing that someone on the internet tries to reach nonexistent endpoint or uses HTTP method ...
0
votes
1
answer
228
views
Disable info logs during testing a buffalo application
I am unable to disable INFO logs during testing.
Is there a way to do so?
Thanks.
0
votes
1
answer
199
views
Go Buffalo: ERRO[0000] Error: name buffalodevn is not allowed, try a different application name
When trying to start a new buffalo project in my Go Path I get this error, in my search I don't see any references to this error in the docs or in other questions on different forums. I've tried ...
0
votes
1
answer
247
views
New buffalo project on Windows: could not find template items/index.html
I'm working with someone to build a Buffalo app. They are on Windows and I'm on Linux. After generating a model, they get a 500 error when visiting the list route: http://localhost:3000/items/. The ...
2
votes
1
answer
484
views
How to fix '/gobuffalo/buffalo/plugins/plugdeps/plugin.go:15:11: undefined: meta.BuildTags' error after installing gobuffalo
I am running Ubuntu 19.10 and Go 1.13.4.
I installed gobuffalo following the instructions here: https://gobuffalo.io/en/docs/getting-started/installation#gnu-linux
The error occurs after running the ...
4
votes
2
answers
566
views
How to cause Buffalo transaction middleware to commit?
In trying to use the buffalo-pop/pop/popmw Transaction middleware, I am not having success writing to the database. No errors are returned, and the debug output shows the SQL statements, but the ...
1
vote
0
answers
564
views
Creating static binaries from Go and C/C++ code (using cgo)
I am developing an application in Go that needs to call some of my company's C++ code. Thus far, I have successfully achieved the following:
Written C wrappers that enable instantiation of C++ ...
1
vote
1
answer
2k
views
show can set disabled pop error: mysql select one: sql: no rows in result set
err = db.Find(model)
err == "mysql select one: sql: no rows in result set"
I don't think this is a mistake. How do I turn it off in buffalo/pop?
and
errors.Is(err, sql.ErrNoRows) === false
can'...
0
votes
1
answer
573
views
Specify many-to-many relationship in buffalo model
Please does anyone know how to specify a many-to-many relationship in buffalo models?
0
votes
1
answer
63
views
xray setup with buffalo
I'm trying to setup buffalo to send data to AWS X-Ray. I am new to buffalo/go and I'm completely lost in the docs...
My actions.go
package actions
import (
"fmt"
"github.com/gobuffalo/...
0
votes
0
answers
139
views
gobuffalo tx.Eager().Create causing error “could not set '%!s(int64=15)' to '<invalid reflect.Value>' ”
I'm trying to write data to PostgreSQL database with relationships using this code.
req := c.Request()
tx := c.Value("tx").(*pop.Connection)
user := &models.User{}
if req.FormValue("user_type")...
0
votes
1
answer
326
views
Installing buffalo with GO111MODULE results in go get: error loading module requirements [duplicate]
I am getting an error when trying to install buffalo.
I tested with a clean GOPATH with nothing in it on go version go1.12.7 linux/amd64. GO111MODULE ist set to on.
I try to install buffalo with the ...
-5
votes
1
answer
419
views
How to iterate over request parameters
I'd like to iterate over the request parameters in the request handler.
I'm following the example from the documentation, but I can't get it to work.
By following the getting started guide and using ...
-2
votes
1
answer
351
views
JSON binding with a nested payload
I'm using Go and Buffalo to develop an API.
When receiving a request, it is possible to automatically map the JSON payload to a struct:
func MyAction(c buffalo.Context) error {
u := &User{}
...
0
votes
2
answers
1k
views
Generating a new project in buffalo fails with GO111MODULE issue
I am trying out buffalo for the first time.
I manually installed the pre-requisites rather than using scoop because I didn't know where scoop would put things:
https://www.stuartellis.name/articles/...
0
votes
1
answer
344
views
How to render the quill js content using go buffalo framework
The options that i am aware of are,
Get the content of the quilljs from getContents api which gives the JSON structure. I can post this to server and store it in server.
Get the innerHTML of the div ...
1
vote
2
answers
142
views
Circleci and GoBuffalo challenge
I'm currently trying to get GoBuffalo and CircleCi working, but so far without luck.
Circleci fails on the "buffalo build" step with the error message:
My config.yaml:
version: 2
jobs:
...
0
votes
0
answers
80
views
Can I post to twitter from the Oauth-logged in user?
Currently have a web app that logs in a user (and saves them to the DB) through Oauthing with twitter.
You can also tweet from the webapp, however the tweet is currently coded to be sent from a ...
1
vote
2
answers
871
views
Trouble setting CSRF token in sending a tweet from a Golang Buffalo webapp
I am having trouble with a Go Buffalo web app I am trying to build. I basically have a standard form on the front end that, when clicked, is supposed to send a tweet to the Users twitter account.
I ...
0
votes
1
answer
386
views
How to redirect from a new post url to the show post url in Buffalo
I am building a blog website in Buffalo, and I'm running into a bit of an issue. I have the following routes in app.go:
b := BlogsResource{}
blogGroup := app.Group("/blog")
blogGroup.GET("/", b.List)
...
3
votes
1
answer
963
views
Is gobuffalo able to generate my tables automatically?
I have this structure:
type User struct {
ID int
CreatedAt int
UpdatedAt int
DeviceUniqueIdentifier string
Sessions []Session `has_many:"sessions"`
}
I have no idea how ...
0
votes
0
answers
259
views
Cannot write to mySQL db or read from it in my buffalo application
Currently i have the problem, that my buffalo application cannot write to my MySQL db or read from it. But in the logs no errors occurring.
My database.yml file
development:
dialect: "mysql"
...
3
votes
0
answers
125
views
Using Buffalo, is this the correct app.mount behaviour?
I'm using buffalo v0.13.10.
I'm trying to understand how to make it work this: https://github.com/frederikhors/buffalo-authboss-sample and I found that app.mount isn't like chi router mount (https://...
1
vote
0
answers
467
views
GoBuffalo and Authboss (authentication system) integration
I'm trying to use authboss (https://github.com/volatiletech/authboss) with GoBuffalo (https://github.com/gobuffalo/buffalo).
I'm still learning Go and I think this is a good exercise.
I created a ...
2
votes
1
answer
223
views
Debugging a single test function in buffalo
Is there a way to Debug a Single ActionSuite Test in an IDE like Goland or VSCode?
Thanks a lot for your help!
3
votes
2
answers
504
views
Where are /public/assets generated in the go buffalo workflow?
In go buffalo, there is a generated .gitignore file which ignores public/assets. However, at the same time, the generated css and js are critical for getting a 'real' buffalo app. So, there's a ...
1
vote
0
answers
43
views
How to import nested local file
Before:
actions
├── app.go
├── upload_sessions.go
├── upload_sessions_test.go
What I want to change it to:
actions
├── app.go
├── v2
│ ├── upload_sessions.go
│ └── upload_sessions_test.go
When ...
1
vote
1
answer
161
views
How to add new route to autogenerate resources?
please help me, I want add new route/func to generate resource (etc. users).
app.Resource("/users", UsersResource{})
I found func addRoute, but doesn't work.
func (a *App) addRoute(method string, ...