Categorygithub.com/Edge-Center/edgecentercloud-go/v2
modulepackage
2.1.4
Repository: https://github.com/edge-center/edgecentercloud-go.git
Documentation: pkg.go.dev

# README

Edgecloud

Edgecloud is a Go client library for accessing the Edgecenter Cloud API.

You can view Edgecenter Cloud API docs here: https://apidocs.edgecenter.ru/cloud

Versions

VersionSupported?Support expirationEdgecloud CLI (ec_client)How to useNotes
master_:x:import "github.com/Edge-Center/edgecentercloud-go/v2" and choose version at go.mod file as commit sha like b193c6019f9a196442db420ac20644772c064c65New features and bug fixes arrive here first
v2_:x:import "github.com/Edge-Center/edgecentercloud-go/v2" and choose version at go.mod file as release version like v2.X.YUsed for stable releases
v105.03.2024import "github.com/Edge-Center/edgecentercloud-go" and choose version at go.mod file as release version like v1.X.YNot recommended. Use only for edgecloud ec_client usage

Install

go get github.com/Edge-Center/edgecentercloud-go/[email protected]

where X.Y.Z is the version you need.

or

go get github.com/Edge-Center/edgecentercloud-go/v2

for non Go modules usage or latest version.

Usage

import edgecloud "github.com/Edge-Center/edgecentercloud-go/v2"

Create a new EdgeCloud client, then use the exposed services to access different parts of the Edgecenter Cloud API.

Authentication

Currently, permanent api-key is the only method of authenticating with the API. You can find more information about api-key in the knowledge base.

You can then use your api-key to create a new client. Additionally, you need to set the base URL for the API, Region and Project

package main

import (
	edgecloud "github.com/Edge-Center/edgecentercloud-go/v2"
)

func main() {
	cloud, err := edgecloud.NewWithRetries(nil,
		edgecloud.SetAPIKey("<api-key>"),
		edgecloud.SetBaseURL("<base-url>"),  // e.g. "https://api.edgecenter.online/cloud" (string)
		edgecloud.SetRegion(10),             // e.g. 10 (int)
		edgecloud.SetProject(12345),         // e.g. 12345 (int)
	)
	if err != nil {
		// error processing 
    }
}

Examples

To create a new Security group:

securityGroupCreateRequest := &edgecloud.SecurityGroupCreateRequest{
    SecurityGroup: edgecloud.SecurityGroupCreateRequestInner{
        Name: "secgroup",
        SecurityGroupRules: []edgecloud.SecurityGroupRuleCreateRequest{
            {
                Direction:    edgecloud.SGRuleDirectionIngress,
                EtherType:    edgecloud.EtherTypeIPv4,
                Protocol:     edgecloud.SGRuleProtocolTCP,
                PortRangeMin: 10250,
                PortRangeMax: 10259,
            },
        },
    },
}

ctx := context.TODO()

securityGroup, _, err := cloud.SecurityGroups.Create(ctx, securityGroupCreateRequest)
if err != nil {
    // error processing 
}

Create with task response

The creation of some resources does not occur immediately; first, a task is launched that needs to be processed.

example 1, when you only need to wait for the task to complete

import "github.com/Edge-Center/edgecentercloud-go/util"

task, _, err := cloud.Floatingips.Create(ctx, &edgecloud.FloatingIPCreateRequest{})
if err != nil {
    // error processing 
}

if err = util.WaitForTaskComplete(ctx, cloud, task.Tasks[0]); err != nil {
    // error processing 
}

example 2, when you need to get the id of the created resource

import "github.com/Edge-Center/edgecentercloud-go/util"

task, _, err := cloud.Floatingips.Create(ctx, &edgecloud.FloatingIPCreateRequest{})
if err != nil {
    // error processing 
}

taskInfo, err := util.WaitAndGetTaskInfo(ctx, cloud, task.Tasks[0])
if err != nil {
    // error processing 
}

taskResult, err := util.ExtractTaskResultFromTask(taskInfo)
if err != nil {
    // error processing 
}

fipID := taskResult.FloatingIPs[0]

example 3, when you need to get the id of the created resource but using helper method (for some resources)

import "github.com/Edge-Center/edgecentercloud-go/util"

opts := &edgecloud.FloatingIPCreateRequest{}
taskResult, err := util.ExecuteAndExtractTaskResult(ctx, client.Floatingips.Create, opts, cloud)
if err != nil {
    // error processing 
}

fipID := taskResult.FloatingIPs[0]

Helpers

You can find other helpers that extend the api using util package

for example, wait for Loadbalancer provisioning status is ACTIVE

loadBalancerID := "..."
attempts := uint(8)

if err := util.WaitLoadbalancerProvisioningStatusActive(ctx, cloud, loadBalancerID, &attempts); err != nil {
    // error processing 
}

or, get volumes list by name

volumeName := "my-awesome-volume"

listVolumes, _ := util.VolumesListByName(ctx, cloud, volumeName)

or, check that the resource has been deleted

loadBalancerID := "..."
if err := util.ResourceIsDeleted(ctx, cloud.Loadbalancers.Get, loadBalancerID); err != nil {
    // error processing 
}

and others helpers

# Packages

No description provided by the author

# Functions

CheckResponse checks the API response for errors, and returns them if present.
DoRequestWithClient submits an HTTP request using the specified client.
New returns a new EdgecenterCloud API client instance.
NewArgError creates an InputError.
NewClient returns a new EdgecenterCloud API, using the given http.Client to perform all requests.
NewWithRetries returns a new EdgecenterCloud API client with default retries config.
No description provided by the author
No description provided by the author
PtrTo returns a pointer to the provided input.
SetAPIKey is a client option for setting the APIKey token.
SetBaseURL is a client option for setting the base URL.
SetProject is a client option for setting the Project.
SetRegion is a client option for setting the Region.
SetRequestHeaders sets optional HTTP headers on the client that are sent on each HTTP request.
SetUserAgent is a client option for setting the user agent.
WithRetryAndBackoffs sets retry values.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
List of ProjectState.
List of ProjectState.
List of ProjectState.
List of ProjectState.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
ArgError is an error that represents an error with an input to edgecloud.
AssignFloatingIPRequest represents a request to assign a Floating IP to an instance or a load balancer.
No description provided by the author
Attachment represents an attachment structure.
No description provided by the author
BareMetalFlavor represents an EdgecenterCloud BareMetalFlavor.
No description provided by the author
No description provided by the author
BareMetalInstancesListOpts allows the filtering and sorting of paginated collections through the API.
No description provided by the author
No description provided by the author
BareMetalRebuildOpts allows the filtering and sorting of paginated collections through the API.
No description provided by the author
BareMetalServerCreateRequest represents a request to create an bare metal server.
No description provided by the author
No description provided by the author
Client manages communication with EdgecenterCloud API.
CloudConfig used only for import.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Flavor represents an EdgecenterCloud Flavor.
FlavorListOptions specifies the optional query parameters to List method.
FlavorsOptions specifies the optional query parameters to Get loadbalancer or instance flavor method.
FlavorsServiceOp handles communication with Flavors methods of the EdgecenterCloud API.
FloatingIP represents an EdgecenterCloud FloatingIP.
FloatingIPCreateRequest represents a request to create a Floating IP.
FloatingipsServiceOp handles communication with FloatingIPs methods of the EdgecenterCloud API.
No description provided by the author
HealthMonitor represents an EdgecenterCloud Loadbalancer Pool HealthMonitor.
HealthMonitorCreateRequest represents a request to create a Loadbalancer Pool Health Monitor.
HostRoute represents a route that should be used by devices with IPs from a subnet (not including local subnet route).
No description provided by the author
No description provided by the author
Image represents an EdgecenterCloud Image.
No description provided by the author
No description provided by the author
ImagesServiceOp handles communication with Images methods of the EdgecenterCloud API.
No description provided by the author
No description provided by the author
Instance represents an EdgecenterCloud Instance.
InstanceAddress represent an instance network struct.
InstanceAttachInterfaceRequest represents a request to attach Interface to the Instance.
No description provided by the author
InstanceCheckFlavorVolumeRequest represents a request to get flavors of the instance.
InstanceCheckLimitsRequest represents a request to check the limits of an instance.
No description provided by the author
InstanceCreateRequest represents a request to create an Instance.
InstanceDeleteOptions specifies the optional query parameters to Delete method.
InstanceDetachInterfaceRequest represents a request to detach Interface from the Instance.
InstanceFlavorUpdateRequest represents a request to change the flavor of the instance.
No description provided by the author
InstanceListOptions specifies the optional query parameters to List method.
InstanceMetrics represents an EdgecenterCloud Instance metrics.
InstanceMetricsListRequest represents a request to get a Instance Metrics list.
No description provided by the author
InstancePortInterface represents an instance port interface.
InstancePutIntoServerGroupRequest represents a request to put an Interface into the Server Group.
InstancesServiceOp handles communication with Instances methods of the EdgecenterCloud API.
No description provided by the author
InstanceVolume represent an instance volume struct.
InstanceVolumeCreate represent a instance volume create struct.
No description provided by the author
KeyPair represents an EdgecenterCloud Key Pair.
KeyPairCreateRequest represents a request to create a Key Pair.
KeyPairCreateRequestV2 represents a request to create a Key Pair.
KeyPairShareRequest represents a request to share a Key Pair.
KeyPairsListOptionsV2 specifies the optional query parameters to List method.
KeyPairsServiceOp handles communication with Key Pairs (SSH keys) methods of the EdgecenterCloud API.
KeyPairV2 represents an EdgecenterCloud Key Pair.
No description provided by the author
L7PoliciesServiceOp handles communication with L7Policies methods of the EdgecenterCloud API.
L7Policy represents an EdgecenterCloud L7Policy.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
L7RulesServiceOp handles communication with L7Rules methods of the EdgecenterCloud API.
No description provided by the author
LifeCyclePoliciesServiceOp handles communication with lifecycle policies methods of the EdgecenterCloud API.
LifeCyclePolicy represents a lifecycle policy resource.
LifeCyclePolicyAddSchedulesRequest represents options for AddSchedules.
LifeCyclePolicyAddVolumesRequest represents options for AddVolumes.
No description provided by the author
No description provided by the author
LifeCyclePolicyCreateCronScheduleRequest represents options used to create a single cron schedule.
LifeCyclePolicyCreateIntervalScheduleRequest represents options used to create a single interval schedule.
No description provided by the author
No description provided by the author
No description provided by the author
LifeCyclePolicyEstimateCronRequest represent options for EstimateCronMaxPolicyUsage.
LifeCyclePolicyEstimateIntervalRequest represent options for EstimateIntervalMaxPolicyUsage.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
LifeCyclePolicyRawSchedule is internal struct for unmarshalling into LifeCyclePolicySchedule.
LifeCyclePolicyRemoveSchedulesRequest represents options for RemoveSchedules.
LifeCyclePolicyRemoveVolumesRequest represents options for AddVolumes.
No description provided by the author
No description provided by the author
LifeCyclePolicyVolume represents a volume resource.
LimiterStats represents a limiter_stats structure.
ListCombinedOptions specifies the query parameters to ListCombined method.
Listener represents an EdgecenterCloud Loadbalancer Listener.
ListenerCreateRequest represents a request to create a Loadbalancer Listener.
ListenerListOptions specifies the optional query parameters to List method.
ListenerUpdateRequest represents a request to update a Loadbalancer Listener.
Loadbalancer represents an EdgecenterCloud Loadbalancer.
LoadbalancerCheckLimitsRequest represents a request to check the limits of a loadbalancer.
LoadbalancerCreateRequest represents a request to create a Loadbalancer.
LoadbalancerListenerCreateRequest represents a request to create a Loadbalancer Listener.
LoadbalancerListOptions specifies the optional query parameters to List method.
LoadbalancerMetrics represents an EdgecenterCloud Loadbalancer metrics.
LoadbalancerMetricsListRequest represents a request to get a Loadbalancer Metrics list.
LoadbalancerPoolCreateRequest represents a request to create a Loadbalancer Pool.
LoadbalancerSessionPersistence represents a request to create a Loadbalancer Pool Persistence Session.
LoadbalancersServiceOp handles communication with Loadbalancers methods of the EdgecenterCloud API.
LoadbalancerStats represents an EdgecenterCloud Loadbalancer statistic.
MetadataCreateRequest represent a metadata create struct.
No description provided by the author
No description provided by the author
MetadataRoot represents a Metadata root.
No description provided by the author
No description provided by the author
Network represents an EdgecenterCloud Network.
NetworkCreateRequest represents a request to create a Network.
NetworkListOptions specifies the optional query parameters to List method.
NetworksServiceOp handles communication with Networks methods of the EdgecenterCloud API.
NetworkSubnetwork represents an EdgecenterCloud Network with info about Subnets.
NetworksWithSubnetsOptions specifies the optional query parameters to ListNetworksWithSubnets method.
No description provided by the author
No description provided by the author
Pool represents an EdgecenterCloud Loadbalancer Pool.
PoolCreateRequest represents a request to create a Loadbalancer Listener Pool.
No description provided by the author
PoolMember represents an EdgecenterCloud Loadbalancer Pool PoolMember.
PoolMemberCreateRequest represents a request to create a Loadbalancer Pool PoolMember.
PoolUpdateRequest represents a request to update a Loadbalancer Listener Pool.
Port represents an EdgecenterCloud Port.
PortIP represents an IPAddress and a SubnetID.
PortsAllowedAddressPairs represents allowed port address pair and/or subnet masks.
PortsAllowedAddressPairsRequest represents a request to assign allowed address pairs for an instance port.
PortsInstance represent instances ports.
No description provided by the author
PortsServiceOp handles communication with Ports methods of the EdgecenterCloud API.
Project represents a EdgecenterCloud Project configuration.
ProjectCreateRequest represents a request to create a Project.
No description provided by the author
ProjectsServiceOp handles communication with Projects methods of the EdgecenterCloud API.
ProjectUpdateRequest represents a request to update a Project.
No description provided by the author
QuotasServiceOp handles communication with Quotas methods of the EdgecenterCloud API.
Region represents a EdgecenterCloud Region configuration.
RegionGetOptions specifies the optional query parameters to Get method.
RegionListOptions specifies the optional query parameters to List method.
RegionsServiceOp handles communication with Regions methods of the EdgecenterCloud API.
No description provided by the author
No description provided by the author
ReservedFixedIP represents an EdgecenterCloud ReservedFixedIP.
No description provided by the author
No description provided by the author
ReservedFixedIPListOptions specifies the optional query parameters to get ReservedFixedIP List method.
ReservedFixedIPsServiceOp handles communication with Reserved Fixed IPs methods of the EdgecenterCloud API.
Response is a EdgecenterCloud response.
An ResponseError reports the error caused by an API request.
RetryConfig sets the values used for enabling retries and backoffs for requests that fail with 429 or 500-level response codes using the go-retryablehttp client.
RoleAssignment represents a EdgecenterCloud User Role Assignment configuration.
Router represents an EdgecenterCloud Router.
No description provided by the author
No description provided by the author
No description provided by the author
RouterInterface represents a router instance interface.
No description provided by the author
RoutersServiceOp handles communication with Routers methods of the EdgecenterCloud API.
No description provided by the author
No description provided by the author
No description provided by the author
Secret represents an EdgecenterCloud Secret.
No description provided by the author
No description provided by the author
SecretsServiceOp handles communication with Secrets methods of the EdgecenterCloud API.
SecurityGroup represents a EdgecenterCloud Security Group.
SecurityGroupCreateRequest represents a request to create a Security Group.
No description provided by the author
SecurityGroupListOptions specifies the optional query parameters to List method.
SecurityGroupRule represents a EdgecenterCloud Security Group Rule.
SecurityGroupsServiceOp handles communication with Security Groups (Firewalls) methods of the EdgecenterCloud API.
No description provided by the author
ServerGroup represents an EdgecenterCloud Server Group.
ServerGroupCreateRequest represents a request to create a Server Group.
ServerGroupInstance represent an instances in server group.
ServerGroupsServiceOp handles communication with Server Groups methods of the EdgecenterCloud API.
Snapshot represents an EdgecenterCloud Snapshot.
No description provided by the author
SnapshotListOptions specifies the optional query parameters to List method.
SnapshotsServiceOp handles communication with Snapshots methods of the EdgecenterCloud API.
Subnetwork represents an EdgecenterCloud Subnetwork.
SubnetworkCreateRequest represents a request to create a Subnetwork.
SubnetworkListOptions specifies the optional query parameters to List method.
SubnetworksServiceOp handles communication with Subnetworks methods of the EdgecenterCloud API.
SubnetworkUpdateRequest represents a request to update a Subnetwork properties.
No description provided by the author
Task represents an EdgecenterCloud Task.
No description provided by the author
No description provided by the author
TaskResponse is an EdgecenterCloud response with list of created tasks.
TasksServiceOp handles communication with Tasks methods of the EdgecenterCloud API.
No description provided by the author
User represents a EdgecenterCloud User configuration.
UserListOptions specifies the optional query parameters to List method.
UserRole represents a EdgecenterCloud User Role configuration.
UserRoleListOptions specifies the optional query parameters to ListRoles method.
UsersServiceOp handles communication with Users methods of the EdgecenterCloud API.
Volume represents an EdgecenterCloud Volume.
VolumeAttachRequest represents a request to attach a Volume to Instance.
VolumeChangeTypeRequest represents a request to change a Volume type.
VolumeCreateRequest represents a request to create a Volume.
VolumeDetachRequest represents a request to detach a Volume from an Instance.
VolumeExtendSizeRequest represents a request to extend a Volume size.
No description provided by the author
VolumeListOptions specifies the optional query parameters to List method.
VolumesServiceOp handles communication with Volumes methods of the EdgecenterCloud API.
VrrpIP represents an EdgecenterCloud Loadbalancer VrrpIP (Virtual Router Redundancy Protocol IP).

# Interfaces

BareMetalService is an interface for creating and managing bare metal Instances with the EdgecenterCloud API.
FlavorsService is an interface for creating and managing Flavors with the EdgecenterCloud API.
No description provided by the author
FloatingIPsService is an interface for creating and managing FloatingIPs with the EdgecenterCloud API.
No description provided by the author
No description provided by the author
No description provided by the author
ImagesService is an interface for creating and managing Images with the EdgecenterCloud API.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
InstancesService is an interface for creating and managing Instances with the EdgecenterCloud API.
KeyPairsService is an interface for creating and managing SSH keys with the EdgecenterCloud API.
L7PoliciesService is an interface for creating and managing L7Policies with the EdgecenterCloud API.
L7RulesService is an interface for creating and managing L7Rules with the EdgecenterCloud API.
LifeCyclePoliciesService is an interface for creating and managing lifecycle policies with the EdgecenterCloud API.
LifeCyclePolicyCreateScheduleRequest represents options used to create a single schedule.
LifeCyclePolicySchedule represents a schedule resource.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
LoadbalancersService is an interface for creating and managing Loadbalancer with the EdgecenterCloud API.
No description provided by the author
NetworksService is an interface for creating and managing Networks with the EdgecenterCloud API.
PortsService is an interface for creating and managing Ports with the EdgecenterCloud API.
ProjectsService is an interface for creating and managing Projects with the EdgecenterCloud API.
QuotasService is an interface for creating and managing Quotas with the EdgecenterCloud API.
RegionsService is an interface for creating and managing Regions with the EdgecenterCloud API.
ReservedFixedIPsService is an interface for creating and managing Reserved Fixed IPs with the EdgecenterCloud API.
RoutersService is an interface for creating and managing Routers with the EdgecenterCloud API.
SecretsService is an interface for creating and managing Secrets with the EdgecenterCloud API.
No description provided by the author
No description provided by the author
SecurityGroupsService is an interface for creating and managing Security Groups (Firewalls) with the EdgecenterCloud API.
ServerGroupsService is an interface for creating and managing Server Groups with the EdgecenterCloud API.
SnapshotsService is an interface for creating and managing Snapshots with the EdgecenterCloud API.
No description provided by the author
SubnetworksService is an interface for creating and managing Subnetworks with the EdgecenterCloud API.
TasksService is an interface for managing Tasks with the EdgecenterCloud API.
UsersService is an interface for creating and managing UsersService with the EdgecenterCloud API.
No description provided by the author
VolumesService is an interface for creating and managing Volumes with the EdgecenterCloud API.

# Type aliases

No description provided by the author
No description provided by the author
ClientOpt are options for New.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ProjectState the model 'ProjectState'.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RequestCompletionCallback defines the type of the request callback function.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author