Documentation ¶
Index ¶
- Constants
- func GeContentTypeStr(value ContentType) string
- func GetMethodStr(value TMethod) string
- func NewAuth2() *auth2
- func NewProxy() *proxy
- type AuthorizationType
- type ClientAuth
- type Content
- type ContentBinary
- type ContentFile
- type ContentFormField
- type ContentText
- type ContentType
- type EncType
- type Fields
- type Header
- type IWebsocket
- type ListContentBinary
- type ListContentFile
- type ListContentFormField
- type ListContentText
- type Params
- type Request
- type Response
- type Status
- type THttp
- func (H *THttp) Conectar() error
- func (H *THttp) Desconectar() error
- func (H *THttp) EnviarBinario(messageType int, data []byte) error
- func (H *THttp) EnviarBinarioTypeBinaryMessage(data []byte) error
- func (H *THttp) EnviarTextTypeTextMessage(data []byte) error
- func (H *THttp) EnviarTexto(messageType int, data string) error
- func (H *THttp) GetAuthorizationType() AuthorizationType
- func (H *THttp) GetFullURL() (string, error)
- func (H *THttp) GetMetodo() TMethod
- func (H *THttp) GetMetodoStr() string
- func (H *THttp) GetUrl() string
- func (H *THttp) IsConect() bool
- func (H *THttp) Send() (*Response, error)
- func (H *THttp) SetAuthorizationType(value AuthorizationType) error
- func (H *THttp) SetMetodo(value TMethod) error
- func (H *THttp) SetMetodoStr(value string) error
- func (H *THttp) SetUrl(value string) error
- type TMethod
- type TokenResponse
- type Varibles
- func (v *Varibles) Add(key string, value string)
- func (v *Varibles) Clear()
- func (v *Varibles) Count() int
- func (v *Varibles) Del(key string)
- func (v *Varibles) Exist(key string) bool
- func (v *Varibles) Get(key string) string
- func (v *Varibles) Keys() []string
- func (v *Varibles) Set(key string, value string)
- func (v *Varibles) ToMap() map[string]string
- func (v *Varibles) Values() []string
- type WebSocket
Constants ¶
View Source
const ( MSG_DISCONECT = "Perca de Conexão..." MSG_RECONECTANDO = "Reconectando..." MSG_RECONECTADO = "Reconectado..." MSG_CONECTADO = "Conectado..." )
Variables ¶
This section is empty.
Functions ¶
func GeContentTypeStr ¶
func GeContentTypeStr(value ContentType) string
func GetMethodStr ¶
Types ¶
type AuthorizationType ¶
type AuthorizationType int
const ( AT_AutoDetect AuthorizationType = iota AT_Basic AT_Bearer AT_Auth2 AT_Nenhum )
type ClientAuth ¶
type ClientAuth int
const ( CA_SendBasicAuthHeader ClientAuth = iota CA_SendClientCredentialsInBody )
type ContentBinary ¶
type ContentFile ¶
type ContentFormField ¶
type ContentText ¶
type ContentType ¶
type ContentType int
const ( CT_NONE ContentType = 0 CT_TEXT ContentType = 1 CT_JAVASCRIPT ContentType = 2 CT_JSON ContentType = 3 CT_HTML ContentType = 4 CT_XML ContentType = 5 CT_MULTIPART_FORM_DATA ContentType = 6 CT_X_WWW_FORM_URLENCODED ContentType = 7 CT_BINARY ContentType = 8 )
func GetContentTypeFromString ¶
func GetContentTypeFromString(str string) ContentType
type Header ¶
type Header struct { Accept string AcceptCharset string AcceptEncoding string AcceptLanguage string Authorization string Charset string ContentType string ContentLength string ContentEncoding string ContentVersion string ContentLocation string ExtraFields Fields }
func (*Header) GetAllFields ¶
type IWebsocket ¶
type ListContentBinary ¶
type ListContentBinary []*ContentBinary
func NewListContentBinary ¶
func NewListContentBinary() ListContentBinary
func (*ListContentBinary) Add ¶
func (L *ListContentBinary) Add(name string, fileName string, value []byte)
func (*ListContentBinary) Clear ¶
func (L *ListContentBinary) Clear()
type ListContentFile ¶
type ListContentFile []*ContentFile
func NewListContentFile ¶
func NewListContentFile() ListContentFile
func (*ListContentFile) Add ¶
func (L *ListContentFile) Add(fieldName string, contentType string, content []byte)
func (*ListContentFile) Clear ¶
func (L *ListContentFile) Clear()
type ListContentFormField ¶
type ListContentFormField []*ContentFormField
func NewListContentFormField ¶
func NewListContentFormField() ListContentFormField
func (*ListContentFormField) Add ¶
func (L *ListContentFormField) Add(fieldName string, fieldValue string)
func (*ListContentFormField) Clear ¶
func (L *ListContentFormField) Clear()
type ListContentText ¶
type ListContentText []*ContentText
func NewListContentText ¶
func NewListContentText() ListContentText
func (*ListContentText) Clear ¶
func (L *ListContentText) Clear()
type Request ¶
type Request struct { Header *Header ItensFormField ListContentFormField ItensSubmitFile ListContentFile ItensContentText ListContentText ItensContentBin ListContentBinary Body []byte }
func NewRequest ¶
func NewRequest() *Request
func (*Request) AddContentBin ¶
func (*Request) AddFormField ¶
type Response ¶
func NewResponse ¶
func NewResponse() *Response
func (*Response) GetAllFields ¶
func (*Response) GetStatusCodeStr ¶
func (*Response) GetStatusMessage ¶
type THttp ¶
type THttp struct { /*publico*/ Auth2 *auth2 Request *Request Response *Response Metodo TMethod AuthorizationType AuthorizationType WebSocket *WebSocket Authorization string Password string UserName string Protocolo string // http, https Host string // www.example.com Path string // /product Varibles Varibles Params Params Proxy *proxy EncType EncType Timeout int //segundos OnSend IWebsocket // contains filtered or unexported fields }
func (*THttp) Desconectar ¶
func (*THttp) EnviarBinarioTypeBinaryMessage ¶
func (*THttp) EnviarTextTypeTextMessage ¶
func (*THttp) GetAuthorizationType ¶
func (H *THttp) GetAuthorizationType() AuthorizationType
func (*THttp) GetFullURL ¶
func (*THttp) GetMetodoStr ¶
func (*THttp) SetAuthorizationType ¶
func (H *THttp) SetAuthorizationType(value AuthorizationType) error
func (*THttp) SetMetodoStr ¶
type TokenResponse ¶
type Varibles ¶
func NewVaribles ¶
func NewVaribles() Varibles
Click to show internal directories.
Click to hide internal directories.