Documentation ¶
Index ¶
- Constants
- type HttpClient
- func (c *HttpClient) ConnectToSocket(id uuid.UUID) (*websocket.Conn, context.Context, context.CancelFunc, error)
- func (c *HttpClient) CreateRoom(name string) (models.Room, error)
- func (c *HttpClient) Do(req *http.Request) (*http.Response, error)
- func (c *HttpClient) FetchRooms() ([]models.Room, error)
- func (c *HttpClient) Get(url string) (*http.Response, error)
- func (c *HttpClient) GetUserByAuthToken() (models.User, error)
- func (c *HttpClient) Login(username, password string) (models.User, error)
- func (c *HttpClient) Post(url string, body io.Reader) (*http.Response, error)
- func (c *HttpClient) PostSignUp(username, password string) (models.User, error)
- func (c *HttpClient) SetAuthToken(token string)
Constants ¶
View Source
const BASE_URL = "https://texttunnel-gyjkwvpeba-uc.a.run.app"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpClient ¶
func CreateHttpClient ¶
func CreateHttpClient(token string) *HttpClient
func (*HttpClient) ConnectToSocket ¶
func (c *HttpClient) ConnectToSocket(id uuid.UUID) (*websocket.Conn, context.Context, context.CancelFunc, error)
func (*HttpClient) CreateRoom ¶
func (c *HttpClient) CreateRoom(name string) (models.Room, error)
func (*HttpClient) FetchRooms ¶
func (c *HttpClient) FetchRooms() ([]models.Room, error)
func (*HttpClient) GetUserByAuthToken ¶
func (c *HttpClient) GetUserByAuthToken() (models.User, error)
func (*HttpClient) Login ¶
func (c *HttpClient) Login(username, password string) (models.User, error)
func (*HttpClient) PostSignUp ¶
func (c *HttpClient) PostSignUp(username, password string) (models.User, error)
func (*HttpClient) SetAuthToken ¶
func (c *HttpClient) SetAuthToken(token string)
Click to show internal directories.
Click to hide internal directories.