Documentation ¶
Index ¶
- Variables
- func DefaultMakeChallengeCode() ([]byte, error)
- func DefaultPopChallengeCode(user string) ([]byte, error)
- func DefaultStoreChallengeCode(user string, code []byte) error
- type Options
- type Response
- type STNS
- func (c *STNS) CreateUserChallengeCode(name string) ([]byte, error)
- func (s *STNS) GetGroupByID(id int) (*model.Group, error)
- func (s *STNS) GetGroupByName(name string) (*model.Group, error)
- func (s *STNS) GetUserByID(id int) (*model.User, error)
- func (s *STNS) GetUserByName(name string) (*model.User, error)
- func (s *STNS) ListGroup() ([]*model.Group, error)
- func (s *STNS) ListUser() ([]*model.User, error)
- func (c *STNS) PopUserChallengeCode(name string) ([]byte, error)
- func (s *STNS) Request(path, query string) (*Response, error)
- func (s *STNS) SetPopChallengeCode(f func(string) ([]byte, error))
- func (s *STNS) SetStoreChallengeCode(f func(string, []byte) error)
- func (c *STNS) Sign(code []byte) ([]byte, error)
- func (c *STNS) Verify(msg, publicKeyBytes, signature []byte) error
- func (c *STNS) VerifyWithUser(name string, msg, signature []byte) error
- type TLS
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultRetry = 3
View Source
var DefaultTimeout = 15
Functions ¶
func DefaultPopChallengeCode ¶
Types ¶
type Options ¶
type Options struct { AuthToken string `env:"STNS_AUTH_TOKEN"` User string `env:"STNS_USER"` Password string `env:"STNS_PASSWORD"` UserAgent string SkipSSLVerify bool `env:"STNS_SKIP_VERIFY"` HttpProxy string HttpKeepalive bool `env:"STNS_HTTP_KEEPALIVE"` RequestTimeout int `env:"STNS_REQUEST_TIMEOUT"` RequestRetry int `env:"STNS_REQUEST_RETRY"` HttpHeaders map[string]string TLS TLS PrivatekeyPath string `env:"STNS_PRIVATE_KEY"` PrivatekeyPassword string `env:"STNS_PRIVATE_KEY_PASSWORD"` }
type STNS ¶
type STNS struct {
// contains filtered or unexported fields
}
func (*STNS) CreateUserChallengeCode ¶
func (*STNS) PopUserChallengeCode ¶
func (*STNS) SetPopChallengeCode ¶
func (*STNS) SetStoreChallengeCode ¶
Click to show internal directories.
Click to hide internal directories.