testapp

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TournamentType_name = map[int32]string{
		0: "TOURNAMENT_TYPE_UNKNOWN",
		1: "TOURNAMENT_TYPE_DAILY",
		2: "TOURNAMENT_TYPE_WEEKLY",
		3: "TOURNAMENT_TYPE_MONTHLY",
	}
	TournamentType_value = map[string]int32{
		"TOURNAMENT_TYPE_UNKNOWN": 0,
		"TOURNAMENT_TYPE_DAILY":   1,
		"TOURNAMENT_TYPE_WEEKLY":  2,
		"TOURNAMENT_TYPE_MONTHLY": 3,
	}
)

Enum value maps for TournamentType.

View Source
var File_nsx_testapp_api_proto protoreflect.FileDescriptor
View Source
var File_nsx_testapp_user_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Event

type Event struct {
	StartTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	Name      string                 `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Players   []string               `protobuf:"bytes,3,rep,name=players,proto3" json:"players,omitempty"`
	// contains filtered or unexported fields
}

func (*Event) Descriptor deprecated

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

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetName

func (x *Event) GetName() string

func (*Event) GetPlayers

func (x *Event) GetPlayers() []string

func (*Event) GetStartTime

func (x *Event) GetStartTime() *timestamppb.Timestamp

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

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

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

type GetUserDetailsRequest

type GetUserDetailsRequest struct {
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserDetailsRequest) Descriptor deprecated

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

Deprecated: Use GetUserDetailsRequest.ProtoReflect.Descriptor instead.

func (*GetUserDetailsRequest) GetUserId

func (x *GetUserDetailsRequest) GetUserId() string

func (*GetUserDetailsRequest) ProtoMessage

func (*GetUserDetailsRequest) ProtoMessage()

func (*GetUserDetailsRequest) ProtoReflect

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

func (*GetUserDetailsRequest) Reset

func (x *GetUserDetailsRequest) Reset()

func (*GetUserDetailsRequest) String

func (x *GetUserDetailsRequest) String() string

type GetUserDetailsResponse

type GetUserDetailsResponse struct {
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserDetailsResponse) Descriptor deprecated

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

Deprecated: Use GetUserDetailsResponse.ProtoReflect.Descriptor instead.

func (*GetUserDetailsResponse) GetUser

func (x *GetUserDetailsResponse) GetUser() *User

func (*GetUserDetailsResponse) ProtoMessage

func (*GetUserDetailsResponse) ProtoMessage()

func (*GetUserDetailsResponse) ProtoReflect

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

func (*GetUserDetailsResponse) Reset

func (x *GetUserDetailsResponse) Reset()

func (*GetUserDetailsResponse) String

func (x *GetUserDetailsResponse) String() string

type MainTournamentsRequest

type MainTournamentsRequest struct {
	Empty *emptypb.Empty `protobuf:"bytes,1,opt,name=empty,proto3" json:"empty,omitempty"`
	// contains filtered or unexported fields
}

func (*MainTournamentsRequest) Descriptor deprecated

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

Deprecated: Use MainTournamentsRequest.ProtoReflect.Descriptor instead.

func (*MainTournamentsRequest) GetEmpty

func (x *MainTournamentsRequest) GetEmpty() *emptypb.Empty

func (*MainTournamentsRequest) ProtoMessage

func (*MainTournamentsRequest) ProtoMessage()

func (*MainTournamentsRequest) ProtoReflect

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

func (*MainTournamentsRequest) Reset

func (x *MainTournamentsRequest) Reset()

func (*MainTournamentsRequest) String

func (x *MainTournamentsRequest) String() string

type MainTournamentsResponse

type MainTournamentsResponse struct {
	Tournaments []*Tournament `protobuf:"bytes,1,rep,name=tournaments,proto3" json:"tournaments,omitempty"`
	// contains filtered or unexported fields
}

func (*MainTournamentsResponse) Descriptor deprecated

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

Deprecated: Use MainTournamentsResponse.ProtoReflect.Descriptor instead.

func (*MainTournamentsResponse) GetTournaments

func (x *MainTournamentsResponse) GetTournaments() []*Tournament

func (*MainTournamentsResponse) ProtoMessage

func (*MainTournamentsResponse) ProtoMessage()

func (*MainTournamentsResponse) ProtoReflect

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

func (*MainTournamentsResponse) Reset

func (x *MainTournamentsResponse) Reset()

func (*MainTournamentsResponse) String

func (x *MainTournamentsResponse) String() string

type Tournament

type Tournament struct {
	Id       string         `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name     string         `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	ImageUrl string         `protobuf:"bytes,3,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"`
	Url      string         `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"`
	Dbl      float64        `protobuf:"fixed64,5,opt,name=dbl,proto3" json:"dbl,omitempty"`
	Flt      float32        `protobuf:"fixed32,6,opt,name=flt,proto3" json:"flt,omitempty"`
	Num32    int32          `protobuf:"varint,7,opt,name=num32,proto3" json:"num32,omitempty"`
	Num64    int64          `protobuf:"varint,8,opt,name=num64,proto3" json:"num64,omitempty"`
	Unum32   uint32         `protobuf:"varint,9,opt,name=unum32,proto3" json:"unum32,omitempty"`
	Unum64   uint64         `protobuf:"varint,10,opt,name=unum64,proto3" json:"unum64,omitempty"`
	Snum32   int32          `protobuf:"zigzag32,11,opt,name=snum32,proto3" json:"snum32,omitempty"`
	Snum64   int64          `protobuf:"zigzag64,12,opt,name=snum64,proto3" json:"snum64,omitempty"`
	Fnum32   uint32         `protobuf:"fixed32,13,opt,name=fnum32,proto3" json:"fnum32,omitempty"`
	Fnum64   uint64         `protobuf:"fixed64,14,opt,name=fnum64,proto3" json:"fnum64,omitempty"`
	Sfnum32  int32          `protobuf:"fixed32,15,opt,name=sfnum32,proto3" json:"sfnum32,omitempty"`
	Sfnum64  int64          `protobuf:"fixed64,16,opt,name=sfnum64,proto3" json:"sfnum64,omitempty"`
	IsActive bool           `protobuf:"varint,17,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"`
	Data     []byte         `protobuf:"bytes,18,opt,name=data,proto3" json:"data,omitempty"`
	Type     TournamentType `protobuf:"varint,19,opt,name=type,proto3,enum=nsx.testapp.TournamentType" json:"type,omitempty"`
	Events   []*Event       `protobuf:"bytes,20,rep,name=events,proto3" json:"events,omitempty"`
	// Types that are assignable to Prize:
	//
	//	*Tournament_PrizeVal
	//	*Tournament_PrizeNum
	Prize    isTournament_Prize `protobuf_oneof:"prize"`
	Metadata map[string]string  `` /* 158-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Tournament) Descriptor deprecated

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

Deprecated: Use Tournament.ProtoReflect.Descriptor instead.

func (*Tournament) GetData

func (x *Tournament) GetData() []byte

func (*Tournament) GetDbl

func (x *Tournament) GetDbl() float64

func (*Tournament) GetEvents

func (x *Tournament) GetEvents() []*Event

func (*Tournament) GetFlt

func (x *Tournament) GetFlt() float32

func (*Tournament) GetFnum32

func (x *Tournament) GetFnum32() uint32

func (*Tournament) GetFnum64

func (x *Tournament) GetFnum64() uint64

func (*Tournament) GetId

func (x *Tournament) GetId() string

func (*Tournament) GetImageUrl

func (x *Tournament) GetImageUrl() string

func (*Tournament) GetIsActive

func (x *Tournament) GetIsActive() bool

func (*Tournament) GetMetadata

func (x *Tournament) GetMetadata() map[string]string

func (*Tournament) GetName

func (x *Tournament) GetName() string

func (*Tournament) GetNum32

func (x *Tournament) GetNum32() int32

func (*Tournament) GetNum64

func (x *Tournament) GetNum64() int64

func (*Tournament) GetPrize

func (m *Tournament) GetPrize() isTournament_Prize

func (*Tournament) GetPrizeNum

func (x *Tournament) GetPrizeNum() int32

func (*Tournament) GetPrizeVal

func (x *Tournament) GetPrizeVal() string

func (*Tournament) GetSfnum32

func (x *Tournament) GetSfnum32() int32

func (*Tournament) GetSfnum64

func (x *Tournament) GetSfnum64() int64

func (*Tournament) GetSnum32

func (x *Tournament) GetSnum32() int32

func (*Tournament) GetSnum64

func (x *Tournament) GetSnum64() int64

func (*Tournament) GetType

func (x *Tournament) GetType() TournamentType

func (*Tournament) GetUnum32

func (x *Tournament) GetUnum32() uint32

func (*Tournament) GetUnum64

func (x *Tournament) GetUnum64() uint64

func (*Tournament) GetUrl

func (x *Tournament) GetUrl() string

func (*Tournament) ProtoMessage

func (*Tournament) ProtoMessage()

func (*Tournament) ProtoReflect

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

func (*Tournament) Reset

func (x *Tournament) Reset()

func (*Tournament) String

func (x *Tournament) String() string

type TournamentCacheManager

type TournamentCacheManager struct {
	// contains filtered or unexported fields
}

func NewTournamentCacheManager

func NewTournamentCacheManager(
	updateMainTournamentsFn func(context.Context, *MainTournamentsRequest, map[string]any) (*MainTournamentsResponse, error),
	options ...gocachemanager.CacheOption,
) (*TournamentCacheManager, error)

Required Update Method(s):

  • updateMainTournamentsFn is a function that loads the data from the storage and you can pass any dependencies required to resolve it when calling the Get and Refresh methods and these will be available as the third argument of the method.

func (*TournamentCacheManager) DeleteMainTournaments added in v0.6.0

func (cm *TournamentCacheManager) DeleteMainTournaments(
	ctx context.Context,
	input *MainTournamentsRequest,
	dependencies ...map[string]any,
) error

func (*TournamentCacheManager) GetMainTournaments

func (cm *TournamentCacheManager) GetMainTournaments(
	ctx context.Context,
	input *MainTournamentsRequest,
	dependencies ...map[string]any,
) (*MainTournamentsResponse, error)

func (*TournamentCacheManager) RefreshMainTournaments

func (cm *TournamentCacheManager) RefreshMainTournaments(
	ctx context.Context,
	input *MainTournamentsRequest,
	dependencies ...map[string]any,
) (*MainTournamentsResponse, error)

func (*TournamentCacheManager) ReplaceMainTournaments added in v0.6.0

func (cm *TournamentCacheManager) ReplaceMainTournaments(
	ctx context.Context,
	input *MainTournamentsRequest,
	newValue *MainTournamentsResponse,
	dependencies ...map[string]any,
) (*MainTournamentsResponse, error)

type TournamentType

type TournamentType int32
const (
	TournamentType_TOURNAMENT_TYPE_UNKNOWN TournamentType = 0
	TournamentType_TOURNAMENT_TYPE_DAILY   TournamentType = 1
	TournamentType_TOURNAMENT_TYPE_WEEKLY  TournamentType = 2
	TournamentType_TOURNAMENT_TYPE_MONTHLY TournamentType = 3
)

func (TournamentType) Descriptor

func (TournamentType) Enum

func (x TournamentType) Enum() *TournamentType

func (TournamentType) EnumDescriptor deprecated

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

Deprecated: Use TournamentType.Descriptor instead.

func (TournamentType) Number

func (TournamentType) String

func (x TournamentType) String() string

func (TournamentType) Type

type Tournament_PrizeNum

type Tournament_PrizeNum struct {
	PrizeNum int32 `protobuf:"varint,22,opt,name=prize_num,json=prizeNum,proto3,oneof"`
}

type Tournament_PrizeVal

type Tournament_PrizeVal struct {
	PrizeVal string `protobuf:"bytes,21,opt,name=prize_val,json=prizeVal,proto3,oneof"`
}

type User

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

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetName

func (x *User) GetName() string

func (*User) GetUserId

func (x *User) GetUserId() string

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 UserCacheManager

type UserCacheManager struct {
	// contains filtered or unexported fields
}

UserCacheManager for every operation related to this service: UserCache is the service that will be used to cache user details.

func NewUserCacheManager

func NewUserCacheManager(
	updateUserDetailsFn func(context.Context, *UserDetailsRequest, map[string]any) (*UserDetailsResponse, error),
	options ...gocachemanager.CacheOption,
) (*UserCacheManager, error)

NewUserCacheManager is the constructor method for this service: UserCache is the service that will be used to cache user details. Required Update Method(s):

  • updateUserDetailsFn is a function that loads the data from the storage and you can pass any dependencies required to resolve it when calling the Get and Refresh methods and these will be available as the third argument of the method.

func (*UserCacheManager) DeleteUserDetails added in v0.6.0

func (cm *UserCacheManager) DeleteUserDetails(
	ctx context.Context,
	input *UserDetailsRequest,
	dependencies ...map[string]any,
) error

Eagerly Delete the cache for the method that: UserDetails returns the user details for the given user_id from the cache. This method is a test of a multi-line comment. It should not break other lines.

func (*UserCacheManager) GetUserDetails

func (cm *UserCacheManager) GetUserDetails(
	ctx context.Context,
	input *UserDetailsRequest,
	dependencies ...map[string]any,
) (*UserDetailsResponse, error)

GetUserDetails returns the user details for the given user_id from the cache. This method is a test of a multi-line comment. It should not break other lines.

func (*UserCacheManager) RefreshUserDetails

func (cm *UserCacheManager) RefreshUserDetails(
	ctx context.Context,
	input *UserDetailsRequest,
	dependencies ...map[string]any,
) (*UserDetailsResponse, error)

Eagerly Refresh the cache for the method that: UserDetails returns the user details for the given user_id from the cache. This method is a test of a multi-line comment. It should not break other lines.

func (*UserCacheManager) ReplaceUserDetails added in v0.6.0

func (cm *UserCacheManager) ReplaceUserDetails(
	ctx context.Context,
	input *UserDetailsRequest,
	newValue *UserDetailsResponse,
	dependencies ...map[string]any,
) (*UserDetailsResponse, error)

Eagerly Replace the cache for the method that: UserDetails returns the user details for the given user_id from the cache. This method is a test of a multi-line comment. It should not break other lines.

type UserDetailsRequest

type UserDetailsRequest struct {
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

UserDetailsRequest contains the parameters that will be used to vary the cache with.

func (*UserDetailsRequest) Descriptor deprecated

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

Deprecated: Use UserDetailsRequest.ProtoReflect.Descriptor instead.

func (*UserDetailsRequest) GetUserId

func (x *UserDetailsRequest) GetUserId() string

func (*UserDetailsRequest) ProtoMessage

func (*UserDetailsRequest) ProtoMessage()

func (*UserDetailsRequest) ProtoReflect

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

func (*UserDetailsRequest) Reset

func (x *UserDetailsRequest) Reset()

func (*UserDetailsRequest) String

func (x *UserDetailsRequest) String() string

type UserDetailsResponse

type UserDetailsResponse struct {
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

UserDetailsResponse contains the response that will be cached.

func (*UserDetailsResponse) Descriptor deprecated

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

Deprecated: Use UserDetailsResponse.ProtoReflect.Descriptor instead.

func (*UserDetailsResponse) GetUser

func (x *UserDetailsResponse) GetUser() *User

func (*UserDetailsResponse) ProtoMessage

func (*UserDetailsResponse) ProtoMessage()

func (*UserDetailsResponse) ProtoReflect

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

func (*UserDetailsResponse) Reset

func (x *UserDetailsResponse) Reset()

func (*UserDetailsResponse) String

func (x *UserDetailsResponse) String() string

Jump to

Keyboard shortcuts

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