Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBadRequest = &SClientError{"bad request"} ErrDecodeResponse = &SClientError{"decode response"} ErrInvalidHexFormat = &SClientError{"invalid hex format"} ErrInvalidPublicKey = &SClientError{"invalid public key"} ErrInvalidTitle = &SClientError{"invalid title"} )
Functions ¶
This section is empty.
Types ¶
type IBuilder ¶ added in v1.7.1
type IBuilder interface {
Friend(string, asymmetric.IPubKey) *hls_settings.SFriend
}
func NewBuilder ¶ added in v1.7.1
func NewBuilder() IBuilder
type IClient ¶
type IClient interface { GetIndex(context.Context) (string, error) GetSettings(context.Context) (config.IConfigSettings, error) GetPubKey(context.Context) (asymmetric.IPubKey, error) GetFriends(context.Context) (map[string]asymmetric.IPubKey, error) AddFriend(context.Context, string, asymmetric.IPubKey) error DelFriend(context.Context, string) error EncryptMessage(context.Context, string, payload.IPayload64) (net_message.IMessage, error) DecryptMessage(context.Context, net_message.IMessage) (string, payload.IPayload64, error) }
func NewClient ¶
func NewClient(pBuilder IBuilder, pRequester IRequester) IClient
type IRequester ¶
type IRequester interface { GetIndex(context.Context) (string, error) GetSettings(context.Context) (config.IConfigSettings, error) GetPubKey(context.Context) (asymmetric.IPubKey, error) GetFriends(context.Context) (map[string]asymmetric.IPubKey, error) AddFriend(context.Context, *hls_settings.SFriend) error DelFriend(context.Context, *hls_settings.SFriend) error EncryptMessage(context.Context, string, payload.IPayload64) (net_message.IMessage, error) DecryptMessage(context.Context, net_message.IMessage) (string, payload.IPayload64, error) }
func NewRequester ¶
func NewRequester(pHost string, pClient *http.Client, pParams net_message.ISettings) IRequester
type SClientError ¶
type SClientError struct {
// contains filtered or unexported fields
}
func (*SClientError) Error ¶
func (err *SClientError) Error() string
Click to show internal directories.
Click to hide internal directories.