Documentation ¶
Index ¶
- type Config
- type Server
- func (s *Server) CreateStream(req *pb.SlackUserRequest, stream pb.Approuvez_CreateStreamServer) error
- func (s *Server) GetSlackUser(ref string) (*slack.User, error)
- func (s *Server) HandleSlackCallback(w http.ResponseWriter, r *http.Request)
- func (s *Server) NewSession(ctx context.Context, _ *pb.Empty) (*pb.Session, error)
- func (s *Server) PromptSlackUser(msg SlackMessage, userID string) error
- func (s *Server) UpdateMessage(channelID, messageTimestamp string, msg SlackMessage)
- type Session
- type Sessions
- type SlackMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { pb.UnimplementedApprouvezServer Slack *slack.Client Sessions Sessions }
Server handles necessary components to run the server side of the app
func (*Server) CreateStream ¶
func (s *Server) CreateStream(req *pb.SlackUserRequest, stream pb.Approuvez_CreateStreamServer) error
CreateStream ..
func (*Server) GetSlackUser ¶
GetSlackUser returns a slack user based on its email, name or ID
func (*Server) HandleSlackCallback ¶
func (s *Server) HandleSlackCallback(w http.ResponseWriter, r *http.Request)
HandleSlackCallback ..
func (*Server) NewSession ¶
NewSession ..
func (*Server) PromptSlackUser ¶
func (s *Server) PromptSlackUser(msg SlackMessage, userID string) error
PromptSlackUser ..
func (*Server) UpdateMessage ¶
func (s *Server) UpdateMessage(channelID, messageTimestamp string, msg SlackMessage)
UpdateMessage ..
type Session ¶
type Session struct { ID string Stream pb.Approuvez_CreateStreamServer Error chan error }
Session ..
type SlackMessage ¶
type SlackMessage struct { SessionID string Message string LinkButtonName string LinkButtonURL string ActionButtons bool StatusMessage string Color string }
SlackMessage ..
func (*SlackMessage) Recompose ¶
func (msg *SlackMessage) Recompose(payload slack.Message)
Recompose a message from an interaction payload
func (*SlackMessage) Render ¶
func (msg *SlackMessage) Render() slack.MsgOption
Render compute the message blocks
Click to show internal directories.
Click to hide internal directories.