Skip to content

Commit

Permalink
Fix gofmt issues
Browse files Browse the repository at this point in the history
Signed-off-by: Prasad Ghangal <[email protected]>
  • Loading branch information
PrasadG193 committed Nov 29, 2023
1 parent c0e746b commit 0ecde73
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
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 0ecde73

Please sign in to comment.