add variable and method comments
This commit is contained in:
@@ -29,8 +29,10 @@ var DefaultPrefixMap = map[string]ObjectType{
|
||||
TypeUser.Prefix(): TypeUser,
|
||||
}
|
||||
|
||||
// ObjectType defines a type of object.
|
||||
type ObjectType string
|
||||
|
||||
// Prefix returns the objects id prefix.
|
||||
func (t ObjectType) Prefix() string {
|
||||
switch t {
|
||||
case TypeOrganization:
|
||||
@@ -44,6 +46,7 @@ func (t ObjectType) Prefix() string {
|
||||
}
|
||||
}
|
||||
|
||||
// String returns a string fo the object type.
|
||||
func (t ObjectType) String() string {
|
||||
return string(t)
|
||||
}
|
||||
@@ -96,6 +99,7 @@ func (r prefixedID) PrefixedID() gidx.PrefixedID {
|
||||
return r.id
|
||||
}
|
||||
|
||||
// New creates a new service.
|
||||
func New(publisher *events.Publisher, metal *metal.Client, perms *permissions.Client, options ...Option) (Service, error) {
|
||||
svc := &service{
|
||||
publisher: publisher,
|
||||
|
||||
Reference in New Issue
Block a user