Skip to content

Commit

Permalink
Fix go version in github workflows (#77)
Browse files Browse the repository at this point in the history
* Fix go version in github workflows

* Remove lint checks

* Fix gofmt issues

Signed-off-by: Prasad Ghangal <[email protected]>

* Fix gofmt issue in echobot example

Signed-off-by: Prasad Ghangal <[email protected]>

---------

Signed-off-by: Prasad Ghangal <[email protected]>
  • Loading branch information
PrasadG193 authored Nov 30, 2023
1 parent f0096f2 commit ae31623
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 15 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: [ '1.19', '1.20', '1.21.x' ]
go-version: '1.21.x'
- name: Gomod
run: go mod download
- name: Golint
run: hack/verify-golint.sh
- name: Gofmt
run: hack/verify-gofmt.sh
- name: Go vet
Expand Down
3 changes: 2 additions & 1 deletion connector/auth/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

/*Package auth provides authentication properties and functionalities for the connector service.
/*
Package auth provides authentication properties and functionalities for the connector service.
TokenValidator provides the functionality for authenticating a JWT token in a received request.
Others provide the basic structures needed.
Expand Down
3 changes: 2 additions & 1 deletion connector/client/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

/*Package client provides a HTTP client for calls to the connector service.
/*
Package client provides a HTTP client for calls to the connector service.
The configuration needed for the call are defined by the struct Config
*/
Expand Down
3 changes: 2 additions & 1 deletion core/activity/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

/*Package activity acts as a handler for any received activity and the user defined operation
/*
Package activity acts as a handler for any received activity and the user defined operation
on that activity. It then is responsible for sending a reply to the connector service.
*/
package activity
3 changes: 2 additions & 1 deletion core/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

/*Package core is the entry point and the main interface for a user program.
/*
Package core is the entry point and the main interface for a user program.
It provides an adapter to the user program using which all the operations can be made on this SDK.
See the example to understand how to use this package to perform operations on the Bot Framwework connector service.
Expand Down
18 changes: 10 additions & 8 deletions samples/echobot/doc.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
/*Bot Framework echo bot sample.
/*
Bot Framework echo bot sample.
This bot uses msbotbuilder-go: https://github.com/infracloudio/msbotbuilder-go. It shows
how to create a simple bot that accepts input from the user and echoes it back.
Run the example
# Run the example
Bring up a terminal and run. Set two variables for the session as APP_ID and APP_PASSWORD to the values of
your BotFramework app_id and password. Then, run:
go run main.go
This will start a server which will listen on port 3978
go run main.go
# This will start a server which will listen on port 3978
Understanding the example
# Understanding the example
The program starts by creating a hanlder struct of type `activity.HandlerFuncs`.
This struct contains defination for the `OnMessageFunc` field which is a treated as a callback by the library
Expand All @@ -23,16 +24,17 @@ on the respective event.
},
}
A webserver is started with a hanlder passed the received payload to `adapter.ParseRequest`
This methods authenticates the payload, parses the request and returns an Activity value.
activity, err := adapter.ParseRequest(ctx, req)
The Activity is then passed to `adapter.ProcessActivity` with the hanlder created to process
the activity as per the hanlder functions and send the response to the connector service.
err = adapter.ProcessActivity(ctx, activity, customHandler)
In case of no error, this web responds with a 200 status
# In case of no error, this web responds with a 200 status
To expose this local IP outside your local network, a tool like ngrok can be used.
Expand Down

0 comments on commit ae31623

Please sign in to comment.