Documentation ¶ Index ¶ type Mocks func (m *Mocks) Name() string func (m *Mocks) Sign(headerPayload []byte) ([]byte, error) func (m *Mocks) Size() int func (m *Mocks) Verify(headerPayload, sig []byte) error type Token func New(token *contract.Token) *Token func (t *Token) Sign(ctx context.Context, payload *contract.Payload) (string, error) func (t *Token) Verify(ctx context.Context, token string) (*contract.Payload, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Mocks ¶ type Mocks struct{ mock.Mock } Mocks struct func (*Mocks) Name ¶ func (m *Mocks) Name() string Name mocks func (*Mocks) Sign ¶ func (m *Mocks) Sign(headerPayload []byte) ([]byte, error) Sign mocks func (*Mocks) Size ¶ func (m *Mocks) Size() int Size mocks func (*Mocks) Verify ¶ func (m *Mocks) Verify(headerPayload, sig []byte) error Verify mocks type Token ¶ type Token struct { *contract.Token // contains filtered or unexported fields } Token define a filed to support building basic func New ¶ func New(token *contract.Token) *Token New is a function to initialize basic jwt func (*Token) Sign ¶ func (t *Token) Sign(ctx context.Context, payload *contract.Payload) (string, error) Sign is a function to signning JWT func (*Token) Verify ¶ func (t *Token) Verify(ctx context.Context, token string) (*contract.Payload, error) Verify is a function to verify JWT Source Files ¶ View all Source files basic.go basic_mocks.go Click to show internal directories. Click to hide internal directories.