common

package
v0.0.0-...-5bbb7b8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2020 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthCommon = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCommon   = fmt.Errorf("proto: integer overflow")
)

Functions

This section is empty.

Types

type Claims

type Claims struct {
	UserID    *UUID      `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
	TokenID   *UUID      `protobuf:"bytes,2,opt,name=tokenID,proto3" json:"tokenID,omitempty"`
	ExpiresAt *time.Time `protobuf:"bytes,3,opt,name=expiresAt,proto3,stdtime" json:"expiresAt,omitempty"`
}

func ClaimsFromJWT

func ClaimsFromJWT(claims *jwt.Claims) (c *Claims, err error)

ClaimsFromJWT parses and returns the necessary fields from a jwt.Claims object.

func (*Claims) Descriptor

func (*Claims) Descriptor() ([]byte, []int)

func (*Claims) GetExpiresAt

func (m *Claims) GetExpiresAt() *time.Time

func (*Claims) GetTokenID

func (m *Claims) GetTokenID() *UUID

func (*Claims) GetUserID

func (m *Claims) GetUserID() *UUID

func (*Claims) Marshal

func (m *Claims) Marshal() (dAtA []byte, err error)

func (*Claims) MarshalTo

func (m *Claims) MarshalTo(dAtA []byte) (int, error)

func (*Claims) ProtoMessage

func (*Claims) ProtoMessage()

func (*Claims) Reset

func (m *Claims) Reset()

func (*Claims) Size

func (m *Claims) Size() (n int)

func (*Claims) String

func (m *Claims) String() string

func (*Claims) Unmarshal

func (m *Claims) Unmarshal(dAtA []byte) error

func (*Claims) XXX_DiscardUnknown

func (m *Claims) XXX_DiscardUnknown()

func (*Claims) XXX_Marshal

func (m *Claims) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Claims) XXX_Merge

func (m *Claims) XXX_Merge(src proto.Message)

func (*Claims) XXX_Size

func (m *Claims) XXX_Size() int

func (*Claims) XXX_Unmarshal

func (m *Claims) XXX_Unmarshal(b []byte) error

type UUID

type UUID struct {
	Uuid *github_com_issho_ni_issho_internal_pkg_uuid.UUID `protobuf:"bytes,1,opt,name=uuid,proto3,customtype=github.com/issho-ni/issho/internal/pkg/uuid.UUID" json:"uuid,omitempty"`
}

func NewUUID

func NewUUID() *UUID

NewUUID generates a new UUID.

func ParseUUID

func ParseUUID(s string) (*UUID, error)

ParseUUID decodes s into a UUID or returns an error.

func (*UUID) Descriptor

func (*UUID) Descriptor() ([]byte, []int)

func (*UUID) Marshal

func (m *UUID) Marshal() (dAtA []byte, err error)

func (UUID) MarshalGQL

func (u UUID) MarshalGQL(w io.Writer)

MarshalGQL implements the graphql.Marshal interface.

func (*UUID) MarshalTo

func (m *UUID) MarshalTo(dAtA []byte) (int, error)

func (*UUID) ProtoMessage

func (*UUID) ProtoMessage()

func (*UUID) Reset

func (m *UUID) Reset()

func (*UUID) Size

func (m *UUID) Size() (n int)

func (*UUID) String

func (m *UUID) String() string

func (*UUID) Unmarshal

func (m *UUID) Unmarshal(dAtA []byte) error

func (UUID) UnmarshalGQL

func (u UUID) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements the graphql.Unmarshal interface.

func (*UUID) XXX_DiscardUnknown

func (m *UUID) XXX_DiscardUnknown()

func (*UUID) XXX_Marshal

func (m *UUID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UUID) XXX_Merge

func (m *UUID) XXX_Merge(src proto.Message)

func (*UUID) XXX_Size

func (m *UUID) XXX_Size() int

func (*UUID) XXX_Unmarshal

func (m *UUID) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL