Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AccessToken struct { AccessToken string `json:"access_token"` UserID int64 `json:"user_id"` ClientID int64 `json:"client_id"` Expires int64 `json:"expires"` }
func GetNewAccessToken ¶
func GetNewAccessToken() *AccessToken
func (AccessToken) IsExpired ¶
func (at AccessToken) IsExpired() bool
func (AccessToken) Validate ¶
func (at AccessToken) Validate() *errors.RestErr
type Repository ¶
type Repository interface { GetByID(string) (*AccessToken, *errors.RestErr) Create(AccessToken) *errors.RestErr UpdateExpiresTime(AccessToken) *errors.RestErr }
type Service ¶
type Service interface { GetByID(string) (*AccessToken, *errors.RestErr) Create(AccessToken) *errors.RestErr UpdateExpiresTime(AccessToken) *errors.RestErr }
func NewService ¶
func NewService(repo Repository) Service
Click to show internal directories.
Click to hide internal directories.