model

package
v0.0.0-...-bc5b573 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2025 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Rafta_GetAllTasks_FullMethodName       = "/Rafta/GetAllTasks"
	Rafta_GetTask_FullMethodName           = "/Rafta/GetTask"
	Rafta_GetUserInfo_FullMethodName       = "/Rafta/GetUserInfo"
	Rafta_DeleteUser_FullMethodName        = "/Rafta/DeleteUser"
	Rafta_UpdateCredentials_FullMethodName = "/Rafta/UpdateCredentials"
	Rafta_UpdateUserInfo_FullMethodName    = "/Rafta/UpdateUserInfo"
	Rafta_NewTask_FullMethodName           = "/Rafta/NewTask"
	Rafta_DeleteTask_FullMethodName        = "/Rafta/DeleteTask"
	Rafta_UpdateTask_FullMethodName        = "/Rafta/UpdateTask"
)
View Source
const (
	Admin_GetAllUsers_FullMethodName       = "/Admin/GetAllUsers"
	Admin_GetUser_FullMethodName           = "/Admin/GetUser"
	Admin_GetUserTasks_FullMethodName      = "/Admin/GetUserTasks"
	Admin_UpdateCredentials_FullMethodName = "/Admin/UpdateCredentials"
	Admin_NewUser_FullMethodName           = "/Admin/NewUser"
	Admin_DeleteUser_FullMethodName        = "/Admin/DeleteUser"
	Admin_UpdateUser_FullMethodName        = "/Admin/UpdateUser"
	Admin_GetUserRoles_FullMethodName      = "/Admin/GetUserRoles"
	Admin_UpdateUserRoles_FullMethodName   = "/Admin/UpdateUserRoles"
)
View Source
const (
	Auth_Signup_FullMethodName  = "/Auth/Signup"
	Auth_Login_FullMethodName   = "/Auth/Login"
	Auth_Refresh_FullMethodName = "/Auth/Refresh"
)

Variables

View Source
var (
	TaskState_name = map[int32]string{
		0: "UNSPECIFIED",
		1: "PENDING",
		2: "ONGOING",
		3: "DONE",
		4: "BLOCKED",
	}
	TaskState_value = map[string]int32{
		"UNSPECIFIED": 0,
		"PENDING":     1,
		"ONGOING":     2,
		"DONE":        3,
		"BLOCKED":     4,
	}
)

Enum value maps for TaskState.

View Source
var (
	TaskFieldMask_name = map[int32]string{
		0: "TITLE",
		1: "DESC",
		2: "PRIORITY",
		3: "STATE",
		4: "RECURRENCE",
		7: "TAGS",
	}
	TaskFieldMask_value = map[string]int32{
		"TITLE":      0,
		"DESC":       1,
		"PRIORITY":   2,
		"STATE":      3,
		"RECURRENCE": 4,
		"TAGS":       7,
	}
)

Enum value maps for TaskFieldMask.

View Source
var Admin_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Admin",
	HandlerType: (*AdminServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAllUsers",
			Handler:    _Admin_GetAllUsers_Handler,
		},
		{
			MethodName: "GetUser",
			Handler:    _Admin_GetUser_Handler,
		},
		{
			MethodName: "GetUserTasks",
			Handler:    _Admin_GetUserTasks_Handler,
		},
		{
			MethodName: "UpdateCredentials",
			Handler:    _Admin_UpdateCredentials_Handler,
		},
		{
			MethodName: "NewUser",
			Handler:    _Admin_NewUser_Handler,
		},
		{
			MethodName: "DeleteUser",
			Handler:    _Admin_DeleteUser_Handler,
		},
		{
			MethodName: "UpdateUser",
			Handler:    _Admin_UpdateUser_Handler,
		},
		{
			MethodName: "GetUserRoles",
			Handler:    _Admin_GetUserRoles_Handler,
		},
		{
			MethodName: "UpdateUserRoles",
			Handler:    _Admin_UpdateUserRoles_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "schema.proto",
}

Admin_ServiceDesc is the grpc.ServiceDesc for Admin service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Auth_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Auth",
	HandlerType: (*AuthServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Signup",
			Handler:    _Auth_Signup_Handler,
		},
		{
			MethodName: "Login",
			Handler:    _Auth_Login_Handler,
		},
		{
			MethodName: "Refresh",
			Handler:    _Auth_Refresh_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "schema.proto",
}

Auth_ServiceDesc is the grpc.ServiceDesc for Auth service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_schema_proto protoreflect.FileDescriptor
View Source
var Rafta_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Rafta",
	HandlerType: (*RaftaServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAllTasks",
			Handler:    _Rafta_GetAllTasks_Handler,
		},
		{
			MethodName: "GetTask",
			Handler:    _Rafta_GetTask_Handler,
		},
		{
			MethodName: "GetUserInfo",
			Handler:    _Rafta_GetUserInfo_Handler,
		},
		{
			MethodName: "DeleteUser",
			Handler:    _Rafta_DeleteUser_Handler,
		},
		{
			MethodName: "UpdateCredentials",
			Handler:    _Rafta_UpdateCredentials_Handler,
		},
		{
			MethodName: "UpdateUserInfo",
			Handler:    _Rafta_UpdateUserInfo_Handler,
		},
		{
			MethodName: "NewTask",
			Handler:    _Rafta_NewTask_Handler,
		},
		{
			MethodName: "DeleteTask",
			Handler:    _Rafta_DeleteTask_Handler,
		},
		{
			MethodName: "UpdateTask",
			Handler:    _Rafta_UpdateTask_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "schema.proto",
}

Rafta_ServiceDesc is the grpc.ServiceDesc for Rafta service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterAdminServer

func RegisterAdminServer(s grpc.ServiceRegistrar, srv AdminServer)

func RegisterAuthServer

func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)

func RegisterRaftaServer

func RegisterRaftaServer(s grpc.ServiceRegistrar, srv RaftaServer)

Types

type AdminClient

type AdminClient interface {
	// Retrieves a list of all users in the system. This is useful for admins to
	// get an overview of the user base or perform bulk operations.
	//
	// ***IF YOU'RE A SERVER ADMIN, PLZ BE NICE, DON'T VIOLATE USER PRIVACY***
	GetAllUsers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UserList, error)
	// Retrieves the details of a specific user. This is helpful for admins to
	// view user information for troubleshooting or auditing purposes.
	//
	// ***IF YOU'RE A SERVER ADMIN, PLZ BE NICE, DON'T VIOLATE USER PRIVACY***
	GetUser(ctx context.Context, in *UUID, opts ...grpc.CallOption) (*User, error)
	// GetUserTasks is meant to exist as a debugging tool to troubleshoot if a
	// users tasks seem broken in some way. It allows a admin to investigate
	// the issue without impersonating the user.
	//
	// ***IF YOU'RE A SERVER ADMIN, PLZ BE NICE, DON'T INVADE PEOPLES PRIVACY***
	GetUserTasks(ctx context.Context, in *UUID, opts ...grpc.CallOption) (*TaskList, error)
	// This is allows the admin of the platform to change a user's passwords.
	// This is meant as a tool to help users that have lost their password.
	//
	// ***IF YOU'RE A SERVER ADMIN, PLZ BE NICE, DON'T LOCK PEOPLE OUT***
	UpdateCredentials(ctx context.Context, in *ChangePasswdRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// An admin isn't meant to login as another user therefore no JWT is sent
	// This is mostly useful for server maintainers that want to create accounts
	// for friends without enabling public signups.
	//
	// ***IF YOU'RE A SERVER ADMIN, PLZ BE NICE, ASK USERS TO UPDATE THEIR CREDS***
	NewUser(ctx context.Context, in *UserSignupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Deletes a specific user by their UUID. This is meant as a tool for admins to
	// remove malicious users.
	//
	// ***IF YOU'RE A SERVER ADMIN, PLZ BE NICE, DONT DELETE PEOPLE UNWARANTED***
	DeleteUser(ctx context.Context, in *UUID, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Updates the details of a specific user. This is meant to allow admins to
	// correct user information or update their profiles as needed.
	//
	// ***IF YOU'RE A SERVER ADMIN, PLZ BE NICE, DON'T EDIT USERS UNWARANTED***
	UpdateUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Since role information is only packaged in JWTs (which an admin can't get
	// from another user), this is meant to help admins track which users have
	// special rights.
	GetUserRoles(ctx context.Context, in *UUID, opts ...grpc.CallOption) (*UserRoles, error)
	// Allows an admin to add other admins to the platform to ease server
	// management The only moment this will refuse to work is when the only
	// admin of a server tries to revoke his own role.
	UpdateUserRoles(ctx context.Context, in *UUID, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

AdminClient is the client API for Admin service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

Service for administrative operations accessible only to users with the ADMIN role

func NewAdminClient

func NewAdminClient(cc grpc.ClientConnInterface) AdminClient

type AdminServer

type AdminServer interface {
	// Retrieves a list of all users in the system. This is useful for admins to
	// get an overview of the user base or perform bulk operations.
	//
	// ***IF YOU'RE A SERVER ADMIN, PLZ BE NICE, DON'T VIOLATE USER PRIVACY***
	GetAllUsers(context.Context, *emptypb.Empty) (*UserList, error)
	// Retrieves the details of a specific user. This is helpful for admins to
	// view user information for troubleshooting or auditing purposes.
	//
	// ***IF YOU'RE A SERVER ADMIN, PLZ BE NICE, DON'T VIOLATE USER PRIVACY***
	GetUser(context.Context, *UUID) (*User, error)
	// GetUserTasks is meant to exist as a debugging tool to troubleshoot if a
	// users tasks seem broken in some way. It allows a admin to investigate
	// the issue without impersonating the user.
	//
	// ***IF YOU'RE A SERVER ADMIN, PLZ BE NICE, DON'T INVADE PEOPLES PRIVACY***
	GetUserTasks(context.Context, *UUID) (*TaskList, error)
	// This is allows the admin of the platform to change a user's passwords.
	// This is meant as a tool to help users that have lost their password.
	//
	// ***IF YOU'RE A SERVER ADMIN, PLZ BE NICE, DON'T LOCK PEOPLE OUT***
	UpdateCredentials(context.Context, *ChangePasswdRequest) (*emptypb.Empty, error)
	// An admin isn't meant to login as another user therefore no JWT is sent
	// This is mostly useful for server maintainers that want to create accounts
	// for friends without enabling public signups.
	//
	// ***IF YOU'RE A SERVER ADMIN, PLZ BE NICE, ASK USERS TO UPDATE THEIR CREDS***
	NewUser(context.Context, *UserSignupRequest) (*emptypb.Empty, error)
	// Deletes a specific user by their UUID. This is meant as a tool for admins to
	// remove malicious users.
	//
	// ***IF YOU'RE A SERVER ADMIN, PLZ BE NICE, DONT DELETE PEOPLE UNWARANTED***
	DeleteUser(context.Context, *UUID) (*emptypb.Empty, error)
	// Updates the details of a specific user. This is meant to allow admins to
	// correct user information or update their profiles as needed.
	//
	// ***IF YOU'RE A SERVER ADMIN, PLZ BE NICE, DON'T EDIT USERS UNWARANTED***
	UpdateUser(context.Context, *User) (*emptypb.Empty, error)
	// Since role information is only packaged in JWTs (which an admin can't get
	// from another user), this is meant to help admins track which users have
	// special rights.
	GetUserRoles(context.Context, *UUID) (*UserRoles, error)
	// Allows an admin to add other admins to the platform to ease server
	// management The only moment this will refuse to work is when the only
	// admin of a server tries to revoke his own role.
	UpdateUserRoles(context.Context, *UUID) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

AdminServer is the server API for Admin service. All implementations must embed UnimplementedAdminServer for forward compatibility.

Service for administrative operations accessible only to users with the ADMIN role

type AuthClient

type AuthClient interface {
	// Signs up a new user (no auth required)
	Signup(ctx context.Context, in *UserSignupRequest, opts ...grpc.CallOption) (*LoginResponse, error)
	// Logs in an existing user using Basic auth ( ex: base64(username:password) )
	// providing the user with a pair of JWT (access + refresh)
	Login(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*LoginResponse, error)
	// Provides a new pair of JWT and revokes the refresh token provided to
	// make that request.
	Refresh(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*JWT, error)
}

AuthClient is the client API for Auth service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

Service for authentication-related operations.

func NewAuthClient

func NewAuthClient(cc grpc.ClientConnInterface) AuthClient

type AuthServer

type AuthServer interface {
	// Signs up a new user (no auth required)
	Signup(context.Context, *UserSignupRequest) (*LoginResponse, error)
	// Logs in an existing user using Basic auth ( ex: base64(username:password) )
	// providing the user with a pair of JWT (access + refresh)
	Login(context.Context, *emptypb.Empty) (*LoginResponse, error)
	// Provides a new pair of JWT and revokes the refresh token provided to
	// make that request.
	Refresh(context.Context, *emptypb.Empty) (*JWT, error)
	// contains filtered or unexported methods
}

AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility.

Service for authentication-related operations.

type ChangePasswdRequest

type ChangePasswdRequest struct {
	Id     *UUID  `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`         // Unique identifier of the user.
	Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` // New password.
	// contains filtered or unexported fields
}

Represents a request to change a user's password.

func (*ChangePasswdRequest) Descriptor deprecated

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

Deprecated: Use ChangePasswdRequest.ProtoReflect.Descriptor instead.

func (*ChangePasswdRequest) GetId

func (x *ChangePasswdRequest) GetId() *UUID

func (*ChangePasswdRequest) GetSecret

func (x *ChangePasswdRequest) GetSecret() string

func (*ChangePasswdRequest) ProtoMessage

func (*ChangePasswdRequest) ProtoMessage()

func (*ChangePasswdRequest) ProtoReflect

func (x *ChangePasswdRequest) ProtoReflect() protoreflect.Message

func (*ChangePasswdRequest) Reset

func (x *ChangePasswdRequest) Reset()

func (*ChangePasswdRequest) String

func (x *ChangePasswdRequest) String() string

type JWT

type JWT struct {
	Access  string `protobuf:"bytes,1,opt,name=access,proto3" json:"access,omitempty"`   // Access token.
	Refresh string `protobuf:"bytes,2,opt,name=refresh,proto3" json:"refresh,omitempty"` // Refresh token.
	// contains filtered or unexported fields
}

Represents JSON Web Tokens (JWT) for authentication.

func (*JWT) Descriptor deprecated

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

Deprecated: Use JWT.ProtoReflect.Descriptor instead.

func (*JWT) GetAccess

func (x *JWT) GetAccess() string

func (*JWT) GetRefresh

func (x *JWT) GetRefresh() string

func (*JWT) ProtoMessage

func (*JWT) ProtoMessage()

func (*JWT) ProtoReflect

func (x *JWT) ProtoReflect() protoreflect.Message

func (*JWT) Reset

func (x *JWT) Reset()

func (*JWT) String

func (x *JWT) String() string

type LoginResponse

type LoginResponse struct {
	User   *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`     // Authenticated user.
	Tokens *JWT  `protobuf:"bytes,2,opt,name=tokens,proto3" json:"tokens,omitempty"` // Authentication tokens.
	// contains filtered or unexported fields
}

Represents the response to a login request.

func (*LoginResponse) Descriptor deprecated

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

Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.

func (*LoginResponse) GetTokens

func (x *LoginResponse) GetTokens() *JWT

func (*LoginResponse) GetUser

func (x *LoginResponse) GetUser() *User

func (*LoginResponse) ProtoMessage

func (*LoginResponse) ProtoMessage()

func (*LoginResponse) ProtoReflect

func (x *LoginResponse) ProtoReflect() protoreflect.Message

func (*LoginResponse) Reset

func (x *LoginResponse) Reset()

func (*LoginResponse) String

func (x *LoginResponse) String() string

type NewTaskResponse

type NewTaskResponse struct {

	// Unique identifier of the newly created task.
	Id *UUID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Metadata of the newly created task.
	Metadata *TaskMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

Represents the response to creating a new task.

func (*NewTaskResponse) Descriptor deprecated

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

Deprecated: Use NewTaskResponse.ProtoReflect.Descriptor instead.

func (*NewTaskResponse) GetId

func (x *NewTaskResponse) GetId() *UUID

func (*NewTaskResponse) GetMetadata

func (x *NewTaskResponse) GetMetadata() *TaskMetadata

func (*NewTaskResponse) ProtoMessage

func (*NewTaskResponse) ProtoMessage()

func (*NewTaskResponse) ProtoReflect

func (x *NewTaskResponse) ProtoReflect() protoreflect.Message

func (*NewTaskResponse) Reset

func (x *NewTaskResponse) Reset()

func (*NewTaskResponse) String

func (x *NewTaskResponse) String() string

type PasswdMessage

type PasswdMessage struct {
	Secret string `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"` // Password.
	// contains filtered or unexported fields
}

Represents a password message.

func (*PasswdMessage) Descriptor deprecated

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

Deprecated: Use PasswdMessage.ProtoReflect.Descriptor instead.

func (*PasswdMessage) GetSecret

func (x *PasswdMessage) GetSecret() string

func (*PasswdMessage) ProtoMessage

func (*PasswdMessage) ProtoMessage()

func (*PasswdMessage) ProtoReflect

func (x *PasswdMessage) ProtoReflect() protoreflect.Message

func (*PasswdMessage) Reset

func (x *PasswdMessage) Reset()

func (*PasswdMessage) String

func (x *PasswdMessage) String() string

type RaftaClient

type RaftaClient interface {
	GetAllTasks(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TaskList, error)
	GetTask(ctx context.Context, in *UUID, opts ...grpc.CallOption) (*Task, error)
	GetUserInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*User, error)
	DeleteUser(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	UpdateCredentials(ctx context.Context, in *PasswdMessage, opts ...grpc.CallOption) (*timestamppb.Timestamp, error)
	UpdateUserInfo(ctx context.Context, in *UserData, opts ...grpc.CallOption) (*timestamppb.Timestamp, error)
	NewTask(ctx context.Context, in *TaskData, opts ...grpc.CallOption) (*NewTaskResponse, error)
	DeleteTask(ctx context.Context, in *UUID, opts ...grpc.CallOption) (*emptypb.Empty, error)
	UpdateTask(ctx context.Context, in *TaskUpdateRequest, opts ...grpc.CallOption) (*TaskUpdateResponse, error)
}

RaftaClient is the client API for Rafta service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

Service for user and task management accessible to authenticated users.

func NewRaftaClient

func NewRaftaClient(cc grpc.ClientConnInterface) RaftaClient

type RaftaServer

type RaftaServer interface {
	GetAllTasks(context.Context, *emptypb.Empty) (*TaskList, error)
	GetTask(context.Context, *UUID) (*Task, error)
	GetUserInfo(context.Context, *emptypb.Empty) (*User, error)
	DeleteUser(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	UpdateCredentials(context.Context, *PasswdMessage) (*timestamppb.Timestamp, error)
	UpdateUserInfo(context.Context, *UserData) (*timestamppb.Timestamp, error)
	NewTask(context.Context, *TaskData) (*NewTaskResponse, error)
	DeleteTask(context.Context, *UUID) (*emptypb.Empty, error)
	UpdateTask(context.Context, *TaskUpdateRequest) (*TaskUpdateResponse, error)
	// contains filtered or unexported methods
}

RaftaServer is the server API for Rafta service. All implementations must embed UnimplementedRaftaServer for forward compatibility.

Service for user and task management accessible to authenticated users.

type RefreshRequest

type RefreshRequest struct {
	RefreshToken string `protobuf:"bytes,1,opt,name=refreshToken,proto3" json:"refreshToken,omitempty"` // Refresh token.
	// contains filtered or unexported fields
}

Represents a request to refresh authentication tokens.

func (*RefreshRequest) Descriptor deprecated

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

Deprecated: Use RefreshRequest.ProtoReflect.Descriptor instead.

func (*RefreshRequest) GetRefreshToken

func (x *RefreshRequest) GetRefreshToken() string

func (*RefreshRequest) ProtoMessage

func (*RefreshRequest) ProtoMessage()

func (*RefreshRequest) ProtoReflect

func (x *RefreshRequest) ProtoReflect() protoreflect.Message

func (*RefreshRequest) Reset

func (x *RefreshRequest) Reset()

func (*RefreshRequest) String

func (x *RefreshRequest) String() string

type Task

type Task struct {
	Id       *UUID         `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`             // Unique identifier for the task.
	Data     *TaskData     `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`         // Task data.
	Metadata *TaskMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` // Metadata about the task.
	// contains filtered or unexported fields
}

Represents a task with associated data and metadata.

func (*Task) Descriptor deprecated

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

Deprecated: Use Task.ProtoReflect.Descriptor instead.

func (*Task) GetData

func (x *Task) GetData() *TaskData

func (*Task) GetId

func (x *Task) GetId() *UUID

func (*Task) GetMetadata

func (x *Task) GetMetadata() *TaskMetadata

func (*Task) ProtoMessage

func (*Task) ProtoMessage()

func (*Task) ProtoReflect

func (x *Task) ProtoReflect() protoreflect.Message

func (*Task) Reset

func (x *Task) Reset()

func (*Task) String

func (x *Task) String() string

type TaskData

type TaskData struct {
	Title      string                 `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`                    // Task title.
	Desc       string                 `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`                      // Task description in markdown format.
	Priority   uint32                 `protobuf:"varint,3,opt,name=priority,proto3" json:"priority,omitempty"`             // Task priority (0=undefined, 1=highest, 0xFFFFFFFF=lowest).
	State      TaskState              `protobuf:"varint,4,opt,name=state,proto3,enum=TaskState" json:"state,omitempty"`    // Current state of the task.
	Recurrence *TaskRecurrence        `protobuf:"bytes,5,opt,name=recurrence,proto3" json:"recurrence,omitempty"`          // Recurrence details of the task.
	DoDate     *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=do_date,json=doDate,proto3" json:"do_date,omitempty"`    // Date when the task should be started.
	DueDate    *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=due_date,json=dueDate,proto3" json:"due_date,omitempty"` // Deadline for the task.
	Tags       []string               `protobuf:"bytes,9,rep,name=tags,proto3" json:"tags,omitempty"`                      // Tags associated with the task.
	// contains filtered or unexported fields
}

Represents the data associated with a task.

func (*TaskData) Descriptor deprecated

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

Deprecated: Use TaskData.ProtoReflect.Descriptor instead.

func (*TaskData) GetDesc

func (x *TaskData) GetDesc() string

func (*TaskData) GetDoDate

func (x *TaskData) GetDoDate() *timestamppb.Timestamp

func (*TaskData) GetDueDate

func (x *TaskData) GetDueDate() *timestamppb.Timestamp

func (*TaskData) GetPriority

func (x *TaskData) GetPriority() uint32

func (*TaskData) GetRecurrence

func (x *TaskData) GetRecurrence() *TaskRecurrence

func (*TaskData) GetState

func (x *TaskData) GetState() TaskState

func (*TaskData) GetTags

func (x *TaskData) GetTags() []string

func (*TaskData) GetTitle

func (x *TaskData) GetTitle() string

func (*TaskData) ProtoMessage

func (*TaskData) ProtoMessage()

func (*TaskData) ProtoReflect

func (x *TaskData) ProtoReflect() protoreflect.Message

func (*TaskData) Reset

func (x *TaskData) Reset()

func (*TaskData) String

func (x *TaskData) String() string

type TaskFieldMask

type TaskFieldMask int32

When updating tasks, it is wasteful to send information that hasn't changed (especially the description which is an entire markdown file. Include in update requests the list of all fields that need changing using this enum to identify each field.

const (
	TaskFieldMask_TITLE      TaskFieldMask = 0 // Binds to TaskData.title
	TaskFieldMask_DESC       TaskFieldMask = 1 // Binds to TaskData.desc
	TaskFieldMask_PRIORITY   TaskFieldMask = 2 // Binds to TaskData.priority
	TaskFieldMask_STATE      TaskFieldMask = 3 // Binds to TaskData.state
	TaskFieldMask_RECURRENCE TaskFieldMask = 4 // Binds to TaskData.recurrence
	TaskFieldMask_TAGS       TaskFieldMask = 7 // Binds to TaskData.tags
)

func (TaskFieldMask) Descriptor

func (TaskFieldMask) Enum

func (x TaskFieldMask) Enum() *TaskFieldMask

func (TaskFieldMask) EnumDescriptor deprecated

func (TaskFieldMask) EnumDescriptor() ([]byte, []int)

Deprecated: Use TaskFieldMask.Descriptor instead.

func (TaskFieldMask) Number

func (TaskFieldMask) String

func (x TaskFieldMask) String() string

func (TaskFieldMask) Type

type TaskList

type TaskList struct {
	Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` // List of tasks.
	// contains filtered or unexported fields
}

Represents a list of tasks.

func (*TaskList) Descriptor deprecated

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

Deprecated: Use TaskList.ProtoReflect.Descriptor instead.

func (*TaskList) GetTasks

func (x *TaskList) GetTasks() []*Task

func (*TaskList) ProtoMessage

func (*TaskList) ProtoMessage()

func (*TaskList) ProtoReflect

func (x *TaskList) ProtoReflect() protoreflect.Message

func (*TaskList) Reset

func (x *TaskList) Reset()

func (*TaskList) String

func (x *TaskList) String() string

type TaskMetadata

type TaskMetadata struct {
	CreatedOn *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created_on,json=createdOn,proto3" json:"created_on,omitempty"` // Timestamp when the task was created.
	UpdatedOn *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=updated_on,json=updatedOn,proto3" json:"updated_on,omitempty"` // Timestamp when the task was last updated.
	// contains filtered or unexported fields
}

Represents metadata associated with a task.

func (*TaskMetadata) Descriptor deprecated

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

Deprecated: Use TaskMetadata.ProtoReflect.Descriptor instead.

func (*TaskMetadata) GetCreatedOn

func (x *TaskMetadata) GetCreatedOn() *timestamppb.Timestamp

func (*TaskMetadata) GetUpdatedOn

func (x *TaskMetadata) GetUpdatedOn() *timestamppb.Timestamp

func (*TaskMetadata) ProtoMessage

func (*TaskMetadata) ProtoMessage()

func (*TaskMetadata) ProtoReflect

func (x *TaskMetadata) ProtoReflect() protoreflect.Message

func (*TaskMetadata) Reset

func (x *TaskMetadata) Reset()

func (*TaskMetadata) String

func (x *TaskMetadata) String() string

type TaskRecurrence

type TaskRecurrence struct {

	// Parseable recurrence pattern (ex: cron expression)
	Pattern string `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,omitempty"`
	// Whether the task is currently recurring. If not, a new task doesn't get
	// automatically created upon completion.
	Active bool `protobuf:"varint,2,opt,name=active,proto3" json:"active,omitempty"`
	// contains filtered or unexported fields
}

Represents task the recurrence WIP: a custom library will be developed to generate recurrence instructions in the context of a tasks application.

func (*TaskRecurrence) Descriptor deprecated

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

Deprecated: Use TaskRecurrence.ProtoReflect.Descriptor instead.

func (*TaskRecurrence) GetActive

func (x *TaskRecurrence) GetActive() bool

func (*TaskRecurrence) GetPattern

func (x *TaskRecurrence) GetPattern() string

func (*TaskRecurrence) ProtoMessage

func (*TaskRecurrence) ProtoMessage()

func (*TaskRecurrence) ProtoReflect

func (x *TaskRecurrence) ProtoReflect() protoreflect.Message

func (*TaskRecurrence) Reset

func (x *TaskRecurrence) Reset()

func (*TaskRecurrence) String

func (x *TaskRecurrence) String() string

type TaskState

type TaskState int32

Represents the possible states of a task.

const (
	TaskState_UNSPECIFIED TaskState = 0 // Recommended by protobuf
	TaskState_PENDING     TaskState = 1
	TaskState_ONGOING     TaskState = 2
	TaskState_DONE        TaskState = 3
	TaskState_BLOCKED     TaskState = 4
)

func (TaskState) Descriptor

func (TaskState) Descriptor() protoreflect.EnumDescriptor

func (TaskState) Enum

func (x TaskState) Enum() *TaskState

func (TaskState) EnumDescriptor deprecated

func (TaskState) EnumDescriptor() ([]byte, []int)

Deprecated: Use TaskState.Descriptor instead.

func (TaskState) Number

func (x TaskState) Number() protoreflect.EnumNumber

func (TaskState) String

func (x TaskState) String() string

func (TaskState) Type

type TaskUpdateRequest

type TaskUpdateRequest struct {
	Id    *UUID           `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`                                  // Unique identifier of the task to update.
	Data  *TaskData       `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`                              // Updated task data.
	Masks []TaskFieldMask `protobuf:"varint,3,rep,packed,name=masks,proto3,enum=TaskFieldMask" json:"masks,omitempty"` // Fields to update.
	// contains filtered or unexported fields
}

Represents a request to update a task.

func (*TaskUpdateRequest) Descriptor deprecated

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

Deprecated: Use TaskUpdateRequest.ProtoReflect.Descriptor instead.

func (*TaskUpdateRequest) GetData

func (x *TaskUpdateRequest) GetData() *TaskData

func (*TaskUpdateRequest) GetId

func (x *TaskUpdateRequest) GetId() *UUID

func (*TaskUpdateRequest) GetMasks

func (x *TaskUpdateRequest) GetMasks() []TaskFieldMask

func (*TaskUpdateRequest) ProtoMessage

func (*TaskUpdateRequest) ProtoMessage()

func (*TaskUpdateRequest) ProtoReflect

func (x *TaskUpdateRequest) ProtoReflect() protoreflect.Message

func (*TaskUpdateRequest) Reset

func (x *TaskUpdateRequest) Reset()

func (*TaskUpdateRequest) String

func (x *TaskUpdateRequest) String() string

type TaskUpdateResponse

type TaskUpdateResponse struct {

	// Only part of the Tasks metadata that changes
	UpdatedOn *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=updated_on,json=updatedOn,proto3" json:"updated_on,omitempty"`
	// If the update request marked as complete a recurring task, the new task
	// resulting from the completion gets sent back to the client.
	NewTask *Task `protobuf:"bytes,3,opt,name=new_task,json=newTask,proto3" json:"new_task,omitempty"`
	// contains filtered or unexported fields
}

Represents a response to a task update request.

func (*TaskUpdateResponse) Descriptor deprecated

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

Deprecated: Use TaskUpdateResponse.ProtoReflect.Descriptor instead.

func (*TaskUpdateResponse) GetNewTask

func (x *TaskUpdateResponse) GetNewTask() *Task

func (*TaskUpdateResponse) GetUpdatedOn

func (x *TaskUpdateResponse) GetUpdatedOn() *timestamppb.Timestamp

func (*TaskUpdateResponse) ProtoMessage

func (*TaskUpdateResponse) ProtoMessage()

func (*TaskUpdateResponse) ProtoReflect

func (x *TaskUpdateResponse) ProtoReflect() protoreflect.Message

func (*TaskUpdateResponse) Reset

func (x *TaskUpdateResponse) Reset()

func (*TaskUpdateResponse) String

func (x *TaskUpdateResponse) String() string

type UUID

type UUID struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Represents a universally unique identifier (UUID) used to identify both users and tasks.

func (*UUID) Descriptor deprecated

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

Deprecated: Use UUID.ProtoReflect.Descriptor instead.

func (*UUID) GetValue

func (x *UUID) GetValue() string

func (*UUID) ProtoMessage

func (*UUID) ProtoMessage()

func (*UUID) ProtoReflect

func (x *UUID) ProtoReflect() protoreflect.Message

func (*UUID) Reset

func (x *UUID) Reset()

func (*UUID) String

func (x *UUID) String() string

type UnimplementedAdminServer

type UnimplementedAdminServer struct{}

UnimplementedAdminServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedAdminServer) DeleteUser

func (UnimplementedAdminServer) GetAllUsers

func (UnimplementedAdminServer) GetUser

func (UnimplementedAdminServer) GetUserRoles

func (UnimplementedAdminServer) GetUserTasks

func (UnimplementedAdminServer) NewUser

func (UnimplementedAdminServer) UpdateCredentials

func (UnimplementedAdminServer) UpdateUser

func (UnimplementedAdminServer) UpdateUserRoles

type UnimplementedAuthServer

type UnimplementedAuthServer struct{}

UnimplementedAuthServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedAuthServer) Login

func (UnimplementedAuthServer) Refresh

func (UnimplementedAuthServer) Signup

type UnimplementedRaftaServer

type UnimplementedRaftaServer struct{}

UnimplementedRaftaServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedRaftaServer) DeleteTask

func (UnimplementedRaftaServer) DeleteUser

func (UnimplementedRaftaServer) GetAllTasks

func (UnimplementedRaftaServer) GetTask

func (UnimplementedRaftaServer) GetUserInfo

func (UnimplementedRaftaServer) NewTask

func (UnimplementedRaftaServer) UpdateCredentials

func (UnimplementedRaftaServer) UpdateTask

func (UnimplementedRaftaServer) UpdateUserInfo

type UnsafeAdminServer

type UnsafeAdminServer interface {
	// contains filtered or unexported methods
}

UnsafeAdminServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AdminServer will result in compilation errors.

type UnsafeAuthServer

type UnsafeAuthServer interface {
	// contains filtered or unexported methods
}

UnsafeAuthServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthServer will result in compilation errors.

type UnsafeRaftaServer

type UnsafeRaftaServer interface {
	// contains filtered or unexported methods
}

UnsafeRaftaServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RaftaServer will result in compilation errors.

type UpdateUserRolesRequest

type UpdateUserRolesRequest struct {
	UserId *UUID    `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Roles  []string `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateUserRolesRequest) Descriptor deprecated

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

Deprecated: Use UpdateUserRolesRequest.ProtoReflect.Descriptor instead.

func (*UpdateUserRolesRequest) GetRoles

func (x *UpdateUserRolesRequest) GetRoles() []string

func (*UpdateUserRolesRequest) GetUserId

func (x *UpdateUserRolesRequest) GetUserId() *UUID

func (*UpdateUserRolesRequest) ProtoMessage

func (*UpdateUserRolesRequest) ProtoMessage()

func (*UpdateUserRolesRequest) ProtoReflect

func (x *UpdateUserRolesRequest) ProtoReflect() protoreflect.Message

func (*UpdateUserRolesRequest) Reset

func (x *UpdateUserRolesRequest) Reset()

func (*UpdateUserRolesRequest) String

func (x *UpdateUserRolesRequest) String() string

type User

type User struct {
	Id       *UUID         `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Data     *UserData     `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	Metadata *UserMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

Represents a user with his associated data and metadata.

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetData

func (x *User) GetData() *UserData

func (*User) GetId

func (x *User) GetId() *UUID

func (*User) GetMetadata

func (x *User) GetMetadata() *UserMetadata

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserData

type UserData struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

Non-sensitive editable information about a user

func (*UserData) Descriptor deprecated

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

Deprecated: Use UserData.ProtoReflect.Descriptor instead.

func (*UserData) GetEmail

func (x *UserData) GetEmail() string

func (*UserData) GetName

func (x *UserData) GetName() string

func (*UserData) ProtoMessage

func (*UserData) ProtoMessage()

func (*UserData) ProtoReflect

func (x *UserData) ProtoReflect() protoreflect.Message

func (*UserData) Reset

func (x *UserData) Reset()

func (*UserData) String

func (x *UserData) String() string

type UserList

type UserList struct {
	Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` // List of users.
	// contains filtered or unexported fields
}

Represents a list of users.

func (*UserList) Descriptor deprecated

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

Deprecated: Use UserList.ProtoReflect.Descriptor instead.

func (*UserList) GetUsers

func (x *UserList) GetUsers() []*User

func (*UserList) ProtoMessage

func (*UserList) ProtoMessage()

func (*UserList) ProtoReflect

func (x *UserList) ProtoReflect() protoreflect.Message

func (*UserList) Reset

func (x *UserList) Reset()

func (*UserList) String

func (x *UserList) String() string

type UserMetadata

type UserMetadata struct {

	// Timestamp when the user was created.
	CreatedOn *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created_on,json=createdOn,proto3" json:"created_on,omitempty"`
	// Timestamp when the user's info was last updated.
	// This only relates to name, username, password
	// (creating/editing/deleteting doesn't affect this).
	UpdatedOn *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=updated_on,json=updatedOn,proto3" json:"updated_on,omitempty"`
	// contains filtered or unexported fields
}

Information about a user that is not directly under his control. Roles aren't included here as they are part of any JWT.

func (*UserMetadata) Descriptor deprecated

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

Deprecated: Use UserMetadata.ProtoReflect.Descriptor instead.

func (*UserMetadata) GetCreatedOn

func (x *UserMetadata) GetCreatedOn() *timestamppb.Timestamp

func (*UserMetadata) GetUpdatedOn

func (x *UserMetadata) GetUpdatedOn() *timestamppb.Timestamp

func (*UserMetadata) ProtoMessage

func (*UserMetadata) ProtoMessage()

func (*UserMetadata) ProtoReflect

func (x *UserMetadata) ProtoReflect() protoreflect.Message

func (*UserMetadata) Reset

func (x *UserMetadata) Reset()

func (*UserMetadata) String

func (x *UserMetadata) String() string

type UserRoles

type UserRoles struct {
	Roles []string `protobuf:"bytes,1,rep,name=roles,proto3" json:"roles,omitempty"`
	// contains filtered or unexported fields
}

func (*UserRoles) Descriptor deprecated

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

Deprecated: Use UserRoles.ProtoReflect.Descriptor instead.

func (*UserRoles) GetRoles

func (x *UserRoles) GetRoles() []string

func (*UserRoles) ProtoMessage

func (*UserRoles) ProtoMessage()

func (*UserRoles) ProtoReflect

func (x *UserRoles) ProtoReflect() protoreflect.Message

func (*UserRoles) Reset

func (x *UserRoles) Reset()

func (*UserRoles) String

func (x *UserRoles) String() string

type UserSignupRequest

type UserSignupRequest struct {
	User       *UserData `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`                               // Data of the user to sign up.
	UserSecret string    `protobuf:"bytes,2,opt,name=user_secret,json=userSecret,proto3" json:"user_secret,omitempty"` // Secret (e.g., password) for the user.
	// contains filtered or unexported fields
}

Represents a request to sign up a new user.

func (*UserSignupRequest) Descriptor deprecated

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

Deprecated: Use UserSignupRequest.ProtoReflect.Descriptor instead.

func (*UserSignupRequest) GetUser

func (x *UserSignupRequest) GetUser() *UserData

func (*UserSignupRequest) GetUserSecret

func (x *UserSignupRequest) GetUserSecret() string

func (*UserSignupRequest) ProtoMessage

func (*UserSignupRequest) ProtoMessage()

func (*UserSignupRequest) ProtoReflect

func (x *UserSignupRequest) ProtoReflect() protoreflect.Message

func (*UserSignupRequest) Reset

func (x *UserSignupRequest) Reset()

func (*UserSignupRequest) String

func (x *UserSignupRequest) String() string

Jump to

Keyboard shortcuts

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