Version: v0.0.0-...-0c73920 Latest Latest

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

Go to latest
Published: Mar 20, 2021 License: MIT Imports: 19 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Committee

type Committee []Officer

type Event

type Event struct {
	ID          int
	Name        string
	StartTime   time.Time
	EndTime     time.Time
	Location    string
	Description string

type Officer

type Officer struct {
	Position Position
	User     User

type Position

type Position struct {
	ID int

	Name     string
	Alias    string
	FromDate time.Time
	TillDate time.Time
	// contains filtered or unexported fields

type Positions

type Positions []Position

func (Positions) Before

func (p Positions) Before(i, j int) bool

func (Positions) ByDate

func (p Positions) ByDate() Positions

func (Positions) ByOrder

func (p Positions) ByOrder() Positions

func (Positions) Earlier

func (p Positions) Earlier(i, j int) bool

func (Positions) Len

func (p Positions) Len() int

func (Positions) Swap

func (p Positions) Swap(i, j int)

type Post

type Post struct {
	Key          string
	Related      []*Post
	Newer, Older *Post

type PostStore

type PostStore struct {
	// contains filtered or unexported fields

func NewPostStore

func NewPostStore(q database.Querier) PostStore

func (*PostStore) Get

func (ps *PostStore) Get(key string) (*Post, error)

For now always returns my first post

type SessionStore

type SessionStore struct {
	// contains filtered or unexported fields

func NewSessionFromConfig

func NewSessionFromConfig(db structs.Database) *SessionStore

func NewSessionStore

func NewSessionStore(c *structs.Config, querier database.Querier) *SessionStore

func (*SessionStore) AuthCodeURL

func (ss *SessionStore) AuthCodeURL(state string) string

func (*SessionStore) GenToken

func (ss *SessionStore) GenToken(code string) (*oauth2.Token, error)

func (*SessionStore) GetEvent

func (ss *SessionStore) GetEvent(id int) (*Event, error)

func (*SessionStore) GetUsername

func (ss *SessionStore) GetUsername(token *oauth2.Token) (string, error)

func (*SessionStore) ListEvents

func (ss *SessionStore) ListEvents() ([]Event, error)

type User

type User struct {
	ID       int
	Username string
	Name     string
	Bio      string

type UserStore

type UserStore struct {
	// contains filtered or unexported fields

func NewUserStore

func NewUserStore(q database.Querier) UserStore

func (*UserStore) Create

func (us *UserStore) Create(username, password string) (int, error)

func (*UserStore) Get

func (us *UserStore) Get(id int) (User, Positions, error)

func (*UserStore) GetByUsername

func (us *UserStore) GetByUsername(username string) (User, Positions, error)

func (*UserStore) GetCommittee

func (us *UserStore) GetCommittee() (executive Committee, committee Committee, err error)

func (*UserStore) Validate

func (us *UserStore) Validate(username, password string) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to