<commit_before>package interfaces

import (
	"github.com/Rugvip/bullettime/types"
)

type RoomService interface {
	GetRoom(types.RoomId) (Room, error)
	CreateRoom(hostname string, creator User, desc *types.RoomDescription) (Room, *types.Alias, error)
}

type Room interface {
	Id() types.RoomId
	AddMessage(user User, content types.TypedContent) (*types.Event, error)
	SetState(user User, content types.TypedContent, stateKey string) (*types.State, error)
	GetState(user User, eventType, stateKey string) (*types.State, error)
}

type UserService interface {
	GetUser(types.UserId) (User, error)
	CreateUser(types.UserId) (User, error)
}

type User interface {
	Id() types.UserId
	VerifyPassword(password string) error
	SetPassword(password string) error
	GetProfile() (types.UserProfile, error)
	SetDisplayName(name string, by User) error
	SetAvatarUrl(url string, by User) error
}
<commit_msg>interfaces: added TokenService and Token interfaces<commit_after>package interfaces

import (
	"fmt"

	"github.com/Rugvip/bullettime/types"
)

type RoomService interface {
	GetRoom(types.RoomId) (Room, error)
	CreateRoom(hostname string, creator User, desc *types.RoomDescription) (Room, *types.Alias, error)
}

type Room interface {
	Id() types.RoomId
	AddMessage(user User, content types.TypedContent) (*types.Event, error)
	SetState(user User, content types.TypedContent, stateKey string) (*types.State, error)
	GetState(user User, eventType, stateKey string) (*types.State, error)
}

type UserService interface {
	GetUser(types.UserId) (User, error)
	CreateUser(types.UserId) (User, error)
}

type User interface {
	Id() types.UserId
	VerifyPassword(password string) error
	SetPassword(password string) error
	GetProfile() (types.UserProfile, error)
	SetDisplayName(name string, by User) error
	SetAvatarUrl(url string, by User) error
}

type TokenService interface {
	NewAccessToken(types.UserId) (Token, error)
	ParseAccessToken(token string) (Token, error)
}

type Token interface {
	fmt.Stringer
	UserId() types.UserId
}

{'fraction_non_alphanumeric': 0.10869565217391304, 'fraction_numerical': 0.0, 'mean_word_length': 6.03125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1274016', 'n_tokens_mistral': 639, 'n_tokens_neox': 649, 'n_words': 178}