serializers

package
v0.0.0-...-7dc802a Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnonSession

type AnonSession struct {
	ID             string `jsonapi:"primary,session"`
	SomethingExtra string `jsonapi:"attr,something_extra"`
}

AnonSession anon session data

func (sess AnonSession) JSONAPILinks() *jsonapi.Links

JSONAPILinks links for the session json

func (AnonSession) JSONAPIMeta

func (sess AnonSession) JSONAPIMeta() *jsonapi.Meta

JSONAPIMeta links for the session json

type AuthSession

type AuthSession struct {
	ID             string       `jsonapi:"primary,session"`
	SomethingExtra string       `jsonapi:"attr,something_extra"`
	User           *models.User `jsonapi:"relation,user"`
}

AuthSession authenticated user session data

func (sess AuthSession) JSONAPILinks() *jsonapi.Links

JSONAPILinks links for the session json

func (AuthSession) JSONAPIMeta

func (sess AuthSession) JSONAPIMeta() *jsonapi.Meta

JSONAPIMeta links for the session json

type User

type User struct {
	models.User
}

User user serializer

type Users

type Users []*User

Users users list serializer

func (i Users) JSONAPILinks() *jsonapi.Links

JSONAPILinks jsonapi links

func (Users) JSONAPIMeta

func (i Users) JSONAPIMeta() *jsonapi.Meta

JSONAPIMeta jsonapi meta

Jump to

Keyboard shortcuts

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